Installing Plugins from Cloud p2 repository in Eclipse IDE
Posted
by
user1495036
on Stack Overflow
See other posts from Stack Overflow
or by user1495036
Published on 2012-07-02T03:08:02Z
Indexed on
2012/07/02
3:15 UTC
Read the original article
Hit count: 204
I have been recently reading a lot about p2 for a requirement of mine. Most of the p2 documentation online points to p2 for RCP.
My requirement is for a plugin repo. I have a plugin that is used within Eclipse IDE.
I dnt want to change the repo location but based on the Eclipse Version, if the user looks for Install New Software or Check for Updates it needs to download the respective plugins.
My repo currently contains all the plugins for all the versions. but i need to everytime give a different URL to my user based on the Version.
For e.g i am using Eclipse 3.7(Indigo). I install the plugin thru Install New Software by adding the p2 Repo URL. Now the user decides to for some requirement move to Eclipse 3.6, I want him to connect to the same p2 Repo URL and download the plugins created for Eclipse 3.6.
This is definitely possible using p2 Discovery, or i could categorize the downloads using composite repository but i dnt want to do any of these. Just want to kno is there any API that i can hold on to, so that before processing the URL and finding the updates, i can check the version of Eclipse and redirect it based on the version to an internal URL. This is possible in RCP, want to kno if i can do it in Eclipse p2 UI.
All the p2 UI looks to be internal classes. Any directives would be appreciated.
Malai
© Stack Overflow or respective owner