codetools: identifier completion: showing predefined identifiers self and result only at start of operand

git-svn-id: trunk@20890 -
This commit is contained in:
mattias 2009-07-18 17:33:42 +00:00
parent ec10c9cdd2
commit 201de2d822

View File

@ -1131,7 +1131,8 @@ begin
AddCompilerProcedure('Write','Args:Arguments');
AddCompilerProcedure('WriteLn','Args:Arguments');
if Context.Tool.NodeIsInAMethod(Context.Node)
if (ilcfStartOfOperand in CurrentIdentifierList.ContextFlags)
and Context.Tool.NodeIsInAMethod(Context.Node)
and (not CurrentIdentifierList.HasIdentifier('Self','')) then begin
// method body -> add 'Self'
NewItem:=TIdentifierListItem.Create(
@ -1146,7 +1147,8 @@ begin
CurrentIdentifierList.Add(NewItem);
end;
ProcNode:=Context.Node.GetNodeOfType(ctnProcedure);
if Context.Tool.NodeIsFunction(ProcNode)
if (ilcfStartOfOperand in CurrentIdentifierList.ContextFlags)
and Context.Tool.NodeIsFunction(ProcNode)
and (not CurrentIdentifierList.HasIdentifier('Result','')) then begin
// function body -> add 'Result'
NewItem:=TIdentifierListItem.Create(