1 19 20 package org.netbeans.modules.javadoc.search; 21 22 import org.openide.util.NbBundle; 23 import org.openide.util.HelpCtx; 24 import org.openide.util.actions.CallableSystemAction; 25 26 31 public final class SearchDocAction extends CallableSystemAction { 32 33 public SearchDocAction() { 34 putValue("noIconInMenu", Boolean.TRUE); } 36 37 41 public String getName () { 42 return NbBundle.getBundle (SearchDocAction.class).getString ("CTL_SEARCH_MenuItem"); 43 } 44 45 48 protected String iconResource () { 49 return "org/netbeans/modules/javadoc/resources/searchDoc.gif"; } 51 52 55 public HelpCtx getHelpCtx () { 56 return new HelpCtx (SearchDocAction.class); 57 } 58 59 64 public void performAction () { 65 66 final IndexSearch indexSearch = IndexSearch.getDefault(); 67 68 String toFind = GetJavaWord.getCurrentJavaWord(); 69 70 if (toFind != null) 71 indexSearch.setTextToFind( toFind ); 72 73 indexSearch.open(); 74 indexSearch.requestActive(); 75 } 76 77 public boolean asynchronous() { 78 return false; 79 } 80 } 81 | Popular Tags |