package bluej.compiler;
import bluej.Config;
| An enum keeping track of the compile type, in order to decide
| whether to retain or discard the class files generated by
| the compilation. We automatically compile when the user edits the code, for
| error checking, but we discard the class files in this case.
| We only keep the class files if the user explicitly invoked compilation,
| or if it was an internal compile (e.g. for method invocation) where we
| want the result.
|
public enum CompileType{
EXPLICIT_USER_COMPILE,
ERROR_CHECK_ONLY,
INTERNAL_COMPILE,
EXTENSION,
INDIRECT_USER_COMPILE;
public boolean keepClasses()
{
return Config.isGreenfoot() || this != ERROR_CHECK_ONLY;
}
public boolean showEditorOnError()
{
return this == EXPLICIT_USER_COMPILE;
}
}
. keepClasses
. showEditorOnError
23 neLoCode
+ 7 LoComm