}
editArea.getInputMap().put( KeyStroke.getKeyStroke( "F3" ), "find-action" );
editArea.getInputMap().put( KeyStroke.getKeyStroke( "ctrl F" ), "find-action" );
RSyntaxTextAreaFindAndReplaceable findAndReplaceable = new RSyntaxTextAreaFindAndReplaceable();
editArea.getActionMap().put( "find-action", new FindAndReplaceDialog( findAndReplaceable ) );
groovyDocumentListener = new GroovyDocumentListener();
editArea.getDocument().addDocumentListener( groovyDocumentListener );
settingsListener = new InternalSettingsListener();
settings.addSettingsListener( settingsListener );
// scrollPane = new RTextScrollPane( 500, 300, editArea, true );
scrollPane = new RTextScrollPane( editArea, true );
scrollPane.setPreferredSize( new Dimension( 500, 300 ) );
add( scrollPane );
UISupport.addPreviewCorner( scrollPane, true );
addFocusListener( new FocusAdapter()
{
public void focusGained( FocusEvent e )
{
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" ) );