function pushPropsToCLI(this)
% some of the dialog properties are not directly sourced off of the CLI
% object; they are stored as class properties of various dialogs; push
% these into CLI at apply time

%   Copyright 2010-2023 The MathWorks, Inc.
%     


% update cli with params from hdlcc dialogs
hdltb = getsubcomponent(this,'hdlcoderui.hdltb');

if hdltb.edalinksinstalled
    %Cosim
    if hdltb.CosimModel == true
        if strcmpi(this.CLI.SimulationTool, 'Mentor Graphics ModelSim')
            this.CLI.GenerateCoSimModel = 'ModelSim';
        elseif strcmpi(this.CLI.SimulationTool, 'Cadence Incisive')
            this.CLI.GenerateCoSimModel = 'Incisive';
        elseif strcmpi(this.CLI.SimulationTool, 'Xilinx Vivado Simulator')
            this.CLI.GenerateCoSimModel = 'Vivado Simulator';
        else
            this.CLI.GenerateCoSimModel = 'None';
        end
    else
        this.CLI.GenerateCoSimModel = 'None';
    end
    %svdpi tb
    if hdltb.svdpi_tb
       if strcmpi(this.CLI.SimulationTool, 'Mentor Graphics ModelSim')
          this.CLI.GenerateSVDPITestBench='Modelsim';
       elseif strcmpi(this.CLI.SimulationTool, 'Cadence Incisive') 
          this.CLI.GenerateSVDPITestBench='Incisive'; 
       elseif strcmpi(this.CLI.SimulationTool, 'Xilinx Vivado Simulator')
            this.CLI.GenerateSVDPITestBench = 'Vivado Simulator';  
       elseif strcmpi(this.CLI.SimulationTool, 'Synopsys VCS')
            this.CLI.GenerateSVDPITestBench = 'VCS';     
       else
          this.CLI.GenerateSVDPITestBench='None';
       end 
    else
        this.CLI.GenerateSVDPITestBench='None';
    end
else
    this.CLI.GenerateCoSimModel = 'None';
    this.CLI.GenerateSVDPITestBench = 'None';
    this.CLI.HDLCodeCoverage = 'off';
end

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


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

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