| Summary: | [ActionSets] Customize Perspective changes action set processing order | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Lynne Kues <lynne_kues> |
| Component: | UI | Assignee: | Simon Arsenault <simon_arsenault> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | n.a.edgar |
| Version: | 2.1 | ||
| Target Milestone: | 2.1 RC2 | ||
| Hardware: | PC | ||
| OS: | other | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 29835 | ||
|
Description
Lynne Kues
Neither of these orders is correct. The behaviour should be: - initial order is in alphabetical order of action set id (using String.compareTo -- case sensitive and locale independent) - action sets can be added/removed/rearranged in Customize Perspective - action sets can also be rearranged by DnD - if no customization or rearrangement is done, the order is the initial order - saving/restoring the workbench should preserve the customized list of action sets and their order (and not re-apply the initial order) Okay, my approach for combining action sets on the coolbar was not assuming the following: "saving/restoring the workbench should preserve the customized list of action sets and their order (and not re-apply the initial order)" So this bug report does not need to be addressed for the coolbar work. Actually I take that back. "Action sets processed in sorted order on initial load" would need to be fixed so that plugin users know what will be on a particular coolitem (the fix is necessary only if we go with the original coolbar action set combining approach - not the sort by action set id approach). Simon, would it be possible to maintain the initial add order of action sets even when Customize Perspective is used and use this to restore the workbench? By initial add order I mean the following: On initial load, plugin action sets are added in this order: A, B, C, D Customize Perspective is used, action set E is added. The order would be: A, B, C, D, E Customize Perspective is used, action set B is removed. The order would be: A, C, D, E Customize Perspective is used, action set B is added back. The order would be: A, B, C, D, E Action set B is removed again, the workbench is exited, the workbench is restarted and action set B is added back. The order would be: A, C, D, E, B There would be no need to preserve removed information when saving the workbench state. Would this be possible? Would this "break" other things? I'm not sure about rearranging action sets. I cannot get DnD to work in the Customize Perspectives dialog. Lynne needs this for combining cool items, and for proper coolbar ordering in 2.1. Note that we have decided not to follow a strict ordering based on action set ids in the toolbars, as we do in the menus, for the following reasons: - users can rearrange the items (and we need to persist this order) - the current approach in the toolbar is more flexible and we would not be able to achieve the order of items we would like with a strict ordering without jumping through hoops. The order we're following for the toolbars is as follows (Lynne, please correct me if I'm wrong again here). - process in order of action set id (case insensitive, not locale-specific) (this requires the fix requested here) - within an action set, groups are added at the end in the order encountered - if an action set adds-in to another action set's toolbar, then its contributions go at the end - unless a before-group is specified when adding a new group to another action set's toolbar, in which case the new group is added immediately before the mentioned before-group - processing of regular contributions is done for all action sets before processing of add-ins This is for the initial order only. If the order is subsequently changed by DnD or adding/removing action sets, then we need to persist the visible order. I agree with everything except: This is for the initial order only. If the order is subsequently changed by DnD or adding/removing action sets, then we need to persist the visible order. Even if action sets are added/removed, I need the action sets to be restored in the order in which the action sets are initially added. This will preserve visible order on restart. I have looked a little into the processing action sets in two stages. Simon, I will send you code to review regarding this. I'll take a look into this but I have reservation about this. This action set list the workbench page is holding onto is modifier in multiple places (for example, when initially created, restore, customize, part activation, etc). Also, the perspective hold onto at least 3 different lists of action sets (seems these are the ones being saved). Anyway, I'm not too familiar with this area so maybe its not really as complex as it looks from my quick browsing around. I'm also concern that we now have (or will have) code in different areas to control the order of action sets. To be done in 2.1 RC2 Simon to look whether we can keep the action set list in a sorted order without making things to complicate (or causing other side effects). If not possible, Lynne will look at sorting them during contribution time. If I am going to maintain items in a coolitem based on sorted order (i.e., after base groups, after base items, before base groups), I do not need the current behavior to change. The coolitem creation algorithm will still have to handle action sets being processed in non-sorted order since ALL action sets are not processed at the same time (i.e., Customize Perspective, Switching Perspectives process groups of action sets). So it's OK for us to close this PR with no action required? Just making sure. Yes, you can close. Closing. Current behaviour is OK. Meant to close as WORKSFORME. Closing. |