codetools: identifier completion: do not add () for functions without parameters

git-svn-id: trunk@19998 -
This commit is contained in:
mattias 2009-05-17 01:26:28 +00:00
parent 5053abc1df
commit 0c0556f015

View File

@ -2266,12 +2266,24 @@ end;
function TIdentifierListItem.IsProcNodeWithParams: boolean;
var
ANode: TCodeTreeNode;
StartPos: Integer;
begin
Result:=(GetDesc=ctnProcedure);
if not Result then exit;
if (iliParamListValid in Flags) and (ParamList<>'') then exit(true);
ANode:=Node;
Result:=(ANode<>nil) and Tool.ProcNodeHasParamList(ANode);
if (iliParamListValid in Flags) then begin
StartPos:=1;
while (StartPos<=length(FParamList))
and (FParamList[StartPos] in [' ',#9,'(','[']) do
inc(StartPos);
if (StartPos<=length(FParamList))
and (FParamList[StartPos] in [')',']',';']) then
Result:=false
else
Result:=true;
end else begin
ANode:=Node;
Result:=(ANode<>nil) and Tool.ProcNodeHasParamList(ANode);
end;
end;
function TIdentifierListItem.IsPropertyWithParams: boolean;