Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2005-07-20 15:59:49 +0000
committersminto2005-07-20 15:59:49 +0000
commit3c8714d181c5a64475a0051e38532399fd2c8189 (patch)
tree95fbbf50758d60c480311378bd0144b0a1c5b3a9 /org.eclipse.mylyn.tasks.core/src
parentd17276ec69e73f5fcba98b31b63ae9a108274bf8 (diff)
downloadorg.eclipse.mylyn.tasks-3c8714d181c5a64475a0051e38532399fd2c8189.tar.gz
org.eclipse.mylyn.tasks-3c8714d181c5a64475a0051e38532399fd2c8189.tar.xz
org.eclipse.mylyn.tasks-3c8714d181c5a64475a0051e38532399fd2c8189.zip
fixed Bug #104424: active bugzilla searches fail due to invalid thread access
Diffstat (limited to 'org.eclipse.mylyn.tasks.core/src')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/BugzillaStructureBridge.java8
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaReferencesProvider.java12
2 files changed, 15 insertions, 5 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/BugzillaStructureBridge.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/BugzillaStructureBridge.java
index a7ad675be..b7c2fa028 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/BugzillaStructureBridge.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/BugzillaStructureBridge.java
@@ -111,9 +111,13 @@ public class BugzillaStructureBridge implements IMylarStructureBridge {
return findNode(node, commentNumber);
}
+ BugzillaReportNode reportNode = MylarBugzillaPlugin.getReferenceProvider().getCached(handle);
+
// try to get from the cache, if it doesn't exist, startup an operation to get it
result = getFromCache(bugHandle);
- if(result == null){
+ if(result == null && reportNode != null){
+ return reportNode;
+ } else if(result == null && reportNode == null){
WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
protected void execute(IProgressMonitor monitor) throws CoreException {
monitor.beginTask("Downloading Bug# " + id, IProgressMonitor.UNKNOWN);
@@ -137,7 +141,7 @@ public class BugzillaStructureBridge implements IMylarStructureBridge {
if(result != null)
cache(bugHandle, result);
}
-
+
BugzillaOutlineNode node = BugzillaOutlineNode.parseBugReport(result);
return findNode(node, commentNumber);
}
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 6c1ab92c8..5c4174e6c 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
@@ -31,6 +31,7 @@ import org.eclipse.mylar.core.AbstractRelationshipProvider;
import org.eclipse.mylar.core.IMylarContextNode;
import org.eclipse.mylar.core.search.IActiveSearchListener;
import org.eclipse.mylar.core.search.IMylarSearchOperation;
+import org.eclipse.ui.PlatformUI;
/**
@@ -85,12 +86,17 @@ public class BugzillaReferencesProvider extends AbstractRelationshipProvider {
Object o = itr.next();
if(o instanceof BugzillaReportNode){
BugzillaReportNode bugzillaNode = (BugzillaReportNode)o;
- String handle = bugzillaNode.getElementHandle();
+ final String handle = bugzillaNode.getElementHandle();
if(bridge.getCached(handle) == null)
cache(handle, bugzillaNode);
- incrementInterest(degreeOfSeparation, BugzillaStructureBridge.EXTENSION, handle);
- }
+
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
+ public void run() {
+ incrementInterest(degreeOfSeparation, BugzillaStructureBridge.EXTENSION, handle);
+ }
+ });
}
+ }
gathered = true;
}

Back to the top