1 20 package org.apache.directory.ldapstudio.schemas.controller.actions; 21 22 23 import org.apache.directory.ldapstudio.schemas.Activator; 24 import org.apache.directory.ldapstudio.schemas.Messages; 25 import org.apache.directory.ldapstudio.schemas.PluginConstants; 26 import org.apache.directory.ldapstudio.schemas.view.views.SearchView; 27 import org.eclipse.jface.action.Action; 28 import org.eclipse.ui.plugin.AbstractUIPlugin; 29 30 31 37 public class EraseSearchAction extends Action 38 { 39 protected SearchView view; 40 41 42 48 public EraseSearchAction( SearchView view ) 49 { 50 super( Messages.getString( "EraseSearchAction.Erase_Search" ) ); setToolTipText( getText() ); 52 setId( PluginConstants.CMD_ERASE_SEARCH ); 53 setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID, 54 PluginConstants.IMG_ERASE_SEARCH ) ); 55 setEnabled( true ); 56 57 this.view = view; 58 } 59 60 61 64 public void run() 65 { 66 view.setSearch( "", SearchView.SEARCH_ALL ); } 68 69 70 73 public void dispose() 74 { 75 this.view = null; 76 } 77 } 78 | Popular Tags |