| author | Rainer Pielmann | 2013-01-02 10:00:13 (EST) |
|---|---|---|
| committer | Stephan Born | 2013-01-25 10:57:39 (EST) |
| commit | d771728033a434bf9cd2ac214d0e2589fce822b4 (patch) (side-by-side diff) | |
| tree | acd0f26c94073a9177cc8eb409acd937ce9eec3b | |
| parent | cfe1546227f4fd3db9dde4974faaa3c1e690210b (diff) | |
| download | org.eclipse.stardust.ide-d771728033a434bf9cd2ac214d0e2589fce822b4.zip org.eclipse.stardust.ide-d771728033a434bf9cd2ac214d0e2589fce822b4.tar.gz org.eclipse.stardust.ide-d771728033a434bf9cd2ac214d0e2589fce822b4.tar.bz2 | |
Jira-ID: CRNT-27445
Support use of file:// URIs for schema references as well
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@61775 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
| -rw-r--r-- | model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/xpdl2/util/TypeDeclarationUtils.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/xpdl2/util/TypeDeclarationUtils.java b/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/xpdl2/util/TypeDeclarationUtils.java index ae89e2c..7107565 100644 --- a/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/xpdl2/util/TypeDeclarationUtils.java +++ b/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/xpdl2/util/TypeDeclarationUtils.java @@ -14,8 +14,8 @@ import java.io.IOException; import java.net.URISyntaxException; import java.util.*; import java.util.Map.Entry; -import java.util.Set; +import org.eclipse.core.runtime.Platform; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; @@ -285,9 +285,19 @@ public class TypeDeclarationUtils HashMap options = new HashMap(); options.put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); - URI uri = !location.toLowerCase().startsWith("http://") //$NON-NLS-1$ - ? URI.createPlatformResourceURI(location, true) - : URI.createURI(location); + URI uri = null; + + if (Platform.isRunning()) + { + uri = !location.toLowerCase().startsWith("http://") //$NON-NLS-1$ + ? URI.createPlatformResourceURI(location, true) + : URI.createURI(location); + } + else + { + uri = URI.createURI(location); + } + XSDResourceImpl resource = new XSDResourceImpl(uri); ResourceSetImpl resourceSet = new ResourceSetImpl(); resourceSet.getResources().add(resource); |

