Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2008-10-03 14:29:25 -0400
committerspingel2008-10-03 14:29:25 -0400
commitf4cea04fd521ae16df0879b7e9f722300327cba5 (patch)
tree6d69658abc1b565933165c0ba41c0f2288a19338
parent6aae891a6f74ee09fd4726d8ec043a145f1e999f (diff)
downloadorg.eclipse.mylyn.tasks-f4cea04fd521ae16df0879b7e9f722300327cba5.tar.gz
org.eclipse.mylyn.tasks-f4cea04fd521ae16df0879b7e9f722300327cba5.tar.xz
org.eclipse.mylyn.tasks-f4cea04fd521ae16df0879b7e9f722300327cba5.zip
248506: [performance] activate task dialog is slow
https://bugs.eclipse.org/bugs/show_bug.cgi?id=248506
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java
index 3e3588bbd..1906a5915 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java
@@ -18,6 +18,7 @@ import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -381,7 +382,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog {
/**
* Mylyn's task activation history
*/
- private final List<AbstractTask> history;
+ private final LinkedHashSet<AbstractTask> history;
private final TaskHistoryItemsComparator itemsComparator;
@@ -429,8 +430,8 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog {
public TaskSelectionDialog(Shell parent) {
super(parent);
this.taskActivationHistory = TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory();
- this.history = new ArrayList<AbstractTask>(taskActivationHistory.getPreviousTasks());
- this.itemsComparator = new TaskHistoryItemsComparator(this.history);
+ this.history = new LinkedHashSet<AbstractTask>(taskActivationHistory.getPreviousTasks());
+ this.itemsComparator = new TaskHistoryItemsComparator(new ArrayList<AbstractTask>(history));
this.needsCreateTask = true;
this.labelProvider = new TaskElementLabelProvider(false);
this.showCompletedTasksAction = new ShowCompletedTasksAction();

Back to the top