[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: Obtaining classes/types of a project

Paul,

i've been thinking of using JDT search engine - it can find classes very fast, without iterating over whole project. But i got stuck with defining the search query. We basically want to know of all types definitions in a project, but search engine doesn't make a big distinction between classes defined in source folders and found deeply in classpath, so user would have to find out all the source folders and use only them as a search scope.
The best place to start out with search are SearchPattern and SearchEngine classes from jdt.core.


Another question is how to switch from classes to all their hierarchies. It's again easy to search, but may be not very effective if we want it for all classes in project. Ryan, could you give us some more details, how do you want to use the list of classes with their types hierarchy?

Paul Webster wrote:
My first guess is that JDT is the way to go ... ICompilationUnit and associated IJavaElements are a way to work with java files in your workspace, it's what JDT was designed to do.


To use something like reflection you'd need the classes loaded in your running instance somehow. But reflection won't provide a list of types, just give you information about the types you ask.


I'd also ask your question on eclipse.tools.jdt ... they'd have a better idea.

PW