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
- 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.
If you want to post code, please put the code inside <pre> and </pre> tags.