Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoCompletion freeze on TemplateCompletion insert (happens rare). #38

Open
olegvasylenko opened this issue Dec 13, 2016 · 1 comment
Open

Comments

@olegvasylenko
Copy link

olegvasylenko commented Dec 13, 2016

Step to reproduce (not always possible to get this issue):

  1. AutoCompletion inserts TemplateCompletion to the text area by user choice and it properly position the cursor regarding the template description: func(${cursor}).
  2. User moves cursor buy right arrow/end button to the end of inserted string.
  3. User press Enter and nothing happens and assistance do not finish completion insert operation.

Expected that the operation will be finished and cursor will be positioned to the new line.

Note1: It happens very rare but if happens there is no way to unblock assistance. We close the window with text area and open new one.
Note2: We use TemplateCompletion but not FunctionCompletion with the special purpose and understand the possibility of both of them.

I would appreciate any help or suggestion.

Code example we use in project:

DefaultCompletionProvider provider = new DefaultCompletionProvider();
provider.addCompletion(new TemplateCompletion(provider,"func","func(A)","func(${cursor})"));
...
...

JTextArea textArea = new JTextArea();
AutoCompletion initialization:
AutoCompletion ac = new AutoCompletion(provider);
ac.install(textArea);
ac.setAutoCompleteEnabled(true);
ac.setAutoActivationEnabled(true);
ac.setShowDescWindow(true);
ac.setParameterAssistanceEnabled(true);
ac.setAutoCompleteSingleChoices(false);
ac.setAutoActivationDelay(500);

@tttwang23
Copy link

In my product I set all AutoCompletion attributes before I call the install() method. Not sure if this is the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants