IDEADEV-41116: exploded war artefact: add warning for dependent module

This commit is contained in:
nik
2009-11-24 10:04:41 +03:00
parent edf009f943
commit 0744f7d6c8
2 changed files with 10 additions and 1 deletions
@@ -15,9 +15,10 @@
*/
package com.intellij.packaging.ui;
import org.jetbrains.annotations.NotNull;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.packaging.elements.CompositePackagingElement;
import org.jetbrains.annotations.NotNull;
import java.util.List;
@@ -29,5 +30,7 @@ public interface ArtifactEditor {
void putLibraryIntoDefaultLocation(@NotNull Library library);
void putModuleIntoDefaultLocation(@NotNull Module module);
void addToClasspath(CompositePackagingElement<?> element, List<String> classpath);
}
@@ -22,11 +22,13 @@ import com.intellij.ide.impl.TypeSafeDataProviderAdapter;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.compiler.CompilerBundle;
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectBundle;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.roots.ui.configuration.artifacts.actions.*;
import com.intellij.openapi.roots.ui.configuration.artifacts.sourceItems.LibrarySourceItem;
import com.intellij.openapi.roots.ui.configuration.artifacts.sourceItems.ModuleOutputSourceItem;
import com.intellij.openapi.roots.ui.configuration.artifacts.sourceItems.SourceItemsTree;
import com.intellij.openapi.ui.FixedSizeButton;
import com.intellij.openapi.ui.Splitter;
@@ -380,6 +382,10 @@ public class ArtifactEditorImpl implements ArtifactEditorEx {
myLayoutTreeComponent.putIntoDefaultLocations(Collections.singletonList(new LibrarySourceItem(library)));
}
public void putModuleIntoDefaultLocation(@NotNull Module module) {
myLayoutTreeComponent.putIntoDefaultLocations(Collections.singletonList(new ModuleOutputSourceItem(module)));
}
public void addToClasspath(final CompositePackagingElement<?> element, List<String> classpath) {
myLayoutTreeComponent.saveElementProperties();
ManifestFileConfiguration manifest = myContext.getManifestFile(element, getArtifact().getArtifactType());