Skip to content

JavaFX - AutoComplete pop up showing, but buggy #82

Description

Running on Mac, I got the RSyntaxTextArea working as a standalone Swing application and as a separate application in a SwingNode in JavaFX, but when I press ctrl+SPACE in either version no window pop up is shown. My JavaFX code is below.

However, if I press SPACE then ctrl in that order, the pop up shows in an on-off flashing fashion and when I release SPACE, depending on whether the pop is showing or not, it stays on the screen !

Is this a bug ? Why is is not showing normally with just a ctrl+SPACE? Thanks.

final SwingNode swing = new SwingNode();
pluginsAnchor.getChildren().add(swing);

JPanel cp = new JPanel(new BorderLayout());
textArea = new RSyntaxTextArea(40, 100);
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
textArea.setCodeFoldingEnabled(true);
RTextScrollPane sp2 = new RTextScrollPane(textArea);
cp.add(sp2);

CompletionProvider provider = createCompletionProvider();
AutoCompletion ac = new AutoCompletion(provider);
ac.install(textArea);

swing.setContent(cp);

Turns out if I add:

ac.setTriggerKey(KeyStroke.getKeyStroke('\t'));

the pop up appears, but it also tabs in the editor. There seems to be a real problem with setting the combination of CONTROL + SPACE. It doesn't work.

I managed to get it working with a different key combo using:

ac.setTriggerKey(KeyStroke.getKeyStroke("ctrl released ENTER"));   // why won't "ctrl pressed SPACE" work ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions