if (compiler.isDebuggerActive()) {
compiler.stopDebugger(true);
}
// Get the project the user is referencing
Project proj = getAppropriateProject(isMainMenuRequest(e));
MainFileProvider provider = getMainFile(proj);
if(!isProjectSetupCorrectly(provider)) {
return;
}
compiler.setBuildFolder(provider.getBuildDirectory());
compiler.setDistributionFolder(provider.getDistributionDirectory());
//clean the build.
compiler.clean();
ProjectInformation info = proj.getLookup().lookup(ProjectInformation.class);
if (TextToSpeechOptions.isScreenReading())
speech.speak("Cleaning project " + info.getDisplayName(), SpeechPriority.HIGHEST);
}