/** * Returns an array of paths to be used for the <code>java.library.path</code> * system property, or <code>null</code> if unspecified. * * @param configuration the config * @return an array of paths to be used for the <code>java.library.path</code> * system property, or <code>null</code> * @throws CoreException if unable to determine the attribute * @since 3.1 */ public String[] getJavaLibraryPath(ILaunchConfiguration configuration) throws CoreException { IJavaProject project = getJavaProject(configuration); if (project != null) { String[] paths = JavaRuntime.computeJavaLibraryPath(project, true); if (paths.length > 0) { return paths; } } return null; }
/** * Verifies a Java project is specified by the given launch configuration, * and returns the Java project. * * @param configuration * launch configuration * @return the Java project specified by the given launch configuration * @exception CoreException * if unable to retrieve the attribute or the attribute is * unspecified */ public IJavaProject verifyJavaProject(ILaunchConfiguration configuration) throws CoreException { String name = getJavaProjectName(configuration); if (name == null) { abort( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Java_project_not_specified_9, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT); } IJavaProject project = getJavaProject(configuration); if (project == null) { abort( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Project_does_not_exist_or_is_not_a_Java_project_10, null, IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT); } return project; } /**
/** * Verifies a Java project is specified by the given launch configuration, * and returns the Java project. * * @param configuration * launch configuration * @return the Java project specified by the given launch configuration * @exception CoreException * if unable to retrieve the attribute or the attribute is * unspecified */ public IJavaProject verifyJavaProject(ILaunchConfiguration configuration) throws CoreException { String name = getJavaProjectName(configuration); if (name == null) { abort( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Java_project_not_specified_9, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT); } IJavaProject project = getJavaProject(configuration); if (project == null) { abort( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Project_does_not_exist_or_is_not_a_Java_project_10, null, IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT); } return project; } /**
/** * Returns an array of paths to be used for the <code>java.library.path</code> * system property, or <code>null</code> if unspecified. * * @param configuration the config * @return an array of paths to be used for the <code>java.library.path</code> * system property, or <code>null</code> * @throws CoreException if unable to determine the attribute * @since 3.1 */ public String[] getJavaLibraryPath(ILaunchConfiguration configuration) throws CoreException { IJavaProject project = getJavaProject(configuration); if (project != null) { String[] paths = JavaRuntime.computeJavaLibraryPath(project, true); if (paths.length > 0) { return paths; } } return null; }
/** * Returns the default working directory for the given launch configuration, * or <code>null</code> if none. Subclasses may override as necessary. * * @param configuration the config * @return default working directory or <code>null</code> if none * @throws CoreException if an exception occurs computing the default working * directory * @since 3.2 */ protected File getDefaultWorkingDirectory(ILaunchConfiguration configuration) throws CoreException { // default working directory is the project if this config has a project IJavaProject jp = getJavaProject(configuration); if (jp != null) { IProject p = jp.getProject(); // p.getLocation() will be null in the case where the location is relative to an undefined workspace path variable. if (p.getLocation() != null) { return p.getLocation().toFile(); } } return null; }
/** * Returns the default working directory for the given launch configuration, * or <code>null</code> if none. Subclasses may override as necessary. * * @param configuration the config * @return default working directory or <code>null</code> if none * @throws CoreException if an exception occurs computing the default working * directory * @since 3.2 */ protected File getDefaultWorkingDirectory(ILaunchConfiguration configuration) throws CoreException { // default working directory is the project if this config has a project IJavaProject jp = getJavaProject(configuration); if (jp != null) { IProject p = jp.getProject(); // p.getLocation() will be null in the case where the location is relative to an undefined workspace path variable. if (p.getLocation() != null) { return p.getLocation().toFile(); } } return null; } }
if (!excludeTestCode) { IJavaProject project = getJavaProject(configuration); if (project != null) { for (String moduleName : project.determineModulesOfProjectsWithNonEmptyClasspath()) {
jreEntry.getPath(), IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, getJavaProject(configuration)); bootEntries = JavaRuntime.resolveRuntimeClasspathEntry(bootEntry, configuration); } else {
jreEntry.getPath(), IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, getJavaProject(configuration)); bootEntries = JavaRuntime.resolveRuntimeClasspathEntry(bootEntry, configuration); } else {