Beispiel #1
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;
     }
   }
 }
Beispiel #2
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;
   }
 }