Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2011-07-21 18:27:16 -0400
committerRyan D. Brooks2011-07-21 18:27:16 -0400
commite8f21289defee0d2469b2c2742b9b6ad5d21342e (patch)
treecc26cf70f965f7a773d0301adb269d6ab7b14122
parent6cc11af840ba0e77201409003085f87fc3bbc90e (diff)
downloadorg.eclipse.osee-e8f21289defee0d2469b2c2742b9b6ad5d21342e.tar.gz
org.eclipse.osee-e8f21289defee0d2469b2c2742b9b6ad5d21342e.tar.xz
org.eclipse.osee-e8f21289defee0d2469b2c2742b9b6ad5d21342e.zip
feature: WorkDef - Add ensure in display for cancellation reason in TransitionToMenu
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java29
1 files changed, 18 insertions, 11 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java
index 4f28ed1fb6..c33c94e9ba 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java
@@ -154,18 +154,25 @@ public class TransitionToMenu {
@Override
public Result getCompleteOrCancellationReason() {
- AbstractWorkflowArtifact awa = getAwas().iterator().next();
- StateDefinition stateDef = awa.getStateDefinitionByName(getToStateName());
- Result result = new Result(false, "");
- if (stateDef.isCancelledPage()) {
- EntryDialog dialog = new EntryDialog("Enter Cancellation Reason", "Enter Cancellation Reason");
- if (dialog.open() != 0) {
- result.setCancelled(true);
- } else {
- result.setText(dialog.getEntry());
- result.set(true);
+ final Result result = new Result(false, "");
+ Displays.ensureInDisplayThread(new Runnable() {
+
+ @Override
+ public void run() {
+ AbstractWorkflowArtifact awa = getAwas().iterator().next();
+ StateDefinition stateDef = awa.getStateDefinitionByName(getToStateName());
+ if (stateDef.isCancelledPage()) {
+ EntryDialog dialog = new EntryDialog("Enter Cancellation Reason", "Enter Cancellation Reason");
+ if (dialog.open() != 0) {
+ result.setCancelled(true);
+ } else {
+ result.setText(dialog.getEntry());
+ result.set(true);
+ }
+ }
}
- }
+
+ }, true);
return result;
}

Back to the top