/** * Returns a new runtime classpath entry for the given archive(possibly external). * * @param path * absolute path to an archive * @param classpathProperty * the type of entry - one of <code>USER_CLASSES</code>, <code>BOOTSTRAP_CLASSES</code>,<code>STANDARD_CLASSES</code>, * <code>MODULE_PATH</code>, <code>CLASS_PATH</code> or <code>PATCH_MODULE</code> * @param javaProject * the javaProject to be returned by {@link IRuntimeClasspathEntry#getJavaProject()}, required for PATCH_MODULE * @return runtime classpath entry * @since 3.10 */ public static IRuntimeClasspathEntry newArchiveRuntimeClasspathEntry(IPath path, int classpathProperty, IJavaProject javaProject) { RuntimeClasspathEntry entry = new RuntimeClasspathEntry(JavaCore.newLibraryEntry(path, null, null), classpathProperty); entry.setJavaProject(javaProject); return entry; }
/** * Returns a runtime classpath entry for the given container path with the given * classpath property to be resolved in the context of the given Java project. * * @param path container path * @param classpathProperty the type of entry - one of <code>USER_CLASSES</code>, * <code>BOOTSTRAP_CLASSES</code>, or <code>STANDARD_CLASSES</code> * @param project Java project context used for resolution, or <code>null</code> * if to be resolved in the context of the launch configuration this entry * is referenced in * @return runtime classpath entry * @exception CoreException if unable to construct a runtime classpath entry * @since 3.0 */ public static IRuntimeClasspathEntry newRuntimeContainerClasspathEntry(IPath path, int classpathProperty, IJavaProject project) throws CoreException { RuntimeClasspathEntry entry = new RuntimeClasspathEntry(JavaCore.newContainerEntry(path), classpathProperty); entry.setJavaProject(project); return entry; }
/** * Returns a runtime classpath entry for the given container path with the given * classpath property to be resolved in the context of the given Java project. * * @param path container path * @param classpathProperty the type of entry - one of <code>USER_CLASSES</code>, * <code>BOOTSTRAP_CLASSES</code>, or <code>STANDARD_CLASSES</code> * @param project Java project context used for resolution, or <code>null</code> * if to be resolved in the context of the launch configuration this entry * is referenced in * @return runtime classpath entry * @exception CoreException if unable to construct a runtime classpath entry * @since 3.0 */ public static IRuntimeClasspathEntry newRuntimeContainerClasspathEntry(IPath path, int classpathProperty, IJavaProject project) throws CoreException { RuntimeClasspathEntry entry = new RuntimeClasspathEntry(JavaCore.newContainerEntry(path), classpathProperty); entry.setJavaProject(project); return entry; }
if (isModular && !containsModuleInfo(locations[i])) { locations[i].setClasspathProperty(IRuntimeClasspathEntry.PATCH_MODULE); ((RuntimeClasspathEntry) locations[i]).setJavaProject(project); } else { locations[i].setClasspathProperty(classpathProperty);