Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-incubator-e4-dev] EMF based dynamic declarative UI

Olivier,

Olivier Moises wrote:

Sorry if I was not clear enough :
Tell me if I undernstand well : you propose to parse the SWT toolkit, and using java reflection, to create, on the fly, a metamodel.

That was my suggestion, yes! Not necessarily on the fly, but to avoid hand-building the metamodel.

And since every public properties, methods and events will be in the metamodel, the "runtime engine" will run easily.

Exactly!

Unfortunately, not applicable in the current project, because :

* There is 2 metamodels, an abstract one is required because to rule future extensions or replacement of the SWT concrete one, * the SWT meta model is not a 100 % mapping of SWT toolkit -- for instance, colors, fonts are objects, could be share among several components and of course color changes are reflected to their containers.

This is to be expected. Perhaps its possible to find some heuristics for generating a metamodel that is very close to what you want. To avoid more hand-modeling than necessary.

BTW, in XSWT we currently use reflection directly. However, we've been thinking of pre-generating a lookup-table, as suggested above, to be used on platforms that lack reflection, like JME.

Hallvard



Back to the top