Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaxsun McCarthy Huggan2016-01-29 06:31:57 +0000
committerJaxsun McCarthy Huggan2016-01-29 06:31:57 +0000
commit637bc5c65979b8b0b89b06b58147dcfee2e1c15f (patch)
treedfcb63474334d990974a3195b1cbaeddac7926f2 /org.eclipse.mylyn.tasks.ui
parent9a406c742ca5804952f9d389f56bf9f9bd0d10b9 (diff)
downloadorg.eclipse.mylyn.tasks-637bc5c65979b8b0b89b06b58147dcfee2e1c15f.tar.gz
org.eclipse.mylyn.tasks-637bc5c65979b8b0b89b06b58147dcfee2e1c15f.tar.xz
org.eclipse.mylyn.tasks-637bc5c65979b8b0b89b06b58147dcfee2e1c15f.zip
486782: compilation failure in TaskListSorter against staging platform
* TaskListSorter no longer overrides ViewerComparator.getComparator() * ViewerComparator.getComparator() must return a String comparator Change-Id: Ie005203b0833109f450a0f94e72f126da93276ae Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=486782 Signed-off-by: Jaxsun McCarthy Huggan <jaxsun.mccarthy@tasktop.com>
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListSorter.java11
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java22
3 files changed, 17 insertions, 18 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java
index ca8769148..4f457a25f 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java
@@ -40,7 +40,7 @@ public class TaskListSortDialog extends TaskCompareDialog {
private final TaskListView taskListView;
public TaskListSortDialog(IShellProvider parentShell, TaskListView taskListView) {
- super(parentShell, taskListView.getSorter().getComparator());
+ super(parentShell, taskListView.getSorter().getTaskComparator());
this.taskListView = taskListView;
setTitle(Messages.TaskListSortDialog_Title);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListSorter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListSorter.java
index 132906279..fa16f8e93 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListSorter.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListSorter.java
@@ -184,8 +184,8 @@ public class TaskListSorter extends ViewerSorter {
if (object instanceof ITaskRepositoryElement) {
ITaskRepositoryElement repositoryElement = (ITaskRepositoryElement) object;
String repositoryUrl = repositoryElement.getRepositoryUrl();
- TaskRepository taskRepository = TasksUi.getRepositoryManager().getRepository(
- repositoryElement.getConnectorKind(), repositoryUrl);
+ TaskRepository taskRepository = TasksUi.getRepositoryManager()
+ .getRepository(repositoryElement.getConnectorKind(), repositoryUrl);
return taskRepository != null ? taskRepository.getRepositoryLabel() : null;
}
// if (object instanceof UnsubmittedTaskContainer) {
@@ -202,8 +202,7 @@ public class TaskListSorter extends ViewerSorter {
return taskComparator.compare(element1, element2);
}
- @Override
- public TaskComparator getComparator() {
+ public TaskComparator getTaskComparator() {
return taskComparator;
}
@@ -219,7 +218,7 @@ public class TaskListSorter extends ViewerSorter {
public void restoreState(IMemento memento) {
IMemento child = memento.getChild(MEMENTO_KEY_SORTER);
if (child != null) {
- getComparator().restoreState(child);
+ taskComparator.restoreState(child);
}
setGroupBy(getGroupBy(memento, MEMENTO_KEY_GROUP_BY, DEFAULT_GROUP_BY));
}
@@ -227,7 +226,7 @@ public class TaskListSorter extends ViewerSorter {
public void saveState(IMemento memento) {
IMemento child = memento.createChild(MEMENTO_KEY_SORTER);
if (child != null) {
- getComparator().saveState(child);
+ taskComparator.saveState(child);
}
memento.putString(MEMENTO_KEY_GROUP_BY, getGroupBy().name());
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
index 60cb32adf..6317256ed 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
@@ -594,19 +594,19 @@ public class TaskListView extends AbstractTaskListView implements IPropertyChang
Integer sortDirInt = m.getInteger(MEMENTO_KEY_SORT_DIRECTION);
if (sortDirInt != null) {
sortDirection = sortDirInt.intValue();
- tableSorter.getComparator().getSortCriterion(0).setDirection(sortDirection);
+ tableSorter.getTaskComparator().getSortCriterion(0).setDirection(sortDirection);
switch (restoredSortIndex) {
case 1:
- tableSorter.getComparator().getSortCriterion(0).setKey(SortKey.SUMMARY);
+ tableSorter.getTaskComparator().getSortCriterion(0).setKey(SortKey.SUMMARY);
break;
case 2:
- tableSorter.getComparator().getSortCriterion(0).setKey(SortKey.DATE_CREATED);
+ tableSorter.getTaskComparator().getSortCriterion(0).setKey(SortKey.DATE_CREATED);
break;
case 3:
- tableSorter.getComparator().getSortCriterion(0).setKey(SortKey.TASK_ID);
+ tableSorter.getTaskComparator().getSortCriterion(0).setKey(SortKey.TASK_ID);
break;
default:
- tableSorter.getComparator().getSortCriterion(0).setKey(SortKey.PRIORITY);
+ tableSorter.getTaskComparator().getSortCriterion(0).setKey(SortKey.PRIORITY);
}
}
}
@@ -620,19 +620,19 @@ public class TaskListView extends AbstractTaskListView implements IPropertyChang
Integer sortDirInt = m2.getInteger(MEMENTO_KEY_SORT_DIRECTION);
if (sortDirInt != null) {
sortDirection = sortDirInt.intValue();
- tableSorter.getComparator().getSortCriterion(1).setDirection(sortDirection);
+ tableSorter.getTaskComparator().getSortCriterion(1).setDirection(sortDirection);
switch (restoredSortIndex) {
case 1:
- tableSorter.getComparator().getSortCriterion(1).setKey(SortKey.SUMMARY);
+ tableSorter.getTaskComparator().getSortCriterion(1).setKey(SortKey.SUMMARY);
break;
case 2:
- tableSorter.getComparator().getSortCriterion(1).setKey(SortKey.DATE_CREATED);
+ tableSorter.getTaskComparator().getSortCriterion(1).setKey(SortKey.DATE_CREATED);
break;
case 3:
- tableSorter.getComparator().getSortCriterion(1).setKey(SortKey.TASK_ID);
+ tableSorter.getTaskComparator().getSortCriterion(1).setKey(SortKey.TASK_ID);
break;
default:
- tableSorter.getComparator().getSortCriterion(1).setKey(SortKey.PRIORITY);
+ tableSorter.getTaskComparator().getSortCriterion(1).setKey(SortKey.PRIORITY);
}
}
}
@@ -953,7 +953,7 @@ public class TaskListView extends AbstractTaskListView implements IPropertyChang
@Override
public void widgetSelected(SelectionEvent e) {
- SortCriterion criterion = tableSorter.getComparator().getSortCriterion(0);
+ SortCriterion criterion = tableSorter.getTaskComparator().getSortCriterion(0);
criterion.setDirection(criterion.getDirection() * -1);
getViewer().refresh(false);
}

Back to the top