Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2008-01-12 00:34:33 +0000
committerddunne2008-01-12 00:34:33 +0000
commit7324749076a52d31982d503ffa76774957d0c6ae (patch)
treedd6ecabc9ff621b2f715ed5035bf88798a1186ae
parentd10a100fd3ccdff8654d18c8b04e715c9cdb35cf (diff)
downloadorg.eclipse.osee-7324749076a52d31982d503ffa76774957d0c6ae.tar.gz
org.eclipse.osee-7324749076a52d31982d503ffa76774957d0c6ae.tar.xz
org.eclipse.osee-7324749076a52d31982d503ffa76774957d0c6ae.zip
Commit Manager
-rw-r--r--MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSArtifact.java13
-rw-r--r--MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java59
-rw-r--r--MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/StateMachineArtifact.java21
-rw-r--r--MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java3
-rw-r--r--MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java9
-rw-r--r--MS_0.1.4_20080103/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Branch.java5
-rw-r--r--MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/CommitColumn.java6
-rw-r--r--MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/XCommitLabelProvider.java59
-rw-r--r--MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/XCommitViewer.java2
-rw-r--r--MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewerCells.java27
10 files changed, 133 insertions, 71 deletions
diff --git a/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSArtifact.java b/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSArtifact.java
index f54aa3eca60..01eb892b3f3 100644
--- a/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSArtifact.java
+++ b/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSArtifact.java
@@ -15,7 +15,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
-import org.eclipse.osee.ats.AtsPlugin;
import org.eclipse.osee.ats.hyper.IHyperArtifact;
import org.eclipse.osee.ats.util.Overview;
import org.eclipse.osee.framework.skynet.core.User;
@@ -25,12 +24,9 @@ import org.eclipse.osee.framework.skynet.core.artifact.Branch;
import org.eclipse.osee.framework.skynet.core.artifact.IATSArtifact;
import org.eclipse.osee.framework.skynet.core.artifact.factory.IArtifactFactory;
import org.eclipse.osee.framework.skynet.core.relation.RelationLinkGroup;
-import org.eclipse.osee.framework.ui.skynet.util.OSEELog;
public abstract class ATSArtifact extends BasicArtifact implements IHyperArtifact, IATSArtifact {
- public static final String CELL_ERROR_PREFIX = "!Error";
-
/**
* @param parentFactory
* @param guid
@@ -50,15 +46,6 @@ public abstract class ATSArtifact extends BasicArtifact implements IHyperArtifac
return Overview.getOpenHyperlinkHtml(this);
}
- public String getCellExceptionString(String message) {
- return CELL_ERROR_PREFIX + " - " + message;
- }
-
- public String getCellExceptionString(Exception ex) {
- OSEELog.logException(AtsPlugin.class, ex, false);
- return CELL_ERROR_PREFIX + " - " + ex.getLocalizedMessage();
- }
-
/**
* Recursively retrieve artifacts and all it's ATS related artifacts such as tasks, notes, subscriptions, etc... for
* deletion
diff --git a/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java b/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java
index 4a61865d2c7..46a7c7d9b1d 100644
--- a/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java
+++ b/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java
@@ -46,6 +46,7 @@ import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.util.ChangeType;
import org.eclipse.osee.framework.ui.skynet.util.OSEELog;
import org.eclipse.osee.framework.ui.skynet.widgets.XDate;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.XViewerCells;
import org.eclipse.swt.graphics.Image;
/**
@@ -232,7 +233,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
}
return sb.toString().replaceFirst(", $", "");
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -244,7 +245,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
}
return sb.toString().replaceFirst(", $", "");
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -258,7 +259,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewState())) return "";
}
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -271,7 +272,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
pocs.addAll(team.getCurrentState().getAssignees());
}
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return Artifacts.commaArts(pocs);
}
@@ -279,10 +280,10 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
public String getWorldViewCreatedDateStr() {
try {
Date date = getWorldViewCreatedDate();
- if (date == null) return getCellExceptionString("No Creation Date Found");
+ if (date == null) return XViewerCells.getCellExceptionString("No Creation Date Found");
return XDate.getDateStr(date, XDate.MMDDYYHHMM);
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -298,7 +299,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
try {
return PriorityType.getPriority(getSoleAttributeValue(ATSAttributes.PRIORITY_TYPE_ATTRIBUTE.getStoreName())).getShortName();
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -318,7 +319,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
try {
return getAttributesToString(ATSAttributes.USER_COMMUNITY_ATTRIBUTE.getStoreName());
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -330,7 +331,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
}
return sb.toString().replaceFirst(", $", "");
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -350,7 +351,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
teams.add(team.getTeamDefinition());
}
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return Artifacts.commaArts(teams);
}
@@ -365,7 +366,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewOriginator())) return "";
}
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -418,7 +419,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewResolution())) return "";
}
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -593,7 +594,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewNotes())) return "";
}
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -613,7 +614,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewWorkPackage())) return "";
}
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -628,7 +629,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewWorkPackage())) return "";
}
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -643,7 +644,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewCategory2())) return "";
}
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -658,7 +659,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewCategory3())) return "";
}
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -677,7 +678,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
}
return Collections.toString(",", versions);
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -708,7 +709,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
try {
if (getTeamWorkFlowArtifacts().size() == 1) return getTeamWorkFlowArtifacts().iterator().next().getHyperState();
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return "";
}
@@ -722,7 +723,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
try {
if (getTeamWorkFlowArtifacts().size() == 1) return getTeamWorkFlowArtifacts().iterator().next().getHyperAssignee();
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return "";
}
@@ -996,7 +997,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
}
return str;
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -1006,7 +1007,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
if (date == null) return "";
return XDate.getDateStr(date, XDate.MMDDYY);
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -1044,7 +1045,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewCompletedDateStr())) return "";
}
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -1064,7 +1065,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewEstimatedReleaseDateStr())) return "";
}
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -1114,7 +1115,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewChangeTypeStr())) return "";
}
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -1134,7 +1135,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewImplementer())) return "";
}
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -1174,7 +1175,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
if (date == null) return "";
return XDate.getDateStr(date, XDate.MMDDYY);
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -1298,7 +1299,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
else if (!str.equals(team.getWorldViewLegacyPCR())) return "";
}
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return str;
}
@@ -1317,7 +1318,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact {
}
return Collections.toString(",", reworks);
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
diff --git a/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/StateMachineArtifact.java b/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/StateMachineArtifact.java
index 87d7a362cf1..7ceb3b2eba4 100644
--- a/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/StateMachineArtifact.java
+++ b/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/StateMachineArtifact.java
@@ -58,6 +58,7 @@ import org.eclipse.osee.framework.ui.skynet.util.OSEELog;
import org.eclipse.osee.framework.ui.skynet.util.email.EmailGroup;
import org.eclipse.osee.framework.ui.skynet.widgets.XDate;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPage;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.XViewerCells;
import org.eclipse.swt.graphics.Image;
/**
@@ -383,7 +384,7 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IEvent
try {
return currentStateDam.getState().getName();
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -491,10 +492,10 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IEvent
public String getWorldViewCreatedDateStr() {
try {
- if (getWorldViewCreatedDate() == null) return getCellExceptionString("No creation date");
+ if (getWorldViewCreatedDate() == null) return XViewerCells.getCellExceptionString("No creation date");
return new XDate(getWorldViewCreatedDate()).getMMDDYYHHMM();
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -504,13 +505,13 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IEvent
if (getWorldViewCompletedDate() == null) {
OSEELog.logSevere(AtsPlugin.class, "Completed with no date => " + smaMgr.getSma().getHumanReadableId(),
true);
- return getCellExceptionString("Completed with no date.");
+ return XViewerCells.getCellExceptionString("Completed with no date.");
}
return new XDate(getWorldViewCompletedDate()).getMMDDYYHHMM();
}
return "";
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -520,13 +521,13 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IEvent
if (getWorldViewCancelledDate() == null) {
OSEELog.logSevere(AtsPlugin.class, "Cancelled with no date => " + smaMgr.getSma().getHumanReadableId(),
false);
- return getCellExceptionString("Cancelled with no date.");
+ return XViewerCells.getCellExceptionString("Cancelled with no date.");
}
return new XDate(getWorldViewCancelledDate()).getMMDDYYHHMM();
}
return "";
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -603,7 +604,7 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IEvent
try {
return getAttributesToString(ATSAttributes.RESOLUTION_ATTRIBUTE.getStoreName());
} catch (SQLException ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -770,7 +771,7 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IEvent
if (getWorldViewEstimatedReleaseDate() == null) return "";
return new XDate(getWorldViewEstimatedReleaseDate()).getMMDDYYHHMM();
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -781,7 +782,7 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IEvent
if (getWorldViewReleaseDate() == null) return "";
return new XDate(getWorldViewReleaseDate()).getMMDDYYHHMM();
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
diff --git a/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java b/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java
index 14ecb0a77a1..438175e028f 100644
--- a/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java
+++ b/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java
@@ -32,6 +32,7 @@ import org.eclipse.osee.framework.skynet.core.relation.RelationSide;
import org.eclipse.osee.framework.skynet.core.util.Artifacts;
import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.util.OSEELog;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.XViewerCells;
/**
* @author Donald G. Dunne
@@ -306,7 +307,7 @@ public class TaskArtifact extends StateMachineArtifact implements IWorldViewArti
}
return "";
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
diff --git a/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java b/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java
index 98884762164..5d885cd7813 100644
--- a/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java
+++ b/MS_0.1.4_20080103/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java
@@ -44,6 +44,7 @@ import org.eclipse.osee.framework.ui.skynet.util.ChangeType;
import org.eclipse.osee.framework.ui.skynet.util.OSEELog;
import org.eclipse.osee.framework.ui.skynet.widgets.IBranchArtifact;
import org.eclipse.osee.framework.ui.skynet.widgets.XDate;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.XViewerCells;
import org.eclipse.swt.widgets.Display;
/**
@@ -246,7 +247,7 @@ public class TeamWorkFlowArtifact extends StateMachineArtifact implements IWorld
try {
return PriorityType.getPriority(getSoleAttributeValue(ATSAttributes.PRIORITY_TYPE_ATTRIBUTE.getStoreName())).getShortName();
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
}
@@ -302,14 +303,14 @@ public class TeamWorkFlowArtifact extends StateMachineArtifact implements IWorld
String errStr =
"Workflow " + smaMgr.getSma().getHumanReadableId() + " targeted for multiple versions: " + Artifacts.commaArts(verArts);
OSEELog.logException(AtsPlugin.class, errStr, null, false);
- return getCellExceptionString(errStr);
+ return XViewerCells.getCellExceptionString(errStr);
}
VersionArtifact verArt = verArts.iterator().next();
if (!smaMgr.isCompleted() && verArt.getSoleBooleanAttributeValue(ATSAttributes.RELEASED_ATTRIBUTE.getStoreName())) {
String errStr =
"Workflow " + smaMgr.getSma().getHumanReadableId() + " targeted for released version, but not completed: " + verArt;
OSEELog.logException(AtsPlugin.class, errStr, null, false);
- return getCellExceptionString(errStr);
+ return XViewerCells.getCellExceptionString(errStr);
}
return verArt.getDescriptiveName();
} catch (SQLException ex) {
@@ -550,7 +551,7 @@ public class TeamWorkFlowArtifact extends StateMachineArtifact implements IWorld
Date date = getWorldViewDeadlineDate();
if (date != null) return new XDate(date).getMMDDYY();
} catch (Exception ex) {
- return getCellExceptionString(ex);
+ return XViewerCells.getCellExceptionString(ex);
}
return "";
}
diff --git a/MS_0.1.4_20080103/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Branch.java b/MS_0.1.4_20080103/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Branch.java
index b7006ffb328..5f49dbd8cd3 100644
--- a/MS_0.1.4_20080103/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Branch.java
+++ b/MS_0.1.4_20080103/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Branch.java
@@ -276,6 +276,11 @@ public class Branch implements Comparable<Branch>, IAdaptable {
return associatedArtifactId != skynetAuth.getNoOneArtifactId();
}
+ public boolean isBaselineBranch() {
+ System.out.println("Branch.isBaselineBranch...fix this");
+ return !getBranchName().contains("RPCR");
+ }
+
/**
* @return the associatedArtifactId
*/
diff --git a/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/CommitColumn.java b/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/CommitColumn.java
index 280532221aa..20a6e5b93ef 100644
--- a/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/CommitColumn.java
+++ b/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/CommitColumn.java
@@ -21,9 +21,13 @@ import org.eclipse.swt.SWT;
*/
public enum CommitColumn {
+ Type_Col("Type", 100, SWT.LEFT, true, SortDataType.String, false),
+
Status_Col("Status", 100, SWT.LEFT, true, SortDataType.String, false),
- Name_Col("Name", 700, SWT.LEFT, true, SortDataType.String, false);
+ Name_Col("Name", 450, SWT.LEFT, true, SortDataType.String, false),
+
+ Short_Name_Col("Short Name", 200, SWT.LEFT, true, SortDataType.String, false);
private final String name;
private final int width;
diff --git a/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/XCommitLabelProvider.java b/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/XCommitLabelProvider.java
index de6d68290fa..9af74e9b366 100644
--- a/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/XCommitLabelProvider.java
+++ b/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/XCommitLabelProvider.java
@@ -14,6 +14,7 @@ import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.osee.framework.skynet.core.artifact.Branch;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.XViewerCells;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.XViewerColumn;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
@@ -21,11 +22,11 @@ import org.eclipse.swt.graphics.Image;
public class XCommitLabelProvider implements ITableLabelProvider {
Font font = null;
- private final CommitXViewer treeViewer;
+ private final CommitXViewer commitXViewer;
- public XCommitLabelProvider(CommitXViewer treeViewer) {
+ public XCommitLabelProvider(CommitXViewer commitXViewer) {
super();
- this.treeViewer = treeViewer;
+ this.commitXViewer = commitXViewer;
}
public String getColumnText(Object element, int columnIndex) {
@@ -37,7 +38,7 @@ public class XCommitLabelProvider implements ITableLabelProvider {
}
Branch branch = ((Branch) element);
if (branch == null) return "";
- XViewerColumn xCol = treeViewer.getXTreeColumn(columnIndex);
+ XViewerColumn xCol = commitXViewer.getXTreeColumn(columnIndex);
if (xCol != null) {
CommitColumn aCol = CommitColumn.getAtsXColumn(xCol);
return getColumnText(element, columnIndex, branch, xCol, aCol);
@@ -58,11 +59,27 @@ public class XCommitLabelProvider implements ITableLabelProvider {
*/
public String getColumnText(Object element, int columnIndex, Branch branch, XViewerColumn xCol, CommitColumn aCol) {
if (!xCol.isShow()) return ""; // Since not shown, don't display
- if (aCol == CommitColumn.Status_Col)
- return "Hours";
- else if (aCol == CommitColumn.Status_Col)
- return "Status";
- else if (aCol == CommitColumn.Name_Col) return branch.getBranchName();
+ if (aCol == CommitColumn.Type_Col) {
+ if (branch.equals(commitXViewer.getWorkingBranch()))
+ return "Working";
+ else if (branch.equals(commitXViewer.getWorkingBranch().getParentBranch()))
+ return "Parent Baseline";
+ else {
+ try {
+ if (branch.isBaselineBranch()) return "Baseline";
+ } catch (Exception ex) {
+ return XViewerCells.getCellExceptionString(ex);
+ }
+ }
+ return "";
+ } else if (aCol == CommitColumn.Status_Col) {
+ if (branch.equals(commitXViewer.getWorkingBranch()))
+ return "";
+ else if (branch.equals(commitXViewer.getWorkingBranch().getParentBranch()) || branch.isBaselineBranch()) return isCommittedInto(branch) ? "Committed" : "UnCommitted";
+ return "";
+ } else if (aCol == CommitColumn.Name_Col)
+ return branch.getBranchName();
+ else if (aCol == CommitColumn.Short_Name_Col) return branch.getBranchShortName();
return "Unhandled Column";
}
@@ -82,17 +99,35 @@ public class XCommitLabelProvider implements ITableLabelProvider {
}
public CommitXViewer getTreeViewer() {
- return treeViewer;
+ return commitXViewer;
}
public Image getColumnImage(Object element, int columnIndex) {
if (element instanceof String) return null;
Branch branch = (Branch) element;
- XViewerColumn xCol = treeViewer.getXTreeColumn(columnIndex);
+ XViewerColumn xCol = commitXViewer.getXTreeColumn(columnIndex);
if (xCol == null) return null;
CommitColumn dCol = CommitColumn.getAtsXColumn(xCol);
if (!xCol.isShow()) return null; // Since not shown, don't display
- if (dCol == CommitColumn.Name_Col) return SkynetGuiPlugin.getInstance().getImage("branch.gif");
+ if (dCol == CommitColumn.Name_Col) {
+ if (branch.equals(commitXViewer.getWorkingBranch())) return SkynetGuiPlugin.getInstance().getImage(
+ "nav_forward.gif");
+ return SkynetGuiPlugin.getInstance().getImage("branch.gif");
+ } else if (dCol == CommitColumn.Status_Col) {
+ return getCommitStatusImage(branch);
+ }
+ return null;
+ }
+
+ private boolean isCommittedInto(Branch branch) {
+ return !branch.getBranchName().equals("ftb2");
+ }
+
+ private Image getCommitStatusImage(Branch branch) {
+ if (branch.equals(commitXViewer.getWorkingBranch()))
+ return null;
+ else if (branch.equals(commitXViewer.getWorkingBranch().getParentBranch()) || branch.isBaselineBranch()) return isCommittedInto(branch) ? SkynetGuiPlugin.getInstance().getImage(
+ "green_light.gif") : SkynetGuiPlugin.getInstance().getImage("red_light.gif");
return null;
}
}
diff --git a/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/XCommitViewer.java b/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/XCommitViewer.java
index 8464f214b9f..c5bdab9946f 100644
--- a/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/XCommitViewer.java
+++ b/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xcommit/XCommitViewer.java
@@ -169,7 +169,7 @@ public class XCommitViewer extends XWidget implements IEventReceiver, IDamWidget
public void loadTable() {
try {
if (artifact != null && (artifact instanceof IBranchArtifact)) xCommitViewer.setWorkingBranch(((IBranchArtifact) artifact).getWorkingBranch());
- extraInfoLabel.setText("Commit Status for branch: " + ((IBranchArtifact) artifact).getWorkingBranch());
+ extraInfoLabel.setText("Commit Status for branch: \"" + ((IBranchArtifact) artifact).getWorkingBranch() + "\" - \"" + ((IBranchArtifact) artifact).getWorkingBranch().getBranchShortName() + "\"");
} catch (Exception ex) {
OSEELog.logException(SkynetGuiPlugin.class, ex, true);
}
diff --git a/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewerCells.java b/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewerCells.java
new file mode 100644
index 00000000000..61a5bb90f39
--- /dev/null
+++ b/MS_0.1.4_20080103/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewerCells.java
@@ -0,0 +1,27 @@
+/*
+ * Created on Jan 11, 2008
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.framework.ui.skynet.widgets.xviewer;
+
+import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
+import org.eclipse.osee.framework.ui.skynet.util.OSEELog;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class XViewerCells {
+
+ public static String getCellExceptionString(String message) {
+ return CELL_ERROR_PREFIX + " - " + message;
+ }
+
+ public static String getCellExceptionString(Exception ex) {
+ OSEELog.logException(SkynetGuiPlugin.class, ex, false);
+ return CELL_ERROR_PREFIX + " - " + ex.getLocalizedMessage();
+ }
+
+ public static final String CELL_ERROR_PREFIX = "!Error";
+
+}

Back to the top