Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Fasani2016-01-08 16:44:53 +0000
committerEsteban DUGUEPEROUX2016-02-04 10:43:08 +0000
commit50ba55b348596840397f53755fe5697f9f5456c3 (patch)
tree383b5319b468ac9ecf9e74cda332608b1b2c2ea2
parent884a10b5826cb5bc9494394fe1042209e01fe060 (diff)
downloadorg.eclipse.sirius-50ba55b348596840397f53755fe5697f9f5456c3.tar.gz
org.eclipse.sirius-50ba55b348596840397f53755fe5697f9f5456c3.tar.xz
org.eclipse.sirius-50ba55b348596840397f53755fe5697f9f5456c3.zip
[485432] Fix File/Open on odesign file
Bug: 485432 Change-Id: Idac6f20b79ae94b385fb3e5898ace85531e4fbea Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr> Fast-tracked-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.editor/src/org/eclipse/sirius/editor/properties/validation/SiriusInterpreterErrorDecorator.java5
-rw-r--r--plugins/org.eclipse.sirius.editor/src/org/eclipse/sirius/editor/tools/internal/presentation/CustomSiriusEditor.java5
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/org.eclipse.sirius.editor/src/org/eclipse/sirius/editor/properties/validation/SiriusInterpreterErrorDecorator.java b/plugins/org.eclipse.sirius.editor/src/org/eclipse/sirius/editor/properties/validation/SiriusInterpreterErrorDecorator.java
index 2833185847..390d8da98b 100644
--- a/plugins/org.eclipse.sirius.editor/src/org/eclipse/sirius/editor/properties/validation/SiriusInterpreterErrorDecorator.java
+++ b/plugins/org.eclipse.sirius.editor/src/org/eclipse/sirius/editor/properties/validation/SiriusInterpreterErrorDecorator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 THALES GLOBAL SERVICES.
+ * Copyright (c) 2009, 2016 THALES GLOBAL SERVICES.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -88,6 +88,9 @@ public class SiriusInterpreterErrorDecorator extends LabelDecorator implements I
}
} else {
String platformResourceString = uri.toPlatformString(true);
+ if (platformResourceString == null) {
+ platformResourceString = uri.toFileString();
+ }
if (platformResourceString != null) {
this.resource = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(platformResourceString));
diff --git a/plugins/org.eclipse.sirius.editor/src/org/eclipse/sirius/editor/tools/internal/presentation/CustomSiriusEditor.java b/plugins/org.eclipse.sirius.editor/src/org/eclipse/sirius/editor/tools/internal/presentation/CustomSiriusEditor.java
index c84b43990e..db268a9884 100644
--- a/plugins/org.eclipse.sirius.editor/src/org/eclipse/sirius/editor/tools/internal/presentation/CustomSiriusEditor.java
+++ b/plugins/org.eclipse.sirius.editor/src/org/eclipse/sirius/editor/tools/internal/presentation/CustomSiriusEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2015 THALES GLOBAL SERVICES and others.
+ * Copyright (c) 2009, 2016 THALES GLOBAL SERVICES and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -73,6 +73,7 @@ import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IPathEditorInput;
+import org.eclipse.ui.IURIEditorInput;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.contexts.IContextService;
import org.osgi.framework.Version;
@@ -373,6 +374,8 @@ public class CustomSiriusEditor extends SiriusEditor implements IEObjectNavigabl
result = ((URIEditorInput) input).getURI();
} else if (input instanceof IPathEditorInput) {
result = URI.createFileURI(((IPathEditorInput) input).getPath().toOSString());
+ } else if (input instanceof IURIEditorInput) {
+ result = URI.createURI(((IURIEditorInput) input).getURI().toString());
} else {
result = (URI) input.getAdapter(URI.class);
}

Back to the top