1 20 21 package org.apache.directory.ldapstudio.browser.ui.actions; 22 23 24 import org.apache.directory.ldapstudio.browser.ui.BrowserUIConstants; 25 import org.apache.directory.ldapstudio.browser.ui.BrowserUIPlugin; 26 import org.apache.directory.ldapstudio.browser.ui.search.SearchPage; 27 import org.eclipse.jface.action.Action; 28 import org.eclipse.jface.action.IAction; 29 import org.eclipse.jface.viewers.ISelection; 30 import org.eclipse.search.ui.NewSearchUI; 31 import org.eclipse.ui.IWorkbenchWindow; 32 import org.eclipse.ui.IWorkbenchWindowActionDelegate; 33 import org.eclipse.ui.PlatformUI; 34 35 36 42 public class OpenSearchAction extends Action implements IWorkbenchWindowActionDelegate 43 { 44 47 public OpenSearchAction() 48 { 49 super( "Search...", Action.AS_PUSH_BUTTON ); 50 super.setText( "Search..." ); 51 super.setToolTipText( "Search..." ); 52 super.setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor( BrowserUIConstants.IMG_SEARCH ) ); 53 super.setEnabled( true ); 54 } 55 56 57 60 public void run() 61 { 62 NewSearchUI.openSearchDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow(), SearchPage.getId() ); 63 } 64 65 66 69 public void init( IWorkbenchWindow window ) 70 { 71 } 72 73 74 77 public void run( IAction action ) 78 { 79 this.run(); 80 } 81 82 83 86 public void selectionChanged( IAction action, ISelection selection ) 87 { 88 } 89 90 91 94 public void dispose() 95 { 96 } 97 } 98 | Popular Tags |