Package lapsePlus.MethodSearchRequestor

Examples of lapsePlus.MethodSearchRequestor.MethodDeclarationsSearchRequestor


 
  int addMethodsByName(String methodName, String type, String category, JavaProject project, IProgressMonitor monitor, boolean nonWeb) {
    int matches = 0;
    ViewContentProvider cp = ((ViewContentProvider)viewer.getContentProvider());
    try {
      MethodDeclarationsSearchRequestor requestor = new MethodDeclarationsSearchRequestor();
            SearchEngine searchEngine = new SearchEngine();

            IJavaSearchScope searchScope = CallerFinder.getSearchScope(project);
            SearchPattern pattern = SearchPattern.createPattern(
                methodName,
          IJavaSearchConstants.METHOD,
          IJavaSearchConstants.DECLARATIONS,
          SearchPattern.R_PATTERN_MATCH | SearchPattern.R_CASE_SENSITIVE
          );
    
      searchEngine.search(
          pattern,
          new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() },
              searchScope,
              requestor,
          monitor
          );
      Collection pairs =  requestor.getMethodUnitPairs();
      for(Iterator iter = pairs.iterator(); iter.hasNext();) {
        Utils.MethodDeclarationUnitPair pair = (MethodDeclarationUnitPair) iter.next();
        ViewMatch match = new ViewMatch(
            pair.getMember().getDeclaringType().getElementName() + "." + pair.getMember().getElementName()
            pair.getMethod() != null ? pair.getMethod().getName() : null,
View Full Code Here

TOP

Related Classes of lapsePlus.MethodSearchRequestor.MethodDeclarationsSearchRequestor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.