summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-12-13 06:45:52 (EST)
committer Stephan Born2013-01-25 12:35:49 (EST)
commit6f4bdc794744e5d050917ed75a21e1336de9d968 (patch)
tree8be81735525c16b7af7854fa86396ab384008a20
parentef4ba4fcc0dfe86f6e1aa4c20a8103105a833f5c (diff)
downloadorg.eclipse.stardust.ui.web-6f4bdc794744e5d050917ed75a21e1336de9d968.zip
org.eclipse.stardust.ui.web-6f4bdc794744e5d050917ed75a21e1336de9d968.tar.gz
org.eclipse.stardust.ui.web-6f4bdc794744e5d050917ed75a21e1336de9d968.tar.bz2
Jira-ID: CRNT-26251 Implement full "element rename" support
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@61558 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/postprocessing/LaneParticipantChangeTracker.java8
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java4
2 files changed, 10 insertions, 2 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/postprocessing/LaneParticipantChangeTracker.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/postprocessing/LaneParticipantChangeTracker.java
index 275c0fe..85e85fd 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/postprocessing/LaneParticipantChangeTracker.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/postprocessing/LaneParticipantChangeTracker.java
@@ -11,6 +11,7 @@ import org.eclipse.stardust.model.xpdl.builder.session.Modification;
import org.eclipse.stardust.model.xpdl.builder.utils.LaneParticipantUtil;
import org.eclipse.stardust.model.xpdl.carnot.ActivitySymbolType;
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
+import org.eclipse.stardust.model.xpdl.carnot.AttributeType;
import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelPackage;
import org.eclipse.stardust.model.xpdl.carnot.IModelParticipant;
import org.eclipse.stardust.model.xpdl.carnot.LaneSymbol;
@@ -18,6 +19,7 @@ import org.eclipse.stardust.model.xpdl.carnot.StartEventSymbol;
import org.eclipse.stardust.model.xpdl.carnot.TriggerType;
import org.eclipse.stardust.model.xpdl.carnot.util.ActivityUtil;
import org.eclipse.stardust.model.xpdl.carnot.util.AttributeUtil;
+import org.eclipse.stardust.model.xpdl.carnot.util.ModelUtils;
import org.eclipse.stardust.ui.web.modeler.edit.spi.ChangePostprocessor;
@Component
@@ -39,7 +41,7 @@ public class LaneParticipantChangeTracker implements ChangePostprocessor
modification = change;
for (EObject candidate : change.getModifiedElements())
{
- if (candidate instanceof LaneSymbol
+ if (candidate instanceof LaneSymbol
&& (change.wasModified(candidate, PKG_XPDL.getISwimlaneSymbol_Participant())
|| change.wasModified(candidate, PKG_XPDL.getISwimlaneSymbol_ParticipantReference())))
{
@@ -96,8 +98,10 @@ public class LaneParticipantChangeTracker implements ChangePostprocessor
String newPerformerId = (null != newPerformer) ? newPerformer.getId() : null;
if ( !CompareHelper.areEqual(newPerformerId, originalPerformerId))
{
- AttributeUtil.setAttribute(manualTrigger,
+ AttributeType attribute = AttributeUtil.setAttribute(manualTrigger,
PredefinedConstants.MANUAL_TRIGGER_PARTICIPANT_ATT, newPerformerId);
+ ModelUtils.setReference(attribute,
+ ModelUtils.findContainingModel(manualTrigger), "role+organization");
modification.markAlsoModified(manualTrigger);
}
}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
index ee8f25e..f6091cc 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
@@ -80,6 +80,7 @@ import org.eclipse.stardust.model.xpdl.carnot.ActivitySymbolType;
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
import org.eclipse.stardust.model.xpdl.carnot.AnnotationSymbolType;
import org.eclipse.stardust.model.xpdl.carnot.ApplicationType;
+import org.eclipse.stardust.model.xpdl.carnot.AttributeType;
import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelFactory;
import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelPackage;
import org.eclipse.stardust.model.xpdl.carnot.ConditionalPerformerType;
@@ -113,6 +114,7 @@ import org.eclipse.stardust.model.xpdl.carnot.TransitionConnectionType;
import org.eclipse.stardust.model.xpdl.carnot.TransitionType;
import org.eclipse.stardust.model.xpdl.carnot.TriggerType;
import org.eclipse.stardust.model.xpdl.carnot.XmlTextNode;
+import org.eclipse.stardust.model.xpdl.carnot.util.AttributeUtil;
import org.eclipse.stardust.model.xpdl.carnot.util.CarnotConstants;
import org.eclipse.stardust.model.xpdl.carnot.util.ModelUtils;
import org.eclipse.stardust.model.xpdl.xpdl2.ExternalReferenceType;
@@ -1397,6 +1399,8 @@ public abstract class ModelElementUnmarshaller implements ModelUnmarshaller
getModelBuilderFacade().setAttribute(trigger,
PredefinedConstants.MANUAL_TRIGGER_PARTICIPANT_ATT, performer.getId());
+ AttributeType attribute = AttributeUtil.getAttribute(trigger, PredefinedConstants.MANUAL_TRIGGER_PARTICIPANT_ATT);
+ ModelUtils.setReference(attribute, ModelUtils.findContainingModel(trigger), "role+organization");
}
}