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.

Bug 163723 - Completion autohides too often
Summary: Completion autohides too often
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 165886 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-27 10:03 UTC by Marek Fukala
Modified: 2016-07-07 07:30 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Fukala 2009-04-27 10:03:47 UTC
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
Comment 1 Marek Fukala 2009-04-27 13:44:42 UTC
Requires changes in CssCompleter so it is able to distinguish the content when deciding when to open/close the
completion window.
Comment 2 Marek Fukala 2009-04-27 15:14:20 UTC
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.
Comment 3 Marek Fukala 2009-08-18 09:22:01 UTC
*** Issue 165886 has been marked as a duplicate of this issue. ***
Comment 4 Marek Fukala 2009-11-04 13:48:44 UTC
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.
Comment 5 David Strupl 2010-09-24 08:38:06 UTC
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 ...
Comment 6 David Strupl 2010-10-07 09:48:56 UTC
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.
Comment 7 Marek Fukala 2010-10-07 10:19:37 UTC
> 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.
Comment 8 Martin Balin 2016-07-07 07:30:28 UTC
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