This is helpful for me:
4. Let Eclipse collapse imports in the same package a wildcard (.*) or always expand them
There isn’t really consensus on whether you should use wildcards on package imports (eg. org.eclipse.swt.*) or whether to specify them individually (eg. org.eclipse.swt.SWT).
By default, Eclipse imports classes individually but you can tell it to always convert them into wildcards:
- Go to Window > Preferences > Java > Code Style > Organize Imports.
- Change the value of Number of imports need for .* to 0.
- (Optional) Change the value of Number of static imports needed for .* to 0.
No comments:
Post a Comment