Bug 477360 - It is not possible to declare context variables with MPartDescriptor
Summary: It is not possible to declare context variables with MPartDescriptor
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.6   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.6 M4   Edit
Assignee: Dirk Fauth CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2015-09-14 08:50 EDT by Thorsten Hake CLA
Modified: 2015-12-04 16:16 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Hake CLA 2015-09-14 08:50:38 EDT
For MPart model objects it is possible to declare context variables that are used by the renderer to setup the IEclipseContext. Those context variables can be configured in MContext.getVariables() (MPart inherits from MContext). They are used by the renderer to initialize the IEclipseContext by declaring each of the variables defined in MContext.getVariables() as a modifiable context variable (IEclipseContext.declareModifiable(String)). One can read more about these useful context variables in Tom Schindl's blog: http://tomsondev.bestsolution.at/2013/11/21/what-ieclipsecontextdeclaremodifiable-is-good-for/

As MPartDescritpor model objects can be used to create MPart model objects dynamically (see EPartService.createPart(String)), I would expect that it is also possible to define context variables in the MPartDescriptor model object, so that the MPart that will be created based on this MPartDescriptor will be initialized using these context variables. But as MPartDescriptor model objects do not inherit the field "variables" from MContext, there is no known possibility to declare those context variables in the application model. Thus it is not possible to create a MPart from a MPartDescriptor that leverages IEclipseContext#declareModifiable being set by the renderer.
Comment 1 Eclipse Genie CLA 2015-11-13 16:22:06 EST
New Gerrit change created: https://git.eclipse.org/r/60377
Comment 3 Lars Vogel CLA 2015-12-04 05:43:26 EST
Dirk, is this still open or shall this be marked as fixed?
Comment 4 Dirk Fauth CLA 2015-12-04 16:16:54 EST
Resolved with applied patch