From b54d1b9ee5f11f8ee0629657e1ec38ac09d7ab46 Mon Sep 17 00:00:00 2001 From: qarlosalberto Date: Thu, 3 Oct 2024 22:06:34 +0200 Subject: [PATCH] feat: better config view --- auto_package/templates/info.nj | 2 +- package.json | 2 +- src/colibri/config/config_declaration.ts | 48 +++---- src/colibri/config/config_web.ts | 124 ++++++++++-------- .../config/helpers/configs/tools/general.yml | 18 +-- src/colibri/config/helpers/sidebar.html.nj | 8 +- src/colibri/config/helpers/web_config_js.nj | 20 ++- src/colibri/config/web_config.html | 124 ++++++++++-------- 8 files changed, 202 insertions(+), 144 deletions(-) diff --git a/auto_package/templates/info.nj b/auto_package/templates/info.nj index 88af164d..d12e289f 100644 --- a/auto_package/templates/info.nj +++ b/auto_package/templates/info.nj @@ -2,7 +2,7 @@ "displayName": "TerosHDL", "publisher": "teros-technology", "description": "Powerful toolbox for ASIC/FPGA: state machine viewer, linter, documentation, snippets... and more! ", -"version": "6.0.10", +"version": "6.0.11", "engines": { "vscode": "^1.74.0" }, diff --git a/package.json b/package.json index 9b29cc2d..e1d11c55 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "TerosHDL", "publisher": "teros-technology", "description": "Powerful toolbox for ASIC/FPGA: state machine viewer, linter, documentation, snippets... and more! ", - "version": "6.0.10", + "version": "6.0.11", "engines": { "vscode": "^1.74.0" }, diff --git a/src/colibri/config/config_declaration.ts b/src/colibri/config/config_declaration.ts index 5b1c0683..d9e11f76 100644 --- a/src/colibri/config/config_declaration.ts +++ b/src/colibri/config/config_declaration.ts @@ -219,11 +219,11 @@ export type e_templates_general = { export type e_tools_general = { select_tool : e_tools_general_select_tool, - gtkwave_installation_path : string, - gtkwave_extra_arguments : string, + manual_compilation_order : string, execution_mode : e_tools_general_execution_mode, waveform_viewer : e_tools_general_waveform_viewer, - manual_compilation_order : string, + gtkwave_installation_path : string, + gtkwave_extra_arguments : string, }; export type e_tools_quartus = { @@ -919,11 +919,11 @@ export function get_default_config(): e_config { tools: { general: { select_tool : e_tools_general_select_tool.ghdl, - gtkwave_installation_path : "", - gtkwave_extra_arguments : "", + manual_compilation_order : "", execution_mode : e_tools_general_execution_mode.cmd, waveform_viewer : e_tools_general_waveform_viewer.tool, - manual_compilation_order : "", + gtkwave_installation_path : "", + gtkwave_extra_arguments : "", }, quartus: { installation_path : "", @@ -1799,40 +1799,40 @@ export function get_config_from_json(json_config: any): e_config { default_config['tools']['general']['select_tool'] = e_tools_general_select_tool.sandpiper; } - // tools -> general -> gtkwave_installation_path - const current_value_73 = json_config['tools']['general']['gtkwave_installation_path']; + // tools -> general -> manual_compilation_order + const current_value_73 = json_config['tools']['general']['manual_compilation_order']; if (typeof current_value_73 === 'string'){ - default_config['tools']['general']['gtkwave_installation_path'] = current_value_73; - } - - // tools -> general -> gtkwave_extra_arguments - const current_value_74 = json_config['tools']['general']['gtkwave_extra_arguments']; - if (typeof current_value_74 === 'string'){ - default_config['tools']['general']['gtkwave_extra_arguments'] = current_value_74; + default_config['tools']['general']['manual_compilation_order'] = current_value_73; } // tools -> general -> execution_mode - const current_value_75 = json_config['tools']['general']['execution_mode']; - if ( current_value_75 === "gui"){ + const current_value_74 = json_config['tools']['general']['execution_mode']; + if ( current_value_74 === "gui"){ default_config['tools']['general']['execution_mode'] = e_tools_general_execution_mode.gui; } - if ( current_value_75 === "cmd"){ + if ( current_value_74 === "cmd"){ default_config['tools']['general']['execution_mode'] = e_tools_general_execution_mode.cmd; } // tools -> general -> waveform_viewer - const current_value_76 = json_config['tools']['general']['waveform_viewer']; - if ( current_value_76 === "tool"){ + const current_value_75 = json_config['tools']['general']['waveform_viewer']; + if ( current_value_75 === "tool"){ default_config['tools']['general']['waveform_viewer'] = e_tools_general_waveform_viewer.tool; } - if ( current_value_76 === "gtkwave"){ + if ( current_value_75 === "gtkwave"){ default_config['tools']['general']['waveform_viewer'] = e_tools_general_waveform_viewer.gtkwave; } - // tools -> general -> manual_compilation_order - const current_value_77 = json_config['tools']['general']['manual_compilation_order']; + // tools -> general -> gtkwave_installation_path + const current_value_76 = json_config['tools']['general']['gtkwave_installation_path']; + if (typeof current_value_76 === 'string'){ + default_config['tools']['general']['gtkwave_installation_path'] = current_value_76; + } + + // tools -> general -> gtkwave_extra_arguments + const current_value_77 = json_config['tools']['general']['gtkwave_extra_arguments']; if (typeof current_value_77 === 'string'){ - default_config['tools']['general']['manual_compilation_order'] = current_value_77; + default_config['tools']['general']['gtkwave_extra_arguments'] = current_value_77; } // tools -> quartus -> installation_path diff --git a/src/colibri/config/config_web.ts b/src/colibri/config/config_web.ts index c5e2c74c..37ba42bf 100755 --- a/src/colibri/config/config_web.ts +++ b/src/colibri/config/config_web.ts @@ -204,45 +204,53 @@ export const WEB_CONFIG = `