Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2005-07-20 21:27:20 +0000
committersminto2005-07-20 21:27:20 +0000
commit1664a449d0f15f2c08d09dc897525028816c5067 (patch)
tree48694e5d51a6f3a83b8cb77660ae6374e34b8702 /org.eclipse.mylyn.tasks.core
parent1885b19080f19b18d43b132b7581225ccdae3b7c (diff)
downloadorg.eclipse.mylyn.tasks-1664a449d0f15f2c08d09dc897525028816c5067.tar.gz
org.eclipse.mylyn.tasks-1664a449d0f15f2c08d09dc897525028816c5067.tar.xz
org.eclipse.mylyn.tasks-1664a449d0f15f2c08d09dc897525028816c5067.zip
Fix for Bug #104084: active search jobs should be terminated before shutdown
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/MylarBugzillaPlugin.java10
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaMylarSearchOperation.java1
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaReferencesProvider.java3
3 files changed, 13 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/MylarBugzillaPlugin.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/MylarBugzillaPlugin.java
index cf6909134..6433a9573 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/MylarBugzillaPlugin.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/MylarBugzillaPlugin.java
@@ -1,6 +1,9 @@
package org.eclipse.mylar.bugzilla;
+import java.util.List;
+
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.mylar.core.AbstractRelationshipProvider;
import org.eclipse.mylar.core.MylarPlugin;
import org.eclipse.mylar.tasks.search.BugzillaReferencesProvider;
import org.eclipse.mylar.ui.MylarUiPlugin;
@@ -57,6 +60,13 @@ public class MylarBugzillaPlugin extends AbstractUIPlugin implements IStartup {
public void stop(BundleContext context) throws Exception {
super.stop(context);
plugin = null;
+
+ List<AbstractRelationshipProvider> providers = structureBridge.getProviders();
+ if(providers != null){
+ for(AbstractRelationshipProvider provider: providers){
+ provider.stopAllRunningJobs();
+ }
+ }
}
/**
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaMylarSearchOperation.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaMylarSearchOperation.java
index 474d2558e..a2da3e9b3 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaMylarSearchOperation.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaMylarSearchOperation.java
@@ -284,7 +284,6 @@ public class BugzillaMylarSearchOperation extends WorkspaceModifyOperation
// check the status so that we don't keep searching if there
// is a problem
if (status.getCode() == IStatus.CANCEL) {
- MylarPlugin.log("search cancelled", this);
return null;
} else if (!status.isOK()) {
MylarPlugin.log("search error", this);
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaReferencesProvider.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaReferencesProvider.java
index 5dbd1d1b3..a083647ba 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaReferencesProvider.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaReferencesProvider.java
@@ -81,6 +81,9 @@ public class BugzillaReferencesProvider extends AbstractRelationshipProvider {
public void searchCompleted(List<?> nodes) {
Iterator<?> itr = nodes.iterator();
+ if(MylarBugzillaPlugin.getDefault() == null)
+ return;
+
BugzillaStructureBridge bridge = MylarBugzillaPlugin.getDefault().getStructureBridge();
while(itr.hasNext()) {

Back to the top