问题描述
如何在我正在构建的 Eclipse 自定义 XML 编辑器中获取指向光标所在位置的 xml dom 节点和 xpath.它是一个文本编辑器.到目前为止,我正在实施 IContentAssistProcessor.
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 thus far.
推荐答案
可以获取文本编辑器中的光标,您可以实现一个存储 XML 节点的位置 使用 SAX 定位器.对于鼠标事件,您可以扫描文档并找到最佳匹配节点.我不确定它的性能如何,但这是我要开始的地方.
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.
这篇关于如何获取 Eclipse 中光标所在位置的 XML Dom 节点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)