AutoComplete icon indicating copy to clipboard operation
AutoComplete copied to clipboard

AutoCompletion freeze on TemplateCompletion insert (happens rare).

Open olegvasylenko opened this issue 9 years ago • 1 comments

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);

olegvasylenko avatar Dec 13 '16 13:12 olegvasylenko

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

tttwang23 avatar Jul 03 '17 03:07 tttwang23