Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] Usage of SearchEngine.createSuperHierarchyScope()

I think the fastest way to do that is:

1. Find the required base class using PHPModelUtils.getClasses(className, SearchPattern.R_EXACT_MATCH, scope),
where scope contains your framework library.

2. Build type hierarchy of the found result(s):

hierarchy = type.newTypeHierarchy();

3. Get all classes from the type hierarchy:

hierarchy.getAllSubtypes(type)

On Fri, Jun 19, 2009 at 7:18 PM, Robert Gruendler <doobre@xxxxxxxxx> wrote:
i was trying to get all subclasses of a specific class inside a framework (external user library
) to build our model.

I could also iterate over all files/folders inside a folder in the framework that holds the classes i need,
but i thought as the php model has already indexed the external library too, i could just use the
php search facilities.




On Fri, Jun 19, 2009 at 6:08 PM, Roy Ganor <roy@xxxxxxxx> wrote:
if you are looking for a specific type hierarchy I recommend using:
org.eclipse.dltk.core.IType.newSupertypeHierarchy(ISourceModule[],
IProgressMonitor)

can you tell me the context of your request?
Roy
-----Original Message-----
From: pdt-dev-bounces@xxxxxxxxxxx [mailto:pdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Robert Gruendler
Sent: Friday, June 19, 2009 5:33 PM
To: PDT Developers
Subject: [pdt-dev] Usage of SearchEngine.createSuperHierarchyScope()

Hi all,

i'm trying to search for all classes being or extending a specific class

inside a user defined library.

Right now, this approach doesn't return any results:

     IDLTKSearchScope projectScope =
PHPModelUtils.createProjectSearchScope(scriptProject);
     IType[] types = PHPModelUtils.getTypes("baseClass", projectScope);

     IDLTKSearchScope taskScope =
SearchEngine.createSuperHierarchyScope(type);
     IType[] classes = PHPModelUtils.getAllClasses(taskScope);



Is there any recommended way to search for a class hierarchy ?


thanks !

-robert
_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pdt-dev
_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pdt-dev


_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pdt-dev



Back to the top