configuring context artifact for javaee facets & resolving in javaee facets via artifacts

This commit is contained in:
Nikolay Chashnikov
2009-09-22 12:25:35 +04:00
parent fb4f029c09
commit 05e1dad36c
6 changed files with 9 additions and 15 deletions
@@ -64,7 +64,7 @@ public class BuildRecipeImpl implements BuildRecipe {
public void addFileCopyInstruction(@NotNull File file,
boolean isDirectory,
@NotNull Module module,
Module module,
String outputRelativePath,
@Nullable PackagingFileFilter fileFilter) {
addInstruction(new FileCopyInstructionImpl(file, isDirectory, module, DeploymentUtil.trimForwardSlashes(outputRelativePath),fileFilter));
@@ -238,7 +238,7 @@ public class DeploymentUtilImpl extends DeploymentUtil {
public final boolean addItemsRecursively(@NotNull BuildRecipe items,
@NotNull File root,
@NotNull Module module,
Module module,
String outputRelativePath,
@Nullable PackagingFileFilter fileFilter,
@Nullable String possibleBaseOutputPath) {
@@ -513,12 +513,4 @@ public class DeploymentUtilImpl extends DeploymentUtil {
public static BuildParticipantProvider<?>[] getBuildParticipantProviders() {
return Extensions.getExtensions(BuildParticipantProvider.EXTENSION_POINT_NAME);
}
public static BuildParticipant[] getAllBuildParticipants(@NotNull Module module) {
List<BuildParticipant> participants = new ArrayList<BuildParticipant>();
for (BuildParticipantProvider<?> participantProvider : getBuildParticipantProviders()) {
participants.addAll(participantProvider.getParticipants(module));
}
return participants.toArray(new BuildParticipant[participants.size()]);
}
}
@@ -109,7 +109,7 @@ public class ArtifactUtil {
final boolean processSubstitutions,
ArtifactType artifactType,
FList<CompositePackagingElement<?>> parents, Set<PackagingElement<?>> processed) {
if (!processed.add(element)) {
if (!processor.shouldProcess(element) || !processed.add(element)) {
return true;
}
if (type == null || element.getType().equals(type)) {
@@ -13,11 +13,14 @@ import java.util.List;
* @author nik
*/
public abstract class PackagingElementProcessor<E extends PackagingElement<?>> {
public boolean shouldProcessSubstitution(ComplexPackagingElement<?> element) {
return true;
}
public boolean shouldProcess(PackagingElement<?> element) {
return true;
}
public abstract boolean process(@NotNull List<CompositePackagingElement<?>> parents, @NotNull E e);
protected final String getPathFromRoot(List<CompositePackagingElement<?>> parents, String separator) {
@@ -16,7 +16,6 @@
package com.intellij.openapi.compiler.make;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.vfs.VirtualFileFilter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -31,7 +30,7 @@ public interface BuildRecipe {
void addAll(@NotNull BuildRecipe buildRecipe);
void addFileCopyInstruction(@NotNull File file,
boolean isDirectory,
@NotNull Module module,
Module module,
String outputRelativePath,
@Nullable PackagingFileFilter fileFilter);
}
@@ -66,7 +66,7 @@ public abstract class DeploymentUtil {
public abstract boolean addItemsRecursively(@NotNull BuildRecipe items,
@NotNull File root,
@NotNull Module module,
Module module,
String outputRelativePath,
@Nullable PackagingFileFilter fileFilter,
@Nullable String possibleBaseOutputPath);