showMonitor();
setStatus(GemCutterMessages.getString("CalculatingModificationsStatus"));
try {
ExtendedUndoableEditSupport undoableEditSupport = tableTop.getUndoableEditSupport();
undoableEditSupport.beginUpdate();
CompilerMessageLogger logger = new MessageLogger();
typeDeclsAdder.calculateModifications(logger);
if(logger.getMaxSeverity().compareTo(CompilerMessage.Severity.ERROR) >= 0) {
closeMonitor();
showCompilationErrors(logger, getResourceString("ErrorWhileCalculatingModifications"));
return;
}
incrementProgress();
setStatus(GemCutterMessages.getString("ApplyingModificationsStatus"));
typeDeclsAdder.apply(logger);
if(logger.getMaxSeverity().compareTo(CompilerMessage.Severity.ERROR) >= 0) {
closeMonitor();
showCompilationErrors(logger, getResourceString("ErrorWhileApplyingModifications"));
return;
}
incrementProgress();
setStatus(GemCutterMessages.getString("RecompilingStatus"));
recompileWorkspace(true);
if(logger.getMaxSeverity().compareTo(CompilerMessage.Severity.ERROR) >= 0) {
closeMonitor();
showCompilationErrors(logger, getResourceString("ErrorWhileRecompiling"));
return;
}
incrementProgress();
setStatus(GemCutterMessages.getString("SuccessStatus"));
UndoableRefactoringEdit addTypeDeclsEdit = new UndoableRefactoringEdit(GemCutter.this, typeDeclsAdder, GemCutterMessages.getString("AddTypedeclsPresentationName"));
undoableEditSupport.setEditName(addTypeDeclsEdit.getPresentationName());
undoableEditSupport.postEdit(addTypeDeclsEdit);
// End the update.
undoableEditSupport.endUpdate();
// Make sure that the dialog is active for long enough to be visible
try {
sleep(750);
} catch(InterruptedException e) {