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 148567 - Boolean code flipper
Summary: Boolean code flipper
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Becicka
Keywords: PLAN
Depends on:
Reported: 2008-09-28 03:07 UTC by janicki
Modified: 2011-12-12 14:22 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description janicki 2008-09-28 03:07:24 UTC
Sometimes I decide to flip the logic of a boolean variable.  For example, I may want to rename "isDisabled" to "isEnabled".  I think it would be a neat feature to 
automatically search the code for usages of that boolean, then carefully flip the logic... adding or removing a '!' where necessary.  Maybe this could be 
integrated into the "rename" feature as an option when it detects you're renaming a boolean?

In general I think it's always best to name booleans in the "positive" sense, but even I sometimes forget and need to fix it later.
Comment 1 Jan Becicka 2011-01-13 13:26:55 UTC
try to use jackpot
Comment 2 Jan Becicka 2011-12-12 14:22:00 UTC
Initial revision pushed to trunk