mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 17:55:55 +02:00
codetools: identifier completion: add system units
git-svn-id: trunk@25188 -
This commit is contained in:
parent
1a15552418
commit
03a54bdb36
@ -1182,6 +1182,22 @@ const
|
||||
CurrentIdentifierList.Add(NewItem);
|
||||
end;
|
||||
|
||||
procedure AddSystemUnit(const AnUnitName: PChar);
|
||||
var
|
||||
NewItem: TIdentifierListItem;
|
||||
begin
|
||||
NewItem:=TIdentifierListItem.Create(
|
||||
icompUnknown,
|
||||
false,
|
||||
CompilerFuncHistoryIndex,
|
||||
AnUnitName,
|
||||
CompilerFuncLevel,
|
||||
nil,
|
||||
nil,
|
||||
ctnUseUnit);
|
||||
CurrentIdentifierList.Add(NewItem);
|
||||
end;
|
||||
|
||||
var
|
||||
NewItem: TIdentifierListItem;
|
||||
ProcNode: TCodeTreeNode;
|
||||
@ -1269,6 +1285,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// system types
|
||||
AddBaseType('Char');
|
||||
AddBaseType('WideChar');
|
||||
AddBaseType('Real');
|
||||
@ -1302,6 +1319,19 @@ begin
|
||||
AddBaseConstant('Nil');
|
||||
AddBaseConstant('True');
|
||||
AddBaseConstant('False');
|
||||
|
||||
// system units
|
||||
AddSystemUnit('System');
|
||||
if (Scanner.CompilerMode in [cmDELPHI,cmOBJFPC])
|
||||
and (Scanner.PascalCompiler=pcFPC) then
|
||||
AddSystemUnit('ObjPas');
|
||||
if (Scanner.CompilerMode=cmMacPas)
|
||||
and (Scanner.PascalCompiler=pcFPC) then
|
||||
AddSystemUnit('MacPas');
|
||||
if (Scanner.CompilerModeSwitch=cmsObjectiveC1) then begin
|
||||
AddSystemUnit('ObjC');
|
||||
AddSystemUnit('ObjCBase');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIdentCompletionTool.GatherUsefulIdentifiers(CleanPos: integer;
|
||||
|
Loading…
Reference in New Issue
Block a user