| Summary: | Cloneable Snippets is part of the wrong model element | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dean Roberts <dean.t.roberts> |
| Component: | UI | Assignee: | Eric Moffatt <emoffatt> |
| Status: | RESOLVED FIXED | QA Contact: | Eric Moffatt <emoffatt> |
| Severity: | normal | ||
| Priority: | P3 | CC: | emoffatt, pwebster, remy.suen |
| Version: | 4.1 | ||
| Target Milestone: | 4.2 M2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 339130 | ||
|
Description
Dean Roberts
I would suggest that cloneable snippets be a map instead of a list. It seems that cloneableSnippets are id based and a map would make finding, deleting and insuring singulatiry easier. While making the current list a Map makes perfect sense to me EMF doesn't...;-). For some reason (still unclear after hunting around a bit) I can't use the EMAP<K,V> type since it appears that it's not serializable (even though both the key (EString) and value (MUIElement) are). For now I'll do the following: - Make a new mix-in type 'SnippetContainer' with one feature 'snippets' which is a list of MUIElements. - Remove the current 'clonableSnippets' feature in ApplicationElement (this was the issue...not *all* elements need to contain snippets) - Inherit the new SnippetContainer class in both MWindow and MApplication. Committed in >20110902. Updated the model and the relevant model service methods. Also updated the new Perspective Switcher code and added a 'findSnippet' model service API (since we apparently can't use a map). Fixes by the previous commit |