artifact editor: create directtory/archive with parents

This commit is contained in:
nik
2009-10-29 14:49:59 +03:00
parent 502656a806
commit 6084aad0d7
11 changed files with 368 additions and 173 deletions
@@ -39,11 +39,11 @@ public abstract class CompositePackagingElementType<E extends CompositePackaging
@Nullable
public abstract E createComposite(@NotNull ArtifactEditorContext context, CompositePackagingElement<?> parent);
protected abstract PackagingElement<?> createComposite(@NotNull ArtifactEditorContext context, CompositePackagingElement<?> parent);
@NotNull
public List<? extends E> chooseAndCreate(@NotNull ArtifactEditorContext context, @NotNull Artifact artifact, @NotNull CompositePackagingElement<?> parent) {
final E composite = createComposite(context, parent);
public List<? extends PackagingElement<?>> chooseAndCreate(@NotNull ArtifactEditorContext context, @NotNull Artifact artifact, @NotNull CompositePackagingElement<?> parent) {
final PackagingElement<?> composite = createComposite(context, parent);
return composite != null ? Collections.singletonList(composite) : Collections.<E>emptyList();
}
}
@@ -57,8 +57,8 @@ public abstract class PackagingElementType<E extends PackagingElement<?>> {
public abstract boolean canCreate(@NotNull ArtifactEditorContext context, @NotNull Artifact artifact);
@NotNull
public abstract List<? extends E> chooseAndCreate(@NotNull ArtifactEditorContext context, @NotNull Artifact artifact,
@NotNull CompositePackagingElement<?> parent);
public abstract List<? extends PackagingElement<?>> chooseAndCreate(@NotNull ArtifactEditorContext context, @NotNull Artifact artifact,
@NotNull CompositePackagingElement<?> parent);
@NotNull
public abstract E createEmpty(@NotNull Project project);