import org.jetbrains.annotations.NotNull;
public class MarkAsPlainTextAction extends AnAction {
@Override
public void actionPerformed(AnActionEvent e) {
DataContext dataContext = e.getDataContext();
<BUG>final VirtualFile file = PlatformDataKeys.VIRTUAL_FILE.getData(dataContext);

if (file == null || file.isDirectory()) return;

markAsPlainText(file);
}</BUG>
private static void markAsPlainText(@NotNull VirtualFile file) {

import org.jetbrains.annotations.NotNull;
public class MarkAsPlainTextAction extends AnAction {
@Override
public void actionPerformed(AnActionEvent e) {
DataContext dataContext = e.getDataContext();
final VirtualFile[] selectedFiles = PlatformDataKeys.VIRTUAL_FILE_ARRAY.getData(dataContext);
if (selectedFiles == null || selectedFiles.length == 0) return;
for (VirtualFile file : selectedFiles) {
if (file != null && !file.isDirectory()) {
markAsPlainText(file);
}
}
}
private static void markAsPlainText(@NotNull VirtualFile file) {
