void (@NotNull AnActionEvent e) { VirtualFile svgFile = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE); try { Image image = SVGLoader.load(new File(svgFile.getPath()).toURI().toURL(), 1f); String path = svgFile.getPath(); File outputFile = new File(path + ".png"); ImageIO.write((BufferedImage)image, "png", outputFile); VfsUtil.markDirtyAndRefresh(true, false, false, outputFile); } catch (IOException ex) { LOG.error(ex); } }