Community
Participate
Working Groups
Given individual import statements that are longer than the allowed source code line length, "Format" breaks those up into multiple lines at the "." characters in the package/class names. "Source/Organize Imports" undoes those changes.
This is related to bug 7224.
Should "Organize imports" use the formatter? Maybe this should be considered post 2.0.
Consider this situation: You imported source code from somewhere and want to be able to exchange reasonably small patch files with that somewhere. In this situation, you don't "own" the source code format and must not change it. Contributors to open source projects frequently encounter this situation. If "organize imports" would format the entire file, that'd be a bug. You'll have to use the formater on part of the file only, namely, only the import statements.
Organize import recreates the whole import statement section according to your settings. Formatting options are not considered. Post 2.0
We should only format the new import statements. All already existing import statements should be left untouched.
fixed > 20020924 import structure (add import / org.import) now uses the formatter for newly added imports.