コード例 #1
0
 public DockableEditor(
     Image img, VirtualFile file, Presentation presentation, EditorWindow window) {
   myImg = img;
   myFile = file;
   myPresentation = presentation;
   myContainer = new DockableEditorTabbedContainer(myProject);
   myEditorWindow = window;
   myPreferredSize = myEditorWindow.getSize();
   myPinned = window.isFilePinned(file);
 }
コード例 #2
0
    public void actionPerformed(final AnActionEvent e) {
      final FileEditorManagerEx mgr = FileEditorManagerEx.getInstanceEx(myProject);
      EditorWindow window;
      final VirtualFile file = (VirtualFile) myTabInfo.getObject();
      if (ActionPlaces.EDITOR_TAB.equals(e.getPlace())) {
        window = myWindow;
      } else {
        window = mgr.getCurrentWindow();
      }

      if (window != null) {
        if ((e.getModifiers() & InputEvent.ALT_MASK) != 0) {
          window.closeAllExcept(file);
        } else {
          if (window.findFileComposite(file) != null) {
            mgr.closeFile(file, window);
          }
        }
      }
    }
コード例 #3
0
 private boolean isFloating() {
   return myWindow.getOwner().isFloating();
 }