1 20 21 package org.apache.directory.ldapstudio.browser.ui.wizards; 22 23 24 import org.apache.directory.ldapstudio.browser.common.actions.SelectionUtils; 25 import org.apache.directory.ldapstudio.browser.core.model.ISearch; 26 import org.eclipse.jface.viewers.IStructuredSelection; 27 import org.eclipse.jface.wizard.Wizard; 28 import org.eclipse.ui.IExportWizard; 29 import org.eclipse.ui.IWorkbench; 30 import org.eclipse.ui.PlatformUI; 31 32 33 39 public abstract class ExportBaseWizard extends Wizard implements IExportWizard 40 { 41 42 43 protected String exportFilename = ""; 44 45 46 protected ISearch search; 47 48 49 54 public ExportBaseWizard( String title ) 55 { 56 super(); 57 setWindowTitle( title ); 58 init( null, ( IStructuredSelection ) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService() 59 .getSelection() ); 60 } 61 62 63 66 public void init( IWorkbench workbench, IStructuredSelection selection ) 67 { 68 search = SelectionUtils.getExampleSearch( selection ); 69 search.setName( null ); 70 exportFilename = ""; 71 } 72 73 74 79 public void setExportFilename( String exportFilename ) 80 { 81 this.exportFilename = exportFilename; 82 } 83 84 85 90 public String getExportFilename() 91 { 92 return exportFilename; 93 } 94 95 96 101 public ISearch getSearch() 102 { 103 return search; 104 } 105 106 107 112 public void setSearch( ISearch search ) 113 { 114 this.search = search; 115 } 116 117 } 118 | Popular Tags |