Package org.eclipse.jdt.core.search

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


    protected IType chooseTargetClass() {
        IPackageFragmentRoot root = getMainPage().getPackageFragmentRoot();
        if (root == null) { return null; }

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

        SelectionDialog dialog;
    try {
      dialog = JavaUI.createTypeDialog(
          getShell(),
View Full Code Here


       
        if (search != null) {
            try {       
                IJavaElement[] elements = getJavaElements(search);
                MainMethodSearchEngine engine = new MainMethodSearchEngine();
                IJavaSearchScope scope = SearchEngine.createJavaSearchScope(elements, false);
// TODO styling information was removed
//                types = engine.searchMainMethods(dialog, scope, IJavaElementSearchConstants.CONSIDER_BINARIES
//                        | IJavaElementSearchConstants.CONSIDER_EXTERNAL_JARS, true);
                types = engine.searchMainMethods(dialog, scope, true);
            } catch (InterruptedException e) {
View Full Code Here

    /**
     * Show a dialog that lists all main types.
     */
    protected void handleSearchButtonSelected() {
        IJavaProject javaProject = getJavaProject();
        IJavaSearchScope searchScope = null;
        if ((javaProject == null) || !javaProject.exists()) {
            searchScope = SearchEngine.createWorkspaceScope();
        } else {
            searchScope = SearchEngine.createJavaSearchScope(new IJavaElement[] { javaProject}, false);
        }
View Full Code Here

                javaElement = member.getCompilationUnit();
            }
        }
        if (javaElement instanceof ICompilationUnit || javaElement instanceof IClassFile) {
            try {
                IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] { javaElement}, false);
                MainMethodSearchEngine engine = new MainMethodSearchEngine();
                IType[] types = engine.searchMainMethods(getLaunchConfigurationDialog(), scope,
                        IJavaElementSearchConstants.CONSIDER_BINARIES | IJavaElementSearchConstants.CONSIDER_EXTERNAL_JARS);
                if (types != null && (types.length > 0)) {
                    // Simply grab the first main type found in the searched
View Full Code Here

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

        IJavaElement[] elements = new IJavaElement[] { root.getJavaProject()};
        IJavaSearchScope scope = SearchEngine.createJavaSearchScope(elements);
        // TODO Filter for subclasses of Throwable
       
        SelectionDialog dialog;
    try {
      dialog = JavaUI.createTypeDialog(
View Full Code Here

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

        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

                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

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

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.