function setupCodeView(this)
%% SETUPCODEVIEW sets up the code view state for fixed point tool 

%   Copyright 2018 The MathWorks, Inc.

    % We need to enable codeview if MLFb results are present
    if ~isempty(this.StartupController)
        this.StartupController.publishEnableCodeView;
    end

    % Notify F2F and Code View (if open) that a simulation has completed
    % and run updating is complete.
    this.getExternalViewer.markSimCompleted();
    % Re-enable code view if present
    this.enableCodeView(true);
end

