Eclipse 插件:获取封闭类和成员名称
我创建了一个 Eclipse 插件,可以在按下快捷键时打印输出选择的对象。 我已经能够做到这一点,但我还想在日志中添加当前方法和当前类名称。我不知道如何进一步进行。我尝试搜索面包屑 API,但无法从我的项目中引用该包。我对插件开发很陌生,有人可以指导我如何实现我的目标。提前致谢。
I have created a Eclipse plug in to printout the object in selection on press of a short cut key.
I have been able to do this ,but i also would like to add the current method and current class name in the log. I am not sure how to proceede further. I tried to search for breadcrumb API but i was not able to reference the package from my project. I am quite new to plugin developement could someone guide me as to how to achive my goal. Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从面包屑中获取这些东西真的很难,你必须使用反射来获取它。
这是从编辑器获取当前方法的代码。
It really hard to get that stuff from Breadcrumb, you would have to use reflection to get it.
Here is the code to get current method from editor.