Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Small RCP example with p2


p2 doesn't currently have any API. About the best you can do at the moment is to invoke the p2 command that opens the install dialog. This command has id "org.eclipse.equinox.p2.ui.sdk.update".  You can hook this command to a menu from your plugin.xml, or you can invoke the command programmatically with code something like this:

                ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
                IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
                Command cmd = commandService.getCommand("org.eclipse.equinox.p2.ui.sdk.update");
                ExecutionEvent executionEvent = handlerService.createExecutionEvent(cmd, null);
                cmd.executeWithChecks(executionEvent);

HTH,
John



"Matthias Luebken" <matthias.luebken@xxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx

04/14/2008 02:43 PM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

To
equinox-dev@xxxxxxxxxxx
cc
Subject
[equinox-dev] Small RCP example with p2





Hi

I'm trying to put together a small p2 example: An RCP-App that
triggers an update action and updates a plugin from an update site.
My first question: Is there something like
"UpdateManagerUI.openInstaller()" for p2?
My second: How would a minimal p2-update site look like?

Thanks in advance.
Matthias

--
blog: luebken.com
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Back to the top