Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-08-17 13:28:58 -0400
committerdonald.g.dunne2016-09-01 20:21:05 -0400
commit5b0c08036553535c7906e4e1725a7e468b52b3a2 (patch)
tree9707fd854c693596cf2defb5a67290f8058f2086
parentf313163ef2314472e411869a19dd9b19565659de (diff)
downloadorg.eclipse.osee-5b0c08036553535c7906e4e1725a7e468b52b3a2.tar.gz
org.eclipse.osee-5b0c08036553535c7906e4e1725a7e468b52b3a2.tar.xz
org.eclipse.osee-5b0c08036553535c7906e4e1725a7e468b52b3a2.zip
bug[ats_ATS302825]: NR Alpha - Convert ParentTopTeamColumnUI to pre-computed
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractMembersOrderColumn.java15
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AtsColumnIdUI.java18
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BranchStatusColumn.java18
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/IAtsXViewerPreComputedColumn.java35
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ParentTopTeamColumnUI.java40
6 files changed, 72 insertions, 63 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java
index ebe81e250a..39eac5e9da 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java
@@ -20,7 +20,6 @@ import java.util.Map;
import java.util.Set;
import org.eclipse.nebula.widgets.xviewer.IAltLeftClickProvider;
import org.eclipse.nebula.widgets.xviewer.IMultiColumnEditProvider;
-import org.eclipse.nebula.widgets.xviewer.IXViewerPreComputedColumn;
import org.eclipse.nebula.widgets.xviewer.XViewer;
import org.eclipse.nebula.widgets.xviewer.core.model.SortDataType;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
@@ -33,6 +32,7 @@ import org.eclipse.osee.ats.api.agile.JaxAgileFeatureGroup;
import org.eclipse.osee.ats.api.agile.JaxAgileItem;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.ats.column.IAtsXViewerPreComputedColumn;
import org.eclipse.osee.ats.core.client.action.ActionManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
@@ -59,7 +59,7 @@ import org.eclipse.swt.widgets.TreeItem;
/**
* @author Donald G. Dunne
*/
-public class AgileFeatureGroupColumn extends XViewerAtsColumn implements IXViewerPreComputedColumn, IAltLeftClickProvider, IMultiColumnEditProvider {
+public class AgileFeatureGroupColumn extends XViewerAtsColumn implements IAtsXViewerPreComputedColumn, IAltLeftClickProvider, IMultiColumnEditProvider {
public static AgileFeatureGroupColumn instance = new AgileFeatureGroupColumn();
@@ -194,11 +194,6 @@ public class AgileFeatureGroupColumn extends XViewerAtsColumn implements IXViewe
}
@Override
- public String getText(Object obj, Long key, String cachedValue) {
- return cachedValue;
- }
-
- @Override
public void populateCachedValues(Collection<?> objects, Map<Long, String> preComputedValueMap) {
for (Object element : objects) {
try {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractMembersOrderColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractMembersOrderColumn.java
index 55e5a48497..0a3bf87205 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractMembersOrderColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractMembersOrderColumn.java
@@ -14,11 +14,9 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.nebula.widgets.xviewer.IAltLeftClickProvider;
-import org.eclipse.nebula.widgets.xviewer.IXViewerPreComputedColumn;
import org.eclipse.nebula.widgets.xviewer.XViewer;
-import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
import org.eclipse.nebula.widgets.xviewer.core.model.SortDataType;
-import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
import org.eclipse.osee.ats.artifact.MembersManager;
import org.eclipse.osee.ats.core.client.artifact.CollectorArtifact;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn;
@@ -31,7 +29,7 @@ import org.eclipse.osee.framework.ui.skynet.util.LogUtil;
/**
* @author Donald G. Dunne
*/
-public abstract class AbstractMembersOrderColumn extends XViewerAtsColumn implements IXViewerPreComputedColumn, IAltLeftClickProvider {
+public abstract class AbstractMembersOrderColumn extends XViewerAtsColumn implements IAtsXViewerPreComputedColumn, IAltLeftClickProvider {
public static final Integer DEFAULT_WIDTH = 45;
Map<Long, String> multiMembersValueMap = new HashMap<>();
@@ -41,15 +39,6 @@ public abstract class AbstractMembersOrderColumn extends XViewerAtsColumn implem
super(id, name, width, align, show, sortDataType, multiColumnEditable, description);
}
- @Override
- public Long getKey(Object obj) {
- Long result = 0L;
- if (obj instanceof IAtsObject) {
- result = ((IAtsObject) obj).getUuid();
- }
- return result;
- }
-
public abstract Artifact getParentMembersArtifact(WorldXViewer worldXViewer);
public abstract MembersManager<?> getMembersManager();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AtsColumnIdUI.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AtsColumnIdUI.java
index 1b383c4b71..8479a8215e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AtsColumnIdUI.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AtsColumnIdUI.java
@@ -12,12 +12,10 @@ package org.eclipse.osee.ats.column;
import java.util.Collection;
import java.util.Map;
-import org.eclipse.nebula.widgets.xviewer.IXViewerPreComputedColumn;
import org.eclipse.nebula.widgets.xviewer.core.model.SortDataType;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.IAtsServices;
-import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.column.AtsColumnIdValueColumn;
import org.eclipse.osee.ats.api.config.ColumnAlign;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn;
@@ -28,7 +26,7 @@ import org.eclipse.osee.framework.ui.skynet.util.LogUtil;
*
* @author Donald G. Dunne
*/
-public class AtsColumnIdUI extends XViewerAtsColumn implements IXViewerPreComputedColumn {
+public class AtsColumnIdUI extends XViewerAtsColumn implements IAtsXViewerPreComputedColumn {
private final AtsColumnIdValueColumn columnIdColumn;
private final IAtsServices services;
@@ -56,15 +54,6 @@ public class AtsColumnIdUI extends XViewerAtsColumn implements IXViewerPreComput
}
@Override
- public Long getKey(Object obj) {
- Long result = 0L;
- if (obj instanceof IAtsWorkItem) {
- result = ((IAtsObject) obj).getUuid();
- }
- return result;
- }
-
- @Override
public void populateCachedValues(Collection<?> objects, Map<Long, String> preComputedValueMap) {
for (Object element : objects) {
String value = "";
@@ -79,11 +68,6 @@ public class AtsColumnIdUI extends XViewerAtsColumn implements IXViewerPreComput
}
}
- @Override
- public String getText(Object obj, Long key, String cachedValue) {
- return cachedValue;
- }
-
public static XViewerAlign getXViewerAlign(ColumnAlign align) {
if (align == ColumnAlign.Center) {
return XViewerAlign.Center;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BranchStatusColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BranchStatusColumn.java
index 3cb119e7ec..ae306fe6fc 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BranchStatusColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BranchStatusColumn.java
@@ -12,10 +12,8 @@ package org.eclipse.osee.ats.column;
import java.util.Collection;
import java.util.Map;
-import org.eclipse.nebula.widgets.xviewer.IXViewerPreComputedColumn;
import org.eclipse.nebula.widgets.xviewer.core.model.SortDataType;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
-import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.internal.AtsClientService;
@@ -28,7 +26,7 @@ import org.eclipse.osee.framework.ui.skynet.util.LogUtil;
/**
* @author Donald G. Dunne
*/
-public class BranchStatusColumn extends XViewerAtsColumn implements IXViewerPreComputedColumn {
+public class BranchStatusColumn extends XViewerAtsColumn implements IAtsXViewerPreComputedColumn {
public static BranchStatusColumn instance = new BranchStatusColumn();
@@ -53,20 +51,6 @@ public class BranchStatusColumn extends XViewerAtsColumn implements IXViewerPreC
}
@Override
- public Long getKey(Object obj) {
- Long result = 0L;
- if (obj instanceof IAtsObject) {
- result = ((IAtsObject) obj).getUuid();
- }
- return result;
- }
-
- @Override
- public String getText(Object obj, Long key, String cachedValue) {
- return cachedValue;
- }
-
- @Override
public void populateCachedValues(Collection<?> objects, Map<Long, String> preComputedValueMap) {
for (Object element : objects) {
Long key = getKey(element);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/IAtsXViewerPreComputedColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/IAtsXViewerPreComputedColumn.java
new file mode 100644
index 0000000000..9991a9ba9c
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/IAtsXViewerPreComputedColumn.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.column;
+
+import org.eclipse.nebula.widgets.xviewer.IXViewerPreComputedColumn;
+import org.eclipse.osee.ats.api.IAtsObject;
+
+/**
+ * @author Donald G. Dunne
+ */
+public interface IAtsXViewerPreComputedColumn extends IXViewerPreComputedColumn {
+
+ @Override
+ default public String getText(Object obj, Long key, String cachedValue) {
+ return cachedValue;
+ }
+
+ @Override
+ default public Long getKey(Object obj) {
+ Long result = 0L;
+ if (obj instanceof IAtsObject) {
+ result = ((IAtsObject) obj).getUuid();
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ParentTopTeamColumnUI.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ParentTopTeamColumnUI.java
index 0b0a242777..b4bc08891f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ParentTopTeamColumnUI.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ParentTopTeamColumnUI.java
@@ -10,21 +10,23 @@
*******************************************************************************/
package org.eclipse.osee.ats.column;
-import org.eclipse.nebula.widgets.xviewer.IXViewerValueColumn;
+import java.util.Collection;
+import java.util.Map;
+import org.eclipse.nebula.widgets.xviewer.IXViewerPreComputedColumn;
import org.eclipse.nebula.widgets.xviewer.XViewerCells;
import org.eclipse.nebula.widgets.xviewer.core.model.SortDataType;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
-import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.core.column.ParentTopTeamColumn;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn;
import org.eclipse.osee.ats.world.WorldXViewerFactory;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.framework.ui.skynet.util.LogUtil;
/**
* @author Donald G. Dunne
*/
-public class ParentTopTeamColumnUI extends XViewerAtsColumn implements IXViewerValueColumn {
+public class ParentTopTeamColumnUI extends XViewerAtsColumn implements IXViewerPreComputedColumn {
private final static ParentTopTeamColumnUI instance = new ParentTopTeamColumnUI();
@@ -50,16 +52,36 @@ public class ParentTopTeamColumnUI extends XViewerAtsColumn implements IXViewerV
}
@Override
- public String getColumnText(Object element, XViewerColumn column, int columnIndex) {
- String result = "";
- if (element instanceof IAtsObject) {
+ public Long getKey(Object obj) {
+ Long result = 0L;
+ if (obj instanceof IAtsObject) {
+ result = ((IAtsObject) obj).getUuid();
+ }
+ return result;
+ }
+
+ @Override
+ public String getText(Object obj, Long key, String cachedValue) {
+ return cachedValue;
+ }
+
+ @Override
+ public void populateCachedValues(Collection<?> objects, Map<Long, String> preComputedValueMap) {
+ for (Object element : objects) {
try {
- result = ParentTopTeamColumn.getColumnText((IAtsObject) element);
+ String result = "";
+ if (element instanceof IAtsObject) {
+ try {
+ result = ParentTopTeamColumn.getColumnText((IAtsObject) element);
+ } catch (OseeCoreException ex) {
+ result = XViewerCells.getCellExceptionString(ex);
+ }
+ }
+ preComputedValueMap.put(getKey(element), result);
} catch (OseeCoreException ex) {
- result = XViewerCells.getCellExceptionString(ex);
+ preComputedValueMap.put(getKey(element), LogUtil.getCellExceptionString(ex));
}
}
- return result;
}
}

Back to the top