Skip to content
Snippets Groups Projects
Commit c7d7f4b5 authored by Thomas's avatar Thomas
Browse files

Added fix for toURI issue from previous commit.

parent aaa90915
Branches
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ package org.framed.iorm.ui.subeditors; ...@@ -2,6 +2,7 @@ package org.framed.iorm.ui.subeditors;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.net.URL; import java.net.URL;
import java.util.HashMap; import java.util.HashMap;
...@@ -160,7 +161,7 @@ public class FRaMEDFeatureEditor extends EditorPart { ...@@ -160,7 +161,7 @@ public class FRaMEDFeatureEditor extends EditorPart {
private IFeatureModel readFeatureModel() { private IFeatureModel readFeatureModel() {
File featureModelFile = null; File featureModelFile = null;
try { try {
featureModelFile = new File(FileLocator.resolve(URL_TO_FEATUREMODEL).toURI()); featureModelFile = new File(resolveURL(FileLocator.resolve(URL_TO_FEATUREMODEL)));
} catch (URISyntaxException | IOException e) { e.printStackTrace(); } } catch (URISyntaxException | IOException e) { e.printStackTrace(); }
FeatureModelManager featureModelManager = FeatureModelManager.getInstance(featureModelFile.toPath()); FeatureModelManager featureModelManager = FeatureModelManager.getInstance(featureModelFile.toPath());
if(featureModelManager.getLastProblems().containsError()) { if(featureModelManager.getLastProblems().containsError()) {
...@@ -185,6 +186,10 @@ public class FRaMEDFeatureEditor extends EditorPart { ...@@ -185,6 +186,10 @@ public class FRaMEDFeatureEditor extends EditorPart {
} }
} }
private static URI resolveURL(URL url) throws URISyntaxException {
return new URI(url.getProtocol(), url.getPath(), null);
}
//tree related operation //tree related operation
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment