Hi Folks, On Wed, Oct 21, 2009 at 9:15 AM, Eric Moffatt <[email protected]> wrote: > > Oleg, we just committed code yesterday that manages the life-cycle of any > UIElement that has a context. The MContext will be created and set into the > model element before it is rendered and removed /disposed when the element is > taken down (i.e. in removeGui). Note that this ties the life-cycle of the > MContext to that of the 'widget', if anybody knows of a scenario under which > this would be an issue let us know.
One of the scenarios we had was supporting editors (that consume IEditorInput). The editor part simply lists IEditorInput in its constructor and gets that information injected. But that means the IEclipseContext has to be available when the model part is created (or available in the model, etc), not when the UI is rendered. > As much as possible we'd like to keep the network of Context's out of mere > mortals hands I think. Playing with this structure must be done with care, > what happens if I have contexts C,D,E with parent B with parent A and dispose > B ? Do C.D.E get re-injected with B's parent? I don't think we've spelled out behaviour for this yet, but I would expect if you dispose context B, context C, D, and E are also disposed (maybe children first, then parent). If someone actually wanted to save C,D,E they would re-parent them before disposing their parent. Later, PW -- Paul Webster Hi floor. Make me a sammich! - GIR _______________________________________________ e4-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/e4-dev
