Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-08-18 03:54:18 +0000
committerDonald Dunne2016-09-15 16:59:26 +0000
commitc800c9d8ac661cbf545fec359a867e9ba3c7f0bc (patch)
treede7a42f722dfcc401cea3fa7860ac1a435908bb5
parentd5a2dd61569f06e2bc4813e300048f25e9843512 (diff)
downloadorg.eclipse.osee-c800c9d8ac661cbf545fec359a867e9ba3c7f0bc.tar.gz
org.eclipse.osee-c800c9d8ac661cbf545fec359a867e9ba3c7f0bc.tar.xz
org.eclipse.osee-c800c9d8ac661cbf545fec359a867e9ba3c7f0bc.zip
feature[ats_ATS310912]: Add ConvertVersionToAgileSprint
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/IAtsTeamDefinitionService.java3
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/IAtsClientVersionService.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsVersionServiceImpl.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/AtsTeamDefinitionService.java12
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java5
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsTeamDefinitionService.java12
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java135
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/AtsConfigCheckTreeDialog.java83
11 files changed, 269 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/IAtsTeamDefinitionService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/IAtsTeamDefinitionService.java
index 48dadbd9154..c40b4d4e7ae 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/IAtsTeamDefinitionService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/IAtsTeamDefinitionService.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.api.team;
import java.util.Collection;
import org.eclipse.osee.ats.api.IAtsWorkItem;
+import org.eclipse.osee.ats.api.agile.IAgileTeam;
import org.eclipse.osee.ats.api.program.IAtsProgram;
import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -28,4 +29,6 @@ public interface IAtsTeamDefinitionService {
IAtsTeamDefinition getTeamDefinition(String name);
+ Collection<IAtsTeamDefinition> getTeamDefinitions(IAgileTeam agileTeam);
+
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java
index 0f91cd25aca..81d5e07b52a 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java
@@ -40,4 +40,6 @@ public interface IRelationResolver {
List<ArtifactId> getRelatedArtifacts(IAtsWorkItem workItem, IRelationTypeSide relationTypeSide);
+ Collection<ArtifactId> getRelated(IAtsObject atsObject, IRelationTypeSide relationTypeSide);
+
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/IAtsClientVersionService.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/IAtsClientVersionService.java
index c21567ade6c..0f189290798 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/IAtsClientVersionService.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/IAtsClientVersionService.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.core.client.config;
+import java.util.Collection;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.version.IAtsVersion;
@@ -37,4 +38,6 @@ public interface IAtsClientVersionService extends IAtsVersionService {
IAtsVersion createVersion(String name, IAtsChangeSet changes);
+ Collection<IAtsVersion> getVersions(IAtsTeamDefinition teamDef);
+
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsVersionServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsVersionServiceImpl.java
index 5be96b367f1..06a0352be6d 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsVersionServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsVersionServiceImpl.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.core.client.internal.store;
+import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
@@ -140,4 +141,9 @@ public class AtsVersionServiceImpl extends AbstractAtsVersionServiceImpl impleme
return item;
}
+ @Override
+ public Collection<IAtsVersion> getVersions(IAtsTeamDefinition teamDef) {
+ return atsClient.getTeamDefinitionService().getVersions(teamDef);
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java
index 54492373c45..17957c50ad6 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java
@@ -170,4 +170,9 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
return Collections.castAll(getRelated(artifact, relationTypeSide));
}
+ @Override
+ public Collection<ArtifactId> getRelated(IAtsObject atsObject, IRelationTypeSide relationTypeSide) {
+ return getRelated(atsObject.getStoreObject(), relationTypeSide);
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/AtsTeamDefinitionService.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/AtsTeamDefinitionService.java
index 5440f318a7f..96836f4650f 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/AtsTeamDefinitionService.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/AtsTeamDefinitionService.java
@@ -12,8 +12,10 @@ package org.eclipse.osee.ats.core.client.team;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.LinkedList;
import java.util.List;
import org.eclipse.osee.ats.api.IAtsWorkItem;
+import org.eclipse.osee.ats.api.agile.IAgileTeam;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
@@ -80,4 +82,14 @@ public class AtsTeamDefinitionService implements IAtsTeamDefinitionService {
return teamDef;
}
+ @Override
+ public Collection<IAtsTeamDefinition> getTeamDefinitions(IAgileTeam agileTeam) {
+ List<IAtsTeamDefinition> teamDefs = new LinkedList<>();
+ for (Artifact atsTeamArt : AtsClientService.get().getArtifact(agileTeam).getRelatedArtifacts(
+ AtsRelationTypes.AgileTeamToAtsTeam_AtsTeam)) {
+ teamDefs.add(atsClient.getConfigItemFactory().getTeamDef(atsTeamArt));
+ }
+ return teamDefs;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java
index 96152b85d4e..ac1cb4e12b7 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java
@@ -169,4 +169,9 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
return Collections.castAll(getRelated(artifact, relationTypeSide));
}
+ @Override
+ public Collection<ArtifactId> getRelated(IAtsObject atsObject, IRelationTypeSide relationTypeSide) {
+ return getRelated(atsObject.getStoreObject(), relationTypeSide);
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsTeamDefinitionService.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsTeamDefinitionService.java
index f4c0a78ca9c..e35f6f51dc9 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsTeamDefinitionService.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsTeamDefinitionService.java
@@ -12,8 +12,10 @@ package org.eclipse.osee.ats.rest.internal.workitem;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.LinkedList;
import java.util.List;
import org.eclipse.osee.ats.api.IAtsWorkItem;
+import org.eclipse.osee.ats.api.agile.IAgileTeam;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
@@ -79,4 +81,14 @@ public class AtsTeamDefinitionService implements IAtsTeamDefinitionService {
return teamDef;
}
+ @Override
+ public Collection<IAtsTeamDefinition> getTeamDefinitions(IAgileTeam agileTeam) {
+ List<IAtsTeamDefinition> teamDefs = new LinkedList<>();
+ for (ArtifactReadable atsTeamArt : atsServer.getArtifact(agileTeam).getRelated(
+ AtsRelationTypes.AgileTeamToAtsTeam_AtsTeam)) {
+ teamDefs.add(atsServer.getConfigItemFactory().getTeamDef(atsTeamArt));
+ }
+ return teamDefs;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java
index 3b62be19fc1..4cd3b3318b5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java
@@ -313,6 +313,9 @@ public final class AtsNavigateViewItems implements XNavigateViewItems, IXNavigat
new CreateNewAgileFeatureGroup(agileItems);
new CreateNewAgileSprint(agileItems);
new CreateNewAgileBacklog(agileItems);
+ XNavigateItem conversionItems = new XNavigateItem(agileItems, "Conversions", FrameworkImage.VERSION);
+ new ConvertVersionToAgileSprint(conversionItems);
+
items.add(agileItems);
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, Level.SEVERE, "Can't create Agile section");
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java
new file mode 100644
index 00000000000..0003944f14a
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.navigate;
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+import javax.ws.rs.core.Response;
+import org.eclipse.osee.ats.AtsImage;
+import org.eclipse.osee.ats.api.agile.AgileEndpointApi;
+import org.eclipse.osee.ats.api.agile.IAgileSprint;
+import org.eclipse.osee.ats.api.agile.IAgileTeam;
+import org.eclipse.osee.ats.api.agile.JaxAgileSprint;
+import org.eclipse.osee.ats.api.agile.JaxNewAgileSprint;
+import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
+import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.version.IAtsVersion;
+import org.eclipse.osee.ats.core.client.IAtsClient;
+import org.eclipse.osee.ats.core.client.artifact.SprintArtifact;
+import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
+import org.eclipse.osee.ats.util.AtsUtil;
+import org.eclipse.osee.ats.util.widgets.dialog.AtsConfigCheckTreeDialog;
+import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+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.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
+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;
+import org.eclipse.osee.framework.ui.skynet.widgets.dialog.EntryDialog;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class ConvertVersionToAgileSprint extends XNavigateItemAction {
+
+ public ConvertVersionToAgileSprint(XNavigateItem parent) {
+ super(parent, "Convert Version(s) to Agile Sprint", AtsImage.AGILE_SPRINT);
+ }
+
+ @Override
+ public void run(TableLoadOption... tableLoadOptions) throws OseeCoreException {
+
+ List<IAgileTeam> activeAgileTeams = new LinkedList<>();
+ IAtsClient client = AtsClientService.get();
+ activeAgileTeams.addAll(
+ client.getQueryService().createQuery(AtsArtifactTypes.AgileTeam).andActive(true).getItems());
+
+ AtsConfigCheckTreeDialog<IAgileTeam> teamDialog =
+ new AtsConfigCheckTreeDialog<IAgileTeam>(getName(), "Select Agile Team", activeAgileTeams, true);
+ IAgileTeam agileTeam = null;
+ if (teamDialog.open() != 0) {
+ return;
+ }
+ agileTeam = teamDialog.getChecked().iterator().next();
+
+ Collection<IAtsTeamDefinition> teamDefs = client.getTeamDefinitionService().getTeamDefinitions(agileTeam);
+ if (teamDefs.isEmpty()) {
+ AWorkbench.popup("No Team Definitions configured for Agile Team " + agileTeam);
+ return;
+ }
+ IAtsTeamDefinition teamDefHoldingVersions =
+ client.getTeamDefinitionService().getTeamDefHoldingVersions(teamDefs.iterator().next());
+ Collection<IAtsVersion> versions = client.getVersionService().getVersions(teamDefHoldingVersions);
+
+ AtsConfigCheckTreeDialog<IAtsVersion> versionDialog =
+ new AtsConfigCheckTreeDialog<IAtsVersion>(getName(), "Select Version(s)", versions, true);
+ Collection<IAtsVersion> selectedVersions = null;
+ if (versionDialog.open() != 0) {
+ return;
+ }
+ selectedVersions = versionDialog.getChecked();
+
+ String newTitle = null;
+ boolean useVersionTitle = true;
+ if (selectedVersions.size() == 1) {
+ EntryDialog ed = new EntryDialog(getName(), "Enter new Agile Sprint name(s) (comma delimited)");
+ ed.setEntry(selectedVersions.iterator().next().getName());
+ if (ed.open() == 0) {
+ if (Strings.isValid(ed.getEntry())) {
+ newTitle = ed.getEntry();
+ useVersionTitle = false;
+ }
+ }
+ }
+ try {
+ AgileEndpointApi ageilEp = AtsClientService.getAgileEndpoint();
+ JaxNewAgileSprint newSprint = new JaxNewAgileSprint();
+ long teamUuid = agileTeam.getUuid();
+
+ List<IAgileSprint> sprints = new LinkedList<>();
+ for (IAtsVersion version : selectedVersions) {
+ newSprint.setName(useVersionTitle ? version.getName() : newTitle);
+ newSprint.setTeamUuid(teamUuid);
+ Response response = ageilEp.createSprint(new Long(teamUuid), newSprint);
+ JaxAgileSprint jaxSprint = response.readEntity(JaxAgileSprint.class);
+ if (jaxSprint != null) {
+ long uuid = jaxSprint.getUuid();
+ IAgileSprint sprint = (SprintArtifact) client.getArtifact(uuid);
+ ((Artifact) sprint.getStoreObject()).getParent().reloadAttributesAndRelations();
+
+ IAtsChangeSet changes =
+ client.getStoreService().createAtsChangeSet(getName(), client.getUserService().getCurrentUser());
+ Collection<ArtifactId> teamWfs = client.getRelationResolver().getRelated(version,
+ AtsRelationTypes.TeamWorkflowTargetedForVersion_Workflow);
+ for (ArtifactId teamWf : teamWfs) {
+ changes.relate(sprint, AtsRelationTypes.AgileSprintToItem_AtsItem, teamWf);
+ }
+ changes.executeIfNeeded();
+
+ } else {
+ AWorkbench.popup("Error creating Agile Team [%s]", response.toString());
+ return;
+ }
+ }
+ AtsUtil.openInAtsWorldEditor(sprints, getName());
+ } catch (Exception ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/AtsConfigCheckTreeDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/AtsConfigCheckTreeDialog.java
new file mode 100644
index 00000000000..3bb1bc9a3fb
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/AtsConfigCheckTreeDialog.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.osee.ats.util.widgets.dialog;
+
+import java.util.Collection;
+import java.util.List;
+import org.eclipse.osee.ats.config.editor.AtsConfigContentProvider;
+import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.util.AtsObjectLabelProvider;
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.logging.OseeLevel;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.ui.skynet.ToStringViewerSorter;
+import org.eclipse.osee.framework.ui.skynet.widgets.dialog.FilteredCheckboxTreeDialog;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class AtsConfigCheckTreeDialog<T> extends FilteredCheckboxTreeDialog {
+
+ private List<T> initialConfigObjects;
+ private final boolean requiredSelection;
+ private final Collection<T> selectableConfigObjects;
+
+ public AtsConfigCheckTreeDialog(String title, String message, Collection<T> selectableTeamDefs, boolean requiredSelection) {
+ super(title, message, new AtsConfigContentProvider(), new AtsObjectLabelProvider(), new ToStringViewerSorter());
+ this.selectableConfigObjects = selectableTeamDefs;
+ this.requiredSelection = requiredSelection;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Collection<T> getChecked() {
+ return super.getTreeViewer().getChecked();
+ }
+
+ @Override
+ protected Control createDialogArea(Composite container) {
+ Control comp = super.createDialogArea(container);
+ try {
+ getTreeViewer().getViewer().setInput(selectableConfigObjects);
+ if (getInitialConfigObjects() != null) {
+ getTreeViewer().setInitalChecked(getInitialConfigObjects());
+ }
+ } catch (Exception ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
+ return comp;
+ }
+
+ @Override
+ protected Result isComplete() {
+ Result result = Result.TrueResult;
+ try {
+ if (requiredSelection && getChecked().isEmpty()) {
+ result = new Result("Must select Item(s)");
+ }
+ } catch (Exception ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
+ return result;
+ }
+
+ public List<T> getInitialConfigObjects() {
+ return initialConfigObjects;
+ }
+
+ public void setInitialConfigObjects(List<T> initialConfigObjects) {
+ this.initialConfigObjects = initialConfigObjects;
+ }
+
+}

Back to the top