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 63349 - Color instance variables and method arguments
Summary: Color instance variables and method arguments
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-30 15:58 UTC by lordpixel
Modified: 2010-09-23 08:35 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 lordpixel 2005-08-30 15:58:44 UTC
The debate over Hungarian notation has been raging for years.
Many people use some variation of the notation to mark instance variables and
method parameters. e.g. here are just two common styles:

private int m_foo;

private void setFoo(int a_foo) {
    m_foo = a_foo;
}

or

private int _foo;

private void setFoo(int foo) {
   _foo = foo;
}

Wouldn't it be great if instead of this, the IDE simply recognized which
variables are local, which are parameters, which are static and which are
instance and allowed us to assign colors to each one?

Using even limited Hungarian notation like _ on instance varaibles is currently
completely incompatible with the "Encapsulate Field" refactoring.

If Netbeans provides an alternative way to see instantly what the scope of a
variable is, perhaps fewer people would feel the need to resort to _ and m_ etc.

Badges would obviously work as an alternative to colors, but they would likely
have to be "tooltip" badges that only appear when the pointer is over the
variable name - otherwise I think there would be too much visual clutter.