Package org.eclipse.jdt.core.search

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


        };
       
        IJavaSearchScope scope = getScope(null);
       
        SearchEngine searchEngine = new SearchEngine();
        searchEngine.search(pattern, new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()}, scope, requestor, null);

        if (matches.size() != 1) {
            throw new IllegalArgumentException("Failed to find unique type; found "+matches.size());
        }
View Full Code Here


          types.add(match.getElement());
        }
        };

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

      }
    };

    SearchEngine searchEngine = new SearchEngine();
    try {
      searchEngine.search(pattern, new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() }, SearchEngine.createWorkspaceScope(),
          requestor, new NullProgressMonitor());
    } catch (CoreException e) {
    }
  }
View Full Code Here

        + typename, IJavaSearchConstants.CLASS,
        IJavaSearchConstants.DECLARATIONS,
        SearchPattern.R_PATTERN_MATCH);

    try {
      eng.search(patternFirst, new SearchParticipant[] { SearchEngine
          .getDefaultSearchParticipant() }, ijss, efcr,
          new NullProgressMonitor());
      return efcr.getFields();
    } catch (CoreException e) {
      Activator.log(e);
View Full Code Here

        + typeName, IJavaSearchConstants.CLASS,
        IJavaSearchConstants.DECLARATIONS,
        SearchPattern.R_PATTERN_MATCH);

    try {
      eng.search(patternFirst, new SearchParticipant[] { SearchEngine
          .getDefaultSearchParticipant() }, ijss, asr,
          new NullProgressMonitor());
      return asr.getFound();
    } catch (CoreException e) {
      Activator.log(e);
View Full Code Here

    SearchPattern patternFirst = SearchPattern.createPattern("*." + ck,
        IJavaSearchConstants.CLASS, IJavaSearchConstants.DECLARATIONS,
        SearchPattern.R_PATTERN_MATCH);

    eng.search(patternFirst, new SearchParticipant[] { SearchEngine
        .getDefaultSearchParticipant() }, ijss, sAsr,
        new NullProgressMonitor());
    ArrayList<IType> allTypes = sAsr.getFound();
    sAsr.clear();
    return allTypes;
View Full Code Here

      SearchPattern patternSecond = SearchPattern.createPattern("Entity",
          IJavaSearchConstants.ANNOTATION_TYPE,
          IJavaSearchConstants.REFERENCES,
          SearchPattern.R_EXACT_MATCH);

      engine.search(patternFirst, new SearchParticipant[] { SearchEngine
          .getDefaultSearchParticipant() }, ijss, asr,
          new NullProgressMonitor());
      ArrayList<String> full = new ArrayList<String>();
      full.addAll(asr.getEntityName());
      asr.clear();
View Full Code Here

          .getDefaultSearchParticipant() }, ijss, asr,
          new NullProgressMonitor());
      ArrayList<String> full = new ArrayList<String>();
      full.addAll(asr.getEntityName());
      asr.clear();
      engine.search(patternSecond, new SearchParticipant[] { SearchEngine
          .getDefaultSearchParticipant() }, ijss, asr,
          new NullProgressMonitor());
      full.addAll(asr.getEntityName());
      return full.toArray(new String[full.size()]);
View Full Code Here

//                final SearchPattern other = SearchPattern.createPattern((IJavaElement)elems.get(i), IJavaSearchConstants.IMPLEMENTORS, 0);
//                combined = SearchPattern.createAndPattern(combined, other);
//              }
     
      try {
        engine.search(combined, new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()}, scope, requestor, null);
       
      } catch (CoreException e) {
        //ignore
      }
View Full Code Here

                JSPSearchParticipant[] participants = { getSearchParticipant() };
                SearchEngine engine = new SearchEngine();
                try {
                    if (jobMonitor != null)
                        jobMonitor.beginTask("", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
                    engine.search(javaSearchPattern, participants, this.fScope, this.fRequestor, jobMonitor);
                } catch (CoreException e) {
                    if (DEBUG)
                        Logger.logException(e);
                }
                // non-CoreExceptions will permanently stall the Worker thread
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.