apache / apache/struts-intellij-plugin
Diagram tab: sync selection with XML perspective
- Dominant language
- Java
- Stars
- 5
- Forks
- 3
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 2
Description
## Context
The Graph tab supported **graph selection → DOM** via `getSelectedDomElements()`, feeding the shared `PerspectiveFileEditor` selection.
The Diagram tab returns `null` / no-op for both `getSelectedDomElement()` and `setSelectedDomElement()`.
Note: Graph's reverse sync (XML → graph highlight) was stubbed with a TODO and never worked — this is an opportunity to implement both directions properly.
## Proposal
Bidirectional selection sync between the Diagram canvas and the XML perspective editor.
## Acceptance criteria
- [ ] Clicking a diagram node selects/highlights the corresponding DOM element in the XML perspective
- [ ] Selecting an action/result/package in the XML tree highlights the matching diagram node (when visible)
- [ ] Single-click selects; double-click continues to navigate (current behavior)
- [ ] Works for package, action, and result nodes
## References
- `Struts2DiagramFileEditor.getSelectedDomElement()` / `setSelectedDomElement()` — currently no-ops
- `Struts2GraphFileEditor` — had partial graph → DOM sync
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with Struts2DiagramFileEditor.getSelectedDomElement() and setSelectedDomElement(), then compare their no-op behavior with Struts2GraphFileEditor and the shared PerspectiveFileEditor selection. Trace the existing single- and double-click handling and XML-tree selection flow. Done means package, action, and result selections synchronize in both directions, while double-click navigation remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100