|
Re: P2 UI menu contributions in E4 application [message #580109 is a reply to message #580088] |
Thu, 05 August 2010 19:47 |
Thomas Schindl 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 #1002303 is a reply to message #1002299] |
Fri, 18 January 2013 11:05 |
Laura V Messages: 32 Registered: March 2012 |
Member |
|
|
Hi Tom
thanks for your prompt answer. If you would find a sample project it would be perfect.
I couldn't find much documentation about configuring p2.inf with repos or how preconfigure p2.
And nothing about using this low level apis. I need to show the user some message after the update - in case he's updating in the train and the connection gets interrupted he needs to be notified that the feature has to be reinstalled, or the whole platform got corrupted, and so on.
I think having a standard solution for this in E4 is pretty important in order to have a "complete / mature" product.
[Updated on: Fri, 18 January 2013 11:08] Report message to a moderator
|
|
|
|
|
|
Re: P2 UI menu contributions in E4 application [message #1004506 is a reply to message #580088] |
Wed, 23 January 2013 11:12 |
Laura V Messages: 32 Registered: March 2012 |
Member |
|
|
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 12:02 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
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
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06751 seconds