lukaszlenart opened a new issue, #121:
URL: https://github.com/apache/struts-intellij-plugin/issues/121

   ## Context
   
   Follow-up to 
[#117](https://github.com/apache/struts-intellij-plugin/issues/117) / 
[#119](https://github.com/apache/struts-intellij-plugin/pull/119).
   
   `StrutsDiagramApiNode` already overrides `navigate()` to call 
`StrutsDiagramPresentation.navigateToElement()`, but in practice Show Diagram 
nodes are not clickable to the corresponding line in `struts.xml`. The Swing 
Diagram tab still navigates correctly.
   
   Likely cause: platform source actions expect 
`DiagramExtras.isSourceActionsImplemented()` and a `PsiElement` from the 
element manager (`getItemDocOwner` / similar), not only 
`DiagramNode.navigate()`.
   
   ## Proposal
   
   Wire Jump to Source / double-click through Diagrams APIs:
   
   1. Provide `DiagramExtras` with `isSourceActionsImplemented() == true`
   2. Expose the XML element from the snapshot navigation pointer via the 
element manager
   3. Verify double-click and any Source toolbar/context actions open the 
correct offset in `struts.xml`
   
   ## Acceptance criteria
   
   - [ ] Double-click (or platform Jump to Source) on a package/action/result 
node navigates to the XML element
   - [ ] Stale/missing navigation pointers no-op safely (existing presentation 
behavior)
   - [ ] Swing Diagram tab navigation remains unchanged
   
   ## References
   
   - `StrutsDiagramApiNode#navigate` / `#canNavigate`
   - `StrutsDiagramPresentation#navigateToElement`
   - `DiagramExtras#isSourceActionsImplemented`
   - `DiagramElementManager#getItemDocOwner`


-- 
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]

Reply via email to