| Summary: | "Organize Imports" becomes unusable... | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Xavier <xdonat> |
| Component: | UI | Assignee: | Martin Aeschlimann <martinae> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | martinae |
| Version: | 2.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
As far as I can see nothing exploded, it simply formatted your code and wrapped the imports. You might figure out that there's a preference for this: Window->Preferences->Java->Code Formatter->Line Splitting Thank you for considering my request.
I was 99% sure you were going to answer that the line splitting
was not a bug but a feature ;-)
My comment on that is that the formatting should not be applied
when calling "Organize Imports". It should be done only when the
user chooses to "Format" the code.
This would allow the user to choose whether to apply line splitting
on imports or not. Give the choice to the user is VERY important.
The other thing that disturbs me is the way the import are split.
The "Rolls Royce" would be to have the choice between two king of
split:
- the current one (split before each dot)
- the following one:
import com.xxxxxx.yyyyy.zzzzzzzcenter.ui.administration.data.model
.communication.CommunicationManager;
Once again the idea is to let the user choose.
Thank you,
Xavier Donat
Martin, as you remember I also stumbled across this. I suggest you add a preference to the "Organize Import" preference page: [ ] Use Code Formatter Note: The same option is available for templates: This would be great ! |
I just tried moving from build 2.0.1 (200208291828) to 2.1 (200210181211) and I had the surprise that when I do "Organize Imports" on my code the imports are now exploded (because they are longer than 80 cars): Example, the following import statement: import com.xxxxxx.yyyyy.zzzzzzzcenter.ui.administration.data.model.communication.Commun icationManager; becomes: import com .xxxxxx .yyyyy .zzzzzzzcenter .ui .administration .data .model .communication .CommunicationManager; This was not the behaviour in 2.0.1, the import was not exploded like that and it was perfect ! What do you think of that ? Did I miss something ? Thank you, Xavier Donat.