Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Confusion about Eclipse 4.0 Application Model
Confusion about Eclipse 4.0 Application Model [message #556153] Tue, 31 August 2010 06:44 Go to next message
Ralf Zahn is currently offline Ralf Zahn
Messages: 32
Registered: July 2009
Member
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 #557643 is a reply to message #556153] Wed, 08 September 2010 12:20 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Ralf Zahn wrote:
> 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?

Extension points for command, etc aren't currently supported in pure e4
applications yet.

If you want re-usable fragments, you have to settle on an "id
convention", as they're simply be applied per-id.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Confusion about Eclipse 4.0 Application Model [message #557903 is a reply to message #556153] Thu, 09 September 2010 11:36 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5422
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 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5422
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 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5422
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.
>
Previous Topic:Workbench Save Restore
Next Topic:Eclippse Application Admin and e4
Goto Forum:
  


Current Time: Fri Oct 24 18:07:42 GMT 2014

Powered by FUDForum. Page generated in 0.02315 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software