From dae3c6148e90198bea2902bdb15cf91d429df1ed Mon Sep 17 00:00:00 2001 From: tkuehn <thomas.kuehn3@tu-dresden.de> Date: Mon, 4 Jun 2018 14:08:44 +0200 Subject: [PATCH] Added Documentation to the toURI fix on windows. --- .../iorm/transformation/TransformationExecutor.java | 10 +++++++++- .../framed/iorm/ui/subeditors/FRaMEDFeatureEditor.java | 8 ++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/org.framed.iorm.transformation/src/org/framed/iorm/transformation/TransformationExecutor.java b/org.framed.iorm.transformation/src/org/framed/iorm/transformation/TransformationExecutor.java index fdd3e1ce..7dd16dd3 100644 --- a/org.framed.iorm.transformation/src/org/framed/iorm/transformation/TransformationExecutor.java +++ b/org.framed.iorm.transformation/src/org/framed/iorm/transformation/TransformationExecutor.java @@ -321,7 +321,15 @@ public class TransformationExecutor extends EpsilonStandalone { return models; } - private URI resolveURL(URL url) throws URISyntaxException { + /** + * Translator from URLs to URIs that creates correct URIs, in contrast to URL.toURI(). + * (cf. https://stackoverflow.com/questions/14676966/escape-result-of-filelocator-resolveurl/14677157) + * + * @param url the given URL + * @return a new correctly initialized URI object + * @throws URISyntaxException + */ + private static URI resolveURL(URL url) throws URISyntaxException { return new URI(url.getProtocol(), url.getPath(), null); } } diff --git a/org.framed.iorm.ui/src/org/framed/iorm/ui/subeditors/FRaMEDFeatureEditor.java b/org.framed.iorm.ui/src/org/framed/iorm/ui/subeditors/FRaMEDFeatureEditor.java index a6cc6fce..c8ba6e95 100644 --- a/org.framed.iorm.ui/src/org/framed/iorm/ui/subeditors/FRaMEDFeatureEditor.java +++ b/org.framed.iorm.ui/src/org/framed/iorm/ui/subeditors/FRaMEDFeatureEditor.java @@ -186,6 +186,14 @@ public class FRaMEDFeatureEditor extends EditorPart { } } + /** + * Translator from URLs to URIs that creates correct URIs, in contrast to URL.toURI(). + * (cf. https://stackoverflow.com/questions/14676966/escape-result-of-filelocator-resolveurl/14677157) + * + * @param url the given URL + * @return a new correctly initialized URI object + * @throws URISyntaxException + */ private static URI resolveURL(URL url) throws URISyntaxException { return new URI(url.getProtocol(), url.getPath(), null); } -- GitLab