1 11 package org.eclipse.ui.internal.dialogs; 12 13 import org.eclipse.jface.wizard.Wizard; 14 import org.eclipse.ui.IWorkingSet; 15 import org.eclipse.ui.dialogs.IWorkingSetEditWizard; 16 import org.eclipse.ui.dialogs.IWorkingSetPage; 17 import org.eclipse.ui.internal.WorkbenchMessages; 18 19 26 public class WorkingSetEditWizard extends Wizard implements 27 IWorkingSetEditWizard { 28 private IWorkingSetPage workingSetEditPage; 29 30 private IWorkingSet workingSet; 31 32 38 public WorkingSetEditWizard(IWorkingSetPage editPage) { 39 super(); 40 workingSetEditPage = editPage; 41 workingSetEditPage.setWizard(this); 42 setWindowTitle(WorkbenchMessages.WorkingSetEditWizard_title); 43 } 44 45 50 public void addPages() { 51 super.addPages(); 52 addPage(workingSetEditPage); 53 } 54 55 60 public boolean canFinish() { 61 return workingSetEditPage.isPageComplete(); 62 } 63 64 69 public IWorkingSet getSelection() { 70 return workingSet; 71 } 72 73 79 public boolean performFinish() { 80 workingSetEditPage.finish(); 81 return true; 82 } 83 84 89 public void setSelection(IWorkingSet workingSet) { 90 this.workingSet = workingSet; 91 workingSetEditPage.setSelection(workingSet); 92 } 93 } 94 | Popular Tags |