mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-02 08:03:38 +02:00
codetools: identifier completion: list global properties
git-svn-id: trunk@44254 -
This commit is contained in:
parent
e1fcd95d23
commit
c8dcad58c9
@ -2862,7 +2862,7 @@ var
|
||||
ctnVarDefinition, ctnConstDefinition:
|
||||
with Params do
|
||||
AddOperandPart(GetIdentifier(@NewCodeTool.Src[NewNode.StartPos]));
|
||||
ctnProperty:
|
||||
ctnProperty,ctnGlobalProperty:
|
||||
begin
|
||||
if fdfPropertyResolving in Params.Flags then begin
|
||||
if not PropNodeIsTypeLess(Params.NewNode)
|
||||
@ -3121,6 +3121,7 @@ var
|
||||
end;
|
||||
|
||||
function SearchInProperty: boolean;
|
||||
// search in ctnProperty, not ctnGlobalProperty
|
||||
// returns: true if ok to exit
|
||||
// false if search should continue
|
||||
begin
|
||||
@ -3128,10 +3129,8 @@ var
|
||||
if (fdfCollect in Params.Flags)
|
||||
or (Params.Identifier[0]<>'[') then begin
|
||||
MoveCursorToNodeStart(ContextNode);
|
||||
if (ContextNode.Desc=ctnProperty) then begin
|
||||
ReadNextAtom; // read keyword 'property'
|
||||
if UpAtomIs('CLASS') then ReadNextAtom;
|
||||
end;
|
||||
ReadNextAtom; // read keyword 'property'
|
||||
if UpAtomIs('CLASS') then ReadNextAtom;
|
||||
ReadNextAtom; // read name
|
||||
if (fdfCollect in Params.Flags)
|
||||
or CompareSrcIdentifiers(CurPos.StartPos,Params.Identifier) then begin
|
||||
|
@ -1133,7 +1133,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
ctnVarDefinition,ctnConstDefinition,ctnEnumIdentifier:
|
||||
ctnVarDefinition,ctnConstDefinition,ctnEnumIdentifier,ctnGlobalProperty:
|
||||
Ident:=@FoundContext.Tool.Src[FoundContext.Node.StartPos];
|
||||
|
||||
ctnProcedure,ctnProcedureHead:
|
||||
|
@ -3781,7 +3781,7 @@ begin
|
||||
end;
|
||||
|
||||
function TPascalParserTool.KeyWordFuncProperty: boolean;
|
||||
{
|
||||
{ global properties
|
||||
examples:
|
||||
property
|
||||
errno : cint read fpgeterrno write fpseterrno;
|
||||
|
@ -2856,6 +2856,7 @@ begin
|
||||
// ToDo: ppu, dcu
|
||||
|
||||
Result:=false;
|
||||
if PropNode.Desc<>ctnProperty then exit;
|
||||
if not MoveCursorToPropName(PropNode) then exit;
|
||||
ReadNextAtom; // read colon, skip parameters
|
||||
if CurPos.Flag=cafEdgedBracketOpen then begin
|
||||
|
Loading…
Reference in New Issue
Block a user