Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2018-06-14 18:09:02 -0400
committerDonald Dunne2018-07-02 12:53:15 -0400
commit8300d3592d9ae7201d5029bc8306191baba881a5 (patch)
treec0d835ada7565879c89e585a4d2dbc52def01aa3
parent446e18a4ebda8cea761353e8d22205c36580bd2c (diff)
downloadorg.eclipse.osee-8300d3592d9ae7201d5029bc8306191baba881a5.tar.gz
org.eclipse.osee-8300d3592d9ae7201d5029bc8306191baba881a5.tar.xz
org.eclipse.osee-8300d3592d9ae7201d5029bc8306191baba881a5.zip
bug: Open multiple new workflows in World Editor
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionJob.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/IWorldEditorProvider.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItemProvider.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorProvider.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorSimpleProvider.java18
5 files changed, 22 insertions, 14 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionJob.java
index d7a094db96..b1383903f9 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionJob.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionJob.java
@@ -27,6 +27,8 @@ import org.eclipse.osee.ats.api.workflow.INewActionListener;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsEditors;
+import org.eclipse.osee.ats.world.WorldEditor;
+import org.eclipse.osee.ats.world.WorldEditorSimpleProvider;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -87,7 +89,11 @@ public class NewActionJob extends Job {
// Because this is a job, it will automatically kill any popups that are created during.
// Thus, if multiple teams were selected to create, don't popup on openAction or dialog
// will exception out when it is killed at the end of this job.
- AtsEditors.openATSAction(result.getFirstTeam().getStoreObject(), AtsOpenOption.OpenAll);
+ if (result.getTeamWfs().size() == 1) {
+ AtsEditors.openATSAction(result.getFirstTeam().getStoreObject(), AtsOpenOption.OpenAll);
+ } else {
+ WorldEditor.open(new WorldEditorSimpleProvider("Workflows", result.getTeamWfArts()));
+ }
}
} catch (Exception ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/IWorldEditorProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/IWorldEditorProvider.java
index 13a4331c04..6b6b500637 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/IWorldEditorProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/IWorldEditorProvider.java
@@ -14,7 +14,7 @@ import java.util.Collection;
import org.eclipse.nebula.widgets.xviewer.core.model.CustomizeData;
import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.world.search.WorldSearchItem.SearchType;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
/**
@@ -43,6 +43,6 @@ public interface IWorldEditorProvider {
* Called in background during run process to perform the search. Implementers should perform new searches of the
* objects so they get loaded fresh. At this point, any items have already been de-cached.
*/
- Collection<Artifact> performSearch(SearchType searchType);
+ Collection<? extends ArtifactId> performSearch(SearchType searchType);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItemProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItemProvider.java
index e66657d4ef..37460fe6c5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItemProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItemProvider.java
@@ -142,7 +142,8 @@ public class WorldEditorParameterSearchItemProvider extends WorldEditorProvider
@Override
public Collection<Artifact> performSearch(SearchType searchType) {
- return worldParameterSearchItem.performSearch(searchType);
+ return org.eclipse.osee.framework.jdk.core.util.Collections.castAll(
+ worldParameterSearchItem.performSearch(searchType));
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorProvider.java
index be97f6de1e..ef98c4f3d3 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorProvider.java
@@ -21,6 +21,7 @@ import org.eclipse.nebula.widgets.xviewer.core.model.CustomizeData;
import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.world.search.WorldSearchItem.SearchType;
+import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -133,7 +134,7 @@ public abstract class WorldEditorProvider implements IWorldEditorProvider {
worldEditor.getWorldComposite().getXViewer().clear(forcePend);
// This will re-perform the search and since items are not cached, will load fresh
- Collection<Artifact> artifacts = performSearch(searchType);
+ Collection<Artifact> artifacts = Collections.castAll(performSearch(searchType));
if (cancel) {
monitor.done();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorSimpleProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorSimpleProvider.java
index 6892085c01..e49c2bfdb2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorSimpleProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorSimpleProvider.java
@@ -14,7 +14,7 @@ import java.util.Collection;
import org.eclipse.nebula.widgets.xviewer.core.model.CustomizeData;
import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.world.search.WorldSearchItem.SearchType;
-import org.eclipse.osee.framework.jdk.core.util.Collections;
+import org.eclipse.osee.framework.core.data.ArtifactId;
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.xnavigate.XNavigateComposite.TableLoadOption;
@@ -25,24 +25,24 @@ import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLo
public class WorldEditorSimpleProvider extends WorldEditorProvider {
private final String name;
- private Collection<Artifact> artifacts;
+ private Collection<? extends ArtifactId> artifacts;
private final Artifact expandToArtifact;
- public WorldEditorSimpleProvider(String name, Collection<? extends Artifact> artifacts) {
- this(name, artifacts, null, TableLoadOption.None);
+ public WorldEditorSimpleProvider(String name, Collection<? extends ArtifactId> collection) {
+ this(name, collection, null, TableLoadOption.None);
}
- public WorldEditorSimpleProvider(String name, Collection<? extends Artifact> artifacts, CustomizeData customizeData, TableLoadOption... tableLoadOption) {
- this(name, artifacts, customizeData, null, tableLoadOption);
+ public WorldEditorSimpleProvider(String name, Collection<? extends ArtifactId> collection, CustomizeData customizeData, TableLoadOption... tableLoadOption) {
+ this(name, collection, customizeData, null, tableLoadOption);
}
/**
* @param expandToArtifact if given, expand World Editor and highlight this item
*/
- public WorldEditorSimpleProvider(String name, Collection<? extends Artifact> artifacts, CustomizeData customizeData, Artifact expandToArtifact, TableLoadOption... tableLoadOption) {
+ public WorldEditorSimpleProvider(String name, Collection<? extends ArtifactId> artifacts, CustomizeData customizeData, Artifact expandToArtifact, TableLoadOption... tableLoadOption) {
super(customizeData, tableLoadOption);
this.name = name;
- this.artifacts = Collections.castAll(artifacts);
+ this.artifacts = artifacts;
this.expandToArtifact = expandToArtifact;
}
@@ -61,7 +61,7 @@ public class WorldEditorSimpleProvider extends WorldEditorProvider {
}
@Override
- public Collection<Artifact> performSearch(SearchType searchType) {
+ public Collection<? extends ArtifactId> performSearch(SearchType searchType) {
if (searchType == SearchType.ReSearch) {
artifacts = ArtifactQuery.getArtifactListFrom(artifacts, AtsClientService.get().getAtsBranch());
}

Back to the top