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 225983 - Suggestion : add clarifying parenthesis
Summary: Suggestion : add clarifying parenthesis
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-11 13:29 UTC by lforet
Modified: 2013-09-02 14:19 UTC (History)
1 user (show)

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 lforet 2013-02-11 13:29:34 UTC
In some expression you can need to have extra parenthesis to clarify operands.

Example :

if (operandAquitecomplicated && otherOperand) {}
-add clarifying parenthesis-> 
if ((operandAquitecomplicated) && (otherOperand)) {}
Comment 1 markiewb 2013-02-11 15:58:03 UTC
You could use a custom inspection. For example:

<!description="Add extra parenthesis">
$operandAquitecomplicated && $otherOperand
=>
($operandAquitecomplicated) && ($otherOperand)
;;