Bug 99284

Summary: [Java Editor] Log statements should be able to be grayed, helping read the actual code
Product: [Eclipse Project] JDT Reporter: Eduardo Rocha <eduardorochabr>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P5    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.