Package org.eclipse.jdt.core.search

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


        if (oldContainer != null && !oldContainer.equals(containerName)) {
          onDemandConflicts.add(name);
        }
      }
    };
    new SearchEngine().searchAllTypeNames(allPackages, allTypes, scope, requestor, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, monitor);
    return onDemandConflicts;
  }
View Full Code Here


                IJavaSearchScope.APPLICATION_LIBRARIES);
        SearchPattern pattern = createSearchPattern(patternText);
        SearchParticipant[] participants = new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() };
        ClassCollector collector = new ClassCollector();
        try {
            new SearchEngine().search(pattern, participants, scope, collector, progressMonitor);
        } catch (CoreException e) {
            logError(e);
            return new IType[0];
        }
        IType[] foundTypes = collector.getTypes().toArray(new IType[collector.getTypes().size()]);
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

                    if (scopeHasChanged) {
                        updateSearchScope();
                    }

                    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 pattern=  SearchPattern.createPattern(className, IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS,
          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

        }
      }
    };

    try {
      new SearchEngine().search(pattern, new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() },
          scope, requestor, null);
    } catch (CoreException e) {
      StatusHandler.log(new Status(IStatus.ERROR, SpringCore.PLUGIN_ID,
          "An error occurred while searching for Java config files.", e));
    }
View Full Code Here

    URL localJarURL = Platform.asLocalURL(jarURL);
    return new Path(localJarURL.getPath());
  }

  private void waitForIndexer() throws JavaModelException {
    new SearchEngine().searchAllTypeNames(ResourcesPlugin.getWorkspace(),
        null, null, IJavaSearchConstants.EXACT_MATCH,
        IJavaSearchConstants.CASE_SENSITIVE,
        IJavaSearchConstants.CLASS, SearchEngine
            .createJavaSearchScope(new IJavaElement[0]),
        new ITypeNameRequestor() {
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

    try {
      IJavaSearchScope hierarchyScope = SearchEngine.createHierarchyScope(superType);
      IJavaSearchScope projectScope = SearchEngine.createJavaSearchScope(new IJavaElement[] { jproject });
      IJavaSearchScope scope = new IntersectingJavaSearchScope(projectScope, hierarchyScope);
      SearchEngine searchEngine = new SearchEngine();

      char[] typeName = null;
      char[] packageName = null;
      if (!contentAssistRequest.getMatchString().isEmpty()) {
        typeName = contentAssistRequest.getMatchString().toCharArray();
      }

      searchEngine.searchAllTypeNames(packageName, SearchPattern.R_PATTERN_MATCH, typeName, SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CAMELCASE_MATCH, IJavaSearchConstants.CLASS, scope, new TypeNameRequestor() {
        @Override
        public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path) {
          String sPackageName = new String(packageName);
          int priority = PRIORITY_LOWER_1;
          if (sPackageName.startsWith("com.sun.javafx")) {
View Full Code Here

                typeName = contentAssistRequest.getMatchString().toCharArray();
              }
            }
           
            IJavaSearchScope searchScope = SearchEngine.createJavaSearchScope(new IJavaElement[] { jproject });
            SearchEngine searchEngine = new SearchEngine();
            try {
              searchEngine.searchAllTypeNames(packageName, SearchPattern.R_PATTERN_MATCH, typeName, SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CAMELCASE_MATCH, IJavaSearchConstants.TYPE, searchScope, new TypeNameRequestor() {
                public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path) {
                  String sPackageName = new String(packageName);
                  int priority = PRIORITY_LOWER_1;
                  if (sPackageName.startsWith("com.sun")) {
                    priority -= 10;
View Full Code Here

TOP

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

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.