Ejemplo n.º 1
0
 public void selectWindow(@NotNull DataContext context, int index) {
   final FileEditorManagerEx fileEditorManager = getFileEditorManager(context);
   final EditorWindow[] windows = fileEditorManager.getWindows();
   if (index - 1 < windows.length) {
     windows[index - 1].setAsCurrentWindow(true);
   }
 }
Ejemplo n.º 2
0
 public void closeAllExceptCurrent(@NotNull DataContext context) {
   final FileEditorManagerEx fileEditorManager = getFileEditorManager(context);
   final EditorWindow current = fileEditorManager.getCurrentWindow();
   for (final EditorWindow window : fileEditorManager.getWindows()) {
     if (window != current) {
       window.closeAllExcept(null);
     }
   }
 }
Ejemplo n.º 3
0
 public void selectWindowInRow(
     @NotNull DataContext context, int relativePosition, boolean vertical) {
   final FileEditorManagerEx fileEditorManager = getFileEditorManager(context);
   final EditorWindow currentWindow = fileEditorManager.getCurrentWindow();
   if (currentWindow != null) {
     final EditorWindow[] windows = fileEditorManager.getWindows();
     final List<EditorWindow> row =
         findWindowsInRow(currentWindow, Arrays.asList(windows), vertical);
     selectWindow(currentWindow, row, relativePosition);
   }
 }