final JPanel j = new JPanel(new BorderLayout());
j.add(f.getPanel(true), BorderLayout.NORTH);
// add code
final CodeEditor code = JRubyPlugin.getCodeEditor(content);
code.addKeyListener(new KeyListener() {
@Override
public void keyTyped(final KeyEvent arg0) {}
@Override
public void keyReleased(final KeyEvent e) {
// wrong keys?
if (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_LEFT || e.getKeyCode() == KeyEvent.VK_DOWN
|| e.getKeyCode() == KeyEvent.VK_RIGHT) {
return;
}
if (!modified) {
modified = true;
}
content = code.getText();
}
@Override
public void keyPressed(final KeyEvent arg0) {}
});