Package org.eclipse.jdt.internal.ui.util

Examples of org.eclipse.jdt.internal.ui.util.MainMethodSearchEngine


        } else {
            searchScope = SearchEngine.createJavaSearchScope(new IJavaElement[] { javaProject}, false);
        }

        int constraints = IJavaElementSearchConstants.CONSIDER_BINARIES;
        MainMethodSearchEngine engine = new MainMethodSearchEngine();
        IType[] types = null;
        try {
            types = engine.searchMainMethods(getLaunchConfigurationDialog(), searchScope, constraints);
        } catch (InvocationTargetException e) {
            setErrorMessage(e.getMessage());
            return;
        } catch (InterruptedException e) {
            setErrorMessage(e.getMessage());
View Full Code Here


            }
        }
        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
                    // element
                    name = types[0].getFullyQualifiedName();
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.ui.util.MainMethodSearchEngine

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.