Code Assist and Audit Rules
By Didier Laurent on Oct 26, 2006
You probably know the Code Assist in JDeveloper.
It examines your code in the editor, and provides
assistance to fix common problems.
For example, it identifies a parameter that is not used in your code, and proposes as fix to remove it
When your code complies with all the rules, then a green square is displayed in the upper-right corner of the code editor.
When there are errors, the square is red; finally, it's orange when there are warnings (as shown above).
An interesting question was posted in the JDeveloper Forum on OTN:
Is it possible to configure JDeveloper to ignore some warnings or errors ?
Answer is Yes:
- Select menu Tools -> Preferences
- In the left Pane, expand Audit and select Profiles
- In the right Pane, under tab Rules (selected by default), expand Usages
- Select Unused Parameters.
NB: You can see an explanation on the rule you selected in the lower part of the screen.
- Unselect this rule and click OK:
- You can then click the Save As... button and give a meaningful name
Another option (and better in my opinion) is to keep the rule selected, but change the Severity and Style (right part of the dialog).
You can set the Severity=Advisory and the Style=Warning.
With this setting, no warning/error will be shown (green square), but the unused parameter will be underlined to indicate there is a Quick Fix available (Removed Unused Parameter):