Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Maeder2004-04-14 09:43:43 +0000
committerThomas Maeder2004-04-14 09:43:43 +0000
commit2e4853e01c4a24922356c599c332bb58f461fc97 (patch)
tree55c1061cd2439d2eb2996925d087022006027737
parent48d3fa94f53adc837a16a192d086cc899e3672bf (diff)
downloadeclipse.platform.text-2e4853e01c4a24922356c599c332bb58f461fc97.tar.gz
eclipse.platform.text-2e4853e01c4a24922356c599c332bb58f461fc97.tar.xz
eclipse.platform.text-2e4853e01c4a24922356c599c332bb58f461fc97.zip
fix for bug 55821
-rw-r--r--org.eclipse.search/new search/org/eclipse/search2/internal/ui/RemoveAllSearchesAction.java8
-rw-r--r--org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java11
2 files changed, 15 insertions, 4 deletions
diff --git a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/RemoveAllSearchesAction.java b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/RemoveAllSearchesAction.java
index 27072779d..21f281c9e 100644
--- a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/RemoveAllSearchesAction.java
+++ b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/RemoveAllSearchesAction.java
@@ -11,6 +11,8 @@
package org.eclipse.search2.internal.ui;
import org.eclipse.jface.action.Action;
+import org.eclipse.search.ui.ISearchQuery;
+import org.eclipse.search.ui.NewSearchUI;
class RemoveAllSearchesAction extends Action {
@@ -21,6 +23,10 @@ class RemoveAllSearchesAction extends Action {
}
public void run() {
- InternalSearchUI.getInstance().removeAllQueries();
+ ISearchQuery[] queries= NewSearchUI.getQueries();
+ for (int i = 0; i < queries.length; i++) {
+ if (!NewSearchUI.isQueryRunning(queries[i]))
+ InternalSearchUI.getInstance().removeQuery(queries[i]);
+ }
}
}
diff --git a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java
index 089bb2415..788a133e0 100644
--- a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java
+++ b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java
@@ -308,9 +308,14 @@ public class SearchView extends PageBookView implements ISearchResultViewPart, I
}
protected void refreshProgress() {
- ISearchQuery query= getCurrentSearchResult().getQuery();
- double current= InternalSearchUI.getInstance().getCurrentAmountOfWork(query);
- boolean queryRunning= InternalSearchUI.getInstance().isQueryRunning(query);
+ ISearchResult currentResult= getCurrentSearchResult();
+ double current= 0;
+ boolean queryRunning= false;
+ if (currentResult != null) {
+ ISearchQuery query= currentResult.getQuery();
+ current= InternalSearchUI.getInstance().getCurrentAmountOfWork(query);
+ queryRunning= InternalSearchUI.getInstance().isQueryRunning(query);
+ }
if (fBar != null) {
if (queryRunning) {
fBar.setSelection((int)current);

Back to the top