codetools: find declaration: search in system units if program has no header

git-svn-id: trunk@30983 -
This commit is contained in:
mattias 2011-05-31 07:48:52 +00:00
parent e41d0bfaf5
commit 94614e7872

View File

@ -2823,6 +2823,15 @@ var
end;
end;
function SearchDefault: boolean;
begin
Result:=false;
if (not (fdfIgnoreUsedUnits in Params.Flags))
and FindIdentifierInHiddenUsedUnits(Params) then begin
Result:=CheckResult(true,false);
end;
end;
function SearchInSourceName: boolean;
// returns: true if ok to exit
// false if search should continue
@ -2844,10 +2853,6 @@ var
if not (fdfCollect in Params.Flags) then
exit;
end;
if (not (fdfIgnoreUsedUnits in Params.Flags))
and FindIdentifierInHiddenUsedUnits(Params) then begin
Result:=CheckResult(true,false);
end;
end;
function SearchInProperty: boolean;
@ -3224,6 +3229,9 @@ begin
DebugLn('[TFindDeclarationTool.FindIdentifierInContext] IgnoreCurContext ');
{$ENDIF}
end;
if LastContextNode=Tree.Root then begin
if SearchDefault then exit;
end;
if LastContextNode=ContextNode then begin
// same context -> search in prior context
if not LeavingContextIsPermitted then break;