Closed awesomeunleashed closed 3 years ago
You can try: Close all files, restart PyCharm. Then if you open module2/tests.robot first, it will import module2/keywords.robot. Howerver, you open module1/test.robot later, it will also import module2/keywords.robot.
That means, if resource/library have same name, the first loaded one will always be used by the plugin.
The issue is caused by that the cache it used is based on the resource/library name only. You can resolve it by improve the function findRobot and findPython in com/millennialmedia/intellibot/psi/ref/RobotFileManager.java Thanks!
@awesomeunleashed please try intellibot.zip It now resolve relative library/resource path before cache.
@awesomeunleashed please try https://github.com/lte2000/intellibot/raw/c697374f8b00a0f1fd0d25f70c7bb36c9fa78661/intellibot.jar It now resolve relative library/resource path before cache.
I'm not on a team that uses PyCharm or Robot Framework anymore, so unfortunately I can't test it, but I appreciate you working on this! I'll be sure to try it out if I ever start using that stack again.
fixed in v0.10.143.398
Thanks for working on this plugin, it addresses most of the issues we had in the base plugin.
We have found, however, that when importing a local library or resource file, if there are multiple files named the same in the project (in different folders), the plugin always imports the first one instead of the one specified by the relative path (which robot will import when actually running the tests).
Here is a simple project that demonstrates this behavior. In
module2/test.robot
in the editor, it can't find the keywords used in the test case, because it is importingmodule1/keywords.robot
andmodule1/Util.py
. However, when the tests are run, robot correctly importsmodule2/keywords.robot
andmodule2/Util.py
.Any chance this could be addressed? I could look into it myself if you don't have the capacity, but I haven't done any JetBrains plugin development before, so I would need to be pointed to where in the project to look.