Package org.eclipse.jdt.core.search

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


                    return matches.get(potentialAnnotationName);
                }

                try {
                    final List<IAnnotation> matchesForAnnotation = new ArrayList<IAnnotation>();
                    SearchRequestor requestor = new SearchRequestor() {
                        @Override
                        public void acceptSearchMatch(SearchMatch match) throws CoreException {
                            if (match.getElement() instanceof IMethod) {
                                IAnnotation[] annotations = ((IMethod) match.getElement()).getAnnotations();
                                for (IAnnotation annotation : annotations) {
View Full Code Here


    }
  }
 
  public static Set<IType> searchForJavaConfigs(SearchPattern pattern, IJavaSearchScope scope) {
    final Set<IType> annotatedTypes = new HashSet<IType>();
    SearchRequestor requestor = new SearchRequestor() {
      @Override
      public void acceptSearchMatch(SearchMatch match) throws CoreException {
        if (match.getAccuracy() == SearchMatch.A_ACCURATE && !match.isInsideDocComment()) {
          Object element = match.getElement();
          if (element instanceof IType) {
View Full Code Here

  }

  private IPackageFragment findPackageFragment(String packageName) {
    final List<IPackageFragment> results = new ArrayList<IPackageFragment>();

    SearchRequestor collector = new SearchRequestor() {

      @Override
      public void acceptSearchMatch(SearchMatch match) throws CoreException {
        Object element = match.getElement();
        if (element instanceof IPackageFragment) {
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.search.SearchRequestor

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.