public void contentRemoveQuery(final ContentManagerEvent event) {
   if (event.getContent() == myContent) {
     final boolean canClose = closeQuery();
     if (!canClose) {
       event.consume();
     }
   }
 }
 @Override
 public void contentAdded(ContentManagerEvent event) {
   if (devMotivePanel == null && event.getContent().getComponent() instanceof DevMotivePanel) {
     DevMotivePanel panel = (DevMotivePanel) event.getContent().getComponent();
     if (annotation.getFile().equals(panel.getFile())) {
       devMotivePanel = panel;
       devMotivePanel.addChangeListener(this);
     }
   }
 }
 @Override
 public void contentRemoved(ContentManagerEvent event) {
   if (devMotivePanel != null && devMotivePanel.equals(event.getContent().getComponent())) {
     releasePanel();
     updateAnnotations();
   }
 }
예제 #4
0
 public void contentRemoveQuery(ContentManagerEvent event) {
   if (event.getContent() == myContent) {
     if (!myIndicator.isCanceled() && shouldAskUser()) {
       int result =
           Messages.showOkCancelDialog(
               myProject,
               CompilerBundle.message("warning.compiler.running.on.toolwindow.close"),
               CompilerBundle.message("compiler.running.dialog.title"),
               Messages.getQuestionIcon());
       if (result != 0) {
         event.consume(); // veto closing
       }
       myUserAcceptedCancel = true;
     }
   }
 }
 public void contentRemoved(ContentManagerEvent event) {
   if (event.getContent() == myContent) {
     myContentManager.removeContentManagerListener(this);
     AntBuildMessageView buildMessageView = myContent.getUserData(KEY);
     if (!myCloseAllowed) {
       buildMessageView.stopProcess();
     }
     ProjectManager.getInstance().removeProjectManagerListener(myProject, this);
     myContent.release();
     myContent = null;
     buildMessageView.myBuildFile = null;
     buildMessageView.myPlainTextView.dispose();
   }
 }
예제 #6
0
 public void contentRemoved(ContentManagerEvent event) {
   if (event.getContent() == myContent) {
     synchronized (myMessageViewLock) {
       if (myErrorTreeView != null) {
         myErrorTreeView.dispose();
         myErrorTreeView = null;
         if (myIndicator.isRunning()) {
           cancel();
         }
         if (AppIcon.getInstance().hideProgress(myProject, "compiler")) {
           AppIcon.getInstance().setErrorBadge(myProject, null);
         }
       }
     }
     myContentManager.removeContentManagerListener(this);
     myContent.release();
     myContent = null;
   }
 }
 public void contentRemoved(final ContentManagerEvent event) {
   final Content content = event.getContent();
   if (content == myContent) {
     dispose();
   }
 }