Is your enhancement request related to a problem? Please describe.
Keywords tagged with robot:private are meant to be used only in the file that defines them. Robot Framework logs a warning when such a keyword is called from another file, and RobotCode reports the same as a PrivateKeyword warning.
Keyword completion does not know about this. After importing a resource file into a suite, its private keywords are offered in the completion list like every other keyword. So the editor first proposes a keyword and then complains when it is used. In projects that use private keywords to hide helper keywords, they also make the completion list longer than necessary.
Describe the solution you'd like
- Keyword completion does not offer keywords tagged
robot:private that come from another file. Inside the file that defines them they are still offered, because using them there is valid.
- This can be switched on and off with a setting (for example
robotcode.completion.hidePrivateKeywords), so that users who want to see every keyword still can.
- When private keywords are shown, they could be marked as private and sorted after the public ones, similar to how deprecated keywords are marked.
Describe alternatives you've considered
- Keeping the current behaviour and relying on the
PrivateKeyword warning only. It works, but it tells the user about the problem after the keyword was inserted.
- Always hiding private keywords without a setting. Simpler, but some users call private keywords from other files on purpose and only accept the warning.
Additional context
- The private state follows what RobotCode already uses for the
PrivateKeyword diagnostic and for preferring public over private keywords when names collide. That includes robot:private declared in the keyword documentation (Tags: robot:private), which Libdoc reports as private too.
- Robot Framework checks private calls only for keywords of resource files. Whether library keywords tagged
robot:private should be hidden as well has to be decided.
- The setting has to be available in VS Code and IntelliJ.
AI / tooling disclosure
This issue was drafted with Claude Code while working on Robot Framework 7.5 support. I checked the current behaviour in the code (no private filtering in keyword completion, existing PrivateKeyword diagnostic) and reviewed the text.
Is your enhancement request related to a problem? Please describe.
Keywords tagged with
robot:privateare meant to be used only in the file that defines them. Robot Framework logs a warning when such a keyword is called from another file, and RobotCode reports the same as aPrivateKeywordwarning.Keyword completion does not know about this. After importing a resource file into a suite, its private keywords are offered in the completion list like every other keyword. So the editor first proposes a keyword and then complains when it is used. In projects that use private keywords to hide helper keywords, they also make the completion list longer than necessary.
Describe the solution you'd like
robot:privatethat come from another file. Inside the file that defines them they are still offered, because using them there is valid.robotcode.completion.hidePrivateKeywords), so that users who want to see every keyword still can.Describe alternatives you've considered
PrivateKeywordwarning only. It works, but it tells the user about the problem after the keyword was inserted.Additional context
PrivateKeyworddiagnostic and for preferring public over private keywords when names collide. That includesrobot:privatedeclared in the keyword documentation (Tags: robot:private), which Libdoc reports as private too.robot:privateshould be hidden as well has to be decided.AI / tooling disclosure
This issue was drafted with Claude Code while working on Robot Framework 7.5 support. I checked the current behaviour in the code (no private filtering in keyword completion, existing
PrivateKeyworddiagnostic) and reviewed the text.