From 712a0979f0396274fbe58edab58ae6153771c351 Mon Sep 17 00:00:00 2001 From: juha Date: Thu, 9 May 2013 08:56:19 +0000 Subject: [PATCH] Codetools: Improvement for FindContext for hidden methods. Part of issue #18929, patch from Anton git-svn-id: trunk@41085 - --- components/codetools/identcompletiontool.pas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/codetools/identcompletiontool.pas b/components/codetools/identcompletiontool.pas index 0b010fb717..0b4b7bc02c 100644 --- a/components/codetools/identcompletiontool.pas +++ b/components/codetools/identcompletiontool.pas @@ -719,7 +719,13 @@ var begin FIdentSearchItem.Identifier:=Identifier; // ignore ParamList (for checking function overloading) - AVLNode:=FIdentView.FindKey(FIdentSearchItem,@CompareIdentListSearchWithItemsWithoutParams); + AVLNode:=FIdentView.FindLeftMostKey(FIdentSearchItem, + @CompareIdentListSearchWithItemsWithoutParams); + while (AVLNode<>nil) + and not (TIdentifierListItem(AVLNode.Data).Node.Desc in [ctnProcedure,ctnProcedureHead]) + and (CompareIdentifiers(Identifier,PChar(TIdentifierListItem(AVLNode.Data).Identifier))=0) + do + AVLNode:=FIdentView.FindSuccessor(AVLNode); if AVLNode<>nil then Result:=TIdentifierListItem(AVLNode.Data) else