Package org.eclipse.jdt.core.search

Examples of org.eclipse.jdt.core.search.SearchEngine.search()


    SearchPattern pattern = SearchPattern.createPattern("Infer", IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE, SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
    SearchParticipant[] participants = new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()};
    IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
    InferRequestor requestor = new InferRequestor(rels);
   
    engine.search(pattern, participants, scope, requestor, monitor);
    inferRules.addAll(requestor.getRules());
  }

  public void update(Observable o, Object arg) {
    Triple<IResource, Document, XMLContext> triple = (Triple<IResource, Document, XMLContext>)arg;
View Full Code Here


      SearchEngine.createJavaSearchScope(new IJavaElement[]{javaProject});
    SearchRequestor requestor = new SearchRequestor();
    SearchEngine engine = new SearchEngine();
    SearchParticipant[] participants =
      new SearchParticipant[]{SearchEngine.getDefaultSearchParticipant()};
    engine.search(pattern, participants, scope, requestor, null);

    ArrayList<IType> types = new ArrayList<IType>();
    if (requestor.getMatches().size() > 0){
      for (SearchMatch match : requestor.getMatches()){
        if(match.getAccuracy() != SearchMatch.A_ACCURATE){
View Full Code Here

          SearchEngine.createJavaSearchScope(new IJavaElement[]{javaProject});
        SearchRequestor requestor = new SearchRequestor();
        SearchEngine engine = new SearchEngine();
        SearchParticipant[] participants =
          new SearchParticipant[]{SearchEngine.getDefaultSearchParticipant()};
        engine.search(pattern, participants, scope, requestor, null);
        if (requestor.getMatches().size() > 0){
          imports = new ArrayList<String>();
          for (SearchMatch match : requestor.getMatches()){
            if(match.getAccuracy() != SearchMatch.A_ACCURATE){
              continue;
View Full Code Here

    SearchRequestor requestor = new SearchRequestor();
    if(pattern != null){
      SearchEngine engine = new SearchEngine();
      SearchParticipant[] participants =
        new SearchParticipant[]{SearchEngine.getDefaultSearchParticipant()};
      engine.search(pattern, participants, scope, requestor, null);
    }
    return requestor.getMatches();
  }

  /**
 
View Full Code Here

    };

    SearchEngine engine = new SearchEngine();
    SearchParticipant[] participants =
      new SearchParticipant[]{SearchEngine.getDefaultSearchParticipant()};
    engine.search(pattern, participants, scope, requestor, null);

    // if we found only 1 result, we can use it.
    if (methods.size() == 1){
      IMethod method = methods.get(0);
      ICompilationUnit cu = method.getCompilationUnit();
View Full Code Here

          }
        } catch (JavaModelException e) {}
      }
    };
    SearchEngine engine = new SearchEngine();
    engine.search(pattern, new SearchParticipant[] { SearchEngine
        .getDefaultSearchParticipant() }, scope, requestor,
        null);
   
    return annotations;
  }
View Full Code Here

                    }

                    SearchEngine engine = new SearchEngine();

                    Activator.getLogservice().log(LogService.LOG_ERROR, "Searching for " + potentialAnnotationName);
                    engine.search(pattern, new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()}, scope,
                        requestor, null);
                    matches.put(potentialAnnotationName, matchesForAnnotation);

                    return matchesForAnnotation;
View Full Code Here

          SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE | SearchPattern.R_ERASURE_MATCH);
      IJavaSearchScope scope= SearchEngine.createJavaSearchScope(new IJavaElement[] { project }, false);
      NonPublicClassInCUCollector requestor= new NonPublicClassInCUCollector();

      SearchEngine searchEngine= new SearchEngine();
      searchEngine.search(pattern, new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
          scope, requestor, new NullProgressMonitor());
     
      element= requestor.fFound;
    }
   
View Full Code Here

    SearchEngine engine = new SearchEngine();
    SearchPattern pattern = SearchPattern.createPattern(packageName, IJavaSearchConstants.PACKAGE,
        IJavaSearchConstants.ALL_OCCURRENCES, SearchPattern.R_EXACT_MATCH);
    try {
      engine.search(pattern, new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() },
          SearchEngine.createWorkspaceScope(), collector, new NullProgressMonitor());
    }
    catch (CoreException e) {
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.