Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2013-02-06 20:53:26 +0000
committerGerrit Code Review @ Eclipse.org2013-02-06 22:30:00 +0000
commit8664594fbb4c357d9f2dbce49875c4f32d6cdb3a (patch)
treee2f0b5039a9517d7e18908ce4d89b0b926c79714
parentce0c82f22591fb0877b3a48d3e6a9ff66f5f42db (diff)
downloadorg.eclipse.osee-0.11.0.v201302070123_RC.tar.gz
org.eclipse.osee-0.11.0.v201302070123_RC.tar.xz
org.eclipse.osee-0.11.0.v201302070123_RC.zip
refactor: Update use of operations.run method0.11.0.v201302070123_RC
Applications should call Operations.execute... methods instead of calling run directly. Change-Id: I1a2891974a8feceff125e620dd64b03c7d21eb09
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenChangeReportByIdAction.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenWorkflowByIdAction.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenWorldByIdAction.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ClearAtsConfigCache.java11
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/IOperation.java3
5 files changed, 40 insertions, 4 deletions
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 3387e7cd3d6..5810130a78b 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
@@ -12,11 +12,15 @@ 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.util.AtsEditor;
import org.eclipse.osee.ats.world.search.MultipleHridSearchData;
import org.eclipse.osee.ats.world.search.MultipleHridSearchOperation;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.operation.Operations;
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.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -49,7 +53,11 @@ public class OpenChangeReportByIdAction extends Action {
}
MultipleHridSearchOperation srchOperation = new MultipleHridSearchOperation(data);
if (pend) {
- srchOperation.run(null);
+ try {
+ Operations.executeWorkAndCheckStatus(srchOperation);
+ } catch (OseeCoreException ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
} else {
Operations.executeAsJob(srchOperation, true);
}
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 85d7895bcd3..903d35fb764 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
@@ -13,11 +13,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.internal.Activator;
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.exception.OseeCoreException;
import org.eclipse.osee.framework.core.operation.Operations;
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;
/**
@@ -49,7 +53,11 @@ public class OpenWorkflowByIdAction extends Action {
}
MultipleHridSearchOperation operation = new MultipleHridSearchOperation(data);
if (pend) {
- operation.run(null);
+ try {
+ Operations.executeWorkAndCheckStatus(operation);
+ } catch (OseeCoreException ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
} else {
Operations.executeAsJob(operation, true);
}
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 2d2648a25a5..af34e30956c 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
@@ -13,11 +13,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.internal.Activator;
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.exception.OseeCoreException;
import org.eclipse.osee.framework.core.operation.Operations;
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;
/**
@@ -45,7 +49,11 @@ public class OpenWorldByIdAction extends Action {
}
MultipleHridSearchOperation operation = new MultipleHridSearchOperation(data);
if (pend) {
- operation.run(null);
+ try {
+ Operations.executeWorkAndCheckStatus(operation);
+ } catch (OseeCoreException ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
} else {
Operations.executeAsJob(operation, true);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ClearAtsConfigCache.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ClearAtsConfigCache.java
index 1d0870a3106..ef51353c785 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ClearAtsConfigCache.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ClearAtsConfigCache.java
@@ -13,7 +13,12 @@ package org.eclipse.osee.ats.navigate;
import org.eclipse.osee.ats.core.client.config.AtsLoadConfigArtifactsOperation;
import org.eclipse.osee.ats.core.config.AtsConfigCache;
+import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.operation.Operations;
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.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
@@ -39,7 +44,11 @@ public class ClearAtsConfigCache extends XNavigateItemAction {
AtsConfigCache.instance.clearCaches();
AtsLoadConfigArtifactsOperation opt = new AtsLoadConfigArtifactsOperation(true);
- opt.run(null);
+ try {
+ Operations.executeWorkAndCheckStatus(opt);
+ } catch (OseeCoreException ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
rd.log("\n\nPost-reload");
AtsConfigCache.instance.getReport(rd);
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/IOperation.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/IOperation.java
index 4bdab5f0a98..0a357c43ffa 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/IOperation.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/IOperation.java
@@ -19,6 +19,9 @@ import org.eclipse.osee.framework.core.data.Named;
*/
public interface IOperation extends Named {
/**
+ * <b>This method should not be called by clients, use {@link Operations#executeWorkAndCheckStatus(IOperation)
+ * Operations.execute... methods} instead.</b>
+ *
* @param subMonitor the progress monitor to use for reporting progress to the user. It is the caller's
* responsibility to call done() on the given monitor. Accepts null, indicating that no progress should be reported
* and that the operation cannot be cancelled.

Back to the top