How do specify another module for scanning resources by a plugin?
I have a two project in a one project window: main project and another added like git-module. I installed plugin https://plugins.jetbrains.com/plugin/9575-jbehave-syntax-support for my IDEA and I want use it for a both projects. Sense of a plugin is syntax highlighting and jumping to code definition of instructions in created .story files. My problem in following: plugin scan code definition only in a project where .story file located, not in a both projects. I found problem in a plugin code line that gets a module for the .story file :
Module module = ModuleUtilCore.findModuleForPsiElement(step);
Сan I specify both modules for scanning? Or define scanning of a my specific project? By SDK code base, I seem the concept of a project and module is very closed for safety reasons...
Please sign in to leave a comment.
findModuleForPsiElement returns the module where a specific source code element is contained. You can move your source file into another module to change the behavior but there's no legal way to pretend your file already is in another module. Does the plugin honor module dependencies, i.e. if you make one module depend on another, will the former see the declarations in the latter one? If not, I'd suggest you contact plugin vendor and maybe they can implement that.
My projects depended one on another already, but I see that plugin vendor uses a following already too:
https://github.com/hobbitProg/IntelliJBehave/blob/master/src/com/github/kumaraman21/intellijbehave/service/JBehaveStepsIndex.java#L71
Is this what you mean for implementing? If not, please direct me to the right direction in code documentation, I will fix it by myself. Thank you!
Yes, this scope appears to be the correct one. The .story files should probably be searched using this scope.
I simply added project "b" sources to project "a"...without importing like a new project, without creating .idea and .iml files for project "b". The VCS Roots works correctly for project "a" and for directory of project "b" in project "a", my problem is solved!
Thanks for your help!