summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-03-30 08:59:15 (EDT)
committerStephan Born2012-04-24 10:13:45 (EDT)
commitf06a252985b02f14ac6a84456bcb2ae805d3157c (patch)
treedc6ea4e2a26069a6ed96b5e1b264da0db011c44b
parentb3b15d21f827c8efcca269c76e6332293d0963c3 (diff)
downloadorg.eclipse.stardust.ide-f06a252985b02f14ac6a84456bcb2ae805d3157c.zip
org.eclipse.stardust.ide-f06a252985b02f14ac6a84456bcb2ae805d3157c.tar.gz
org.eclipse.stardust.ide-f06a252985b02f14ac6a84456bcb2ae805d3157c.tar.bz2
Jira-ID: CRNT-24221
Structured types should be provided with model names if those are referred one in MTA git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@55146 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/MessageTransformationUtils.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/MessageTransformationUtils.java b/modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/MessageTransformationUtils.java
index b47e2a1..203a0dd 100644
--- a/modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/MessageTransformationUtils.java
+++ b/modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/MessageTransformationUtils.java
@@ -103,19 +103,33 @@ public class MessageTransformationUtils
: StructuredTypeUtils.getStructuredAccessPointTypeDeclaration((StructAccessPointType) declaringType);
IXPathMap xPathMap = StructuredTypeUtils.getXPathMap(typeDeclaration);
DataTypeType structDataType = ModelUtils.getDataType(modelElement, StructuredDataConstants.STRUCTURED_DATA);
+
AccessPointType accessPoint = createStructAccessPoint(messageName, messageName + " (" //$NON-NLS-1$
+ typeDeclaration.getId() + ")", //$NON-NLS-1$
direction, structDataType, xPathMap.getRootXPath(), xPathMap);
+
// (fh) Workaround to ensure that the access point has a parent
// before setting the reference to the type declaration.
((AccessPointTypeImpl) accessPoint).setFakeContainer((IAccessPointOwner) modelElement);
StructuredTypeUtils.setStructuredAccessPointAttributes(accessPoint, typeDeclaration);
((AccessPointTypeImpl) accessPoint).setFakeContainer(null);
-
+ String path = AttributeUtil.getAttribute(accessPoint, "carnot:engine:dataType").getValue(); //$NON-NLS-1$
+ accessPoint.setName(parseName(path));
return accessPoint;
}
+ private String parseName(String path)
+ {
+ if (path.startsWith("typeDeclaration:")) //$NON-NLS-1$
+ {
+ path = path.replaceAll("typeDeclaration:", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ path = path.replace("{", "");//$NON-NLS-1$ //$NON-NLS-2$
+ path = path.replace("}", " / "); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return path;
+ }
+
public Class<?> getClassForType(String type)
{
if (type.equalsIgnoreCase("long")) { //$NON-NLS-1$