Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0-beta-5
-
None
-
None
-
jdk 1.4.2_03, winxp
Description
The following code when executing (via bsf but I guess it shouldn't matter), gives the below error.
No such method: actionPerformed for class: SomeAction. At [16:24] Bracket_Handler.groovy
Code in Bracket_Handler.groovy
import javax.swing.*;
import java.awt.event.*;
import org.gjt.sp.jedit.*;
import org.gjt.sp.jedit.textarea.*;
public class SomeAction extends javax.swing.text.TextAction
{
public SomeAction()
public void actionPerformed(ActionEvent e)
"); */
}
}
javax.swing.Action bracket_Action = new SomeAction();
InputMap inputMap = jEdit.getActiveView().getTextArea().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
KeyStroke open_bracket = KeyStroke.getKeyStroke("shift OPEN_BRACKET");
inputMap.put(open_bracket, bracket_Action.getValue(Action.NAME));
ActionMap actionMap = jEdit.getActiveView().getTextArea().getActionMap();
actionMap.put(bracket_Action.getValue(Action.NAME), bracket_Action);
//println "Done";
Stacktrace in log window
exception from Groovy: groovy.lang.GroovyRuntimeException: No such method: actionPerformed for class: SomeAction. At [16:24] Bracket_Handler.groovy
org.apache.bsf.BSFException: exception from Groovy: groovy.lang.GroovyRuntimeException: No such method: actionPerformed for class: SomeAction. At [16:24] Bracket_Handler.groovy
at org.codehaus.groovy.bsf.GroovyEngine.exec(GroovyEngine.java:167)
at org.apache.bsf.BSFManager$6.run(Unknown Source)
-Jiger