Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2018-11-13 15:15:17 -0500
committerDonald Dunne2018-11-13 15:25:46 -0500
commit251e6bbf1c12dc601bbef404c724d08698ee2b3b (patch)
tree86802ea2ce79c4fe6f98fe6c2a562f092b08e2f9
parente57b9ccb25fe1ceef96e7c73c136aa7e9c6278c4 (diff)
downloadorg.eclipse.osee-251e6bbf1c12dc601bbef404c724d08698ee2b3b.tar.gz
org.eclipse.osee-251e6bbf1c12dc601bbef404c724d08698ee2b3b.tar.xz
org.eclipse.osee-251e6bbf1c12dc601bbef404c724d08698ee2b3b.zip
feature: Improve error text in WorldLabelProvider
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldLabelProvider.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldLabelProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldLabelProvider.java
index 98f89043a6..92df24d797 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldLabelProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldLabelProvider.java
@@ -15,6 +15,7 @@ import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.nebula.widgets.xviewer.XViewerLabelProvider;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
import org.eclipse.osee.ats.api.IAtsWorkItem;
+import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.column.AtsColumnId;
import org.eclipse.osee.ats.core.column.AtsColumnToken;
@@ -75,8 +76,13 @@ public class WorldLabelProvider extends XViewerLabelProvider {
}
if (element instanceof IAtsWorkItem) {
if (xCol.getId().equals(AtsColumnId.State.getId())) {
- return Displays.getSystemColor(
- StateColorToSwtColor.convert(((AbstractWorkflowArtifact) element).getStateDefinition().getColor()));
+ IAtsStateDefinition state = ((AbstractWorkflowArtifact) element).getStateDefinition();
+ if (state == null) {
+ OseeLog.logf(Activator.class, Level.SEVERE, "State null for %s",
+ ((IAtsWorkItem) element).toStringWithId());
+ } else {
+ return Displays.getSystemColor(StateColorToSwtColor.convert(state.getColor()));
+ }
}
}

Back to the top