예제 #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);
   }
 }
예제 #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);
     }
   }
 }
예제 #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);
   }
 }