summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwilk2011-10-03 19:28:28 (EDT)
committer Ryan D. Brooks2011-10-03 19:28:28 (EDT)
commit3717d2cb4831dcbf0991d86050e196bb3ee8f689 (patch)
tree524949e2cb709f7ef08f33259b163008f005ae5a
parent76ede6a47e91614c26ad6d1b540c81608ac26337 (diff)
downloadorg.eclipse.osee-3717d2cb4831dcbf0991d86050e196bb3ee8f689.zip
org.eclipse.osee-3717d2cb4831dcbf0991d86050e196bb3ee8f689.tar.gz
org.eclipse.osee-3717d2cb4831dcbf0991d86050e196bb3ee8f689.tar.bz2
bug[ats_6WFC6]: Fix XHistoryWidget filtering
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java30
1 files changed, 12 insertions, 18 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java
index b79ee00..25d6517 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java
@@ -25,6 +25,7 @@ import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.jdk.core.util.AHTML;
+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.plugin.core.util.Jobs;
@@ -233,21 +234,18 @@ public class XHistoryWidget extends GenericXWidget {
@Override
public void run() {
if (loadHistory) {
- if (changes.isEmpty()) {
- extraInfoLabel.setText(NO_HISTORY);
- xHistoryViewer.setInput(changes);
- } else {
- String infoLabel = "";
- try {
- infoLabel =
- String.format("History: %s on branch: %s", artifact.getName(),
- artifact.getFullBranch().getShortName());
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
- }
- extraInfoLabel.setText(infoLabel);
- xHistoryViewer.setInput(changes);
+ String shortName = Strings.emptyString();
+ try {
+ shortName = artifact.getFullBranch().getShortName();
+ } catch (OseeCoreException ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
+ String infoLabel = NO_HISTORY;
+ if (!changes.isEmpty()) {
+ infoLabel = String.format("History: %s on branch: %s", artifact.getName(), shortName);
+ }
+ extraInfoLabel.setText(infoLabel);
+ xHistoryViewer.setInput(changes);
} else {
extraInfoLabel.setText("Cleared on shut down - press refresh to reload");
}
@@ -294,10 +292,6 @@ public class XHistoryWidget extends GenericXWidget {
}
}
- public Artifact getArtifact() {
- return artifact;
- }
-
@SuppressWarnings("rawtypes")
public ArrayList<TransactionRecord> getSelectedTransactionRecords() {
ArrayList<TransactionRecord> items = new ArrayList<TransactionRecord>();