Search in sources :

Example 6 with ArtifactManager

use of com.intellij.packaging.artifacts.ArtifactManager in project intellij-community by JetBrains.

the class ArtifactsWorkspaceSettings method getArtifactsToBuild.

public List<Artifact> getArtifactsToBuild() {
    final List<Artifact> result = new ArrayList<>();
    final ArtifactManager artifactManager = ArtifactManager.getInstance(myProject);
    for (String name : myState.myArtifactsToBuild) {
        ContainerUtil.addIfNotNull(result, artifactManager.findArtifact(name));
    }
    return result;
}
Also used : ArtifactManager(com.intellij.packaging.artifacts.ArtifactManager) ArrayList(java.util.ArrayList) Artifact(com.intellij.packaging.artifacts.Artifact)

Example 7 with ArtifactManager

use of com.intellij.packaging.artifacts.ArtifactManager in project intellij-community by JetBrains.

the class JavaFxModuleUtil method hasJavaFxArtifacts.

private static boolean hasJavaFxArtifacts(@NotNull Project project) {
    return CachedValuesManager.getManager(project).getCachedValue(project, () -> {
        final ArtifactManager artifactManager = ArtifactManager.getInstance(project);
        final Collection<? extends Artifact> artifacts = artifactManager.getArtifactsByType(JavaFxApplicationArtifactType.getInstance());
        return CachedValueProvider.Result.create(!artifacts.isEmpty(), artifactManager.getModificationTracker());
    });
}
Also used : ArtifactManager(com.intellij.packaging.artifacts.ArtifactManager)

Example 8 with ArtifactManager

use of com.intellij.packaging.artifacts.ArtifactManager in project intellij-community by JetBrains.

the class AppEngineCommunityWebIntegration method addLibraryToArtifact.

@Override
public void addLibraryToArtifact(@NotNull Library library, @NotNull Artifact artifact, @NotNull Project project) {
    final ArtifactManager artifactManager = ArtifactManager.getInstance(project);
    for (PackagingElement<?> element : PackagingElementFactory.getInstance().createLibraryElements(library)) {
        final String dir = element.getFilesKind(artifactManager.getResolvingContext()).containsDirectoriesWithClasses() ? "classes" : "lib";
        artifactManager.addElementsToDirectory(artifact, "WEB-INF/" + dir, element);
    }
}
Also used : ArtifactManager(com.intellij.packaging.artifacts.ArtifactManager)

Aggregations

ArtifactManager (com.intellij.packaging.artifacts.ArtifactManager)8 Artifact (com.intellij.packaging.artifacts.Artifact)5 Module (com.intellij.openapi.module.Module)2 PackagingElementResolvingContext (com.intellij.packaging.elements.PackagingElementResolvingContext)2 IDevice (com.android.ddmlib.IDevice)1 MultiValuesMap (com.intellij.openapi.util.MultiValuesMap)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 ArtifactType (com.intellij.packaging.artifacts.ArtifactType)1 PackagingElement (com.intellij.packaging.elements.PackagingElement)1 PackagingElementFactory (com.intellij.packaging.elements.PackagingElementFactory)1 FileOrDirectoryCopyPackagingElement (com.intellij.packaging.impl.elements.FileOrDirectoryCopyPackagingElement)1 ModuleOutputPackagingElement (com.intellij.packaging.impl.elements.ModuleOutputPackagingElement)1 ArrayList (java.util.ArrayList)1 AndroidFinalPackageElement (org.jetbrains.android.compiler.artifact.AndroidFinalPackageElement)1 NotNull (org.jetbrains.annotations.NotNull)1