How do I get the XML Dom node of where my cursor is in Eclipse?

后端 未结 1 1447
栀梦
栀梦 2021-01-28 14:28

How do I get the xml dom node and xpath to where my cursor is in an Eclipse custom XML editor that I am building. It is a textEditor. I am implementing IContentAssistProcessor t

相关标签:
1条回答
  • 2021-01-28 15:10

    You can get the position of the cursor in the text editor and you can implement an XML reader that stores the locations of the XML nodes using the SAX Locator. For a mouse event, you could then scan the document and find the best matching node. I am not sure how performant this is but this is where I would start.

    0 讨论(0)
提交回复
热议问题