mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
decoupling Google AppEngine facet from Web facet
This commit is contained in:
@@ -564,6 +564,32 @@ public class ArtifactUtil {
|
||||
return modules;
|
||||
}
|
||||
|
||||
public static Collection<Artifact> getArtifactsContainingModuleOutput(@NotNull final Module module) {
|
||||
ArtifactManager artifactManager = ArtifactManager.getInstance(module.getProject());
|
||||
final PackagingElementResolvingContext context = artifactManager.getResolvingContext();
|
||||
final Set<Artifact> result = new HashSet<Artifact>();
|
||||
Processor<PackagingElement<?>> processor = new Processor<PackagingElement<?>>() {
|
||||
@Override
|
||||
public boolean process(@NotNull PackagingElement<?> element) {
|
||||
if (element instanceof ProductionModuleOutputPackagingElement
|
||||
&& module.equals(((ProductionModuleOutputPackagingElement)element).findModule(context))) {
|
||||
return false;
|
||||
}
|
||||
if (element instanceof ArtifactPackagingElement && result.contains(((ArtifactPackagingElement)element).findArtifact(context))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
for (Artifact artifact : artifactManager.getSortedArtifacts()) {
|
||||
boolean contains = !processPackagingElements(artifact, null, processor, context, true);
|
||||
if (contains) {
|
||||
result.add(artifact);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static List<Artifact> getArtifactWithOutputPaths(Project project) {
|
||||
final List<Artifact> result = new ArrayList<Artifact>();
|
||||
for (Artifact artifact : ArtifactManager.getInstance(project).getSortedArtifacts()) {
|
||||
|
||||
Reference in New Issue
Block a user