当前位置: 首页>>代码示例>>Java>>正文


Java IRuntimeClasspathEntry.PROJECT属性代码示例

本文整理汇总了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()]);
}
 
开发者ID:fbricon,项目名称:wildfly-hive,代码行数:21,代码来源:MavenRuntimeClasspathProvider.java

示例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));
					}
				}
			}
		}
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:26,代码来源:JavadocStandardWizardPage.java

示例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;
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:29,代码来源:RuntimeClasspathEntryResolver.java


注:本文中的org.eclipse.jdt.launching.IRuntimeClasspathEntry.PROJECT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。