JDT is supported by 3 pillars: Java Model, Search Engine, and AST. It is a handy tool for manipulating Java source code. However, the handy tool comes with a steep learning curve even for an experienced Java developer and there are just not enough proper code examples. This page summarizes the code examples for using Eclipse JDT.
- Java Model
- Java Model – Concept and Design
- Java Model – Create, Access, Load Projects
- Traverse .jar File by Using Eclipse JDT
- Count Total Number of Methods in a Java Project
- Java Search Engine
- ASTParser – Parse projects, files, and methods
- Use ASTView to explore AST of a Java class
- Parse a Java Project in Workspace
- Parse Single .java files
- Parse a Java method
- Parse Java statements
- A complete standalone example of ASTParser
- How to Resolve Bindings When Using Eclipse JDT ASTParser?
- More Examples and Possible Issues
- Get Internal Comments By Using Eclipse JDT ASTParser
- How to format source code by using CodeFormatter?
- Insert Blank Lines to source code
- Add a comment to source code
- Add a statement to source code
- Dynamically load a large number of open source project to workspace
- Find all callers of a method – get all methods that call a particular method
- Count Number of Statements in a Java Method By Using Eclipse JDT ASTParser
- java.lang.IllegalStateException: Workspace is closed.
If you get any problem, please leave your comment so I can get back to you as soon as possible.
Highly useful article.It is informational and might have helped many by this time. https://www.simpliv.com/java/eclipse-tutorial-for-beginners-learn-java-ide-in-10-steps is highly in demand now,I think. Thank you for sharing it here.
hello
i need a help in AStparser
can you?
i implementing aspect mining tool as project in my course study
using clustering algorithm
the data should cluster is from java code
contain all method and for each method how many invoked or called in source
inside which class application the called happend
can i do this using ASTparrser?
I need JDT program to add braces for single if statements.
Thank you for your helpful article(Find all callers of a method – get all methods that call a particular method) .However , My project is written in J2SE 1.3 version and i cannot change the version because of hardware reasons.Do you have any idea or any technique for finding all callers of a method in java 1.3 version.Could you please to help me answer the following question?
extremely helpful. Thank you!
Hello X Wang,
Could you please to help me answer the following question?
http://stackoverflow.com/questions/22522870/how-to-determine-the-class-is-annotationdeclaration-or-typedeclaration-using-jdt
Thank you in advance
Great tutorials! Thanks very much!