[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pdt-dev] ModelException when calling newSuperTypeHierarchy() during indexing


i'm still trying to figure out how to get a complete supertype hierarchy during indexing of a PHP class.

Here's a simple PHPIndexingVisitorExtension that produces the exception:

public class TestIndexingVisitorExtension
    extends PhpIndexingVisitorExtension {

    public boolean visit(TypeDeclaration s) throws Exception

try {
if (s instanceof ClassDeclaration) {
IType type = sourceModule.getType(s.getName());
ITypeHierarchy hierarchy = type.newSupertypeHierarchy(new NullProgressMonitor());
} catch (ModelException e) {

        return super.visit(s);


The exception thrown is "SubTest [in SubTest.php [in src [in <project root> [in test]]]] does not exist" when calling type.newSupertypeHierarchy()

The class SubTest does exist in the project, in fact it's the class that's open in the current editor.

Am i using the API in a wrong way, or is this a bug?