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 23629 - Display compiled-out statements grayed-out
Summary: Display compiled-out statements grayed-out
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-16 17:39 UTC by gthb
Modified: 2013-09-02 14:20 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gthb 2002-05-16 17:39:05 UTC
It is a relatively common and convenient practice to
include/exclude bits of code at compile-time with a
boolean constant, like one might do with #ifdef in C.
Example:

    if(EXTREME_DEBUG) {
        LOG.debug("password = " + passwd);
    }

where EXTREME_DEBUG is defined as

    private static final boolean EXTREME_DEBUG = false;

More complex expressions might be used in the conditional
that still evaluate to false at compile-time.

It would be nice if the editor's syntax highlighting
could detect such code segments and "lowlight" them by
graying them out, similar to comments (but a separate
color of course), when the constant is set to false.
When it is true, they would be displayed as normal code.
Comment 1 Marek Grummich 2002-07-22 10:50:03 UTC
Set target milestone to TBD
Comment 2 Martin Matula 2004-11-12 09:53:47 UTC
Interesting feature. But currently very hard to implement.