Bug 99284 - [Java Editor] Log statements should be able to be grayed, helping read the actual code
Summary: [Java Editor] Log statements should be able to be grayed, helping read the ac...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-09 20:00 EDT by Eduardo Rocha CLA
Modified: 2007-06-22 10:02 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo Rocha CLA 2005-06-09 20:00:57 EDT
Suppose I have the following method:

public void addBook() {
    getBookFacade().addBook(getCode(), getBookSale());
}

Suppose that I feel necessary to write some log statements:

public void addBook() {
    if (log.isDebugEnabled()) {
        log.debug("Adding book with code=[" + getCode() + "] to bookSale=[" +  
                getBookSale() + "]...");
    }

    getBookFacade().addBook(getCode(), getBookSale());

    if (log.isDebugEnabled()) {
        log.debug("Book added, bookSale=[" + getBookSale() + "].");
    }
}

The code gets very polluted, and even this is not the best to way to be logging
this information (aspects and etc could do better), is the one I know, and I
think it is still the most popular way. If the statements concerning logs were
shown in a lighter color, maybe gray (custom color...), the actual code, that is
in black, should be more readable.
Comment 1 Dani Megert CLA 2005-06-10 01:24:35 EDT
I'd prefer to fold those away. Please reopen if you think this isn't an even
better solution than coloring.

*** This bug has been marked as a duplicate of 63808 ***
Comment 2 Eduardo Rocha CLA 2005-06-10 14:54:47 EDT
Fold these statements is better than nothing, but I do prefer different colors.
Should I post on the other bug (63808)?
Comment 3 Dani Megert CLA 2005-06-10 15:06:13 EDT
>Should I post on the other bug (63808)?
No, that bug has nothing to do with coloring.
Comment 4 Dani Megert CLA 2007-06-22 09:59:24 EDT
Get rid of deprecated state.