mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 15:20:49 +02:00
codetools: identifier completion: do not add () for functions without parameters
git-svn-id: trunk@19998 -
This commit is contained in:
parent
5053abc1df
commit
0c0556f015
@ -2266,12 +2266,24 @@ end;
|
|||||||
function TIdentifierListItem.IsProcNodeWithParams: boolean;
|
function TIdentifierListItem.IsProcNodeWithParams: boolean;
|
||||||
var
|
var
|
||||||
ANode: TCodeTreeNode;
|
ANode: TCodeTreeNode;
|
||||||
|
StartPos: Integer;
|
||||||
begin
|
begin
|
||||||
Result:=(GetDesc=ctnProcedure);
|
Result:=(GetDesc=ctnProcedure);
|
||||||
if not Result then exit;
|
if not Result then exit;
|
||||||
if (iliParamListValid in Flags) and (ParamList<>'') then exit(true);
|
if (iliParamListValid in Flags) then begin
|
||||||
ANode:=Node;
|
StartPos:=1;
|
||||||
Result:=(ANode<>nil) and Tool.ProcNodeHasParamList(ANode);
|
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;
|
end;
|
||||||
|
|
||||||
function TIdentifierListItem.IsPropertyWithParams: boolean;
|
function TIdentifierListItem.IsPropertyWithParams: boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user