@Override
  public void update(@NotNull AnActionEvent e) {
    final LayoutTreeSelection selection = myArtifactEditor.getLayoutTreeComponent().getSelection();
    final PackagingElementNode<?> node = selection.getNodeIfSingle();
    if (node != null) {
      final Collection<PackagingNodeSource> sources = node.getNodeSources();
      if (!sources.isEmpty()) {
        final String name = sources.iterator().next().getPresentableName();
        e.getPresentation().setVisible(true);
        e.getPresentation().setText(JavaUiBundle.message("action.hide.content.text", name, sources.size()));
        return;
      }
    }
    e.getPresentation().setVisible(false);
  }
@Override
  public void update(@NotNull AnActionEvent e)