Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-09-23 01:15:06 -0400
committerRyan D. Brooks2010-09-23 01:15:06 -0400
commit47b4411c167982b9818e5f337a46ab02ad5f5708 (patch)
treeb686a3817c68843587e49d616e27b40e5c56bb9a /plugins
parent195f9cffd8455998e2eff6ac51fc60971da49232 (diff)
downloadorg.eclipse.osee-47b4411c167982b9818e5f337a46ab02ad5f5708.tar.gz
org.eclipse.osee-47b4411c167982b9818e5f337a46ab02ad5f5708.tar.xz
org.eclipse.osee-47b4411c167982b9818e5f337a46ab02ad5f5708.zip
refactor: Remove usage and definition of Operations.executeAndPend
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsBulkLoad.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorOperationProvider.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/Operations.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/BranchEventTest.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/TransactionEventTest.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java14
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java36
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java9
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 2c1296dd99..81cb323e86 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 3a91eb57fc..7cddb8256e 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 119abc6732..797e3313eb 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 c2545693b5..ba23957c02 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 32fab768b9..650d4f9a58 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 70869faef7..1043da7409 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 5bcf9adc00..6bf51795b6 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 6e235fc55f..7330f5c662 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 96be88c20d..14bcfa23e4 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 {

Back to the top