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

Improve Configuration UI #1018

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion robotframework-intellij/codegen_intellij.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ def main():
os.path.join(this_dir, "..", "robotframework-ls", "package.json")
) as stream:
package_json = json.load(stream)
properties = package_json["contributes"]["configuration"]["properties"]
categories = package_json["contributes"]["configuration"]
properties = {k: v for cat in categories for k, v in cat["properties"].items()}
for prop_name, prop_value in properties.items():
if prop_name in IGNORE_PREFERENCES_NOT_APPLICABLE_TO_INTELLIJ:
continue
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,109 +1,51 @@
# fmt: off
# Warning: Don't edit file (autogenerated from python -m dev codegen).

OPTION_ROBOT_LANGUAGE_SERVER_PYTHON = "robot.language-server.python"
OPTION_ROBOT_LANGUAGE_SERVER_ARGS = "robot.language-server.args"
OPTION_ROBOT_LANGUAGE_SERVER_TCP_PORT = "robot.language-server.tcp-port"
OPTION_ROBOT_PYTHON_EXECUTABLE = "robot.python.executable"
OPTION_ROBOT_PYTHON_ENV = "robot.python.env"
OPTION_ROBOT_VARIABLES = "robot.variables"
OPTION_ROBOT_LOAD_VARIABLES_FROM_ARGUMENTS_FILE = "robot.loadVariablesFromArgumentsFile"
OPTION_ROBOT_PYTHONPATH = "robot.pythonpath"
OPTION_ROBOT_LIBRARIES_LIBDOC_NEEDS_ARGS = "robot.libraries.libdoc.needsArgs"
OPTION_ROBOT_LIBRARIES_LIBDOC_PRE_GENERATE = "robot.libraries.libdoc.preGenerate"
OPTION_ROBOT_LIBRARIES_BLACKLIST = "robot.libraries.blacklist"
OPTION_ROBOT_LIBRARIES_DEPRECATED = "robot.libraries.deprecated"
OPTION_ROBOT_CODE_FORMATTER = "robot.codeFormatter"
OPTION_ROBOT_FLOW_EXPLORER_THEME = "robot.flowExplorerTheme"
OPTION_ROBOT_LINT_ROBOCOP_ENABLED = "robot.lint.robocop.enabled"
OPTION_ROBOT_LINT_ENABLED = "robot.lint.enabled"
OPTION_ROBOT_LINT_UNDEFINED_KEYWORDS = "robot.lint.undefinedKeywords"
OPTION_ROBOT_LINT_UNDEFINED_LIBRARIES = "robot.lint.undefinedLibraries"
OPTION_ROBOT_LINT_UNDEFINED_RESOURCES = "robot.lint.undefinedResources"
OPTION_ROBOT_LINT_UNDEFINED_VARIABLE_IMPORTS = "robot.lint.undefinedVariableImports"
OPTION_ROBOT_LINT_KEYWORD_CALL_ARGUMENTS = "robot.lint.keywordCallArguments"
OPTION_ROBOT_LINT_KEYWORD_RESOLVES_TO_MULTIPLE_KEYWORDS = "robot.lint.keywordResolvesToMultipleKeywords"
OPTION_ROBOT_LINT_VARIABLES = "robot.lint.variables"
OPTION_ROBOT_LINT_IGNORE_VARIABLES = "robot.lint.ignoreVariables"
OPTION_ROBOT_LINT_IGNORE_ENVIRONMENT_VARIABLES = "robot.lint.ignoreEnvironmentVariables"
OPTION_ROBOT_LINT_UNUSED_KEYWORD = "robot.lint.unusedKeyword"
OPTION_ROBOT_COMPLETIONS_SECTION_HEADERS_FORM = "robot.completions.section_headers.form"
OPTION_ROBOT_COMPLETIONS_KEYWORDS_NOT_IMPORTED_ENABLE = "robot.completions.keywordsNotImported.enable"
OPTION_ROBOT_COMPLETIONS_KEYWORDS_NOT_IMPORTED_ADD_IMPORT = "robot.completions.keywordsNotImported.addImport"
OPTION_ROBOT_COMPLETIONS_KEYWORDS_FORMAT = "robot.completions.keywords.format"
OPTION_ROBOT_COMPLETIONS_KEYWORDS_PREFIX_IMPORT_NAME = "robot.completions.keywords.prefixImportName"
OPTION_ROBOT_COMPLETIONS_KEYWORDS_PREFIX_IMPORT_NAME_IGNORE = "robot.completions.keywords.prefixImportNameIgnore"
OPTION_ROBOT_COMPLETIONS_KEYWORDS_ARGUMENTS_SEPARATOR = "robot.completions.keywords.argumentsSeparator"
OPTION_ROBOT_WORKSPACE_SYMBOLS_ONLY_FOR_OPEN_DOCS = "robot.workspaceSymbolsOnlyForOpenDocs"
OPTION_ROBOT_EDITOR_4SPACES_TAB = "robot.editor.4spacesTab"
OPTION_ROBOT_QUICK_FIX_KEYWORD_TEMPLATE = "robot.quickFix.keywordTemplate"
OPTION_ROBOT_CODE_LENS_ENABLE = "robot.codeLens.enable"
OPTION_ROBOT_CODE_LENS_RUN_ENABLE = "robot.codeLens.run.enable"
OPTION_ROBOT_CODE_LENS_INTERACTIVE_CONSOLE_ENABLE = "robot.codeLens.interactiveConsole.enable"
OPTION_ROBOT_INTERACTIVE_CONSOLE_ARGUMENTS = "robot.interactiveConsole.arguments"
OPTION_ROBOT_LANGUAGE = "robot.language"
OPTION_ROBOT_RUN_PEEK_ERROR_LEVEL = "robot.run.peekError.level"
OPTION_ROBOT_RUN_PEEK_ERROR_SHOW_SUMMARY = "robot.run.peekError.showSummary"
OPTION_ROBOT_RUN_PEEK_ERROR_SHOW_ERRORS_IN_CALLERS = "robot.run.peekError.showErrorsInCallers"
OPTION_ROBOT_TIMEOUT_USE = "robot.timeout.use"
OPTION_ROBOT_TIMEOUT_GENERAL = "robot.timeout.general"
OPTION_ROBOT_TIMEOUT_COMPLETIONS = "robot.timeout.completions"
OPTION_ROBOT_TIMEOUT_CODE_FORMATTING = "robot.timeout.codeFormatting"
OPTION_ROBOT_TIMEOUT_COLLECT_DOCS_TIMEOUT = "robot.timeout.collectDocsTimeout"
OPTION_ROBOT_TIMEOUT_LIST_TESTS_TIMEOUT = "robot.timeout.listTestsTimeout"
OPTION_TITLE = "title"
OPTION_TYPE = "type"
OPTION_PROPERTIES = "properties"
OPTION_TITLE = "title"
OPTION_TYPE = "type"
OPTION_PROPERTIES = "properties"
OPTION_TITLE = "title"
OPTION_TYPE = "type"
OPTION_PROPERTIES = "properties"
OPTION_TITLE = "title"
OPTION_TYPE = "type"
OPTION_PROPERTIES = "properties"
OPTION_TITLE = "title"
OPTION_TYPE = "type"
OPTION_PROPERTIES = "properties"
OPTION_TITLE = "title"
OPTION_TYPE = "type"
OPTION_PROPERTIES = "properties"
OPTION_TITLE = "title"
OPTION_TYPE = "type"
OPTION_PROPERTIES = "properties"

ALL_ROBOT_OPTIONS = frozenset(
(
OPTION_ROBOT_LANGUAGE_SERVER_PYTHON,
OPTION_ROBOT_LANGUAGE_SERVER_ARGS,
OPTION_ROBOT_LANGUAGE_SERVER_TCP_PORT,
OPTION_ROBOT_PYTHON_EXECUTABLE,
OPTION_ROBOT_PYTHON_ENV,
OPTION_ROBOT_VARIABLES,
OPTION_ROBOT_LOAD_VARIABLES_FROM_ARGUMENTS_FILE,
OPTION_ROBOT_PYTHONPATH,
OPTION_ROBOT_LIBRARIES_LIBDOC_NEEDS_ARGS,
OPTION_ROBOT_LIBRARIES_LIBDOC_PRE_GENERATE,
OPTION_ROBOT_LIBRARIES_BLACKLIST,
OPTION_ROBOT_LIBRARIES_DEPRECATED,
OPTION_ROBOT_CODE_FORMATTER,
OPTION_ROBOT_FLOW_EXPLORER_THEME,
OPTION_ROBOT_LINT_ROBOCOP_ENABLED,
OPTION_ROBOT_LINT_ENABLED,
OPTION_ROBOT_LINT_UNDEFINED_KEYWORDS,
OPTION_ROBOT_LINT_UNDEFINED_LIBRARIES,
OPTION_ROBOT_LINT_UNDEFINED_RESOURCES,
OPTION_ROBOT_LINT_UNDEFINED_VARIABLE_IMPORTS,
OPTION_ROBOT_LINT_KEYWORD_CALL_ARGUMENTS,
OPTION_ROBOT_LINT_KEYWORD_RESOLVES_TO_MULTIPLE_KEYWORDS,
OPTION_ROBOT_LINT_VARIABLES,
OPTION_ROBOT_LINT_IGNORE_VARIABLES,
OPTION_ROBOT_LINT_IGNORE_ENVIRONMENT_VARIABLES,
OPTION_ROBOT_LINT_UNUSED_KEYWORD,
OPTION_ROBOT_COMPLETIONS_SECTION_HEADERS_FORM,
OPTION_ROBOT_COMPLETIONS_KEYWORDS_NOT_IMPORTED_ENABLE,
OPTION_ROBOT_COMPLETIONS_KEYWORDS_NOT_IMPORTED_ADD_IMPORT,
OPTION_ROBOT_COMPLETIONS_KEYWORDS_FORMAT,
OPTION_ROBOT_COMPLETIONS_KEYWORDS_PREFIX_IMPORT_NAME,
OPTION_ROBOT_COMPLETIONS_KEYWORDS_PREFIX_IMPORT_NAME_IGNORE,
OPTION_ROBOT_COMPLETIONS_KEYWORDS_ARGUMENTS_SEPARATOR,
OPTION_ROBOT_WORKSPACE_SYMBOLS_ONLY_FOR_OPEN_DOCS,
OPTION_ROBOT_EDITOR_4SPACES_TAB,
OPTION_ROBOT_QUICK_FIX_KEYWORD_TEMPLATE,
OPTION_ROBOT_CODE_LENS_ENABLE,
OPTION_ROBOT_CODE_LENS_RUN_ENABLE,
OPTION_ROBOT_CODE_LENS_INTERACTIVE_CONSOLE_ENABLE,
OPTION_ROBOT_INTERACTIVE_CONSOLE_ARGUMENTS,
OPTION_ROBOT_LANGUAGE,
OPTION_ROBOT_RUN_PEEK_ERROR_LEVEL,
OPTION_ROBOT_RUN_PEEK_ERROR_SHOW_SUMMARY,
OPTION_ROBOT_RUN_PEEK_ERROR_SHOW_ERRORS_IN_CALLERS,
OPTION_ROBOT_TIMEOUT_USE,
OPTION_ROBOT_TIMEOUT_GENERAL,
OPTION_ROBOT_TIMEOUT_COMPLETIONS,
OPTION_ROBOT_TIMEOUT_CODE_FORMATTING,
OPTION_ROBOT_TIMEOUT_COLLECT_DOCS_TIMEOUT,
OPTION_ROBOT_TIMEOUT_LIST_TESTS_TIMEOUT,
OPTION_TITLE,
OPTION_TYPE,
OPTION_PROPERTIES,
OPTION_TITLE,
OPTION_TYPE,
OPTION_PROPERTIES,
OPTION_TITLE,
OPTION_TYPE,
OPTION_PROPERTIES,
OPTION_TITLE,
OPTION_TYPE,
OPTION_PROPERTIES,
OPTION_TITLE,
OPTION_TYPE,
OPTION_PROPERTIES,
OPTION_TITLE,
OPTION_TYPE,
OPTION_PROPERTIES,
OPTION_TITLE,
OPTION_TYPE,
OPTION_PROPERTIES,
)
)

Expand Down
10 changes: 3 additions & 7 deletions robotframework-ls/codegen/codegen_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,7 @@ def get_json_contents():
}
}
],
"configuration": {
"title": "Robot Framework Language Server Configuration",
"type": "object",
"properties": get_settings_for_json(),
},
"configuration": get_settings_for_json(),
"viewsContainers": collect_views_containers(),
"views": collect_views(),
"languages": [
Expand Down Expand Up @@ -367,7 +363,7 @@ def write_py_settings():
setting_constant_template = '%s = "%s"'

# Create the constants
for setting_name in settings.SETTINGS.keys():
for setting_name in [key for category in settings.SETTINGS for key in category.keys()]:
settings_template.append(
setting_constant_template
% ("OPTION_" + convert_case_to_constant(setting_name), setting_name)
Expand All @@ -379,7 +375,7 @@ def write_py_settings():
("""
)

for setting_name in settings.SETTINGS.keys():
for setting_name in [key for category in settings.SETTINGS for key in category.keys()]:
settings_template.append(
f" OPTION_{convert_case_to_constant(setting_name)},"
)
Expand Down
Loading