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 257867 - Code completion colors in GsfCompletionItem and SQLCompletionItem
Summary: Code completion colors in GsfCompletionItem and SQLCompletionItem
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 8.1
Hardware: PC All
: P3 normal with 5 votes (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-05 18:36 UTC by Revivius
Modified: 2017-07-18 09:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Revivius 2016-02-05 18:36:06 UTC
It is the responsibility of client author to provide code completion item colors and so this issue may not be directly related to code completion infrastructure but practise used in default implementation (GsfCompletionItem) and many other CompletionItem implementations result in hard to read colors. Please see:

- http://hg.netbeans.org/main/file/26a46bf0558d/csl.api/src/org/netbeans/modules/csl/editor/completion/GsfCompletionItem.java#l675
- http://hg.netbeans.org/main/file/26a46bf0558d/db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionItem.java#l68

General practise seems to be using LFCustoms.shiftColor() which tries to return brighter or darker color depending on the LAF. This approach does not seem to produce readable colors especially for dark LAFs. Please see:

https://github.com/Revivius/nb-darcula/issues/26
https://github.com/Revivius/nb-darcula/issues/67

I would like to to suggest using UIManager keys to lookup colors for completion item colors (as done for various places) and fallback to current practise of using LFCustoms if desired key is not available.
Comment 1 Geertjan Wielenga 2016-02-05 21:05:23 UTC
Added 'fix-in-82' in status whiteboard.
Comment 3 Rahul.khandelwal 2016-10-05 06:11:21 UTC
Was it fixed in 8.2 ?
Comment 4 Christian Lenz 2017-07-18 09:30:28 UTC
It doesn't seems so, any news here?