summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-06-07 03:34:37 (EDT)
committer Manik Kishore2012-06-12 04:26:25 (EDT)
commit52e933e02b229ba795b972151905b127a924dff7 (patch)
treeb0684a4a74a90a1be4242d469f0e0e6b971aaa4a
parent602e63a3b3b183180d087c9ce1945373bebca685 (diff)
downloadorg.eclipse.stardust.ide-52e933e02b229ba795b972151905b127a924dff7.zip
org.eclipse.stardust.ide-52e933e02b229ba795b972151905b127a924dff7.tar.gz
org.eclipse.stardust.ide-52e933e02b229ba795b972151905b127a924dff7.tar.bz2
Jira-ID: CRNT-22390
Modeler: Scan Trigger with no Document Data access point specified should not be allowed. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@56892 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/spi/triggerTypes/scan/ScanTriggerPropertyPage.java42
1 files changed, 35 insertions, 7 deletions
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/spi/triggerTypes/scan/ScanTriggerPropertyPage.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/spi/triggerTypes/scan/ScanTriggerPropertyPage.java
index 5a926d2..a3e1a84 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/spi/triggerTypes/scan/ScanTriggerPropertyPage.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/spi/triggerTypes/scan/ScanTriggerPropertyPage.java
@@ -25,8 +25,10 @@ import org.eclipse.stardust.engine.api.model.PredefinedConstants;
import org.eclipse.stardust.model.xpdl.carnot.AccessPointType;
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.DataType;
import org.eclipse.stardust.model.xpdl.carnot.DirectionType;
+import org.eclipse.stardust.model.xpdl.carnot.IExtensibleElement;
import org.eclipse.stardust.model.xpdl.carnot.IModelElement;
import org.eclipse.stardust.model.xpdl.carnot.IModelElementNodeSymbol;
import org.eclipse.stardust.model.xpdl.carnot.IModelParticipant;
@@ -45,6 +47,7 @@ import org.eclipse.stardust.modeling.core.editors.ui.CarnotPreferenceNode;
import org.eclipse.stardust.modeling.core.editors.ui.EObjectLabelProvider;
import org.eclipse.stardust.modeling.core.properties.AbstractModelElementPropertyPage;
import org.eclipse.stardust.modeling.core.spi.ConfigurationElement;
+import org.eclipse.stardust.modeling.core.utils.WidgetBindingManager;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -63,6 +66,10 @@ public class ScanTriggerPropertyPage extends AbstractModelElementPropertyPage
private LabeledText metaTypeText;
private CarnotPreferenceNode participantNode;
+
+ private CarnotPreferenceNode triggerNode;
+
+ private WidgetBindingManager wBndMgr = null;
public void loadFieldsFromElement(IModelElementNodeSymbol symbol, IModelElement element)
{
@@ -97,8 +104,8 @@ public class ScanTriggerPropertyPage extends AbstractModelElementPropertyPage
originalPerformer = (IModelParticipant) AttributeUtil
.getReferenceElement(attribute);
}
- validate(originalPerformer);
-
+ validateParticipant(originalPerformer);
+ validateTrigger();
}
public void loadElementFromFields(final IModelElementNodeSymbol symbol,
@@ -158,8 +165,7 @@ public class ScanTriggerPropertyPage extends AbstractModelElementPropertyPage
}
metaTypeText.getText().setText(typeName);
-
-
+ validateTrigger();
}
});
@@ -176,13 +182,13 @@ public class ScanTriggerPropertyPage extends AbstractModelElementPropertyPage
iconName,
org.eclipse.stardust.modeling.core.spi.triggerTypes.scan.ParticipantPropertyPage.class);
participantNode = new CarnotPreferenceNode(element, getElement(), 0);
-
getPreferenceManager().addToRoot(participantNode);
-
+ triggerNode = (CarnotPreferenceNode) this
+ .getPreferenceManager().find("scan");
return composite;
}
- private void validate(IModelParticipant performer)
+ private void validateParticipant(IModelParticipant performer)
{
if (performer != null)
{
@@ -194,6 +200,20 @@ public class ScanTriggerPropertyPage extends AbstractModelElementPropertyPage
}
}
+ private void validateTrigger()
+ {
+ if (!trigger.getAccessPoint().isEmpty())
+ {
+ //setTriggerValidationState(IQuickValidationStatus.OK);
+ dataCombo.getLabel().setValidationStatus(IQuickValidationStatus.OK);
+ }
+ else
+ {
+ //setTriggerValidationState(IQuickValidationStatus.ERRORS);
+ dataCombo.getLabel().setValidationStatus(IQuickValidationStatus.ERRORS);
+ }
+ }
+
private void setParticipantValidationState(IQuickValidationStatus state)
{
this.participantNode.updatePageStatus(state);
@@ -201,6 +221,14 @@ public class ScanTriggerPropertyPage extends AbstractModelElementPropertyPage
this.getContainer(), "treeViewer");
parentTreeViewer.refresh(true);
}
+
+ private void setTriggerValidationState(IQuickValidationStatus state)
+ {
+ this.triggerNode.updatePageStatus(state);
+ TreeViewer parentTreeViewer = (TreeViewer) Reflect.getFieldValue(
+ this.getContainer(), "treeViewer");
+ parentTreeViewer.refresh(true);
+ }
public boolean performCancel()
{