Examples of SearchRequestor


Examples of org.eclipse.jdt.core.search.SearchRequestor

            throw new NullPointerException("No pattern!?");
        }
       
        final List<SearchMatch> matches = new ArrayList<SearchMatch>();
       
        SearchRequestor requestor = new SearchRequestor() {
            @Override public void acceptSearchMatch(SearchMatch match) {
                matches.add(match);
            }
        };
       
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchRequestor

        if (pattern == null) {
            // E.g. element not found / no longer exists
            throw new NullPointerException("No pattern!?");
        }
       
        SearchRequestor requestor = new SearchRequestor() {
            @Override public void acceptSearchMatch(SearchMatch match) {
                references.add(match);
            }
        };
       
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchRequestor

        if (pattern == null) {
            // E.g. element not found / no longer exists
            throw new NullPointerException("No pattern!?");
        }
       
        SearchRequestor requestor = new SearchRequestor() {
            @Override public void acceptSearchMatch(SearchMatch match) {
                references.add(match);
            }
        };
       
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchRequestor

        if (pattern == null) {
            // E.g. element not found / no longer exists
            throw new NullPointerException("No pattern!?");
        }
       
        SearchRequestor requestor = new SearchRequestor() {
            @Override public void acceptSearchMatch(SearchMatch match) {
                references.add(match);
            }
        };
       
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchRequestor

    try {
      String className=storyLine.asClassName();
      final List types = new ArrayList();
        SearchPattern pattern = SearchPattern.createPattern(className, IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH);
        IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
        SearchRequestor requestor = new SearchRequestor(){
        public void acceptSearchMatch(SearchMatch match) throws CoreException {
          types.add(match.getElement());
        }
        };
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchRequestor

      return;
    }
    SearchPattern pattern = SearchPattern.createPattern(string, IJavaSearchConstants.FIELD, IJavaSearchConstants.ALL_OCCURRENCES,
        SearchPattern.R_EXACT_MATCH);

    SearchRequestor requestor = new SearchRequestor() {
      @Override
      public void acceptSearchMatch(final SearchMatch match) {
        IAnnotationModel model = textEditor.getDocumentProvider().getAnnotationModel(textEditor.getEditorInput());
        Annotation annotation = new Annotation("org.eclipse.jdt.ui.occurrences", false, "wicket id constant");
        model.addAnnotation(annotation, new Position(match.getOffset(), match.getLength()));
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchRequestor

    IType sc = getSuperClass(jp);
    if (sc != null)
      elems.add(sc);
     
    if (elems.size() > 0){       
      SearchRequestor requestor = new Searcher();
      SearchEngine engine = new SearchEngine();
     
      IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[]{jp});//, IJavaSearchScope.SOURCES | IJavaSearchScope.APPLICATION_LIBRARIES | IJavaSearchScope.);
      SearchPattern combined = SearchPattern.createPattern((IJavaElement)elems.get(0), IJavaSearchConstants.IMPLEMENTORS, 0);
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchRequestor

        IJavaElement element = elementQuery.getElement();
       
        if(DEBUG)
          System.out.println("JSP Query Participant searching on ELEMENT: " + element); //$NON-NLS-1$
       
        SearchRequestor jspRequestor = new JSPSearchRequestor(requestor);
       
        // pa_TODO need to adapt JavaSearchScope to a JSPSearchScope
        JSPSearchSupport.getInstance().search(element, new JSPSearchScope(), jspRequestor, monitor);
       
      }
      else if(querySpecification instanceof PatternQuerySpecification) {
       
        // pattern search (eg. from Java search page)
        PatternQuerySpecification patternQuery = (PatternQuerySpecification)querySpecification;
        String pattern = patternQuery.getPattern();
       
        if(DEBUG)
          System.out.println("JSP Query Participant searching on PATTERN: " + pattern); //$NON-NLS-1$
       
        SearchRequestor jspRequestor = new JSPSearchRequestor(requestor);
       
        JSPSearchSupport.getInstance().search(pattern,
                            new JSPSearchScope(),
                            patternQuery.getSearchFor(),
                            patternQuery.getLimitTo(),
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchRequestor

       
    try {
     
      MethodSearchRequestor.initializeParserMap();
     
          SearchRequestor searchRequestor =  (SearchRequestor)new MethodSearchRequestor.MethodReferencesSearchRequestor();
     
            SearchEngine searchEngine = new SearchEngine();

            IProgressMonitor monitor = new SubProgressMonitor(progressMonitor, 5, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
           
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchRequestor

        }
    }
   
    public static Collection/*<MethodUnitPair>*/ findDeclarations(IProgressMonitor progressMonitor, String methodName, IJavaProject project, boolean isConstructor) {
        try {
            SearchRequestor searchRequestor = new MethodSearchRequestor.MethodDeclarationsSearchRequestor();
            SearchEngine searchEngine = new SearchEngine();

            IProgressMonitor monitor = new SubProgressMonitor(
                    progressMonitor, 5, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
            monitor.beginTask("Searching for calls to " +
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.