function LinkerOBJEditCallback(hObj, ~, ~, ~)
%LINKEROBJEDITCALLBACK Callback to edit the linker command file

% Copyright 2013-2020 MathWorks, Inc.

if codertarget.target.isCoderTarget(hObj.getConfigSet())
    regexpstr = '[.][.][\/\\]'; %Relative path ../ or ..\
    data = codertarget.data.getParameterValue(hObj, 'TargetLinkObj');    
    CMDName = data.Name;    
    if regexp(CMDName, regexpstr, 'once') == 1 %Relative path used for make file
        CMDName = regexprep(CMDName, regexpstr, '', 'once');
    end    
    CMDName = codertarget.utils.replaceTokens(hObj.getConfigSet(),CMDName);
    if exist(CMDName, 'file')==2
        edit(CMDName);
    else
        msg = DAStudio.message('TIC2000:blocks:BuildOptionFileDoesNotExist', CMDName);
        dp = DAStudio.DialogProvider;
        dp.errordlg(msg,'Warning: Coder Target', true);
    end
end

end