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: ctnVarDefinition, ctnConstDefinition:
with Params do with Params do
AddOperandPart(GetIdentifier(@NewCodeTool.Src[NewNode.StartPos])); AddOperandPart(GetIdentifier(@NewCodeTool.Src[NewNode.StartPos]));
ctnProperty: ctnProperty,ctnGlobalProperty:
begin begin
if fdfPropertyResolving in Params.Flags then begin if fdfPropertyResolving in Params.Flags then begin
if not PropNodeIsTypeLess(Params.NewNode) if not PropNodeIsTypeLess(Params.NewNode)
@ -3121,6 +3121,7 @@ var
end; end;
function SearchInProperty: boolean; function SearchInProperty: boolean;
// search in ctnProperty, not ctnGlobalProperty
// returns: true if ok to exit // returns: true if ok to exit
// false if search should continue // false if search should continue
begin begin
@ -3128,10 +3129,8 @@ var
if (fdfCollect in Params.Flags) if (fdfCollect in Params.Flags)
or (Params.Identifier[0]<>'[') then begin or (Params.Identifier[0]<>'[') then begin
MoveCursorToNodeStart(ContextNode); MoveCursorToNodeStart(ContextNode);
if (ContextNode.Desc=ctnProperty) then begin ReadNextAtom; // read keyword 'property'
ReadNextAtom; // read keyword 'property' if UpAtomIs('CLASS') then ReadNextAtom;
if UpAtomIs('CLASS') then ReadNextAtom;
end;
ReadNextAtom; // read name ReadNextAtom; // read name
if (fdfCollect in Params.Flags) if (fdfCollect in Params.Flags)
or CompareSrcIdentifiers(CurPos.StartPos,Params.Identifier) then begin or CompareSrcIdentifiers(CurPos.StartPos,Params.Identifier) then begin

View File

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

View File

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

View File

@ -2856,6 +2856,7 @@ begin
// ToDo: ppu, dcu // ToDo: ppu, dcu
Result:=false; Result:=false;
if PropNode.Desc<>ctnProperty then exit;
if not MoveCursorToPropName(PropNode) then exit; if not MoveCursorToPropName(PropNode) then exit;
ReadNextAtom; // read colon, skip parameters ReadNextAtom; // read colon, skip parameters
if CurPos.Flag=cafEdgedBracketOpen then begin if CurPos.Flag=cafEdgedBracketOpen then begin