Eclipse Class File Metadata

*爱你&永不变心* 提交于 2020-01-02 12:47:51

问题


In Visual Studio, I can obtain a succinct list of public methods/members exposed in a class for which I do not have the source (i.e. bundled inside a DLL) by pressing F12 (GoToDefinition).

Similarly, I am learning the Android API - in Eclipse. Jumping to an Android framework method definition produces decompilation output which is not intuitive to read, and is very verbose. To mimic results like Visual Studio, I am considering several options:

  1. How can I format the decompilation output to be 'cleaner' - I have looked through Eclipse's preferences menus and have not found a way to do this.
  2. How do I 'add corresponding source files' once Google provides it, so that jumping to definition yields the actual definition?
  3. Is there a plugin that does this already? I looked into Jadclipse, but that project has not been updated in several years, and is still a decompiler.

Thank you in advance.


回答1:


  1. You could try http://andrei.gmxhome.de/bytecode/index.html - it's a "little nicer" than the internal Eclipse decompilation.
  2. When opening a class definition for class without source available, you should see a button "Attach Source" at the top of the decompilation output where you can associate the corresponding source files.



回答2:


  1. You can view the .class files outline using the Outline view



回答3:


I found another decompiler that nicely integrates with Eclipse:

http://java.decompiler.free.fr/?q=jdeclipse



来源:https://stackoverflow.com/questions/2986772/eclipse-class-file-metadata

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!