This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
3 Replies Last post: Mar 17, 2013 9:27 PM by Alexey Gopachenko  
Mak Kol Newbie 2 posts since
Feb 22, 2013
Currently Being Moderated

Feb 23, 2013 1:39 AM

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

Andriy Bazanov Master 2,626 posts since
May 28, 2010
Currently Being Moderated
Feb 23, 2013 2:25 AM in response to: Mak Kol
Re: Custom plugin, indexing/autocomplete issue
Alexey Gopachenko JetBrains 1,397 posts since
Aug 22, 2002
Currently Being Moderated
Mar 17, 2013 9:27 PM in response to: Mak Kol
Re: Custom plugin, indexing/autocomplete issue

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

More Like This

  • Retrieving data ...