codetools: searching macpas unit in macpas mode

git-svn-id: trunk@9761 -
This commit is contained in:
mattias 2006-08-28 18:03:19 +00:00
parent ba9be92970
commit bb6be8d3c7

View File

@ -4619,17 +4619,19 @@ end;
function TFindDeclarationTool.FindIdentifierInHiddenUsedUnits(
Params: TFindDeclarationParams): boolean;
const
sutSystem = 1;
sutObjPas = 2;
sutLineInfo = 3;
sutHeapTrc = 4;
sutSysThrds = 5;
sutNone = 6;
type
SystemUnitType = (
sutSystem,
sutObjPas,
sutMacPas,
sutLineInfo,
sutHeapTrc,
sutSysThrds,
sutNone);
var
OldInput: TFindDeclarationInput;
SystemAlias: string;
CurUnitType: integer;
CurUnitType: SystemUnitType;
begin
Result:=false;
{$IFDEF ShowTriedContexts}
@ -4660,6 +4662,8 @@ begin
CurUnitType:=sutSystem
else if UpAtomIs('OBJPAS') then
CurUnitType:=sutObjPas
else if UpAtomIs('MACPAS') then
CurUnitType:=sutMacPas
else if UpAtomIs('LINEINFO') then
CurUnitType:=sutLineInfo
else if UpAtomIs('HEAPTRC') then
@ -4697,6 +4701,13 @@ begin
Result:=FindIdentifierInUsedUnit('ObjPas',Params);
if Result then exit;
end;
if (CurUnitType>sutMacPas)
and (Scanner.CompilerMode=cmMacPas)
and (Scanner.PascalCompiler=pcFPC) then begin
// try hidden used fpc unit 'macpas'
Result:=FindIdentifierInUsedUnit('MacPas',Params);
if Result then exit;
end;
if (CurUnitType>sutSystem) then begin
// try hidden used unit 'system'
if not CompareSrcIdentifiers(Params.Identifier,'system')