1 20 21 package org.apache.directory.ldapstudio.browser.ui.wizards; 22 23 24 import org.apache.directory.ldapstudio.browser.ui.search.SearchPage; 25 import org.eclipse.jface.viewers.IStructuredSelection; 26 import org.eclipse.jface.wizard.Wizard; 27 import org.eclipse.search.ui.NewSearchUI; 28 import org.eclipse.ui.INewWizard; 29 import org.eclipse.ui.IWorkbench; 30 import org.eclipse.ui.IWorkbenchWindow; 31 32 33 40 public class NewSearchWizard extends Wizard implements INewWizard 41 { 42 43 44 private IWorkbenchWindow window; 45 46 47 50 public NewSearchWizard() 51 { 52 } 53 54 55 58 public void init( IWorkbench workbench, IStructuredSelection selection ) 59 { 60 window = workbench.getActiveWorkbenchWindow(); 61 } 62 63 64 67 public void dispose() 68 { 69 window = null; 70 } 71 72 73 78 public static String getId() 79 { 80 return NewSearchWizard.class.getName(); 81 } 82 83 84 87 public boolean performFinish() 88 { 89 NewSearchUI.openSearchDialog( window, SearchPage.getId() ); 90 return true; 91 } 92 93 } 94 | Popular Tags |