Question about extending the plugin #2335
Replies: 2 comments
-
Similarly, I'd also like code like this: $aSpecialNameWeUse->App('SomeModule')->SomeSub($args); have similar functionality where $aSpecialNameWeUse->App('SomeModule') means some::path::SomeModule so that if I type $aSpecialNameWeUse->App('SomeModule')-> and wait for suggestions, the IDE will prompt with subs from some::path::SomeModule. |
Beta Was this translation helpful? Give feedback.
-
This looks like a pretty tricky approach. Unfortunately I don't even have time to properly maintain generic functionality. Not sure I see a good way here, even can't imagine which extension point I could introduce for such case. I'll let you know if something will come to mind.
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I'd like to extend some functionality of the plugin without modifying the source of the plugin itself. I've done this with two other plugins though for unrelated functionality. Anyway, I'd like to know what approach I might take so make a statement such as:
BusCall::SomeModule::SomeSub click resolve to some/path/SomeModule/withinTheModuleThatSomeSub (notice that BusCall is not an actual path in the source tree and not part of the actual package name for SomeModule::SomeSub, we have something within our code base that transforms a buscall to the actual package).
So effectively, I need to tell the perl plugins PSI tree (I think) that BusCall::SomeModule is the same as the actual package name if it were instead used with the actual package name. I think doing that would enable the click navigation as well as possibly also enable code completion when I type "BusCall::SomeModule::" and wait for suggestions after the last "::".
Can you give me some pointers on how I might do this?
Another option would be to actually make the plugin support this on a configurable basis, so for example it could have a preferences panel that has a table with columns:
Virtual Path
Real Path
and in this case, if I were to add a row to the preferences table the values would be:
Virtual Path: BusCall
Real Path: some/path/to/modules
where under some/path/to/modules we would find SomeModule as a subdirectory and inside that module SomeSub was defined. However, I feel like that is not where I want to start as that feels like a lot more to try and do given I'd have to create a preferences panel and I am very new to IntelliJ plugin development.
Beta Was this translation helpful? Give feedback.
All reactions