Eclipse settings for SWAGD developers - GitHubRGI/swagd GitHub Wiki
Compiler warning / error settings
In Eclipse, navigate to Window -> Preferences -> Java -> Compiler -> Errors/Warnings and set all options to "Warning" except for the following:
- Access to a non-acessible member of an enclosing type (Ignore)
- Non-externalized strings (missing/unused $NON-NLS$ tag) (Ignore)
- Boxing and unboxing conversions (Ignore)
- 'switch' case fall-through (Ignore)
- Forbidden reference (acess rules) ( Error )
- Include 'assert' in null analysis (Unchecked)
- Enable annotation-based null analysis (Unchecked)
Save actions
In Eclipse, navigate to Window -> Preferences -> Java -> Editor -> Save Actions and ensure "Perform the selected actions on save" is checked, along with "Organize Imports" and "Additional Actions." Then click on the "Configure" button which will bring up a new window of save actions. Ensure the following options are checked:
- Code Organizing tab
- Remove trailing whitespace (All lines)
- Code Style tab
- Use blocks in if/while/for/do statements (Always)
- Convert 'for' loops to enhanced
- Use modifier 'final' where possible (Private fields, Parameter, and Local variables)
- Convert functional interface instances (Use lambda where possible)
- Member Accesses tab
- Use 'this' qualifier for field accesses (Always)
- Use 'this' qualifier for method accesses (Always)
- Missing Code tab
- Check all options
- Unnecessary Code tab
- Remove unused imports
- Remove unnecessary casts