1 Nov 2011 05:14
[groovy-user] Error in generated stub
A co-worker added the ability to hyperlink some of the fields in our
project's UI, but the added class causes an error during the (ant) groovyc
compilation task on _some_ machines. Nothing seems amiss in the code, but
the generated stub includes a call to 'super(null)' which it then has
difficulty resolving which superclass constructor it should be matching.
'Troublesome' class:
class ClickableFormattedTextField extends JFormattedTextField {
private Clickable clicker
ClickableFormattedTextField(JFormattedTextField.AbstractFormatterFactory
factory, Clickable clicker) {
super(factory)
this.clicker = clicker
setForeground(Color.BLUE)
setDisabledTextColor(Color.BLUE)
addMouseListener(getClickMouseListener())
setToolTipText(getText())
}
private MouseAdapter getClickMouseListener() {
new MouseAdapter() {
<at> Override
void mouseClicked(MouseEvent e) {
if (e.getButton() == MouseEvent.BUTTON1) {
clicker.click(getText())
(Continue reading)
RSS Feed