Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 124351 - Unable to change text in completion popup
Unable to change text in completion popup
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: Completion & Templates
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Dusan Balek
issues@editor
: API, API_REVIEW_FAST
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-21 03:48 UTC by Rohan Ranade
Modified: 2008-02-07 10:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Proposed change (10.66 KB, patch)
2008-01-30 13:18 UTC, Dusan Balek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rohan Ranade 2007-12-21 03:48:51 UTC
I am trying to implement smart code completion for a Spring Beans Context XML file
(http://spring-netbeans.sourceforge.net). When the user presses Ctrl+Space, I want to show items locally defined in the
XML file, and when the user presses Ctrl+Space again, I want to show all items (local + ones defined in referenced files).

CompletionResultSet.hasAdditionalItems() does the trick for me, but shows me the text "Imported Items. Press Ctrl+Space
again..." at the bottom of the completion pop up. This text is misleading in my usage context and I want to change it.
However there is no method exposed to change this text. This text should be configurable, as the smart completion is now
going to be used in XML files like Spring beans config as well as hibernate mapping/config files.
Comment 1 Vitezslav Stejskal 2008-01-02 10:36:25 UTC
We are sorry, but presently there is no way to change this text through the Code Completion APIs. We'll have to find
some solution.
Comment 2 Dusan Balek 2008-01-30 13:18:36 UTC
Created attachment 55762 [details]
Proposed change
Comment 3 Dusan Balek 2008-01-30 13:21:08 UTC
I would like to propose a small change to the editor/completion API to allow for customization of the text as requested
(diff is attached).
Comment 4 Vladimir Voskresensky 2008-01-30 14:33:31 UTC
patch is OK for me
Comment 5 Vitezslav Stejskal 2008-02-04 15:43:52 UTC
I know this is nitpick, but should not there be some sort of a separator between messages supplied by several completion
providers or should we just pick the first one? And I suppose, there will be related changes in existing completion
providers that need to call CRS.setHasAdditionalItemsText(), right? (at least in Java completion provider; obviously in
C++; maybe also in Ruby and others)

Otherwise the change is looking good, thanks.
Comment 6 Vladimir Voskresensky 2008-02-04 16:42:06 UTC
I'm OK to update C++ text after integration by myself
Comment 7 Dusan Balek 2008-02-07 10:04:33 UTC
Fixed.

changeset fc946e8c34d2 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=fc946e8c34d2

changeset 3f8068e9891b in main
details: http://hg.netbeans.org/main?cmd=changeset;node=3f8068e9891b


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo