NitorCreations / RobotFramework-EclipseIDE

Developing an Eclipse IDE for the Robot Framework test automation tool
71 stars 53 forks source link

Content Assist crashes when a resource is indicated with variable file (1.1.0) #48

Open bgd77 opened 11 years ago

bgd77 commented 11 years ago

This happens on version 1.1.0.

I indicate the path to some resources by using the following expression: "Resource ${RESOURCES}/user-keywords.txt"

The ${RESOURCES} variable is created in the Robot Framework Maven Plugin as a variable: "RESOURCES:${project.basedir}/resources"

When I try to use the content assist in a test file that contains that type of resource import mentioned at the beginning the following error is displayed:

"Content Assist" did not complete normally. Please see the log for more information. Relative path in absolute URI: file:D:/...path_to_project.../robot/src/main/scenarios/$%7BRESOURCES%7D/user-keywords.txt

This path is incorrect, it should be: D:/...path_to_project.../robot/resources/user-keywords.txt because "robot" is the base directory of the project.

xkr47 commented 11 years ago

Since the plugin does not currently understand maven plugin configurations, it will not know of variables declared there. So it will not know where to look for the user-keywords.txt. The path it tries to look for is indeed incorrect; if it cannot resolve the file, it should just ignore it.

Supporting maven plugin configurations is one option, but I think the first step towards that goal would be to allow declaring run-time variables in the Project or workspace preferences. There you could then define RESOURCES to match the maven configuration and the editor would be able to understand where to look for the file.