diff options
| author | Laurent Fasani | 2016-01-08 16:44:53 +0000 |
|---|---|---|
| committer | Esteban DUGUEPEROUX | 2016-02-04 10:43:08 +0000 |
| commit | 50ba55b348596840397f53755fe5697f9f5456c3 (patch) | |
| tree | 383b5319b468ac9ecf9e74cda332608b1b2c2ea2 | |
| parent | 884a10b5826cb5bc9494394fe1042209e01fe060 (diff) | |
| download | org.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>
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); } |
