Bug 278284 - [syntax coloring] Toggle button for darkening and fading code and comments
Summary: [syntax coloring] Toggle button for darkening and fading code and comments
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.4.1   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-28 16:18 EDT by Michael CLA
Modified: 2009-05-29 06:05 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael CLA 2009-05-28 16:18:26 EDT
I thought today when looking at some particularly dense code that it would be quite useful to have a toggle button such that with each new click you could achieve the following:

1. lighten the colours used for code and darken the colour used for comments (multi- and single-line)
2. lighten the comments (so that they're just readable) and returning the code to its default colours
3. return colours for both code and comments to their default values.

It might even encourage my colleagues (a) to read the comments or (b) write some of their own :-"

Cheers

Mike
Comment 1 Remy Suen CLA 2009-05-28 16:24:07 EDT
Which editor are you using? What type of files are you editing?
Comment 2 Michael CLA 2009-05-28 16:29:37 EDT
(In reply to comment #1)
> Which editor are you using? What type of files are you editing?

I'm using the default Java editor and am editing .java files. 

Comment 3 Dani Megert CLA 2009-05-29 03:40:53 EDT
I don't quite understand why you would want to do this on the fly. Can you explain a bit more what you hope to get from such a feature.
Comment 4 Michael CLA 2009-05-29 05:05:05 EDT
(In reply to comment #3)
> I don't quite understand why you would want to do this on the fly. Can you
> explain a bit more what you hope to get from such a feature.
> 

Hi Dani, 

Well, as I mentioned in the original request, I was looking at a page which was quite densely written and wanted to be able to scan the page more easily for its code and its comments, but with code and comments in their default colours the contrast achieved between the two wasn't as good as it could have been. I've since lightened the colour used for the comments to make the code sections more distinct, but it would be nice to be able to bring one or the other into the foreground at the click of a button. 

Does this help? Can I suggest finding some code which fits the "densely written" description and looking at it both with feint and heavier colours for the comments. Admittedly, lightening the myriad colours used for code could take a while!

Cheers

Mike



Comment 5 Dani Megert CLA 2009-05-29 05:50:02 EDT
But why do you need to do this on the fly instead of just change your settings? Or, if the formatting is not as you like, reformat the code?
Comment 6 Michael CLA 2009-05-29 06:05:02 EDT
(In reply to comment #5)
> But why do you need to do this on the fly instead of just change your settings?
> Or, if the formatting is not as you like, reformat the code?

The default colours are useful for general coding, but you may get to some code where a greater contrast is required. 

You may wish to read through the comments in series and have these in darker colours and the code in lighter colours. You may then wish to change this again so the contrast emphasises the code. 

Doing this by navigating Window->Preferences->Java->Editor->Syntax Colouring->(Multi-line|Single line)->Color->Color name->(remember-the-hex-code) is not a viable process if you want to be productive - hence the request for toggle/cycle button to take away the pain.