diff options
author | Erich Gamma | 2002-05-29 16:19:42 +0000 |
---|---|---|
committer | Erich Gamma | 2002-05-29 16:19:42 +0000 |
commit | 6b67358f0429b295f9a800976a7bda30ec8475be (patch) | |
tree | 5830ea85b468574db91688194ae41cd3c6399887 | |
parent | 784da280504f8e1284d7f51400013c856aaf2010 (diff) | |
download | eclipse.platform.text-6b67358f0429b295f9a800976a7bda30ec8475be.tar.gz eclipse.platform.text-6b67358f0429b295f9a800976a7bda30ec8475be.tar.xz eclipse.platform.text-6b67358f0429b295f9a800976a7bda30ec8475be.zip |
17746v20020530
-rw-r--r-- | org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java | 11 |
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 0fe568615df..fa80f4e8e45 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);
+ }
}
}
}
|