Examples of searchMainMethods()


Examples of org.eclipse.jdt.internal.debug.ui.launcher.MainMethodSearchEngine.searchMainMethods()

                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) {
                return;
            } catch (InvocationTargetException e) {
                MessageDialog.openError(getShell(), "Launch failed", e.getMessage());
                return;
View Full Code Here

Examples of org.eclipse.jdt.internal.debug.ui.launcher.MainMethodSearchEngine.searchMainMethods()

      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.internal.debug.ui.launcher.MainMethodSearchEngine.searchMainMethods()

    }
    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, false);       
        if (types != null && (types.length > 0)) {
          // Simply grab the first main type found in the searched element
          name = types[0].getFullyQualifiedName();
        }
      } catch (InterruptedException ie) {
View Full Code Here

Examples of org.eclipse.jdt.internal.ui.util.MainMethodSearchEngine.searchMainMethods()

        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

Examples of org.eclipse.jdt.internal.ui.util.MainMethodSearchEngine.searchMainMethods()

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