if (!MaudesimpleGUIPlugin.getDefault().getMaude().isRunning()) {
MessageDialog.openError(null, Messages.getString("MaudeGUI.E_TITLE"),Messages.getString("MaudeGUI.E_NORUNNING")); //$NON-NLS-1$ //$NON-NLS-2$
} else {
TextEditor editor;
editor = (TextEditor) activeEditorPart;
String editorText =
editor.getDocumentProvider().getDocument(editor.getEditorInput()).get();
MaudesimpleGUIPlugin.getDefault().getMaude().sendToMaude(editorText);
// envio el texto a maude modules. Alfredo Mu�oz Andrades
MaudeModules.getInstance().addModules(editorText);
}
}
};
actSendMaude.setText(Messages.getString("MaudeGUI.MM_SENDTOMAUDE")); //$NON-NLS-1$
actSendMaude.setToolTipText(Messages.getString("MaudeGUI.MT_SENDTOMAUDE")); //$NON-NLS-1$
actSendMaude.setAccelerator(SWT.F9);
actSendMaude.setImageDescriptor(ImageDescriptor.createFromURL(
MaudesimpleGUIPlugin.getDefault().find(new Path(Messages.getString("MaudeGUI.MI_SENDTOMAUDE"))))); //$NON-NLS-1$
actSendMaude.setDisabledImageDescriptor(ImageDescriptor.createFromURL(
MaudesimpleGUIPlugin.getDefault().find(new Path(Messages.getString("MaudeGUI.MC_SENDTOMAUDE"))))); //$NON-NLS-1$
// Send selection to Maude
actSendSelMaude = new Action() {
public void run() {
if (!MaudesimpleGUIPlugin.getDefault().getMaude().isRunning()) {
MessageDialog.openError(Workbench.getInstance().getDisplay().getActiveShell(), Messages.getString("MaudeGUI.E_TITLE"),Messages.getString("MaudeGUI.E_NORUNNING")); //$NON-NLS-1$ //$NON-NLS-2$
} else {
TextEditor editor;
editor = (TextEditor) activeEditorPart;
ISelection sel = editor.getSelectionProvider().getSelection();
Object selection = null;
if(sel instanceof TextSelection) {
selection = ((TextSelection)sel).getText();
}
if(selection!= null && selection.toString().length() > 0)