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/05 08:42:51 UTC
[PR] feat: add read-only Diagram tab for struts.xml config visualization [struts-intellij-plugin]
lukaszlenart opened a new pull request, #65:
URL: https://github.com/apache/struts-intellij-plugin/pull/65
## Summary
- Add a new lightweight **Diagram** tab for `struts.xml` files that renders packages, actions, and results in a hierarchical layout using custom Swing rendering
- The tab is independent of the deprecated `GraphBuilder` APIs and uses a toolkit-neutral model layer (`diagram/model`) that can serve as a bridge to a future `com.intellij.diagram.Provider` migration
- Includes hover tooltips (package/action/result details) and double-click-to-navigate to the corresponding XML element
## New components
| Package | Purpose |
|---------|---------|
| `diagram/model` | Toolkit-neutral DTOs: `StrutsDiagramNode`, `StrutsDiagramEdge`, `StrutsConfigDiagramModel` (snapshot builder) |
| `diagram/presentation` | Reusable tooltip HTML generation and navigation helpers |
| `diagram/ui` | Custom Swing renderer with deterministic hierarchical layout |
| `diagram/fileEditor` | `PerspectiveFileEditorProvider` + `PerspectiveFileEditor` registered in `plugin.xml` |
## Test plan
- [ ] Open a `struts.xml` file in a project with a configured Struts file set
- [ ] Verify the **Diagram** tab appears alongside **Text** (and **Graph** if enabled via JVM flag)
- [ ] Verify packages, actions, and results render as colored rounded-rect nodes in three columns
- [ ] Verify edges connect packages → actions → results with labels and arrowheads
- [ ] Hover over nodes to see tooltip HTML (action class, method, namespace, etc.)
- [ ] Double-click a node to navigate to the corresponding XML element
- [ ] Verify the tab does not appear for non-Struts XML files or JSP files
- [ ] Run `./gradlew build -x rat` to confirm compilation and existing tests pass
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: add read-only Diagram tab for struts.xml config visualization [struts-intellij-plugin]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #65:
URL: https://github.com/apache/struts-intellij-plugin/pull/65#issuecomment-4188547524
<!-- plugin-artifact-comment -->
🔌 **Plugin artifact ready for testing!**
Download from [Actions artifacts](https://github.com/apache/struts-intellij-plugin/actions/runs/23997987452#artifacts)
Artifact: `struts2-261.18970.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: add read-only Diagram tab for struts.xml config visualization [struts-intellij-plugin]
Posted by "lukaszlenart (via GitHub)" <gi...@apache.org>.
lukaszlenart merged PR #65:
URL: https://github.com/apache/struts-intellij-plugin/pull/65
--
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