some additional checks for consistency

This commit is contained in:
Eugene Zhuravlev
2014-05-06 18:57:45 +04:00
parent 73c5925665
commit 2311a489bb
2 changed files with 11 additions and 6 deletions
@@ -597,16 +597,21 @@ public final class AntBuildMessageView extends JPanel implements DataProvider, O
return true;
}
AntBuildMessageView messageView = myContent.getUserData(KEY);
final AntBuildMessageView messageView = myContent.getUserData(KEY);
if (messageView.isStoppedOrTerminateRequested()) {
if (messageView == null || messageView.isStoppedOrTerminateRequested()) {
return true;
}
if (myCloseAllowed) return true;
if (myCloseAllowed) {
return true;
}
int result = Messages.showYesNoCancelDialog(AntBundle.message("ant.process.is.active.terminate.confirmation.text"),
AntBundle.message("close.ant.build.messages.dialog.title"), Messages.getQuestionIcon());
final int result = Messages.showYesNoCancelDialog(
AntBundle.message("ant.process.is.active.terminate.confirmation.text"),
AntBundle.message("close.ant.build.messages.dialog.title"), Messages.getQuestionIcon()
);
if (result == 0) { // yes
messageView.stopProcess();
myCloseAllowed = true;
@@ -71,7 +71,7 @@ public class OutputParser{
}
public boolean isTerminateInvoked() {
return myProcessHandler.isProcessTerminating();
return myProcessHandler.isProcessTerminating() || myProcessHandler.isProcessTerminated();
}
protected Project getProject() {