codetools: not found identifiers of fdfcollect are not cached

git-svn-id: trunk@9583 -
This commit is contained in:
mattias 2006-07-10 15:21:33 +00:00
parent e28e38295b
commit 6df73a9fb9
2 changed files with 10 additions and 8 deletions

View File

@ -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);

View File

@ -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;