/** | /** | ||||
* Jump the progress bar to the end and finish progress monitoring. | * Jump the progress bar to the end and finish progress monitoring. | ||||
*/ | */ | ||||
public void finish(); | |||||
public void finish(boolean wasFullBuild); | |||||
} | } |
Ajde.getDefault().getErrorHandler().handleError("Compile error, caught Throwable: " + e.toString(), e); | Ajde.getDefault().getErrorHandler().handleError("Compile error, caught Throwable: " + e.toString(), e); | ||||
} finally { | } finally { | ||||
warnings = compilerMessages.hasWarning(); | warnings = compilerMessages.hasWarning(); | ||||
progressMonitor.finish(); | |||||
progressMonitor.finish(compilerAdapter.wasFullBuild()); | |||||
} | } | ||||
notifyCompileFinished(configFile, lastCompileTime, succeeded, warnings); | notifyCompileFinished(configFile, lastCompileTime, succeeded, warnings); | ||||
} | } |
buildManager.setState(buildState); | buildManager.setState(buildState); | ||||
buildManager.setStructureModel(buildState.getStructureModel()); | buildManager.setStructureModel(buildState.getStructureModel()); | ||||
} | } | ||||
public boolean wasFullBuild() { | |||||
return buildManager.wasFullBuild(); | |||||
} | |||||
} | } |
/** | /** | ||||
* Jump the progress bar to the end and finish progress monitoring. | * Jump the progress bar to the end and finish progress monitoring. | ||||
*/ | */ | ||||
public void finish() { | |||||
public void finish(boolean wasFullBuild) { | |||||
progressDialog.finish(); | progressDialog.finish(); | ||||
dialog.dispose(); | dialog.dispose(); | ||||
} | } |
return 100; // Causes setProgressBarVal() to be fed what are effectively percentages | return 100; // Causes setProgressBarVal() to be fed what are effectively percentages | ||||
} | } | ||||
public void finish() { | |||||
public void finish(boolean b) { | |||||
} | } | ||||
} | } |
return 0; | return 0; | ||||
} | } | ||||
public void finish() { | |||||
public void finish(boolean b) { | |||||
} | } | ||||
return 0; | return 0; | ||||
} | } | ||||
public void finish() {} | |||||
public void finish(boolean b) {} | |||||
} | } | ||||
return 0; | return 0; | ||||
} | } | ||||
public void finish() {} | |||||
public void finish(boolean b) {} | |||||
} | } | ||||
TaskListManager taskListManager = myHandler; | TaskListManager taskListManager = myHandler; | ||||
BuildProgressMonitor buildProgressMonitor = | BuildProgressMonitor buildProgressMonitor = | ||||
new DefaultBuildProgressMonitor(new Frame()) { | new DefaultBuildProgressMonitor(new Frame()) { | ||||
public void finish() { | |||||
super.finish(); | |||||
public void finish(boolean b) { | |||||
super.finish(b); | |||||
setEndTime(System.currentTimeMillis()); | setEndTime(System.currentTimeMillis()); | ||||
} | } | ||||
}; | }; | ||||
hasWarning = true; | hasWarning = true; | ||||
} | } | ||||
} | } | ||||
public void buildSuccessful(boolean wasFullBuild) { | |||||
// TODO Auto-generated method stub | |||||
} | |||||
} | } | ||||
class VoidInvocationHandler implements InvocationHandler { | class VoidInvocationHandler implements InvocationHandler { |
public boolean wasFullBuild() { | public boolean wasFullBuild() { | ||||
// alternatives: statelistener is debug interface, progressmonitor is new proper interface (see pr145689) | |||||
// return MyBuildProgressMonitor.wasFullBuild(); | |||||
return MyStateListener.wasFullBuild(); | return MyStateListener.wasFullBuild(); | ||||
} | } | ||||
public static void reset() { | public static void reset() { | ||||
_instance.finished = false; | _instance.finished = false; | ||||
_instance.wasFullBuild=true; | |||||
_instance.compiledFiles.clear(); | _instance.compiledFiles.clear(); | ||||
_instance.wovenClasses.clear(); | _instance.wovenClasses.clear(); | ||||
} | } | ||||
private long starttime = 0; | private long starttime = 0; | ||||
private long totaltimetaken = 0; | private long totaltimetaken = 0; | ||||
private boolean finished = false; | private boolean finished = false; | ||||
private boolean wasFullBuild = true; | |||||
public void start(String configFile) { | public void start(String configFile) { | ||||
starttime = System.currentTimeMillis(); | starttime = System.currentTimeMillis(); | ||||
return 100; | return 100; | ||||
} | } | ||||
public void finish() { | |||||
public void finish(boolean b) { | |||||
log("BuildProgressMonitor.finish()"); | log("BuildProgressMonitor.finish()"); | ||||
_instance.finished=true; | _instance.finished=true; | ||||
_instance.wasFullBuild = b; | |||||
_instance.totaltimetaken=(System.currentTimeMillis()-starttime); | _instance.totaltimetaken=(System.currentTimeMillis()-starttime); | ||||
} | } | ||||
if (VERBOSE) System.out.println(s); | if (VERBOSE) System.out.println(s); | ||||
} | } | ||||
public static boolean wasFullBuild() { | |||||
return _instance.wasFullBuild; | |||||
} | |||||
} | } | ||||