Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Check for PlugIn-Update automatically(Check for Update of own PlugIn when PlugIn gets started)
Check for PlugIn-Update automatically [message #936950] Mon, 08 October 2012 14:06 Go to next message
JC Temp is currently offline JC TempFriend
Messages: 7
Registered: September 2010
Junior Member
Hi all together,

I'm searching for a function, e.g. in a AbstractUIPlugin, which gives me the possibility to check automaticly for updates of my plugin.

The background: I've written a plugin for eclipse, that all programmers of my team have installed. It is generating source-code from a template. Therefore is necessary to be up to date with that plugin. I don't want the programmers to generate old versioned sources.
So I want the plugin, when it starts, to check the download-site (it's an intranet-site) and warn the user, when a old version of the plugin is installed. The programmer is forced to updated, before he can use the plugin.

A low level check is implemented somehow fast. That means I manually connect to the update-site (new URL("somewhere").openStream()), read out feature.xml from the feature.jar and check the version-tag.

Is there a more elegant way to check the version? When I try to install that plugin through "Install New Software...", eclipse recognizes too, if the plugin is up to date or not. Same thing with "Check for Updates".
Is it possible to use that feature out of my plugin? Is there a hook for checking the version?

Thanks a lot,
JC Temp
Re: Check for PlugIn-Update automatically [message #940154 is a reply to message #936950] Thu, 11 October 2012 11:13 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You probably want to call Check For Updates from your plugin. See http://wiki.eclipse.org/Equinox/p2/Adding_Self-Update_to_an_RCP_Application and http://www.vogella.de/blog/2011/10/20/eclipse-rcp-updates-with-p2-got-sooo-much-easier/

Or you can turn on automatic update checks in the preferences, org.eclipse.equinox.internal.p2.ui.sdk.scheduler.PreferenceConstants.PREF_AUTO_UPDATE_ENABLED

PW


Previous Topic:java.lang.IllegalArgumentException when creating a file
Next Topic:TerminatingClassNotFoundException when loading org.eclipse.core.runtime.Platform
Goto Forum:
  


Current Time: Mon Dec 22 22:08:37 GMT 2014

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

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