summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2013-03-26 07:30:05 (EDT)
committer Sven Rottstock2013-03-26 07:30:05 (EDT)
commit9990bd5bfca38fbcc8deb61fdd9009243ccd502c (patch)
tree96ff373b533811343fa22c882c615e04c0dae061
parent2f38b21ff3228f54acdb34c1604087ee59ad0a5c (diff)
downloadorg.eclipse.stardust.ide-9990bd5bfca38fbcc8deb61fdd9009243ccd502c.zip
org.eclipse.stardust.ide-9990bd5bfca38fbcc8deb61fdd9009243ccd502c.tar.gz
org.eclipse.stardust.ide-9990bd5bfca38fbcc8deb61fdd9009243ccd502c.tar.bz2
Jira-ID: CRNT-27957
Deleting/Renaming Structured Types does not update the References - UI Mashup git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@63962 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/carnot/util/ModelUtils.java27
1 files changed, 19 insertions, 8 deletions
diff --git a/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/carnot/util/ModelUtils.java b/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/carnot/util/ModelUtils.java
index c866c9b..ef1d186 100644
--- a/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/carnot/util/ModelUtils.java
+++ b/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/carnot/util/ModelUtils.java
@@ -56,6 +56,7 @@ import org.eclipse.stardust.engine.api.model.PredefinedConstants;
import org.eclipse.stardust.engine.api.dto.AuditTrailPersistence;
import org.eclipse.stardust.engine.core.pojo.data.Type;
import org.eclipse.stardust.engine.core.struct.StructuredDataConstants;
+import org.eclipse.stardust.engine.core.upgrade.jobs.m30.ApplicationContextType;
import org.eclipse.stardust.engine.extensions.dms.data.DmsConstants;
import org.eclipse.stardust.model.xpdl.carnot.AccessPointType;
import org.eclipse.stardust.model.xpdl.carnot.ActivityImplementationType;
@@ -882,19 +883,19 @@ public class ModelUtils
public static String computeId(String name)
{
- if (name == null)
+ if (name == null)
{
return ""; //$NON-NLS-1$
}
-
+
StringBuffer sb = new StringBuffer();
name = name.trim();
-
+
if (name.equals("")) //$NON-NLS-1$
{
return ""; //$NON-NLS-1$
}
-
+
for (int i = 0; i < name.length(); i++)
{
char charAt = name.charAt(i);
@@ -903,10 +904,10 @@ public class ModelUtils
if (!Character.isJavaIdentifierStart(charAt))
{
charAt = '_'; //$NON-NLS-1$
- }
+ }
}
else
- {
+ {
if (!Character.isJavaIdentifierPart(charAt))
{
if (!Character.isWhitespace(charAt))
@@ -920,8 +921,8 @@ public class ModelUtils
sb.append(charAt);
}
}
-
- return sb.toString();
+
+ return sb.toString();
}
public static void resolve(ModelType model, IExtensibleElement extensible)
@@ -1006,6 +1007,16 @@ public class ModelUtils
}
}
+ if (config == null && extensible instanceof AccessPointType)
+ {
+ AttributeType attribute = AttributeUtil.getAttribute(extensible,
+ StructuredDataConstants.TYPE_DECLARATION_ATT);
+ if (attribute != null)
+ {
+ setReference(attribute, model, "struct"); //$NON-NLS-1$
+ }
+ }
+
// resolve permissions
// TODO: make permissions a first class element
IAttributeCategory category = AttributeUtil.createAttributeCategory(extensible, "authorization"); //$NON-NLS-1$