1 11 package org.eclipse.update.internal.ui.views; 12 13 import org.eclipse.core.runtime.*; 14 import org.eclipse.jface.action.*; 15 import org.eclipse.jface.dialogs.*; 16 import org.eclipse.jface.wizard.*; 17 import org.eclipse.swt.widgets.*; 18 import org.eclipse.update.internal.ui.wizards.*; 19 import org.eclipse.update.operations.*; 20 21 public class RevertConfigurationAction extends Action { 22 private Shell shell; 23 24 public RevertConfigurationAction(Shell shell, String text) { 25 super(text); 26 this.shell = shell; 27 } 28 29 public void run() { 30 IStatus status = OperationsManager.getValidator().validatePlatformConfigValid(); 31 if (status != null) { 32 ErrorDialog.openError(shell, null, null, status); 33 return; 34 } 35 36 RevertConfigurationWizard wizard = new RevertConfigurationWizard(); 37 WizardDialog dialog = new WizardDialog(shell, wizard); 38 dialog.create(); 39 dialog.getShell().setText(shell.getText()); 40 dialog.getShell().setSize(600,500); 41 dialog.open(); 42 } 43 } 44 | Popular Tags |