[PhpStorm] Plugin for aspect-oriented programming

I'm developing a plugin for PhpStorm for aspect-oriented programming (https://plugins.jetbrains.com/plugin/7785) and there are some question that I cannot answer myself. Please, could you help me in this thread with some answers, I'll put an questions here in the case I stuck in something.

My starting point is:


Now  I'm stuck with the most interesting part: I want to develop  LineMarkerProvider that will add an icons near matching PHP methods,  properties and classes with ability to navigate to advice/from advice.  In the order to implement this I want to extend PSI elements with  methods to create a patterns and then check all items if they matcing  specific patterns. From what I can see, all interesting items for me are  implementing "php.lang.psi.elements.PhpNamedElement", so first  questions:

  1. How to get all avaliable php.lang.psi.elements.PhpNamedElement items in the project?
  2. What  is the best way to get a matcher for PHP items from my top-level PSI  (psi.PointcutExpression)? Is it ok to build pattern matcher on every  first access to the psi.PointcutExpression.getPointcutMatcher() that  will give me an instance of ObjectPattern?

Please sign in to leave a comment.