1 11 package org.eclipse.pde.internal.ui.refactoring; 12 13 import org.eclipse.jface.action.Action; 14 import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; 15 import org.eclipse.pde.core.plugin.IPluginModelBase; 16 import org.eclipse.pde.internal.ui.PDEUIMessages; 17 import org.eclipse.swt.widgets.Shell; 18 import org.eclipse.ui.PlatformUI; 19 20 public class RenamePluginAction extends Action { 21 22 private RenamePluginInfo fInfo = new RenamePluginInfo(); 23 24 public RenamePluginAction() { 25 super(PDEUIMessages.RenamePluginAction_label); 26 } 27 28 public void setPlugin(IPluginModelBase base) { 29 fInfo.setBase(base); 30 } 31 32 public void run() { 33 RenamePluginProcessor processor = new RenamePluginProcessor(fInfo); 34 RenamePluginRefactor refactor = new RenamePluginRefactor(processor); 35 RenamePluginWizard wizard = new RenamePluginWizard(refactor, fInfo); 36 RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation( wizard ); 37 38 try { 39 op.run( getShell(), "" ); } catch( final InterruptedException irex ) { 41 } 42 } 43 44 private Shell getShell() { 45 return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); 46 } 47 48 } 49 | Popular Tags |