summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-12-19 06:46:49 (EST)
committer Stephan Born2013-01-25 10:36:51 (EST)
commit0cbfbbfdeedb7ea98eec395aff2357ded0280be1 (patch)
tree27ad23a3c8478e36e596d625850225906a8b1368
parente70183480a17ebcc69a7ef5415892c8d6f879631 (diff)
downloadorg.eclipse.stardust.ide-0cbfbbfdeedb7ea98eec395aff2357ded0280be1.zip
org.eclipse.stardust.ide-0cbfbbfdeedb7ea98eec395aff2357ded0280be1.tar.gz
org.eclipse.stardust.ide-0cbfbbfdeedb7ea98eec395aff2357ded0280be1.tar.bz2
Exceptionhandling for the case no Eclipse environment running.
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@61648 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/xpdl2/impl/ExternalReferenceTypeImpl.java34
1 files changed, 20 insertions, 14 deletions
diff --git a/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/xpdl2/impl/ExternalReferenceTypeImpl.java b/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/xpdl2/impl/ExternalReferenceTypeImpl.java
index 6f07432..1db56cf 100644
--- a/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/xpdl2/impl/ExternalReferenceTypeImpl.java
+++ b/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/xpdl2/impl/ExternalReferenceTypeImpl.java
@@ -209,7 +209,7 @@ public class ExternalReferenceTypeImpl extends EObjectImpl implements ExternalRe
/**
* Simple caching mechanism to speed up the external schema retrieval
- * and to prohibit the existence of multiple instances of the same schema
+ * and to prohibit the existence of multiple instances of the same schema
* @generated NOT
*/
public XSDSchema getSchema() {
@@ -249,7 +249,7 @@ public class ExternalReferenceTypeImpl extends EObjectImpl implements ExternalRe
}
return null;
}
-
+
/**
* TODO: describe
* We must synchronize that method entirely to ensure cache consistency.
@@ -300,22 +300,28 @@ public class ExternalReferenceTypeImpl extends EObjectImpl implements ExternalRe
url = location;
}
if (!url.toLowerCase().startsWith("http://")) //$NON-NLS-1$
- {
- IProject project = ModelUtils.getProjectFromEObject(declaration);
- if (project != null)
- {
- url = getFileUrl(project, url);
- }
- else
+ {
+ try
{
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < projects.length; i++)
+ IProject project = ModelUtils.getProjectFromEObject(declaration);
+ if (project != null)
{
- IProject proj = projects[i];
- url = getFileUrl(proj, url);
+ url = getFileUrl(project, url);
}
+ else
+ {
+ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ for (int i = 0; i < projects.length; i++)
+ {
+ IProject proj = projects[i];
+ url = getFileUrl(proj, url);
+ }
+ }
+ } catch (Throwable t)
+ {
+ return url;
}
- }
+ }
return url;
}