mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-25 16:01:26 +02:00
codetools: added TCodeContextInfoItem.AsDebugString
git-svn-id: trunk@56506 -
This commit is contained in:
parent
0d87d46948
commit
c43215a213
@ -497,7 +497,7 @@ type
|
|||||||
Allowed: TFindFileAtCursorFlags = DefaultFindFileAtCursorAllowed;
|
Allowed: TFindFileAtCursorFlags = DefaultFindFileAtCursorAllowed;
|
||||||
StartPos: PCodeXYPosition = nil): boolean;
|
StartPos: PCodeXYPosition = nil): boolean;
|
||||||
|
|
||||||
// get code context
|
// get code context (aka parameter hints)
|
||||||
function FindCodeContext(Code: TCodeBuffer; X,Y: integer;
|
function FindCodeContext(Code: TCodeBuffer; X,Y: integer;
|
||||||
out CodeContexts: TCodeContextInfo): boolean;
|
out CodeContexts: TCodeContextInfo): boolean;
|
||||||
function ExtractProcedureHeader(Code: TCodeBuffer; X,Y: integer;
|
function ExtractProcedureHeader(Code: TCodeBuffer; X,Y: integer;
|
||||||
|
|||||||
@ -338,6 +338,7 @@ type
|
|||||||
Params: TStringList;
|
Params: TStringList;
|
||||||
ResultType: string;
|
ResultType: string;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
function AsDebugString(WithExpr: boolean): string;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCodeContextInfo }
|
{ TCodeContextInfo }
|
||||||
@ -4357,5 +4358,21 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCodeContextInfoItem.AsDebugString(WithExpr: boolean): string;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
Result:=ProcName+'(';
|
||||||
|
if Params<>nil then
|
||||||
|
for i:=0 to Params.Count-1 do begin
|
||||||
|
if i>0 then Result+=',';
|
||||||
|
Result+=Params[i];
|
||||||
|
end;
|
||||||
|
Result+=')';
|
||||||
|
if ResultType<>'' then Result+=':'+ResultType;
|
||||||
|
if WithExpr then
|
||||||
|
Result+=' '+ExprTypeToString(Expr);
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user