Package org.eclipse.jdt.core.search

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


        if (javaProject == null) {
            MessageDialog.openError(getSection().getShell(), "Error", "Cannot add test cases: unable to find a Java project associated with the editor input.");
            return;
        }

        IJavaSearchScope searchScope = SearchEngine.createJavaSearchScope(new IJavaElement[] {
            javaProject
        });
        JavaSearchScopeTestCaseLister testCaseLister = new JavaSearchScopeTestCaseLister(searchScope, window);

        // Create and open the dialog
View Full Code Here


        IPackageFragmentRoot root = getPackageFragmentRoot();
        if (root == null) {
            return null;
        }

        IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {
            root
        });

        FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(getShell(), false, getWizard().getContainer(), scope, IJavaSearchConstants.TYPE);
        dialog.setTitle(NewWizardMessages.NewTypeWizardPage_ChooseEnclosingTypeDialog_title);
View Full Code Here

        }

        IJavaElement[] elements = new IJavaElement[] {
            project
        };
        IJavaSearchScope scope = SearchEngine.createJavaSearchScope(elements);

        FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(getShell(), false, getWizard().getContainer(), scope, IJavaSearchConstants.CLASS);
        dialog.setTitle(NewWizardMessages.NewTypeWizardPage_SuperClassDialog_title);
        dialog.setMessage(NewWizardMessages.NewTypeWizardPage_SuperClassDialog_message);
        dialog.setInitialPattern(getSuperClass());
View Full Code Here

        IJavaProject javaProject = getJavaProject();
        if (javaProject == null) {
            MessageDialog.openError(getSection().getShell(), "Error", "Cannot add packages: unable to find a Java project associated with the editor input.");
            return;
        }
        IJavaSearchScope searchScope = SearchEngine.createJavaSearchScope(new IJavaElement[] {
            javaProject
        });
        JavaSearchScopePackageLister packageLister = new JavaSearchScopePackageLister(searchScope, window);

        // Create and open the dialog
View Full Code Here

      // Returns main method types
      boolean includeSubtypes = true;
      MainMethodSearchEngine engine = new MainMethodSearchEngine();
      int constraints = IJavaSearchScope.SOURCES;
      constraints |= IJavaSearchScope.APPLICATION_LIBRARIES;
      IJavaSearchScope scope = SearchEngine.createJavaSearchScope(
          new IJavaElement[] { javaProject }, constraints);
      return engine.searchMainMethods(monitor, scope, includeSubtypes);
    }
    return new IType[] {};
View Full Code Here

    Shell shell = getShell();

    int javaSearchType = IJavaSearchConstants.CLASS;

    IJavaElement[] elements = new IJavaElement[] { javaProject };
    IJavaSearchScope scope = SearchEngine.createJavaSearchScope(elements);

    FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(
        shell, false, null, scope, javaSearchType);
    dialog.setTitle(title);
    dialog.setInitialPattern(pattern);
View Full Code Here

            @Override public void acceptSearchMatch(SearchMatch match) {
                matches.add(match);
            }
        };
       
        IJavaSearchScope scope = getScope(null);
       
        SearchEngine searchEngine = new SearchEngine();
        searchEngine.search(pattern, new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()}, scope, requestor, null);

        if (matches.size() != 1) {
View Full Code Here

  protected final void handleChooseClassUnderTest() {
    try {
      List<IJavaProject> projectsList = Utils.getGWTProjects();
      IJavaProject[] projectsArray = projectsList.toArray(new IJavaProject[projectsList.size()]);
      IJavaSearchScope scope = SearchEngine.createJavaSearchScope(projectsArray);
      SelectionDialog dialog =
          JavaUI.createTypeDialog(
              getShell(),
              getWizard().getContainer(),
              scope,
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

  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

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.