1 11 package org.eclipse.team.internal.ccvs.ui.actions; 12 13 import org.eclipse.jface.action.IAction; 14 import org.eclipse.jface.viewers.ISelection; 15 import org.eclipse.jface.wizard.WizardDialog; 16 import org.eclipse.swt.widgets.Shell; 17 import org.eclipse.team.internal.ccvs.ui.wizards.NewLocationWizard; 18 import org.eclipse.ui.*; 19 import org.eclipse.ui.IWorkbenchWindow; 20 import org.eclipse.ui.IWorkbenchWindowActionDelegate; 21 22 public class NewRepositoryAction implements IWorkbenchWindowActionDelegate, IViewActionDelegate { 23 Shell shell; 24 25 28 public void dispose() { 29 } 30 31 34 public void init(IWorkbenchWindow window) { 35 this.shell = window.getShell(); 36 } 37 38 public void init(IViewPart view) { 39 shell = view.getSite().getShell(); 40 } 41 42 45 public void run(IAction action) { 46 NewLocationWizard wizard = new NewLocationWizard(); 47 wizard.setSwitchPerspectives(false); 48 WizardDialog dialog = new WizardDialog(shell, wizard); 49 dialog.open(); 50 } 51 52 55 public void selectionChanged(IAction action, ISelection selection) { 56 } 57 } 58 | Popular Tags |