Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan E. Cook2017-01-11 11:05:40 -0500
committerDonald Dunne2017-01-11 13:20:19 -0500
commitfc46e622b418371a9ff0b294892064eee322ab5f (patch)
tree07e0e59ce512c16b80a4b5a9d5541282f3343d0f
parente6ae7899d250205e7c82caf3828ddd515f1a6ac8 (diff)
downloadorg.eclipse.osee-fc46e622b418371a9ff0b294892064eee322ab5f.tar.gz
org.eclipse.osee-fc46e622b418371a9ff0b294892064eee322ab5f.tar.xz
org.eclipse.osee-fc46e622b418371a9ff0b294892064eee322ab5f.zip
bug[ats_ATS332225]: Branch Manager Time Stamp column sorting incorrect"0.24.3.v201701111829-REL
Change-Id: Ibd34c6df07d63d17e541b9fa2cafd922a08a397c Signed-off-by: Morgan E. Cook <Morgan.e.cook@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java
index 2db0bb5e73b..040f9f47fda 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java
@@ -14,6 +14,7 @@ import static org.eclipse.osee.framework.core.enums.CoreBranches.COMMON;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Collection;
+import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import org.eclipse.jface.viewers.ILabelProviderListener;
@@ -40,6 +41,7 @@ import org.eclipse.swt.graphics.Image;
*/
public class XBranchLabelProvider extends XViewerLabelProvider {
private final static DateFormat DATE_FORMAT = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
+
private final BranchXViewer branchXViewer;
public XBranchLabelProvider(BranchXViewer branchXViewer) {
@@ -238,6 +240,21 @@ public class XBranchLabelProvider extends XViewerLabelProvider {
}
@Override
+ public Object getBackingData(Object element, XViewerColumn xCol, int columnIndex) throws Exception {
+ if (xCol.getId().equals(BranchXViewerFactory.timeStamp.getId())) {
+ if (element instanceof BranchId) {
+ TransactionRecord tx = BranchManager.getBaseTransaction((BranchId) element);
+ Date date = null;
+ if (tx != null) {
+ date = tx.getTimeStamp();
+ }
+ return date;
+ }
+ }
+ return super.getBackingData(element, xCol, columnIndex);
+ }
+
+ @Override
public void dispose() {
// do nothing
}

Back to the top