1 11 package org.eclipse.pde.internal.ui.wizards; 12 import java.util.Dictionary ; 13 14 import org.eclipse.jface.viewers.IStructuredSelection; 15 import org.eclipse.jface.wizard.Wizard; 16 import org.eclipse.pde.internal.ui.PDEUIMessages; 17 import org.eclipse.ui.INewWizard; 18 import org.eclipse.ui.IWorkbench; 19 20 public class NewWizard extends Wizard implements INewWizard, IDefaultValueConsumer { 21 private org.eclipse.ui.IWorkbench workbench; 22 private org.eclipse.jface.viewers.IStructuredSelection selection; 23 private Dictionary defaultValues; 24 25 public NewWizard() { 26 super(); 27 setWindowTitle(PDEUIMessages.NewWizard_wtitle); 28 } 29 public org.eclipse.jface.viewers.IStructuredSelection getSelection() { 30 return selection; 31 } 32 public IWorkbench getWorkbench() { 33 return workbench; 34 } 35 public void init(IWorkbench workbench, IStructuredSelection selection) { 36 this.workbench = workbench; 37 this.selection = selection; 38 } 39 public boolean performFinish() { 40 return true; 41 } 42 47 public String getDefaultValue(String key) { 48 if (defaultValues==null) return null; 49 return (String )defaultValues.get(key); 50 } 51 56 public void init(Dictionary defaultValues) { 57 this.defaultValues = defaultValues; 58 } 59 } 60 | Popular Tags |