Home » Eclipse Projects » Eclipse 4 » Confusion about Eclipse 4.0 Application Model
| |
Re: Confusion about Eclipse 4.0 Application Model [message #557903 is a reply to message #556153] |
Thu, 09 September 2010 11:36 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Hi,
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:
* ModelProcessor
* plugin.xml
Tom
Am 31.08.10 08:44, schrieb Ralf Zahn:
> Hi,
>
> 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.
|
|
|
Re: Confusion about Eclipse 4.0 Application Model [message #558177 is a reply to message #557903] |
Fri, 10 September 2010 12:13 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Hi,
I filed: https://bugs.eclipse.org/bugs/show_bug.cgi?id=324954 to work on
such an XPath contribution syntax.
Tom
Am 09.09.10 13:36, schrieb Tom Schindl:
> Hi,
>
> 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:
> * ModelProcessor
> * plugin.xml
>
> Tom
>
> Am 31.08.10 08:44, schrieb Ralf Zahn:
>> Hi,
>>
>> 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.
>
|
|
|
Re: Confusion about Eclipse 4.0 Application Model [message #581660 is a reply to message #557903] |
Fri, 10 September 2010 12:13 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Hi,
I filed: https://bugs.eclipse.org/bugs/show_bug.cgi?id=324954 to work on
such an XPath contribution syntax.
Tom
Am 09.09.10 13:36, schrieb Tom Schindl:
> Hi,
>
> 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:
> * ModelProcessor
> * plugin.xml
>
> Tom
>
> Am 31.08.10 08:44, schrieb Ralf Zahn:
>> Hi,
>>
>> 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.
>
|
|
|
Goto Forum:
Current Time: Fri Sep 20 08:09:37 GMT 2024
Powered by FUDForum. Page generated in 0.04055 seconds
|