Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErich Gamma2002-05-14 10:43:18 +0000
committerErich Gamma2002-05-14 10:43:18 +0000
commit3bc5648a467eaa1b5e2af2cccef4c6c3def97077 (patch)
treedea81e094128251689ba7138737e58317c97da3c /bundles/org.eclipse.compare/compare/org/eclipse/compare
parent7760d77961a3e7af2ea6afc66182c84d95e038b2 (diff)
downloadeclipse.platform.team-3bc5648a467eaa1b5e2af2cccef4c6c3def97077.tar.gz
eclipse.platform.team-3bc5648a467eaa1b5e2af2cccef4c6c3def97077.tar.xz
eclipse.platform.team-3bc5648a467eaa1b5e2af2cccef4c6c3def97077.zip
migrated to replacement API for getEditorsv20020514
Diffstat (limited to 'bundles/org.eclipse.compare/compare/org/eclipse/compare')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java9
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java25
2 files changed, 10 insertions, 24 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
index f11a23a40..7023d3a5e 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
@@ -834,14 +834,9 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
for (int i= 0; i < windows.length; i++) {
IWorkbenchPage[] pages= windows[i].getPages();
for (int x= 0; x < pages.length; x++) {
- IEditorPart[] editors= pages[x].getEditors();
+ IEditorPart[] editors= pages[x].getDirtyEditors();
for (int z= 0; z < editors.length; z++) {
- IEditorPart editor= editors[z];
- IEditorInput input= editor.getEditorInput();
- if (editor.isDirty() && !inputs.contains(input)) {
- inputs.add(input);
- result.add(editor);
- }
+ result.add(editors[z]);
}
}
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java
index f7f87fa32..3f04535a7 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java
@@ -222,23 +222,14 @@ public class EditionAction implements IActionDelegate {
if (wps != null) {
for (int j= 0; j < wps.length; j++) {
IWorkbenchPage wp= wps[j];
- IEditorPart[] eps= wp.getEditors();
- if (eps != null) {
- for (int k= 0; k < eps.length; k++) {
- IEditorPart ep= eps[k];
- IEditorInput ei= ep.getEditorInput();
- if (test.equals(ei)) {
- if (ep instanceof ITextEditor) {
- ITextEditor te= (ITextEditor) ep;
- IDocumentProvider dp= te.getDocumentProvider();
- if (dp != null) {
- IDocument doc= dp.getDocument(ei);
- if (doc != null)
- return doc;
- }
-
- }
- }
+ IEditorPart ep= wp.findEditor(test);
+ if (ep instanceof ITextEditor) {
+ ITextEditor te= (ITextEditor) ep;
+ IDocumentProvider dp= te.getDocumentProvider();
+ if (dp != null) {
+ IDocument doc= dp.getDocument(ep);
+ if (doc != null)
+ return doc;
}
}
}

Back to the top