[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [pde-dev] Automatically update plugin
|
Hi,
it's for an in-house project using a database. So it is best that
everyone is using the same version all the time. I think forcing this
in the plugin is the best way.
I don't have problems getting the manual update to work, but I don't
know what code to put in the startup method. Right now I have:
private void launchInBackground() {
try {
// Downloads the feature content in the background.
// The job listener will then install the feature when download is
// finished.
UpdateSearchScope scope = new UpdateSearchScope();
scope.addSearchSite("com.company.feature", new URL(
"http://url/updatesite/"), null);
UpdateSearchRequest searchRequest = new UpdateSearchRequest(
new SiteSearchCategory(), new UpdateSearchScope());
searchRequest.addFilter(new BackLevelFilter());
searchRequest.setScope(scope);
UpdateJob job = new UpdateJob("Updating Lims", searchRequest);
job.setUser(true);
job.setPriority(Job.INTERACTIVE);
new InstallWizardOperation().run(
UpdateUI.getActiveWorkbenchShell(), job);
} catch (Exception e) {
LimsPlugin.log(e);
}
}
This works OK when an update is available (it still asks whether or
not to install), but gives an error when no update is available.
Regards,
Leen
On 8/17/05, Andrew Ferguson <Andrew.Ferguson@xxxxxxx> wrote:
> hi,
>
> I think its maybe better to stick with how other plug-ins work via the
> pull-model (ie the user goes to the update manager to search for new
> versions?)
>
> otherwise, you could probably check in the startup() method of your
> plugin class?
>
> http://eclipse.org/documentation/html/plugins/org.eclipse.platform.doc.i
> sv/doc/reference/api/org/eclipse/core/runtime/Plugin.html#startup()
>
> thanks,
> Andrew
>
> -----Original Message-----
> From: pde-dev-bounces@xxxxxxxxxxx [mailto:pde-dev-bounces@xxxxxxxxxxx]
> On Behalf Of Leen Toelen
> Sent: 17 August 2005 13:33
> To: pde-dev@xxxxxxxxxxx
> Subject: [pde-dev] Automatically update plugin
>
> Hi,
>
> I have developed a plugin and an update site for it. I would like the
> plugin to check at startup time if it is the latest version or not.
> When there is a newer version, it should ask the user to update, else it
> should't do anything. Does anyone know how to do this?
>
> Regards,
> Leen Toelen
> _______________________________________________
> pde-dev mailing list
> pde-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/pde-dev
> _______________________________________________
> pde-dev mailing list
> pde-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/pde-dev
>