Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErich Gamma2002-05-29 16:19:42 +0000
committerErich Gamma2002-05-29 16:19:42 +0000
commit6b67358f0429b295f9a800976a7bda30ec8475be (patch)
tree5830ea85b468574db91688194ae41cd3c6399887
parent784da280504f8e1284d7f51400013c856aaf2010 (diff)
downloadeclipse.platform.text-6b67358f0429b295f9a800976a7bda30ec8475be.tar.gz
eclipse.platform.text-6b67358f0429b295f9a800976a7bda30ec8475be.tar.xz
eclipse.platform.text-6b67358f0429b295f9a800976a7bda30ec8475be.zip
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
index 0fe568615..fa80f4e8e 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
@@ -97,8 +97,8 @@ public class TextSearchVisitor extends TypedResourceVisitor {
*
* @return an array of all dirty editor parts.
*/
- private IEditorPart[] getDirtyEditors() {
- Set inputs= new HashSet(7);
+ public static IEditorPart[] getDirtyEditors() {
+ Set inputs= new HashSet();
List result= new ArrayList(0);
IWorkbench workbench= SearchPlugin.getDefault().getWorkbench();
IWorkbenchWindow[] windows= workbench.getWorkbenchWindows();
@@ -108,8 +108,11 @@ public class TextSearchVisitor extends TypedResourceVisitor {
IEditorPart[] editors= pages[x].getDirtyEditors();
for (int z= 0; z < editors.length; z++) {
IEditorPart ep= editors[z];
- if (!result.contains(ep))
- result.add(ep);
+ IEditorInput input= ep.getEditorInput();
+ if (!inputs.contains(input)) {
+ inputs.add(input);
+ result.add(ep);
+ }
}
}
}

Back to the top