mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 22:19:17 +02:00
Codetools: Support Codecompletion inside "with begin end" block. May fix other cases, too. Issue #0023782, patch from jefferywa.
git-svn-id: trunk@62470 -
This commit is contained in:
parent
56b70571c9
commit
29d750ae6a
@ -7490,6 +7490,7 @@ function TFindDeclarationTool.FindAncestorOfClassInheritance(
|
|||||||
var
|
var
|
||||||
InheritanceNode: TCodeTreeNode;
|
InheritanceNode: TCodeTreeNode;
|
||||||
ClassNode: TCodeTreeNode;
|
ClassNode: TCodeTreeNode;
|
||||||
|
SpecializeNode : TCodeTreeNode;
|
||||||
AncestorContext: TFindContext;
|
AncestorContext: TFindContext;
|
||||||
AncestorStartPos: LongInt;
|
AncestorStartPos: LongInt;
|
||||||
ExprType: TExpressionType;
|
ExprType: TExpressionType;
|
||||||
@ -7569,9 +7570,14 @@ begin
|
|||||||
if (AncestorContext.Node.Desc in [ctnTypeDefinition,ctnGenericType]) then
|
if (AncestorContext.Node.Desc in [ctnTypeDefinition,ctnGenericType]) then
|
||||||
begin
|
begin
|
||||||
Params:=TFindDeclarationParams.Create;
|
Params:=TFindDeclarationParams.Create;
|
||||||
|
if IdentifierNode.Desc=ctnSpecialize then begin
|
||||||
|
SpecializeNode:=IdentifierNode;
|
||||||
|
Params.SetGenericParamValues(Self, SpecializeNode);
|
||||||
|
end;
|
||||||
try
|
try
|
||||||
Params.Flags:=fdfDefaultForExpressions+[fdfFindChildren];
|
Params.Flags:=fdfDefaultForExpressions+[fdfFindChildren];
|
||||||
AncestorContext:=AncestorContext.Tool.FindBaseTypeOfNode(Params,AncestorContext.Node);
|
AncestorContext:=AncestorContext.Tool.FindBaseTypeOfNode(Params,AncestorContext.Node);
|
||||||
|
ResultParams.GenParams:=Params.GenParams;
|
||||||
finally
|
finally
|
||||||
Params.Free;
|
Params.Free;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user