|Re: Confusion about Eclipse 4.0 Application Model [message #581514 is a reply to message #581330]
||Thu, 09 September 2010 11:36
| Thomas Schindl
Registered: July 2009
You are right. Currently the contribution system expects you to know the
ID of the element but for 4.1 I plan to improve it in a way that you can
use XPath expressions one could then contribute to the
MApplication-Element through "/MApplication", ... .
In 4.0 you can use a Processor to generically identify the root element
to contribute a command and do much more fancy contributions (e.g. based
upon a user credential, ...).
If you are not sure how this looks like you can take a look at my
Live-ModelTooling integration which does exactly what you asking for here.
The source is available in:
e4/org.eclipse.e4.tools/bundles/org.eclipse.e4.tools.emf.liv eeditor and
the thing you are interested in is the:
Am 31.08.10 08:44, schrieb Ralf Zahn:
> I have a Plug-in Project defining a product with an e4 Application
> Model, and another Plug-in Project that extends the application by some
> menu items.
> When defining commands and handlers in the fragment XMI, I have to
> specify a String Model Fragment with the feature name "commands" of the
> element id "<my application id>".
> So defining commands/handlers within an e4 Model Fragment does always
> refer to a single application. So for the definition of common menu
> entries, I have to use extension points, is that correct?
> And e4 Model Fragments within a plugin make the plugin dependent from
> launching a special product, right?
> Hope I expressed the problem understandably.
Powered by FUDForum
. Page generated in 0.13243 seconds