void (@NotNull AnActionEvent e) { Project project = getEventProject(e); Editor editor = e.getData(CommonDataKeys.EDITOR); PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE); if (project == null || editor == null || psiFile == null) return; Pair<VirtualFile, String> fileAndClassName = getJvmFileAndClassName(editor, psiFile); if (fileAndClassName == null) { IdeUiService.getInstance().showErrorHint(editor, DevKitBundle.message("action.ShowSerializedXml.message.caret.must.be.at.class.identifier")); return; } VirtualFile virtualFile = fileAndClassName.first; String className = fileAndClassName.second; final Module module = ModuleUtilCore.findModuleForFile(virtualFile, project); if (module == null) { IdeUiService.getInstance().showErrorHint(editor, DevKitBundle.message("action.ShowSerializedXml.message.caret.must.be.at.class.identifier")); return; } CompilerManager.getInstance(project).make(new FileSetCompileScope(Collections.singletonList(virtualFile), new Module[]{module}), new CompileStatusNotification() { @Override public void finished(boolean aborted, int errors, int warnings, @NotNull CompileContext compileContext) { if (aborted || errors > 0) return; generateAndShowXml(module, className); } }); }