void (@NotNull AnActionEvent e) { ThumbnailView view = ThumbnailViewActionUtil.getVisibleThumbnailView(e); if (view != null) { VirtualFile[] selection = view.getSelection(); if (selection.length > 0) { String tag = Messages.showInputDialog("", IdeBundle.message("dialog.title.new.tag.name"), null); if (tag != null) { for (VirtualFile file : selection) { tagManager.addTag(tag, file); } } } } }