function loadPropsFromCLI(this)
% some of the dialog properties are not directly sourced off of the CLI
% object; they are stored as class properties of various dialogs; load
% these from CLI

%   Copyright 2010-2023 The MathWorks, Inc.
if isempty(this.CLI)
    return;
end

hdleda = getsubcomponent(this,'hdlcoderui.hdledas');
hdltb = getsubcomponent(this,'hdlcoderui.hdltb');

% The code that follows assumes that CLI exists.
% So force create one.
this.getCLI;

if ~isempty(hdltb)
    if hdltb.edalinksinstalled
        %Cosim
        if strcmpi(this.CLI.GenerateCoSimModel,'ModelSim') || strcmpi(this.CLI.GenerateCoSimModel,'Incisive') || strcmpi(this.CLI.GenerateCoSimModel,'Vivado Simulator')
            hdltb.CosimModel = true;
        else
            hdltb.CosimModel = false;
        end
        %svdpi
        if strcmpi(this.CLI.GenerateSVDPITestbench,'ModelSim') || strcmpi(this.CLI.GenerateSVDPITestbench,'Incisive')  || strcmpi(this.CLI.GenerateSVDPITestbench, 'Vivado Simulator') || strcmpi(this.CLI.GenerateSVDPITestbench,'VCS')
            hdltb.svdpi_tb=true;
        else
            %In config param UI we only support incisive and modelsim
            hdltb.svdpi_tb=false;
        end
    else
        hdltb.CosimModel = false;
        hdltb.svdpi_tb=false;
        hdltb.HDLCodeCoverage = false;
    end
end

if ~isempty(hdleda)
hdleda.SynToolOption = this.CLI.HDLSynthTool;
if strcmpi(hdleda.SynToolOption, 'Synplify')
    hdleda.SynScriptPostFix_S  = this.CLI.HDLSynthFilePostfix;
    hdleda.SynScriptInit_S = this.CLI.HDLSynthInit;
    hdleda.SynScriptCmd_S = this.CLI.HDLSynthCmd;
    hdleda.SynScriptTerm_S = this.CLI.HDLSynthTerm;
elseif strcmpi(hdleda.SynToolOption, 'Precision')
    hdleda.SynScriptPostFix_P  = this.CLI.HDLSynthFilePostfix;
    hdleda.SynScriptInit_P = this.CLI.HDLSynthInit;
    hdleda.SynScriptCmd_P = this.CLI.HDLSynthCmd;
    hdleda.SynScriptTerm_P = this.CLI.HDLSynthTerm;
elseif strcmpi(hdleda.SynToolOption, 'ISE')
    hdleda.SynScriptPostFix_I  = this.CLI.HDLSynthFilePostfix;
    hdleda.SynScriptInit_I = this.CLI.HDLSynthInit;
    hdleda.SynScriptCmd_I = this.CLI.HDLSynthCmd;
    hdleda.SynScriptTerm_I = this.CLI.HDLSynthTerm;
elseif strcmpi(hdleda.SynToolOption, 'Vivado')
    hdleda.SynScriptPostFix_V  = this.CLI.HDLSynthFilePostfix;
    hdleda.SynScriptInit_V = this.CLI.HDLSynthInit;
    hdleda.SynScriptCmd_V = this.CLI.HDLSynthCmd;
    hdleda.SynScriptTerm_V = this.CLI.HDLSynthTerm;
elseif strcmpi(hdleda.SynToolOption, 'Libero')
    hdleda.SynScriptPostFix_L  = this.CLI.HDLSynthFilePostfix;
    hdleda.SynScriptInit_L = this.CLI.HDLSynthInit;
    hdleda.SynScriptCmd_L = this.CLI.HDLSynthCmd;
    hdleda.SynScriptTerm_L = this.CLI.HDLSynthTerm;
elseif strcmpi(hdleda.SynToolOption, 'Quartus')
    hdleda.SynScriptPostFix_Q  = this.CLI.HDLSynthFilePostfix;
    hdleda.SynScriptInit_Q = this.CLI.HDLSynthInit;
    hdleda.SynScriptCmd_Q = this.CLI.HDLSynthCmd;
    hdleda.SynScriptTerm_Q = this.CLI.HDLSynthTerm;
elseif strcmpi(hdleda.SynToolOption, 'Custom')
    hdleda.SynScriptPostFix_C  = this.CLI.HDLSynthFilePostfix;
    hdleda.SynScriptInit_C = this.CLI.HDLSynthInit;
    hdleda.SynScriptCmd_C = this.CLI.HDLSynthCmd;
    hdleda.SynScriptTerm_C = this.CLI.HDLSynthTerm;
else
    hdleda.SynScriptPostFix  = '';
    hdleda.SynScriptInit ='';
    hdleda.SynScriptCmd ='';
    hdleda.SynScriptTerm ='';
end

% Lint Tool section
hdleda.LintToolOption = this.CLI.HDLLintTool;
Z = upper(hdleda.LintToolOption(1));

hdleda.('HDLLintCmd') = this.CLI.HDLLintCmd;
hdleda.('HDLLintInit') = this.CLI.HDLLintInit;
hdleda.('HDLLintTerm') = this.CLI.HDLLintTerm;

hdleda.(['HDLLintCmd_',Z]) = this.CLI.HDLLintCmd;
hdleda.(['HDLLintInit_',Z]) = this.CLI.HDLLintInit;
hdleda.(['HDLLintTerm_',Z]) = this.CLI.HDLLintTerm;

end

% LocalWords:  hdltb
