Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.osee.ats.config.demo/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateSawBuild2Actions.java10
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsCore_PT_Suite.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtil.java71
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtilTest.java40
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/notify/AtsNotificationManagerTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsCore_Util_PT_Suite.java37
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/CopyActionDetailsTest.java63
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManagerTest.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/ISelectedAtsArtifacts.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ISelectedAtsArtifacts.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/ISelectedTeamDefinitionArtifacts.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ISelectedTeamDefinitionArtifacts.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/ISelectedTeamWorkflowArtifacts.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ISelectedTeamWorkflowArtifacts.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/SelectedAtsArtifactsAdapter.java38
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/branch/AtsBranchManagerCore.java159
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/PeerToPeerReviewManager.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/ReviewProviders.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/team/TeamWorkFlowArtifact.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/CopyActionDetails.java93
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Suite.java2
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionPerspectiveTest.java29
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionRunTest.java35
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionTest.java36
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AccessControlActionTest.java61
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AddNoteActionTest.java43
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AtsTest_Demo_Action_Suite.java79
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/CopyActionDetailsActionTest.java21
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DeletePurgeAtsArtifactsActionTest.java33
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DirtyReportActionTest.java32
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DirtyReportActionTest2.java32
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DuplicateWorkflowActionTest.java19
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorActionTest.java31
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/FavoriteActionTest.java41
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ImportTasksViaSimpleListTest.java35
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ImportTasksViaSpreadsheetTest.java34
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/MyFavoritesActionTest.java30
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/MyWorldActionTest.java30
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/NewGoalTest.java37
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenAtsPerspectiveActionTest.java20
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenChangeReportByIdActionTest.java39
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInArtifactEditorActionTest.java20
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorkflowEditorActionTest.java20
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorldActionTest.java33
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorldActionTest2.java21
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorldActionTest3.java36
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInSkyWalkerActionTest.java21
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorActionTest.java77
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorSelectedTest.java33
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorActionTest.java70
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorSelectedActionTest.java33
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenParentActionTest.java21
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenReviewPerspectiveActionTest.java20
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenTeamDefinitionActionTest.java21
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenVersionArtifactActionTest.java29
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenWorkflowByIdActionTest.java24
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenWorldByIdActionTest.java23
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/RefreshDirtyActionTest.java23
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ReloadActionTest.java21
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ResourceHistoryActionTest.java38
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowBranchChangeDataActionTest.java35
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowChangeReportActionTest.java37
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowMergeManagerActionTest.java38
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowWorkDefinitionActionTest.java19
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/SubscribedActionTest.java41
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/TaskAddActionTest.java26
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/TaskDeleteActionTest.java26
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/config/AtsBranchConfigurationTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItemsTest.java19
-rw-r--r--plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AbstractAtsAction.java49
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AccessControlAction.java11
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AddNoteAction.java95
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ConvertActionableItemsAction.java1
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/CopyActionDetailsAction.java84
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DeletePurgeAtsArtifactsAction.java27
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DirtyReportAction.java19
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowAction.java23
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorAction.java50
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditActionableItemsAction.java24
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditAssigneeAction.java24
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditStatusAction.java30
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EmailActionAction.java23
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ExportChangeReportsAction.java52
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/FavoriteAction.java29
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/IDirtyReportable.java14
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportListener.java11
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportTasksViaSimpleList.java27
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportTasksViaSpreadsheet.java27
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/MyFavoritesAction.java16
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/MyWorldAction.java16
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewAction.java37
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewGoal.java32
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenChangeReportByIdAction.java14
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInArtifactEditorAction.java26
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInAtsWorkflowEditorAction.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInAtsWorkflowEditor.java)36
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInAtsWorldAction.java45
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorAction.java20
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorSelected.java23
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorAction.java20
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorSelectedAction.java24
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenParentAction.java14
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenTeamDefinitionAction.java23
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenVersionArtifactAction.java16
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenWorkflowByIdAction.java14
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenWorldByIdAction.java14
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/PrivilegedEditAction.java82
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/RefreshDirtyAction.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ReloadAction.java30
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ResourceHistoryAction.java16
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ShowBranchChangeDataAction.java42
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ShowWorkDefinitionAction.java15
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/SubscribedAction.java29
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/TaskAddAction.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/WorkflowDebugAction.java114
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAGoalMembersSection.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/RemoveFromGoalAction.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/SetGoalOrderAction.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/NewDecisionReviewJob.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewDecisionReviewJob.java)2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/NewPeerToPeerReviewJob.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewPeerToPeerReviewJob.java)2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditorXWidgetActionPage.java11
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitJob.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java143
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java21
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsWorldEditorItem.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleHridSearchData.java17
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleHridSearchUi.java15
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java13
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbTests.java6
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java1
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/FrameworkUi_Demo_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/ImageManagerTest.java15
-rw-r--r--plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/ImageManager.java4
-rw-r--r--plugins/org.eclipse.osee.support.config/launchConfig/OSEE Demo product [localhost].launch3
-rw-r--r--plugins/org.eclipse.osee.support.config/launchConfig/OSEE Mail Service.launch3
-rw-r--r--plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/TestUtil.java8
140 files changed, 2665 insertions, 1081 deletions
diff --git a/plugins/org.eclipse.osee.ats.config.demo/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.config.demo/META-INF/MANIFEST.MF
index 69e1fa6f02..22a78824ab 100644
--- a/plugins/org.eclipse.osee.ats.config.demo/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.config.demo/META-INF/MANIFEST.MF
@@ -20,6 +20,7 @@ Require-Bundle: org.eclipse.ui,
Bundle-ActivationPolicy: lazy
Import-Package: org.eclipse.core.filesystem,
org.eclipse.osee.ats.core.action,
+ org.eclipse.osee.ats.core.branch,
org.eclipse.osee.ats.core.config,
org.eclipse.osee.ats.core.review,
org.eclipse.osee.ats.core.review.defect,
diff --git a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateSawBuild2Actions.java b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateSawBuild2Actions.java
index 03550edfa7..010fccaffc 100644
--- a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateSawBuild2Actions.java
+++ b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateSawBuild2Actions.java
@@ -20,6 +20,7 @@ import org.eclipse.osee.ats.config.demo.config.DemoDbUtil.SoftwareRequirementStr
import org.eclipse.osee.ats.config.demo.internal.OseeAtsConfigDemoActivator;
import org.eclipse.osee.ats.core.action.ActionArtifact;
import org.eclipse.osee.ats.core.action.ActionManager;
+import org.eclipse.osee.ats.core.branch.AtsBranchManagerCore;
import org.eclipse.osee.ats.core.config.ActionableItemArtifact;
import org.eclipse.osee.ats.core.review.AbstractReviewArtifact;
import org.eclipse.osee.ats.core.review.ReviewManager;
@@ -356,11 +357,12 @@ public class PopulateSawBuild2Actions {
if (DEBUG) {
OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "Creating working branch");
}
- Result result = AtsBranchManager.createWorkingBranch(reqTeam, null, false);
+ Result result = AtsBranchManagerCore.createWorkingBranch_Validate(reqTeam);
if (result.isFalse()) {
throw new OseeArgumentException(
new StringBuilder("Error creating working branch: ").append(result.getText()).toString());
}
+ AtsBranchManagerCore.createWorkingBranch_Create(reqTeam);
DemoDbUtil.sleep(5000);
@@ -450,11 +452,12 @@ public class PopulateSawBuild2Actions {
if (DEBUG) {
OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "Creating working branch");
}
- Result result = AtsBranchManager.createWorkingBranch(reqTeam, null, false);
+ Result result = AtsBranchManagerCore.createWorkingBranch_Validate(reqTeam);
if (result.isFalse()) {
throw new OseeArgumentException(
new StringBuilder("Error creating working branch: ").append(result.getText()).toString());
}
+ AtsBranchManagerCore.createWorkingBranch_Create(reqTeam);
DemoDbUtil.sleep(5000);
@@ -501,11 +504,12 @@ public class PopulateSawBuild2Actions {
if (DEBUG) {
OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "Creating working branch");
}
- Result result = AtsBranchManager.createWorkingBranch(reqTeam, null, false);
+ Result result = AtsBranchManagerCore.createWorkingBranch_Validate(reqTeam);
if (result.isFalse()) {
throw new OseeArgumentException(
new StringBuilder("Error creating working branch: ").append(result.getText()).toString());
}
+ AtsBranchManagerCore.createWorkingBranch_Create(reqTeam);
DemoDbUtil.sleep(5000);
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsCore_PT_Suite.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsCore_PT_Suite.java
index 8897c890c8..37c6976e64 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsCore_PT_Suite.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsCore_PT_Suite.java
@@ -14,6 +14,7 @@ import org.eclipse.osee.ats.core.notify.AtsCore_Notify_PT_Suite;
import org.eclipse.osee.ats.core.operation.AtsCore_Operation_PT_Suite;
import org.eclipse.osee.ats.core.review.AtsCore_Review_PT_Suite;
import org.eclipse.osee.ats.core.task.AtsCore_Task_PT_Suite;
+import org.eclipse.osee.ats.core.util.AtsCore_Util_PT_Suite;
import org.eclipse.osee.ats.core.workflow.transition.AtsCore_Transition_PT_Suite;
import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
@@ -28,6 +29,7 @@ import org.junit.runners.Suite;
AtsCore_Operation_PT_Suite.class,
AtsCore_Review_PT_Suite.class,
AtsCore_Task_PT_Suite.class,
+ AtsCore_Util_PT_Suite.class,
AtsCore_Transition_PT_Suite.class})
/**
* This test suite contains tests that must be run as PDE Junit (PT) through test launch config
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtil.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtil.java
index 79510fee98..10ece9eda3 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtil.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtil.java
@@ -14,10 +14,14 @@ import static org.eclipse.osee.framework.core.enums.DeletionFlag.EXCLUDE_DELETED
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.Date;
import java.util.List;
+import java.util.Set;
import org.eclipse.osee.ats.core.action.ActionArtifact;
import org.eclipse.osee.ats.core.action.ActionManager;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
+import org.eclipse.osee.ats.core.branch.AtsBranchManagerCore;
import org.eclipse.osee.ats.core.config.ActionableItemArtifact;
import org.eclipse.osee.ats.core.config.TeamDefinitionArtifact;
import org.eclipse.osee.ats.core.review.AbstractReviewArtifact;
@@ -58,10 +62,12 @@ import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactCache;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
+import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.artifact.PurgeArtifacts;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
+import org.eclipse.osee.support.test.util.DemoSawBuilds;
import org.eclipse.osee.support.test.util.TestUtil;
/**
@@ -190,6 +196,8 @@ public class AtsTestUtil {
actionArt2 = null;
verArt1 = null;
verArt2 = null;
+ decRevArt = null;
+ peerRevArt = null;
}
private static String getTitle(String objectName, String postFixName) {
@@ -315,7 +323,7 @@ public class AtsTestUtil {
return taskArt;
}
- public static DecisionReviewArtifact getOrCreateDecisionReview(ReviewBlockType reviewBlockType, String relatedToState) throws OseeCoreException {
+ public static DecisionReviewArtifact getOrCreateDecisionReview(ReviewBlockType reviewBlockType, AtsTestUtilState relatedToState) throws OseeCoreException {
ensureLoaded();
if (decRevArt == null) {
List<DecisionReviewOption> options = new ArrayList<DecisionReviewOption>();
@@ -324,8 +332,9 @@ public class AtsTestUtil {
Arrays.asList(UserManager.getUser().getUserId())));
decRevArt =
DecisionReviewManager.createNewDecisionReview(teamArt, reviewBlockType,
- AtsTestUtil.class.getSimpleName() + " Test Decision Review", relatedToState, "Decision Review", options,
- Arrays.asList((IBasicUser) UserManager.getUser()), new Date(), UserManager.getUser());
+ AtsTestUtil.class.getSimpleName() + " Test Decision Review", relatedToState.getPageName(),
+ "Decision Review", options, Arrays.asList((IBasicUser) UserManager.getUser()), new Date(),
+ UserManager.getUser());
}
return decRevArt;
}
@@ -374,6 +383,12 @@ public class AtsTestUtil {
taskArt.deleteAndPersist(transaction);
}
if (teamArt != null) {
+ if (teamArt.getWorkingBranch() != null) {
+ Result result = AtsBranchManagerCore.deleteWorkingBranch(teamArt, true);
+ if (result.isFalse()) {
+ throw new OseeStateException("Error deleting working branch [%s]", result.getText());
+ }
+ }
for (TaskArtifact taskArt : teamArt.getTaskArtifacts()) {
taskArt.deleteAndPersist(transaction);
}
@@ -508,12 +523,12 @@ public class AtsTestUtil {
}
}
- public static PeerToPeerReviewArtifact getOrCreatePeerReview(ReviewBlockType none, AtsTestUtilState relatedToState, SkynetTransaction transaction) throws OseeCoreException {
+ public static PeerToPeerReviewArtifact getOrCreatePeerReview(ReviewBlockType reviewBlockType, AtsTestUtilState relatedToState, SkynetTransaction transaction) throws OseeCoreException {
ensureLoaded();
if (peerRevArt == null) {
peerRevArt =
PeerToPeerReviewManager.createNewPeerToPeerReview(teamArt,
- AtsTestUtil.class.getSimpleName() + " Test Decision Review", relatedToState.getPageName(), transaction);
+ AtsTestUtil.class.getSimpleName() + " Test Peer Review", relatedToState.getPageName(), transaction);
}
return peerRevArt;
}
@@ -548,4 +563,50 @@ public class AtsTestUtil {
ensureLoaded();
return actionArt;
}
+
+ public static ISelectedAtsArtifacts getSelectedAtsArtifactsForTeamWf() {
+ return new ISelectedAtsArtifacts() {
+
+ @Override
+ public Set<? extends Artifact> getSelectedSMAArtifacts() throws OseeCoreException {
+ return Collections.singleton(getTeamWf());
+ }
+
+ @Override
+ public List<Artifact> getSelectedAtsArtifacts() throws OseeCoreException {
+ return Arrays.asList((Artifact) getTeamWf());
+ }
+
+ @Override
+ public List<TaskArtifact> getSelectedTaskArtifacts() {
+ return Collections.emptyList();
+ }
+
+ };
+ }
+
+ public static Result createWorkingBranchFromTeamWf() throws OseeCoreException {
+ configureVer1ForWorkingBranch();
+ Result result = AtsBranchManagerCore.createWorkingBranch_Validate(teamArt);
+ if (result.isFalse()) {
+ return result;
+ }
+ AtsBranchManagerCore.createWorkingBranch_Create(teamArt, true);
+ teamArt.getWorkingBranchForceCacheUpdate();
+ return Result.TrueResult;
+ }
+
+ public static void configureVer1ForWorkingBranch() throws OseeCoreException {
+ VersionArtifact verArt = getVerArt1();
+ verArt.setSoleAttributeValue(AtsAttributeTypes.AllowCreateBranch, true);
+ verArt.setSoleAttributeValue(AtsAttributeTypes.AllowCommitBranch, true);
+ verArt.setSoleAttributeValue(AtsAttributeTypes.BaselineBranchGuid,
+ BranchManager.getBranch(DemoSawBuilds.SAW_Bld_1).getGuid());
+ verArt.persist(AtsTestUtil.class.getSimpleName() + "-ConfigureVer1ForWorkingBranch");
+ if (getTeamWf().getTargetedVersion() == null) {
+ getTeamWf().addRelation(AtsRelationTypes.TeamWorkflowTargetedForVersion_Version, getVerArt1());
+ getTeamWf().persist(AtsTestUtil.class.getSimpleName() + "-SetTeamWfTargetedVer1");
+ }
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtilTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtilTest.java
index 0d381e0653..a0b64a5f46 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtilTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtilTest.java
@@ -14,9 +14,11 @@ import junit.framework.Assert;
import org.eclipse.osee.ats.core.team.TeamState;
import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
+import org.eclipse.osee.ats.core.workdef.ReviewBlockType;
import org.eclipse.osee.ats.core.workflow.transition.TransitionOption;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeStateException;
+import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
@@ -57,6 +59,18 @@ public class AtsTestUtilTest extends AtsTestUtil {
}
@org.junit.Test
+ public void testCreateAndCleanupWithBranch() throws Exception {
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName() + "-testCleanupAndResetWithBranch");
+ Result result = AtsTestUtil.createWorkingBranchFromTeamWf();
+ Assert.assertTrue(result.getText(), result.isTrue());
+ Thread.sleep(2000);
+ Branch branch = AtsTestUtil.getTeamWf().getWorkingBranch();
+ Assert.assertNotNull(branch);
+ AtsTestUtil.cleanup();
+ Assert.assertTrue(branch.isDeleted());
+ }
+
+ @org.junit.Test
public void testGetTeamWf2() throws OseeCoreException {
AtsTestUtil.cleanupAndReset("AtsTestUtilTest.testGetTeamWf2");
@@ -75,6 +89,32 @@ public class AtsTestUtilTest extends AtsTestUtil {
}
@org.junit.Test
+ public void testGetDecisionReview() throws OseeCoreException {
+
+ AtsTestUtil.cleanupAndReset("AtsTestUtilTest.testGetDecisionReview");
+ AtsTestUtil.validateArtifactCache();
+
+ Assert.assertNotNull(AtsTestUtil.getOrCreateDecisionReview(ReviewBlockType.Commit, AtsTestUtilState.Analyze));
+
+ AtsTestUtil.cleanup();
+
+ AtsTestUtil.validateArtifactCache();
+ }
+
+ @org.junit.Test
+ public void testGetPeerReview() throws OseeCoreException {
+
+ AtsTestUtil.cleanupAndReset("AtsTestUtilTest.testGetPeerReview");
+ AtsTestUtil.validateArtifactCache();
+
+ Assert.assertNotNull(AtsTestUtil.getOrCreatePeerReview(ReviewBlockType.Commit, AtsTestUtilState.Analyze, null));
+
+ AtsTestUtil.cleanup();
+
+ AtsTestUtil.validateArtifactCache();
+ }
+
+ @org.junit.Test
public void testTransitionTo() throws OseeCoreException {
AtsTestUtil.cleanupAndReset("AtsTestUtilTest");
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/notify/AtsNotificationManagerTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/notify/AtsNotificationManagerTest.java
index 5b27c9ce39..3539da02fa 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/notify/AtsNotificationManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/notify/AtsNotificationManagerTest.java
@@ -534,7 +534,7 @@ public class AtsNotificationManagerTest {
// notification sent to author/moderator
Assert.assertEquals(1, mgr.getNotificationEvents().size());
Assert.assertTrue(mgr.getNotificationEvents().iterator().next().getDescription().equals(
- "You are Author/Moderator of [PeerToPeer Review] titled [AtsTestUtil Test Decision Review] which has been reviewed by all reviewers"));
+ "You are Author/Moderator of [PeerToPeer Review] titled [AtsTestUtil Test Peer Review] which has been reviewed by all reviewers"));
// email both moderator and author
Assert.assertEquals(2, mgr.getNotificationEvents().iterator().next().getUsers().size());
peerArt.deleteAndPersist();
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsCore_Util_PT_Suite.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsCore_Util_PT_Suite.java
new file mode 100644
index 0000000000..e66d0086f3
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsCore_Util_PT_Suite.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.core.util;
+
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({CopyActionDetailsTest.class})
+/**
+ * This test suite contains tests that must be run against demo database as Plugin JUnit (PT)
+ *
+ * @author Donald G. Dunne
+ */
+public class AtsCore_Util_PT_Suite {
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ System.out.println("\n\nBegin " + AtsCore_Util_PT_Suite.class.getSimpleName());
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ System.out.println("End " + AtsCore_Util_PT_Suite.class.getSimpleName());
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/CopyActionDetailsTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/CopyActionDetailsTest.java
new file mode 100644
index 0000000000..a059e82585
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/CopyActionDetailsTest.java
@@ -0,0 +1,63 @@
+/*
+ * Created on Oct 21, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.core.util;
+
+import junit.framework.Assert;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.ats.core.AtsTestUtil.AtsTestUtilState;
+import org.eclipse.osee.ats.core.review.DecisionReviewArtifact;
+import org.eclipse.osee.ats.core.review.PeerToPeerReviewArtifact;
+import org.eclipse.osee.ats.core.workdef.ReviewBlockType;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class CopyActionDetailsTest {
+
+ @BeforeClass
+ @AfterClass
+ public static void cleanup() throws OseeCoreException {
+ AtsTestUtil.cleanup();
+ }
+
+ @Test
+ public void testGetDetailsStringForTeamWf() throws OseeCoreException {
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ String str = new CopyActionDetails(AtsTestUtil.getTeamWf()).getDetailsString();
+ Assert.assertEquals(
+ "\"Team Workflow\" - " + AtsTestUtil.getTeamWf().getHumanReadableId() + " - \"AtsTestUtil - Team WF [CopyActionDetailsTest]\"",
+ str);
+ }
+
+ @Test
+ public void testGetDetailsStringForTask() throws OseeCoreException {
+ String str = new CopyActionDetails(AtsTestUtil.getOrCreateTask()).getDetailsString();
+ Assert.assertEquals(
+ "\"Task\" - " + AtsTestUtil.getOrCreateTask().getHumanReadableId() + " - \"AtsTestUtil - Task [CopyActionDetailsTest]\"",
+ str);
+ }
+
+ @Test
+ public void testGetDetailsStringForDecisionReview() throws OseeCoreException {
+ DecisionReviewArtifact review =
+ AtsTestUtil.getOrCreateDecisionReview(ReviewBlockType.Commit, AtsTestUtilState.Analyze);
+ String str = new CopyActionDetails(review).getDetailsString();
+ Assert.assertEquals(
+ "\"Decision Review\" - " + review.getHumanReadableId() + " - \"AtsTestUtil Test Decision Review\"", str);
+ review.persist(getClass().getSimpleName());
+ }
+
+ @Test
+ public void testGetDetailsStringForPeerReview() throws OseeCoreException {
+ PeerToPeerReviewArtifact review =
+ AtsTestUtil.getOrCreatePeerReview(ReviewBlockType.None, AtsTestUtilState.Analyze, null);
+ String str = new CopyActionDetails(review).getDetailsString();
+ Assert.assertEquals(
+ "\"PeerToPeer Review\" - " + review.getHumanReadableId() + " - \"AtsTestUtil Test Peer Review\"", str);
+ review.persist(getClass().getSimpleName());
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManagerTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManagerTest.java
index df5a18f3d5..739f6e279b 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManagerTest.java
@@ -10,6 +10,7 @@ import java.util.Date;
import java.util.List;
import junit.framework.Assert;
import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.ats.core.AtsTestUtil.AtsTestUtilState;
import org.eclipse.osee.ats.core.review.DecisionReviewArtifact;
import org.eclipse.osee.ats.core.review.DecisionReviewManager;
import org.eclipse.osee.ats.core.review.DecisionReviewState;
@@ -429,7 +430,7 @@ public class TransitionManagerTest {
Assert.assertTrue(results.isEmpty());
DecisionReviewArtifact decArt =
- AtsTestUtil.getOrCreateDecisionReview(ReviewBlockType.None, AtsTestUtil.getAnalyzeStateDef().getPageName());
+ AtsTestUtil.getOrCreateDecisionReview(ReviewBlockType.None, AtsTestUtilState.Analyze);
teamArt.addRelation(AtsRelationTypes.TeamWorkflowToReview_Review, decArt);
// validate that can transition cause non-blocking review
diff --git a/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF
index 6bbe78dacd..5630c68564 100644
--- a/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF
@@ -43,6 +43,7 @@ Import-Package: com.google.inject,
org.osgi.framework
Export-Package: org.eclipse.osee.ats.core.access,
org.eclipse.osee.ats.core.action,
+ org.eclipse.osee.ats.core.actions,
org.eclipse.osee.ats.core.artifact,
org.eclipse.osee.ats.core.branch,
org.eclipse.osee.ats.core.commit,
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ISelectedAtsArtifacts.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/ISelectedAtsArtifacts.java
index d4d42f66fd..98df05cb1c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ISelectedAtsArtifacts.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/ISelectedAtsArtifacts.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.actions;
+package org.eclipse.osee.ats.core.actions;
import java.util.List;
import java.util.Set;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ISelectedTeamDefinitionArtifacts.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/ISelectedTeamDefinitionArtifacts.java
index eb9044455f..b0b5eeee7c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ISelectedTeamDefinitionArtifacts.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/ISelectedTeamDefinitionArtifacts.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.actions;
+package org.eclipse.osee.ats.core.actions;
import java.util.Collection;
import org.eclipse.osee.ats.core.config.TeamDefinitionArtifact;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ISelectedTeamWorkflowArtifacts.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/ISelectedTeamWorkflowArtifacts.java
index 91ab94c47f..d81d58c14e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ISelectedTeamWorkflowArtifacts.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/ISelectedTeamWorkflowArtifacts.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.actions;
+package org.eclipse.osee.ats.core.actions;
import java.util.Set;
import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/SelectedAtsArtifactsAdapter.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/SelectedAtsArtifactsAdapter.java
new file mode 100644
index 0000000000..884f78349c
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/actions/SelectedAtsArtifactsAdapter.java
@@ -0,0 +1,38 @@
+/*
+ * Created on Oct 21, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.core.actions;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import org.eclipse.osee.ats.core.task.TaskArtifact;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+
+public class SelectedAtsArtifactsAdapter implements ISelectedAtsArtifacts {
+
+ public SelectedAtsArtifactsAdapter() {
+ }
+
+ @SuppressWarnings("unused")
+ @Override
+ public Set<? extends Artifact> getSelectedSMAArtifacts() throws OseeCoreException {
+ return Collections.emptySet();
+ }
+
+ @SuppressWarnings("unused")
+ @Override
+ public List<Artifact> getSelectedAtsArtifacts() throws OseeCoreException {
+ return Collections.emptyList();
+ }
+
+ @SuppressWarnings("unused")
+ @Override
+ public List<TaskArtifact> getSelectedTaskArtifacts() throws OseeCoreException {
+ return Collections.emptyList();
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/branch/AtsBranchManagerCore.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/branch/AtsBranchManagerCore.java
index 573fa7ca7e..c0464cabe9 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/branch/AtsBranchManagerCore.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/branch/AtsBranchManagerCore.java
@@ -18,20 +18,47 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.logging.Level;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.osee.ats.core.commit.ICommitConfigArtifact;
import org.eclipse.osee.ats.core.config.TeamDefinitionArtifact;
+import org.eclipse.osee.ats.core.internal.Activator;
+import org.eclipse.osee.ats.core.review.DecisionReviewArtifact;
+import org.eclipse.osee.ats.core.review.DecisionReviewDefinitionManager;
+import org.eclipse.osee.ats.core.review.PeerReviewDefinitionManager;
+import org.eclipse.osee.ats.core.review.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.core.team.TeamWorkFlowManager;
+import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.version.VersionArtifact;
+import org.eclipse.osee.ats.core.workdef.DecisionReviewDefinition;
+import org.eclipse.osee.ats.core.workdef.PeerReviewDefinition;
+import org.eclipse.osee.ats.core.workdef.StateEventType;
+import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.BranchState;
import org.eclipse.osee.framework.core.enums.BranchType;
+import org.eclipse.osee.framework.core.enums.SystemUser;
import org.eclipse.osee.framework.core.exception.MultipleBranchesExist;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.exception.OseeStateException;
+import org.eclipse.osee.framework.core.exception.OseeWrappedException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.cache.BranchFilter;
import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.plugin.core.util.CatchAndReleaseJob;
+import org.eclipse.osee.framework.plugin.core.util.IExceptionableRunnable;
+import org.eclipse.osee.framework.plugin.core.util.Jobs;
+import org.eclipse.osee.framework.skynet.core.User;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.conflict.ConflictManagerExternal;
+import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager;
/**
@@ -464,4 +491,136 @@ public class AtsBranchManagerCore {
return earliestTransactionId;
}
+ /**
+ * Perform error checks and popup confirmation dialogs associated with creating a working branch.
+ *
+ * @param popup if true, errors are popped up to user; otherwise sent silently in Results
+ * @return Result return of status
+ */
+ public static Result createWorkingBranch_Validate(TeamWorkFlowArtifact teamArt) {
+ try {
+ if (AtsBranchManagerCore.isCommittedBranchExists(teamArt)) {
+ return new Result(
+ "Committed branch already exists. Can not create another working branch once changes have been committed.");
+ }
+ Branch parentBranch = AtsBranchManagerCore.getConfiguredBranchForWorkflow(teamArt);
+ if (parentBranch == null) {
+ return new Result(
+ "Parent Branch can not be determined.\n\nPlease specify " + "parent branch through Version Artifact or Team Definition Artifact.\n\n" + "Contact your team lead to configure this.");
+ }
+ Result result = AtsBranchManagerCore.isCreateBranchAllowed(teamArt);
+ if (result.isFalse()) {
+ return result;
+ }
+ } catch (Exception ex) {
+ OseeLog.log(Activator.class, Level.SEVERE, ex);
+ return new Result("Exception occurred: " + ex.getLocalizedMessage());
+ }
+ return Result.TrueResult;
+ }
+
+ /**
+ * Create a working branch associated with this Team Workflow. Call createWorkingBranch_Validate first to validate
+ * that branch can be created.
+ */
+ public static Job createWorkingBranch_Create(final TeamWorkFlowArtifact teamArt) throws OseeCoreException {
+ return createWorkingBranch_Create(teamArt, false);
+ }
+
+ /**
+ * Create a working branch associated with this state machine artifact. This should NOT be called by applications
+ * except in test cases or automated tools. Use createWorkingBranchWithPopups
+ */
+ public static Job createWorkingBranch_Create(final TeamWorkFlowArtifact teamArt, boolean pend) throws OseeCoreException {
+ final Branch parentBranch = AtsBranchManagerCore.getConfiguredBranchForWorkflow(teamArt);
+ return createWorkingBranch_Create(teamArt, parentBranch, pend);
+ }
+
+ public static Job createWorkingBranch_Create(final TeamWorkFlowArtifact teamArt, final IOseeBranch parentBranch) throws OseeCoreException {
+ return createWorkingBranch_Create(teamArt, parentBranch, false);
+ }
+
+ public static Job createWorkingBranch_Create(final TeamWorkFlowArtifact teamArt, final IOseeBranch parentBranch, boolean pend) throws OseeCoreException {
+ final String branchName = Strings.truncate(TeamWorkFlowManager.getBranchName(teamArt), 195, true);
+
+ IExceptionableRunnable runnable = new IExceptionableRunnable() {
+ @Override
+ public IStatus run(IProgressMonitor monitor) throws OseeCoreException {
+ teamArt.setWorkingBranchCreationInProgress(true);
+ BranchManager.createWorkingBranch(parentBranch, branchName, teamArt);
+ teamArt.setWorkingBranchCreationInProgress(false);
+ // Create reviews as necessary
+ SkynetTransaction transaction =
+ new SkynetTransaction(AtsUtilCore.getAtsBranch(), "Create Reviews upon Transition");
+ createNecessaryBranchEventReviews(StateEventType.CreateBranch, teamArt, new Date(),
+ UserManager.getUser(SystemUser.OseeSystem), transaction);
+ transaction.execute();
+ return Status.OK_STATUS;
+ }
+ };
+
+ // Jobs.runInJob("Create Branch", runnable, Activator.class, Activator.PLUGIN_ID);
+ Job job =
+ Jobs.startJob(new CatchAndReleaseJob("Create Branch", runnable, Activator.class, Activator.PLUGIN_ID), true);
+ if (pend) {
+ try {
+ job.join();
+ } catch (InterruptedException ex) {
+ throw new OseeWrappedException(ex);
+ }
+ }
+ return job;
+ }
+
+ public static void createNecessaryBranchEventReviews(StateEventType stateEventType, TeamWorkFlowArtifact teamArt, Date createdDate, User createdBy, SkynetTransaction transaction) throws OseeCoreException {
+ if (stateEventType != StateEventType.CommitBranch && stateEventType != StateEventType.CreateBranch) {
+ throw new OseeStateException("Invalid stateEventType [%s]", stateEventType);
+ }
+ // Create any decision and peerToPeer reviews for createBranch and commitBranch
+ for (DecisionReviewDefinition decRevDef : teamArt.getStateDefinition().getDecisionReviews()) {
+ if (decRevDef.getStateEventType() != null && decRevDef.getStateEventType().equals(stateEventType)) {
+ DecisionReviewArtifact decArt =
+ DecisionReviewDefinitionManager.createNewDecisionReview(decRevDef, transaction, teamArt, createdDate,
+ createdBy);
+ if (decArt != null) {
+ decArt.persist(transaction);
+ }
+ }
+ }
+ for (PeerReviewDefinition peerRevDef : teamArt.getStateDefinition().getPeerReviews()) {
+ if (peerRevDef.getStateEventType() != null && peerRevDef.getStateEventType().equals(stateEventType)) {
+ PeerToPeerReviewArtifact peerArt =
+ PeerReviewDefinitionManager.createNewPeerToPeerReview(peerRevDef, transaction, teamArt, createdDate,
+ createdBy);
+ if (peerArt != null) {
+ peerArt.persist(transaction);
+ }
+ }
+ }
+ }
+
+ public static Result deleteWorkingBranch(TeamWorkFlowArtifact teamArt, boolean pend) throws OseeCoreException {
+ Branch branch = AtsBranchManagerCore.getWorkingBranch(teamArt);
+ if (branch != null) {
+ IStatus status = null;
+ if (pend) {
+ status = BranchManager.deleteBranchAndPend(branch);
+ } else {
+ Job job = BranchManager.deleteBranch(branch);
+ job.schedule();
+ try {
+ job.join();
+ } catch (InterruptedException ex) {
+ throw new OseeWrappedException(ex);
+ }
+ status = job.getResult();
+ }
+ if (status.isOK()) {
+ return Result.TrueResult;
+ }
+ return new Result(status.getMessage());
+ }
+ return Result.TrueResult;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/PeerToPeerReviewManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/PeerToPeerReviewManager.java
index 785f4f0540..095390d95e 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/PeerToPeerReviewManager.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/PeerToPeerReviewManager.java
@@ -162,7 +162,9 @@ public class PeerToPeerReviewManager {
}
peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.ReviewBlocks, ReviewBlockType.None.name());
peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.ReviewFormalType, ReviewFormalType.InFormal.name());
- peerToPeerRev.persist(transaction);
+ if (transaction != null) {
+ peerToPeerRev.persist(transaction);
+ }
return peerToPeerRev;
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/ReviewProviders.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/ReviewProviders.java
index 9ae0803f07..a1a40b1805 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/ReviewProviders.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/ReviewProviders.java
@@ -32,7 +32,7 @@ public final class ReviewProviders {
ExtensionDefinedObjects<IReviewProvider> objects =
new ExtensionDefinedObjects<IReviewProvider>("org.eclipse.osee.ats.core.AtsReviewProvider",
- "AtsReviewProvider", "classname");
+ "AtsReviewProvider", "classname", true);
reviewProvider = objects.getObjects();
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/team/TeamWorkFlowArtifact.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/team/TeamWorkFlowArtifact.java
index 12f1ea11db..bc86db0c23 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/team/TeamWorkFlowArtifact.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/team/TeamWorkFlowArtifact.java
@@ -28,6 +28,7 @@ import org.eclipse.osee.ats.core.task.AbstractTaskableArtifact;
import org.eclipse.osee.ats.core.type.AtsAttributeTypes;
import org.eclipse.osee.ats.core.type.AtsRelationTypes;
import org.eclipse.osee.ats.core.util.AtsCacheManager;
+import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.workflow.ActionableItemManagerCore;
import org.eclipse.osee.ats.core.workflow.StateManager;
@@ -177,8 +178,10 @@ public class TeamWorkFlowArtifact extends AbstractTaskableArtifact implements IA
if (arts.isEmpty()) {
// Only show exception once in log
if (!teamArtsWithNoAction.contains(getGuid())) {
- OseeLog.log(Activator.class, Level.SEVERE,
- String.format("Team Workflow has no parent Action [%s]", toStringWithId()));
+ if (!AtsUtilCore.isInTest()) {
+ OseeLog.log(Activator.class, Level.SEVERE,
+ String.format("Team Workflow has no parent Action [%s]", toStringWithId()));
+ }
teamArtsWithNoAction.add(getGuid());
}
} else if (arts.size() > 1) {
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/CopyActionDetails.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/CopyActionDetails.java
new file mode 100644
index 0000000000..41ad444440
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/CopyActionDetails.java
@@ -0,0 +1,93 @@
+/*
+ * Created on Oct 21, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.core.util;
+
+import org.eclipse.osee.ats.core.config.TeamDefinitionArtifact;
+import org.eclipse.osee.ats.core.internal.Activator;
+import org.eclipse.osee.ats.core.task.TaskArtifact;
+import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.core.type.AtsArtifactTypes;
+import org.eclipse.osee.ats.core.type.AtsAttributeTypes;
+import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.core.workflow.ChangeTypeUtil;
+import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
+import org.eclipse.osee.framework.logging.OseeLevel;
+import org.eclipse.osee.framework.logging.OseeLog;
+
+public class CopyActionDetails {
+
+ private final AbstractWorkflowArtifact awa;
+ private static final String USE_DEVELOPER_CHANGE_TYPES = "UseDeveloperChangeTypes";
+
+ public CopyActionDetails(AbstractWorkflowArtifact awa) {
+ this.awa = awa;
+ }
+
+ public String getDetailsString() {
+ String detailsStr = "";
+ try {
+ if (awa.getParentTeamWorkflow() != null) {
+ TeamDefinitionArtifact teamDef = awa.getParentTeamWorkflow().getTeamDefinition();
+ String formatStr = getFormatStr(teamDef);
+ if (Strings.isValid(formatStr)) {
+ detailsStr = formatStr;
+ detailsStr = detailsStr.replaceAll("<hrid>", awa.getHumanReadableId());
+ detailsStr = detailsStr.replaceAll("<name>", awa.getName());
+ detailsStr = detailsStr.replaceAll("<artType>", awa.getArtifactTypeName());
+ detailsStr = detailsStr.replaceAll("<changeType>", getChangeTypeOrObjectType(awa));
+ }
+ }
+ if (!Strings.isValid(detailsStr)) {
+ detailsStr =
+ "\"" + awa.getArtifactTypeName() + "\" - " + awa.getHumanReadableId() + " - \"" + awa.getName() + "\"";
+ }
+ } catch (Exception ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
+ return detailsStr;
+ }
+
+ private String getChangeTypeOrObjectType(AbstractWorkflowArtifact awa) throws OseeCoreException {
+ String result = "";
+ if (awa instanceof TeamWorkFlowArtifact) {
+ TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) awa;
+ result = ChangeTypeUtil.getChangeTypeStr(awa);
+ if (teamArt.getTeamDefinition().getAttributesToStringList(CoreAttributeTypes.StaticId).contains(
+ USE_DEVELOPER_CHANGE_TYPES)) {
+ if (result.equals("Improvement")) {
+ result = "feature";
+ } else if (result.equals("Problem")) {
+ result = "bug";
+ }
+ }
+ } else if (awa instanceof TaskArtifact) {
+ result = "Task";
+ } else if (awa.isOfType(AtsArtifactTypes.ReviewArtifact)) {
+ result = "Review";
+ } else if (awa.isOfType(AtsArtifactTypes.Goal)) {
+ result = "Goal";
+ }
+ if (!Strings.isValid(result)) {
+ result = "unknown";
+ }
+ return result;
+ }
+
+ private String getFormatStr(TeamDefinitionArtifact teamDef) throws OseeCoreException {
+ if (teamDef != null) {
+ String formatStr = teamDef.getSoleAttributeValue(AtsAttributeTypes.ActionDetailsFormat, "");
+ if (Strings.isValid(formatStr)) {
+ return formatStr;
+ }
+ if (teamDef.getParent() instanceof TeamDefinitionArtifact) {
+ return getFormatStr((TeamDefinitionArtifact) teamDef.getParent());
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Suite.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Suite.java
index 7161cdb9a2..12ea2a193f 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Suite.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Suite.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.ats;
import static org.junit.Assert.assertTrue;
+import org.eclipse.osee.ats.actions.AtsTest_Demo_Action_Suite;
import org.eclipse.osee.ats.artifact.log.AtsLogTest;
import org.eclipse.osee.ats.artifact.log.LogItemTest;
import org.eclipse.osee.ats.artifact.note.AtsNoteTest;
@@ -38,6 +39,7 @@ import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
+ AtsTest_Demo_Action_Suite.class,
AtsTest_Demo_Access_Suite.class,
AtsNavigateItemsToMassEditorTest.class,
AtsNavigateItemsToTaskEditorTest.class,
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionPerspectiveTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionPerspectiveTest.java
new file mode 100644
index 0000000000..9459d50778
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionPerspectiveTest.java
@@ -0,0 +1,29 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.junit.Test;
+
+/**
+ * Abstract for the simplest test case where Action just needs run called
+ *
+ * @author Donald G. Dunne
+ */
+public abstract class AbstractAtsActionPerspectiveTest {
+
+ @Test
+ public void test() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ IWorkbenchWindowActionDelegate action = getPerspectiveAction();
+ action.run(null);
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+ public abstract IWorkbenchWindowActionDelegate getPerspectiveAction();
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionRunTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionRunTest.java
new file mode 100644
index 0000000000..dbe931fab6
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionRunTest.java
@@ -0,0 +1,35 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+/**
+ * Abstract for the simplest test case where Action just needs run called
+ *
+ * @author Donald G. Dunne
+ */
+public abstract class AbstractAtsActionRunTest extends AbstractAtsActionTest {
+
+ @Test
+ public void test() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ Action action = createAction();
+ // want the exception to propagate to top if AbstractAtsAction
+ if (action instanceof AbstractAtsAction) {
+ ((AbstractAtsAction) action).runWithException();
+ } else {
+ action.run();
+ }
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionTest.java
new file mode 100644
index 0000000000..4324984ad0
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionTest.java
@@ -0,0 +1,36 @@
+/*
+ * Created on Oct 21, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import junit.framework.Assert;
+import org.eclipse.jface.action.Action;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Abstract for Action tests that tests getImageDescriptor and calls cleanup before/after class
+ *
+ * @author Donald G. Dunne
+ */
+public abstract class AbstractAtsActionTest {
+
+ @BeforeClass
+ @AfterClass
+ public static void cleanup() throws OseeCoreException {
+ AtsTestUtil.cleanup();
+ }
+
+ @Test
+ public void getImageDescriptor() throws Exception {
+ Action action = createAction();
+ Assert.assertNotNull("Image should be specified", action.getImageDescriptor());
+ }
+
+ public abstract Action createAction() throws OseeCoreException;
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AccessControlActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AccessControlActionTest.java
new file mode 100644
index 0000000000..908a114550
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AccessControlActionTest.java
@@ -0,0 +1,61 @@
+/*
+ * Created on Oct 21, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import java.util.logging.Level;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.Action;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.framework.ui.swt.Displays;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class AccessControlActionTest extends AbstractAtsActionTest {
+
+ @Test
+ public void testRun() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ final AccessControlAction action = (AccessControlAction) createAction();
+ Job job = new Job("Kill dialog") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException ex) {
+ OseeLog.log(Activator.class, Level.SEVERE, ex);
+ }
+ Displays.ensureInDisplayThread(new Runnable() {
+
+ @Override
+ public void run() {
+ action.getDialog().getShell().close();
+ }
+ });
+ return Status.OK_STATUS;
+ }
+ };
+ job.schedule();
+ action.run();
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+ @Override
+ public Action createAction() throws OseeCoreException {
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ return new AccessControlAction(AtsTestUtil.getTeamWf());
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AddNoteActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AddNoteActionTest.java
new file mode 100644
index 0000000000..5cfbebafb5
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AddNoteActionTest.java
@@ -0,0 +1,43 @@
+/*
+ * Created on Oct 21, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class AddNoteActionTest extends AbstractAtsActionTest {
+
+ @Test
+ public void testRun() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ AddNoteAction action = (AddNoteAction) createAction();
+ action.setEmulateUi(true);
+ action.runWithException();
+ AtsTestUtil.getTeamWf().persist(getClass().getSimpleName());
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+ @Override
+ public Action createAction() throws OseeCoreException {
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ return new AddNoteAction(AtsTestUtil.getTeamWf(), new IDirtiableEditor() {
+
+ @Override
+ public void onDirtied() {
+ // do nothing
+ }
+ });
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AtsTest_Demo_Action_Suite.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AtsTest_Demo_Action_Suite.java
new file mode 100644
index 0000000000..d6a5ce1608
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AtsTest_Demo_Action_Suite.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ AccessControlActionTest.class,
+ AddNoteActionTest.class,
+ CopyActionDetailsActionTest.class,
+ DeletePurgeAtsArtifactsActionTest.class,
+ DirtyReportActionTest.class,
+ DirtyReportActionTest2.class,
+ DuplicateWorkflowActionTest.class,
+ DuplicateWorkflowViaWorldEditorActionTest.class,
+ FavoriteActionTest.class,
+ ImportTasksViaSimpleListTest.class,
+ ImportTasksViaSpreadsheetTest.class,
+ MyFavoritesActionTest.class,
+ MyWorldActionTest.class,
+ NewGoalTest.class,
+ OpenAtsPerspectiveActionTest.class,
+ OpenChangeReportByIdActionTest.class,
+ OpenInArtifactEditorActionTest.class,
+ OpenInAtsWorkflowEditorActionTest.class,
+ OpenInSkyWalkerActionTest.class,
+ OpenInAtsWorldActionTest.class,
+ OpenInAtsWorldActionTest2.class,
+ OpenInAtsWorldActionTest3.class,
+ OpenNewAtsTaskEditorActionTest.class,
+ OpenNewAtsWorldEditorActionTest.class,
+ OpenNewAtsTaskEditorSelectedTest.class,
+ OpenNewAtsWorldEditorSelectedActionTest.class,
+ OpenParentActionTest.class,
+ OpenReviewPerspectiveActionTest.class,
+ OpenTeamDefinitionActionTest.class,
+ OpenVersionArtifactActionTest.class,
+ OpenWorkflowByIdActionTest.class,
+ OpenWorldByIdActionTest.class,
+ RefreshDirtyActionTest.class,
+ ReloadActionTest.class,
+ ResourceHistoryActionTest.class,
+ ShowBranchChangeDataActionTest.class,
+ ShowChangeReportActionTest.class,
+ ShowMergeManagerActionTest.class,
+ ShowWorkDefinitionActionTest.class,
+ SubscribedActionTest.class,
+ TaskAddActionTest.class,
+ TaskDeleteActionTest.class,
+//
+})
+/**
+ * @author Donald G. Dunne
+ */
+public class AtsTest_Demo_Action_Suite {
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ System.out.println("\n\nBegin " + AtsTest_Demo_Action_Suite.class.getSimpleName());
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ System.out.println("End " + AtsTest_Demo_Action_Suite.class.getSimpleName());
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/CopyActionDetailsActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/CopyActionDetailsActionTest.java
new file mode 100644
index 0000000000..3abe18d634
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/CopyActionDetailsActionTest.java
@@ -0,0 +1,21 @@
+/*
+ * Created on Oct 21, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class CopyActionDetailsActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public CopyActionDetailsAction createAction() throws OseeCoreException {
+ return new CopyActionDetailsAction(AtsTestUtil.getTeamWf());
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DeletePurgeAtsArtifactsActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DeletePurgeAtsArtifactsActionTest.java
new file mode 100644
index 0000000000..62bebe14ba
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DeletePurgeAtsArtifactsActionTest.java
@@ -0,0 +1,33 @@
+/*
+ * Created on Oct 21, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class DeletePurgeAtsArtifactsActionTest extends AbstractAtsActionTest {
+
+ @Test
+ public void testRun() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ DeletePurgeAtsArtifactsAction action = createAction();
+ action.setPrompt(false);
+ action.runWithException();
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+ @Override
+ public DeletePurgeAtsArtifactsAction createAction() throws OseeCoreException {
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ return new DeletePurgeAtsArtifactsAction(AtsTestUtil.getSelectedAtsArtifactsForTeamWf());
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DirtyReportActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DirtyReportActionTest.java
new file mode 100644
index 0000000000..6cb0855157
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DirtyReportActionTest.java
@@ -0,0 +1,32 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeStateException;
+import org.eclipse.osee.framework.core.util.Result;
+import org.junit.Test;
+
+public class DirtyReportActionTest extends AbstractAtsActionTest {
+
+ @Test(expected = OseeStateException.class)
+ public void test() throws Exception {
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ DirtyReportAction action = createAction();
+ action.runWithException();
+ }
+
+ @Override
+ public DirtyReportAction createAction() {
+ return new DirtyReportAction(new IDirtyReportable() {
+ @Override
+ public Result isDirtyResult() {
+ return new Result("Hello World");
+ }
+ });
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DirtyReportActionTest2.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DirtyReportActionTest2.java
new file mode 100644
index 0000000000..d1fbc79879
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DirtyReportActionTest2.java
@@ -0,0 +1,32 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeStateException;
+import org.eclipse.osee.framework.core.util.Result;
+import org.junit.Test;
+
+public class DirtyReportActionTest2 extends AbstractAtsActionTest {
+
+ @Test(expected = OseeStateException.class)
+ public void test() throws Exception {
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ DirtyReportAction action = createAction();
+ action.runWithException();
+ }
+
+ @Override
+ public DirtyReportAction createAction() {
+ return new DirtyReportAction(new IDirtyReportable() {
+ @Override
+ public Result isDirtyResult() {
+ return Result.TrueResult;
+ }
+ });
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DuplicateWorkflowActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DuplicateWorkflowActionTest.java
new file mode 100644
index 0000000000..bbd4e8bebb
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DuplicateWorkflowActionTest.java
@@ -0,0 +1,19 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import java.util.Collections;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+
+public class DuplicateWorkflowActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public DuplicateWorkflowAction createAction() throws OseeCoreException {
+ return new DuplicateWorkflowAction(Collections.singleton(AtsTestUtil.getTeamWf()));
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorActionTest.java
new file mode 100644
index 0000000000..271f339d3f
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorActionTest.java
@@ -0,0 +1,31 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.ats.core.actions.SelectedAtsArtifactsAdapter;
+import org.eclipse.osee.framework.core.exception.OseeArgumentException;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class DuplicateWorkflowViaWorldEditorActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public Action createAction() {
+ return new DuplicateWorkflowViaWorldEditorAction(AtsTestUtil.getSelectedAtsArtifactsForTeamWf());
+ }
+
+ @Test(expected = OseeArgumentException.class)
+ public void testException() throws OseeCoreException {
+ DuplicateWorkflowViaWorldEditorAction action =
+ new DuplicateWorkflowViaWorldEditorAction(new SelectedAtsArtifactsAdapter());
+ action.runWithException();
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/FavoriteActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/FavoriteActionTest.java
new file mode 100644
index 0000000000..7a5a4317f5
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/FavoriteActionTest.java
@@ -0,0 +1,41 @@
+/*
+ * Created on Oct 23, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import junit.framework.Assert;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.ats.core.type.AtsRelationTypes;
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.framework.skynet.core.UserManager;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class FavoriteActionTest extends AbstractAtsActionTest {
+
+ @Test
+ public void test() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ Assert.assertFalse(UserManager.getUser().getRelatedArtifacts(AtsRelationTypes.FavoriteUser_Artifact).contains(
+ AtsTestUtil.getTeamWf()));
+ FavoriteAction action = createAction();
+ action.runWithException();
+ Assert.assertTrue(UserManager.getUser().getRelatedArtifacts(AtsRelationTypes.FavoriteUser_Artifact).contains(
+ AtsTestUtil.getTeamWf()));
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+ @Override
+ public FavoriteAction createAction() {
+ FavoriteAction action = new FavoriteAction(AtsTestUtil.getSelectedAtsArtifactsForTeamWf());
+ action.setPrompt(false);
+ return action;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ImportTasksViaSimpleListTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ImportTasksViaSimpleListTest.java
new file mode 100644
index 0000000000..49d8d96bc8
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ImportTasksViaSimpleListTest.java
@@ -0,0 +1,35 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class ImportTasksViaSimpleListTest {
+
+ @Test
+ public void test() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ ImportTasksViaSimpleList action = new ImportTasksViaSimpleList(AtsTestUtil.getTeamWf(), new ImportListener() {
+
+ @Override
+ public void importCompleted() {
+ System.out.println(" ");
+ }
+
+ });
+ action.runWithException();
+ AtsTestUtil.cleanup();
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ImportTasksViaSpreadsheetTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ImportTasksViaSpreadsheetTest.java
new file mode 100644
index 0000000000..c508357b2e
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ImportTasksViaSpreadsheetTest.java
@@ -0,0 +1,34 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class ImportTasksViaSpreadsheetTest {
+
+ @Test
+ public void test() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ ImportTasksViaSpreadsheet action = new ImportTasksViaSpreadsheet(AtsTestUtil.getTeamWf(), new ImportListener() {
+
+ @Override
+ public void importCompleted() {
+ System.out.println(" ");
+ }
+
+ });
+ action.runWithException();
+ AtsTestUtil.cleanup();
+ TestUtil.severeLoggingEnd(monitor);
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/MyFavoritesActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/MyFavoritesActionTest.java
new file mode 100644
index 0000000000..dd012d5c49
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/MyFavoritesActionTest.java
@@ -0,0 +1,30 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class MyFavoritesActionTest extends AbstractAtsActionTest {
+
+ @Test
+ public void test() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ MyFavoritesAction action = new MyFavoritesAction();
+ action.runWithException();
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+ @Override
+ public MyFavoritesAction createAction() {
+ return new MyFavoritesAction();
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/MyWorldActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/MyWorldActionTest.java
new file mode 100644
index 0000000000..445a9952a8
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/MyWorldActionTest.java
@@ -0,0 +1,30 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class MyWorldActionTest extends AbstractAtsActionTest {
+
+ @Test
+ public void test() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ MyWorldAction action = new MyWorldAction();
+ action.runWithException();
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+ @Override
+ public MyWorldAction createAction() {
+ return new MyWorldAction();
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/NewGoalTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/NewGoalTest.java
new file mode 100644
index 0000000000..03a4b9f0e4
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/NewGoalTest.java
@@ -0,0 +1,37 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.util.AtsUtil;
+import org.eclipse.osee.framework.core.enums.DeletionFlag;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+public class NewGoalTest extends AbstractAtsActionRunTest {
+
+ @BeforeClass
+ @AfterClass
+ public static void cleanup() throws OseeCoreException {
+ SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), NewGoalTest.class.getSimpleName());
+ for (Artifact art : ArtifactQuery.getArtifactListFromName(NewGoalTest.class.getSimpleName(),
+ AtsUtil.getAtsBranchToken(), DeletionFlag.EXCLUDE_DELETED)) {
+ art.deleteAndPersist(transaction);
+ }
+ transaction.execute();
+ }
+
+ @Override
+ public NewGoal createAction() {
+ NewGoal action = new NewGoal();
+ action.setTitleOverride(getClass().getSimpleName());
+ return action;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenAtsPerspectiveActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenAtsPerspectiveActionTest.java
new file mode 100644
index 0000000000..e6e0cbc475
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenAtsPerspectiveActionTest.java
@@ -0,0 +1,20 @@
+/*
+ * Created on Oct 23, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenAtsPerspectiveActionTest extends AbstractAtsActionPerspectiveTest {
+
+ @Override
+ public IWorkbenchWindowActionDelegate getPerspectiveAction() {
+ return new OpenAtsPerspectiveAction();
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenChangeReportByIdActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenChangeReportByIdActionTest.java
new file mode 100644
index 0000000000..4462afc63f
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenChangeReportByIdActionTest.java
@@ -0,0 +1,39 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import junit.framework.Assert;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+public class OpenChangeReportByIdActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenChangeReportByIdAction createAction() throws OseeCoreException {
+
+ Result result = AtsTestUtil.createWorkingBranchFromTeamWf();
+ Assert.assertTrue(result.getText(), result.isTrue());
+
+ OpenChangeReportByIdAction action = new OpenChangeReportByIdAction();
+ action.setOverrideId(AtsTestUtil.getTeamWf().getHumanReadableId());
+ return action;
+ }
+
+ @Override
+ @Test
+ public void getImageDescriptor() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ OpenChangeReportByIdAction action = new OpenChangeReportByIdAction();
+ Assert.assertNotNull("Image should be specified", action.getImageDescriptor());
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInArtifactEditorActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInArtifactEditorActionTest.java
new file mode 100644
index 0000000000..24b9c83d21
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInArtifactEditorActionTest.java
@@ -0,0 +1,20 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenInArtifactEditorActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenInArtifactEditorAction createAction() {
+ return new OpenInArtifactEditorAction(AtsTestUtil.getSelectedAtsArtifactsForTeamWf());
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorkflowEditorActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorkflowEditorActionTest.java
new file mode 100644
index 0000000000..f8e0c2d954
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorkflowEditorActionTest.java
@@ -0,0 +1,20 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenInAtsWorkflowEditorActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenInAtsWorkflowEditorAction createAction() {
+ return new OpenInAtsWorkflowEditorAction(AtsTestUtil.getSelectedAtsArtifactsForTeamWf());
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorldActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorldActionTest.java
new file mode 100644
index 0000000000..7ed9179f71
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorldActionTest.java
@@ -0,0 +1,33 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.ats.core.type.AtsRelationTypes;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.exception.OseeStateException;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenInAtsWorldActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenInAtsWorldAction createAction() throws OseeCoreException {
+ return new OpenInAtsWorldAction(AtsTestUtil.getTeamWf());
+ }
+
+ @Test(expected = OseeStateException.class)
+ public void testNoParentAction() throws OseeCoreException {
+ AtsTestUtil.getTeamWf().deleteRelations(AtsRelationTypes.ActionToWorkflow_Action);
+ AtsTestUtil.getTeamWf().persist(getClass().getSimpleName());
+
+ OpenInAtsWorldAction action = createAction();
+ action.runWithException();
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorldActionTest2.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorldActionTest2.java
new file mode 100644
index 0000000000..34140134e6
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorldActionTest2.java
@@ -0,0 +1,21 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenInAtsWorldActionTest2 extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenInAtsWorldAction createAction() throws OseeCoreException {
+ return new OpenInAtsWorldAction(AtsTestUtil.getOrCreateTask());
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorldActionTest3.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorldActionTest3.java
new file mode 100644
index 0000000000..1476094c35
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInAtsWorldActionTest3.java
@@ -0,0 +1,36 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.ats.core.type.AtsRelationTypes;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.exception.OseeStateException;
+import org.junit.Test;
+
+/**
+ * Test case where no parent action
+ *
+ * @author Donald G. Dunne
+ */
+public class OpenInAtsWorldActionTest3 extends AbstractAtsActionRunTest {
+
+ @Override
+ @Test(expected = OseeStateException.class)
+ public void test() throws Exception {
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ OpenInAtsWorldAction action = createAction();
+ action.runWithException();
+ }
+
+ @Override
+ public OpenInAtsWorldAction createAction() throws OseeCoreException {
+ AtsTestUtil.getTeamWf().deleteRelations(AtsRelationTypes.ActionToWorkflow_Action);
+ AtsTestUtil.getTeamWf().persist(getClass().getSimpleName());
+ return new OpenInAtsWorldAction(AtsTestUtil.getTeamWf());
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInSkyWalkerActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInSkyWalkerActionTest.java
new file mode 100644
index 0000000000..f8cb23b621
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenInSkyWalkerActionTest.java
@@ -0,0 +1,21 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenInSkyWalkerActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenInSkyWalkerAction createAction() throws OseeCoreException {
+ return new OpenInSkyWalkerAction(AtsTestUtil.getTeamWf());
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorActionTest.java
new file mode 100644
index 0000000000..7ae3db129d
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorActionTest.java
@@ -0,0 +1,77 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import java.util.Collection;
+import java.util.Collections;
+import org.eclipse.jface.action.Action;
+import org.eclipse.nebula.widgets.xviewer.customize.CustomizeData;
+import org.eclipse.osee.ats.actions.OpenNewAtsTaskEditorAction.IOpenNewAtsTaskEditorHandler;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.ats.task.ITaskEditorProvider;
+import org.eclipse.osee.ats.world.search.WorldSearchItem.SearchType;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenNewAtsTaskEditorActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public Action createAction() {
+ return new OpenNewAtsTaskEditorAction(new IOpenNewAtsTaskEditorHandler() {
+
+ @Override
+ public ITaskEditorProvider getTaskEditorProviderCopy() {
+ return new ITaskEditorProvider() {
+
+ @Override
+ public void setTableLoadOptions(TableLoadOption... tableLoadOptions) {
+ // do nothing
+ }
+
+ @Override
+ public void setCustomizeData(CustomizeData customizeData) {
+ // do nothing
+ }
+
+ @Override
+ public Collection<? extends Artifact> getTaskEditorTaskArtifacts() throws OseeCoreException {
+ return Collections.singleton(AtsTestUtil.getOrCreateTask());
+ }
+
+ @Override
+ public String getTaskEditorLabel(SearchType searchType) {
+ return "Tasks";
+ }
+
+ @Override
+ public Collection<TableLoadOption> getTableLoadOptions() {
+ return Collections.singleton(TableLoadOption.NoUI);
+ }
+
+ @Override
+ public String getName() {
+ return "Tasks";
+ }
+
+ @Override
+ public ITaskEditorProvider copyProvider() {
+ return null;
+ }
+ };
+ }
+
+ @Override
+ public CustomizeData getCustomizeDataCopy() {
+ return null;
+ }
+ });
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorSelectedTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorSelectedTest.java
new file mode 100644
index 0000000000..d13eba9e45
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorSelectedTest.java
@@ -0,0 +1,33 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import java.util.Arrays;
+import java.util.List;
+import org.eclipse.nebula.widgets.xviewer.customize.CustomizeData;
+import org.eclipse.osee.ats.actions.OpenNewAtsTaskEditorSelected.IOpenNewAtsTaskEditorSelectedHandler;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+
+public class OpenNewAtsTaskEditorSelectedTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenNewAtsTaskEditorSelected createAction() {
+ return new OpenNewAtsTaskEditorSelected(new IOpenNewAtsTaskEditorSelectedHandler() {
+
+ @Override
+ public List<? extends Artifact> getSelectedArtifacts() throws OseeCoreException {
+ return Arrays.asList(AtsTestUtil.getTeamWf());
+ }
+
+ @Override
+ public CustomizeData getCustomizeDataCopy() {
+ return null;
+ }
+ });
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorActionTest.java
new file mode 100644
index 0000000000..4cb85da311
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorActionTest.java
@@ -0,0 +1,70 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.nebula.widgets.xviewer.customize.CustomizeData;
+import org.eclipse.osee.ats.actions.OpenNewAtsWorldEditorAction.IOpenNewAtsWorldEditorHandler;
+import org.eclipse.osee.ats.world.IWorldEditorProvider;
+import org.eclipse.osee.ats.world.WorldEditor;
+import org.eclipse.osee.ats.world.search.WorldSearchItem.SearchType;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
+
+public class OpenNewAtsWorldEditorActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenNewAtsWorldEditorAction createAction() {
+ return new OpenNewAtsWorldEditorAction(new IOpenNewAtsWorldEditorHandler() {
+
+ @Override
+ public IWorldEditorProvider getWorldEditorProviderCopy() {
+ return new IWorldEditorProvider() {
+
+ @Override
+ public void setTableLoadOptions(TableLoadOption... tableLoadOptions) {
+ // do nothing
+ }
+
+ @Override
+ public void setCustomizeData(CustomizeData customizeData) {
+ // do nothing
+ }
+
+ @Override
+ public void run(WorldEditor worldEditor, SearchType searchType, boolean forcePend) {
+ // do nothing
+ }
+
+ @Override
+ public Artifact getTargetedVersionArtifact() {
+ return null;
+ }
+
+ @Override
+ public String getSelectedName(SearchType searchType) {
+ return "Open";
+ }
+
+ @Override
+ public String getName() {
+ return "Open";
+ }
+
+ @Override
+ public IWorldEditorProvider copyProvider() {
+ return null;
+ }
+ };
+ }
+
+ @Override
+ public CustomizeData getCustomizeDataCopy() {
+ return null;
+ }
+ });
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorSelectedActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorSelectedActionTest.java
new file mode 100644
index 0000000000..658612a702
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorSelectedActionTest.java
@@ -0,0 +1,33 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import java.util.Arrays;
+import java.util.List;
+import org.eclipse.nebula.widgets.xviewer.customize.CustomizeData;
+import org.eclipse.osee.ats.actions.OpenNewAtsWorldEditorSelectedAction.IOpenNewAtsWorldEditorSelectedHandler;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+
+public class OpenNewAtsWorldEditorSelectedActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenNewAtsWorldEditorSelectedAction createAction() {
+ return new OpenNewAtsWorldEditorSelectedAction(new IOpenNewAtsWorldEditorSelectedHandler() {
+
+ @Override
+ public List<Artifact> getSelectedArtifacts() throws OseeCoreException {
+ return Arrays.asList((Artifact) AtsTestUtil.getTeamWf());
+ }
+
+ @Override
+ public CustomizeData getCustomizeDataCopy() {
+ return null;
+ }
+ });
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenParentActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenParentActionTest.java
new file mode 100644
index 0000000000..14cc0a62dc
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenParentActionTest.java
@@ -0,0 +1,21 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenParentActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenParentAction createAction() throws OseeCoreException {
+ return new OpenParentAction(AtsTestUtil.getOrCreateTask());
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenReviewPerspectiveActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenReviewPerspectiveActionTest.java
new file mode 100644
index 0000000000..d06014edb0
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenReviewPerspectiveActionTest.java
@@ -0,0 +1,20 @@
+/*
+ * Created on Oct 23, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenReviewPerspectiveActionTest extends AbstractAtsActionPerspectiveTest {
+
+ @Override
+ public IWorkbenchWindowActionDelegate getPerspectiveAction() {
+ return new OpenReviewPerspectiveAction();
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenTeamDefinitionActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenTeamDefinitionActionTest.java
new file mode 100644
index 0000000000..4339d00a44
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenTeamDefinitionActionTest.java
@@ -0,0 +1,21 @@
+/*
+ * Created on Oct 23, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenTeamDefinitionActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenTeamDefinitionAction createAction() throws OseeCoreException {
+ return new OpenTeamDefinitionAction(AtsTestUtil.getTeamWf());
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenVersionArtifactActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenVersionArtifactActionTest.java
new file mode 100644
index 0000000000..503465a5ee
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenVersionArtifactActionTest.java
@@ -0,0 +1,29 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.ats.core.type.AtsRelationTypes;
+import org.eclipse.osee.ats.core.util.AtsUtilCore;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenVersionArtifactActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenVersionArtifactAction createAction() throws OseeCoreException {
+ SkynetTransaction transaction = new SkynetTransaction(AtsUtilCore.getAtsBranch(), getClass().getSimpleName());
+ AtsTestUtil.getTeamWf().addRelation(AtsRelationTypes.TeamWorkflowTargetedForVersion_Version,
+ AtsTestUtil.getVerArt1());
+ AtsTestUtil.getVerArt1().persist(transaction);
+ AtsTestUtil.getTeamWf().persist(transaction);
+ transaction.execute();
+ return new OpenVersionArtifactAction(AtsTestUtil.getTeamWf());
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenWorkflowByIdActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenWorkflowByIdActionTest.java
new file mode 100644
index 0000000000..c4eca41994
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenWorkflowByIdActionTest.java
@@ -0,0 +1,24 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenWorkflowByIdActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public Action createAction() throws OseeCoreException {
+ OpenWorkflowByIdAction action = new OpenWorkflowByIdAction();
+ action.setOverrideId(AtsTestUtil.getTeamWf().getHumanReadableId());
+ return action;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenWorldByIdActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenWorldByIdActionTest.java
new file mode 100644
index 0000000000..9220f3f5fd
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/OpenWorldByIdActionTest.java
@@ -0,0 +1,23 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenWorldByIdActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public OpenWorldByIdAction createAction() throws OseeCoreException {
+ OpenWorldByIdAction action = new OpenWorldByIdAction();
+ action.setOverrideIdString(AtsTestUtil.getTeamWf().getHumanReadableId());
+ return action;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/RefreshDirtyActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/RefreshDirtyActionTest.java
new file mode 100644
index 0000000000..0f8282025a
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/RefreshDirtyActionTest.java
@@ -0,0 +1,23 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
+
+public class RefreshDirtyActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public RefreshDirtyAction createAction() {
+ return new RefreshDirtyAction(new IDirtiableEditor() {
+
+ @Override
+ public void onDirtied() {
+ System.out.println(" ");
+ }
+ });
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ReloadActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ReloadActionTest.java
new file mode 100644
index 0000000000..f201a96d3c
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ReloadActionTest.java
@@ -0,0 +1,21 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class ReloadActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public ReloadAction createAction() throws OseeCoreException {
+ return new ReloadAction(AtsTestUtil.getTeamWf());
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ResourceHistoryActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ResourceHistoryActionTest.java
new file mode 100644
index 0000000000..a8b87e47bc
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ResourceHistoryActionTest.java
@@ -0,0 +1,38 @@
+/*
+ * Created on Oct 23, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import junit.framework.Assert;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.ats.core.type.AtsRelationTypes;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.framework.skynet.core.UserManager;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class ResourceHistoryActionTest extends AbstractAtsActionTest {
+
+ @Test
+ public void test() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ Assert.assertFalse(UserManager.getUser().getRelatedArtifacts(AtsRelationTypes.FavoriteUser_Artifact).contains(
+ AtsTestUtil.getTeamWf()));
+ ResourceHistoryAction action = createAction();
+ action.runWithException();
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+ @Override
+ public ResourceHistoryAction createAction() throws OseeCoreException {
+ return new ResourceHistoryAction(AtsTestUtil.getTeamWf());
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowBranchChangeDataActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowBranchChangeDataActionTest.java
new file mode 100644
index 0000000000..8b88a53ffa
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowBranchChangeDataActionTest.java
@@ -0,0 +1,35 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import junit.framework.Assert;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+public class ShowBranchChangeDataActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public ShowBranchChangeDataAction createAction() throws OseeCoreException {
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ Result result = AtsTestUtil.createWorkingBranchFromTeamWf();
+ Assert.assertTrue(result.getText(), result.isTrue());
+ TestUtil.sleep(2000);
+ Assert.assertNotNull(AtsTestUtil.getTeamWf().getWorkingBranch());
+
+ return new ShowBranchChangeDataAction(AtsTestUtil.getTeamWf());
+ }
+
+ @Override
+ @Test
+ public void getImageDescriptor() {
+ ShowBranchChangeDataAction action = new ShowBranchChangeDataAction(null);
+ Assert.assertNotNull("Image should be specified", action.getImageDescriptor());
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowChangeReportActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowChangeReportActionTest.java
new file mode 100644
index 0000000000..5599c2a866
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowChangeReportActionTest.java
@@ -0,0 +1,37 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import junit.framework.Assert;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+public class ShowChangeReportActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public ShowChangeReportAction createAction() throws OseeCoreException {
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ Result result = AtsTestUtil.createWorkingBranchFromTeamWf();
+ Assert.assertTrue(result.getText(), result.isTrue());
+ ShowChangeReportAction action = new ShowChangeReportAction(AtsTestUtil.getTeamWf());
+ return action;
+ }
+
+ @Override
+ @Test
+ public void getImageDescriptor() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ ShowChangeReportAction action = new ShowChangeReportAction(AtsTestUtil.getTeamWf());
+ Assert.assertNotNull("Image should be specified", action.getImageDescriptor());
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowMergeManagerActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowMergeManagerActionTest.java
new file mode 100644
index 0000000000..a54eddbd4d
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowMergeManagerActionTest.java
@@ -0,0 +1,38 @@
+/*
+ * Created on Oct 26, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import junit.framework.Assert;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+public class ShowMergeManagerActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public ShowMergeManagerAction createAction() throws OseeCoreException {
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ Result result = AtsTestUtil.createWorkingBranchFromTeamWf();
+ Assert.assertTrue(result.getText(), result.isTrue());
+
+ ShowMergeManagerAction action = new ShowMergeManagerAction(AtsTestUtil.getTeamWf());
+ return action;
+ }
+
+ @Override
+ @Test
+ public void getImageDescriptor() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ ShowMergeManagerAction action = new ShowMergeManagerAction(AtsTestUtil.getTeamWf());
+ Assert.assertNotNull("Image should be specified", action.getImageDescriptor());
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowWorkDefinitionActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowWorkDefinitionActionTest.java
new file mode 100644
index 0000000000..e7b9f5051d
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/ShowWorkDefinitionActionTest.java
@@ -0,0 +1,19 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+
+/**
+ * @author Donald G. Dunne
+ */
+public class ShowWorkDefinitionActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public ShowWorkDefinitionAction createAction() {
+ return new ShowWorkDefinitionAction();
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/SubscribedActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/SubscribedActionTest.java
new file mode 100644
index 0000000000..d3d2af2415
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/SubscribedActionTest.java
@@ -0,0 +1,41 @@
+/*
+ * Created on Oct 23, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import junit.framework.Assert;
+import org.eclipse.osee.ats.core.AtsTestUtil;
+import org.eclipse.osee.ats.core.type.AtsRelationTypes;
+import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.framework.skynet.core.UserManager;
+import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class SubscribedActionTest extends AbstractAtsActionTest {
+
+ @Test
+ public void test() throws Exception {
+ SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
+ AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
+ Assert.assertFalse(UserManager.getUser().getRelatedArtifacts(AtsRelationTypes.SubscribedUser_Artifact).contains(
+ AtsTestUtil.getTeamWf()));
+ SubscribedAction action = createAction();
+ action.runWithException();
+ Assert.assertTrue(UserManager.getUser().getRelatedArtifacts(AtsRelationTypes.SubscribedUser_Artifact).contains(
+ AtsTestUtil.getTeamWf()));
+ TestUtil.severeLoggingEnd(monitor);
+ }
+
+ @Override
+ public SubscribedAction createAction() {
+ SubscribedAction action = new SubscribedAction(AtsTestUtil.getSelectedAtsArtifactsForTeamWf());
+ action.setPrompt(false);
+ return action;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/TaskAddActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/TaskAddActionTest.java
new file mode 100644
index 0000000000..c61203f63e
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/TaskAddActionTest.java
@@ -0,0 +1,26 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.actions.TaskAddAction.ITaskAddActionHandler;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class TaskAddActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public TaskAddAction createAction() {
+ return new TaskAddAction(new ITaskAddActionHandler() {
+
+ @Override
+ public void taskAddActionHandler() {
+ System.out.println(" ");
+ }
+ });
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/TaskDeleteActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/TaskDeleteActionTest.java
new file mode 100644
index 0000000000..bc0ab944eb
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/TaskDeleteActionTest.java
@@ -0,0 +1,26 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.ats.actions.TaskDeleteAction.ITaskDeleteActionHandler;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class TaskDeleteActionTest extends AbstractAtsActionRunTest {
+
+ @Override
+ public TaskDeleteAction createAction() {
+ return new TaskDeleteAction(new ITaskDeleteActionHandler() {
+
+ @Override
+ public void taskDeleteActionHandler() {
+ System.out.println(" ");
+ }
+ });
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/config/AtsBranchConfigurationTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/config/AtsBranchConfigurationTest.java
index 49cc098f71..2c647f1ae5 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/config/AtsBranchConfigurationTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/config/AtsBranchConfigurationTest.java
@@ -400,12 +400,12 @@ public class AtsBranchConfigurationTest {
public static void createBranch(String namespace, TeamWorkFlowArtifact teamWf) throws Exception {
String implementPageId = namespace + ".Implement";
- Result result = AtsBranchManager.createWorkingBranch(teamWf, implementPageId, false);
+ Result result = AtsBranchManagerCore.createWorkingBranch_Validate(teamWf);
if (result.isFalse()) {
AWorkbench.popup(result);
- AWorkbench.popup(result);
return;
}
+ AtsBranchManagerCore.createWorkingBranch_Create(teamWf);
TestUtil.sleep(4000);
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItemsTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItemsTest.java
index 21b6ba0bb8..19217728ff 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItemsTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItemsTest.java
@@ -7,8 +7,15 @@ package org.eclipse.osee.ats.util;
import junit.framework.Assert;
import org.eclipse.osee.ats.core.action.ActionArtifact;
+import org.eclipse.osee.framework.core.enums.DeletionFlag;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.support.test.util.TestUtil;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
/**
* Test for {@link CreateActionUsingAllActionableItems}
@@ -17,6 +24,18 @@ import org.eclipse.osee.support.test.util.TestUtil;
*/
public class CreateActionUsingAllActionableItemsTest {
+ @BeforeClass
+ @AfterClass
+ public static void cleanup() throws OseeCoreException {
+ SkynetTransaction transaction =
+ new SkynetTransaction(AtsUtil.getAtsBranch(), CreateActionUsingAllActionableItemsTest.class.getSimpleName());
+ for (Artifact art : ArtifactQuery.getArtifactListFromName("Big Action Test - Delete Me",
+ AtsUtil.getAtsBranchToken(), DeletionFlag.EXCLUDE_DELETED)) {
+ art.deleteAndPersist(transaction);
+ }
+ transaction.execute();
+ }
+
@org.junit.Test
public void test() throws Exception {
SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
diff --git a/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
index fd77e3bcce..f9d3d39ada 100644
--- a/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
@@ -67,6 +67,7 @@ Import-Package: com.google.inject,
javax.mail.internet,
org.eclipse.osee.ats.core.access,
org.eclipse.osee.ats.core.action,
+ org.eclipse.osee.ats.core.actions,
org.eclipse.osee.ats.core.artifact,
org.eclipse.osee.ats.core.branch,
org.eclipse.osee.ats.core.commit,
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AbstractAtsAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AbstractAtsAction.java
new file mode 100644
index 0000000000..a89366aaf8
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AbstractAtsAction.java
@@ -0,0 +1,49 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.framework.logging.OseeLevel;
+import org.eclipse.osee.framework.logging.OseeLog;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class AbstractAtsAction extends Action {
+
+ public AbstractAtsAction(String string, ImageDescriptor imageDescriptor) {
+ super(string, imageDescriptor);
+ }
+
+ public AbstractAtsAction(String string) {
+ super(string);
+ }
+
+ public AbstractAtsAction() {
+ super();
+ }
+
+ public AbstractAtsAction(String string, int asPushButton) {
+ super(string, asPushButton);
+ }
+
+ public void runWithException() throws Exception {
+ // provided for subclass implementation
+ }
+
+ @Override
+ public void run() {
+ try {
+ runWithException();
+ } catch (Exception ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AccessControlAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AccessControlAction.java
index 85a5d6ac45..6549446237 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AccessControlAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AccessControlAction.java
@@ -24,6 +24,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
public class AccessControlAction extends Action {
private final AbstractWorkflowArtifact sma;
+ private PolicyDialog dialog;
public AccessControlAction(AbstractWorkflowArtifact sma) {
super("Access Control");
@@ -31,10 +32,16 @@ public class AccessControlAction extends Action {
this.sma = sma;
}
+ public PolicyDialog getDialog() {
+ if (dialog == null) {
+ dialog = new PolicyDialog(Displays.getActiveShell(), sma);
+ }
+ return dialog;
+ }
+
@Override
public void run() {
- PolicyDialog dialog = new PolicyDialog(Displays.getActiveShell(), sma);
- dialog.open();
+ getDialog().open();
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AddNoteAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AddNoteAction.java
index 21867e4c9e..25cc5bb0fc 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AddNoteAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AddNoteAction.java
@@ -14,7 +14,6 @@ package org.eclipse.osee.ats.actions;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.osee.ats.AtsImage;
@@ -22,64 +21,82 @@ import org.eclipse.osee.ats.actions.wizard.NewNoteWizard;
import org.eclipse.osee.ats.core.workdef.StateDefinition;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.workflow.note.NoteType;
-import org.eclipse.osee.ats.editor.SMAEditor;
-import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.UserManager;
+import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.ui.PlatformUI;
/**
* @author Donald G. Dunne
*/
-public class AddNoteAction extends Action {
+public class AddNoteAction extends AbstractAtsAction {
private final AbstractWorkflowArtifact sma;
- private final SMAEditor editor;
+ private final IDirtiableEditor dirtiable;
+ private boolean emulate = false;
+ private String selectedState;
+ private NoteType noteType;
+ private String noteText;
- public AddNoteAction(AbstractWorkflowArtifact sma, SMAEditor editor) {
+ public AddNoteAction(AbstractWorkflowArtifact sma, IDirtiableEditor dirtiable) {
super();
this.sma = sma;
- this.editor = editor;
+ this.dirtiable = dirtiable;
setText("Add Note");
setToolTipText(getText());
}
@Override
- public void run() {
- performAddNote();
- }
+ public void runWithException() throws OseeCoreException {
+ ArrayList<String> artifactNames = new ArrayList<String>();
+ Map<String, String> selectedToStateName = new HashMap<String, String>();
+ artifactNames.add("Whole \"" + sma.getArtifactTypeName() + "\"");
+ for (StateDefinition stateDefinition : sma.getWorkDefinition().getStatesOrderedByDefaultToState()) {
+ String displayName = "\"" + stateDefinition.getPageName() + "\" State";
+ artifactNames.add(displayName);
+ selectedToStateName.put(displayName, stateDefinition.getPageName());
+ }
- private void performAddNote() {
- try {
- ArrayList<String> artifactNames = new ArrayList<String>();
- Map<String, String> selectedToStateName = new HashMap<String, String>();
- artifactNames.add("Whole \"" + sma.getArtifactTypeName() + "\"");
- for (StateDefinition stateDefinition : sma.getWorkDefinition().getStatesOrderedByDefaultToState()) {
- String displayName = "\"" + stateDefinition.getPageName() + "\" State";
- artifactNames.add(displayName);
- selectedToStateName.put(displayName, stateDefinition.getPageName());
+ if (emulate) {
+ boolean result = performEmulate();
+ if (!result) {
+ return;
}
- NewNoteWizard noteWizard = new NewNoteWizard(artifactNames);
- WizardDialog dialog =
- new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), noteWizard);
- dialog.create();
- if (dialog.open() == 0) {
- String selected = noteWizard.mainPage.artifactList.getSelected().iterator().next().getName();
- String state = "";
- if (!selected.startsWith(sma.getName() + " - ")) {
- state = selectedToStateName.get(selected);
- }
- sma.getNotes().addNote(
- NoteType.getType(noteWizard.mainPage.typeList.getSelected().iterator().next().getName()), state,
- noteWizard.mainPage.noteText.get(), UserManager.getUser());
- editor.onDirtied();
+ } else {
+ boolean result = performUi(artifactNames);
+ if (!result) {
+ return;
}
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
+ String state = "";
+ if (!selectedState.startsWith(sma.getName() + " - ")) {
+ state = selectedToStateName.get(selectedState);
+ }
+ sma.getNotes().addNote(noteType, state, noteText, UserManager.getUser());
+ dirtiable.onDirtied();
+ }
+
+ private boolean performEmulate() {
+ this.selectedState = "Endorse";
+ this.noteType = NoteType.Comment;
+ this.noteText = "this is the comment";
+ return true;
+ }
+
+ private boolean performUi(ArrayList<String> artifactNames) throws OseeArgumentException {
+ NewNoteWizard noteWizard = new NewNoteWizard(artifactNames);
+ WizardDialog dialog =
+ new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), noteWizard);
+ dialog.create();
+ if (dialog.open() == 0) {
+ selectedState = noteWizard.mainPage.artifactList.getSelected().iterator().next().getName();
+ noteType = NoteType.getType(noteWizard.mainPage.typeList.getSelected().iterator().next().getName());
+ noteText = noteWizard.mainPage.noteText.get();
+ return true;
+ }
+ return false;
}
@Override
@@ -87,4 +104,8 @@ public class AddNoteAction extends Action {
return ImageManager.getImageDescriptor(AtsImage.NEW_NOTE);
}
+ public void setEmulateUi(boolean emulate) {
+ this.emulate = emulate;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ConvertActionableItemsAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ConvertActionableItemsAction.java
index e2c7d88976..403c6617cd 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ConvertActionableItemsAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ConvertActionableItemsAction.java
@@ -20,6 +20,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.column.ActionableItemsColumn;
import org.eclipse.osee.ats.core.action.ActionArtifactRollup;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.core.config.ActionableItemArtifact;
import org.eclipse.osee.ats.core.config.TeamDefinitionArtifact;
import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/CopyActionDetailsAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/CopyActionDetailsAction.java
index 1ffb2cbc70..95a450af4d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/CopyActionDetailsAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/CopyActionDetailsAction.java
@@ -14,19 +14,8 @@ package org.eclipse.osee.ats.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.core.config.TeamDefinitionArtifact;
-import org.eclipse.osee.ats.core.task.TaskArtifact;
-import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.type.AtsArtifactTypes;
-import org.eclipse.osee.ats.core.type.AtsAttributeTypes;
+import org.eclipse.osee.ats.core.util.CopyActionDetails;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.workflow.ChangeTypeUtil;
-import org.eclipse.osee.ats.internal.Activator;
-import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.TextTransfer;
@@ -37,15 +26,14 @@ import org.eclipse.swt.dnd.Transfer;
*/
public class CopyActionDetailsAction extends Action {
- private static final String USE_DEVELOPER_CHANGE_TYPES = "UseDeveloperChangeTypes";
private Clipboard clipboard;
- private final AbstractWorkflowArtifact sma;
+ private final AbstractWorkflowArtifact awa;
- public CopyActionDetailsAction(AbstractWorkflowArtifact sma) {
+ public CopyActionDetailsAction(AbstractWorkflowArtifact awa) {
super();
- this.sma = sma;
+ this.awa = awa;
String title = "Copy";
- title = "Copy " + sma.getArtifactTypeName() + " details to clipboard";
+ title = "Copy " + awa.getArtifactTypeName() + " details to clipboard";
setText(title);
setToolTipText(getText());
}
@@ -54,66 +42,8 @@ public class CopyActionDetailsAction extends Action {
if (clipboard == null) {
this.clipboard = new Clipboard(null);
}
- try {
- String detailsStr = "";
- if (sma.getParentTeamWorkflow() != null) {
- TeamDefinitionArtifact teamDef = sma.getParentTeamWorkflow().getTeamDefinition();
- String formatStr = getFormatStr(teamDef);
- if (Strings.isValid(formatStr)) {
- detailsStr = formatStr;
- detailsStr = detailsStr.replaceAll("<hrid>", sma.getHumanReadableId());
- detailsStr = detailsStr.replaceAll("<name>", sma.getName());
- detailsStr = detailsStr.replaceAll("<artType>", sma.getArtifactTypeName());
- detailsStr = detailsStr.replaceAll("<changeType>", getChangeTypeOrObjectType(sma));
- }
- }
- if (!Strings.isValid(detailsStr)) {
- detailsStr =
- "\"" + sma.getArtifactTypeName() + "\" - " + sma.getHumanReadableId() + " - \"" + sma.getName() + "\"";
- }
- clipboard.setContents(new Object[] {detailsStr}, new Transfer[] {TextTransfer.getInstance()});
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
- }
-
- private String getChangeTypeOrObjectType(AbstractWorkflowArtifact awa) throws OseeCoreException {
- String result = "";
- if (awa instanceof TeamWorkFlowArtifact) {
- TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) awa;
- result = ChangeTypeUtil.getChangeTypeStr(sma);
- if (teamArt.getTeamDefinition().getAttributesToStringList(CoreAttributeTypes.StaticId).contains(
- USE_DEVELOPER_CHANGE_TYPES)) {
- if (result.equals("Improvement")) {
- result = "feature";
- } else if (result.equals("Problem")) {
- result = "bug";
- }
- }
- } else if (awa instanceof TaskArtifact) {
- result = "Task";
- } else if (awa.isOfType(AtsArtifactTypes.ReviewArtifact)) {
- result = "Review";
- } else if (awa.isOfType(AtsArtifactTypes.Goal)) {
- result = "Goal";
- }
- if (!Strings.isValid(result)) {
- result = "unknown";
- }
- return result;
- }
-
- private String getFormatStr(TeamDefinitionArtifact teamDef) throws OseeCoreException {
- if (teamDef != null) {
- String formatStr = teamDef.getSoleAttributeValue(AtsAttributeTypes.ActionDetailsFormat, "");
- if (Strings.isValid(formatStr)) {
- return formatStr;
- }
- if (teamDef.getParent() instanceof TeamDefinitionArtifact) {
- return getFormatStr((TeamDefinitionArtifact) teamDef.getParent());
- }
- }
- return null;
+ String detailsStr = new CopyActionDetails(awa).getDetailsString();
+ clipboard.setContents(new Object[] {detailsStr}, new Transfer[] {TextTransfer.getInstance()});
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DeletePurgeAtsArtifactsAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DeletePurgeAtsArtifactsAction.java
index 85fcf2f24b..cec0a1333a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DeletePurgeAtsArtifactsAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DeletePurgeAtsArtifactsAction.java
@@ -10,22 +10,20 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
-import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.util.AtsDeleteManager;
import org.eclipse.osee.ats.util.AtsDeleteManager.DeleteOption;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class DeletePurgeAtsArtifactsAction extends Action {
+public class DeletePurgeAtsArtifactsAction extends AbstractAtsAction {
private final ISelectedAtsArtifacts selectedAtsArtifacts;
+ private boolean prompt = true;
public DeletePurgeAtsArtifactsAction(ISelectedAtsArtifacts selectedAtsArtifacts) {
super("Delete/Purge Ats Artifact(s)", ImageManager.getImageDescriptor(FrameworkImage.ARTIFACT_EDITOR));
@@ -34,21 +32,12 @@ public class DeletePurgeAtsArtifactsAction extends Action {
}
@Override
- public void run() {
- try {
- AtsDeleteManager.handleDeletePurgeAtsObject(selectedAtsArtifacts.getSelectedSMAArtifacts(), false,
- DeleteOption.Prompt);
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
+ public void runWithException() throws OseeCoreException {
+ AtsDeleteManager.handleDeletePurgeAtsObject(selectedAtsArtifacts.getSelectedSMAArtifacts(), false,
+ (prompt ? DeleteOption.Prompt : null));
}
- public void updateEnablement() {
- try {
- setEnabled(!selectedAtsArtifacts.getSelectedSMAArtifacts().isEmpty());
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- setEnabled(false);
- }
+ public void setPrompt(boolean prompt) {
+ this.prompt = prompt;
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DirtyReportAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DirtyReportAction.java
index ab12765ea2..c58d17aeba 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DirtyReportAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DirtyReportAction.java
@@ -10,31 +10,30 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osee.ats.editor.SMAEditor;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.exception.OseeStateException;
import org.eclipse.osee.framework.core.util.Result;
-import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class DirtyReportAction extends Action {
+public class DirtyReportAction extends AbstractAtsAction {
- private final SMAEditor editor;
+ private final IDirtyReportable reportable;
- public DirtyReportAction(SMAEditor editor) {
+ public DirtyReportAction(IDirtyReportable reportable) {
super("Show Artifact Dirty Report");
- this.editor = editor;
+ this.reportable = reportable;
setToolTipText("Show what attribute or relation making editor dirty.");
}
@Override
- public void run() {
- Result result = editor.isDirtyResult();
- AWorkbench.popup("Dirty Report", result.isFalse() ? "Not Dirty" : "Dirty -> " + result.getText());
+ public void runWithException() throws OseeCoreException {
+ Result result = reportable.isDirtyResult();
+ throw new OseeStateException("Dirty Report", result.isFalse() ? "Not Dirty" : "Dirty -> " + result.getText());
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowAction.java
index 40be115341..1054f0011b 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowAction.java
@@ -12,11 +12,9 @@ package org.eclipse.osee.ats.actions;
import java.util.Collection;
import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.operation.DuplicateWorkflowBlam;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.skynet.blam.BlamEditor;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -29,21 +27,20 @@ public class DuplicateWorkflowAction extends Action {
private final Collection<TeamWorkFlowArtifact> teams;
public DuplicateWorkflowAction(Collection<TeamWorkFlowArtifact> teams) {
- super(
- teams.size() == 1 ? "Duplicate this \"" + teams.iterator().next().getArtifactTypeName() + "\" Workflow" : "Duplicate Workflows");
+ super("Duplicate Workflows");
this.teams = teams;
- setImageDescriptor(ImageManager.getImageDescriptor(FrameworkImage.DUPLICATE));
}
@Override
public void run() {
- try {
- DuplicateWorkflowBlam blamOperation = new DuplicateWorkflowBlam();
- blamOperation.setDefaultTeamWorkflows(teams);
- BlamEditor.edit(blamOperation);
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
+ DuplicateWorkflowBlam blamOperation = new DuplicateWorkflowBlam();
+ blamOperation.setDefaultTeamWorkflows(teams);
+ BlamEditor.edit(blamOperation);
+ }
+
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return ImageManager.getImageDescriptor(FrameworkImage.DUPLICATE);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorAction.java
index 69cd003a60..74b97e0519 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorAction.java
@@ -10,14 +10,16 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
+import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.operation.DuplicateWorkflowBlam;
-import org.eclipse.osee.ats.world.WorldEditor;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
+import org.eclipse.osee.framework.core.exception.OseeArgumentException;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.skynet.blam.BlamEditor;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -25,13 +27,13 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class DuplicateWorkflowViaWorldEditorAction extends Action {
+public class DuplicateWorkflowViaWorldEditorAction extends AbstractAtsAction {
- private final WorldEditor worldEditor;
+ private final ISelectedAtsArtifacts selectedAtsArtifacts;
- public DuplicateWorkflowViaWorldEditorAction(WorldEditor worldEditor) {
+ public DuplicateWorkflowViaWorldEditorAction(ISelectedAtsArtifacts selectedAtsArtifacts) {
super();
- this.worldEditor = worldEditor;
+ this.selectedAtsArtifacts = selectedAtsArtifacts;
setText("Duplicate Team Workflow");
}
@@ -40,19 +42,23 @@ public class DuplicateWorkflowViaWorldEditorAction extends Action {
return ImageManager.getImageDescriptor(FrameworkImage.DUPLICATE);
}
- @Override
- public void run() {
- if (worldEditor.getWorldComposite().getXViewer().getSelectedTeamWorkflowArtifacts().isEmpty()) {
- AWorkbench.popup("ERROR", "Must select one or more team workflows to duplicate");
- return;
- }
- try {
- DuplicateWorkflowBlam blamOperation = new DuplicateWorkflowBlam();
- blamOperation.setDefaultTeamWorkflows(worldEditor.getWorldComposite().getXViewer().getSelectedTeamWorkflowArtifacts());
- BlamEditor.edit(blamOperation);
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ private Collection<TeamWorkFlowArtifact> getSelectedTeamWorkflowArtifacts() throws OseeCoreException {
+ List<TeamWorkFlowArtifact> teams = new ArrayList<TeamWorkFlowArtifact>();
+ for (Artifact art : selectedAtsArtifacts.getSelectedSMAArtifacts()) {
+ if (art instanceof TeamWorkFlowArtifact) {
+ teams.add((TeamWorkFlowArtifact) art);
+ }
}
+ return teams;
}
+ @Override
+ public void runWithException() throws OseeCoreException {
+ if (getSelectedTeamWorkflowArtifacts().isEmpty()) {
+ throw new OseeArgumentException("Must select one or more team workflows to duplicate");
+ }
+ DuplicateWorkflowBlam blamOperation = new DuplicateWorkflowBlam();
+ blamOperation.setDefaultTeamWorkflows(getSelectedTeamWorkflowArtifacts());
+ BlamEditor.edit(blamOperation);
+ }
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditActionableItemsAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditActionableItemsAction.java
index 90477fd41b..ec26ecb926 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditActionableItemsAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditActionableItemsAction.java
@@ -10,21 +10,18 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.core.action.ActionArtifact;
import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.exception.OseeStateException;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class EditActionableItemsAction extends Action {
+public class EditActionableItemsAction extends AbstractAtsAction {
private final TeamWorkFlowArtifact teamWf;
@@ -35,17 +32,12 @@ public class EditActionableItemsAction extends Action {
}
@Override
- public void run() {
- try {
- ActionArtifact parentAction = teamWf.getParentActionArtifact();
- if (parentAction == null) {
- AWorkbench.popup("No Parent Action; Aborting");
- return;
- }
- AtsUtil.editActionableItems(parentAction);
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ public void runWithException() throws OseeCoreException {
+ ActionArtifact parentAction = teamWf.getParentActionArtifact();
+ if (parentAction == null) {
+ throw new OseeStateException("No Parent Action; Aborting");
}
+ AtsUtil.editActionableItems(parentAction);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditAssigneeAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditAssigneeAction.java
index 92f207aae3..aaa6b6d1b4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditAssigneeAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditAssigneeAction.java
@@ -11,22 +11,20 @@
package org.eclipse.osee.ats.actions;
import java.util.Collection;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.nebula.widgets.xviewer.XViewer;
import org.eclipse.osee.ats.column.AssigneeColumn;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class EditAssigneeAction extends Action {
+public class EditAssigneeAction extends AbstractAtsAction {
private final ISelectedAtsArtifacts selectedAtsArtifacts;
private final XViewer xViewer;
@@ -39,17 +37,13 @@ public class EditAssigneeAction extends Action {
}
@Override
- public void run() {
- try {
- Collection<AbstractWorkflowArtifact> smaArts =
- Collections.castMatching(AbstractWorkflowArtifact.class, selectedAtsArtifacts.getSelectedSMAArtifacts());
- if (AssigneeColumn.promptChangeAssignees(smaArts, true)) {
- if (xViewer != null) {
- xViewer.update(selectedAtsArtifacts.getSelectedSMAArtifacts().toArray(), null);
- }
+ public void runWithException() throws OseeCoreException {
+ Collection<AbstractWorkflowArtifact> smaArts =
+ Collections.castMatching(AbstractWorkflowArtifact.class, selectedAtsArtifacts.getSelectedSMAArtifacts());
+ if (AssigneeColumn.promptChangeAssignees(smaArts, true)) {
+ if (xViewer != null) {
+ xViewer.update(selectedAtsArtifacts.getSelectedSMAArtifacts().toArray(), null);
}
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditStatusAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditStatusAction.java
index 1e7ff83750..c98ac56b6e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditStatusAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EditStatusAction.java
@@ -11,15 +11,13 @@
package org.eclipse.osee.ats.actions;
import java.util.Collection;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.nebula.widgets.xviewer.XViewer;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.editor.SMAPromptChangeStatus;
-import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -27,7 +25,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class EditStatusAction extends Action {
+public class EditStatusAction extends AbstractAtsAction {
private final ISelectedAtsArtifacts selectedAtsArtifacts;
private final XViewer xViewer;
@@ -44,20 +42,16 @@ public class EditStatusAction extends Action {
}
@Override
- public void run() {
- try {
- Collection<AbstractWorkflowArtifact> smaArts =
- Collections.castMatching(AbstractWorkflowArtifact.class, selectedAtsArtifacts.getSelectedSMAArtifacts());
- if (SMAPromptChangeStatus.promptChangeStatus(smaArts, persist)) {
- if (xViewer != null) {
- xViewer.update(selectedAtsArtifacts.getSelectedSMAArtifacts().toArray(), null);
- }
- if (editor != null) {
- editor.onDirtied();
- }
+ public void runWithException() throws OseeCoreException {
+ Collection<AbstractWorkflowArtifact> smaArts =
+ Collections.castMatching(AbstractWorkflowArtifact.class, selectedAtsArtifacts.getSelectedSMAArtifacts());
+ if (SMAPromptChangeStatus.promptChangeStatus(smaArts, persist)) {
+ if (xViewer != null) {
+ xViewer.update(selectedAtsArtifacts.getSelectedSMAArtifacts().toArray(), null);
+ }
+ if (editor != null) {
+ editor.onDirtied();
}
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EmailActionAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EmailActionAction.java
index dbb07e93a7..303e69e2ee 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EmailActionAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/EmailActionAction.java
@@ -11,14 +11,13 @@
package org.eclipse.osee.ats.actions;
import java.util.logging.Level;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.notify.ArtifactEmailWizard;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.swt.Displays;
@@ -27,7 +26,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class EmailActionAction extends Action {
+public class EmailActionAction extends AbstractAtsAction {
private final ISelectedAtsArtifacts selectedAtsArtifacts;
@@ -52,12 +51,8 @@ public class EmailActionAction extends Action {
}
@Override
- public void run() {
- try {
- performEmail();
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
+ public void runWithException() throws OseeCoreException {
+ performEmail();
}
@Override
@@ -69,14 +64,4 @@ public class EmailActionAction extends Action {
setText("Email " + (selectedAtsArtifacts.getSelectedSMAArtifacts().size() == 1 ? selectedAtsArtifacts.getSelectedSMAArtifacts().iterator().next().getArtifactTypeName() : ""));
}
- public void updateEnablement() {
- try {
- setEnabled(selectedAtsArtifacts.getSelectedSMAArtifacts().size() == 1);
- updateName();
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- setEnabled(false);
- }
- }
-
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ExportChangeReportsAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ExportChangeReportsAction.java
deleted file mode 100644
index 4ae750cda1..0000000000
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ExportChangeReportsAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ats.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.jface.action.Action;
-import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.operation.ExportChangeReportOperation;
-import org.eclipse.osee.ats.world.WorldEditor;
-import org.eclipse.osee.framework.core.operation.IOperation;
-import org.eclipse.osee.framework.core.operation.Operations;
-import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-
-/**
- * @author Donald G. Dunne
- */
-public class ExportChangeReportsAction extends Action {
- private final WorldEditor worldEditor;
-
- public ExportChangeReportsAction(WorldEditor worldEditor) {
- super();
- setText("Export Change Report(s)");
- setImageDescriptor(ImageManager.getImageDescriptor(FrameworkImage.EXPORT_DATA));
- this.worldEditor = worldEditor;
- }
-
- public List<TeamWorkFlowArtifact> getWorkflows() {
- ArrayList<TeamWorkFlowArtifact> workflows = new ArrayList<TeamWorkFlowArtifact>();
- workflows.addAll(worldEditor.getWorldComposite().getXViewer().getSelectedTeamWorkflowArtifacts());
- return workflows;
- }
-
- @Override
- public void run() {
- IOperation operation = new ExportChangeReportOperation(getWorkflows(), false);
- Operations.executeAsJob(operation, true);
- }
-
- public void updateEnablement() {
- setEnabled(!getWorkflows().isEmpty());
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/FavoriteAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/FavoriteAction.java
index aa0bdd2382..b3458b6004 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/FavoriteAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/FavoriteAction.java
@@ -13,9 +13,9 @@ package org.eclipse.osee.ats.actions;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.util.FavoritesManager;
@@ -28,19 +28,21 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class FavoriteAction extends Action {
+public class FavoriteAction extends AbstractAtsAction {
private final ISelectedAtsArtifacts selectedAtsArtifacts;
+ private boolean prompt = true;
public FavoriteAction(ISelectedAtsArtifacts selectedAtsArtifacts) {
super();
this.selectedAtsArtifacts = selectedAtsArtifacts;
- updateName();
+ updateEnablement();
}
- private void updateName() {
+ public void updateEnablement() {
String title = "Favorite";
try {
+ setEnabled(getSelectedFavoritableArts().size() > 0);
if (getSelectedFavoritableArts().size() == 1) {
title =
FavoritesManager.amIFavorite(getSelectedFavoritableArts().iterator().next()) ? "Remove Favorite" : "Add as Favorite";
@@ -49,6 +51,7 @@ public class FavoriteAction extends Action {
}
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ setEnabled(false);
}
setText(title);
setToolTipText(title);
@@ -65,12 +68,8 @@ public class FavoriteAction extends Action {
}
@Override
- public void run() {
- try {
- new FavoritesManager(getSelectedFavoritableArts()).toggleFavorite();
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
+ public void runWithException() throws OseeCoreException {
+ new FavoritesManager(getSelectedFavoritableArts()).toggleFavorite(prompt);
}
@Override
@@ -78,13 +77,7 @@ public class FavoriteAction extends Action {
return ImageManager.getImageDescriptor(AtsImage.FAVORITE);
}
- public void updateEnablement() {
- try {
- setEnabled(getSelectedFavoritableArts().size() > 0);
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- setEnabled(false);
- }
- updateName();
+ public void setPrompt(boolean prompt) {
+ this.prompt = prompt;
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/IDirtyReportable.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/IDirtyReportable.java
new file mode 100644
index 0000000000..47267f417b
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/IDirtyReportable.java
@@ -0,0 +1,14 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.osee.framework.core.util.Result;
+
+public interface IDirtyReportable {
+
+ public Result isDirtyResult();
+
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportListener.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportListener.java
new file mode 100644
index 0000000000..195ea04013
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportListener.java
@@ -0,0 +1,11 @@
+/*
+ * Created on Oct 24, 2011
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.actions;
+
+public interface ImportListener {
+
+ public void importCompleted();
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportTasksViaSimpleList.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportTasksViaSimpleList.java
index 0ea98a072d..ccc7fe5517 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportTasksViaSimpleList.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportTasksViaSimpleList.java
@@ -10,26 +10,21 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.osee.ats.core.task.AbstractTaskableArtifact;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.operation.ImportTasksFromSimpleList;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.skynet.blam.BlamEditor;
import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.swt.widgets.Listener;
/**
* @author Donald G. Dunne
*/
-public class ImportTasksViaSimpleList extends Action {
+public class ImportTasksViaSimpleList extends AbstractAtsAction {
private final AbstractTaskableArtifact taskableArt;
- private final Listener listener;
+ private final ImportListener listener;
- public ImportTasksViaSimpleList(AbstractTaskableArtifact taskableArt, Listener listener) {
+ public ImportTasksViaSimpleList(AbstractTaskableArtifact taskableArt, ImportListener listener) {
super();
this.taskableArt = taskableArt;
this.listener = listener;
@@ -38,16 +33,12 @@ public class ImportTasksViaSimpleList extends Action {
}
@Override
- public void run() {
- try {
- ImportTasksFromSimpleList blamOperation = new ImportTasksFromSimpleList();
- blamOperation.setTaskableStateMachineArtifact(taskableArt);
- BlamEditor.edit(blamOperation);
- if (listener != null) {
- listener.notifyAll();
- }
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ public void runWithException() {
+ ImportTasksFromSimpleList blamOperation = new ImportTasksFromSimpleList();
+ blamOperation.setTaskableStateMachineArtifact(taskableArt);
+ BlamEditor.edit(blamOperation);
+ if (listener != null) {
+ listener.importCompleted();
}
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportTasksViaSpreadsheet.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportTasksViaSpreadsheet.java
index bd175dbe09..1d0651e782 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportTasksViaSpreadsheet.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ImportTasksViaSpreadsheet.java
@@ -10,26 +10,21 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.osee.ats.core.task.AbstractTaskableArtifact;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.operation.ImportTasksFromSpreadsheet;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.skynet.blam.BlamEditor;
import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.swt.widgets.Listener;
/**
* @author Donald G. Dunne
*/
-public class ImportTasksViaSpreadsheet extends Action {
+public class ImportTasksViaSpreadsheet extends AbstractAtsAction {
private final AbstractTaskableArtifact taskableArt;
- private final Listener listener;
+ private final ImportListener listener;
- public ImportTasksViaSpreadsheet(AbstractTaskableArtifact taskableArt, Listener listener) {
+ public ImportTasksViaSpreadsheet(AbstractTaskableArtifact taskableArt, ImportListener listener) {
super();
this.taskableArt = taskableArt;
this.listener = listener;
@@ -38,16 +33,12 @@ public class ImportTasksViaSpreadsheet extends Action {
}
@Override
- public void run() {
- try {
- ImportTasksFromSpreadsheet blamOperation = new ImportTasksFromSpreadsheet();
- blamOperation.setTaskableStateMachineArtifact(taskableArt);
- BlamEditor.edit(blamOperation);
- if (listener != null) {
- listener.notifyAll();
- }
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ public void runWithException() {
+ ImportTasksFromSpreadsheet blamOperation = new ImportTasksFromSpreadsheet();
+ blamOperation.setTaskableStateMachineArtifact(taskableArt);
+ BlamEditor.edit(blamOperation);
+ if (listener != null) {
+ listener.importCompleted();
}
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/MyFavoritesAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/MyFavoritesAction.java
index 84e22d9e8e..fd9da260f6 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/MyFavoritesAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/MyFavoritesAction.java
@@ -10,16 +10,12 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.world.WorldEditor;
import org.eclipse.osee.ats.world.WorldEditorUISearchItemProvider;
import org.eclipse.osee.ats.world.search.MyFavoritesSearchItem;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -27,7 +23,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class MyFavoritesAction extends Action {
+public class MyFavoritesAction extends AbstractAtsAction {
public MyFavoritesAction() {
super("My Favorites");
@@ -35,13 +31,9 @@ public class MyFavoritesAction extends Action {
}
@Override
- public void run() {
- try {
- WorldEditor.open(new WorldEditorUISearchItemProvider(new MyFavoritesSearchItem("My Favorites",
- UserManager.getUser()), null, TableLoadOption.None));
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
+ public void runWithException() throws OseeCoreException {
+ WorldEditor.open(new WorldEditorUISearchItemProvider(new MyFavoritesSearchItem("My Favorites",
+ UserManager.getUser()), null, TableLoadOption.None));
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/MyWorldAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/MyWorldAction.java
index c0734f5498..e5f2e482b6 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/MyWorldAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/MyWorldAction.java
@@ -10,16 +10,12 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.world.WorldEditor;
import org.eclipse.osee.ats.world.WorldEditorUISearchItemProvider;
import org.eclipse.osee.ats.world.search.MyWorldSearchItem;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -27,7 +23,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class MyWorldAction extends Action {
+public class MyWorldAction extends AbstractAtsAction {
public MyWorldAction() {
super("My World");
@@ -35,13 +31,9 @@ public class MyWorldAction extends Action {
}
@Override
- public void run() {
- try {
- WorldEditor.open(new WorldEditorUISearchItemProvider(new MyWorldSearchItem("My World", UserManager.getUser()),
- null, TableLoadOption.None));
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
+ public void runWithException() throws OseeCoreException {
+ WorldEditor.open(new WorldEditorUISearchItemProvider(new MyWorldSearchItem("My World", UserManager.getUser()),
+ null, TableLoadOption.None));
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewAction.java
index 5b0c22d863..46174ef12f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewAction.java
@@ -11,22 +11,18 @@
package org.eclipse.osee.ats.actions;
import java.util.Arrays;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.actions.wizard.NewActionWizard;
import org.eclipse.osee.ats.core.config.AtsBulkLoad;
import org.eclipse.osee.ats.core.workflow.ActionableItemManagerCore;
-import org.eclipse.osee.ats.internal.Activator;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.ui.PlatformUI;
/**
* @author Donald G. Dunne
*/
-public class NewAction extends Action {
+public class NewAction extends AbstractAtsAction {
private final String actionableItem;
private String initialDescription;
@@ -43,31 +39,18 @@ public class NewAction extends Action {
}
@Override
- public void run() {
- super.run();
+ public void runWithException() {
AtsBulkLoad.loadConfig(true);
NewActionWizard wizard = new NewActionWizard();
- try {
- if (actionableItem != null) {
- wizard.setInitialAias(ActionableItemManagerCore.getActionableItems(Arrays.asList(actionableItem)));
- }
- if (initialDescription != null) {
- wizard.setInitialDescription(initialDescription);
- }
- WizardDialog dialog =
- new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
- dialog.create();
- dialog.open();
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ if (actionableItem != null) {
+ wizard.setInitialAias(ActionableItemManagerCore.getActionableItems(Arrays.asList(actionableItem)));
}
- }
-
- /**
- * @return the initialDescription
- */
- public String getInitialDescription() {
- return initialDescription;
+ if (initialDescription != null) {
+ wizard.setInitialDescription(initialDescription);
+ }
+ WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
+ dialog.create();
+ dialog.open();
}
/**
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewGoal.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewGoal.java
index de8ceda459..6dc9cd2937 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewGoal.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewGoal.java
@@ -10,22 +10,22 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.artifact.GoalManager;
import org.eclipse.osee.ats.core.artifact.GoalArtifact;
import org.eclipse.osee.ats.core.config.AtsBulkLoad;
import org.eclipse.osee.ats.editor.SMAEditor;
-import org.eclipse.osee.ats.internal.Activator;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.ui.skynet.widgets.dialog.EntryDialog;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class NewGoal extends Action {
+public class NewGoal extends AbstractAtsAction {
+
+ public String titleOverride = null;
public NewGoal() {
super("Create New Goal");
@@ -34,20 +34,24 @@ public class NewGoal extends Action {
}
@Override
- public void run() {
- super.run();
+ public void runWithException() throws OseeCoreException {
AtsBulkLoad.loadConfig(true);
- try {
+ String title = titleOverride;
+ if (!Strings.isValid(title)) {
EntryDialog dialog = new EntryDialog("New Goal", "Enter Title");
if (dialog.open() == 0) {
- String title = dialog.getEntry();
- GoalArtifact goalArt = GoalManager.createGoal(title);
- goalArt.persist(getClass().getSimpleName());
- SMAEditor.editArtifact(goalArt);
+ title = dialog.getEntry();
}
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
+ if (Strings.isValid(title)) {
+ GoalArtifact goalArt = GoalManager.createGoal(title);
+ goalArt.persist(getClass().getSimpleName());
+ SMAEditor.editArtifact(goalArt);
+ }
+ }
+
+ public void setTitleOverride(String titleOverride) {
+ this.titleOverride = titleOverride;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenChangeReportByIdAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenChangeReportByIdAction.java
index d70eba0d81..07a2438435 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenChangeReportByIdAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenChangeReportByIdAction.java
@@ -16,6 +16,7 @@ import org.eclipse.osee.ats.util.AtsEditor;
import org.eclipse.osee.ats.world.search.MultipleHridSearchData;
import org.eclipse.osee.ats.world.search.MultipleHridSearchOperation;
import org.eclipse.osee.framework.core.operation.Operations;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -24,6 +25,8 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
*/
public class OpenChangeReportByIdAction extends Action {
+ private String overrideId = null;
+
public OpenChangeReportByIdAction() {
this("Open Change Report by ID(s)");
}
@@ -35,8 +38,11 @@ public class OpenChangeReportByIdAction extends Action {
@Override
public void run() {
- Operations.executeAsJob(new MultipleHridSearchOperation(new MultipleHridSearchData(getText(),
- AtsEditor.ChangeReport)), true);
+ MultipleHridSearchData data = new MultipleHridSearchData(getText(), AtsEditor.ChangeReport);
+ if (Strings.isValid(overrideId)) {
+ data.setEnteredIds(overrideId);
+ }
+ Operations.executeAsJob(new MultipleHridSearchOperation(data), true);
}
@Override
@@ -44,4 +50,8 @@ public class OpenChangeReportByIdAction extends Action {
return ImageManager.getImageDescriptor(FrameworkImage.BRANCH_CHANGE);
}
+ public void setOverrideId(String overrideId) {
+ this.overrideId = overrideId;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInArtifactEditorAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInArtifactEditorAction.java
index ac43f8b25d..e861a82692 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInArtifactEditorAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInArtifactEditorAction.java
@@ -10,12 +10,9 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
@@ -25,7 +22,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class OpenInArtifactEditorAction extends Action {
+public class OpenInArtifactEditorAction extends AbstractAtsAction {
private final ISelectedAtsArtifacts selectedAtsArtifacts;
@@ -37,13 +34,9 @@ public class OpenInArtifactEditorAction extends Action {
}
@Override
- public void run() {
- try {
- for (Artifact art : selectedAtsArtifacts.getSelectedSMAArtifacts()) {
- RendererManager.open(art, PresentationType.GENERALIZED_EDIT);
- }
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ public void runWithException() throws OseeCoreException {
+ for (Artifact art : selectedAtsArtifacts.getSelectedSMAArtifacts()) {
+ RendererManager.open(art, PresentationType.GENERALIZED_EDIT);
}
}
@@ -52,13 +45,4 @@ public class OpenInArtifactEditorAction extends Action {
return ImageManager.getImageDescriptor(FrameworkImage.ARTIFACT_EDITOR);
}
- public void updateEnablement() {
- try {
- setEnabled(selectedAtsArtifacts.getSelectedSMAArtifacts().size() > 0);
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- setEnabled(false);
- }
- }
-
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInAtsWorkflowEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInAtsWorkflowEditorAction.java
index 6962f88ba2..09d23cdca8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInAtsWorkflowEditor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInAtsWorkflowEditorAction.java
@@ -10,14 +10,11 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsOpenOption;
-import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -25,42 +22,25 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class OpenInAtsWorkflowEditor extends Action {
+public class OpenInAtsWorkflowEditorAction extends AbstractAtsAction {
private final ISelectedAtsArtifacts selectedAtsArtifacts;
- public OpenInAtsWorkflowEditor(String name, ISelectedAtsArtifacts selectedAtsArtifacts) {
+ public OpenInAtsWorkflowEditorAction(String name, ISelectedAtsArtifacts selectedAtsArtifacts) {
super();
this.selectedAtsArtifacts = selectedAtsArtifacts;
setText(name);
}
- public OpenInAtsWorkflowEditor(ISelectedAtsArtifacts selectedAtsArtifacts) {
+ public OpenInAtsWorkflowEditorAction(ISelectedAtsArtifacts selectedAtsArtifacts) {
this("Open in ATS Workflow Editor", selectedAtsArtifacts);
}
- public void performOpen() {
- try {
- for (Artifact art : selectedAtsArtifacts.getSelectedSMAArtifacts()) {
- AtsUtil.openATSAction(art, AtsOpenOption.OpenAll);
- }
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
- }
-
- public void updateEnablement() {
- try {
- setEnabled(selectedAtsArtifacts.getSelectedSMAArtifacts().size() > 0);
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- setEnabled(false);
- }
- }
-
@Override
- public void run() {
- performOpen();
+ public void runWithException() throws OseeCoreException {
+ for (Artifact art : selectedAtsArtifacts.getSelectedSMAArtifacts()) {
+ AtsUtil.openATSAction(art, AtsOpenOption.OpenAll);
+ }
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInAtsWorldAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInAtsWorldAction.java
index a2c0f0bf53..abc2e65d08 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInAtsWorldAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenInAtsWorldAction.java
@@ -11,25 +11,21 @@
package org.eclipse.osee.ats.actions;
import java.util.Arrays;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.world.WorldEditor;
import org.eclipse.osee.ats.world.WorldEditorSimpleProvider;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.core.exception.OseeStateException;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class OpenInAtsWorldAction extends Action {
+public class OpenInAtsWorldAction extends AbstractAtsAction {
private final AbstractWorkflowArtifact sma;
@@ -39,36 +35,27 @@ public class OpenInAtsWorldAction extends Action {
setText("Open in ATS World Editor");
}
- public void performOpen() {
- try {
- if (sma.isTeamWorkflow()) {
- Artifact actionArt = ((TeamWorkFlowArtifact) sma).getParentActionArtifact();
- if (actionArt != null) {
- WorldEditor.open(new WorldEditorSimpleProvider("Action " + actionArt.getHumanReadableId(),
- Arrays.asList(actionArt)));
- } else {
- AWorkbench.popup("No Parent Action; Opening Team Workflow");
- WorldEditor.open(new WorldEditorSimpleProvider(
- sma.getArtifactTypeName() + " " + sma.getHumanReadableId(), Arrays.asList(sma)));
- return;
- }
- return;
+ @Override
+ public void runWithException() throws OseeCoreException {
+ if (sma.isTeamWorkflow()) {
+ Artifact actionArt = ((TeamWorkFlowArtifact) sma).getParentActionArtifact();
+ if (actionArt != null) {
+ WorldEditor.open(new WorldEditorSimpleProvider("Action " + actionArt.getHumanReadableId(),
+ Arrays.asList(actionArt)));
} else {
- WorldEditor.open(new WorldEditorSimpleProvider(sma.getArtifactTypeName() + ": " + sma.getHumanReadableId(),
+ WorldEditor.open(new WorldEditorSimpleProvider(sma.getArtifactTypeName() + " " + sma.getHumanReadableId(),
Arrays.asList(sma)));
- return;
+ throw new OseeStateException("No Parent Action; Opening Team Workflow");
}
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ return;
+ } else {
+ WorldEditor.open(new WorldEditorSimpleProvider(sma.getArtifactTypeName() + ": " + sma.getHumanReadableId(),
+ Arrays.asList(sma)));
+ return;
}
}
@Override
- public void run() {
- performOpen();
- }
-
- @Override
public ImageDescriptor getImageDescriptor() {
return ImageManager.getImageDescriptor(AtsImage.GLOBE);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorAction.java
index 9849e223f1..4604dc52d0 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorAction.java
@@ -10,22 +10,18 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.nebula.widgets.xviewer.customize.CustomizeData;
import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.task.ITaskEditorProvider;
import org.eclipse.osee.ats.task.TaskEditor;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class OpenNewAtsTaskEditorAction extends Action {
+public class OpenNewAtsTaskEditorAction extends AbstractAtsAction {
private final IOpenNewAtsTaskEditorHandler openNewAtsTaskEditorHandler;
@@ -43,15 +39,11 @@ public class OpenNewAtsTaskEditorAction extends Action {
}
@Override
- public void run() {
- try {
- ITaskEditorProvider provider = openNewAtsTaskEditorHandler.getTaskEditorProviderCopy();
- provider.setCustomizeData(openNewAtsTaskEditorHandler.getCustomizeDataCopy());
- provider.setTableLoadOptions(TableLoadOption.NoUI);
- TaskEditor.open(provider);
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
+ public void runWithException() throws OseeCoreException {
+ ITaskEditorProvider provider = openNewAtsTaskEditorHandler.getTaskEditorProviderCopy();
+ provider.setCustomizeData(openNewAtsTaskEditorHandler.getCustomizeDataCopy());
+ provider.setTableLoadOptions(TableLoadOption.NoUI);
+ TaskEditor.open(provider);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorSelected.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorSelected.java
index 3c718fd890..6a8086606c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorSelected.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsTaskEditorSelected.java
@@ -11,15 +11,11 @@
package org.eclipse.osee.ats.actions;
import java.util.List;
-import org.eclipse.jface.action.Action;
import org.eclipse.nebula.widgets.xviewer.customize.CustomizeData;
import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.task.TaskEditor;
import org.eclipse.osee.ats.task.TaskEditorSimpleProvider;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -27,7 +23,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class OpenNewAtsTaskEditorSelected extends Action {
+public class OpenNewAtsTaskEditorSelected extends AbstractAtsAction {
private final IOpenNewAtsTaskEditorSelectedHandler openNewAtsTaskEditorSelectedHandler;
@@ -45,18 +41,13 @@ public class OpenNewAtsTaskEditorSelected extends Action {
}
@Override
- public void run() {
- try {
- if (openNewAtsTaskEditorSelectedHandler.getSelectedArtifacts().isEmpty()) {
- AWorkbench.popup("ERROR", "Select items to open");
- return;
- }
- TaskEditor.open(new TaskEditorSimpleProvider("Tasks",
- openNewAtsTaskEditorSelectedHandler.getSelectedArtifacts(),
- openNewAtsTaskEditorSelectedHandler.getCustomizeDataCopy()));
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ public void runWithException() throws OseeCoreException {
+ if (openNewAtsTaskEditorSelectedHandler.getSelectedArtifacts().isEmpty()) {
+ AWorkbench.popup("ERROR", "Select items to open");
+ return;
}
+ TaskEditor.open(new TaskEditorSimpleProvider("Tasks", openNewAtsTaskEditorSelectedHandler.getSelectedArtifacts(),
+ openNewAtsTaskEditorSelectedHandler.getCustomizeDataCopy()));
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorAction.java
index baacd5f75c..e3b204b64d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorAction.java
@@ -10,22 +10,18 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.nebula.widgets.xviewer.customize.CustomizeData;
import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.world.IWorldEditorProvider;
import org.eclipse.osee.ats.world.WorldEditor;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class OpenNewAtsWorldEditorAction extends Action {
+public class OpenNewAtsWorldEditorAction extends AbstractAtsAction {
private final IOpenNewAtsWorldEditorHandler openNewAtsWorldEditorHandler;
@@ -43,15 +39,11 @@ public class OpenNewAtsWorldEditorAction extends Action {
}
@Override
- public void run() {
- try {
- IWorldEditorProvider provider = openNewAtsWorldEditorHandler.getWorldEditorProviderCopy();
- provider.setCustomizeData(openNewAtsWorldEditorHandler.getCustomizeDataCopy());
- provider.setTableLoadOptions(TableLoadOption.NoUI);
- WorldEditor.open(provider);
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
+ public void runWithException() throws OseeCoreException {
+ IWorldEditorProvider provider = openNewAtsWorldEditorHandler.getWorldEditorProviderCopy();
+ provider.setCustomizeData(openNewAtsWorldEditorHandler.getCustomizeDataCopy());
+ provider.setTableLoadOptions(TableLoadOption.NoUI);
+ WorldEditor.open(provider);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorSelectedAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorSelectedAction.java
index 9bbea424b9..9e0572b6fe 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorSelectedAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenNewAtsWorldEditorSelectedAction.java
@@ -11,15 +11,11 @@
package org.eclipse.osee.ats.actions;
import java.util.List;
-import org.eclipse.jface.action.Action;
import org.eclipse.nebula.widgets.xviewer.customize.CustomizeData;
import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.world.WorldEditor;
import org.eclipse.osee.ats.world.WorldEditorSimpleProvider;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -27,7 +23,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class OpenNewAtsWorldEditorSelectedAction extends Action {
+public class OpenNewAtsWorldEditorSelectedAction extends AbstractAtsAction {
private final IOpenNewAtsWorldEditorSelectedHandler openNewAtsWorldEditorSelectedHandler;
@@ -45,18 +41,14 @@ public class OpenNewAtsWorldEditorSelectedAction extends Action {
}
@Override
- public void run() {
- try {
- if (openNewAtsWorldEditorSelectedHandler.getSelectedArtifacts().isEmpty()) {
- AWorkbench.popup("ERROR", "Select items to open");
- return;
- }
- WorldEditor.open(new WorldEditorSimpleProvider("ATS World",
- openNewAtsWorldEditorSelectedHandler.getSelectedArtifacts(),
- openNewAtsWorldEditorSelectedHandler.getCustomizeDataCopy()));
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ public void runWithException() throws OseeCoreException {
+ if (openNewAtsWorldEditorSelectedHandler.getSelectedArtifacts().isEmpty()) {
+ AWorkbench.popup("ERROR", "Select items to open");
+ return;
}
+ WorldEditor.open(new WorldEditorSimpleProvider("ATS World",
+ openNewAtsWorldEditorSelectedHandler.getSelectedArtifacts(),
+ openNewAtsWorldEditorSelectedHandler.getCustomizeDataCopy()));
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenParentAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenParentAction.java
index 6cc8b2c547..57afe96005 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenParentAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenParentAction.java
@@ -10,22 +10,18 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import java.util.logging.Level;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.AtsOpenOption;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class OpenParentAction extends Action {
+public class OpenParentAction extends AbstractAtsAction {
private final AbstractWorkflowArtifact sma;
@@ -37,12 +33,8 @@ public class OpenParentAction extends Action {
}
@Override
- public void run() {
- try {
- AtsUtil.openATSAction(sma.getParentAWA(), AtsOpenOption.OpenOneOrPopupSelect);
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- }
+ public void runWithException() throws OseeCoreException {
+ AtsUtil.openATSAction(sma.getParentAWA(), AtsOpenOption.OpenOneOrPopupSelect);
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenTeamDefinitionAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenTeamDefinitionAction.java
index 0df3205c9d..158cfa1cdd 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenTeamDefinitionAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenTeamDefinitionAction.java
@@ -11,21 +11,18 @@
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.AtsOpenOption;
import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class OpenTeamDefinitionAction extends Action {
+public class OpenTeamDefinitionAction extends AbstractAtsAction {
private final TeamWorkFlowArtifact teamArt;
@@ -36,19 +33,11 @@ public class OpenTeamDefinitionAction extends Action {
setToolTipText(getText());
}
- private void performOpen() {
- try {
- if (teamArt.getTeamDefinition() != null) {
- AtsUtil.openATSAction(teamArt.getTeamDefinition(), AtsOpenOption.OpenOneOrPopupSelect);
- }
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
- }
-
@Override
- public void run() {
- performOpen();
+ public void runWithException() throws OseeCoreException {
+ if (teamArt.getTeamDefinition() != null) {
+ AtsUtil.openATSAction(teamArt.getTeamDefinition(), AtsOpenOption.OpenOneOrPopupSelect);
+ }
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenVersionArtifactAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenVersionArtifactAction.java
index d9d0b2584b..abffa909d6 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenVersionArtifactAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenVersionArtifactAction.java
@@ -10,12 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import java.util.logging.Level;
-import org.eclipse.jface.action.Action;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
import org.eclipse.osee.framework.ui.skynet.render.RendererManager;
@@ -24,7 +20,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class OpenVersionArtifactAction extends Action {
+public class OpenVersionArtifactAction extends AbstractAtsAction {
private static final String ACTION_TEXT = "Open Targeted for Version";
private final AbstractWorkflowArtifact sma;
@@ -36,13 +32,9 @@ public class OpenVersionArtifactAction extends Action {
}
@Override
- public void run() {
- try {
- if (sma.getTargetedVersion() != null) {
- RendererManager.open(sma.getTargetedVersion(), PresentationType.DEFAULT_OPEN);
- }
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
+ public void runWithException() throws OseeCoreException {
+ if (sma.getTargetedVersion() != null) {
+ RendererManager.open(sma.getTargetedVersion(), PresentationType.DEFAULT_OPEN);
}
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenWorkflowByIdAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenWorkflowByIdAction.java
index 2c01e01171..a63d323a40 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenWorkflowByIdAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenWorkflowByIdAction.java
@@ -17,6 +17,7 @@ import org.eclipse.osee.ats.util.AtsEditor;
import org.eclipse.osee.ats.world.search.MultipleHridSearchData;
import org.eclipse.osee.ats.world.search.MultipleHridSearchOperation;
import org.eclipse.osee.framework.core.operation.Operations;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
@@ -24,6 +25,8 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
*/
public class OpenWorkflowByIdAction extends Action {
+ private String overrideId = null;
+
public OpenWorkflowByIdAction() {
super("Open Workflow Editor by ID(s)");
setToolTipText(getText());
@@ -31,8 +34,11 @@ public class OpenWorkflowByIdAction extends Action {
@Override
public void run() {
- Operations.executeAsJob(new MultipleHridSearchOperation(new MultipleHridSearchData(getText(),
- AtsEditor.WorkflowEditor)), true);
+ MultipleHridSearchData data = new MultipleHridSearchData(getText(), AtsEditor.WorkflowEditor);
+ if (Strings.isValid(overrideId)) {
+ data.setEnteredIds(overrideId);
+ }
+ Operations.executeAsJob(new MultipleHridSearchOperation(data), true);
}
@Override
@@ -40,4 +46,8 @@ public class OpenWorkflowByIdAction extends Action {
return ImageManager.getImageDescriptor(AtsImage.TEAM_WORKFLOW);
}
+ public void setOverrideId(String overrideId) {
+ this.overrideId = overrideId;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenWorldByIdAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenWorldByIdAction.java
index fb080ee4f3..8cecc628cf 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenWorldByIdAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenWorldByIdAction.java
@@ -17,6 +17,7 @@ import org.eclipse.osee.ats.util.AtsEditor;
import org.eclipse.osee.ats.world.search.MultipleHridSearchData;
import org.eclipse.osee.ats.world.search.MultipleHridSearchOperation;
import org.eclipse.osee.framework.core.operation.Operations;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
@@ -24,6 +25,8 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
*/
public class OpenWorldByIdAction extends Action {
+ public String overrideId = null;
+
public OpenWorldByIdAction() {
super("Open World Editor by ID(s)");
setToolTipText(getText());
@@ -31,8 +34,11 @@ public class OpenWorldByIdAction extends Action {
@Override
public void run() {
- Operations.executeAsJob(new MultipleHridSearchOperation(new MultipleHridSearchData(getText(),
- AtsEditor.WorldEditor)), true);
+ MultipleHridSearchData data = new MultipleHridSearchData(getText(), AtsEditor.WorldEditor);
+ if (Strings.isValid(overrideId)) {
+ data.setEnteredIds(overrideId);
+ }
+ Operations.executeAsJob(new MultipleHridSearchOperation(data), true);
}
@Override
@@ -40,4 +46,8 @@ public class OpenWorldByIdAction extends Action {
return ImageManager.getImageDescriptor(AtsImage.OPEN_BY_ID);
}
+ public void setOverrideIdString(String enteredIdString) {
+ this.overrideId = enteredIdString;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/PrivilegedEditAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/PrivilegedEditAction.java
index 85b28089e7..e58cb6ebc9 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/PrivilegedEditAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/PrivilegedEditAction.java
@@ -12,20 +12,16 @@
package org.eclipse.osee.ats.actions;
import java.util.Set;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.editor.SMAEditor;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.util.PriviledgedUserManager;
import org.eclipse.osee.ats.util.ReadOnlyHyperlinkListener;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.IBasicUser;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -33,7 +29,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class PrivilegedEditAction extends Action {
+public class PrivilegedEditAction extends AbstractAtsAction {
private final AbstractWorkflowArtifact sma;
private final SMAEditor editor;
@@ -47,51 +43,43 @@ public class PrivilegedEditAction extends Action {
}
@Override
- public void run() {
- togglePriviledgedEdit();
- }
-
- private void togglePriviledgedEdit() {
- try {
- if (sma.isReadOnly()) {
- new ReadOnlyHyperlinkListener(sma).linkActivated(null);
+ public void runWithException() throws OseeCoreException {
+ if (sma.isReadOnly()) {
+ new ReadOnlyHyperlinkListener(sma).linkActivated(null);
+ }
+ if (editor.isPriviledgedEditModeEnabled()) {
+ if (MessageDialog.openQuestion(Displays.getActiveShell(), "Diable Privileged Edit",
+ "Privileged Edit Mode Enabled.\n\nDisable?\n\nNote: (changes will be saved)")) {
+ editor.setPriviledgedEditMode(false);
}
- if (editor.isPriviledgedEditModeEnabled()) {
- if (MessageDialog.openQuestion(Displays.getActiveShell(), "Diable Privileged Edit",
- "Privileged Edit Mode Enabled.\n\nDisable?\n\nNote: (changes will be saved)")) {
- editor.setPriviledgedEditMode(false);
- }
+ } else {
+ Set<IBasicUser> users = PriviledgedUserManager.getPrivilegedUsers(sma);
+ if (AtsUtilCore.isAtsAdmin()) {
+ users.add(UserManager.getUser());
+ }
+ StringBuffer stringBuffer = new StringBuffer();
+ for (IBasicUser user : users) {
+ stringBuffer.append(user.getName());
+ stringBuffer.append("\n");
+ }
+ String buttons[];
+ boolean iAmPrivileged = users.contains(UserManager.getUser());
+ if (iAmPrivileged) {
+ buttons = new String[] {"Override and Edit", "Cancel"};
} else {
- Set<IBasicUser> users = PriviledgedUserManager.getPrivilegedUsers(sma);
- if (AtsUtilCore.isAtsAdmin()) {
- users.add(UserManager.getUser());
- }
- StringBuffer stringBuffer = new StringBuffer();
- for (IBasicUser user : users) {
- stringBuffer.append(user.getName());
- stringBuffer.append("\n");
- }
- String buttons[];
- boolean iAmPrivileged = users.contains(UserManager.getUser());
- if (iAmPrivileged) {
- buttons = new String[] {"Override and Edit", "Cancel"};
- } else {
- buttons = new String[] {"Cancel"};
- }
- MessageDialog dialog =
- new MessageDialog(
- Displays.getActiveShell(),
- "Privileged Edit",
- null,
- "The following users have the ability to edit this " + sma.getArtifactTypeName() + " in case of emergency.\n\n" + stringBuffer.toString(),
- MessageDialog.QUESTION, buttons, 0);
- int result = dialog.open();
- if (iAmPrivileged && result == 0) {
- editor.setPriviledgedEditMode(true);
- }
+ buttons = new String[] {"Cancel"};
+ }
+ MessageDialog dialog =
+ new MessageDialog(
+ Displays.getActiveShell(),
+ "Privileged Edit",
+ null,
+ "The following users have the ability to edit this " + sma.getArtifactTypeName() + " in case of emergency.\n\n" + stringBuffer.toString(),
+ MessageDialog.QUESTION, buttons, 0);
+ int result = dialog.open();
+ if (iAmPrivileged && result == 0) {
+ editor.setPriviledgedEditMode(true);
}
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/RefreshDirtyAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/RefreshDirtyAction.java
index f932070fad..f38d165ae8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/RefreshDirtyAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/RefreshDirtyAction.java
@@ -12,8 +12,8 @@ package org.eclipse.osee.ats.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osee.ats.editor.SMAEditor;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
+import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
@@ -21,17 +21,17 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
*/
public class RefreshDirtyAction extends Action {
- private final SMAEditor edtior;
+ private final IDirtiableEditor dirtiable;
- public RefreshDirtyAction(SMAEditor edtior) {
+ public RefreshDirtyAction(IDirtiableEditor dirtiable) {
super("Refresh Editor Dirty");
- this.edtior = edtior;
+ this.dirtiable = dirtiable;
setToolTipText(getText());
}
@Override
public void run() {
- edtior.onDirtied();
+ dirtiable.onDirtied();
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ReloadAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ReloadAction.java
index 928c431978..610c3ad990 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ReloadAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ReloadAction.java
@@ -12,16 +12,12 @@ package org.eclipse.osee.ats.actions;
import java.util.HashSet;
import java.util.Set;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.core.review.ReviewManager;
import org.eclipse.osee.ats.core.task.AbstractTaskableArtifact;
import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
@@ -30,7 +26,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class ReloadAction extends Action {
+public class ReloadAction extends AbstractAtsAction {
private final AbstractWorkflowArtifact sma;
@@ -43,21 +39,17 @@ public class ReloadAction extends Action {
}
@Override
- public void run() {
- try {
- Set<Artifact> relatedArts = new HashSet<Artifact>();
- relatedArts.add(sma);
- if (sma.isTeamWorkflow()) {
- relatedArts.addAll(ReviewManager.getReviews((TeamWorkFlowArtifact) sma));
- }
- if (sma instanceof AbstractTaskableArtifact) {
- relatedArts.addAll(((AbstractTaskableArtifact) sma).getTaskArtifacts());
- }
- ArtifactQuery.reloadArtifacts(relatedArts);
- // Don't need to re-open editor cause event handler will do that
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ public void runWithException() throws OseeCoreException {
+ Set<Artifact> relatedArts = new HashSet<Artifact>();
+ relatedArts.add(sma);
+ if (sma.isTeamWorkflow()) {
+ relatedArts.addAll(ReviewManager.getReviews((TeamWorkFlowArtifact) sma));
}
+ if (sma instanceof AbstractTaskableArtifact) {
+ relatedArts.addAll(((AbstractTaskableArtifact) sma).getTaskArtifacts());
+ }
+ ArtifactQuery.reloadArtifacts(relatedArts);
+ // Don't need to re-open editor cause event handler will do that
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ResourceHistoryAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ResourceHistoryAction.java
index 6169719dda..2479e955a2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ResourceHistoryAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ResourceHistoryAction.java
@@ -10,13 +10,9 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.internal.Activator;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.skynet.widgets.xHistory.HistoryView;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -24,7 +20,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class ResourceHistoryAction extends Action {
+public class ResourceHistoryAction extends AbstractAtsAction {
private final AbstractWorkflowArtifact sma;
@@ -35,12 +31,8 @@ public class ResourceHistoryAction extends Action {
}
@Override
- public void run() {
- try {
- HistoryView.open(sma);
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
+ public void runWithException() throws OseeArgumentException {
+ HistoryView.open(sma);
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ShowBranchChangeDataAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ShowBranchChangeDataAction.java
index 281c32ca1f..349be0d09e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ShowBranchChangeDataAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ShowBranchChangeDataAction.java
@@ -10,19 +10,15 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.core.branch.AtsBranchManagerCore;
import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.type.AtsArtifactTypes;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.util.AtsBranchManager;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.util.XResultData;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.change.Change;
import org.eclipse.osee.framework.skynet.core.revision.ChangeData;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
@@ -32,7 +28,7 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class ShowBranchChangeDataAction extends Action {
+public class ShowBranchChangeDataAction extends AbstractAtsAction {
private final AbstractWorkflowArtifact awa;
@@ -43,27 +39,23 @@ public class ShowBranchChangeDataAction extends Action {
}
@Override
- public void run() {
- try {
- if (!(awa.isOfType(AtsArtifactTypes.TeamWorkflow))) {
- AWorkbench.popup("Only valid for Team Workflow artifacts");
- return;
- }
- TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) awa;
- if (!AtsBranchManagerCore.isWorkingBranchInWork(teamArt) && !AtsBranchManagerCore.isWorkingBranchEverCommitted(teamArt)) {
- AWorkbench.popup("Working branch never created or committed.");
- return;
- }
- XResultData result = new XResultData();
- ChangeData changeData = AtsBranchManager.getChangeDataFromEarliestTransactionId(teamArt);
- result.log("Number of changes " + changeData.getChanges().size() + "\n");
- for (Change change : changeData.getChanges()) {
- result.log(String.format("Change [%s]", change));
- }
- XResultDataUI.report(result, String.format("Branch Change Data Report [%s]", awa));
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ public void runWithException() throws OseeCoreException {
+ if (!(awa.isOfType(AtsArtifactTypes.TeamWorkflow))) {
+ AWorkbench.popup("Only valid for Team Workflow artifacts");
+ return;
}
+ TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) awa;
+ if (!AtsBranchManagerCore.isWorkingBranchInWork(teamArt) && !AtsBranchManagerCore.isWorkingBranchEverCommitted(teamArt)) {
+ AWorkbench.popup("Working branch never created or committed.");
+ return;
+ }
+ XResultData result = new XResultData();
+ ChangeData changeData = AtsBranchManager.getChangeDataFromEarliestTransactionId(teamArt);
+ result.log("Number of changes " + changeData.getChanges().size() + "\n");
+ for (Change change : changeData.getChanges()) {
+ result.log(String.format("Change [%s]", change));
+ }
+ XResultDataUI.report(result, String.format("Branch Change Data Report [%s]", awa));
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ShowWorkDefinitionAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ShowWorkDefinitionAction.java
index 83359b7479..3fae2ad595 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ShowWorkDefinitionAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ShowWorkDefinitionAction.java
@@ -10,21 +10,16 @@
*******************************************************************************/
package org.eclipse.osee.ats.actions;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.internal.Activator;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
/**
* @author Donald G. Dunne
*/
-public class ShowWorkDefinitionAction extends Action {
+public class ShowWorkDefinitionAction extends AbstractAtsAction {
public ShowWorkDefinitionAction() {
super();
@@ -33,13 +28,9 @@ public class ShowWorkDefinitionAction extends Action {
}
@Override
- public void run() {
+ public void runWithException() throws Exception {
IWorkbenchPage page = AWorkbench.getActivePage();
- try {
- page.showView("org.eclipse.ui.views.ContentOutline", null, IWorkbenchPage.VIEW_ACTIVATE);
- } catch (PartInitException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
+ page.showView("org.eclipse.ui.views.ContentOutline", null, IWorkbenchPage.VIEW_ACTIVATE);
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/SubscribedAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/SubscribedAction.java
index aacd1edf7b..4a77b682d4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/SubscribedAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/SubscribedAction.java
@@ -13,9 +13,9 @@ package org.eclipse.osee.ats.actions;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.core.util.SubscribeManager;
import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.internal.Activator;
@@ -29,19 +29,21 @@ import org.eclipse.osee.framework.ui.swt.ImageManager;
/**
* @author Donald G. Dunne
*/
-public class SubscribedAction extends Action {
+public class SubscribedAction extends AbstractAtsAction {
private final ISelectedAtsArtifacts selectedAtsArtifacts;
+ private boolean prompt = true;
public SubscribedAction(ISelectedAtsArtifacts selectedAtsArtifacts) {
super();
this.selectedAtsArtifacts = selectedAtsArtifacts;
- updateName();
+ updateEnablement();
}
- private void updateName() {
+ public void updateEnablement() {
String title = "Subscribed";
try {
+ setEnabled(getSelectedSubscribableArts().size() > 0);
if (getSelectedSubscribableArts().size() == 1) {
title =
SubscribeManager.amISubscribed(getSelectedSubscribableArts().iterator().next()) ? "Remove Subscribed" : "Add as Subscribed";
@@ -50,6 +52,7 @@ public class SubscribedAction extends Action {
}
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ setEnabled(false);
}
setText(title);
setToolTipText(title);
@@ -66,12 +69,8 @@ public class SubscribedAction extends Action {
}
@Override
- public void run() {
- try {
- new SubscribeManagerUI(getSelectedSubscribableArts()).toggleSubscribe();
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
+ public void runWithException() throws OseeCoreException {
+ new SubscribeManagerUI(getSelectedSubscribableArts()).toggleSubscribe(prompt);
}
@Override
@@ -79,14 +78,8 @@ public class SubscribedAction extends Action {
return ImageManager.getImageDescriptor(AtsImage.SUBSCRIBED);
}
- public void updateEnablement() {
- try {
- setEnabled(getSelectedSubscribableArts().size() > 0);
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- setEnabled(false);
- }
- updateName();
+ public void setPrompt(boolean prompt) {
+ this.prompt = prompt;
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/TaskAddAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/TaskAddAction.java
index b6850dd71f..759599252f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/TaskAddAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/TaskAddAction.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.ats.actions;
import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -24,7 +25,6 @@ public class TaskAddAction extends Action {
public TaskAddAction(ITaskAddActionHandler taskAddActionHandler) {
super("Create New Task");
this.taskAddActionHandler = taskAddActionHandler;
- setImageDescriptor(ImageManager.getImageDescriptor(AtsImage.NEW_TASK));
setToolTipText(getText());
}
@@ -38,4 +38,8 @@ public class TaskAddAction extends Action {
taskAddActionHandler.taskAddActionHandler();
}
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return ImageManager.getImageDescriptor(AtsImage.NEW_TASK);
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/WorkflowDebugAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/WorkflowDebugAction.java
deleted file mode 100644
index 56679a95ff..0000000000
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/WorkflowDebugAction.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ats.actions;
-
-import java.util.List;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.core.config.TeamDefinitionArtifact;
-import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.workdef.CompositeStateItem;
-import org.eclipse.osee.ats.core.workdef.RuleDefinition;
-import org.eclipse.osee.ats.core.workdef.StateDefinition;
-import org.eclipse.osee.ats.core.workdef.StateItem;
-import org.eclipse.osee.ats.core.workdef.WidgetDefinition;
-import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.internal.Activator;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.util.XResultData;
-import org.eclipse.osee.framework.jdk.core.util.AHTML;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.skynet.results.XResultDataUI;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-
-/**
- * @author Donald G. Dunne
- */
-public class WorkflowDebugAction extends Action {
-
- private final AbstractWorkflowArtifact sma;
-
- public WorkflowDebugAction(AbstractWorkflowArtifact sma) {
- super("Show Workflow Debug Report");
- this.sma = sma;
- setToolTipText("Show workflow definition and all page, widgets and rules");
- }
-
- @Override
- public void run() {
- try {
- XResultData result = getReport();
- XResultDataUI.report(result, String.format("Workflow Debug [%s]", sma));
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
- }
-
- public XResultData getReport() throws OseeCoreException {
- XResultData rd = new XResultData();
- if (sma.isTeamWorkflow()) {
- TeamDefinitionArtifact teamDef = ((TeamWorkFlowArtifact) sma).getTeamDefinition();
- rd.log(AHTML.bold("Team Definition: " + teamDef));
- for (RuleDefinition ruleDefinition : teamDef.getWorkRules()) {
- rd.log(AHTML.addSpace(6) + "Rule: " + ruleDefinition.toString());
- }
- }
-
- // Display workflows
- rd.log(AHTML.newline() + AHTML.bold("WorkDefinition name: " + sma.getWorkDefinition().getName()) + AHTML.newline());
- if (sma.getWorkDefinition().getIds().size() > 1) {
- for (String id : sma.getWorkDefinition().getIds()) {
- rd.log(AHTML.bold("WorkDefinition id: ") + id + AHTML.newline());
- }
- }
- for (RuleDefinition ruleDefinition : sma.getWorkDefinition().getRules()) {
- rd.log(AHTML.addSpace(6) + AHTML.color("green", "Rule: ") + ruleDefinition.toString());
- }
-
- // Display pages
- for (StateDefinition state : sma.getWorkDefinition().getStatesOrderedByDefaultToState()) {
- rd.log(AHTML.bold(state.toString()));
- processStateItems(state.getStateItems(), rd, 1);
- for (RuleDefinition rule : state.getRules()) {
- rd.log(AHTML.addSpace(6) + AHTML.color("cyan", "Rule: ") + rule.toString());
- }
- for (StateDefinition toState : state.getToStates()) {
- boolean isDefault = state.getDefaultToState().getFullName().contains(toState.getFullName());
- rd.log(AHTML.addSpace(6) + AHTML.color("blue", "Transition ToState: ") + toState.getPageName() + (isDefault ? " (Default)" : ""));
- }
- if (!state.getOverrideAttributeValidationStates().isEmpty()) {
- for (StateDefinition toState : state.getOverrideAttributeValidationStates()) {
- rd.log(AHTML.addSpace(6) + AHTML.color("blue", "Transition OverrideAttributeValidationStates: ") + toState.getOverrideAttributeValidationStates());
- }
- }
- }
- return rd;
- }
-
- private void processStateItems(List<StateItem> stateItems, XResultData rd, int level) {
- for (StateItem stateItem : stateItems) {
- if (stateItem instanceof WidgetDefinition) {
- rd.log(AHTML.addSpace(6 * level) + AHTML.color("green", "Widget: ") + stateItem.toString());
- } else if (stateItem instanceof CompositeStateItem) {
- rd.log(AHTML.addSpace(6 * level) + AHTML.bold("Composite - numColumns = " + ((CompositeStateItem) stateItem).getNumColumns()));
- processStateItems(((CompositeStateItem) stateItem).getStateItems(), rd, level + 1);
- }
- }
- }
-
- @Override
- public ImageDescriptor getImageDescriptor() {
- return ImageManager.getImageDescriptor(AtsImage.WORKFLOW_CONFIG);
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
index 78dc7a8eb9..9df3710560 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
@@ -24,8 +24,9 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.osee.ats.actions.AccessControlAction;
import org.eclipse.osee.ats.actions.DirtyReportAction;
-import org.eclipse.osee.ats.actions.ISelectedAtsArtifacts;
+import org.eclipse.osee.ats.actions.IDirtyReportable;
import org.eclipse.osee.ats.actions.ResourceHistoryAction;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.core.task.AbstractTaskableArtifact;
import org.eclipse.osee.ats.core.task.TaskArtifact;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
@@ -86,7 +87,7 @@ import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
/**
* @author Donald G. Dunne
*/
-public class SMAEditor extends AbstractArtifactEditor implements ISMAEditorEventHandler, ISelectedAtsArtifacts, IAtsMetricsProvider, IXTaskViewer {
+public class SMAEditor extends AbstractArtifactEditor implements IDirtyReportable, ISMAEditorEventHandler, ISelectedAtsArtifacts, IAtsMetricsProvider, IXTaskViewer {
public static final String EDITOR_ID = "org.eclipse.osee.ats.editor.SMAEditor";
private AbstractWorkflowArtifact awa;
private SMAWorkFlowTab workFlowTab;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAGoalMembersSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAGoalMembersSection.java
index 1b426f3f82..bf3318b44c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAGoalMembersSection.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAGoalMembersSection.java
@@ -27,7 +27,7 @@ import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.nebula.widgets.xviewer.customize.CustomizeData;
import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.actions.ISelectedAtsArtifacts;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.core.artifact.GoalArtifact;
import org.eclipse.osee.ats.core.task.TaskArtifact;
import org.eclipse.osee.ats.core.type.AtsArtifactTypes;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java
index 63a16ce6e6..abde3e6ecf 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java
@@ -31,7 +31,6 @@ import org.eclipse.osee.ats.actions.ResourceHistoryAction;
import org.eclipse.osee.ats.actions.ShowBranchChangeDataAction;
import org.eclipse.osee.ats.actions.ShowWorkDefinitionAction;
import org.eclipse.osee.ats.actions.SubscribedAction;
-import org.eclipse.osee.ats.actions.WorkflowDebugAction;
import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.internal.Activator;
@@ -189,7 +188,6 @@ public class SMAOperationsSection extends SectionPart {
new XButtonViaAction(new RefreshDirtyAction(editor)).createWidgets(sectionBody, 2);
new XButtonViaAction(new DeletePurgeAtsArtifactsAction(editor)).createWidgets(sectionBody, 2);
- new XButtonViaAction(new WorkflowDebugAction(editor.getAwa())).createWidgets(sectionBody, 2);
if (ShowBranchChangeDataAction.isApplicable(editor.getAwa())) {
new XButtonViaAction(new ShowBranchChangeDataAction(editor.getAwa())).createWidgets(sectionBody, 2);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java
index 677a52fc7d..e7be3f7c34 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java
@@ -18,8 +18,6 @@ import java.util.logging.Level;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osee.ats.actions.NewDecisionReviewJob;
-import org.eclipse.osee.ats.actions.NewPeerToPeerReviewJob;
import org.eclipse.osee.ats.core.review.AbstractReviewArtifact;
import org.eclipse.osee.ats.core.review.DecisionReviewManager;
import org.eclipse.osee.ats.core.review.PeerToPeerReviewManager;
@@ -34,6 +32,8 @@ import org.eclipse.osee.ats.core.workflow.transition.TransitionOption;
import org.eclipse.osee.ats.core.workflow.transition.TransitionResults;
import org.eclipse.osee.ats.editor.SMAEditor;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.review.NewDecisionReviewJob;
+import org.eclipse.osee.ats.review.NewPeerToPeerReviewJob;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.ats.util.Overview;
import org.eclipse.osee.ats.util.widgets.dialog.StateListAndTitleDialog;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/RemoveFromGoalAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/RemoveFromGoalAction.java
index 4cdd8e4b50..10b09714d2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/RemoveFromGoalAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/RemoveFromGoalAction.java
@@ -14,7 +14,7 @@ import java.util.Collection;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osee.ats.actions.ISelectedAtsArtifacts;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.core.artifact.GoalArtifact;
import org.eclipse.osee.ats.core.type.AtsRelationTypes;
import org.eclipse.osee.ats.internal.Activator;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/SetGoalOrderAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/SetGoalOrderAction.java
index db43043c1f..6a3993a8fe 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/SetGoalOrderAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/SetGoalOrderAction.java
@@ -13,8 +13,8 @@ package org.eclipse.osee.ats.goal;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.artifact.GoalManager;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
import org.eclipse.osee.ats.core.artifact.GoalArtifact;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewDecisionReviewJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/NewDecisionReviewJob.java
index 4cb3d00b4f..26d4c269ad 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewDecisionReviewJob.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/NewDecisionReviewJob.java
@@ -9,7 +9,7 @@
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.actions;
+package org.eclipse.osee.ats.review;
import java.util.Collection;
import java.util.Date;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewPeerToPeerReviewJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/NewPeerToPeerReviewJob.java
index 36736288e9..83d4aadb02 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewPeerToPeerReviewJob.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/NewPeerToPeerReviewJob.java
@@ -9,7 +9,7 @@
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.actions;
+package org.eclipse.osee.ats.review;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditorXWidgetActionPage.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditorXWidgetActionPage.java
index 4b683224e4..d04bffbeb1 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditorXWidgetActionPage.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditorXWidgetActionPage.java
@@ -17,6 +17,7 @@ import org.eclipse.jface.action.IMenuCreator;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.osee.ats.AtsImage;
+import org.eclipse.osee.ats.actions.ImportListener;
import org.eclipse.osee.ats.actions.ImportTasksViaSimpleList;
import org.eclipse.osee.ats.actions.ImportTasksViaSpreadsheet;
import org.eclipse.osee.ats.actions.NewAction;
@@ -49,8 +50,6 @@ import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
@@ -181,9 +180,9 @@ public class TaskEditorXWidgetActionPage extends AtsXWidgetActionFormPage {
try {
if (taskComposite.getIXTaskViewer().isTasksEditable()) {
addActionToMenu(fMenu, new ImportTasksViaSpreadsheet(
- (AbstractTaskableArtifact) taskComposite.getIXTaskViewer().getAwa(), new Listener() {
+ (AbstractTaskableArtifact) taskComposite.getIXTaskViewer().getAwa(), new ImportListener() {
@Override
- public void handleEvent(Event event) {
+ public void importCompleted() {
try {
taskComposite.loadTable();
} catch (OseeCoreException ex) {
@@ -192,9 +191,9 @@ public class TaskEditorXWidgetActionPage extends AtsXWidgetActionFormPage {
}
}));
addActionToMenu(fMenu, new ImportTasksViaSimpleList(
- (AbstractTaskableArtifact) taskComposite.getIXTaskViewer().getAwa(), new Listener() {
+ (AbstractTaskableArtifact) taskComposite.getIXTaskViewer().getAwa(), new ImportListener() {
@Override
- public void handleEvent(Event event) {
+ public void importCompleted() {
try {
taskComposite.loadTable();
} catch (OseeCoreException ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitJob.java
index 5b18569eec..1da7f9a5cf 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitJob.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitJob.java
@@ -118,7 +118,7 @@ public class AtsBranchCommitJob extends Job {
if (branchCommitted) {
// Create reviews as necessary
SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Create Reviews upon Commit");
- AtsBranchManager.createNecessaryBranchEventReviews(StateEventType.CommitBranch, teamArt, new Date(),
+ AtsBranchManagerCore.createNecessaryBranchEventReviews(StateEventType.CommitBranch, teamArt, new Date(),
UserManager.getUser(SystemUser.OseeSystem), transaction);
transaction.execute();
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java
index 7d74b5869a..1d8752658e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java
@@ -14,31 +14,17 @@ package org.eclipse.osee.ats.util;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.logging.Level;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.osee.ats.core.branch.AtsBranchManagerCore;
import org.eclipse.osee.ats.core.commit.ICommitConfigArtifact;
-import org.eclipse.osee.ats.core.review.DecisionReviewArtifact;
-import org.eclipse.osee.ats.core.review.DecisionReviewDefinitionManager;
-import org.eclipse.osee.ats.core.review.PeerReviewDefinitionManager;
-import org.eclipse.osee.ats.core.review.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.core.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.team.TeamWorkFlowManager;
-import org.eclipse.osee.ats.core.workdef.DecisionReviewDefinition;
-import org.eclipse.osee.ats.core.workdef.PeerReviewDefinition;
-import org.eclipse.osee.ats.core.workdef.StateEventType;
import org.eclipse.osee.ats.internal.Activator;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.core.enums.SystemUser;
import org.eclipse.osee.framework.core.exception.BranchDoesNotExist;
import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -48,14 +34,8 @@ import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.operation.Operations;
import org.eclipse.osee.framework.core.util.Result;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.plugin.core.util.CatchAndReleaseJob;
-import org.eclipse.osee.framework.plugin.core.util.IExceptionableRunnable;
-import org.eclipse.osee.framework.plugin.core.util.Jobs;
-import org.eclipse.osee.framework.skynet.core.User;
-import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactCache;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
@@ -68,7 +48,6 @@ import org.eclipse.osee.framework.skynet.core.event.model.BranchEventType;
import org.eclipse.osee.framework.skynet.core.event.model.Sender;
import org.eclipse.osee.framework.skynet.core.revision.ChangeData;
import org.eclipse.osee.framework.skynet.core.revision.ChangeManager;
-import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.plugin.util.ArrayTreeContentProvider;
import org.eclipse.osee.framework.ui.skynet.change.ChangeUiUtil;
@@ -76,7 +55,6 @@ import org.eclipse.osee.framework.ui.skynet.util.TransactionIdLabelProvider;
import org.eclipse.osee.framework.ui.skynet.util.filteredTree.SimpleCheckFilteredTreeDialog;
import org.eclipse.osee.framework.ui.skynet.widgets.xBranch.BranchView;
import org.eclipse.osee.framework.ui.skynet.widgets.xmerge.MergeView;
-import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.ui.PlatformUI;
/**
@@ -165,16 +143,19 @@ public class AtsBranchManager implements IBranchEventListener {
}
if (isExecutionAllowed) {
- Job job = BranchManager.deleteBranch(branch);
- job.join();
- IStatus status = job.getResult();
+ Exception exception = null;
+ Result result = null;
+ try {
+ result = AtsBranchManagerCore.deleteWorkingBranch(teamArt, true);
+ } catch (Exception ex) {
+ exception = ex;
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, "Problem deleting branch.", ex);
+ }
if (promptUser) {
AWorkbench.popup("Delete Complete",
- status.isOK() ? "Branch delete was successful." : "Branch delete failed.\n" + status.getMessage());
- } else {
- if (!status.isOK()) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, status.getMessage(), status.getException());
- }
+ result.isTrue() ? "Branch delete was successful." : "Branch delete failed.\n" + result.getText());
+ } else if (result.isFalse()) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, result.getText(), exception);
}
}
} catch (Exception ex) {
@@ -265,108 +246,6 @@ public class AtsBranchManager implements IBranchEventListener {
}
/**
- * Perform error checks and popup confirmation dialogs associated with creating a working branch.
- *
- * @param pageId if specified, WorkPage gets callback to provide confirmation that branch can be created
- * @param popup if true, errors are popped up to user; otherwise sent silently in Results
- * @return Result return of status
- */
- public static Result createWorkingBranch(TeamWorkFlowArtifact teamArt, String pageId, boolean popup) {
- try {
- if (AtsBranchManagerCore.isCommittedBranchExists(teamArt)) {
- if (popup) {
- AWorkbench.popup("ERROR", "Can not create another working branch once changes have been committed.");
- }
- return new Result("Committed branch already exists.");
- }
- Branch parentBranch = AtsBranchManagerCore.getConfiguredBranchForWorkflow(teamArt);
- if (parentBranch == null) {
- String errorStr =
- "Parent Branch can not be determined.\n\nPlease specify " + "parent branch through Version Artifact or Team Definition Artifact.\n\n" + "Contact your team lead to configure this.";
- if (popup) {
- AWorkbench.popup("ERROR", errorStr);
- }
- return new Result(errorStr);
- }
- Result result = AtsBranchManagerCore.isCreateBranchAllowed(teamArt);
- if (result.isFalse()) {
- if (popup) {
- AWorkbench.popup(result);
- }
- return result;
- }
- // Retrieve parent branch to create working branch from
- if (popup && !MessageDialog.openConfirm(
- Displays.getActiveShell(),
- "Create Working Branch",
- "Create a working branch from parent branch\n\n\"" + parentBranch.getName() + "\"?\n\n" + "NOTE: Working branches are necessary when OSEE Artifact changes " + "are made during implementation.")) {
- return Result.FalseResult;
- }
- createWorkingBranch(teamArt, pageId, parentBranch);
- } catch (Exception ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- return new Result("Exception occurred: " + ex.getLocalizedMessage());
- }
- return Result.TrueResult;
- }
-
- public static void createNecessaryBranchEventReviews(StateEventType stateEventType, TeamWorkFlowArtifact teamArt, Date createdDate, User createdBy, SkynetTransaction transaction) throws OseeCoreException {
- if (stateEventType != StateEventType.CommitBranch && stateEventType != StateEventType.CreateBranch) {
- throw new OseeStateException("Invalid stateEventType [%s]", stateEventType);
- }
- // Create any decision and peerToPeer reviews for createBranch and commitBranch
- for (DecisionReviewDefinition decRevDef : teamArt.getStateDefinition().getDecisionReviews()) {
- if (decRevDef.getStateEventType() != null && decRevDef.getStateEventType().equals(stateEventType)) {
- DecisionReviewArtifact decArt =
- DecisionReviewDefinitionManager.createNewDecisionReview(decRevDef, transaction, teamArt, createdDate,
- createdBy);
- if (decArt != null) {
- decArt.persist(transaction);
- }
- }
- }
- for (PeerReviewDefinition peerRevDef : teamArt.getStateDefinition().getPeerReviews()) {
- if (peerRevDef.getStateEventType() != null && peerRevDef.getStateEventType().equals(stateEventType)) {
- PeerToPeerReviewArtifact peerArt =
- PeerReviewDefinitionManager.createNewPeerToPeerReview(peerRevDef, transaction, teamArt, createdDate,
- createdBy);
- if (peerArt != null) {
- peerArt.persist(transaction);
- }
- }
- }
- }
-
- /**
- * Create a working branch associated with this state machine artifact. This should NOT be called by applications
- * except in test cases or automated tools. Use createWorkingBranchWithPopups
- */
- public static Job createWorkingBranch(final TeamWorkFlowArtifact teamArt, String pageId, final IOseeBranch parentBranch) {
-
- final String branchName = Strings.truncate(TeamWorkFlowManager.getBranchName(teamArt), 195, true);
-
- IExceptionableRunnable runnable = new IExceptionableRunnable() {
- @Override
- public IStatus run(IProgressMonitor monitor) throws OseeCoreException {
- teamArt.setWorkingBranchCreationInProgress(true);
- BranchManager.createWorkingBranch(parentBranch, branchName, teamArt);
- teamArt.setWorkingBranchCreationInProgress(false);
- // Create reviews as necessary
- SkynetTransaction transaction =
- new SkynetTransaction(AtsUtil.getAtsBranch(), "Create Reviews upon Transition");
- createNecessaryBranchEventReviews(StateEventType.CreateBranch, teamArt, new Date(),
- UserManager.getUser(SystemUser.OseeSystem), transaction);
- transaction.execute();
- return Status.OK_STATUS;
- }
- };
-
- // Jobs.runInJob("Create Branch", runnable, Activator.class, Activator.PLUGIN_ID);
- return Jobs.startJob(new CatchAndReleaseJob("Create Branch", runnable, Activator.class, Activator.PLUGIN_ID),
- true);
- }
-
- /**
* @param commitPopup if true, pop-up errors associated with results
* @param overrideStateValidation if true, don't do checks to see if commit can be performed. This should only be
* used for developmental testing or automation
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java
index 95864f3460..7455f9c8a9 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java
@@ -148,7 +148,26 @@ public class XWorkingBranch extends GenericXWidget implements IArtifactWidget, I
public void handleEvent(Event e) {
enablement.disableAll();
refreshEnablement();
- AtsBranchManager.createWorkingBranch(teamArt, null, true);
+ // Create working branch
+ Result result = AtsBranchManagerCore.createWorkingBranch_Validate(teamArt);
+ if (result.isFalse()) {
+ AWorkbench.popup(result);
+ return;
+ }
+ try {
+ Branch parentBranch = AtsBranchManagerCore.getConfiguredBranchForWorkflow(teamArt);
+ // Retrieve parent branch to create working branch from
+ if (!MessageDialog.openConfirm(
+ Displays.getActiveShell(),
+ "Create Working Branch",
+ "Create a working branch from parent branch\n\n\"" + parentBranch.getName() + "\"?\n\n" + "NOTE: Working branches are necessary when OSEE Artifact changes " + "are made during implementation.")) {
+ return;
+ }
+ AtsBranchManagerCore.createWorkingBranch_Create(teamArt);
+ Thread.sleep(2000);
+ } catch (Exception ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
enablement.refresh();
refreshEnablement();
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsWorldEditorItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsWorldEditorItem.java
index 650df20a8d..90cb58efa2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsWorldEditorItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsWorldEditorItem.java
@@ -14,7 +14,6 @@ import java.util.Arrays;
import java.util.List;
import org.eclipse.jface.action.Action;
import org.eclipse.osee.ats.actions.DuplicateWorkflowViaWorldEditorAction;
-import org.eclipse.osee.ats.actions.ExportChangeReportsAction;
import org.eclipse.osee.ats.export.AtsExportManager;
/**
@@ -24,8 +23,8 @@ public class AtsWorldEditorItem extends AtsWorldEditorItemBase {
@Override
public List<? extends Action> getWorldEditorMenuActions(IWorldEditorProvider worldEditorProvider, WorldEditor worldEditor) {
- return Arrays.asList(new AtsExportManager(worldEditor), new ExportChangeReportsAction(worldEditor),
- new DuplicateWorkflowViaWorldEditorAction(worldEditor));
+ return Arrays.asList(new AtsExportManager(worldEditor), new DuplicateWorkflowViaWorldEditorAction(
+ worldEditor.getWorldComposite().getWorldXViewer()));
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java
index 2a6855fb89..8d7f80b89c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java
@@ -38,14 +38,14 @@ import org.eclipse.osee.ats.actions.EditAssigneeAction;
import org.eclipse.osee.ats.actions.EditStatusAction;
import org.eclipse.osee.ats.actions.EmailActionAction;
import org.eclipse.osee.ats.actions.FavoriteAction;
-import org.eclipse.osee.ats.actions.ISelectedAtsArtifacts;
-import org.eclipse.osee.ats.actions.ISelectedTeamWorkflowArtifacts;
import org.eclipse.osee.ats.actions.SubscribedAction;
import org.eclipse.osee.ats.column.GoalOrderColumn;
import org.eclipse.osee.ats.column.IPersistAltLeftClickProvider;
import org.eclipse.osee.ats.core.action.ActionArtifact;
import org.eclipse.osee.ats.core.action.ActionArtifactRollup;
import org.eclipse.osee.ats.core.action.ActionManager;
+import org.eclipse.osee.ats.core.actions.ISelectedAtsArtifacts;
+import org.eclipse.osee.ats.core.actions.ISelectedTeamWorkflowArtifacts;
import org.eclipse.osee.ats.core.artifact.GoalArtifact;
import org.eclipse.osee.ats.core.task.TaskArtifact;
import org.eclipse.osee.ats.core.team.TeamState;
@@ -374,7 +374,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer
if (AtsUtilCore.isAtsAdmin()) {
mm.insertBefore(XViewer.MENU_GROUP_PRE, new Separator());
mm.insertBefore(XViewer.MENU_GROUP_PRE, deletePurgeAtsObjectAction);
- deletePurgeAtsObjectAction.updateEnablement();
+ deletePurgeAtsObjectAction.setEnabled(getSelectedAtsArtifacts().size() > 0);
}
mm.insertBefore(XViewer.MENU_GROUP_PRE, new GroupMarker(MENU_GROUP_ATS_WORLD_OPEN));
@@ -388,7 +388,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer
subscribedAction.updateEnablement();
mm.insertBefore(XViewer.MENU_GROUP_PRE, emailAction);
- emailAction.updateEnablement();
+ emailAction.setEnabled(getSelectedSMAArtifacts().size() == 1);
mm.insertBefore(XViewer.MENU_GROUP_PRE, resetActionArtifactAction);
resetActionArtifactAction.setEnabled(getSelectedActionArtifacts().size() > 0);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleHridSearchData.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleHridSearchData.java
index f8615d1c22..65067d8d9a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleHridSearchData.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleHridSearchData.java
@@ -47,7 +47,24 @@ public class MultipleHridSearchData implements IWorldEditorConsumer {
return enteredIds;
}
+ private void extractIds() {
+ for (String str : getEnteredIds().split(",")) {
+ str = str.replaceAll("^\\s+", "");
+ str = str.replaceAll("\\s+$", "");
+ if (!str.equals("")) {
+ ids.add(str);
+ }
+ // allow for lower case hrids
+ if (str.length() == 5 && !ids.contains(str.toUpperCase())) {
+ ids.add(str.toUpperCase());
+ }
+ }
+ }
+
public List<String> getIds() {
+ if (ids.isEmpty()) {
+ extractIds();
+ }
return ids;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleHridSearchUi.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleHridSearchUi.java
index 3046995363..9ebd5f622b 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleHridSearchUi.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleHridSearchUi.java
@@ -36,24 +36,9 @@ public class MultipleHridSearchUi {
public boolean getInput() {
MutableBoolean result = new MutableBoolean(false);
Displays.pendInDisplayThread(new EntryJob(result));
- extractIds();
return result.getValue();
}
- private void extractIds() {
- for (String str : data.getEnteredIds().split(",")) {
- str = str.replaceAll("^\\s+", "");
- str = str.replaceAll("\\s+$", "");
- if (!str.equals("")) {
- data.getIds().add(str);
- }
- // allow for lower case hrids
- if (str.length() == 5 && !data.getIds().contains(str.toUpperCase())) {
- data.getIds().add(str.toUpperCase());
- }
- }
- }
-
private final class EntryJob implements Runnable {
private final MutableBoolean result;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java
index cb43fab348..5f1b2e8a24 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java
@@ -46,7 +46,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.relation.RelationManager;
import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
-import org.eclipse.osee.framework.skynet.core.utility.ElapsedTime;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
import org.eclipse.osee.framework.ui.skynet.widgets.XCheckBox;
import org.eclipse.osee.framework.ui.skynet.widgets.XCombo;
@@ -144,11 +143,11 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem {
}
// Else, get workflows from teamdefs
else if (teamDefs.size() > 0) {
- ElapsedTime time = new ElapsedTime("Task Search - Load Team Workflows by Team Defs");
+ // ElapsedTime time = new ElapsedTime("Task Search - Load Team Workflows by Team Defs");
TeamWorldSearchItem teamWorldSearchItem =
new TeamWorldSearchItem("", teamDefs, true, true, false, false, null, null, ReleasedOption.Both, null);
workflows.addAll(teamWorldSearchItem.performSearchGetResults(false, SearchType.Search));
- time.end();
+ // time.end();
} else if (groups.size() > 0) {
Set<TaskArtifact> taskArts = new HashSet<TaskArtifact>();
for (Artifact groupArt : groups) {
@@ -163,16 +162,16 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem {
return filterByCompletedAndStateAndSelectedUser(taskArts);
}
- ElapsedTime time = new ElapsedTime("Task Search - Bulk Load related tasks");
+ // ElapsedTime time = new ElapsedTime("Task Search - Bulk Load related tasks");
// Bulk load tasks related to workflows
Collection<Artifact> artifacts =
RelationManager.getRelatedArtifacts(workflows, 1, AtsRelationTypes.SmaToTask_Task);
- time.end();
+ // time.end();
// Apply the remaining criteria
- time = new ElapsedTime("Task Search - Filter by remaining criteria");
+ // time = new ElapsedTime("Task Search - Filter by remaining criteria");
Collection<TaskArtifact> tasks = filterByCompletedAndStateAndSelectedUser(artifacts);
- time.end();
+ // time.end();
return tasks;
}
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbTests.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbTests.java
index 52a2c4ec5b..9e6c23c7c0 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbTests.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbTests.java
@@ -37,15 +37,15 @@ import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
- AllAccessTestSuite.class,
Review_Demo_Suite.class,
AtsTest_Demo_StateItem_Suite.class,
+ AtsTest_Demo_Config_Suite.class,
+ AtsTest_Demo_Suite.class,
+ AllAccessTestSuite.class,
CoreRuntimeFeatureTestsSuite.class,
Coverage_Db_Suite.class,
FrameworkCore_Demo_Suite.class,
AllEventResTestSuite.class,
- AtsTest_Demo_Config_Suite.class,
- AtsTest_Demo_Suite.class,
FrameworkUi_Demo_Suite.class,
AllDefineTestSuite.class,
// This should always be last test of master suite
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java
index d3458ca939..c3aa8d227a 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java
@@ -160,6 +160,10 @@ public class Branch extends AbstractOseeType<String> implements IAdaptable, IOse
return getStorageState() == StorageState.PURGED;
}
+ public boolean isDeleted() {
+ return getBranchState() == BranchState.DELETED;
+ }
+
@Override
public String toString() {
return getName();
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java
index 01a2d264c7..12b4f4389f 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java
@@ -44,7 +44,6 @@ public class DeleteBranchOperation extends AbstractOperation {
try {
branch.setBranchState(BranchState.DELETED);
-
branch.setArchived(true);
OseeEventManager.kickBranchEvent(this, new BranchEvent(BranchEventType.Deleting, branch.getGuid()),
branch.getId());
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/FrameworkUi_Demo_Suite.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/FrameworkUi_Demo_Suite.java
index 3e454166c8..7c535aec6c 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/FrameworkUi_Demo_Suite.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/FrameworkUi_Demo_Suite.java
@@ -68,7 +68,9 @@ import org.junit.runners.Suite;
AbstractEnumerationTest.class,
ImportTestSuite.class,
WordTestSuite.class,
- RelationIntegrityCheckTest.class})
+ RelationIntegrityCheckTest.class
+//
+})
/**
* @author Donald G. Dunne
*/
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/ImageManagerTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/ImageManagerTest.java
index 64b7a35db2..ac8ed30e40 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/ImageManagerTest.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/ImageManagerTest.java
@@ -19,7 +19,6 @@ import java.io.File;
import java.io.FileInputStream;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
-import junit.framework.Assert;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
@@ -37,7 +36,6 @@ import org.eclipse.osee.framework.ui.skynet.ArtifactImageManager;
import org.eclipse.osee.framework.ui.skynet.internal.Activator;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.osee.framework.ui.swt.KeyedImage;
-import org.eclipse.osee.support.test.util.TestUtil;
/**
* @author Donald G. Dunne
@@ -79,19 +77,6 @@ public abstract class ImageManagerTest {
}
/**
- * Test that image that is not found, returns MISSING image
- */
- @org.junit.Test
- public void testFrameworkImageMissing() throws Exception {
- SevereLoggingMonitor slm = TestUtil.severeLoggingStart();
- assertEquals(ImageManager.getImage(MissingImage.NOT_HERE), ImageManager.getImage(ImageManager.MISSING));
- TestUtil.severeLoggingStop(slm);
- List<IHealthStatus> severeLogs = slm.getSevereLogs();
- Assert.assertEquals(1, severeLogs.size());
- Assert.assertTrue(severeLogs.iterator().next().getMessage().startsWith("Unable to load the image"));
- }
-
- /**
* Test that all image enums have associated image files. (Non return missing image)
*/
@org.junit.Test
diff --git a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/ImageManager.java b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/ImageManager.java
index ba0bb1176a..a317ff155d 100644
--- a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/ImageManager.java
+++ b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/ImageManager.java
@@ -68,7 +68,9 @@ public final class ImageManager {
if (getImageRegistry().getDescriptor(imageKey) == null) {
ImageDescriptor imageDescriptor = imageEnum.createImageDescriptor();
if (imageDescriptor == null) {
- OseeLog.logf(Activator.class, Level.SEVERE, "Unable to load the image for [%s]", imageEnum.getImageKey());
+ if (!imageKey.contains("nothere.gif")) {
+ OseeLog.logf(Activator.class, Level.SEVERE, "Unable to load the image for [%s]", imageEnum.getImageKey());
+ }
return setupImage(MISSING);
}
storeOnImageRegistry(imageKey, imageDescriptor);
diff --git a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE Demo product [localhost].launch b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE Demo product [localhost].launch
index 773de408c2..1a88b0e3c5 100644
--- a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE Demo product [localhost].launch
+++ b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE Demo product [localhost].launch
@@ -14,6 +14,9 @@
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/runtime-workspace"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-debug"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx1024M&#13;&#10;-XX:MaxPermSize=256m&#13;&#10;-Dosee.log.default=INFO&#13;&#10;-Dosee.arbitration.server=http://localhost:8089&#13;&#10;-Dosee.authentication.protocol=demo&#13;&#10;-Dats.useNewWorkDefinitions=true"/>
diff --git a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE Mail Service.launch b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE Mail Service.launch
index 9576811205..0bc4469730 100644
--- a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE Mail Service.launch
+++ b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE Mail Service.launch
@@ -161,9 +161,6 @@
<intAttribute key="default_start_level" value="4"/>
<booleanAttribute key="includeOptional" value="false"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m&#13;&#10;-XX:MaxPermSize=256m&#13;&#10;-Dosee.log.default=WARNING&#13;&#10;-Declipse.ignoreApp=true&#13;&#10;-Dosgi.noShutdown=true&#13;&#10;-DNequinox.ds.debug=true&#13;&#10;-DNequinox.ds.print=true&#13;&#10;-Dorg.osgi.service.http.port=8089&#13;&#10;-Dosee.db.connection.id=h2&#13;&#10;-Dosee.db.embedded.server=0.0.0.0:8088"/>
diff --git a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/TestUtil.java b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/TestUtil.java
index ad2a778093..954f96e4f6 100644
--- a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/TestUtil.java
+++ b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/TestUtil.java
@@ -74,9 +74,13 @@ public class TestUtil {
OseeInfo.putValue(OseeInfo.DB_TYPE_KEY, set ? DEMO_DB_TYPE : "");
}
- public static void sleep(long milliseconds) throws Exception {
+ public static void sleep(long milliseconds) {
// System.out.println("Sleeping " + milliseconds);
- Thread.sleep(milliseconds);
+ try {
+ Thread.sleep(milliseconds);
+ } catch (InterruptedException ex) {
+ // do nothing
+ }
// System.out.println("Awake");
}

Back to the top