更新功能
public class UpdateAction extends Action {
private IWorkbenchWindow window;
public UpdateAction(IWorkbenchWindow window) {
this.window = window;
setText("&Find and Install"); // need globalization
setToolTipText("Install new versions"); // need globalization
setId("com.huawei.galaxy.airflux.update"); //$NON-NLS-1$
window.getWorkbench().getHelpSystem().setHelp(this,
"com.huawei.galaxy.airflux.update"); //$NON-NLS-1$
}
public void run() {
BusyIndicator.showWhile(window.getShell().getDisplay(), new Runnable() {
public void run() {
UpdateJob job = new UpdateJob("Search for update", false, false); //$NON-NLS-1$
UpdateManagerUI.openInstaller(window.getShell(), job);
PlatformUI.getWorkbench().getProgressService().showInDialog(
window.getShell(), job);
}
});
}
}
public class ManageAction extends Action {
private IWorkbenchWindow window;
public ManageAction(IWorkbenchWindow window) {
this.window = window;
setId("com.ibm.csdl.guardian.exam.menu.manageFeatures"); //$NON-NLS-1$
setText("&Manage Configuration"); // need globalization
setToolTipText("Enable/Disable Features"); // need globalization
window.getWorkbench().getHelpSystem().setHelp(this,
"com.ibm.csdl.guardian.exam.menu.manage"); //$NON-NLS-1$
}
public void run() {
BusyIndicator.showWhile(window.getShell().getDisplay(), new Runnable() {
public void run() {
UpdateManagerUI.openConfigurationManager(window.getShell());
}
});
}