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?


Cheers,
Mak

3 comments

Hi,
thanks for quick response and sorry for the mess.

0

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

Well, there is a PhpIndex


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


in 6.0's php-openapi.jar
0

Please sign in to leave a comment.