|
Extension SDK 10.1.2 | ||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
webupdate
package provides an API for accessing
functionality in the IDE related to web-based patching and updating.
See:
Description
Interface Summary | |
WebUpdateManager | A WebUpdateManager implementation provides access to functionality for getting and installing updates (patches and extensions) into the IDE. |
The webupdate
package provides an API for accessing
functionality in the IDE related to web-based patching and updating.
The sole interface in this package, WebUpdateManager
provides access to the Check for Updates Wizard. Extensions can
use this API to invoke the wizard.
Obtain an instance of WebUpdateManager
as follows:
Ide.getAddinManager().getWebUpdateManager()
. Use the
invokeUpdateWizard( Component )
method to invoke
the update wizard.
The invokeUpdateWizard() method will return a boolean indicating whether a restart is required. If invokeUpdateWizard() returns true, you should prompt the user to shutdown the IDE. An example of this is shown below.
import oracle.ide.Ide; import oracle.ide.IdeAction; import oracle.ide.dialogs.MessageDialog; import oracle.ide.webupdate.WebUpdateManager; ... private void updateExample() { WebUpdateManager mgr = Ide.getAddinManager().getWebUpdateManager(); boolean restart = mgr.invokeUpdateWizard( Ide.getMainWindow() ); if ( restart ) { // Check that the user is happy to shut down first boolean doIt = MessageDialog.confirm( Ide.getMainWindow(), "You need to restart for changes to take effect.\n\nShut down now?", "Confirm IDE Shutdown", null ); if ( doIt ) { // Shut Down the IDE safely Ide.quit( IdeAction.find( Ide.EXIT_CMD_ID ), Ide.getMainWindow().getContext() ); } } }
|
Extension SDK | ||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Copyright © 1997, 2004, Oracle. All rights reserved.