This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
h1 { col| } 1) set caret to the pipe position 2) invoke completion => color: is autocompleted #bug: the completion should remain opened 3) invoke completion again 4) type space => completion closes again, should remain opened
Requires changes in CssCompleter so it is able to distinguish the content when deciding when to open/close the completion window.
Several other obstacles: 1) CompletionProvider.getAutoQueryType() is not called for a completed text 2) CSL's CompletionProposal doesn't provide any hook for the text insertion like CompletionItem.substituteText() method where I can call Completion.get().showCompletion() if the language directly implement editor completion api. Something like boolean CompletionProposal.keepCompletionOpened() checked by CSL and possible opening the completion again after the proposal gets completed. More general void CompletionProposal.itemCompleted(JTextComponent comp) callback called after the item completion would be also nice and possibly could allow to implement more enhanced features based on CSL completion.
*** Issue 165886 has been marked as a duplicate of this issue. ***
I tried to fix that before some time when dealing with issue #168050, but I appeared to be a bit more complicated then I expected at the beginning. Completion.get().hideAll/Completion() is called from multiple places in the CSL completion support when a code is insterted by the completion. I would really appreciate if a CSL expert done this.
We don't have any CSL expert any more. I will try to have a look but currently you are a way more expert than myself ...
I am sorry but the whole CSL completion support should be looked at and possibly separated into its own module. For this release I will fix only critical bugs for which this one does not qualify. I have tried to play with the described behavior and I have to say that as a user I don't really follow your argument that the code completion should stay opened - in your scenario I have expected the code completion to be hidden right after you select color: exactly like it happened. Also I don't really understand why the code completion should not be closed on hitting space. Anyway - if you feel strongly that this should change you have to implement it yourself - I am sorry.
> I don't really follow your argument that the code completion should stay opened Sure, that's a matter of taste. However the issue was mainly about the missing possibility to control such behavior. I slightly remember discussing this with Vita offline and we most probably agreed on him looking into it. I agree with you this is an enhancement.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss