summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-01-11 04:47:42 (EST)
committerStephan Born2012-04-24 04:29:31 (EDT)
commit75ac6755b4f832685d90c8c91be408420feb1ff5 (patch)
treec20d75b77ad0d22bdb1b892b8aaed365c9de4df8
parent13d64689f0dbfa8fb265103a9dd012a73c44c448 (diff)
downloadorg.eclipse.stardust.ide-75ac6755b4f832685d90c8c91be408420feb1ff5.zip
org.eclipse.stardust.ide-75ac6755b4f832685d90c8c91be408420feb1ff5.tar.gz
org.eclipse.stardust.ide-75ac6755b4f832685d90c8c91be408420feb1ff5.tar.bz2
Jira-ID: CRNT-23216 Refactor carnot-engine into org.eclipse.stardust.* packages (fixed loading of old MTAModels)
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@52748 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/application/transformation/MessageTransformationApplicationPropertyPage.java3
-rw-r--r--modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/application/transformation/MessageTransformationController.java14
2 files changed, 12 insertions, 5 deletions
diff --git a/modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/application/transformation/MessageTransformationApplicationPropertyPage.java b/modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/application/transformation/MessageTransformationApplicationPropertyPage.java
index 1856378..aefdb57 100644
--- a/modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/application/transformation/MessageTransformationApplicationPropertyPage.java
+++ b/modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/application/transformation/MessageTransformationApplicationPropertyPage.java
@@ -78,7 +78,8 @@ public class MessageTransformationApplicationPropertyPage extends
if (controller.getAvailableMessageTypes().isEmpty()) {
setErrorMessage(Modeling_Messages.MSG_MD_NOT_CONTAIN_STR_DATA_TYPE_DEFINE_MSG);
}
- } catch (RuntimeException t) {
+ } catch (RuntimeException t) {
+ t.printStackTrace();
MessageBox messageBox = createMessageBoxByException(t);
if (messageBox == null) {
throw t;
diff --git a/modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/application/transformation/MessageTransformationController.java b/modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/application/transformation/MessageTransformationController.java
index 532d853..b9d5576 100644
--- a/modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/application/transformation/MessageTransformationController.java
+++ b/modeling/org.eclipse.stardust.modeling.transformation/src/org/eclipse/stardust/modeling/transformation/messaging/modeling/application/transformation/MessageTransformationController.java
@@ -26,6 +26,7 @@ import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.stardust.common.StringUtils;
import org.eclipse.stardust.engine.api.model.PredefinedConstants;
+import org.eclipse.stardust.engine.core.compatibility.ipp.PreStardustTypeNameResolver;
import org.eclipse.stardust.engine.core.pojo.data.Type;
import org.eclipse.stardust.engine.core.runtime.beans.BigData;
import org.eclipse.stardust.engine.core.struct.StructuredDataConstants;
@@ -161,9 +162,14 @@ public class MessageTransformationController {
public void intializeModel(ModelType model, IModelElementNodeSymbol symbol,
IModelElement element) {
-
- mtaUtils = new MessageTransformationUtils(ModelUtils.getProjectFromEObject(element), element, model);
+
+ mtaUtils = new MessageTransformationUtils(ModelUtils.getProjectFromEObject(element), element, model);
String xmlString = AttributeUtil.getAttributeValue((IExtensibleElement) element, Constants.TRANSFORMATION_PROPERTY);
+ PreStardustTypeNameResolver typeNameResolver = new PreStardustTypeNameResolver();
+ String r1 = typeNameResolver.resolveTypeName("com.infinity.bpm.messaging.model");
+ String r2 = typeNameResolver.resolveTypeName("com.infinity.bpm.messaging.model.mapping.MappingPackage");
+ xmlString = xmlString.replaceAll("com.infinity.bpm.messaging.model.mapping.MappingPackage", r2);
+ xmlString = xmlString.replaceAll("com.infinity.bpm.messaging.model", r1);
if (xmlString != null) {
trafoProp = (TransformationProperty) MappingModelUtil.transformXML2Ecore(xmlString.getBytes());
}
@@ -486,7 +492,7 @@ private void extractAccessPoints(IModelElement element)
if (selectedTargetField == null) {
return false;
}
- if (this.isSimpleMode()) {
+
String xPath = getXPathFor(selectedTargetField);
if (selectedTargetField != null && xPath != null) {
this.selectedTargetFieldMapping = fieldMappings
@@ -501,7 +507,7 @@ private void extractAccessPoints(IModelElement element)
statementsDocument = "//Statements\n" + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
return true;
}
- }
+
}
return false;
}