diff --git a/components/codetools/codecompletiontool.pas b/components/codetools/codecompletiontool.pas index 86de783d85..06288a106d 100644 --- a/components/codetools/codecompletiontool.pas +++ b/components/codetools/codecompletiontool.pas @@ -1495,7 +1495,7 @@ const // find start of proc expression (e.g. Button1.Constrains.DoSomething) IsFunction:=false; FuncType:=''; - ProcExprStartPos:=FindStartOfVariable(ProcNameAtom.EndPos); + ProcExprStartPos:=FindStartOfTerm(ProcNameAtom.EndPos); if ProcExprStartPos<0 then exit; MoveCursorToCleanPos(ProcExprStartPos); ReadPriorAtom; diff --git a/components/codetools/extractproctool.pas b/components/codetools/extractproctool.pas index 8e53ff3b8b..0f73e0fb5b 100644 --- a/components/codetools/extractproctool.pas +++ b/components/codetools/extractproctool.pas @@ -1214,7 +1214,7 @@ type begin Result:=false; // find start of variable - VarStartPos:=FindStartOfVariable(CurPos.StartPos); + VarStartPos:=FindStartOfTerm(CurPos.StartPos); if (IgnoreIdentifiers<>nil) then begin if not CleanPosToCaret(VarStartPos,NewCodePos) then exit; if IgnoreIdentifiers.Find(@NewCodePos)<>nil then exit(true); diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index 0fbf25b8b7..c9528ff9a4 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -625,7 +625,7 @@ type function GetCurrentAtomType: TVariableAtomType; function FindEndOfVariable(StartPos: integer; ExceptionIfNoVariableStart, WithAsOperator: boolean): integer; - function FindStartOfVariable(EndPos: integer): integer; + function FindStartOfTerm(EndPos: integer): integer; function FindExpressionTypeOfVariable(StartPos, EndPos: integer; Params: TFindDeclarationParams; WithAsOperator: boolean): TExpressionType; function FindEndOfExpression(StartPos: integer): integer; @@ -5853,7 +5853,7 @@ begin Result:=CurPos.EndPos; end; -function TFindDeclarationTool.FindStartOfVariable(EndPos: integer): integer; +function TFindDeclarationTool.FindStartOfTerm(EndPos: integer): integer; { a variable can be combinations of 1. A.B 2. A().B @@ -5976,7 +5976,7 @@ var begin Result:=false; if StartPos<1 then - StartPos:=FindStartOfVariable(EndPos) + StartPos:=FindStartOfTerm(EndPos) else if EndPos<1 then EndPos:=FindEndOfVariable(StartPos,true,WithAsOperator); if (StartPos<1) then diff --git a/components/codetools/identcompletiontool.pas b/components/codetools/identcompletiontool.pas index 06586b6bcb..a20ae2f153 100644 --- a/components/codetools/identcompletiontool.pas +++ b/components/codetools/identcompletiontool.pas @@ -1516,7 +1516,7 @@ procedure TIdentCompletionTool.FindCollectionContext( ReadPriorAtom; if (CurPos.Flag=cafPoint) or (UpAtomIs('INHERITED')) then begin - Result:=FindStartOfVariable(IdentStartPos); + Result:=FindStartOfTerm(IdentStartPos); if Result0 then begin if StartPosOfVariable=IdentStartPos then begin // cursor is at start of an operand