| Summary: | Ability to add a separator/newline in organize imports preferences | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Randy Hudson <hudsonr> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | erich_gamma |
| Version: | 2.0 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Randy Hudson
Martin you have done some investigations on this, was the outcome not for 2.0? If yes pls defer the bug Currently an empty line is added after every group. I wanted to show the newline explicitly in the prefpage. Infrastructure is there, and I had the UI, but never released it. In the pref page, the order import table then gets twice as many entries (a spacer after every block), which makes the table huge and ugly. Randy, do you ask for an additional spacer (2 empty lines)?. I could do this, that would not blow up the size of the list. I currently have my groups defined as: 1) java 2) com.ibm.etools.common 3) com Yet, my import list looks like this: import com.ibm.etools.common.command.Command; import com.ibm.etools.draw2d.Label; import com.ibm.etools.gef.editpolicies.DirectEditPolicy; import com.ibm.etools.gef.requests.DirectEditRequest; If what you are saying is true, there is a missing new line after the first import. The algorithm must be finding "com" before "com.ibm.etools.common", and thus making the mistake. The newline by default between groups is probably a good idea. For users with a small number of groups, it makes sense. If I want really fine control of the ordering, I want to insert newlines only between certain groups. For users like me, showing the --Separator-- in the Table would be required. For users with small numbers of groups (such as the default 2), showing the --Separator-- would not take up too much space. That table is big enough to display about 8 groups with 7 separators between them (at least on my computer), assuming that you add separators by default. Organize imports is really great, but I think I'll only be able to use it when it matches imports to the most specific group to which they belong, and I can control newlines. Thanks a lot. it should look like import com.ibm.etools.common.command.Command; import com.ibm.etools.draw2d.Label; import com.ibm.etools.gef.editpolicies.DirectEditPolicy; import com.ibm.etools.gef.requests.DirectEditRequest; There must be a bug in the algorithm. com should be the best match for the last 3 entries. Our (ZRH and MIN) default import organize file has 17 entries, so it would blow up to 34. What hurts me is that the table look stange as it would be very sparsly filled. Only every second line is information. I will look into it again, as I said I originally also wanted this but could not find a nice UI. I have the answer: Don't display it as a TableItem. Instead, make it a property of each TableItem group entry. The property would be rather to insert a newline after the group. You could indicate the properties state using a different Icon or some change in the way you display the Text. Or, you could not display it at all and have a Checkbox at the bottom labeled "Insert newline below group". The checkbox would show you the value of the currently selected group, or be disabled. fixed the problem in the algoritm (com matches to com.ibm.etools.draw2d.Label
more than com.ibm.etools.common)
> 20020508
Have to move the separator issue to later.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you. |