本文整理汇总了Java中org.eclipse.jdt.launching.IRuntimeClasspathEntry.PROJECT属性的典型用法代码示例。如果您正苦于以下问题:Java IRuntimeClasspathEntry.PROJECT属性的具体用法?Java IRuntimeClasspathEntry.PROJECT怎么用?Java IRuntimeClasspathEntry.PROJECT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.launching.IRuntimeClasspathEntry
的用法示例。
在下文中一共展示了IRuntimeClasspathEntry.PROJECT属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveClasspath0
IRuntimeClasspathEntry[] resolveClasspath0(IRuntimeClasspathEntry[] entries, ILaunchConfiguration configuration,
IProgressMonitor monitor) throws CoreException {
int scope = getArtifactScope(configuration);
Set<IRuntimeClasspathEntry> all = new LinkedHashSet<>(entries.length);
for(IRuntimeClasspathEntry entry : entries) {
if(entry.getType() == IRuntimeClasspathEntry.CONTAINER
&& MavenClasspathHelpers.isMaven2ClasspathContainer(entry.getPath())) {
addMavenClasspathEntries(all, entry, configuration, scope, monitor);
} else if(entry.getType() == IRuntimeClasspathEntry.PROJECT) {
IJavaProject javaProject = JavaRuntime.getJavaProject(configuration);
if(javaProject.getPath().equals(entry.getPath())) {
addProjectEntries(all, entry.getPath(), scope, THIS_PROJECT_CLASSIFIER, configuration, monitor);
} else {
addStandardClasspathEntries(all, entry, configuration);
}
} else {
addStandardClasspathEntries(all, entry, configuration);
}
}
return all.toArray(new IRuntimeClasspathEntry[all.size()]);
}
示例2: collectReferencedElements
private void collectReferencedElements(IJavaProject project, HashSet<JavadocLinkRef> result) throws CoreException {
IRuntimeClasspathEntry[] unresolved = JavaRuntime.computeUnresolvedRuntimeClasspath(project);
for (int i= 0; i < unresolved.length; i++) {
IRuntimeClasspathEntry curr= unresolved[i];
if (curr.getType() == IRuntimeClasspathEntry.PROJECT) {
result.add(new JavadocLinkRef(JavaCore.create((IProject) curr.getResource())));
} else {
IRuntimeClasspathEntry[] entries= JavaRuntime.resolveRuntimeClasspathEntry(curr, project);
for (int k = 0; k < entries.length; k++) {
IRuntimeClasspathEntry entry= entries[k];
if (entry.getType() == IRuntimeClasspathEntry.PROJECT) {
result.add(new JavadocLinkRef(JavaCore.create((IProject) entry.getResource())));
} else if (entry.getType() == IRuntimeClasspathEntry.ARCHIVE) {
IClasspathEntry classpathEntry= entry.getClasspathEntry();
if (classpathEntry != null) {
IPath containerPath= null;
if (curr.getType() == IRuntimeClasspathEntry.CONTAINER) {
containerPath= curr.getPath();
}
result.add(new JavadocLinkRef(containerPath, classpathEntry, project));
}
}
}
}
}
}
示例3: findGWTSdk
private GwtSdk findGWTSdk(IRuntimeClasspathEntry entry) {
GwtSdk gwtSdk = GWTPreferences.getSdkManager().findSdkForPath(entry.getPath());
if (gwtSdk != null) {
return gwtSdk;
}
/*
* If the project for which we're trying to resolve these entries is a GWT runtime project, and
* the entry that we're trying to resolve is actually the the GWT Runtime project itself, then
* we'll synthesize a contributor SDK and return that.
*/
if (entry.getType() != IRuntimeClasspathEntry.PROJECT) {
return null;
}
String entryProjectName = entry.getPath().lastSegment();
IJavaProject entryJavaProject = JavaProjectUtilities.findJavaProject(entryProjectName);
if (entryJavaProject != null && GWTProjectsRuntime.isGWTRuntimeProject(entryJavaProject)) {
gwtSdk = GWTProjectsRuntime.syntheziseContributorRuntime();
if (gwtSdk.validate().isOK()) {
return gwtSdk;
}
}
return null;
}