Skip to content

feat: auto-refresh Diagram tab on struts.xml DOM changes - #101

Merged
lukaszlenart merged 5 commits into
mainfrom
feat/diagram-auto-refresh-97
Jun 25, 2026
Merged

feat: auto-refresh Diagram tab on struts.xml DOM changes#101
lukaszlenart merged 5 commits into
mainfrom
feat/diagram-auto-refresh-97

Conversation

@lukaszlenart

@lukaszlenart lukaszlenart commented Jun 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Register a debounced DomEventListener in Struts2DiagramFileEditor that rebuilds the diagram when the same struts.xml file changes while the Diagram tab is active
  • Refresh immediately on tab activation (selectNotify) so edits made on the Text tab are reflected without reopening the file
  • Filter DOM events to the editor's file only; skip UI updates when the tab is inactive

Closes #97

Test plan

  • ./gradlew test -x rat — full suite passes
  • Struts2DiagramFileEditorDomFilterTest — same-file / cross-file / null filtering
  • Struts2DiagramFileEditorProviderTest — lifecycle (selectNotify/deselectNotify, reset)
  • Manual: ./gradlew runIde — edit on Text tab, switch to Diagram; edit while on Diagram tab (300 ms debounce)

Made with Cursor

lukaszlenart and others added 5 commits June 25, 2026 17:51
Extract isDomElementInFile for unit testing before wiring the listener.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Register a debounced DomEventListener while the Diagram tab is active
and rebuild immediately on tab selection. Closes #97.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Document the brainstorming output and task plan for issue #97.

Co-authored-by: Cursor <cursoragent@cursor.com>
@lukaszlenart
lukaszlenart enabled auto-merge (squash) June 25, 2026 18:37
@github-actions

Copy link
Copy Markdown
Contributor

🔌 Plugin artifact ready for testing!

Download from Actions artifacts

Artifact: struts2-261.19027.1

@lukaszlenart
lukaszlenart merged commit 45db4e4 into main Jun 25, 2026
5 checks passed
@lukaszlenart
lukaszlenart deleted the feat/diagram-auto-refresh-97 branch June 25, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Diagram tab: auto-refresh when struts.xml DOM changes

1 participant