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


Java ArtifactUtil.getModulesIncludedInArtifacts方法代码示例

本文整理汇总了Java中com.intellij.packaging.impl.artifacts.ArtifactUtil.getModulesIncludedInArtifacts方法的典型用法代码示例。如果您正苦于以下问题:Java ArtifactUtil.getModulesIncludedInArtifacts方法的具体用法?Java ArtifactUtil.getModulesIncludedInArtifacts怎么用?Java ArtifactUtil.getModulesIncludedInArtifacts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.packaging.impl.artifacts.ArtifactUtil的用法示例。


在下文中一共展示了ArtifactUtil.getModulesIncludedInArtifacts方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: findAppEngineFacet

import com.intellij.packaging.impl.artifacts.ArtifactUtil; //导入方法依赖的package包/类
@Nullable
public static AppEngineFacet findAppEngineFacet(@NotNull Project project, @NotNull Artifact artifact) {
  final Set<Module> modules = ArtifactUtil.getModulesIncludedInArtifacts(Collections.singletonList(artifact), project);
  for (Module module : modules) {
    final AppEngineFacet appEngineFacet = AppEngineFacet.getAppEngineFacetByModule(module);
    if (appEngineFacet != null) {
      return appEngineFacet;
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:AppEngineUtil.java

示例2: loadAppEngineStandardWebXml

import com.intellij.packaging.impl.artifacts.ArtifactUtil; //导入方法依赖的package包/类
@Nullable
@Override
public XmlFile loadAppEngineStandardWebXml(@NotNull Project project, @NotNull Artifact artifact) {
  Set<Module> modules =
      ArtifactUtil.getModulesIncludedInArtifacts(Collections.singletonList(artifact), project);

  return loadAppEngineStandardWebXml(project, modules);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:9,代码来源:DefaultAppEngineAssetProvider.java

示例3: doCreateArtifactTemplate

import com.intellij.packaging.impl.artifacts.ArtifactUtil; //导入方法依赖的package包/类
public static NewArtifactConfiguration doCreateArtifactTemplate(Artifact artifact, PackagingElementResolvingContext context)
{
	Set<Module> modulesIncludedInArtifacts = ArtifactUtil.getModulesIncludedInArtifacts(Collections.singletonList(artifact), context.getProject());

	String moduleName = artifact.getName();

	for(Module modulesIncludedInArtifact : modulesIncludedInArtifacts)
	{
		ModuleRootModel rootModel = context.getModulesProvider().getRootModel(modulesIncludedInArtifact);

		JavaWebModuleExtension extension = rootModel.getExtension(JavaWebModuleExtension.class);
		if(extension != null)
		{
			moduleName = modulesIncludedInArtifact.getName();
			break;
		}
	}

	CompositePackagingElement<?> root = WarArtifactType.getInstance().createRootElement(moduleName);

	ArtifactPackagingElement artifactPackagingElement = ArtifactElementType.getInstance().createEmpty(context.getProject());
	artifactPackagingElement.setArtifactPointer(ArtifactPointerUtil.getPointerManager(context.getProject()).create(artifact));

	root.addFirstChild(artifactPackagingElement);

	return new NewArtifactConfiguration(root, WarArtifactType.getInstance().getPresentableName() + ": " + moduleName, WarArtifactType.getInstance());
}
 
开发者ID:consulo,项目名称:consulo-javaee,代码行数:28,代码来源:WarArtifactTemplate.java

示例4: createScopeForModulesInArtifacts

import com.intellij.packaging.impl.artifacts.ArtifactUtil; //导入方法依赖的package包/类
public static ModuleCompileScope createScopeForModulesInArtifacts(@NotNull Project project, @NotNull Collection<? extends Artifact> artifacts) {
  final Set<Module> modules = ArtifactUtil.getModulesIncludedInArtifacts(artifacts, project);
  return new ModuleCompileScope(project, modules.toArray(new Module[modules.size()]), true);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ArtifactCompileScope.java

示例5: createScopeForModulesInArtifacts

import com.intellij.packaging.impl.artifacts.ArtifactUtil; //导入方法依赖的package包/类
public static ModuleCompileScope createScopeForModulesInArtifacts(@Nonnull Project project, @Nonnull Collection<? extends Artifact> artifacts) {
  final Set<Module> modules = ArtifactUtil.getModulesIncludedInArtifacts(artifacts, project);
  return new ModuleCompileScope(project, modules.toArray(new Module[modules.size()]), true);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:ArtifactCompileScope.java


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