/** * Returns a runtime classpath entry that corresponds to the given * classpath entry. The classpath entry may not be of type <code>CPE_SOURCE</code> * or <code>CPE_CONTAINER</code>. * * @param entry a classpath entry * @return runtime classpath entry * @since 2.0 */ private static IRuntimeClasspathEntry newRuntimeClasspathEntry(IClasspathEntry entry) { return new RuntimeClasspathEntry(entry); }
/** * Returns a runtime classpath entry that corresponds to the given classpath entry. The classpath entry may not be of type <code>CPE_SOURCE</code> * or <code>CPE_CONTAINER</code>. * * @param entry * a classpath entry * @return runtime classpath entry * @since 2.0 */ private static IRuntimeClasspathEntry newRuntimeClasspathEntry(IClasspathEntry entry, int classPathProperty) { return new RuntimeClasspathEntry(entry, classPathProperty); }
/** The runtime class path entry for the bundle. * * @return the runtime classpath entry. */ public IRuntimeClasspathEntry getRuntimeClassPathEntry() { if (this.classpathEntry != null && this.runtimeClasspathEntry == null) { this.runtimeClasspathEntry = new RuntimeClasspathEntry(this.classpathEntry); } return this.runtimeClasspathEntry; }
/** * Returns a runtime classpath entry that corresponds to the given * classpath entry. The classpath entry may not be of type <code>CPE_SOURCE</code> * or <code>CPE_CONTAINER</code>. * * @param entry a classpath entry * @return runtime classpath entry * @since 2.0 */ private static IRuntimeClasspathEntry newRuntimeClasspathEntry(IClasspathEntry entry) { return new RuntimeClasspathEntry(entry); }
new IClasspathAttribute[0] // extra attributes? ); result.add(new RuntimeClasspathEntry(entry));
/** * 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 (id == null || id.length() == 0) { return new RuntimeClasspathEntry(root);
@Override public IRuntimeClasspathEntry[] getRuntimeClasspathEntries(ILaunchConfiguration configuration) throws CoreException { IClasspathEntry entry = JavaCore.newProjectEntry(getJavaProject().getProject().getFullPath()); List<Object> classpathEntries = new ArrayList<Object>(5); List<IClasspathEntry> expanding = new ArrayList<IClasspathEntry>(5); expandProject(entry, classpathEntries, expanding); IRuntimeClasspathEntry[] runtimeEntries = new IRuntimeClasspathEntry[classpathEntries.size()]; for (int i = 0; i < runtimeEntries.length; i++) { Object e = classpathEntries.get(i); if (e instanceof IClasspathEntry) { IClasspathEntry cpe = (IClasspathEntry)e; runtimeEntries[i] = new RuntimeClasspathEntry(cpe); } else { runtimeEntries[i] = (IRuntimeClasspathEntry)e; } } // remove bootpath entries - this is a default user classpath List<IRuntimeClasspathEntry> ordered = new ArrayList<IRuntimeClasspathEntry>(runtimeEntries.length); for (int i = 0; i < runtimeEntries.length; i++) { if (runtimeEntries[i].getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) { ordered.add(runtimeEntries[i]); } } return ordered.toArray(new IRuntimeClasspathEntry[ordered.size()]); }
if (id == null || id.length() == 0) { return new RuntimeClasspathEntry(root);
/** * @param project * @return */ private static IRuntimeClasspathEntry getOutJar(IProject project) { String outjar = AspectJCorePreferences.getProjectOutJar(project); if(outjar == null || outjar.equals("")) { //$NON-NLS-1$ return null; } org.eclipse.jdt.core.IClasspathEntry entry = new org.eclipse.jdt.internal.core.ClasspathEntry( IPackageFragmentRoot.K_BINARY, // content kind org.eclipse.jdt.core.IClasspathEntry.CPE_LIBRARY, // entry kind new Path(project.getName() + '/' + outjar).makeAbsolute(), // path new IPath[] {}, // inclusion patterns new IPath[] {}, // exclusion patterns null, // src attachment path null, // src attachment root path null, // output location false, // is exported ? null, //accessRules false, //combine access rules? new IClasspathAttribute[0] // extra attributes? ); return new RuntimeClasspathEntry(entry); }
@Override public IRuntimeClasspathEntry[] getRuntimeClasspathEntries(boolean excludeTestCode) throws CoreException { IClasspathEntry entry = JavaCore.newProjectEntry(getJavaProject().getProject().getFullPath()); List<Object> classpathEntries = new ArrayList<>(5); List<IClasspathEntry> expanding = new ArrayList<>(5); expandProject(entry, classpathEntries, expanding, excludeTestCode, isExportedEntriesOnly(), getJavaProject(), false); IRuntimeClasspathEntry[] runtimeEntries = new IRuntimeClasspathEntry[classpathEntries.size()]; for (int i = 0; i < runtimeEntries.length; i++) { Object e = classpathEntries.get(i); if (e instanceof IClasspathEntry) { IClasspathEntry cpe = (IClasspathEntry)e; runtimeEntries[i] = new RuntimeClasspathEntry(cpe); } else { runtimeEntries[i] = (IRuntimeClasspathEntry)e; } } // remove bootpath entries - this is a default user classpath List<IRuntimeClasspathEntry> ordered = new ArrayList<>(runtimeEntries.length); for (int i = 0; i < runtimeEntries.length; i++) { if (runtimeEntries[i].getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) { ordered.add(runtimeEntries[i]); } } return ordered.toArray(new IRuntimeClasspathEntry[ordered.size()]); }
IClasspathEntry newEntry = ((CPListElement) iterator.next()) .getClasspathEntry(); entriesAsList.add(new RuntimeClasspathEntry(newEntry));
entriesAsList.add(new RuntimeClasspathEntry(newOutJar));
if (cpe == entry1) { if (isModularProject(project)) { runtimeEntries[i] = new RuntimeClasspathEntry(entry1, IRuntimeClasspathEntry.MODULE_PATH); } else { runtimeEntries[i] = new RuntimeClasspathEntry(entry1, IRuntimeClasspathEntry.CLASS_PATH); runtimeEntries[i] = new RuntimeClasspathEntry(cpe); DefaultProjectClasspathEntry.adjustClasspathProperty(runtimeEntries[i], cpe);
for (int i = 0; i < locations.length; i++) { IClasspathEntry newEntry = JavaCore.newLibraryEntry(nonDefault.get(i), null, null); locations[i] = new RuntimeClasspathEntry(newEntry); locations[i].setClasspathProperty(classpathProperty);
result[i] = new RuntimeClasspathEntry(JavaCore.newLibraryEntry(outputLocations.get(i), null, null)); result[i].setClasspathProperty(projectEntry.getClasspathProperty());
IRuntimeClasspathEntry resolved = new RuntimeClasspathEntry(cpe); resolved.setClasspathProperty(kind); IPath sourcePath = location.getSystemLibrarySourcePath();
IRuntimeClasspathEntry resolved = new RuntimeClasspathEntry(cpe); resolved.setClasspathProperty(kind); IPath sourcePath = location.getSystemLibrarySourcePath();