codetools: find declaration on result: jump via result type node

git-svn-id: trunk@30714 -
This commit is contained in:
mattias 2011-05-13 07:43:21 +00:00
parent e770073129
commit 02459ee3e2

View File

@ -6666,7 +6666,7 @@ var
// operator: ctnVarDefinition,ctnIdentifier
// function: ctnIdentifier
ExprType.Desc:=xtContext;
ExprType.Context.Node:=ProcNode.FirstChild;
ExprType.Context.Node:=ResultNode;
exit;
end;
ResultNode:=ResultNode.NextBrother;
@ -10476,8 +10476,6 @@ begin
end;
procedure TFindDeclarationParams.PrettifyResult;
var
Node: TCodeTreeNode;
begin
// adjust result for nicer position
if (NewNode<>nil) then begin
@ -10494,19 +10492,6 @@ begin
NewNode:=NewNode.FirstChild;
NewCleanPos:=NewNode.StartPos;
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:
if (NewNode.FirstChild<>nil) then begin
// Instead of jumping to the generic keyword,