Package org.eclipse.jdt.core.search

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


    final ArrayList<IMethod> methods = new ArrayList<IMethod>();
    int context = IJavaSearchConstants.DECLARATIONS;
    int type = IJavaSearchConstants.METHOD;
    int matchType = SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE;
    IJavaSearchScope scope = SearchEngine.createJavaSearchScope(
        srcs.toArray(new IJavaElement[srcs.size()]));
    SearchPattern pattern =
      SearchPattern.createPattern("main(String[])", type, context, matchType);
    SearchRequestor requestor = new SearchRequestor(){
      public void acceptSearchMatch(SearchMatch match){
View Full Code Here


            ((SelectionRequestor)SelectionEngine.this.requestor).acceptType(match.getType());
          }
        }
      };
     
      IJavaSearchScope scope = BasicSearchEngine.createWorkspaceScope();
     
      SelectionTypeNameMatchRequestorWrapper requestorWrapper =
        new SelectionTypeNameMatchRequestorWrapper(
            typeNameMatchRequestor,
            scope,
View Full Code Here

      // dummy query for waiting until the indexes are ready
      if (monitor != null)
        monitor.subTask(Messages.javamodel_configuring_searchengine);
      SearchEngine engine = new SearchEngine();
      IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
      try {
        engine.searchAllTypeNames(
          null,
          SearchPattern.R_EXACT_MATCH,
          "!@$#!@".toCharArray(), //$NON-NLS-1$
View Full Code Here

  private Set evaluateStarImportConflicts(IProgressMonitor monitor) throws JavaModelException {
    //long start= System.currentTimeMillis();

    final HashSet/*String*/ onDemandConflicts= new HashSet();

    IJavaSearchScope scope= SearchEngine.createJavaSearchScope(new IJavaElement[] { this.compilationUnit.getJavaProject() });

    ArrayList/*<char[][]>*/  starImportPackages= new ArrayList();
    ArrayList/*<char[][]>*/ simpleTypeNames= new ArrayList();
    int nPackageEntries= this.packageEntries.size();
    for (int i= 0; i < nPackageEntries; i++) {
View Full Code Here

            ((SelectionRequestor)SelectionEngine.this.requestor).acceptType(match.getType());
          }
        }
      };
     
      IJavaSearchScope scope = BasicSearchEngine.createWorkspaceScope();
     
      SelectionTypeNameMatchRequestorWrapper requestorWrapper =
        new SelectionTypeNameMatchRequestorWrapper(
            typeNameMatchRequestor,
            scope,
View Full Code Here

    protected IStatus validateItem(Object item) {
        return Status.OK_STATUS;
    }

    private IType[] findTypes(String patternText, IProgressMonitor progressMonitor) {
        IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] { javaProject },
                IJavaSearchScope.SOURCES | IJavaSearchScope.REFERENCED_PROJECTS | IJavaSearchScope.SYSTEM_LIBRARIES |
                IJavaSearchScope.APPLICATION_LIBRARIES);
        SearchPattern pattern = createSearchPattern(patternText);
        SearchParticipant[] participants = new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() };
        ClassCollector collector = new ClassCollector();
View Full Code Here

      final String packageFrag, final String lang)
    throws CoreException, JavaModelException {

    SearchPattern pattern = SearchPattern.createPattern
        (packageFrag, IJavaSearchConstants.PACKAGE , IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH);
    IJavaSearchScope scope = SearchEngine.createJavaSearchScope(javaProject.getPackageFragments());
   
    final List<CucumberAnnotation> annotations = new ArrayList<CucumberAnnotation>();
   
    SearchRequestor requestor = new SearchRequestor() {
      public void acceptSearchMatch(SearchMatch match) {
View Full Code Here

    return file.getProject();
  }
 
  public String doOpenClassSelectionDialog(String superType, boolean allowInterfaces) {
    IJavaSearchScope searchScope = null;
 
    IProject project = getProject();
    try {
      IJavaProject javaProject = JavaCore.create(project);
      if (superType != null) {
View Full Code Here

   
    //fix for bug 37333
    if (element == null) {
      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());
View Full Code Here

  public Set<IType> locateJavaConfigs(IProject project, IProgressMonitor monitor) {
    Set<IType> types = new HashSet<IType>();
    IJavaProject javaProj = JdtUtils.getJavaProject(project);
    if (javaProj != null) {
      IJavaSearchScope sources = SearchEngine.createJavaSearchScope(new IJavaElement[] { javaProj },
          IJavaSearchScope.SOURCES);
      Set<IType> candidates = org.springframework.ide.eclipse.core.java.JdtUtils.searchForJavaConfigs(sources);
      for (IType candidate : candidates) {
        if (!candidate.getElementName().contains("Test")) {
          types.add(candidate);
View Full Code Here

TOP

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

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.