@Override
  public void actionPerformed(@NotNull AnActionEvent e) {
    final String pathForClasses = myArtifactEditor.getArtifact().getArtifactType().getDefaultPathFor(PackagingElementOutputKind.DIRECTORIES_WITH_CLASSES);
    if (pathForClasses != null) {
      final List<PackagingElement<?>> extracted = new ArrayList<>();
      for (PackagingSourceItem item : mySourceItemsTree.getSelectedItems()) {
        final ArtifactEditorContext context = myArtifactEditor.getContext();
        final List<? extends PackagingElement<?>> elements = item.createElements(context);
        ArtifactUtil.processElementsWithSubstitutions(elements, context, context.getArtifactType(), PackagingElementPath.EMPTY,
                                                      new PackagingElementProcessor<>() {
                                                        @Override
                                                        public boolean process(@NotNull PackagingElement<?> element,
                                                                               @NotNull PackagingElementPath path) {
                                                          if (element instanceof FileCopyPackagingElement) {
                                                            final VirtualFile file = ((FileCopyPackagingElement)element).findFile();
                                                            if (file != null) {
                                                              final VirtualFile jarRoot =
                                                                JarFileSystem.getInstance().getJarRootForLocalFile(file);
                                                              if (jarRoot != null) {
                                                                extracted.add(
                                                                  PackagingElementFactory.getInstance().createExtractedDirectory(jarRoot));
                                                              }
                                                            }
                                                          }
                                                          return true;
                                                        }
                                                      });
      }
      myArtifactEditor.getLayoutTreeComponent().putElements(pathForClasses, extracted);
    }
  }
@Override
  public void actionPerformed(@NotNull AnActionEvent e)