You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@struts.apache.org by "lukaszlenart (via GitHub)" <gi...@apache.org> on 2026/04/09 05:42:30 UTC

[PR] feat(diagram): resolve chain/redirect results as action-to-action edges [struts-intellij-plugin]

lukaszlenart opened a new pull request, #76:
URL: https://github.com/apache/struts-intellij-plugin/pull/76

   ## Summary
   
   - Extend the Struts config diagram to resolve `redirectAction`, `chain`, and `redirect-action` result types into direct action→action edges instead of showing "(unresolved path)" RESULT nodes
   - When a result target resolves to an action in the same file, an action→action edge is drawn; external/unresolvable targets fall back to a labeled RESULT node
   - Action→action edges are rendered as dashed curves that depart from the source action's right edge, loop below both nodes, and arrive at the target action's left edge — visually distinguishing them from the normal left-to-right action→result flow
   - Model building is now asynchronous (`ReadAction.nonBlocking`) to prevent write-intent lock violations on project open
   
   ### Changes
   
   | File | What |
   |------|------|
   | `StrutsConfigDiagramModel.java` | Two-pass build: resolve chain/redirect targets via body text or `actionName`/`namespace` params; emit action→action edges for same-file targets |
   | `Struts2DiagramFileEditor.java` | Async model building via `ReadAction.nonBlocking().finishOnUiThread()` |
   | `Struts2DiagramComponent.java` | Split edge painting into cross-column and same-column; same-column uses dashed right→left loop |
   | `StrutsConfigDiagramModelTest.java` | Tests for body-based and param-based `redirectAction` resolution |
   | `struts-redirect-body.xml` | Test fixture: `redirectAction` with target in tag body |
   | `struts-redirect-param.xml` | Test fixture: `redirectAction` with `<param name="actionName">` |
   
   ## Test plan
   
   - [x] `StrutsConfigDiagramModelTest.testRedirectActionBodyCreatesActionToActionEdge` — verifies body-based redirect creates action→action edge
   - [x] `StrutsConfigDiagramModelTest.testRedirectActionParamCreatesActionToActionEdge` — verifies param-based redirect creates action→action edge
   - [x] All existing diagram tests continue to pass
   - [ ] Manual: open a struts.xml with `redirectAction` results in the Diagram tab and verify the dashed right-to-left edge renders correctly
   
   
   Made with [Cursor](https://cursor.com)


-- 
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: notifications-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(diagram): resolve chain/redirect results as action-to-action edges [struts-intellij-plugin]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #76:
URL: https://github.com/apache/struts-intellij-plugin/pull/76#issuecomment-4211722299

   <!-- plugin-artifact-comment -->
   🔌 **Plugin artifact ready for testing!**
   
   Download from [Actions artifacts](https://github.com/apache/struts-intellij-plugin/actions/runs/24174525927#artifacts)
   
   Artifact: `struts2-261.19017.1`


-- 
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: notifications-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(diagram): resolve chain/redirect results as action-to-action edges [struts-intellij-plugin]

Posted by "lukaszlenart (via GitHub)" <gi...@apache.org>.
lukaszlenart merged PR #76:
URL: https://github.com/apache/struts-intellij-plugin/pull/76


-- 
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: notifications-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org