Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
JDT Core Programmer Guide
Overview
Java Model
Java model is a lightweight model for views.
Search Engine
Indexes of declarations, references and type hierarchy relationships.
Using the APIs, an example
Create a search pattern:
SearchPattern pattern = SearchPattern.createPattern( "foo(*) int", IJavaSearchConstants.METHOD, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_PATTERN_MATCH );
Create a search scope:
IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
Collect results using SearchRequestor subclass:
SearchRequestor requestor = new SearchRequestor() { public void acceptSearchMatch(SearchMatch match) { System.out.println(match.getElement()); } };
Start search:
new SearchEngine().search( pattern, new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant()}, scope, requestor, null /*progress monitor*/ );
AST
Precise, fully resolved compiler parse tree.