| Summary: | [UI] createGui should also supply the parent context as well as the Composite | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Eric Moffatt <emoffatt> | ||||
| Component: | UI | Assignee: | Project Inbox <e4.ui-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | bokowski, eclipse, remy.suen, tom.schindl | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 1.0 RC2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Eric Moffatt
The other idea that comes to my mind is to add an Dialog-Element to our model which would act as the container. Dialogs are themselves children of a Window. ... beside that I guess we don't have too many customers yet for the PresentationEngine, so its unlikely we break existing customers After having discussed this with Eric on IRC I'm +1 if this makes implementing the MToolControl, ... easier. I'd still like us to think about the MDialog proposal to bring the Dialogs into our Model (probably it could help us with Keybindings, ...?) Created attachment 173477 [details]
Extend createGui with a third parameter 'parentContext'
I've scraped all of the code that I can see but there may be other bundles that were using the old API. If so you are likely ok to pass null unless the element you're creating *is* an MContext. If the element you're calling creatGui on is in the model structure then you should also be able to use the EModelService's context methods to determine the correct parent context for the element you're trying to render and pass it.
Committed in >20100705. Applied the patch. Note that the above fix is only partial. It moves what we had over to using the new API but the various renderers are still using code to 'find' the parent context rather than using the one originally supplied to the 'createGui' call). Eventually we should have *no* renderer that uses anything except what gets passed in to it... (In reply to comment #5) > Committed in >20100705. Applied the patch. Marking as fixed. (In reply to comment #6) > Note that the above fix is only partial. Filed bug 320830 for this. |