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);
 }
    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);
          }
        }
      }
    }
 private boolean isFloating() {
   return myWindow.getOwner().isFloating();
 }