summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-09-24 07:46:06 (EDT)
committerStephan Born2012-09-24 07:46:06 (EDT)
commit7c9366fea0fa9892962e8aee1fc47fa863e5b204 (patch)
tree42afee435ce3a4efc3cab9bc628a7720032c2845
parentdac9b9331fbdc0bae1d0d31086e7aaeab758147c (diff)
downloadorg.eclipse.stardust.ide-7c9366fea0fa9892962e8aee1fc47fa863e5b204.zip
org.eclipse.stardust.ide-7c9366fea0fa9892962e8aee1fc47fa863e5b204.tar.gz
org.eclipse.stardust.ide-7c9366fea0fa9892962e8aee1fc47fa863e5b204.tar.bz2
Jira-ID: CRNT-26326
MTA: From property page select Display Model Elements as Group and expand the Schema type, exception occurred git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@59452 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ReferencedModelSorter.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ReferencedModelSorter.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ReferencedModelSorter.java
index 057503e..0ddfbb0 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ReferencedModelSorter.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ReferencedModelSorter.java
@@ -10,13 +10,14 @@
*******************************************************************************/
package org.eclipse.stardust.modeling.core.properties;
-import java.awt.List;
import java.util.Iterator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
+
import org.eclipse.stardust.model.xpdl.carnot.AccessPointType;
+import org.eclipse.stardust.model.xpdl.carnot.AttributeType;
import org.eclipse.stardust.model.xpdl.carnot.ModelType;
import org.eclipse.stardust.model.xpdl.carnot.util.AttributeUtil;
import org.eclipse.stardust.model.xpdl.carnot.util.ModelUtils;
@@ -73,11 +74,16 @@ public class ReferencedModelSorter extends ViewerSorter
{
this.model = model;
}
-
+
private ModelType parseReferencedModel(AccessPointType apt)
{
- String path = AttributeUtil.getAttribute(apt, "carnot:engine:dataType").getValue(); //$NON-NLS-1$
- if (path.startsWith("typeDeclaration:")) //$NON-NLS-1$
+ AttributeType attribute = AttributeUtil.getAttribute(apt, "carnot:engine:dataType"); //$NON-NLS-1$
+ if (attribute == null)
+ {
+ return model;
+ }
+ String path = attribute.getValue();
+ if (path.startsWith("typeDeclaration:")) //$NON-NLS-1$
{
int idx1 = path.indexOf("{"); //$NON-NLS-1$
int idx2 = path.indexOf("}"); //$NON-NLS-1$