Custom plugin, indexing/autocomplete issue

Hi everyone,

I'm trying to write custom plugin for pradosoft framework.

Lets assume following class hierarchy:

interface MyInterface {}
class A implements MyInterface{}
class B extends A {}
class C extends B {}
class D implements MyInterface{}
class E {}

There is a need to filter all implementators of MyInterface (so A, B, C, D classes).
I've tried to use PhpClassIndex and PhpInheritanceIndex to get expected results, but autocomplete response is quite slow (because of amount of classes).
In example above for class C i have to check PhpClass implementators then call PhpClass.getSuperName() check implementators and so on...
So i would like to use custom file index.

What is the easiest way to index all classes which implements MyInterface?
Is there any manner to use existing PHP psi abstraction for this task?


Comment actions Permalink

thanks for quick response and sorry for the mess.

Comment actions Permalink

All PHP specific questions for pluings should go in our (PhpStorm) forum.

Well, there is a PhpIndex

  public abstract Collection<PhpClass> getAllSubclasses(@Nullable String fqn);

in 6.0's php-openapi.jar

Please sign in to leave a comment.