@NotNull public FileEditor[] getSelectedEditors() { final List<FileEditor> editors = new ArrayList<FileEditor>(); final EditorWindow currentWindow = getCurrentWindow(); if (currentWindow != null) { final EditorWithProviderComposite composite = currentWindow.getSelectedEditor(); if (composite != null) { editors.add(composite.getSelectedEditor()); } } for (final EditorWindow window : myWindows) { if (!window.equals(currentWindow)) { final EditorWithProviderComposite composite = window.getSelectedEditor(); if (composite != null) { editors.add(composite.getSelectedEditor()); } } } return editors.toArray(new FileEditor[editors.size()]); }
@NotNull public FileEditor[] getSelectedEditors() { List<FileEditor> editors = new ArrayList<FileEditor>(); Set<EditorWindow> windows = new THashSet<EditorWindow>(myWindows); final EditorWindow currentWindow = getCurrentWindow(); if (currentWindow != null) { windows.add(currentWindow); } for (final EditorWindow window : windows) { final EditorWithProviderComposite composite = window.getSelectedEditor(); if (composite != null) { editors.add(composite.getSelectedEditor()); } } return editors.toArray(new FileEditor[editors.size()]); }