mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 12:00:42 +02:00
codetools: find declaration on result: jump via result type node
git-svn-id: trunk@30714 -
This commit is contained in:
parent
e770073129
commit
02459ee3e2
@ -6666,7 +6666,7 @@ var
|
|||||||
// operator: ctnVarDefinition,ctnIdentifier
|
// operator: ctnVarDefinition,ctnIdentifier
|
||||||
// function: ctnIdentifier
|
// function: ctnIdentifier
|
||||||
ExprType.Desc:=xtContext;
|
ExprType.Desc:=xtContext;
|
||||||
ExprType.Context.Node:=ProcNode.FirstChild;
|
ExprType.Context.Node:=ResultNode;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
ResultNode:=ResultNode.NextBrother;
|
ResultNode:=ResultNode.NextBrother;
|
||||||
@ -10476,8 +10476,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFindDeclarationParams.PrettifyResult;
|
procedure TFindDeclarationParams.PrettifyResult;
|
||||||
var
|
|
||||||
Node: TCodeTreeNode;
|
|
||||||
begin
|
begin
|
||||||
// adjust result for nicer position
|
// adjust result for nicer position
|
||||||
if (NewNode<>nil) then begin
|
if (NewNode<>nil) then begin
|
||||||
@ -10494,19 +10492,6 @@ begin
|
|||||||
NewNode:=NewNode.FirstChild;
|
NewNode:=NewNode.FirstChild;
|
||||||
NewCleanPos:=NewNode.StartPos;
|
NewCleanPos:=NewNode.StartPos;
|
||||||
end;
|
end;
|
||||||
ctnProcedureHead:
|
|
||||||
begin
|
|
||||||
// instead of jumping to the name, jump to the result variable/type
|
|
||||||
Node:=NewNode.FirstChild;
|
|
||||||
while Node<>nil do begin
|
|
||||||
if Node.Desc in [ctnVarDefinition,ctnIdentifier] then begin
|
|
||||||
NewNode:=Node;
|
|
||||||
NewCleanPos:=NewNode.StartPos;
|
|
||||||
break;
|
|
||||||
end;
|
|
||||||
Node:=Node.NextBrother;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
ctnGenericType:
|
ctnGenericType:
|
||||||
if (NewNode.FirstChild<>nil) then begin
|
if (NewNode.FirstChild<>nil) then begin
|
||||||
// Instead of jumping to the generic keyword,
|
// Instead of jumping to the generic keyword,
|
||||||
|
Loading…
Reference in New Issue
Block a user