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 108161

Summary: Coloring of live templates
Product: editor Reporter: jrojcek <jrojcek>
Component: Painting & PrintingAssignee: issues@editor <issues>
Status: RESOLVED FIXED    
Severity: blocker CC: jjancura, tor
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://ui.netbeans.org/usability/editor_2/report.html
Issue Type: ENHANCEMENT Exception Reporter:

Description jrojcek 2007-06-26 15:22:41 UTC
A participant complains about live template coloring (for). There's a very subtle indication which item is selected (slightly different grade of blue) and no visual 
indication there's more active items the use can change.

Recommendation:

Consider using rectangle indication for active items and better distinguish the selected item.
Comment 1 Vitezslav Stejskal 2007-06-28 13:06:06 UTC
This is not going to be easy to implement.
Comment 2 Vitezslav Stejskal 2007-10-17 12:23:50 UTC
*** Issue 119081 has been marked as a duplicate of this issue. ***
Comment 3 Vitezslav Stejskal 2008-02-28 19:50:39 UTC
changeset 58824da0a9e3 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=58824da0a9e3
Comment 4 Vitezslav Stejskal 2008-02-29 10:59:52 UTC
I added the same support to the instant rename action in the java editor and GSF based editors.

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


We might want to do the same for Schliemann, but the code there was quite different from the other two (java & gsf) and
I didn't feel confident changing it.

Moreover, both GSF and Schliemann are still using editor.highlights, which was an experimental version of the
highlighting API and is now deprecated. The official API for highlighting is in editor.lib2. Besides of other
limitations the experimental API is greatly inefficient comparing to the official version.

The transition should be relatively easy - in GSF I already rewrote the part related to instant rename, the rest is
dealing with mark occurrences. The rewrite of this part could probably be inspired by java again. :-) The only tricky
part are XML layer registrations. But that could be solved by registering the highlighting layer factory for 'all' mime
types and checking if the factory is dealing with GSF based language in its createLayers method. If not, it will return
no layers, if yes, then return whatever layers are appropriate.