本文整理汇总了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;
}
示例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);
}
示例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());
}
示例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);
}
示例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);
}