Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function definitions stop working after sometime #22

Closed
sgmace opened this issue Jan 27, 2016 · 4 comments
Closed

Function definitions stop working after sometime #22

sgmace opened this issue Jan 27, 2016 · 4 comments
Labels

Comments

@sgmace
Copy link

sgmace commented Jan 27, 2016

I am on pycharm community edition. I loaded a robot project. Initially I was able to jump to function declarations and back. It stopped working after sometime

@sgmace
Copy link
Author

sgmace commented Jan 27, 2016

i get the message "Cannot find declaration to go to" when i try to jump to declaration.

@AmailP
Copy link
Owner

AmailP commented Jan 28, 2016

Can you please provide a sample project where this does not work?

Anyway jump to declaration is currently supported just for keywords defined
in robot files.

Cheers
Valerio

On Wednesday, 27 January 2016, sgmace notifications@github.com wrote:

i get the message "Cannot find declaration to go to" when i try to jump to
declaration.


Reply to this email directly or view it on GitHub
#22 (comment).

@sgmace
Copy link
Author

sgmace commented Jan 28, 2016

I kind of nailed down the issue. In my robot files i have the following code.


*** Settings ***
Test Timeout 10 minutes

Resource ${top_level_dir}/resources/configs/MyResources.robot

*** Variables ***
${top_level_dir} %{DEV_ROOT}/tools/test/robot

*** Keywords ***


If i remove the path portion from the code (${top_level_dir}/resources/configs) i am able to fetch the keywords in MyResources.robot. I will need to access keywords in resources from testcase directory.

How can i make it work without removing the path?

@AmailP
Copy link
Owner

AmailP commented Feb 5, 2016

Your use case is far from being easily implemented in the plugin. The plugin would need to know the value of the DEV_ROOT env variable and resolve the value of the top_level_dir variable. This information is available only at runtime.

I would suggest you to use relative paths to reference the resources if possible, like:
Resource ../../resources/configs/MyResources.robot

If that is not possible I would suggest you to put resources in the module search path and then add each path as source path in pycharm.

@AmailP AmailP closed this as completed Feb 5, 2016
@AmailP AmailP added the question label Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants