Examples of IJavaSearchScope


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

                return result;
            }
        };
        final TreeSet<PkgPatternProposal> result = new TreeSet<PkgPatternProposal>(comparator);

        final IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {
            searchContext.getJavaProject()
        });
        final SearchPattern pattern = SearchPattern.createPattern("*" + prefix + "*", IJavaSearchConstants.PACKAGE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_PATTERN_MATCH);
        final SearchRequestor requestor = new SearchRequestor() {
            @Override
View Full Code Here

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

        // Prepare the package lister from the Java project
        IProject project = ResourceUtil.getResource(page.getEditorInput()).getProject();
        IJavaProject javaProject = JavaCore.create(project);

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

        // Create and open the dialog
View Full Code Here

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

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

        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

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

        }

        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

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

        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

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

      // 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

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

    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

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

            @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

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

  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
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.