public class MMJ2FailPopupWindow
extends java.lang.Object
MMJ2FailPopupWindow
displays start-up and abnormal termination
errors.
Here is an overview of how this works:
BatchFramework
obtains the displayMMJ2FailPopupWindow
parameter from the command line arguments. If "Y" or not entered (default),
and during command line processing, the MMJ2FailPopupWindow
is used
to display fail (abort) errors and error messages generated during "startup"
-- meaning prior to the Proof Assistant GUI display.
BatchFramework.runIt()
checks for "fail" errors and calls
MMJ2FailPopupWindow.displayFailMessage()
to display the final message
from mmj2 :-)
OutputBoss.printAndClearMessages()
, which is used by the various
mmj.util.*Boss
classes to output errors generated by RunParm
processing, calls accumStartupErrors()
and
displayStartupErrors
in MMJ2FailPopupWindow
. There are two
functions because we want the messages to also be output to the Command
Prompt window but that process deletes the messages. So we gather them first,
and then later display them.
startupMode
boolean
variable is used. Initially, right after the command line arguments are
parsed, BatchFramework.runIt()
calls initiateStartupMode()
and then later, in ProofAsstBoss.doRunProofAsstGUI()
calls
terminateStartupMode()
.Constructor and Description |
---|
MMJ2FailPopupWindow(BatchFramework batchFramework,
boolean enabled)
Standard constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accumStartupErrors()
Gathers the
Messages error messages to be displayed. |
void |
displayFailMessage(java.lang.String failMessage)
Displays a
JOptionPane Dialog showing the failMessage . |
void |
displayStartupErrors()
Displays a Dialog showing the messages gathered by
accumStartupErrors . |
void |
initiateStartupMode()
Sets startupMode to
true and initializes related variables. |
void |
setEnabled(boolean enabled)
Sets
enabled switch to turn on/off display of the
MMJ2FailPopupWindow . |
void |
terminateStartupMode()
Ends startupMode so that only Fail messages are shown.
|
public MMJ2FailPopupWindow(BatchFramework batchFramework, boolean enabled)
batchFramework
- The BatchFramework
object.enabled
- true to enable display of the popup window, otherwise
false.public void setEnabled(boolean enabled)
enabled
switch to turn on/off display of the
MMJ2FailPopupWindow
.enabled
- true to enable display of the popup window, otherwise
false.public void initiateStartupMode()
true
and initializes related variables.public void terminateStartupMode()
public void displayFailMessage(java.lang.String failMessage)
JOptionPane
Dialog showing the failMessage
.
Note: if MMJ2FailPopupWindow
is not enabled
the Dialog is
not shown.
failMessage
- the final mmj2 message before abnormal termination of
processing.public void accumStartupErrors()
Messages
error messages to be displayed.
Note: if MMJ2FailPopupWindow
is not enabled
or not in
startupMode
or if the current RunParm command is
VerifyProof
the messages are not accumulated (or shown).
public void displayStartupErrors()
accumStartupErrors
.
Note: if MMJ2FailPopupWindow
is not enabled
or if no
error messages were gathered the Dialog is not shown.