diff options
9 files changed, 28 insertions, 52 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsBulkLoad.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsBulkLoad.java index 2c1296dd997..81cb323e86c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsBulkLoad.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsBulkLoad.java @@ -41,7 +41,7 @@ public class AtsBulkLoad { return; } if (pend) { - Operations.executeAndPend(new AtsLoadConfigArtifactsOperation(), false); + Operations.executeWork(new AtsLoadConfigArtifactsOperation()); } else { Operations.executeAsJob(new AtsLoadConfigArtifactsOperation(), false); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java index 3a91eb57fcf..7cddb8256e4 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java @@ -144,7 +144,7 @@ public class AtsDeleteManager { } }; if (forcePend) { - Operations.executeAndPend(operation, true); + Operations.executeWork(operation); } else { Operations.executeAsJob(operation, true); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorOperationProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorOperationProvider.java index 119abc6732e..797e3313eb5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorOperationProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorOperationProvider.java @@ -37,7 +37,7 @@ public class WorldEditorOperationProvider extends WorldEditorProvider implements // WorldEditor is provided to the operation independently // Don't need search type cause operation should already handle if it wants to search or re-search if (forcePend) { - Operations.executeAndPend(operation, true); + Operations.executeWork(operation); } else { Operations.executeAsJob(operation, true); } diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/Operations.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/Operations.java index c2545693b58..ba23957c02e 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/Operations.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/Operations.java @@ -10,7 +10,6 @@ *******************************************************************************/ package org.eclipse.osee.framework.core.operation; -import java.util.logging.Level; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.SubMonitor; @@ -19,6 +18,7 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.exception.OseeExceptions; import org.eclipse.osee.framework.core.internal.Activator; +import org.eclipse.osee.framework.logging.OseeLevel; import org.eclipse.osee.framework.logging.OseeLog; /** @@ -82,10 +82,6 @@ public final class Operations { return scheduleJob(new OperationJob(operation), user, Job.LONG, null); } - public static Job executeAndPend(IOperation operation, boolean user) { - return scheduleJob(new OperationJob(operation), user, Job.LONG, null, true); - } - public static Job executeAsJob(IOperation operation, boolean user, int priority, IJobChangeListener jobChangeListener) { return scheduleJob(new OperationJob(operation), user, priority, jobChangeListener); } @@ -105,7 +101,7 @@ public final class Operations { try { job.join(); } catch (InterruptedException ex) { - OseeLog.log(Activator.class, Level.SEVERE, ex); + OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex); } } return job; diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/BranchEventTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/BranchEventTest.java index 32fab768b99..650d4f9a58f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/BranchEventTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/BranchEventTest.java @@ -24,6 +24,7 @@ import org.eclipse.osee.framework.core.enums.StorageState; import org.eclipse.osee.framework.core.exception.BranchDoesNotExist; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.model.Branch; +import org.eclipse.osee.framework.core.operation.Operations; import org.eclipse.osee.framework.jdk.core.util.GUID; import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.framework.logging.SevereLoggingMonitor; @@ -31,6 +32,7 @@ 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.ArtifactTypeManager; import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; +import org.eclipse.osee.framework.skynet.core.artifact.DeleteBranchOperation; import org.eclipse.osee.framework.skynet.core.conflict.ConflictManagerExternal; import org.eclipse.osee.framework.skynet.core.event.OseeEventManager; import org.eclipse.osee.framework.skynet.core.event.filter.IEventFilter; @@ -191,7 +193,8 @@ public class BranchEventTest { final String guid = workingBranch.getGuid(); Assert.assertNotNull(workingBranch); Assert.assertNotSame(BranchState.DELETED, workingBranch.getBranchState()); - BranchManager.deleteBranch(workingBranch, true); + + Operations.executeWork(new DeleteBranchOperation(workingBranch)); // if (isRemoteTest()) { // Thread.sleep(2000); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/TransactionEventTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/TransactionEventTest.java index 70869faef70..1043da7409d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/TransactionEventTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/TransactionEventTest.java @@ -99,7 +99,7 @@ public class TransactionEventTest { // Delete it IOperation operation = new PurgeTransactionOperation(Activator.getInstance(), false, transIdToDelete); - Operations.executeAndPend(operation, false); + Operations.executeWork(operation); // Verify that all stuff reverted Assert.assertNotNull(resultTransEvent); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java index 5bcf9adc004..6bf51795b6f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java @@ -242,19 +242,7 @@ public class BranchManager { * undo-able) */ public static Job deleteBranch(final Branch branch) { - return deleteBranch(branch, false); - } - - /** - * Delete a branch from the system. (This operation will set the branch state to deleted. This operation is - * undo-able) - */ - public static Job deleteBranch(final Branch branch, boolean pend) { - if (pend) { - return Operations.executeAndPend(new DeleteBranchOperation(branch), true); - } else { - return Operations.executeAsJob(new DeleteBranchOperation(branch), true); - } + return Operations.executeAsJob(new DeleteBranchOperation(branch), true); } /** diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java index 6e235fc55f9..7330f5c662c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java @@ -23,7 +23,6 @@ import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.jobs.Job; import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.core.exception.OseeArgumentException; import org.eclipse.osee.framework.core.exception.OseeCoreException; @@ -233,42 +232,39 @@ public final class RendererManager { return comparator.compare(baseVersion, newerVersion, baseFile, newerFile, PresentationType.MERGE_EDIT); } - public static Job diffInJob(ArtifactDelta artifactDelta) { - return diff(artifactDelta, null, true); + public static void diffInJob(ArtifactDelta artifactDelta) { + diff(artifactDelta, null, true); } - public static Job diffInJob(ArtifactDelta artifactDelta, VariableMap options) { - return diff(artifactDelta, options, true); + public static void diffInJob(ArtifactDelta artifactDelta, VariableMap options) { + diff(artifactDelta, options, true); } - public static Job diff(ArtifactDelta artifactDelta, VariableMap options) { - return diff(artifactDelta, options, false); + public static void diff(ArtifactDelta artifactDelta, VariableMap options) { + diff(artifactDelta, options, false); } - public static Job diff(ArtifactDelta artifactDelta) { - return diff(artifactDelta, null, false); + public static void diffInJob(Collection<ArtifactDelta> artifactDeltas) { + diffInJob(artifactDeltas, null); } - public static Job diffInJob(Collection<ArtifactDelta> artifactDeltas) { - return diff(artifactDeltas, null); - } - - public static Job diffInJob(Collection<ArtifactDelta> artifactDeltas, VariableMap options) { - return diff(artifactDeltas, options); + public static void diffInJob(Collection<ArtifactDelta> artifactDeltas, VariableMap options) { + IOperation operation = new DiffUsingRenderer(artifactDeltas, options); + Operations.executeAsJob(operation, true); } - private static Job diff(Collection<ArtifactDelta> artifactDeltas, VariableMap options) { + public static void diff(Collection<ArtifactDelta> artifactDeltas, VariableMap options) { IOperation operation = new DiffUsingRenderer(artifactDeltas, options); - return Operations.executeAsJob(operation, true); + Operations.executeWork(operation); } - private static Job diff(ArtifactDelta artifactDelta, VariableMap options, boolean asynchronous) { + private static void diff(ArtifactDelta artifactDelta, VariableMap options, boolean asynchronous) { IOperation operation = new DiffUsingRenderer(artifactDelta, options); if (asynchronous) { - return Operations.executeAsJob(operation, true); + Operations.executeAsJob(operation, true); } else { - return Operations.executeAndPend(operation, true); + Operations.executeWork(operation); } } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java index 96be88c20d4..14bcfa23e46 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java @@ -16,11 +16,9 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.logging.Level; -import org.eclipse.core.runtime.jobs.Job; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.exception.OseeArgumentException; import org.eclipse.osee.framework.core.exception.OseeCoreException; -import org.eclipse.osee.framework.core.exception.OseeExceptions; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionDelta; import org.eclipse.osee.framework.core.model.TransactionRecord; @@ -108,12 +106,7 @@ public class WordTemplateFileDiffer { options.setValue("paragraphNumber", nextParagraphNumber); options.setValue("outlineType", outlineType); - Job job = RendererManager.diffInJob(artifactDeltas, options); - try { - job.join(); - } catch (InterruptedException ex) { - OseeExceptions.wrapAndThrow(ex); - } + RendererManager.diff(artifactDeltas, options); } private List<Artifact> getStartArtifacts(List<Artifact> artifacts, Branch startBranch) throws OseeCoreException { |