com.intellij.openapi.fileEditor.impl.EditorWindow Java Examples

The following examples show how to use com.intellij.openapi.fileEditor.impl.EditorWindow. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CloseIgnoredEditorsAction.java    From idea-gitignore with MIT License 5 votes vote down vote up
/**
 * Obtains if editor is allowed to be closed.
 *
 * @return editor is allowed to be closed
 */
@Override
protected boolean isFileToClose(final EditorComposite editor, final EditorWindow window) {
    final Project project = window.getManager().getProject();
    final FileStatusManager fileStatusManager = FileStatusManager.getInstance(project);
    final ChangeListManager changeListManager = ChangeListManager.getInstance(project);
    final VirtualFile fileInEditor = editor.getFile();
    return fileStatusManager != null &&
        fileStatusManager.getStatus(fileInEditor).equals(IgnoreFileStatusProvider.IGNORED) ||
        changeListManager.isIgnoredFile(fileInEditor);
}
 
Example #2
Source File: ParametersPanel.java    From jetbrains-plugin-graph-database-support with Apache License 2.0 4 votes vote down vote up
private String getTabTitle(VirtualFile file) {
    Window window = WindowManagerEx.getInstanceEx().getMostRecentFocusedWindow();
    EditorWindow editorWindow = FileEditorManagerEx.getInstanceEx(project).getSplittersFor(window).getCurrentWindow();
    return EditorTabPresentationUtil.getEditorTabTitle(project, file, editorWindow);
}