From 6df73a9fb9ef7676640edb9de9f1a7d1772173b0 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 10 Jul 2006 15:21:33 +0000 Subject: [PATCH] codetools: not found identifiers of fdfcollect are not cached git-svn-id: trunk@9583 - --- components/codetools/finddeclarationcache.pas | 7 ++++--- components/codetools/finddeclarationtool.pas | 11 ++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/components/codetools/finddeclarationcache.pas b/components/codetools/finddeclarationcache.pas index 326bfe4168..914f559216 100644 --- a/components/codetools/finddeclarationcache.pas +++ b/components/codetools/finddeclarationcache.pas @@ -714,14 +714,15 @@ begin RaiseConflictException('NewNode is not a node of NewTool'); end; - {if GetIdentifier(Identifier)='TDefineAction' then begin + {if CompareIdentifiers(Identifier,'FillRect')=0 then begin DebugLn('[[[[======================================================'); - DebugLn('[TCodeTreeNodeCache.Add] Ident=',GetIdentifier(Identifier), + DebugLn(['[TCodeTreeNodeCache.Add] Ident=',GetIdentifier(Identifier), ' CleanStartPos=',CleanStartPos,' CleanEndPos=',CleanEndPos, ' Flags=[',NodeCacheEntryFlagsAsString(Flags),']', ' NewNode=',NewNode<>nil - ); + ]); DebugLn('======================================================]]]]'); + CTDumpStack; end;} if FItems=nil then FItems:=TAVLTree.Create(@CompareTCodeTreeNodeCacheEntry); diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index f57c734030..e851519e01 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -2022,7 +2022,7 @@ var DebugLn(' NewTool=',Params.NewCodeTool.MainFilename, ' NewNode=',Params.NewNode.DescAsString) else - DebugLn(' cache says: identifier NOT FOUND'); + DebugLn(' cache says: identifier does NOT exist'); if CompareSrcIdentifiers(Params.Identifier,'TDefineAction') then begin NodeCache.WriteDebugReport('NANUNANA: '); end; @@ -2054,7 +2054,7 @@ var end; function CheckResult(NewResult, CallOnIdentifierFound: boolean): boolean; - // returns: true if ok to exit + // returns: true to stop search // false if search should continue procedure RaiseNotFound; @@ -2127,8 +2127,8 @@ var // identifier was not found if not (fdfExceptionOnNotFound in Params.Flags) then exit; if (Params.Identifier<>nil) - and WordIsPredefinedIdentifier.DoIt(Params.Identifier) - and not (fdfExceptionOnPredefinedIdent in Params.Flags) then begin + and not (fdfExceptionOnPredefinedIdent in Params.Flags) + and WordIsPredefinedIdentifier.DoIt(Params.Identifier) then begin Params.SetResult(nil,nil); exit; end; @@ -2571,7 +2571,8 @@ begin end; end;} // if we are here, the identifier was not found - if (FirstSearchedNode<>nil) and (Params.FoundProc=nil) then begin + if (FirstSearchedNode<>nil) and (Params.FoundProc=nil) + and (not (fdfCollect in Params.Flags)) then begin // add result to cache Params.NewNode:=nil; Params.NewCodeTool:=nil;