Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2005-08-17 16:31:56 -0400
committersminto2005-08-17 16:31:56 -0400
commite718eb9593c9a8bfa00096fd33dc674680e175e5 (patch)
tree39d2edc9c504cc3381a47d9988fa525487a8d5cf
parent82a23c1a16328da6a61a8494a5cbdf2573b5aeeb (diff)
downloadorg.eclipse.mylyn.tasks-e718eb9593c9a8bfa00096fd33dc674680e175e5.tar.gz
org.eclipse.mylyn.tasks-e718eb9593c9a8bfa00096fd33dc674680e175e5.tar.xz
org.eclipse.mylyn.tasks-e718eb9593c9a8bfa00096fd33dc674680e175e5.zip
fixed Bug #106927: automatic refresh of bugzilla reports fails
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskHandler.java3
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/MylarTasklistPlugin.java6
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskListExternalizer.java2
3 files changed, 11 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskHandler.java
index faedb519d..24cba971a 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskHandler.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskHandler.java
@@ -32,6 +32,9 @@ public interface ITaskHandler {
public abstract ITask taskAdded(ITask newTask);
+ /**
+ * This is called both before and after the tasklist is read
+ */
public abstract void restoreState(TaskListView taskListView);
public abstract boolean enableAction(Action action, ITaskListElement element);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/MylarTasklistPlugin.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/MylarTasklistPlugin.java
index 155cc29dd..5acef8a91 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/MylarTasklistPlugin.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/MylarTasklistPlugin.java
@@ -419,6 +419,12 @@ public class MylarTasklistPlugin extends AbstractUIPlugin implements IStartup {
public void addTaskHandler(ITaskHandler taskHandler) {
taskHandlers.add(taskHandler);
}
+
+ public void restoreTaskHandlerState(){
+ for(ITaskHandler handler: taskHandlers){
+ handler.restoreState(TaskListView.getDefault());
+ }
+ }
private List<ITaskListDynamicSubMenuContributor> menuContributors = new ArrayList<ITaskListDynamicSubMenuContributor>();
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskListExternalizer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskListExternalizer.java
index 589bffa9e..640f95a03 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskListExternalizer.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskListExternalizer.java
@@ -194,6 +194,7 @@ public class TaskListExternalizer {
// }
public void readTaskList(TaskList tlist, File inFile) {
+ MylarTasklistPlugin.getDefault().restoreTaskHandlerState();
initExtensions();
hasCaughtException = false;
try {
@@ -276,6 +277,7 @@ public class TaskListExternalizer {
// bugzilla externalizer is not loaded. So there is a potentila that we can lose bug reports.
writeTaskList(tlist, inFile);
}
+ MylarTasklistPlugin.getDefault().restoreTaskHandlerState();
}
/**

Back to the top