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 189709

Summary: CC does not query AP inside string, does not show descriptions
Product: java Reporter: Jaroslav Tulach <jtulach>
Component: SourceAssignee: Dusan Balek <dbalek>
Status: VERIFIED FIXED    
Severity: normal CC: geertjan, jlahoda
Priority: P3    
Version: 6.x   
Hardware: Other   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 189558    

Description Jaroslav Tulach 2010-08-20 08:26:50 UTC
While working on bug 189558 I realized that it is not easy to provide Completion items from my AnnotationProcessor. The best I could achieve is at
http://hg.netbeans.org/core-main/rev/b6bc25bce72e

I want more: 

I am returning localized message for some reason, so it could be displayed somewhere.

I want to provide hints while the cursor is at "Shortcuts/|".

I want to position the cursor after the completion is made (I guess this is not part of the standard API, but when someone chooses "Menu/" the cursor shall be at "Menu/|", otherwise this forms horrible user experience).

I am surprised the that when I return Completions.of("Menu/"), the inserted text is surrounded by "! It works for me right now, but will that work for inserting other values than strings?
Comment 1 Dusan Balek 2010-08-23 13:01:14 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/fc74d32e4a87
Comment 2 Quality Engineering 2010-08-25 03:20:28 UTC
Integrated into 'main-golden', will be available in build *201008250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/fc74d32e4a87
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #189709: CC does not query AP inside string, does not show descriptions - fixed.
Comment 3 Jaroslav Tulach 2010-08-25 14:27:35 UTC
I am afraid the problem is not fixed yet:

- the Completion.getText() is not placed immediately after =
- my processor's getCompletions is really slow (8s in my case) which triggers the slowness detector. We need a way (like setting different text instead of Please wait...) to prevent that.

Let's wait for changes in 189558 to propagate to jet-main and test it on my real processor. I am also CCing Geertjan to help us achieve consistency of our support with the one in InteliJ.
Comment 4 Quality Engineering 2010-08-26 03:21:26 UTC
Integrated into 'main-golden', will be available in build *201008260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/14e3ac807488
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #189709: CC does not query AP inside string, does not show descriptions - fix cont.
Comment 5 Jaroslav Tulach 2010-08-26 10:03:41 UTC
Much better. Thanks.