private Set<String> getCustomClasspath(ILaunchConfiguration configuration, String attribute) throws CoreException { IRuntimeClasspathEntry[] entries = provider .computeUnresolvedCustomClasspath(configuration, attribute); List<IRuntimeClasspathEntry> result = Arrays.asList(JavaRuntime.resolveRuntimeClasspath(entries, configuration)); Set<String> set = new HashSet<String>(result.size()); for (int i = 0; i < result.size(); i++) { String location = result.get(i).getLocation(); if (location != null) { if (!set.contains(location)) { set.add(location); } } } return set; }
List<IRuntimeClasspathEntry> childs = RunJettyRunClasspathUtil.getProjectClasspathsForUserlibs( project, false); IRuntimeClasspathEntry[] childSolvedEntry = JavaRuntime.resolveRuntimeClasspath( childs.toArray(new IRuntimeClasspathEntry[0]), configuration); all.addAll(Arrays.asList(childSolvedEntry));
public String[] getResolvedJettyClasspath(ILaunchConfiguration configuration) throws CoreException { IRuntimeClasspathEntry[] entries = JavaRuntime .computeUnresolvedRuntimeClasspath(configuration); entries = JavaRuntime.resolveRuntimeClasspath(filterProejctEntries(entries), configuration); List<String> userEntries = new ArrayList<String>(entries.length); Set<String> set = new HashSet<String>(entries.length); for (int i = 0; i < entries.length; i++) { if (entries[i].getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) { String location = entries[i].getLocation(); if (location != null) { if (!set.contains(location)) { userEntries.add(location); set.add(location); } } } } return (String[]) userEntries.toArray(new String[userEntries.size()]); }
.resolveRuntimeClasspath( bootEntriesAppend .toArray(new IRuntimeClasspathEntry[bootEntriesAppend
private static IPath[] getClasspath(ILaunchConfiguration configuration) throws CoreException { IRuntimeClasspathEntry[] entries= JavaRuntime.computeUnresolvedRuntimeClasspath(configuration); entries= JavaRuntime.resolveRuntimeClasspath(entries, configuration); ArrayList<IPath> userEntries= new ArrayList<>(entries.length); for (int i= 0; i < entries.length; i++) { if (entries[i].getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) { String location= entries[i].getLocation(); if (location != null) { IPath entry= Path.fromOSString(location); if (!userEntries.contains(entry)) { userEntries.add(entry); } } } } return userEntries.toArray(new IPath[userEntries.size()]); }
private static IPath[] getClasspath(ILaunchConfiguration configuration) throws CoreException { IRuntimeClasspathEntry[] entries= JavaRuntime.computeUnresolvedRuntimeClasspath(configuration); entries= JavaRuntime.resolveRuntimeClasspath(entries, configuration); ArrayList<IPath> userEntries= new ArrayList<>(entries.length); for (int i= 0; i < entries.length; i++) { if (entries[i].getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) { String location= entries[i].getLocation(); if (location != null) { IPath entry= Path.fromOSString(location); if (!userEntries.contains(entry)) { userEntries.add(entry); } } } } return userEntries.toArray(new IPath[userEntries.size()]); }
IRuntimeClasspathEntry[] entries = JavaRuntime .computeUnresolvedRuntimeClasspath(configuration); entries = JavaRuntime.resolveRuntimeClasspath(entries, configuration); List<String> userEntries = new ArrayList<String>(entries.length); Set<String> set = new HashSet<String>(entries.length);
IRuntimeClasspathEntry[] entries = JavaRuntime .computeUnresolvedRuntimeClasspath(configuration); entries = JavaRuntime.resolveRuntimeClasspath(entries, configuration);
protected IPath[] getClasspath(ILaunchConfiguration configuration) throws CoreException { IRuntimeClasspathEntry[] entries= JavaRuntime.computeUnresolvedRuntimeClasspath(configuration); entries= JavaRuntime.resolveRuntimeClasspath(entries, configuration); boolean isModularConfig= JavaRuntime.isModularConfiguration(configuration); ArrayList<IPath> userEntries= new ArrayList<>(entries.length); for (int i= 0; i < entries.length; i++) { int classPathProperty= entries[i].getClasspathProperty(); if ((!isModularConfig && classPathProperty == IRuntimeClasspathEntry.USER_CLASSES) || (isModularConfig && (classPathProperty == IRuntimeClasspathEntry.CLASS_PATH || classPathProperty == IRuntimeClasspathEntry.MODULE_PATH))) { String location= entries[i].getLocation(); if (location != null) { IPath entry= Path.fromOSString(location); if (!userEntries.contains(entry)) { userEntries.add(entry); } } } } return userEntries.toArray(new IPath[userEntries.size()]); }
private static IPath[] getClasspath(ILaunchConfiguration configuration) throws CoreException { IRuntimeClasspathEntry[] entries= JavaRuntime.computeUnresolvedRuntimeClasspath(configuration); entries= JavaRuntime.resolveRuntimeClasspath(entries, configuration); ArrayList<IPath> userEntries= new ArrayList<>(entries.length); boolean isModularConfig= JavaRuntime.isModularConfiguration(configuration); for (int i= 0; i < entries.length; i++) { int classPathProperty= entries[i].getClasspathProperty(); if ((!isModularConfig && classPathProperty == IRuntimeClasspathEntry.USER_CLASSES) || (isModularConfig && (classPathProperty == IRuntimeClasspathEntry.CLASS_PATH || classPathProperty == IRuntimeClasspathEntry.MODULE_PATH))) { String location= entries[i].getLocation(); if (location != null) { IPath entry= Path.fromOSString(location); if (!userEntries.contains(entry)) { userEntries.add(entry); } } } } return userEntries.toArray(new IPath[userEntries.size()]); }
entries = JavaRuntime.resolveRuntimeClasspath(entries, config); String[][] path = new String[2][entries.length]; List<String> classpathEntries = new ArrayList<>(entries.length);
private static IPath[] getClasspath(ILaunchConfiguration configuration) throws CoreException { IRuntimeClasspathEntry[] entries= JavaRuntime.computeUnresolvedRuntimeClasspath(configuration); entries= JavaRuntime.resolveRuntimeClasspath(entries, configuration); boolean isModularConfig= JavaRuntime.isModularConfiguration(configuration); ArrayList<IPath> userEntries= new ArrayList<>(entries.length); for (int i= 0; i < entries.length; i++) { int classPathProperty= entries[i].getClasspathProperty(); if ((!isModularConfig && classPathProperty == IRuntimeClasspathEntry.USER_CLASSES) || (isModularConfig && (classPathProperty == IRuntimeClasspathEntry.CLASS_PATH || classPathProperty == IRuntimeClasspathEntry.MODULE_PATH))) { String location= entries[i].getLocation(); if (location != null) { IPath entry= Path.fromOSString(location); if (!userEntries.contains(entry)) { userEntries.add(entry); } } } } return userEntries.toArray(new IPath[userEntries.size()]); }
/** * Override getClasspath so that we also include the load time weaving * aspectpath */ public String[] getClasspath(ILaunchConfiguration configuration) throws CoreException { IRuntimeClasspathEntry[] entries = JavaRuntime .computeUnresolvedRuntimeClasspath(configuration); IRuntimeClasspathEntry[] aspectPathEntries = getAspectPathEntries(configuration); entries = JavaRuntime.resolveRuntimeClasspath(entries, configuration); List userEntries = new ArrayList(entries.length + aspectPathEntries.length); for (int i = 0; i < entries.length; i++) { if (entries[i].getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) { String location = entries[i].getLocation(); if (location != null) { userEntries.add(location); } } } for (int i = 0; i < aspectPathEntries.length; i++) { String location = aspectPathEntries[i].getLocation(); if (location != null) { userEntries.add(location); } } return (String[]) userEntries.toArray(new String[userEntries.size()]); }
@Override protected IPath[] getClasspath(ILaunchConfiguration configuration) throws CoreException { IRuntimeClasspathEntry[] entries = AbstractSARLLaunchConfigurationDelegate.computeUnresolvedSARLRuntimeClasspath( configuration, this.configAccessor, cfg -> getJavaProject(cfg)); entries = JavaRuntime.resolveRuntimeClasspath(entries, configuration); final boolean isModularConfig = JavaRuntime.isModularConfiguration(configuration); final List<IPath> userEntries = new ArrayList<>(entries.length); for (int i = 0; i < entries.length; i++) { final int classPathProperty = entries[i].getClasspathProperty(); if ((!isModularConfig && classPathProperty == IRuntimeClasspathEntry.USER_CLASSES) || (isModularConfig && (classPathProperty == IRuntimeClasspathEntry.CLASS_PATH || classPathProperty == IRuntimeClasspathEntry.MODULE_PATH))) { final String location = entries[i].getLocation(); if (location != null) { final IPath entry = Path.fromOSString(location); if (!userEntries.contains(entry)) { userEntries.add(entry); } } } } return userEntries.toArray(new IPath[userEntries.size()]); }
entries = JavaRuntime.resolveRuntimeClasspath(entries, configuration); final List<String> bootEntries = new ArrayList<>(entries.length); boolean empty = true;
entries = JavaRuntime.resolveRuntimeClasspath(entries, configuration); List<String> bootEntries = new ArrayList<String>(entries.length); boolean empty = true;
index = pair.getValue().intValue(); final IRuntimeClasspathEntry[] bootEntriesPrep = JavaRuntime .resolveRuntimeClasspath( bootEntriesPrepend .toArray(new IRuntimeClasspathEntry[bootEntriesPrepend
entries = JavaRuntime.resolveRuntimeClasspath(entries, configuration);
entries = JavaRuntime.resolveRuntimeClasspath(entries, configuration); List<String> bootEntries = new ArrayList<>(entries.length); boolean empty = true;
/** * Returns a collection with all dependencies of the Java project itself. * * @param adapter the confiugration adapter * @return a collection of dependencies * @throws CoreException on occasion */ public Collection<Dependency> getOriginalClasspathEntries(JettyLaunchConfigurationAdapter adapter) throws CoreException { @SuppressWarnings("unchecked") Collection<Dependency> result = (Collection<Dependency>) getCached("OriginalClasspathEntries", adapter); //$NON-NLS-1$ if (result != null) { return result; } IRuntimeClasspathEntry[] entries = JavaRuntime.computeUnresolvedRuntimeClasspath(adapter.getConfiguration()); entries = JavaRuntime.resolveRuntimeClasspath(entries, adapter.getConfiguration()); MavenDependencyInfoMap mavenScopeCollection = new MavenDependencyInfoMap(adapter, entries); Set<Dependency> scopedClasspathEntries = new LinkedHashSet<Dependency>(); for (IRuntimeClasspathEntry entry : entries) { scopedClasspathEntries.add(Dependency.create(mavenScopeCollection, entry)); } result = Collections.unmodifiableCollection(userClasses().match(scopedClasspathEntries)); putCached("OriginalClasspathEntries", adapter, result); //$NON-NLS-1$ return result; }