summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-09-04 08:55:49 (EDT)
committerStephan Born2012-09-10 08:46:49 (EDT)
commit98c85b017b21c5b7ac2602f7afe0cc7af1adc8bf (patch)
tree3fdff16dded9283a8479db8fedfc2dc2abb2f743
parent95b6a23c277491d30fcd0ac2ba3df9b7613fa60e (diff)
downloadorg.eclipse.stardust.ide-98c85b017b21c5b7ac2602f7afe0cc7af1adc8bf.zip
org.eclipse.stardust.ide-98c85b017b21c5b7ac2602f7afe0cc7af1adc8bf.tar.gz
org.eclipse.stardust.ide-98c85b017b21c5b7ac2602f7afe0cc7af1adc8bf.tar.bz2
Jira-ID: CRNT-25929
Remove "Infinity Analyst Perspective" from eclipse modeler functionality. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@58904 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/DiagramPlugin.java35
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/DynamicConnectionCommand.java214
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorContextMenuProvider.java65
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorPaletteFactory.java40
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/IconFactory.java22
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateActivityAction.java10
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateApplicationAction.java6
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateDataAction.java6
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateInteractiveApplicationAction.java4
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateSubprocessAction.java14
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateTriggerAction.java7
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/ResetSubprocessAction.java9
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/SetActivitySubprocessAction.java10
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/commands/SetSymbolContainerCommand.java18
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/policies/NodeSymbolGraphicalNodeEditPolicy.java24
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/properties/LaneParticipantCommandFactory.java25
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ActivityGeneralPropertyPage.java42
-rw-r--r--modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchDelegate.java93
18 files changed, 286 insertions, 358 deletions
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/DiagramPlugin.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/DiagramPlugin.java
index 6faec0d..53d155c 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/DiagramPlugin.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/DiagramPlugin.java
@@ -265,41 +265,6 @@ public class DiagramPlugin extends AbstractUIPlugin
return null;
}
- public static boolean isBusinessView(WorkflowModelEditor editor)
- {
- if (editor != null && BpmUiConstants.CWD_PERSPECTIVE_ID.equals(
- getCurrentPerspectiveId()))
- {
- ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
- IDebugTarget[] targets = lm.getDebugTargets();
- for (int i = 0; i < targets.length; i++)
- {
- if (targets[i] instanceof ICWMDebugTarget)
- {
- ICWMDebugTarget cwmTarget = (ICWMDebugTarget) targets[i];
- if (!cwmTarget.isTerminated() && cwmTarget.getEditor().equals(editor))
- {
- PlatformUI.getPreferenceStore().setValue(
- "org.eclipse.stardust.modeling.core.analystView", cwmTarget.isAnalystMode()); //$NON-NLS-1$
- break;
- }
- }
- }
- }
-
- // TODO: Consider to refactor the logic of this method to an explicit interface.
- // Quick fix: This prevents exceptions when diagrams are exported by project tate.
- try
- {
- return PlatformUI.getPreferenceStore().getBoolean(
- "org.eclipse.stardust.modeling.core.analystView"); //$NON-NLS-1$
- }
- catch (RuntimeException e)
- {
- return false;
- }
- }
-
public static String getViewAsPerspectiveId(WorkflowModelEditor editor)
{
return DiagramPlugin.getCurrentPerspectiveId();
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/DynamicConnectionCommand.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/DynamicConnectionCommand.java
index 6b1e67f..b568c2a 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/DynamicConnectionCommand.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/DynamicConnectionCommand.java
@@ -31,6 +31,10 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
import org.eclipse.stardust.common.CollectionUtils;
import org.eclipse.stardust.engine.api.model.PredefinedConstants;
import org.eclipse.stardust.engine.core.struct.StructuredDataConstants;
@@ -104,29 +108,26 @@ import org.eclipse.stardust.modeling.core.ui.StringUtils;
import org.eclipse.stardust.modeling.core.utils.GenericUtils;
import org.eclipse.stardust.modeling.validation.util.TypeFinder;
import org.eclipse.stardust.modeling.validation.util.TypeInfo;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
public class DynamicConnectionCommand extends Command
{
/*
* List of all possible conections (as of version 4.3):
- *
+ *
* i) Connections with underlying model element
* - TransitionConnectionType
* - DataMappingConnectionType
- *
+ *
* ii) Connections with references
* - ExecutedByConnectionType
* - PerformsConnectionType
* - PartOfConnectionType
* - WorksForConnectionType
* - SubProcessOfConnectionType
- *
+ *
* iii) Annotation connections
* - RefersToConnectionType
- *
+ *
* iv) User defined connections
* - GenericLinkConnectionType
*/
@@ -268,12 +269,12 @@ public class DynamicConnectionCommand extends Command
AttributeType attribute = AttributeUtil.getAttribute(trigger, PredefinedConstants.PARTICIPANT_ATT);
if (attribute == null)
{
- attribute = AttributeUtil.createAttribute(PredefinedConstants.PARTICIPANT_ATT);
- command.add(new SetValueCmd(trigger, PKG.getIExtensibleElement_Attribute(), attribute));
+ attribute = AttributeUtil.createAttribute(PredefinedConstants.PARTICIPANT_ATT);
+ command.add(new SetValueCmd(trigger, PKG.getIExtensibleElement_Attribute(), attribute));
}
command.add(new SetAttributeReferenceCmd(attribute, participant));
- }
-
+ }
+
if (feature == PKG.getTransitionConnectionType())
{
addIfNotNull(command, getCreateTransitionCommand(reference));
@@ -283,10 +284,9 @@ public class DynamicConnectionCommand extends Command
{
ActivityType activity = (ActivityType) extractModelElement(targetSymbol);
IModelParticipant originalPerformer = activity.getPerformer();
- IModelParticipant newPerformer = (IModelParticipant) extractModelElement(sourceSymbol);
-
- if (!DiagramPlugin.isBusinessView(editor)
- && !ActivityUtil.isInteractive(activity))
+ IModelParticipant newPerformer = (IModelParticipant) extractModelElement(sourceSymbol);
+
+ if (!ActivityUtil.isInteractive(activity))
{
if (!canChangeImplementation())
{
@@ -305,13 +305,13 @@ public class DynamicConnectionCommand extends Command
command.add(getSetValueCommand(PKG.getActivityType_Performer()));
// view a message - user can confirm or cancel to change the performer
if(originalPerformer != null && !originalPerformer.equals(newPerformer))
- {
- String message = MessageFormat.format(Diagram_Messages.MSG_Replace_performer_with_performer_for_activity,
+ {
+ String message = MessageFormat.format(Diagram_Messages.MSG_Replace_performer_with_performer_for_activity,
new Object[]{LaneParticipantCommandFactory.getPerformerName(originalPerformer),
LaneParticipantCommandFactory.getPerformerName(newPerformer),activity.getName()});
if(!MessageDialog.openQuestion(editor.getSite().getShell(),Diagram_Messages.MSG_DIA_SET_PERFORMER, message)) {
cancelCommand();
-
+
}
}
}
@@ -325,7 +325,7 @@ public class DynamicConnectionCommand extends Command
if (feature == PKG.getExecutedByConnectionType())
{
- command.add(getSetValueCommand(PKG.getActivityType_Application()));
+ command.add(getSetValueCommand(PKG.getActivityType_Application()));
// target is activity
final ActivityType activity = (ActivityType) extractModelElement(targetSymbol);
IIdentifiableModelElement modelElement = extractModelElement(sourceSymbol);
@@ -333,14 +333,14 @@ public class DynamicConnectionCommand extends Command
if (modelElement instanceof ApplicationType)
{
// source is applications symbol, depends on context
- final ApplicationType application = (ApplicationType) modelElement;
-
+ final ApplicationType application = (ApplicationType) modelElement;
+
IModelParticipant lanePerformer = GenericUtils.getLanePerformerForActivity(activity);
if (lanePerformer != null && application.isInteractive())
{
- command.add(new SetValueCmd(activity, PKG.getActivityType_Performer(), lanePerformer));
- }
-
+ command.add(new SetValueCmd(activity, PKG.getActivityType_Performer(), lanePerformer));
+ }
+
List<DataMappingType> dataMappings = activity.getDataMapping();
for (final DataMappingType dm : dataMappings)
{
@@ -348,19 +348,19 @@ public class DynamicConnectionCommand extends Command
// move all IN data mappings to the application context
if(direction.equals(DirectionType.IN_LITERAL))
{
- final DataType data = dm.getData();
+ final DataType data = dm.getData();
final String context = PredefinedConstants.APPLICATION_CONTEXT;
// must be a command
command.add(new SetValueCmd(dm, PKG.getDataMappingType_Context(), context));
Command myCmd = new DelegatingCommand()
{
public Command createDelegate()
- {
+ {
String accessPointId = getAccessPoint(activity, application, data, direction, context);
if(accessPointId != null)
{
return new SetValueCmd(dm, PKG.getDataMappingType_ApplicationAccessPoint(), accessPointId);
- }
+ }
return null;
}
};
@@ -368,7 +368,7 @@ public class DynamicConnectionCommand extends Command
}
else if(direction.equals(DirectionType.OUT_LITERAL))
{
- final DataType data = dm.getData();
+ final DataType data = dm.getData();
final String context = PredefinedConstants.APPLICATION_CONTEXT;
// if empty, switch context
if(org.eclipse.stardust.common.StringUtils.isEmpty(dm.getApplicationAccessPoint()))
@@ -377,16 +377,16 @@ public class DynamicConnectionCommand extends Command
Command myCmd = new DelegatingCommand()
{
public Command createDelegate()
- {
+ {
String accessPointId = getAccessPoint(activity, application, data, direction, context);
if(accessPointId != null)
{
return new SetValueCmd(dm, PKG.getDataMappingType_ApplicationAccessPoint(), accessPointId);
- }
+ }
return null;
}
};
- command.add(myCmd);
+ command.add(myCmd);
}
}
}
@@ -405,7 +405,7 @@ public class DynamicConnectionCommand extends Command
{
command.add(UnexecutableCommand.INSTANCE);
}
-
+
command.add(getSetValueCommand(PKG.getOrganizationType_TeamLead(), role));
}
else
@@ -434,10 +434,10 @@ public class DynamicConnectionCommand extends Command
}
else
{
- cmd.setParent(pool == null ? (ISymbolContainer) diagram : pool);
+ cmd.setParent(pool == null ? (ISymbolContainer) diagram : pool);
}
*/
- cmd.setParent(pool == null ? (ISymbolContainer) diagram : pool);
+ cmd.setParent(pool == null ? (ISymbolContainer) diagram : pool);
cmd.setSourceSymbol(sourceSymbol);
cmd.setTargetSymbol(targetSymbol);
cmd.setSourceAnchorType(sourceAnchor);
@@ -490,8 +490,8 @@ public class DynamicConnectionCommand extends Command
private Command getSetActivityControlFlowCmd(ActivityType activity,
FlowControlType flow)
{
- JoinSplitType type = JoinSplitType.XOR_LITERAL;
-
+ JoinSplitType type = JoinSplitType.XOR_LITERAL;
+
if(flow.equals(FlowControlType.SPLIT_LITERAL))
{
if(PlatformUI.getPreferenceStore().getBoolean(
@@ -502,11 +502,11 @@ public class DynamicConnectionCommand extends Command
{
if(SplitJoinDialog.isAnd())
{
- type = JoinSplitType.AND_LITERAL;
+ type = JoinSplitType.AND_LITERAL;
}
else
{
- type = JoinSplitType.XOR_LITERAL;
+ type = JoinSplitType.XOR_LITERAL;
}
}
}
@@ -517,7 +517,7 @@ public class DynamicConnectionCommand extends Command
}
else
{
- type = JoinSplitType.XOR_LITERAL;
+ type = JoinSplitType.XOR_LITERAL;
}
}
else
@@ -530,11 +530,11 @@ public class DynamicConnectionCommand extends Command
{
if(SplitJoinDialog.isAnd())
{
- type = JoinSplitType.AND_LITERAL;
+ type = JoinSplitType.AND_LITERAL;
}
else
{
- type = JoinSplitType.XOR_LITERAL;
+ type = JoinSplitType.XOR_LITERAL;
}
}
}
@@ -545,10 +545,10 @@ public class DynamicConnectionCommand extends Command
}
else
{
- type = JoinSplitType.XOR_LITERAL;
- }
+ type = JoinSplitType.XOR_LITERAL;
+ }
}
-
+
Command cmd = new SetActivityControlFlowCmd(editor, activity, flow, type)
{
public void execute()
@@ -589,7 +589,7 @@ public class DynamicConnectionCommand extends Command
final ActivityType activity = activitySymbol.getActivity();
final ApplicationType application = activity.getApplication();
-
+
final DataType data = dataSymbol.getData();
final DirectionType direction = sourceSymbol == dataSymbol
@@ -636,7 +636,7 @@ public class DynamicConnectionCommand extends Command
dm.setData(data);
dm.setDirection(direction);
dm.setContext(context);
-
+
if(application != null)
{
String accessPointId = DynamicConnectionCommand.this.getAccessPoint(activity, application, data, direction, context);
@@ -647,7 +647,7 @@ public class DynamicConnectionCommand extends Command
}
return dm;
}
-
+
public void redo()
{
super.redo();
@@ -693,11 +693,11 @@ public class DynamicConnectionCommand extends Command
{
if(GenericUtils.dataHasClassAssigned(data))
{
- dataClass = referenceClassName;
+ dataClass = referenceClassName;
}
}
}
-
+
// get all access points for activity
List accessPoints = ActivityUtil.getAccessPoints(activity,
DirectionType.IN_LITERAL.equals(direction), context);
@@ -706,8 +706,8 @@ public class DynamicConnectionCommand extends Command
if (data.getType().getId().equals(PredefinedConstants.PRIMITIVE_DATA))
{
accessPointId = getAccessPoint(activity, accessPoints, data);
- }
-
+ }
+
// 1st iteration check for types
if(accessPointId == null)
{
@@ -719,51 +719,51 @@ public class DynamicConnectionCommand extends Command
}
return accessPointId;
}
-
+
//
-
- private String getAccessPoint(final ActivityType activity,
+
+ private String getAccessPoint(final ActivityType activity,
Object dataClass, List accessPoints, boolean checkType, DataType data)
{
TypeFinder typeFinder = new TypeFinder((EObject) activity);
-
+
for (Iterator i = accessPoints.iterator(); i.hasNext();)
{
- AccessPointType accessPoint = (AccessPointType) i.next();
+ AccessPointType accessPoint = (AccessPointType) i.next();
DirectionType accessPointDirection = accessPoint.getDirection();
String attrValue = AccessPointUtil.getTypeAttributeValue(accessPoint);
-
- // DMS
+
+ // DMS
if(GenericUtils.isDMSDataType(data))
{
DataTypeType type = accessPoint.getType();
if(type != null && type.getId().equals(data.getType().getId()))
{
- return accessPoint.getId();
+ return accessPoint.getId();
}
- }
+ }
// Knitware
else if(GenericUtils.isStructuredDataType(data))
{
String structuredTypeData = GenericUtils.getReferenceClassName(data);
String structuredType = AttributeUtil.getAttributeValue(accessPoint, StructuredDataConstants.TYPE_DECLARATION_ATT);
- if(!StringUtils.isEmpty(structuredTypeData)
- && !StringUtils.isEmpty(structuredType)
+ if(!StringUtils.isEmpty(structuredTypeData)
+ && !StringUtils.isEmpty(structuredType)
&& structuredTypeData.equals(structuredType))
{
- return accessPoint.getId();
+ return accessPoint.getId();
}
- }
-
+ }
+
// compare types
// should not be connected already!
- if(!GenericUtils.isConnected(activity, accessPoint.getId())
+ if(!GenericUtils.isConnected(activity, accessPoint.getId())
&& dataClass != null)
{
if(attrValue != null)
{
if(dataClass instanceof Class)
- {
+ {
Class applicationClass;
try
{
@@ -774,15 +774,15 @@ public class DynamicConnectionCommand extends Command
{
if(applicationClass.isAssignableFrom((Class) dataClass))
{
- return accessPoint.getId();
- }
+ return accessPoint.getId();
+ }
}
else
{
if(((Class) dataClass).isAssignableFrom(applicationClass))
{
- return accessPoint.getId();
- }
+ return accessPoint.getId();
+ }
}
}
else
@@ -792,8 +792,8 @@ public class DynamicConnectionCommand extends Command
{
if(applicationClass.equals(dataClass))
{
- return accessPoint.getId();
- }
+ return accessPoint.getId();
+ }
}
else
{
@@ -801,15 +801,15 @@ public class DynamicConnectionCommand extends Command
{
if(applicationClass.isAssignableFrom((Class) dataClass))
{
- return accessPoint.getId();
- }
+ return accessPoint.getId();
+ }
}
else
{
if(((Class) dataClass).isAssignableFrom(applicationClass))
{
- return accessPoint.getId();
- }
+ return accessPoint.getId();
+ }
}
}
}
@@ -819,26 +819,26 @@ public class DynamicConnectionCommand extends Command
TypeInfo typeInfo = typeFinder.findType(attrValue);
if(typeInfo != null && typeInfo.isSameType(((Class) dataClass).getName()))
{
- return accessPoint.getId();
+ return accessPoint.getId();
}
}
- }
+ }
else
{
TypeInfo typeInfo = typeFinder.findType(attrValue);
if(typeInfo != null && typeInfo.isSameType((String) dataClass))
{
- return accessPoint.getId();
- }
+ return accessPoint.getId();
+ }
}
}
- }
+ }
}
return null;
}
// special case for primitive data
- private String getAccessPoint(final ActivityType activity,
+ private String getAccessPoint(final ActivityType activity,
List accessPoints, DataType data)
{
String dataType = AttributeUtil.getAttributeValue(data, PredefinedConstants.TYPE_ATT);
@@ -846,19 +846,19 @@ public class DynamicConnectionCommand extends Command
// 1st iteration, check for parameter
for (Iterator i = accessPoints.iterator(); i.hasNext();)
{
- AccessPointType accessPoint = (AccessPointType) i.next();
+ AccessPointType accessPoint = (AccessPointType) i.next();
String attrValue = AccessPointUtil.getTypeAttributeValue(accessPoint);
String accessPointId = accessPoint.getId();
-
+
// should not be connected already!
- if(!GenericUtils.isConnected(activity, accessPoint.getId()))
+ if(!GenericUtils.isConnected(activity, accessPoint.getId()))
{
if(attrValue != null)
- {
+ {
// is parameter, not method (prefer)
if(accessPointId.indexOf("(") == -1) //$NON-NLS-1$
{
- // attrValue could be something like 'long', parameter
+ // attrValue could be something like 'long', parameter
if(attrValue.equals(dataType))
{
return accessPointId;
@@ -869,9 +869,9 @@ public class DynamicConnectionCommand extends Command
}
return null;
}
-
+
//
-
+
private String getDataMappingContext(ActivityType activity)
{
if (ActivityImplementationType.ROUTE_LITERAL == activity.getImplementation())
@@ -980,7 +980,7 @@ public class DynamicConnectionCommand extends Command
((TransitionType) reference[0]).setCondition("CONDITION"); //$NON-NLS-1$
XmlTextNode expression = CarnotWorkflowModelFactory.eINSTANCE.createXmlTextNode();
((TransitionType) reference[0]).setExpression(expression);
- ModelUtils.setCDataString(expression.getMixed(), "true", true); //$NON-NLS-1$
+ ModelUtils.setCDataString(expression.getMixed(), "true", true); //$NON-NLS-1$
return (IModelElement) reference[0];
}
@@ -1076,7 +1076,7 @@ public class DynamicConnectionCommand extends Command
{
if (element instanceof EClass)
{
- String eClassName = ((EClass) element).getName();
+ String eClassName = ((EClass) element).getName();
return getExternalLabel(eClassName);
}
else if (element instanceof LinkTypeType)
@@ -1302,11 +1302,11 @@ public class DynamicConnectionCommand extends Command
StartEventSymbol triggerSymbol = null;
if(targetSymbol != null && targetSymbol instanceof StartEventSymbol)
{
- triggerSymbol = (StartEventSymbol) targetSymbol;
+ triggerSymbol = (StartEventSymbol) targetSymbol;
}
else if(sourceSymbol != null && sourceSymbol instanceof StartEventSymbol)
{
- triggerSymbol = (StartEventSymbol) sourceSymbol;
+ triggerSymbol = (StartEventSymbol) sourceSymbol;
}
TriggerType trigger = triggerSymbol.getTrigger();
if(trigger == null)
@@ -1326,7 +1326,7 @@ public class DynamicConnectionCommand extends Command
}
}
}
-
+
if (PKG.getDataMappingConnectionType() == type)
{
// special constraint: data mappings must have source & target of different types
@@ -1337,7 +1337,7 @@ public class DynamicConnectionCommand extends Command
return false;
}
}
-
+
// Drawing of in data mappings on sub process with copy all data should be blocked.
ActivitySymbolType activitySymbol = null;
if(targetSymbol != null && targetSymbol instanceof ActivitySymbolType)
@@ -1351,7 +1351,7 @@ public class DynamicConnectionCommand extends Command
{
return false;
}
- }
+ }
}
}
else
@@ -1394,12 +1394,12 @@ public class DynamicConnectionCommand extends Command
{
if(!isValidOrganizationMemberConnection(sourceSymbol, targetSymbol))
{
- return false;
+ return false;
}
IModelParticipant child = (IModelParticipant) extractModelElement(sourceSymbol);
if(child != null && child.getId().equals(PredefinedConstants.ADMINISTRATOR_ROLE))
{
- return false;
+ return false;
}
}
else if (PKG.getTeamLeadConnectionType().equals(type))
@@ -1413,12 +1413,12 @@ public class DynamicConnectionCommand extends Command
if (parent.getTeamLead() == child)
{
return false;
- }
+ }
if(child.getId().equals(PredefinedConstants.ADMINISTRATOR_ROLE))
{
- return false;
+ return false;
}
-
+
return (null == parent.getTeamLead());
}
@@ -1464,14 +1464,14 @@ public class DynamicConnectionCommand extends Command
/* // special check if Container is a LaneSymbol
if (activity != null && activity.getPerformer() != null &&
targetSymbol.eContainer() instanceof LaneSymbol)
- {
+ {
// and has a participant
- // and this participant is the same as the one from the container
+ // and this participant is the same as the one from the container
if(((LaneSymbol) targetSymbol.eContainer()).getParticipant() == null
|| ((LaneSymbol) targetSymbol.eContainer()).getParticipant().equals(activity.getPerformer()))
{
return true;
- }
+ }
return false;
}*/
return activity != null;
@@ -1481,7 +1481,7 @@ public class DynamicConnectionCommand extends Command
{
ActivityType activity = (ActivityType) extractModelElement(targetSymbol);
return activity != null
- && (DiagramPlugin.isBusinessView(editor) || ActivityImplementationType.APPLICATION_LITERAL == activity
+ && (ActivityImplementationType.APPLICATION_LITERAL == activity
.getImplementation()) && activity.getApplication() == null;
}
@@ -1507,7 +1507,7 @@ public class DynamicConnectionCommand extends Command
return isContained;
}
-
+
private boolean isValidPartOfConnection(INodeSymbol sourceSymbol,
INodeSymbol targetSymbol)
{
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorContextMenuProvider.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorContextMenuProvider.java
index d2cbda8..3f25c2f 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorContextMenuProvider.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorContextMenuProvider.java
@@ -42,6 +42,9 @@ import org.eclipse.jface.action.Separator;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+
import org.eclipse.stardust.common.CollectionUtils;
import org.eclipse.stardust.common.StringUtils;
import org.eclipse.stardust.model.xpdl.carnot.ActivityImplementationType;
@@ -96,8 +99,6 @@ import org.eclipse.stardust.modeling.core.editors.parts.tree.ModelTreeEditPart;
import org.eclipse.stardust.modeling.core.utils.PoolLaneUtils;
import org.eclipse.stardust.modeling.repository.common.IObjectDescriptor;
import org.eclipse.stardust.modeling.repository.common.ObjectRepositoryActivator;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
public class WorkflowModelEditorContextMenuProvider extends ContextMenuProvider {
private final ActionRegistry registry;
@@ -294,7 +295,7 @@ public class WorkflowModelEditorContextMenuProvider extends ContextMenuProvider
GEFActionConstants.GROUP_PRINT);
addActionToMenu(manager,
ObjectRepositoryActivator.ADD_EXTERNAL_REFERENCES_ACTION,
- GEFActionConstants.GROUP_PRINT);
+ GEFActionConstants.GROUP_PRINT);
// Search
// addActionToMenu(manager, DiagramActionConstants.SEARCH_CONNECTION,
// GEFActionConstants.GROUP_PRINT);
@@ -649,8 +650,7 @@ public class WorkflowModelEditorContextMenuProvider extends ContextMenuProvider
private void addApplicationMenuEntries(ApplicationType application,
IMenuManager manager) {
- if (!DiagramPlugin.isBusinessView(editor)
- && !application.isInteractive()) {
+ if (!application.isInteractive()) {
if (!editor.getModelServer().requireLock(application)) {
ModelType model = (ModelType) application.eContainer();
List modelApplicationTypes = model.getApplicationType();
@@ -696,7 +696,7 @@ public class WorkflowModelEditorContextMenuProvider extends ContextMenuProvider
}
private void addDataMenuEntries(DataType data, IMenuManager manager) {
- if (!DiagramPlugin.isBusinessView(editor) && !data.isPredefined()) {
+ if (!data.isPredefined()) {
if (!editor.getModelServer().requireLock(data)) {
ModelType model = (ModelType) data.eContainer();
EList<DataTypeType> dataTypes = model.getDataType();
@@ -773,36 +773,31 @@ public class WorkflowModelEditorContextMenuProvider extends ContextMenuProvider
}
manager.appendToGroup(GEFActionConstants.GROUP_EDIT, split);
- if (!DiagramPlugin.isBusinessView(editor)) {
- MenuManager implementation = new MenuManager(
- Diagram_Messages.TXT_MENU_MANAGER_Implementation);
- SetActivityImplementationAction[] actions = new SetActivityImplementationAction[] {
- new SetActivityImplementationAction(
- ActivityImplementationType.ROUTE_LITERAL,
- activity, domain),
- new SetActivityImplementationAction(
- ActivityImplementationType.MANUAL_LITERAL,
- activity, domain),
- new SetActivityImplementationAction(
- ActivityImplementationType.APPLICATION_LITERAL,
- activity, domain),
- new SetActivityImplementationAction(
- ActivityImplementationType.SUBPROCESS_LITERAL,
- activity, domain) };
- for (int i = 0; i < actions.length; i++) {
- SetActivityImplementationAction action = actions[i];
- if (action.getImplType().equals(
- activity.getImplementation())) {
- action.setChecked(true);
- }
- implementation.add(action);
- }
- manager.appendToGroup(GEFActionConstants.GROUP_EDIT,
- implementation);
- }
- if (DiagramPlugin.isBusinessView(editor)
- || ActivityImplementationType.SUBPROCESS_LITERAL
+ MenuManager implementation = new MenuManager(
+ Diagram_Messages.TXT_MENU_MANAGER_Implementation);
+ SetActivityImplementationAction[] actions = new SetActivityImplementationAction[] {
+ new SetActivityImplementationAction(
+ ActivityImplementationType.ROUTE_LITERAL, activity, domain),
+ new SetActivityImplementationAction(
+ ActivityImplementationType.MANUAL_LITERAL, activity, domain),
+ new SetActivityImplementationAction(
+ ActivityImplementationType.APPLICATION_LITERAL, activity, domain),
+ new SetActivityImplementationAction(
+ ActivityImplementationType.SUBPROCESS_LITERAL, activity, domain)};
+ for (int i = 0; i < actions.length; i++ )
+ {
+ SetActivityImplementationAction action = actions[i];
+ if (action.getImplType().equals(activity.getImplementation()))
+ {
+ action.setChecked(true);
+ }
+ implementation.add(action);
+ }
+ manager.appendToGroup(GEFActionConstants.GROUP_EDIT, implementation);
+
+
+ if (ActivityImplementationType.SUBPROCESS_LITERAL
.equals(activity.getImplementation())) {
MenuManager subprocess = new MenuManager(
Diagram_Messages.WorkflowModelEditorContextMenuProvider_TXT_MENU_MANAGER_Subprocess);
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorPaletteFactory.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorPaletteFactory.java
index 523cde9..02ab4b3 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorPaletteFactory.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorPaletteFactory.java
@@ -25,6 +25,7 @@ import org.eclipse.gef.palette.PanningSelectionToolEntry;
import org.eclipse.gef.palette.ToolEntry;
import org.eclipse.gef.ui.palette.FlyoutPaletteComposite.FlyoutPreferences;
import org.eclipse.jface.preference.IPreferenceStore;
+
import org.eclipse.stardust.model.xpdl.carnot.ActivityImplementationType;
import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelPackage;
import org.eclipse.stardust.model.xpdl.carnot.DiagramModeType;
@@ -72,7 +73,7 @@ public class WorkflowModelEditorPaletteFactory
public static final int MODEL_DIAGRAM = 1;
public static final int PROCESS_DEFINITION_DIAGRAM = 2;
-
+
public static DiagramModeType diagramModeType = null;
// private static final String LINK_TOOL_DESCRIPTION = Editor_Messages.LINK_TOOL_DESCRIPTION;
@@ -86,11 +87,11 @@ public class WorkflowModelEditorPaletteFactory
{
WorkflowModelEditorPaletteFactory.diagramModeType = mode;
}
-
+
public static PaletteRoot createPaletteForDiagram(DiagramEditorPage editor)
{
boolean isModelDiagram = MODEL_DIAGRAM == getDiagramType(editor.getDiagram());
-
+
PaletteRoot palette = new PaletteRoot();
PaletteContainer controlGroup = createControlGroup(editor, isModelDiagram);
@@ -113,8 +114,7 @@ public class WorkflowModelEditorPaletteFactory
public static void updatePalette(DiagramEditorPage editor)
{
- boolean isBusinessPerspective = DiagramPlugin.isBusinessView(editor
- .getWorkflowModelEditor());
+ boolean isBusinessPerspective = false;
PaletteRoot palette = editor.getPaletteRoot();
PaletteContainer rootNodes = (PaletteContainer) palette.getChildren().get(2);
List children = rootNodes.getChildren();
@@ -139,19 +139,19 @@ public class WorkflowModelEditorPaletteFactory
}
if (getDiagramType(editor.getDiagram()) == PROCESS_DEFINITION_DIAGRAM
&& WorkflowModelEditorPaletteFactory.diagramModeType != null)
- {
+ {
rootNodes = (PaletteContainer) palette.getChildren().get(0);
children = rootNodes.getChildren();
CarnotCreationToolEntry entry = (CarnotCreationToolEntry) children.get(2);
if(diagramModeType.equals(DiagramModeType.MODE_450_LITERAL))
{
- entry.setVisible(true);
+ entry.setVisible(true);
}
else
{
- entry.setVisible(false);
+ entry.setVisible(false);
}
- }
+ }
}
private static int getDiagramType(DiagramType diagram)
@@ -175,10 +175,10 @@ public class WorkflowModelEditorPaletteFactory
{
PaletteGroup controls = new PaletteGroup(Diagram_Messages.LB_PALETTEGROUP_Controls);
- ToolEntry selectionEntry = new PanningSelectionToolEntry();
+ ToolEntry selectionEntry = new PanningSelectionToolEntry();
selectionEntry.setToolClass(CarnotSelectionTool.class);
selectionEntry.setLabel(Diagram_Messages.LBL_SELECT);
-
+
controls.add(selectionEntry);
// controls.add(new MarqueeToolEntry());
@@ -198,11 +198,11 @@ public class WorkflowModelEditorPaletteFactory
/* PaletteDrawer drawer = new PaletteDrawer(
Editor_Messages.LB_PALETTEDRAWER_Connections, DiagramPlugin
.getImageDescriptor("icons/blank16.gif")); //$NON-NLS-1$*/
-
+
PaletteGroup drawer = new PaletteGroup(Diagram_Messages.LB_PALETTEDRAWER_Connections);
PaletteEntry connectionTool = new CarnotConnectionCreationToolEntry(
Diagram_Messages.WorkflowModelEditorPaletteFactory_ConnectToolLabel, // label
- Diagram_Messages.WorkflowModelEditorPaletteFactory_ConnectToolDescription, // description
+ Diagram_Messages.WorkflowModelEditorPaletteFactory_ConnectToolDescription, // description
new DynamicConnectionFactory(editor.getWorkflowModelEditor()), // CreationFactory
DiagramPlugin.getImageDescriptor("icons/full/obj16/connection.gif"), // small icon //$NON-NLS-1$
DiagramPlugin.getImageDescriptor("icons/full/obj16/connection.gif")); // large icon //$NON-NLS-1$
@@ -330,27 +330,27 @@ public class WorkflowModelEditorPaletteFactory
.getImageDescriptor("icons/full/obj16/pool.gif"), //$NON-NLS-1$
DiagramPlugin.getImageDescriptor("icons/pool24.gif")); //$NON-NLS-1$
toolEntry.setVisible(false);
-
- return toolEntry;
+
+ return toolEntry;
}
else
{
- CarnotCreationToolEntry toolEntry =
+ CarnotCreationToolEntry toolEntry =
new CarnotCreationToolEntry(Diagram_Messages.LB_TOOLENTRY_Lane,
Diagram_Messages.DESC_TOOLENTRY_CreatesNewLane, NodeCreationFactory
.getLaneFactory(), DiagramPlugin
.getImageDescriptor("icons/full/obj16/lane.gif"), //$NON-NLS-1$
DiagramPlugin.getImageDescriptor("icons/lane24.gif")); //$NON-NLS-1$
-
+
if(editor.getDiagram().getMode().equals(DiagramModeType.MODE_450_LITERAL))
{
toolEntry.setVisible(true);
}
else
{
- toolEntry.setVisible(false);
+ toolEntry.setVisible(false);
}
-
+
return toolEntry;
}
}
@@ -448,7 +448,7 @@ public class WorkflowModelEditorPaletteFactory
.getImageDescriptor("icons/full/obj16/end_event.gif"), //$NON-NLS-1$
DiagramPlugin.getImageDescriptor("icons/connection24.gif")); //$NON-NLS-1$
startingTools.add(startTool);
- startingTools.add(endTool);
+ startingTools.add(endTool);
// add an entry for each trigger type
SpiExtensionRegistry registry = SpiExtensionRegistry.instance();
Map extensions = registry
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/IconFactory.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/IconFactory.java
index e7f3a3d..5d42c68 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/IconFactory.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/IconFactory.java
@@ -12,6 +12,11 @@ package org.eclipse.stardust.modeling.core.editors.parts;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDNamedComponent;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+
import org.eclipse.stardust.engine.core.struct.StructuredDataConstants;
import org.eclipse.stardust.model.xpdl.carnot.AbstractEventAction;
import org.eclipse.stardust.model.xpdl.carnot.AccessPointType;
@@ -53,12 +58,7 @@ import org.eclipse.stardust.model.xpdl.xpdl2.XpdlPackage;
import org.eclipse.stardust.model.xpdl.xpdl2.XpdlTypeType;
import org.eclipse.stardust.model.xpdl.xpdl2.util.QNameUtil;
import org.eclipse.stardust.model.xpdl.xpdl2.util.TypeDeclarationUtils;
-import org.eclipse.stardust.modeling.core.DiagramPlugin;
import org.eclipse.stardust.modeling.core.editors.WorkflowModelEditor;
-import org.eclipse.xsd.XSDComplexTypeDefinition;
-import org.eclipse.xsd.XSDElementDeclaration;
-import org.eclipse.xsd.XSDNamedComponent;
-import org.eclipse.xsd.XSDSimpleTypeDefinition;
/**
* @author fherinean
@@ -69,12 +69,12 @@ public class IconFactory implements org.eclipse.stardust.model.xpdl.carnot.util.
private static final String ORG_ECLIPSE_XSD_EDIT = "org.eclipse.xsd.edit"; //$NON-NLS-1$
private static final CarnotWorkflowModelPackage PKG_CWM = CarnotWorkflowModelPackage.eINSTANCE;
-
+
private static IconFactory defaultFactory = new IconFactory(null);
-
+
private boolean simpleIcon = false;
private boolean keepSimpleIconState = false;
-
+
public void keepSimpleIconState()
{
keepSimpleIconState = true;
@@ -96,9 +96,9 @@ public class IconFactory implements org.eclipse.stardust.model.xpdl.carnot.util.
if(!keepSimpleIconState)
{
- simpleIcon = editor == null ? true : DiagramPlugin.isBusinessView(editor);
+ simpleIcon = editor == null ? true : false;
}
-
+
if (model instanceof IModelElementNodeSymbol)
{
EObject newModel = ((IModelElementNodeSymbol) model).getModelElement();
@@ -373,7 +373,7 @@ public class IconFactory implements org.eclipse.stardust.model.xpdl.carnot.util.
else if (PKG_CWM.getApplicationContextTypeType().equals(model)
|| PKG_CWM.getContextType().equals(model))
{
- return "icons/full/obj16/context.gif"; //$NON-NLS-1$
+ return "icons/full/obj16/context.gif"; //$NON-NLS-1$
}
else if (PKG_CWM.getActivityType().equals(model))
{
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateActivityAction.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateActivityAction.java
index 73f9db9..aadb588 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateActivityAction.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateActivityAction.java
@@ -12,6 +12,7 @@ package org.eclipse.stardust.modeling.core.editors.parts.diagram.actions;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.ui.actions.SelectionAction;
+
import org.eclipse.stardust.model.xpdl.carnot.ActivityImplementationType;
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelPackage;
@@ -57,9 +58,8 @@ public class CreateActivityAction extends SelectionAction
protected boolean calculateEnabled()
{
- return (implementation == null ^ !DiagramPlugin.isBusinessView(
- (WorkflowModelEditor) getWorkbenchPart()))
- && getSelectedObjects().size() == 1 && getProcess() != null;
+ return (implementation != null
+ && getSelectedObjects().size() == 1 && getProcess() != null);
}
private ProcessDefinitionType getProcess()
@@ -83,11 +83,11 @@ public class CreateActivityAction extends SelectionAction
if (lockedByCurrentUser == null || lockedByCurrentUser.equals(Boolean.TRUE))
{
execute(createCommand(process));
- CreationUtils.showInOutlineAndEdit(activity);
+ CreationUtils.showInOutlineAndEdit(activity);
}
else
{
- ModelServerUtils.showMessageBox(Diagram_Messages.MSG_LOCK_NEEDED);
+ ModelServerUtils.showMessageBox(Diagram_Messages.MSG_LOCK_NEEDED);
}
}
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateApplicationAction.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateApplicationAction.java
index 648eaf3..d9a36e9 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateApplicationAction.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateApplicationAction.java
@@ -20,6 +20,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.ui.actions.SelectionAction;
+
import org.eclipse.stardust.model.xpdl.carnot.ApplicationType;
import org.eclipse.stardust.model.xpdl.carnot.ApplicationTypeType;
import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelPackage;
@@ -69,10 +70,9 @@ public class CreateApplicationAction extends SelectionAction
protected boolean calculateEnabled()
{
- return (config == null ^ !DiagramPlugin.isBusinessView(
- (WorkflowModelEditor) getWorkbenchPart()))
+ return (config != null
&& getSelectedObjects().size() == 1
- && (getModel() != null || isApplicationCategoryNode());
+ && (getModel() != null || isApplicationCategoryNode()));
}
private boolean isApplicationCategoryNode()
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateDataAction.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateDataAction.java
index 8a3975b..b169bdf 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateDataAction.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateDataAction.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.ui.actions.SelectionAction;
+
import org.eclipse.stardust.model.xpdl.carnot.AttributeType;
import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelPackage;
import org.eclipse.stardust.model.xpdl.carnot.DataType;
@@ -65,9 +66,8 @@ public class CreateDataAction extends SelectionAction
protected boolean calculateEnabled()
{
- return (config == null ^ !DiagramPlugin.isBusinessView(
- (WorkflowModelEditor) getWorkbenchPart()))
- && getSelectedObjects().size() == 1 && (getModel() != null || isDataCategoryNode());
+ return (config != null
+ && getSelectedObjects().size() == 1 && (getModel() != null || isDataCategoryNode()));
}
private boolean isDataCategoryNode()
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateInteractiveApplicationAction.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateInteractiveApplicationAction.java
index ee31803..48f832e 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateInteractiveApplicationAction.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateInteractiveApplicationAction.java
@@ -58,9 +58,7 @@ public class CreateInteractiveApplicationAction extends SelectionAction
protected boolean calculateEnabled()
{
- return !DiagramPlugin.isBusinessView(
- (WorkflowModelEditor) getWorkbenchPart())
- && getSelectedObjects().size() == 1
+ return getSelectedObjects().size() == 1
&& (getModel() != null || isApplicationCategoryNode());
}
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateSubprocessAction.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateSubprocessAction.java
index c926848..b33bbde 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateSubprocessAction.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateSubprocessAction.java
@@ -12,7 +12,9 @@ package org.eclipse.stardust.modeling.core.editors.parts.diagram.actions;
import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.gef.ui.actions.SelectionAction;
-import org.eclipse.stardust.model.xpdl.carnot.ActivityImplementationType;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelFactory;
import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelPackage;
@@ -34,8 +36,6 @@ import org.eclipse.stardust.modeling.core.editors.parts.diagram.commands.CreateM
import org.eclipse.stardust.modeling.core.editors.parts.diagram.commands.IContainedElementCommand;
import org.eclipse.stardust.modeling.core.editors.parts.diagram.commands.SetValueCmd;
import org.eclipse.stardust.modeling.core.editors.parts.properties.ActivityCommandFactory;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
public class CreateSubprocessAction extends SelectionAction
@@ -77,14 +77,6 @@ public class CreateSubprocessAction extends SelectionAction
{
final CompoundCommand compoundCommand = new CompoundCommand();
- if (DiagramPlugin.isBusinessView((WorkflowModelEditor) getWorkbenchPart())
- && !ActivityImplementationType.SUBPROCESS_LITERAL.equals(activity
- .getImplementation()))
- {
- compoundCommand.add(ActivityCommandFactory.getSetImplementationCommand(
- ActivityImplementationType.SUBPROCESS_LITERAL, activity));
- }
-
IdFactory id = new IdFactory(Diagram_Messages.ID_ProcessDefinition,
Diagram_Messages.BASENAME_ProcessDefinition);
final CreateModelElementCommand command = new CreateModelElementCommand(
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateTriggerAction.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateTriggerAction.java
index 413fe1c..5b6196d 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateTriggerAction.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateTriggerAction.java
@@ -48,8 +48,7 @@ public class CreateTriggerAction extends SelectionAction
protected boolean calculateEnabled()
{
- return !DiagramPlugin.isBusinessView((WorkflowModelEditor) getWorkbenchPart())
- && getSelectedObjects().size() == 1 && getProcess() != null;
+ return getSelectedObjects().size() == 1 && getProcess() != null;
}
public void run()
@@ -57,13 +56,13 @@ public class CreateTriggerAction extends SelectionAction
ProcessDefinitionType process = getProcess();
Boolean lockedByCurrentUser = ModelServerUtils.isLockedByCurrentUser(process);
if (lockedByCurrentUser == null || lockedByCurrentUser.equals(Boolean.TRUE))
- {
+ {
execute(createCommand());
CreationUtils.showInOutlineAndEdit(trigger);
}
else
{
- ModelServerUtils.showMessageBox(Diagram_Messages.MSG_LOCK_NEEDED);
+ ModelServerUtils.showMessageBox(Diagram_Messages.MSG_LOCK_NEEDED);
}
}
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/ResetSubprocessAction.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/ResetSubprocessAction.java
index 2e65865..fd74e45 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/ResetSubprocessAction.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/ResetSubprocessAction.java
@@ -12,9 +12,8 @@ package org.eclipse.stardust.modeling.core.editors.parts.diagram.actions;
import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.gef.ui.actions.SelectionAction;
-import org.eclipse.stardust.model.xpdl.carnot.ActivityImplementationType;
+
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
-import org.eclipse.stardust.modeling.core.DiagramPlugin;
import org.eclipse.stardust.modeling.core.Diagram_Messages;
import org.eclipse.stardust.modeling.core.editors.DiagramActionConstants;
import org.eclipse.stardust.modeling.core.editors.WorkflowModelEditor;
@@ -42,12 +41,6 @@ public class ResetSubprocessAction extends SelectionAction
{
CompoundCommand cmd = new CompoundCommand();
- if (DiagramPlugin.isBusinessView((WorkflowModelEditor) getWorkbenchPart())
- && ActivityImplementationType.SUBPROCESS_LITERAL.equals(activity.getImplementation()))
- {
- cmd.add(ActivityCommandFactory.getSetImplementationCommand(
- ActivityImplementationType.ROUTE_LITERAL, activity));
- }
cmd.add(ActivityCommandFactory.getSetSubprocessCommand(activity, null));
execute(cmd.unwrap());
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/SetActivitySubprocessAction.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/SetActivitySubprocessAction.java
index 3b640cd..95f5894 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/SetActivitySubprocessAction.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/SetActivitySubprocessAction.java
@@ -12,7 +12,7 @@ package org.eclipse.stardust.modeling.core.editors.parts.diagram.actions;
import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.jface.action.Action;
-import org.eclipse.stardust.model.xpdl.carnot.ActivityImplementationType;
+
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
import org.eclipse.stardust.modeling.core.DiagramPlugin;
@@ -42,14 +42,8 @@ public class SetActivitySubprocessAction extends Action
{
CompoundCommand cmd = new CompoundCommand();
- if (DiagramPlugin.isBusinessView(editor)
- && !ActivityImplementationType.SUBPROCESS_LITERAL.equals(activity.getImplementation()))
- {
- cmd.add(ActivityCommandFactory.getSetImplementationCommand(
- ActivityImplementationType.SUBPROCESS_LITERAL, activity));
- }
cmd.add(ActivityCommandFactory.getSetSubprocessCommand(activity, process));
-
+
editor.getEditDomain().getCommandStack().execute(cmd.unwrap());
}
}
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/commands/SetSymbolContainerCommand.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/commands/SetSymbolContainerCommand.java
index c64ce57..c263399 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/commands/SetSymbolContainerCommand.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/commands/SetSymbolContainerCommand.java
@@ -16,6 +16,9 @@ import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
import org.eclipse.stardust.engine.api.model.PredefinedConstants;
import org.eclipse.stardust.model.xpdl.carnot.ActivitySymbolType;
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
@@ -33,12 +36,8 @@ 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.DiagramUtil;
import org.eclipse.stardust.model.xpdl.carnot.util.ModelUtils;
-import org.eclipse.stardust.modeling.core.DiagramPlugin;
import org.eclipse.stardust.modeling.core.Diagram_Messages;
-import org.eclipse.stardust.modeling.core.editors.WorkflowModelEditor;
import org.eclipse.stardust.modeling.core.editors.parts.properties.LaneParticipantCommandFactory;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
public class SetSymbolContainerCommand extends Command
{
@@ -174,10 +173,7 @@ public class SetSymbolContainerCommand extends Command
IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getActivePage().getActiveEditor();
if (activity != null
- && (ActivityUtil.isInteractive(activity)
- || ( !ActivityUtil.isSubprocessActivity(activity)
- && activeEditor instanceof WorkflowModelEditor
- && DiagramPlugin.isBusinessView((WorkflowModelEditor) activeEditor))))
+ && (ActivityUtil.isInteractive(activity)))
{
// if not leaving a swimlane, keep the newPerformer
IModelParticipant originalPerformer = activity.getPerformer();
@@ -198,7 +194,7 @@ public class SetSymbolContainerCommand extends Command
newPerformer = swimlane.getParticipant();
LaneParticipantCommandFactory.addSetPerformerCommands(command, activity,
- newPerformer, originalPerformer, false, targetEditPart);
+ newPerformer, originalPerformer, false, targetEditPart);
}
}
}
@@ -232,7 +228,7 @@ public class SetSymbolContainerCommand extends Command
if(reference != null)
{
originalPerformer = (IModelParticipant) reference.getIdentifiable();
- }
+ }
}
EObject originalContainer = startEventSymbol.eContainer();
IModelParticipant newPerformer = originalContainer instanceof ISwimlaneSymbol
@@ -248,7 +244,7 @@ public class SetSymbolContainerCommand extends Command
}
newPerformer = swimlane.getParticipant() != null ? swimlane
.getParticipant() : newPerformer;
-
+
LaneParticipantCommandFactory.addSetPerformerCommands(command, trigger,
newPerformer, originalPerformer, performerAtt, false, targetEditPart);
}
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/policies/NodeSymbolGraphicalNodeEditPolicy.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/policies/NodeSymbolGraphicalNodeEditPolicy.java
index 60fa45a..dcb2b75 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/policies/NodeSymbolGraphicalNodeEditPolicy.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/policies/NodeSymbolGraphicalNodeEditPolicy.java
@@ -28,6 +28,8 @@ import org.eclipse.gef.requests.CreateConnectionRequest;
import org.eclipse.gef.requests.ReconnectRequest;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.ui.PlatformUI;
+
import org.eclipse.stardust.model.xpdl.carnot.ActivityImplementationType;
import org.eclipse.stardust.model.xpdl.carnot.ActivitySymbolType;
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
@@ -66,7 +68,6 @@ import org.eclipse.stardust.model.xpdl.carnot.util.CarnotConstants;
import org.eclipse.stardust.model.xpdl.carnot.util.ModelUtils;
import org.eclipse.stardust.modeling.common.projectnature.BpmProjectNature;
import org.eclipse.stardust.modeling.common.ui.IdFactory;
-import org.eclipse.stardust.modeling.core.DiagramPlugin;
import org.eclipse.stardust.modeling.core.Diagram_Messages;
import org.eclipse.stardust.modeling.core.editors.DynamicConnectionFactory;
import org.eclipse.stardust.modeling.core.editors.WorkflowModelEditor;
@@ -85,13 +86,12 @@ import org.eclipse.stardust.modeling.core.editors.parts.diagram.commands.SetValu
import org.eclipse.stardust.modeling.core.editors.parts.properties.ActivityCommandFactory;
import org.eclipse.stardust.modeling.core.modelserver.ModelServer;
import org.eclipse.stardust.modeling.core.properties.LinkTypeGeneralPropertyPage;
-import org.eclipse.ui.PlatformUI;
public class NodeSymbolGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy
{
private WorkflowModelEditor editor;
-
+
public NodeSymbolGraphicalNodeEditPolicy(WorkflowModelEditor editor)
{
this.editor = editor;
@@ -387,7 +387,7 @@ public class NodeSymbolGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy
{
ActivityType activity = ((ActivitySymbolType) targetSymbol).getActivity();
canEnd = (null != activity)
- && (DiagramPlugin.isBusinessView(getFlowObjectEditPart().getEditor()) || ActivityUtil
+ && (ActivityUtil
.isApplicationActivity(activity))
&& (null == activity.getApplication());
}
@@ -399,7 +399,7 @@ public class NodeSymbolGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy
{
ActivityType activity = ((ActivitySymbolType) targetSymbol).getActivity();
canEnd = (null != activity)
- && (DiagramPlugin.isBusinessView(getFlowObjectEditPart().getEditor()) || ActivityUtil
+ && (ActivityUtil
.isInteractive(activity)) && (null == activity.getPerformer());
if (!canEnd
&& (!ActivityUtil.isInteractive(activity) || (ActivityImplementationType.APPLICATION_LITERAL
@@ -679,7 +679,7 @@ public class NodeSymbolGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy
.getConnectionEditPart();
// old point
EditPart currentSource = connectionPart.getSource();
- EditPart currentTarget = connectionPart.getTarget();
+ EditPart currentTarget = connectionPart.getTarget();
// the other unchanged point of the connection
EditPart otherPoint = connectionPart.getTarget();
@@ -920,13 +920,13 @@ public class NodeSymbolGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy
idFactory.computeNames(process.getTransition());
transitionModelElement.setId(idFactory.getId());
transitionModelElement.setName(idFactory.getName());
-
+
// add default condition
transitionModelElement.setCondition("CONDITION"); //$NON-NLS-1$
XmlTextNode expression = factory.createXmlTextNode();
transitionModelElement.setExpression(expression);
- ModelUtils.setCDataString(expression.getMixed(), "true", true); //$NON-NLS-1$
-
+ ModelUtils.setCDataString(expression.getMixed(), "true", true); //$NON-NLS-1$
+
cmds.add(new SetValueCmd(process, CarnotWorkflowModelPackage.eINSTANCE
.getProcessDefinitionType_Transition(), transitionModelElement));
// change direction
@@ -1017,11 +1017,11 @@ public class NodeSymbolGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy
ModelServer server = editor.getModelServer();
if (server != null && server.requireLock((EObject) model))
{
- return UnexecutableCommand.INSTANCE;
+ return UnexecutableCommand.INSTANCE;
}
- }
+ }
}
-
+
if (ReloadConnectionsAction.REQ_RELOAD_CONNECTIONS.equals(request.getType()))
{
return getReloadConnectionsCommand();
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/properties/LaneParticipantCommandFactory.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/properties/LaneParticipantCommandFactory.java
index 75c91f9..db38de6 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/properties/LaneParticipantCommandFactory.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/properties/LaneParticipantCommandFactory.java
@@ -19,6 +19,9 @@ import org.eclipse.gef.EditPart;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+
import org.eclipse.stardust.engine.api.model.PredefinedConstants;
import org.eclipse.stardust.model.xpdl.carnot.ActivitySymbolType;
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
@@ -35,14 +38,9 @@ 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.modeling.core.DiagramPlugin;
import org.eclipse.stardust.modeling.core.Diagram_Messages;
-import org.eclipse.stardust.modeling.core.editors.WorkflowModelEditor;
import org.eclipse.stardust.modeling.core.editors.parts.diagram.commands.SetAttributeReferenceCmd;
import org.eclipse.stardust.modeling.core.editors.parts.diagram.commands.SetValueCmd;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
public class LaneParticipantCommandFactory extends DefaultPropSheetCmdFactory
{
@@ -85,10 +83,7 @@ public class LaneParticipantCommandFactory extends DefaultPropSheetCmdFactory
ActivitySymbolType activitySymbol = (ActivitySymbolType) activitySymbols.get(i);
ActivityType activity = (ActivityType) activitySymbol.getModelElement();
- if (ActivityUtil.isInteractive(activity)
- || DiagramPlugin.isBusinessView((WorkflowModelEditor) PlatformUI
- .getWorkbench().getActiveWorkbenchWindow().getActivePage()
- .getActiveEditor()))
+ if (ActivityUtil.isInteractive(activity))
{
addSetPerformerCommands(command, activity, participant, activity
.getPerformer(), false, null);
@@ -112,9 +107,9 @@ public class LaneParticipantCommandFactory extends DefaultPropSheetCmdFactory
if(reference != null)
{
element = (IModelParticipant) reference.getIdentifiable();
- }
+ }
}
- addSetPerformerCommands(command, trigger, participant, element, attribute, false, null);
+ addSetPerformerCommands(command, trigger, participant, element, attribute, false, null);
}
}
}
@@ -130,7 +125,7 @@ public class LaneParticipantCommandFactory extends DefaultPropSheetCmdFactory
|| originalPerformer == null
|| MessageDialog.openQuestion(target.getViewer().getControl().getShell(),
Diagram_Messages.MSG_DIA_SET_PERFORMANCER,
- getMessage(newPerformer == null ? null : newPerformer.getName(),
+ getMessage(newPerformer == null ? null : newPerformer.getName(),
originalPerformer.getName(), trigger)))
{
setPerformer = true;
@@ -149,8 +144,8 @@ public class LaneParticipantCommandFactory extends DefaultPropSheetCmdFactory
if(addAttribute)
{
command.add(new SetValueCmd(trigger, CWM_PKG.getIExtensibleElement_Attribute(),
- attribute));
- }
+ attribute));
+ }
command.add(new SetAttributeReferenceCmd(attribute, newPerformer));
}
}
@@ -160,7 +155,7 @@ public class LaneParticipantCommandFactory extends DefaultPropSheetCmdFactory
CWM_PKG.getStartEventSymbol_TriggersConnections(),
getSymbolFeature(newPerformer), CWM_PKG
.getTriggersConnectionType_ParticipantSymbol());
- }
+ }
}
public static void addSetPerformerCommands(CompoundCommand command,
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ActivityGeneralPropertyPage.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ActivityGeneralPropertyPage.java
index 6f9e5e5..63d1472 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ActivityGeneralPropertyPage.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ActivityGeneralPropertyPage.java
@@ -10,23 +10,26 @@
*******************************************************************************/
package org.eclipse.stardust.modeling.core.properties;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+
import org.eclipse.stardust.engine.api.model.PredefinedConstants;
-import org.eclipse.stardust.model.xpdl.carnot.*;
+import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
+import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelFactory;
+import org.eclipse.stardust.model.xpdl.carnot.IModelElement;
+import org.eclipse.stardust.model.xpdl.carnot.IModelElementNodeSymbol;
+import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
+import org.eclipse.stardust.model.xpdl.carnot.TransitionType;
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.modeling.common.ui.jface.utils.FormBuilder;
-import org.eclipse.stardust.modeling.core.DiagramPlugin;
import org.eclipse.stardust.modeling.core.Diagram_Messages;
-import org.eclipse.stardust.modeling.core.editors.WorkflowModelEditor;
import org.eclipse.stardust.modeling.core.editors.ui.CarnotPreferenceNode;
import org.eclipse.stardust.modeling.core.spi.ConfigurationElement;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
public class ActivityGeneralPropertyPage extends IdentifiablePropertyPage
{
@@ -59,10 +62,7 @@ public class ActivityGeneralPropertyPage extends IdentifiablePropertyPage
AttributeUtil.getBooleanValue(activity, PredefinedConstants.ACTIVITY_IS_RELOCATE_TARGET_ATT));
hibernateCheck.setSelection(activity.isHibernateOnCreation());
- if (ActivityUtil.isInteractive(activity)
- || DiagramPlugin.isBusinessView((WorkflowModelEditor) PlatformUI
- .getWorkbench().getActiveWorkbenchWindow().getActivePage()
- .getActiveEditor()))
+ if (ActivityUtil.isInteractive(activity))
{
if (performer == null)
{
@@ -75,8 +75,8 @@ public class ActivityGeneralPropertyPage extends IdentifiablePropertyPage
refreshTree();
}
}
-
-
+
+
if (ActivityUtil.isInteractive(activity))
{
if (qualityControl == null)
@@ -98,8 +98,8 @@ public class ActivityGeneralPropertyPage extends IdentifiablePropertyPage
.getName(), "core"); //$NON-NLS-1$
addNodeTo(null, new CarnotPreferenceNode(qualityControlCodes, getElement(), 2), null);
refreshTree();
- }
- }
+ }
+ }
}
private void setButtonState(Button button, boolean enabled, boolean selected)
@@ -110,7 +110,7 @@ public class ActivityGeneralPropertyPage extends IdentifiablePropertyPage
public void loadElementFromFields(IModelElementNodeSymbol symbol, IModelElement element)
{
- super.loadElementFromFields(symbol, element);
+ super.loadElementFromFields(symbol, element);
ActivityType activity = (ActivityType) element;
switch (activity.getImplementation())
{
@@ -130,10 +130,10 @@ public class ActivityGeneralPropertyPage extends IdentifiablePropertyPage
PredefinedConstants.ACTIVITY_IS_RELOCATE_TARGET_ATT,
relocateTargetCheck.getSelection() ? Boolean.TRUE : null);
activity.setHibernateOnCreation(hibernateCheck.getSelection());
-
+
updateRelocateTransition((ProcessDefinitionType) activity.eContainer());
}
-
+
private void updateRelocateTransition(ProcessDefinitionType process)
{
@@ -189,6 +189,6 @@ public class ActivityGeneralPropertyPage extends IdentifiablePropertyPage
relocateTargetCheck = FormBuilder.createCheckBox(panel, "Is relocation target",
new GridData(SWT.LEAD, SWT.CENTER, true, false));
}
-
+
}
diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchDelegate.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchDelegate.java
index 91d61b1..bb8b8f0 100644
--- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchDelegate.java
+++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchDelegate.java
@@ -44,6 +44,10 @@ import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.launching.JavaLaunchDelegate;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.progress.UIJob;
+
import org.eclipse.stardust.common.Assert;
import org.eclipse.stardust.common.StringUtils;
import org.eclipse.stardust.common.error.ObjectNotFoundException;
@@ -66,9 +70,6 @@ import org.eclipse.stardust.modeling.debug.model.CWMDebugTarget;
import org.eclipse.stardust.modeling.validation.Issue;
import org.eclipse.stardust.modeling.validation.ValidationService;
import org.eclipse.stardust.modeling.validation.ValidatorRegistry;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.progress.UIJob;
/**
* @author sborn
@@ -81,7 +82,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
throw new CoreException(new Status(IStatus.ERROR, Constants.ID_CWM_DEBUG_MODEL, 0,
message, e));
}
-
+
private static void validate(ILaunchConfiguration configuration) throws CoreException
{
// project
@@ -92,7 +93,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
abort(MessageFormat.format(Debug_Messages.MSG_ProjectDoesNotExist,
new Object[] { projectName }), null);
}
-
+
// model file name
String modelFile = LaunchConfigUtils.getModelFileName(configuration);
IFile file = project.getFile(new Path(modelFile));
@@ -158,7 +159,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
return processDefinition;
}
-
+
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch,
IProgressMonitor monitor) throws CoreException
{
@@ -172,8 +173,8 @@ public class LaunchDelegate extends JavaLaunchDelegate
ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
- boolean analystMode = DiagramPlugin.isBusinessView(editor);
-
+ boolean analystMode = false;
+
if (null != editor)
{
boolean hasIssues = hasIssues(editor,
@@ -187,7 +188,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
Debug_Messages.LaunchDelegate_WARNING,
Debug_Messages.LaunchDelegate_ModelInconsistencies,
Debug_Messages.LaunchDelegate_MSG_SuggestAnalystSession, true);
-
+
if (0 == choice)
{
analystMode = true;
@@ -245,10 +246,10 @@ public class LaunchDelegate extends JavaLaunchDelegate
}
}
}
-
+
DebugPlugin.getDefault().addDebugEventListener(
new CommunicationBreakpointInitializer());
-
+
final boolean finalAnalystMode = analystMode;
final ILaunchConfiguration finalConfiguration = configuration;
ILaunchConfiguration cfg = (ILaunchConfiguration) Proxy.newProxyInstance(
@@ -287,7 +288,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
return result;
}
});
-
+
super.launch(cfg, mode, launch, monitor);
IDebugTarget javaTarget = launch.getDebugTarget();
@@ -322,7 +323,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
private String getModeName(boolean analystMode)
{
- return analystMode ? Debug_Messages.LaunchDelegate_MODE_Analyst : Debug_Messages.LaunchDelegate_MODE_Developer;
+ return analystMode ? Debug_Messages.LaunchDelegate_MODE_Analyst : Debug_Messages.LaunchDelegate_MODE_Developer;
}
private boolean hasIssues(WorkflowModelEditor editor, String perspective)
@@ -371,7 +372,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
}
return result[0];
}
-
+
private int showYesNoCancel(final Shell shell, String name,
final String title, final String message, final boolean confirm)
{
@@ -406,7 +407,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
}
return result[0];
}
-
+
private int showYesCancel(final Shell shell, String name,
final String title, final String message, final boolean confirm)
{
@@ -440,11 +441,11 @@ public class LaunchDelegate extends JavaLaunchDelegate
}
return result[0];
}
-
+
/**
* This debug event listener is responsible for communication breakpoint installation.
* It removes itself after its work is done.
- *
+ *
* @author sborn
* @version $Revision$
*/
@@ -454,12 +455,12 @@ public class LaunchDelegate extends JavaLaunchDelegate
IResource resource, Class type, String methodName, String signature)
throws CoreException
{
- // TODO: do not create a new one if this breakpoint already exists
+ // TODO: do not create a new one if this breakpoint already exists
IJavaMethodBreakpoint bp = JDIDebugModel.createMethodBreakpoint(
- resource,
- type.getName(),
- methodName,
- signature,
+ resource,
+ type.getName(),
+ methodName,
+ signature,
true, false, // entry?, exit?
false, // native methods only
-1, -1, -1, // Marker position and character range
@@ -467,18 +468,18 @@ public class LaunchDelegate extends JavaLaunchDelegate
false, // register with breakpoint manager
null // map with attributes or null
);
-
+
bp.setPersisted(false);
target.breakpointAdded(bp);
-
+
return bp;
}
-
+
private String jniVoidSignature()
{
return "V"; //$NON-NLS-1$
}
-
+
private String jniSignature(Class type)
{
if (null == type)
@@ -489,41 +490,41 @@ public class LaunchDelegate extends JavaLaunchDelegate
StringBuffer signature = new StringBuffer();
if (type.isArray())
{
- signature.append('[');
+ signature.append('[');
}
// TODO: primitive type arrays (i.e. boolean[]) do not work with this implementation
if (boolean.class.equals(type))
{
- signature.append('Z');
+ signature.append('Z');
}
else if (byte.class.equals(type))
{
- signature.append('B');
+ signature.append('B');
}
else if (char.class.equals(type))
{
- signature.append('C');
+ signature.append('C');
}
else if (double.class.equals(type))
{
- signature.append('D');
+ signature.append('D');
}
else if (float.class.equals(type))
{
- signature.append('F');
+ signature.append('F');
}
else if (int.class.equals(type))
{
- signature.append('I');
+ signature.append('I');
}
else if (long.class.equals(type))
{
- signature.append('J');
+ signature.append('J');
}
else if (short.class.equals(type))
{
- signature.append('S');
+ signature.append('S');
}
else
{
@@ -535,7 +536,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
return signature.toString();
}
-
+
public void handleDebugEvents(DebugEvent[] events)
{
for (int i = 0; i < events.length; i++)
@@ -565,16 +566,16 @@ public class LaunchDelegate extends JavaLaunchDelegate
jniSignature(TransitionTokenDigest.class),
jniVoidSignature());
createBreakpoint(javaTarget, modelResource,
- Debugger.WorkflowEventListenerImpl.class, Debugger.WorkflowEventListenerImpl.performedTransitionMethodName, signature);
+ Debugger.WorkflowEventListenerImpl.class, Debugger.WorkflowEventListenerImpl.performedTransitionMethodName, signature);
signature = MessageFormat.format("({0}){1}", //$NON-NLS-1$
jniSignature(ActivityInstanceDigest.class),
jniVoidSignature());
createBreakpoint(javaTarget, modelResource,
- Debugger.WorkflowEventListenerImpl.class, Debugger.WorkflowEventListenerImpl.startedActivityInstanceMethodName,
+ Debugger.WorkflowEventListenerImpl.class, Debugger.WorkflowEventListenerImpl.startedActivityInstanceMethodName,
signature);
createBreakpoint(javaTarget, modelResource,
- Debugger.WorkflowEventListenerImpl.class, Debugger.WorkflowEventListenerImpl.completedActivityInstanceMethodName,
+ Debugger.WorkflowEventListenerImpl.class, Debugger.WorkflowEventListenerImpl.completedActivityInstanceMethodName,
signature);
signature = MessageFormat.format("(){0}", //$NON-NLS-1$
@@ -582,7 +583,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
createBreakpoint(javaTarget, modelResource,
ManagedRunnerHelper.class, ManagedRunnerHelper.suspendThreadMethodName,
signature);
-
+
DebugPlugin.getDefault().removeDebugEventListener(this);
}
catch (CoreException e)
@@ -594,7 +595,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
}
}
}
-
+
private static class ValidationJob extends Job
{
private Map filters = new HashMap();
@@ -604,7 +605,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
public ValidationJob(String perspectiveId, ModelType model)
{
super(Diagram_Messages.TXT_WorkflowModelValidation);
- this.model = model;
+ this.model = model;
if (perspectiveId != null)
{
filters.put("perspectiveType", perspectiveId); //$NON-NLS-1$
@@ -613,15 +614,15 @@ public class LaunchDelegate extends JavaLaunchDelegate
protected IStatus run(IProgressMonitor monitor)
{
- ValidationService vs = ValidationService.getInstance();
+ ValidationService vs = ValidationService.getInstance();
try
{
ValidatorRegistry.setFilters(filters);
vs.setProgressMonitor(monitor);
-
+
issues = vs.validateModel(model);
-
+
if (monitor.isCanceled())
{
return Status.CANCEL_STATUS;
@@ -639,7 +640,7 @@ public class LaunchDelegate extends JavaLaunchDelegate
return Status.OK_STATUS;
}
-
+
public boolean hasIssues()
{
return issues != null && issues.length > 0;