codetools: identifier completion: list global properties

git-svn-id: trunk@44254 -
This commit is contained in:
mattias 2014-02-26 19:11:12 +00:00
parent e1fcd95d23
commit c8dcad58c9
4 changed files with 7 additions and 7 deletions

View File

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

View File

@ -1133,7 +1133,7 @@ begin
end;
end;
ctnVarDefinition,ctnConstDefinition,ctnEnumIdentifier:
ctnVarDefinition,ctnConstDefinition,ctnEnumIdentifier,ctnGlobalProperty:
Ident:=@FoundContext.Tool.Src[FoundContext.Node.StartPos];
ctnProcedure,ctnProcedureHead:

View File

@ -3781,7 +3781,7 @@ begin
end;
function TPascalParserTool.KeyWordFuncProperty: boolean;
{
{ global properties
examples:
property
errno : cint read fpgeterrno write fpseterrno;

View File

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