/** Save changes to the file */
private void saveText() {
ModuleName moduleName = getModuleNameFromCurrentSourcePosition();
CALSourceManager sourceManager = perspective.getWorkspace().getSourceManager(moduleName);
Status saveStatus = new Status("Saving module text");
sourceManager.saveSource(moduleName, editorPane.getText(), saveStatus);
if(!saveStatus.isOK()) {
String errTitle = GemCutter.getResourceString("CannotSaveDialogTitle");
String errMessage = GemCutter.getResourceString("SaveModuleError");
JOptionPane.showMessageDialog(this, errMessage, errTitle, JOptionPane.ERROR_MESSAGE);
System.out.println(saveStatus.getDebugMessage());