P2 UI menu contributions in E4 application [message #580088] |
Thu, 05 August 2010 10:53  |
Eclipse User |
|
|
|
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 #580109 is a reply to message #580088] |
Thu, 05 August 2010 15:47   |
Eclipse User |
|
|
|
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 #1004506 is a reply to message #580088] |
Wed, 23 January 2013 06:12   |
Eclipse User |
|
|
|
Tom: I finally got the example up and running.
What is not correct is, there updates available, which shouldn't be the case (the bundle I'm updating from is exactly what I exported on the repo).
Looking at the code I realized that in the UpdateServiceImpl the method collectUpdateableUnits just takes all the installable units in the repo and gives them back, while it should check on the IU version instead.
This brings up 2 questions (which I think is of general interest because equinox apis are not exactly well documented):
1) WHAT is exactly the version of an installable unit? Is it the version of the feature or the version of the plugin in the feature? I tried debugging equinox code, turns out InstallableUnit.setVersion is used by InstallableUnitDescription.setVersion, which has no reference anywhere. When / by what does the version of the IU get set?
2) is it absolutely necessary to have features in order to use p2?
Quoting Lars Vogel's simple tutorial:
"The update and installation of functionalities with p2 is based on Features projects. In the terminology of p2 these features are installable Units"
That means IU version = feature version
But according to equinox wiki:
"As the name implies,IUs describe things that can be installed, updated or uninstalled. They do not contain the actual artifacts but rather essential information about such artifacts (e.g., names, ids, version numbers, dependencies, etc) and are not aware about what they deliver. They describe things. They are NOT the things. So for example an IU for a bundle is NOT the bundle. The bundle is an "artifact". "
Now that's pretty abstract and confusing.
Thanks a lot for your answer
Laura
|
|
|
Re: P2 UI menu contributions in E4 application [message #1004529 is a reply to message #1004506] |
Wed, 23 January 2013 07:02   |
Eclipse User |
|
|
|
Am 23.01.13 12:12, schrieb Laura V:
> Tom: I finally got the example up and running.
> What is not correct is, there updates available, which shouldn't be the
> case (the bundle I'm updating from is exactly what I exported on the repo).
> Looking at the code I realized that in the UpdateServiceImpl the method
> collectUpdateableUnits just takes all the installable units in the repo
> and gives them back, while it should check on the IU version instead.
> This brings up 2 questions (which I think is of general interest because
> equinox apis are not exactly well documented):
Makes sense, maybe I missed something when extracting the code from our
product. Like I said, I haven't yet tested it ;-)
>
> 1) WHAT is exactly the version of an installable unit? Is it the version
> of the feature or the version of the plugin in the feature? I tried
> debugging equinox code, turns out InstallableUnit.setVersion is used by
> InstallableUnitDescription.setVersion, which has no reference anywhere.
> When / by what does the version of the IU get set?
>
> 2) is it absolutely necessary to have features in order to use p2?
>
> Quoting Lars Vogel's simple tutorial:
> "The update and installation of functionalities with p2 is based on
> Features projects. In the terminology of p2 these features are
> installable Units"
> That means IU version = feature version
> But according to equinox wiki:
> "As the name implies,IUs describe things that can be installed, updated
> or uninstalled. They do not contain the actual artifacts but rather
> essential information about such artifacts (e.g., names, ids, version
> numbers, dependencies, etc) and are not aware about what they deliver.
> They describe things. They are NOT the things. So for example an IU for
> a bundle is NOT the bundle. The bundle is an "artifact". "
> Now that's pretty abstract and confusing.
>
Both of them are good questions you'd better asked that the equinox
newsgroup ;-)
We are always working with features and feature based products so I
didn't digged into this ;-)
Tom
|
|
|
|
|
|
|
Re: P2 UI menu contributions in E4 application [message #1006641 is a reply to message #1004669] |
Fri, 01 February 2013 05:02  |
Eclipse User |
|
|
|
Hello Laura V
he seems like you are now ready to use p2 with pure e4 application, if i am right please can you give me an example. I am new in rcp (e4), I try a lot of thing to manage the integration of p2 in pure e4. but nothing work.
thank you in advance
|
|
|
Powered by
FUDForum. Page generated in 0.07852 seconds