lukaszlenart opened a new issue, #127: URL: https://github.com/apache/struts-intellij-plugin/issues/127
## Context Follow-up from manual smoke after [#122](https://github.com/apache/struts-intellij-plugin/issues/122) / [#124](https://github.com/apache/struts-intellij-plugin/pull/124). When reopening a project that already had a Diagram open, the Diagram shows empty. Closing and reopening the Diagram then shows the correct elements. ## Stack trace (excerpt) ``` com.intellij.openapi.project.IndexNotReadyException at com.intellij.psi.stubs.StubIndexEx.processElements(...) at com.intellij.psi.impl.java.stubs.index.JavaFullClassNameIndex.getClasses(...) at com.intellij.util.xml.DomJavaUtil.findClass(...) at com.intellij.struts2.dom.struts.impl.ExtendableClassConverterImpl.fromString(...) at com.intellij.struts2.dom.struts.impl.ActionImpl.searchActionClass(...) at com.intellij.struts2.diagram.presentation.StrutsDiagramPresentation.computeTooltipHtml(...) at com.intellij.struts2.diagram.model.StrutsConfigDiagramModel.createNode(...) at com.intellij.struts2.diagram.model.StrutsConfigDiagramModel.build(...) at com.intellij.struts2.diagram.fileEditor.Struts2DiagramFileEditor.lambda$scheduleModelBuild$0(...) ``` ## Root cause (likely) Model build runs in a non-blocking read action during **dumb mode** (indexes not ready). Tooltip construction resolves action classes via DOM converters / `JavaPsiFacade.findClass`, which throws `IndexNotReadyException`. That aborts `StrutsConfigDiagramModel.build`, leaving an empty diagram until a later rebuild after indexes are ready. ## Acceptance criteria - [ ] Reopening a project with a previously open Diagram does not leave a permanently empty diagram once indexes finish (auto-retry / dumb-aware deferral) - [ ] Model build must not call index-dependent APIs during dumb mode without handling `IndexNotReadyException` (or avoid class resolution in `computeTooltipHtml` until smart mode) - [ ] Closing/reopening Diagram is no longer required as a workaround - [ ] Show Diagram path checked for the same dumb-mode failure (stack currently points at Swing `Struts2DiagramFileEditor`, but snapshot build is shared) ## Notes - Prefer dumb-aware scheduling (`DumbService.runWhenSmart` / expire+retry) or make tooltip/class resolution optional during dumb mode so nodes still appear. - Related presentation code: `StrutsDiagramPresentation.computeTooltipHtml`, `StrutsConfigDiagramModel.createNode` / `build`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
