@NotNull
  public static List<? extends Artifact> getAvailableArtifacts(@NotNull final ArtifactEditorContext context,
                                                               @NotNull final Artifact artifact,
                                                               final boolean notIncludedOnly) {
    final Set<Artifact> result = ContainerUtil.newHashSet(context.getArtifactModel().getArtifacts());
    if (notIncludedOnly) {
      ArtifactUtil.processPackagingElements(artifact, ARTIFACT_ELEMENT_TYPE, artifactPackagingElement -> {
        result.remove(artifactPackagingElement.findArtifact(context));
        return true;
      }, context, true);
    }
    result.remove(artifact);
    final Iterator<Artifact> iterator = result.iterator();
    while (iterator.hasNext()) {
      Artifact another = iterator.next();
      final boolean notContainThis =
          ArtifactUtil.processPackagingElements(another, ARTIFACT_ELEMENT_TYPE,
                                                element -> !artifact.getName().equals(element.getArtifactName()), context, true);
      if (!notContainThis) {
        iterator.remove();
      }
    }
    final ArrayList<Artifact> list = new ArrayList<>(result);
    list.sort(ArtifactManager.ARTIFACT_COMPARATOR);
    return list;
  }
@NotNull
  public static List<? extends Artifact> getAvailableArtifacts(@NotNull final ArtifactEditorContext context,
                                                               @NotNull final Artifact artifact,
                                                               final boolean notIncludedOnly)