|
Re: Contributing to any e4 Application [message #797511 is a reply to message #797397] |
Mon, 13 February 2012 15:28   |
Thomas Schindl Messages: 6387 Registered: July 2009 |
Senior Member |
|
|
There are 2 ways:
a) Fragment.e4xmi with the current drawback that you have to know the
parent you want to contribute to (enhancement request can on how
this could be overcome is here [1])
b) Use a Processor and create the contribution programmatically
c) A new option I just came up in this very second is that instead of
using XPath we could add one where you give the system a Java-Class
to identify the merge target
The nice thing about all current fragment solution is that one can
plug-in his/her own one because the merge into the target model is done
by the EMF-Element itself [see patch in 1] so implementing and using a)
/ c) does not require help/changes from the E4AP, what a clever design ;-)
Tom
[1]https://bugs.eclipse.org/bugs/show_bug.cgi?id=324954
Am 13.02.12 13:38, schrieb Vincenzo Caselli:
> Hi all,
> I am trying to learn e4, but maybe I am biased by 3.x and need some
> clarifications.
> In 3.x you can contribute (with a View, a Command or whatsoever) with a
> plug-in, without knowing nothing about which Application will benefit
> from your plugin, you just contribute to any application (maybe the IDE
> itself), as soon as your plugin is included into the launch/product.
> In e4 I am finding several documentation pages that point out that you
> must, in the e4 Model Fragment, reference to the parentElementId that
> you want to contribute.
> Is really this way or does exists a way in e4 to contribute like in 3.x
> in a more generic manner?
> In this latter case how can I do it (could someone attach a minimal
> sample)?
>
> Thank you very much
> Vincenzo Caselli
|
|
|
|
|
Re: Contributing to any e4 Application [message #806128 is a reply to message #806088] |
Fri, 24 February 2012 15:18   |
Thomas Schindl Messages: 6387 Registered: July 2009 |
Senior Member |
|
|
The xpath contribution would be exactly this kind of thing - it would
allow you to contribute to ANY application.
In reality in 3.x you've been able to contribute only
views/editors/commands/handlers to any application - menus and others
who needed a ref-id have not been possible there as well.
So all that is missing is that you we provide a possibility to
contribute to the root-application element without using an id - you can
file a feature request if you want.
Tom
Am 24.02.12 15:39, schrieb Vincenzo Caselli:
> Tom, Lars,
> thank you for your answers!
> As a newby of E4 however I still have the feeling that 3.x has/had the
> incredible power of the combination between:
>
> 1) declarative (plugin.xml) contribution
>
> 2) contribution plugin can be used by any application (no ties with a
> "base" application = no 1->N relationship between
> application->contributions)
>
> I would not be misunderstood: I am eager to learn to work with E4 and I
> will encourage other to switch from 3.x. I am just trying to be sure we
> are not loosing something so great like the combination of the above
> points.
> Lars, I have read the tutorial "Eclipse 4 Modularity": very useful!
>
> Any link to other tutorials on how to do the same contribution for other
> things (parts, perspectives, menus, perspective extensions, preference
> pages, etc..) is greatly welcome!
>
> Thank you again
> Vincenzo
|
|
|
|
Re: Contributing to any e4 Application [message #806979 is a reply to message #806356] |
Sat, 25 February 2012 20:24   |
|
@Tom: you could also safely contribute to org.eclipse.ui.main.menu and org.eclipse.ui.main.toolbar. But great idea to use a xpath contribution way instead of the id. +1 for such a feature
@Vincenzo: I definitely will extend the tutorial in the future with additional examples.
|
|
|
|
Re: Contributing to any e4 Application [message #1196365 is a reply to message #797511] |
Tue, 19 November 2013 11:31  |
Michael Relby Messages: 4 Registered: November 2013 |
Junior Member |
|
|
Thomas Schindl wrote on Mon, 13 February 2012 10:28c) A new option I just came up in this very second is that instead of
using XPath we could add one where you give the system a Java-Class
to identify the merge target
Any example/docs of implementing this option?
And why target milestone of bug 324954 is set to 4.3 M4 when 4.3.1 still have no XPath feature implemented?
Thanks,
Michael.
[Updated on: Wed, 20 November 2013 05:33] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02495 seconds