{
editArea.requestFocusInWindow();
}
} );
RSyntaxAreaPopupMenu popup = RSyntaxAreaPopupMenu.add( editArea );
popup.add( new FindAndReplaceDialog( findAndReplaceable ) );
popup.addSeparator();
popup.add( new GoToLineAction() );
toggleLineNumbersMenuItem = new JCheckBoxMenuItem( "Show Line Numbers", scrollPane.getLineNumbersEnabled() );
toggleLineNumbersMenuItem.setAccelerator( UISupport.getKeyStroke( "alt L" ) );
toggleLineNumbersMenuItem.addActionListener( new ActionListener()
{
public void actionPerformed( ActionEvent e )
{
enableLineNumbers( toggleLineNumbersMenuItem.isSelected() );
}
} );
editArea.getInputMap().put( KeyStroke.getKeyStroke( "alt L" ), new AbstractAction()
{
public void actionPerformed( ActionEvent e )
{
enableLineNumbers( !scrollPane.getLineNumbersEnabled() );
}
} );
popup.add( toggleLineNumbersMenuItem );
editArea.setPopupMenu( popup );
enableLineNumbers( settings.getBoolean( UISettings.SHOW_GROOVY_LINE_NUMBERS ) );
}