mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 23:49:13 +02:00
ide: full compiler message template is shown, if no param name information is given for the message
git-svn-id: trunk@24331 -
This commit is contained in:
parent
7c1607e0b4
commit
4536384988
@ -4677,7 +4677,7 @@ begin
|
|||||||
AddHash(msgconf);
|
AddHash(msgconf);
|
||||||
end;
|
end;
|
||||||
msgconf.MsgType := AMsgType;
|
msgconf.MsgType := AMsgType;
|
||||||
msgconf.MsgText := AMsgText; //ReplaceParamsArray(ACompilerMsg, ReplaceParams);
|
msgconf.MsgText := AMsgText;
|
||||||
msgconf.Ignored := AIgnored;
|
msgconf.Ignored := AIgnored;
|
||||||
SetLength(prm, MaxMsgParams);
|
SetLength(prm, MaxMsgParams);
|
||||||
GetParams(AMsgIndex, prm, cnt);
|
GetParams(AMsgIndex, prm, cnt);
|
||||||
@ -4706,6 +4706,10 @@ var
|
|||||||
nm : Integer;
|
nm : Integer;
|
||||||
p : Integer;
|
p : Integer;
|
||||||
begin
|
begin
|
||||||
|
if length(ReplaceParams)=0 then begin
|
||||||
|
Result:=ACompilerMsg;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
i := 1;
|
i := 1;
|
||||||
p := 1;
|
p := 1;
|
||||||
Result := '';
|
Result := '';
|
||||||
@ -4715,8 +4719,11 @@ begin
|
|||||||
nm := 0;
|
nm := 0;
|
||||||
if GetNextNumber(ACompilerMsg, j, nm) then begin
|
if GetNextNumber(ACompilerMsg, j, nm) then begin
|
||||||
Result := Result + Copy(ACompilerMsg, p, i - p);
|
Result := Result + Copy(ACompilerMsg, p, i - p);
|
||||||
if nm <= length(ReplaceParams) then Result := Result + ReplaceParams[nm-1];
|
if nm <= length(ReplaceParams) then
|
||||||
p := j;
|
Result := Result + ReplaceParams[nm-1]
|
||||||
|
else
|
||||||
|
Result:=Result+'$'+IntToStr(nm);
|
||||||
|
p := j;
|
||||||
i := p;
|
i := p;
|
||||||
end else
|
end else
|
||||||
inc(i);
|
inc(i);
|
||||||
@ -4929,7 +4936,7 @@ end;
|
|||||||
|
|
||||||
function TCompilerMessageConfig.GetUserText(const ReplaceParams: array of string): string;
|
function TCompilerMessageConfig.GetUserText(const ReplaceParams: array of string): string;
|
||||||
begin
|
begin
|
||||||
Result := Format('%s', [ReplaceParamsArray(MsgText, ReplaceParams) ]);
|
Result := ReplaceParamsArray(MsgText, ReplaceParams);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCompilerMessageConfig.GetUserText: string;
|
function TCompilerMessageConfig.GetUserText: string;
|
||||||
@ -4939,7 +4946,8 @@ var
|
|||||||
begin
|
begin
|
||||||
if Assigned(fOwner) then begin
|
if Assigned(fOwner) then begin
|
||||||
SetLength(prm, MaxMsgParams);
|
SetLength(prm, MaxMsgParams);
|
||||||
fOwner.GetParams(MsgIndex, prm, cnt);
|
fOwner.GetParams(MsgIndex, prm, cnt);
|
||||||
|
SetLength(prm, cnt);
|
||||||
Result := GetUserText(prm);
|
Result := GetUserText(prm);
|
||||||
end else
|
end else
|
||||||
Result := GetUserText([]);
|
Result := GetUserText([]);
|
||||||
|
Loading…
Reference in New Issue
Block a user