Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-09-14 14:04:35 -0400
committerMegumi Telles2016-09-15 11:02:04 -0400
commitad60920a1d0742440f6b5d127a7cb086f01dc716 (patch)
treec9c0c5d4f20f4a8da51d54cdd4101c7ed8e1ae83
parent0fae680b42cd178af4f790a0d5f5d73dda30af5f (diff)
downloadorg.eclipse.osee-ad60920a1d0742440f6b5d127a7cb086f01dc716.tar.gz
org.eclipse.osee-ad60920a1d0742440f6b5d127a7cb086f01dc716.tar.xz
org.eclipse.osee-ad60920a1d0742440f6b5d127a7cb086f01dc716.zip
bug[ats_ATS303551]: Fix work package search widgets
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/AtsBulkLoad.java1
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/InsertionActivitySearchWidget.java140
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/InsertionSearchWidget.java119
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/WorkPackageSearchWidget.java208
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsWorldEditorItem.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorInputFactory.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java3
7 files changed, 27 insertions, 452 deletions
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/AtsBulkLoad.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/AtsBulkLoad.java
index 340adc628ef..7cef4800a99 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/AtsBulkLoad.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/AtsBulkLoad.java
@@ -89,7 +89,6 @@ public class AtsBulkLoad {
AtsRelationTypes.ActionToWorkflow_WorkFlow));
}
arts.addAll(artifacts);
- System.err.println("bulk loaded " + arts.size());
return arts;
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/InsertionActivitySearchWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/InsertionActivitySearchWidget.java
index f61e2623fee..884ebe9b8a4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/InsertionActivitySearchWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/InsertionActivitySearchWidget.java
@@ -12,28 +12,15 @@ package org.eclipse.osee.ats.search.widget;
import java.util.Arrays;
import java.util.Collection;
-import java.util.List;
-import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.insertion.IAtsInsertion;
import org.eclipse.osee.ats.api.insertion.IAtsInsertionActivity;
-import org.eclipse.osee.ats.api.program.IAtsProgram;
import org.eclipse.osee.ats.api.query.AtsSearchData;
import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.world.WorldEditorParameterSearchItem;
-import org.eclipse.osee.framework.core.data.ArtifactId;
-import org.eclipse.osee.framework.jdk.core.type.Named;
-import org.eclipse.osee.framework.jdk.core.type.NamedIdentity;
import org.eclipse.osee.framework.jdk.core.util.Collections;
-import org.eclipse.osee.framework.ui.plugin.util.ArrayTreeContentProvider;
-import org.eclipse.osee.framework.ui.plugin.util.StringLabelProvider;
-import org.eclipse.osee.framework.ui.skynet.util.StringNameSorter;
import org.eclipse.osee.framework.ui.skynet.widgets.XComboViewer;
-import org.eclipse.osee.framework.ui.skynet.widgets.XWidget;
-import org.eclipse.osee.framework.ui.skynet.widgets.dialog.FilteredTreeDialog;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
/**
* @author Donald G. Dunne
@@ -42,12 +29,6 @@ public class InsertionActivitySearchWidget extends AbstractXComboViewerSearchWid
public static final String INSERTION_ACTIVITY = "Insertion Activity";
private InsertionSearchWidget insertionWidget;
- private ProgramSearchWidget programWidget;
- protected static IAtsInsertionActivity selectOtherActive =
- new NullInsertionActivity("-- select from active --", 1L);
- protected static IAtsInsertionActivity selectOther = new NullInsertionActivity("-- select from all --", 2L);
- private final List<IAtsInsertionActivity> selectOthers =
- Arrays.asList(selectOtherActive, selectOther);
public InsertionActivitySearchWidget(WorldEditorParameterSearchItem searchItem) {
super(INSERTION_ACTIVITY, searchItem);
@@ -69,15 +50,14 @@ public class InsertionActivitySearchWidget extends AbstractXComboViewerSearchWid
@Override
public Collection<IAtsInsertionActivity> getInput() {
- if (insertionWidget == null || insertionWidget.get() == null) {
- return selectOthers;
+ if (insertionWidget != null && insertionWidget.get() != null) {
+ Object obj = insertionWidget.getWidget().getSelected();
+ if (obj != null && obj instanceof IAtsInsertion) {
+ return Collections.castAll(
+ AtsClientService.get().getProgramService().getInsertionActivities(insertionWidget.get()));
+ }
}
- return Collections.castAll(
- AtsClientService.get().getProgramService().getInsertionActivities(insertionWidget.get()));
- }
-
- public void setProgramWidget(ProgramSearchWidget programWidget) {
- this.programWidget = programWidget;
+ return java.util.Collections.emptyList();
}
public void setInsertionWidget(InsertionSearchWidget insertionWidget) {
@@ -101,110 +81,4 @@ public class InsertionActivitySearchWidget extends AbstractXComboViewerSearchWid
}
}
- @Override
- public void setup(XWidget widget) {
- super.setup(widget);
- XComboViewer combo = getWidget();
- combo.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (selectOthers.contains(combo.getSelected())) {
- FilteredTreeDialog dialog =
- new FilteredTreeDialog("Select Insertion Activity", "Select Insertion Activity",
- new ArrayTreeContentProvider(), new InsertionActivityLabelProvider(), new StringNameSorter());
- dialog.setMultiSelect(false);
- if (combo.getSelected().equals(selectOtherActive)) {
- dialog.setInput(
- AtsClientService.get().getQueryService().createQuery(AtsArtifactTypes.InsertionActivity).andActive(
- true).getItems());
- } else if (combo.getSelected().equals(selectOther)) {
- dialog.setInput(AtsClientService.get().getQueryService().createQuery(
- AtsArtifactTypes.InsertionActivity).getItems());
- }
- if (dialog.open() == 0) {
- IAtsInsertionActivity selectedInsertionActivity = dialog.getSelectedFirst();
-
- IAtsInsertion insertion =
- AtsClientService.get().getProgramService().getInsertion(selectedInsertionActivity);
-
- IAtsProgram program = AtsClientService.get().getProgramService().getProgram(insertion);
-
- programWidget.getWidget().setInput(Arrays.asList(AbstractXComboViewerSearchWidget.CLEAR, program));
- programWidget.getWidget().setSelected(Arrays.asList(program));
-
- insertionWidget.getWidget().setInput(
- Arrays.asList(AbstractXComboViewerSearchWidget.CLEAR, insertion));
- insertionWidget.getWidget().setSelected(Arrays.asList(insertion));
-
- combo.setSelected(Arrays.asList(selectedInsertionActivity));
- }
- }
- }
-
- });
-
- }
-
- private class InsertionActivityLabelProvider extends StringLabelProvider {
-
- @Override
- public String getText(Object arg0) {
- if (arg0 instanceof IAtsInsertionActivity) {
- IAtsInsertionActivity insertionActivity = (IAtsInsertionActivity) arg0;
- IAtsInsertion insertion = AtsClientService.get().getProgramService().getInsertion(insertionActivity);
- IAtsProgram program = AtsClientService.get().getProgramService().getProgram(insertion);
- return String.format("%s - %s - %s", program, insertion, insertionActivity);
- }
- return super.getText(arg0);
- }
- }
-
- private static class NullInsertionActivity extends NamedIdentity<Long> implements IAtsInsertionActivity {
-
- private NullInsertionActivity(String name, Long uuid) {
- super(uuid, name);
- }
-
- @Override
- public boolean isActive() {
- return true;
- }
-
- @Override
- public String toStringWithId() {
- return String.format("%s - %s", getName(), getUuid());
- }
-
- @Override
- public ArtifactId getStoreObject() {
- return null;
- }
-
- @Override
- public void setStoreObject(ArtifactId artifact) {
- // do nothing
- }
-
- @Override
- public String getDescription() {
- return null;
- }
-
- @Override
- public int compareTo(Named o) {
- return 0;
- }
-
- @Override
- public Long getUuid() {
- return super.getGuid();
- }
-
- @Override
- public long getInsertionUuid() {
- return 0;
- }
- }
-
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/InsertionSearchWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/InsertionSearchWidget.java
index 2296fdce63b..a243425a7da 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/InsertionSearchWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/InsertionSearchWidget.java
@@ -12,27 +12,15 @@ package org.eclipse.osee.ats.search.widget;
import java.util.Arrays;
import java.util.Collection;
-import java.util.List;
-import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.insertion.IAtsInsertion;
import org.eclipse.osee.ats.api.program.IAtsProgram;
import org.eclipse.osee.ats.api.query.AtsSearchData;
import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.world.WorldEditorParameterSearchItem;
-import org.eclipse.osee.framework.core.data.ArtifactId;
-import org.eclipse.osee.framework.jdk.core.type.Named;
-import org.eclipse.osee.framework.jdk.core.type.NamedIdentity;
import org.eclipse.osee.framework.jdk.core.util.Collections;
-import org.eclipse.osee.framework.ui.plugin.util.ArrayTreeContentProvider;
-import org.eclipse.osee.framework.ui.plugin.util.StringLabelProvider;
-import org.eclipse.osee.framework.ui.skynet.util.StringNameSorter;
import org.eclipse.osee.framework.ui.skynet.widgets.XComboViewer;
-import org.eclipse.osee.framework.ui.skynet.widgets.XWidget;
-import org.eclipse.osee.framework.ui.skynet.widgets.dialog.FilteredTreeDialog;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
/**
* @author Donald G. Dunne
@@ -41,9 +29,6 @@ public class InsertionSearchWidget extends AbstractXComboViewerSearchWidget<IAts
public static final String INSERTION = "Insertion";
private ProgramSearchWidget programWidget;
- protected static IAtsInsertion selectOtherActive = new NullInsertion("-- select from active --", 1L);
- protected static IAtsInsertion selectOther = new NullInsertion("-- select from all --", 2L);
- private final List<IAtsInsertion> selectOthers = Arrays.asList(selectOtherActive, selectOther);
public InsertionSearchWidget(WorldEditorParameterSearchItem searchItem) {
super(INSERTION, searchItem);
@@ -64,10 +49,13 @@ public class InsertionSearchWidget extends AbstractXComboViewerSearchWidget<IAts
@Override
public Collection<IAtsInsertion> getInput() {
- if (programWidget == null || programWidget.get() == null) {
- return selectOthers;
+ if (programWidget != null && programWidget.get() != null) {
+ Object obj = programWidget.getWidget().getSelected();
+ if (obj != null && obj instanceof IAtsProgram) {
+ return Collections.castAll(AtsClientService.get().getProgramService().getInsertions(programWidget.get()));
+ }
}
- return Collections.castAll(AtsClientService.get().getProgramService().getInsertions(programWidget.get()));
+ return java.util.Collections.emptyList();
}
public void setProgramWidget(ProgramSearchWidget programWidget) {
@@ -90,99 +78,4 @@ public class InsertionSearchWidget extends AbstractXComboViewerSearchWidget<IAts
}
}
- private static class NullInsertion extends NamedIdentity<Long> implements IAtsInsertion {
-
- private NullInsertion(String name, Long uuid) {
- super(uuid, name);
- }
-
- @Override
- public boolean isActive() {
- return true;
- }
-
- @Override
- public String toStringWithId() {
- return String.format("%s - %s", getName(), getUuid());
- }
-
- @Override
- public ArtifactId getStoreObject() {
- return null;
- }
-
- @Override
- public void setStoreObject(ArtifactId artifact) {
- // do nothing
- }
-
- @Override
- public String getDescription() {
- return null;
- }
-
- @Override
- public long getProgramUuid() {
- return 0;
- }
-
- @Override
- public int compareTo(Named o) {
- return 0;
- }
-
- @Override
- public Long getUuid() {
- return super.getGuid();
- }
- }
-
- @Override
- public void setup(XWidget widget) {
- super.setup(widget);
- XComboViewer combo = getWidget();
- combo.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (selectOthers.contains(combo.getSelected())) {
- FilteredTreeDialog dialog = new FilteredTreeDialog("Select Insertion", "Select Insertion",
- new ArrayTreeContentProvider(), new InsertionLabelProvider(), new StringNameSorter());
- dialog.setMultiSelect(false);
- if (combo.getSelected().equals(selectOtherActive)) {
- dialog.setInput(
- AtsClientService.get().getQueryService().createQuery(AtsArtifactTypes.Insertion).andActive(
- true).getItems());
- } else if (combo.getSelected().equals(selectOther)) {
- dialog.setInput(
- AtsClientService.get().getQueryService().createQuery(AtsArtifactTypes.Insertion).getItems());
- }
- if (dialog.open() == 0) {
- IAtsInsertion selectedInsertion = dialog.getSelectedFirst();
- IAtsProgram program = AtsClientService.get().getProgramService().getProgram(selectedInsertion);
- List<Object> programs = Arrays.asList(AbstractXComboViewerSearchWidget.CLEAR, program);
- programWidget.getWidget().setInput(programs);
- programWidget.getWidget().setSelected(programs);
-
- combo.setSelected(Arrays.asList(selectedInsertion));
- }
- }
- }
-
- });
-
- }
-
- private class InsertionLabelProvider extends StringLabelProvider {
-
- @Override
- public String getText(Object arg0) {
- if (arg0 instanceof IAtsInsertion) {
- IAtsInsertion insertion = (IAtsInsertion) arg0;
- IAtsProgram program = AtsClientService.get().getProgramService().getProgram(insertion);
- return String.format("%s - %s", program, insertion);
- }
- return super.getText(arg0);
- }
- }
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/WorkPackageSearchWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/WorkPackageSearchWidget.java
index 98bf09328bc..2ca354e7b00 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/WorkPackageSearchWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/WorkPackageSearchWidget.java
@@ -12,38 +12,15 @@ package org.eclipse.osee.ats.search.widget;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Date;
-import java.util.LinkedList;
-import java.util.List;
-import org.eclipse.osee.ats.api.IAtsConfigObject;
-import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
-import org.eclipse.osee.ats.api.ev.AtsWorkPackageType;
import org.eclipse.osee.ats.api.ev.IAtsWorkPackage;
-import org.eclipse.osee.ats.api.insertion.IAtsInsertion;
import org.eclipse.osee.ats.api.insertion.IAtsInsertionActivity;
-import org.eclipse.osee.ats.api.program.IAtsProgram;
import org.eclipse.osee.ats.api.query.AtsSearchData;
-import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.world.WorldEditorParameterSearchItem;
-import org.eclipse.osee.framework.core.data.ArtifactId;
-import org.eclipse.osee.framework.core.data.IArtifactToken;
-import org.eclipse.osee.framework.jdk.core.type.Named;
-import org.eclipse.osee.framework.jdk.core.type.NamedIdentity;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
-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.util.ArrayTreeContentProvider;
-import org.eclipse.osee.framework.ui.plugin.util.StringLabelProvider;
-import org.eclipse.osee.framework.ui.skynet.util.StringNameSorter;
import org.eclipse.osee.framework.ui.skynet.widgets.XComboViewer;
-import org.eclipse.osee.framework.ui.skynet.widgets.XWidget;
-import org.eclipse.osee.framework.ui.skynet.widgets.dialog.FilteredTreeDialog;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
/**
* @author Donald G. Dunne
@@ -52,11 +29,6 @@ public class WorkPackageSearchWidget extends AbstractXComboViewerSearchWidget<IA
public static final String WORK_PACKAGE = "Work Package";
private InsertionActivitySearchWidget insertionActivityWidget;
- private InsertionSearchWidget insertionWidget;
- private ProgramSearchWidget programWidget;
- protected static IAtsWorkPackage selectOtherActive = new NullWorkPackage("-- select from active --", "guid1");
- protected static IAtsWorkPackage selectOther = new NullWorkPackage("-- select from all --", "guid2");
- private final List<IAtsWorkPackage> selectOthers = Arrays.asList(selectOtherActive, selectOther);
public WorkPackageSearchWidget(WorldEditorParameterSearchItem searchItem) {
super(WORK_PACKAGE, searchItem);
@@ -77,11 +49,14 @@ public class WorkPackageSearchWidget extends AbstractXComboViewerSearchWidget<IA
@Override
public Collection<IAtsWorkPackage> getInput() {
- if (insertionActivityWidget == null || insertionActivityWidget.get() == null) {
- return selectOthers;
+ if (insertionActivityWidget != null && insertionActivityWidget.get() != null) {
+ Object selected = insertionActivityWidget.getWidget().getSelected();
+ if (selected != null && selected instanceof IAtsInsertionActivity) {
+ return Collections.castAll(
+ AtsClientService.get().getEarnedValueService().getWorkPackages(insertionActivityWidget.get()));
+ }
}
- return Collections.castAll(
- AtsClientService.get().getEarnedValueService().getWorkPackages(insertionActivityWidget.get()));
+ return java.util.Collections.emptyList();
}
public void setInsertionActivityWidget(InsertionActivitySearchWidget insertionActivityWidget) {
@@ -104,173 +79,4 @@ public class WorkPackageSearchWidget extends AbstractXComboViewerSearchWidget<IA
}
}
- @Override
- public void setup(XWidget widget) {
- super.setup(widget);
- XComboViewer combo = getWidget();
- combo.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (selectOthers.contains(combo.getSelected())) {
- FilteredTreeDialog dialog = new FilteredTreeDialog("Select Work Package", "Select Work Package",
- new ArrayTreeContentProvider(), new WorkPackageLabelProvider(), new StringNameSorter());
- dialog.setMultiSelect(false);
- if (combo.getSelected().equals(selectOtherActive)) {
- Collection<IArtifactToken> tokens = ArtifactQuery.getArtifactTokenListFromTypeAndActive(
- AtsArtifactTypes.WorkPackage, AtsUtilCore.getAtsBranch());
- Collection<IAtsConfigObject> items = new LinkedList<>();
- for (Artifact art : ArtifactQuery.getArtifactListFromTokens(tokens, AtsUtilCore.getAtsBranch())) {
- items.add(AtsClientService.get().getConfigItemFactory().getWorkPackage(art));
- }
- dialog.setInput(items);
- } else if (combo.getSelected().equals(selectOther)) {
- Collection<IArtifactToken> tokens = ArtifactQuery.getArtifactTokenListFromType(
- AtsArtifactTypes.WorkPackage, AtsUtilCore.getAtsBranch());
- Collection<IAtsConfigObject> items = new LinkedList<>();
- for (Artifact art : ArtifactQuery.getArtifactListFromTokens(tokens, AtsUtilCore.getAtsBranch())) {
- items.add(AtsClientService.get().getConfigItemFactory().getWorkPackage(art));
- }
- dialog.setInput(items);
- }
- if (dialog.open() == 0) {
- IAtsWorkPackage selectedWorkPackage = dialog.getSelectedFirst();
-
- IAtsInsertionActivity insertionActivity =
- AtsClientService.get().getProgramService().getInsertionActivity(selectedWorkPackage);
-
- IAtsInsertion insertion = AtsClientService.get().getProgramService().getInsertion(insertionActivity);
-
- IAtsProgram program = AtsClientService.get().getProgramService().getProgram(insertion);
-
- programWidget.getWidget().setInput(Arrays.asList(AbstractXComboViewerSearchWidget.CLEAR, program));
- programWidget.getWidget().setSelected(Arrays.asList(program));
-
- insertionWidget.getWidget().setInput(
- Arrays.asList(AbstractXComboViewerSearchWidget.CLEAR, insertion));
- insertionWidget.getWidget().setSelected(Arrays.asList(insertion));
-
- insertionActivityWidget.getWidget().setInput(
- Arrays.asList(AbstractXComboViewerSearchWidget.CLEAR, insertionActivity));
- insertionActivityWidget.getWidget().setSelected(Arrays.asList(insertionActivity));
-
- combo.setSelected(Arrays.asList(selectedWorkPackage));
- }
- }
- }
-
- });
-
- }
-
- private class WorkPackageLabelProvider extends StringLabelProvider {
-
- @Override
- public String getText(Object arg0) {
- if (arg0 instanceof IAtsInsertionActivity) {
- IAtsWorkPackage workPacakage = (IAtsWorkPackage) arg0;
-
- IAtsInsertionActivity insertionActivity =
- AtsClientService.get().getProgramService().getInsertionActivity(workPacakage);
-
- IAtsInsertion insertion = AtsClientService.get().getProgramService().getInsertion(insertionActivity);
-
- IAtsProgram program = AtsClientService.get().getProgramService().getProgram(insertion);
- return String.format("%s - %s - %s - %s", program, insertion, insertionActivity, workPacakage);
- }
- return super.getText(arg0);
- }
- }
-
- private static class NullWorkPackage extends NamedIdentity<String> implements IAtsWorkPackage {
-
- private NullWorkPackage(String name, String guid) {
- super(guid, name);
- }
-
- @Override
- public boolean isActive() {
- return true;
- }
-
- @Override
- public String toStringWithId() {
- return String.format("%s - %s", getName(), getUuid());
- }
-
- @Override
- public ArtifactId getStoreObject() {
- return null;
- }
-
- @Override
- public void setStoreObject(ArtifactId artifact) {
- // do nothing
- }
-
- @Override
- public String getDescription() {
- return null;
- }
-
- @Override
- public int compareTo(Named o) {
- return 0;
- }
-
- @Override
- public String getActivityId() throws OseeCoreException {
- return null;
- }
-
- @Override
- public String getActivityName() throws OseeCoreException {
- return null;
- }
-
- @Override
- public String getWorkPackageId() throws OseeCoreException {
- return null;
- }
-
- @Override
- public String getWorkPackageProgram() throws OseeCoreException {
- return null;
- }
-
- @Override
- public AtsWorkPackageType getWorkPackageType() throws OseeCoreException {
- return null;
- }
-
- @Override
- public int getWorkPackagePercent() throws OseeCoreException {
- return 0;
- }
-
- @Override
- public Date getStartDate() throws OseeCoreException {
- return null;
- }
-
- @Override
- public Date getEndDate() throws OseeCoreException {
- return null;
- }
-
- @Override
- public Long getUuid() {
- return null;
- }
-
- }
-
- public void setInsertionWidget(InsertionSearchWidget insertionWidget) {
- this.insertionWidget = insertionWidget;
- }
-
- public void setProgramWidget(ProgramSearchWidget programWidget) {
- this.programWidget = programWidget;
- }
-
}
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 43e271d6f74..abfb70c59fe 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
@@ -37,7 +37,7 @@ public class AtsWorldEditorItem extends AtsWorldEditorItemBase {
public List<AtsSearchWorkflowSearchItem> getSearchWorkflowSearchItems() {
return Arrays.asList(new AtsSearchWorkflowSearchItem(), new AtsSearchTeamWorkflowSearchItem(),
new AtsSearchTaskSearchItem(), new AtsSearchReviewSearchItem(), new AtsSearchGoalSearchItem(),
- new AtsSearchWorkPackageSearchItem());
+ new AtsSearchWorkPackageSearchItem(), new AtsSearchWorkPackageSearchItem());
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorInputFactory.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorInputFactory.java
index a1df6a2cc3a..1f3ffdc1de2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorInputFactory.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorInputFactory.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.ats.world.search.AtsSearchGoalSearchItem;
import org.eclipse.osee.ats.world.search.AtsSearchReviewSearchItem;
import org.eclipse.osee.ats.world.search.AtsSearchTaskSearchItem;
import org.eclipse.osee.ats.world.search.AtsSearchTeamWorkflowSearchItem;
+import org.eclipse.osee.ats.world.search.AtsSearchWorkPackageSearchItem;
import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.ui.IElementFactory;
@@ -81,6 +82,11 @@ public class WorldEditorInputFactory implements IElementFactory {
searchItem.setRestoreUuid(atsSearchUuid);
return new WorldEditorInput(new WorldEditorParameterSearchItemProvider(searchItem, null));
}
+ if (AtsSearchWorkPackageSearchItem.NAMESPACE.equals(namespace)) {
+ AtsSearchWorkPackageSearchItem searchItem = new AtsSearchWorkPackageSearchItem();
+ searchItem.setRestoreUuid(atsSearchUuid);
+ return new WorldEditorInput(new WorldEditorParameterSearchItemProvider(searchItem, null));
+ }
for (IAtsWorldEditorItem item : AtsWorldEditorItems.getItems()) {
if (item.isWorldEditorSearchProviderNamespaceMatch(namespace)) {
return item.getNewWorldEditorInputFromNamespace(namespace, atsSearchUuid);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java
index c302659ca58..88107de21df 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java
@@ -201,12 +201,9 @@ public abstract class WorldEditorParameterSearchItem extends WorldSearchItem imp
} else if (widget.getLabel().equals(InsertionActivitySearchWidget.INSERTION_ACTIVITY)) {
getInsertionActivity().setup(widget);
getInsertionActivity().setInsertionWidget(getInsertion());
- getInsertionActivity().setProgramWidget(getProgram());
} else if (widget.getLabel().equals(WorkPackageSearchWidget.WORK_PACKAGE)) {
getWorkPackage().setup(widget);
getWorkPackage().setInsertionActivityWidget(getInsertionActivity());
- getWorkPackage().setInsertionWidget(getInsertion());
- getWorkPackage().setProgramWidget(getProgram());
} else if (widget.getLabel().equals(ColorTeamSearchWidget.COLOR_TEAM)) {
getColorTeam().setup(widget);
} else if (widget.getLabel().equals(UserSearchWidget.USER)) {

Back to the top