// Create the fitter and fit.
JFit jfit = new JFit(options, perspective.getWorkspace(), generatorLogger);
final ModuleDefn defn = jfit.autoFit(); // null if an error occurred.
// Deal with warnings/errors.
Status capturedStatus = statusHandler.getStatus();
if (capturedStatus.getSeverity().compareTo(Status.Severity.WARNING) >= 0) {
String title = GeneratorMessages.getString("JFIMF_JavaForeignImportTitle");
String message = GeneratorMessages.getString("JFIMF_ProblemsGeneratingModule");
String details = capturedStatus.getDebugMessage();
DetailsDialog.MessageType messageType = capturedStatus.getSeverity() == Status.Severity.WARNING ?
DetailsDialog.MessageType.WARNING : DetailsDialog.MessageType.ERROR;
DetailsDialog dialog = new DetailsDialog(this, title, message, details, messageType);
dialog.doModal();
}