}
File selectedFile = fileChooser.getSelectedFile();
// A path to a file, which for now we assume contains only the .cal source definition.
SimpleCALFileVault fileVault = SimpleCALFileVault.getSimpleCALFileVault(selectedFile);
if (fileVault == null) {
String title2 = getResourceString("AddModuleFailedTitle");
String message2 = GemCutterMessages.getString("AddModuleFromSourceFailedMessage", selectedFile.getName());
JOptionPane.showMessageDialog(GemCutter.this, message2, title2, JOptionPane.ERROR_MESSAGE);
return;
}
// Try to add the module.
handleAddModuleAttempt(fileVault, fileVault.getModuleName(), 0, true);
}