简体   繁体   中英

Eclipse Plug-in Development: get project infos

I'm new in the Eclipse plug-in development: i need to retrieve some info of the java project selected by the user such as:

  • The number of classes
  • The methods of each class
  • The instance variables of each class
  • The number of LOC of each class

My plug-in has to show the java project as a graph and calculate some metrics... but i am not familiar with Eclipse APIs

Google the Javadoc for classes IProject, IContainer, IFolder, IFile and IWorkspaceRoot. These classes collaborate together to give you most of the information you need.

In the org.eclipse.jdt.core plugin look at the ASTParser that can take some Java source and hand back a parse tree in which you can find all of the methods, variables, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM