robocorp / robotframework-lsp

Robocorp extensions for VS Code: Robocorp Code and RFW LSP
https://robocorp.com/docs/developer-tools/visual-studio-code
Apache License 2.0
200 stars 87 forks source link

PyCharm: Do NOT overwrite arguments from template #1070

Open raphaelcamus opened 2 weeks ago

raphaelcamus commented 2 weeks ago

Hi,

Currently, after having modified the "Robot Framework" configuration template in PyCharm, when you run a test using the "green array", it creates a "Run: xxx" run configuration from the template, but it only keeps the "Before launch" and overwrites target, working dir, env variables and arguments.

I would like it to keep my arguments (and maybe env vars too, though I do not need it for now)

I have noticed that it is done in robotframework-intellij\src\main\java\robocorp\dap\linemarker\RobotRunAction.java

I wanted to modify line 76 with runOptions.args = args.addAll(runOptions.args);, template coming second, as from doc:

Options that are marked with an asterisk (*) can be specified multiple times. For example, --test first --test third selects test cases with name first and third. If an option accepts a value but is not marked with an asterisk, the last given value has precedence. For example, --log A.html --log B.html creates log file B.html. Options accepting no values can be disabled by using the same option again with no prefix added or dropped. The last option has precedence regardless of how many times options are used. For example, --dryrun --dryrun --nodryrun --nostatusrc --statusrc would not activate the dry-run mode and would return a normal return code.

but I can't build the plugin, not even test without any modifications (.\gradlew test fails)

Would it be possible to have this feature ? It would be more handy than using Run/Debug configurations. Thanks