diff options
author | Michael Valenta | 2007-04-25 13:23:00 +0000 |
---|---|---|
committer | Michael Valenta | 2007-04-25 13:23:00 +0000 |
commit | a2c210d2c66ffcc14f566f7ffc214d669196bbe4 (patch) | |
tree | c3ca4eb5ad2854da7224adad1c33e7ef2d513d4f /bundles/org.eclipse.team.cvs.ui | |
parent | dd8973f8220bff57d2ef4c0d3cb2cda87e7a0845 (diff) | |
download | eclipse.platform.team-a2c210d2c66ffcc14f566f7ffc214d669196bbe4.tar.gz eclipse.platform.team-a2c210d2c66ffcc14f566f7ffc214d669196bbe4.tar.xz eclipse.platform.team-a2c210d2c66ffcc14f566f7ffc214d669196bbe4.zip |
Bug 183956 History view wrongly ordered on startup, sort indicator missing
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui')
2 files changed, 5 insertions, 19 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java index 5eb7024ba..f5fbe96b4 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java @@ -751,7 +751,7 @@ public class CVSHistoryPage extends HistoryPage implements IAdaptable, IHistoryC protected TreeViewer createTree(Composite parent) { historyTableProvider = new CVSHistoryTableProvider(); - TreeViewer viewer = historyTableProvider.createTree(parent); + TreeViewer viewer = historyTableProvider.createTree(parent, cvsFileHistory == null ? true : cvsFileHistory.isIncludeLocal()); viewer.setContentProvider(new ITreeContentProvider() { public Object[] getElements(Object inputElement) { @@ -1603,16 +1603,6 @@ public class CVSHistoryPage extends HistoryPage implements IAdaptable, IHistoryC return null; } - /* - * Used to reset sorting in CVSHistoryTableProvider for - * changes to local revisions displays. Local revisions don't - * have a revision id so we need to sort by date when they are - * displayed - else we can just sort by revision id. - */ - public void setSorter(boolean localDisplayed) { - historyTableProvider.setLocalRevisionsDisplayed(localDisplayed); - } - public Object getAdapter(Class adapter) { if(adapter == IHistoryCompareAdapter.class) { return this; diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java index 606978662..9f90f9305 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java @@ -448,7 +448,7 @@ public class CVSHistoryTableProvider { * @param parent * @return TableViewer */ - public TreeViewer createTree(Composite parent) { + public TreeViewer createTree(Composite parent, boolean localIsDisplayed) { Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION); tree.setHeaderVisible(true); tree.setLinesVisible(true); @@ -461,14 +461,10 @@ public class CVSHistoryTableProvider { this.viewer = new TreeViewer(tree); createColumns(viewer, layout); + + // Initialize the sorting ColumnViewerToolTipSupport.enableFor(viewer); - - // By default, reverse sort by revision. - // If local filter is on sort by date - HistoryComparator sorter = new HistoryComparator(COL_DATE); - /*HistorySorter sorter = new HistorySorter(COL_REVISIONID); - sorter.setReversed(true);*/ - viewer.setComparator(sorter); + setLocalRevisionsDisplayed(localIsDisplayed); tree.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { |