Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » P2 UI menu contributions in E4 application(menu contributions and E4 application)  () 1 Vote
P2 UI menu contributions in E4 application [message #551196] Thu, 05 August 2010 14:53 Go to next message
Chris  is currently offline Chris Friend
Messages: 16
Registered: July 2010
Junior Member
Hello,

In a 3.6 application, adding p2 feature UI was sufficient to have "Install new Software..." and "Check Update..." in "Help" menu.

Now, my application is E4. It doesn't work anymore. Even if I have a menu with id=help in Application.e4xmi and a separator with id=additions.

My question is : does old 3.6 contributions system work with E4 application ?

Thanks.



For information, the contribution of P2 UI DK is :

<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:help?after=additions">
<command
commandId="org.eclipse.equinox.p2.ui.sdk.update"
mnemonic="%Update.command.mnemonic"
id="org.eclipse.equinox.p2.ui.sdk.update">
</command>

</menuContribution>
<menuContribution
locationURI="menu:help?after=org.eclipse.equinox.p2.ui.sdk.update ">
<command
commandId="org.eclipse.equinox.p2.ui.sdk.install"
mnemonic="%Install.command.mnemonic"
id="org.eclipse.equinox.p2.ui.sdk.install">
</command>

</menuContribution>
</extension>

Re: P2 UI menu contributions in E4 application [message #551302 is a reply to message #551196] Thu, 05 August 2010 19:47 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

Well those things only work if you have the compat-layer with you.

An application built with the pure Eclipse 4.0 Application Platform does
not understand any extension points beside:
* org.eclipse.e4.workbench.model: for model contributions
* org.eclipse.e4.ui.css.swt.theme: to contribute themes and styles

That's all extension points you need to make up complete applications -
we don't need more than those because the
org.eclipse.e4.workbench.model-extension points allows to contribute
model fragments and the model itself knows about, commands, handlers, ... .

Tom

Am 05.08.10 16:53, schrieb Chris:
> Hello,
>
> In a 3.6 application, adding p2 feature UI was sufficient to have
> "Install new Software..." and "Check Update..." in "Help" menu.
>
> Now, my application is E4. It doesn't work anymore. Even if I have a
> menu with id=help in Application.e4xmi and a separator with id=additions.
>
> My question is : does old 3.6 contributions system work with E4
> application ?
>
> Thanks.
>
>
>
> For information, the contribution of P2 UI DK is :
> <extension
> point="org.eclipse.ui.menus">
> <menuContribution
> locationURI="menu:help?after=additions">
> <command
> commandId="org.eclipse.equinox.p2.ui.sdk.update"
> mnemonic="%Update.command.mnemonic"
> id="org.eclipse.equinox.p2.ui.sdk.update">
> </command>
> </menuContribution>
> <menuContribution
>
> locationURI="menu:help?after=org.eclipse.equinox.p2.ui.sdk.update ">
> <command
> commandId="org.eclipse.equinox.p2.ui.sdk.install"
> mnemonic="%Install.command.mnemonic"
> id="org.eclipse.equinox.p2.ui.sdk.install">
> </command>
> </menuContribution>
> </extension>
>
>
Re: P2 UI menu contributions in E4 application [message #551901 is a reply to message #551302] Tue, 10 August 2010 06:03 Go to previous messageGo to next message
Chris  is currently offline Chris Friend
Messages: 16
Registered: July 2010
Junior Member
More details on this thread :
http://www.eclipse.org/forums/index.php?t=msg&th=173357& amp;unread=1&S=7ea38aed6c833c9db70811db19775852
Re: P2 UI menu contributions in E4 application [message #580315 is a reply to message #551302] Tue, 10 August 2010 06:03 Go to previous messageGo to next message
Chris  is currently offline Chris Friend
Messages: 16
Registered: July 2010
Junior Member
More details on this thread :
http://www.eclipse.org/forums/index.php?t=msg&th=173357& amp;unread=1&S=7ea38aed6c833c9db70811db19775852
Re: P2 UI menu contributions in E4 application [message #625649 is a reply to message #551302] Wed, 22 September 2010 09:41 Go to previous messageGo to next message
Sun Volland is currently offline Sun VollandFriend
Messages: 29
Registered: September 2010
Junior Member
Hi Tom,

Tom Schindl wrote on Thu, 05 August 2010 15:47

Well those things only work if you have the compat-layer with you.

An application built with the pure Eclipse 4.0 Application Platform does
not understand any extension points beside:
* org.eclipse.e4.workbench.model: for model contributions
* org.eclipse.e4.ui.css.swt.theme: to contribute themes and styles



Not sure about what you meant, does the compat-layer enable to use 3.6 plugins in an E4 application ? I guess the compat layer "converts" 3.6 extension points contributions to e4 modelled UI elements. When you say "pure Eclipse 4.0 Application Platform does not understand any extension points", I guess this is true when not using the compat-layer.

Now supposing the compat-layer does allow 3.6 plugins in e4 applications, I tried to include the P2 features "Install new Software..." and "Check Update..." in an E4 application (as probably Chris did) and included the compat-layer bundle (org.eclipse.ui.workbench). This does not seem to work better, I can't get the P2 menus.

Is there something more to do to activate the compat-layer, or something to setup in my xmi application model ? or do I simply misunderstood the purpose of the compat-layer ?

Thanks
Sun
Re: P2 UI menu contributions in E4 application [message #625868 is a reply to message #625649] Wed, 22 September 2010 10:20 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You need to use the normal workbench start up process and Legacy.e4xmi
and not the standard E4 Application.

The bug referenced above describes how to get a 3.x style application
running and reuse bundles from e.g. p2

https://bugs.eclipse.org/bugs/show_bug.cgi?id=317912

Tom

Am 22.09.10 11:41, schrieb Sun:
> Hi Tom,
>
> Tom Schindl wrote on Thu, 05 August 2010 15:47
>> Well those things only work if you have the compat-layer with you.
>>
>> An application built with the pure Eclipse 4.0 Application Platform does
>> not understand any extension points beside:
>> * org.eclipse.e4.workbench.model: for model contributions
>> * org.eclipse.e4.ui.css.swt.theme: to contribute themes and styles
>
>
> Not sure about what you meant, does the compat-layer enable to use 3.6
> plugins in an E4 application ? I guess the compat layer "converts" 3.6
> extension points contributions to e4 modelled UI elements. When you say
> "pure Eclipse 4.0 Application Platform does not understand any extension
> points", I guess this is true when not using the compat-layer.
>
> Now supposing the compat-layer does allow 3.6 plugins in e4
> applications, I tried to include the P2 features "Install new
> Software..." and "Check Update..." in an E4 application (as probably
> Chris did) and included the compat-layer bundle
> (org.eclipse.ui.workbench). This does not seem to work better, I can't
> get the P2 menus.
>
> Is there something more to do to activate the compat-layer, or something
> to setup in my xmi application model ? or do I simply misunderstood the
> purpose of the compat-layer ?
>
> Thanks
> Sun
>
Re: P2 UI menu contributions in E4 application [message #628150 is a reply to message #625868] Thu, 23 September 2010 09:39 Go to previous messageGo to next message
Sun Volland is currently offline Sun VollandFriend
Messages: 29
Registered: September 2010
Junior Member
Thanks, it works better !

Now I have the next question : I want to extend the legacy model in the e4-way, by contributing to the org.eclipse.e4.workbench.model extension point : change the perspective, adding my own views, etc.

But I noticed that the model extension processor I declared is called *before* the 3.x plugins have populated the legacy model.

Is there a way to force the e4 model extensions to be activated *after* the compat-layer has populated the legacy model from the 3.x plugins ? or must I use the 3.x style extension points.

Sun




Re: P2 UI menu contributions in E4 application [message #628172 is a reply to message #628150] Thu, 23 September 2010 09:44 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
unfortunately no, something we'll hopefully find a solution in 4.1.

All you can do is to contribute PartDescriptors because they are stored
at in the Application-Element. Does the legacy implementation come with
a Window and PerspectiveStack-Element. If yes you can also makeup a
complete Perspective.

Tom

Am 23.09.10 11:39, schrieb Sun:
> Thanks, it works better !
>
> Now I have the next question : I want to extend the legacy model in the
> e4-way, by contributing to the org.eclipse.e4.workbench.model extension
> point : change the perspective, adding my own views, etc.
>
> But I noticed that the model extension processor I declared is called
> *before* the 3.x plugins have populated the legacy model.
>
> Is there a way to force the e4 model extensions to be activated *after*
> the compat-layer has populated the legacy model from the 3.x plugins ?
> or must I use the 3.x style extension points.
>
> Sun
>
>
>
>
>
Re: P2 UI menu contributions in E4 application [message #628653 is a reply to message #628172] Thu, 23 September 2010 14:38 Go to previous messageGo to next message
Sun Volland is currently offline Sun VollandFriend
Messages: 29
Registered: September 2010
Junior Member
> unfortunately no, something we'll hopefully find a solution in 4.1.

Yes this would be great, the e4 way is so nice and simple Smile

> All you can do is to contribute PartDescriptors because they are stored
> at in the Application-Element. Does the legacy implementation come with
> a Window and PerspectiveStack-Element. If yes you can also makeup a
> complete Perspective.

Unfortunately no, it only comes with a Window and nothing under it. And trying to programmatically add a perspective stack in the processor leads to errors.

So I will probably reswitch to a pure E4 application, and try to make P2 work at least for updates (that was the initial purpose of integrating the P2 UI plugin), with a simple homemade UI.

Thanks for answering so fast,

Sun
Re: P2 UI menu contributions in E4 application [message #628658 is a reply to message #628653] Thu, 23 September 2010 14:48 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Well you simply add your own commands and call the P2 CORE API.

Tom

Am 23.09.10 16:38, schrieb Sun:
>> unfortunately no, something we'll hopefully find a solution in 4.1.
>
> Yes this would be great, the e4 way is so nice and simple :)
>
>> All you can do is to contribute PartDescriptors because they are stored
>> at in the Application-Element. Does the legacy implementation come with
>> a Window and PerspectiveStack-Element. If yes you can also makeup a
>> complete Perspective.
>
> Unfortunately no, it only comes with a Window and nothing under it. And
> trying to programmatically add a perspective stack in the processor
> leads to errors.
>
> So I will probably reswitch to a pure E4 application, and try to make P2
> work at least for updates (that was the initial purpose of integrating
> the P2 UI plugin), with a simple homemade UI.
>
> Thanks for answering so fast,
>
> Sun
Previous Topic:How to create an editor in e4
Next Topic:"null argument:applicationXMI argument missing" when starting e4 RCP application
Goto Forum:
  


Current Time: Thu Apr 18 02:57:02 GMT 2024

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

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

Back to the top