创建 Eclipse 插件以显示内容辅助,无论光标位置如何
我正在使用 Java 跨 XML 文件进行一些反射工作。如果我能让内容辅助像侧面小窗口中的一棵树一样运行,但比我当前的光标位置更有效,那么该过程将会更快并且更不容易出错。
我的问题是,这真的可以在不重新发明轮子的情况下完成吗?本质上,我想显示类列表,选择一个类,然后向下钻取一个 TreeView,类似于 Eclipse 为当前打开的文件提供的大纲视图,在某个时刻,我单击下面的按钮,它会生成我想要的 XML 格式文本手动输入,这是根据我突出显示的树中的任何内容生成的。
我已经设计并开始了前端和后端的工作,但一直困扰着我的是利用 Eclipse 的内容辅助来收集我在给定项目中可能调用的几乎所有内容的列表。
这可以做到吗?这几天我一直在梳理 Eclipse 的文档,反复与源代码下载半途而废的情况作斗争。
I'm working on some reflection stuff using Java across XML files. The process would be made much faster and less prone to error if I could get content assist to behave like a tree in a small window off to the side, but more than by my current cursor location.
My question is can this really be done without reinventing the wheel too much? Essentially I want to display a list of classes, choose a class, then drill down a TreeView similar to the outline view Eclipse has for a current open file and at some point I click a button below and it generates the desired XML formatted text I would have typed manually, this is generated based on whatever in the tree I have highlighted.
I've designed and begun work on the front and back end, but the piece that keeps eluding me is harnessing Eclipse's content assist to gather a list of practically anything I could possibly call in a given project.
Can this be done? I've been combing Eclipse's documentation for a few days and fighting with the source download dying halfway repeatedly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不是 100% 如果是这样的话,但我有一个 Eclipse 插件,其名称中带有蜘蛛,它可以实现您所描述的功能。
也许是这个: http://eclipse-plugins.2y.net /eclipse/plugin_details.jsp?id=202
此外,在编写 Eclipse 插件时,在 pde 中工作后按 ctrl+shift+f1 (eclipse 插件间谍)很有用,这应该是可能的。
它向您显示有关引用您当前视图的所有可能扩展点的信息。
I am not 100% if that's it but I had an eclipse plugin with spider in it's name in mind, which does what you described.
Maybe it is this one: http://eclipse-plugins.2y.net/eclipse/plugin_details.jsp?id=202
Furthermore when writing Eclipse plugins, it is useful to press ctrl+shift+f1 (eclipse plugin spy) once having worked in the pde this should be possible.
It shows you info about all possible extensionpoints refering to your current view.