mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 13:50:06 +02:00
codetools: identifier completion+events: fixed collecting helpers, patch #28794
git-svn-id: trunk@49982 -
This commit is contained in:
parent
9c1c655448
commit
7eec3d4b45
@ -4986,7 +4986,7 @@ procedure TFindDeclarationTool.FindHelpersInContext(
|
|||||||
var
|
var
|
||||||
Node: TCodeTreeNode;
|
Node: TCodeTreeNode;
|
||||||
begin
|
begin
|
||||||
Node:=Params.StartNode;
|
Node:=Params.ContextNode;
|
||||||
Params.FNeedHelpers:=false;
|
Params.FNeedHelpers:=false;
|
||||||
while Node<>nil do
|
while Node<>nil do
|
||||||
begin
|
begin
|
||||||
@ -12193,9 +12193,16 @@ end;
|
|||||||
|
|
||||||
function TFindDeclarationParams.GetHelpers(HelperKind: TFDHelpersListKind;
|
function TFindDeclarationParams.GetHelpers(HelperKind: TFDHelpersListKind;
|
||||||
CreateIfNotExists: boolean): TFDHelpersList;
|
CreateIfNotExists: boolean): TFDHelpersList;
|
||||||
|
var
|
||||||
|
xLastContextNode: TCodeTreeNode;
|
||||||
begin
|
begin
|
||||||
if FNeedHelpers then
|
if FNeedHelpers then
|
||||||
|
begin
|
||||||
|
xLastContextNode:=ContextNode;
|
||||||
|
ContextNode:=StartNode;
|
||||||
StartTool.FindHelpersInContext(Self); // beware: this calls GetHelpers
|
StartTool.FindHelpersInContext(Self); // beware: this calls GetHelpers
|
||||||
|
ContextNode:=xLastContextNode;
|
||||||
|
end;
|
||||||
Result:=FHelpers[HelperKind];
|
Result:=FHelpers[HelperKind];
|
||||||
if (Result=nil) and CreateIfNotExists then begin
|
if (Result=nil) and CreateIfNotExists then begin
|
||||||
Result:=TFDHelpersList.Create(HelperKind);
|
Result:=TFDHelpersList.Create(HelperKind);
|
||||||
|
Loading…
Reference in New Issue
Block a user