mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-01-04 11:20:38 +01:00
codetools: gather identifiers behind string constant dot
git-svn-id: trunk@50084 -
This commit is contained in:
parent
ccd0eeebaf
commit
649c60cea8
@ -2026,10 +2026,13 @@ begin
|
||||
Params.Flags:=Params.Flags+[fdfIgnoreCurContextNode];
|
||||
ExprType:=FindExpressionTypeOfTerm(ContextExprStartPos,IdentStartPos,
|
||||
Params,false);
|
||||
if (ExprType.Desc in xtAllIdentTypes) then begin
|
||||
if ExprType.Desc=xtContext then begin
|
||||
GatherContext:=ExprType.Context;
|
||||
//debugln(['TIdentCompletionTool.FindCollectionContext ',ExprTypeToString(ExprType)]);
|
||||
StartInSubContext:=true;
|
||||
end else begin
|
||||
// for example "string.|"
|
||||
GatherContext:=CleanFindContext;
|
||||
end;
|
||||
end;
|
||||
ExprType.Context := GatherContext;
|
||||
@ -2730,13 +2733,13 @@ begin
|
||||
Params.Flags:=Params.Flags+[fdfIgnoreCurContextNode];
|
||||
GatherContext.Tool.FindIdentifierInContext(Params);
|
||||
end else
|
||||
if ExprType.Desc in xtAllIdentPredefinedTypes then
|
||||
if ExprType.Desc in xtAllTypeHelperTypes then
|
||||
begin
|
||||
// gather all identifiers in cursor context for basic types (strings etc.)
|
||||
Params.ContextNode:=CursorNode;
|
||||
Params.SetIdentifier(Self,nil,@CollectAllIdentifiers);
|
||||
Params.Flags:=[fdfSearchInAncestors,fdfCollect,fdfFindVariable,fdfSearchInHelpers];
|
||||
CurrentIdentifierList.Context:=GatherContext;
|
||||
CurrentIdentifierList.Context:=CursorContext;
|
||||
FindIdentifierInBasicTypeHelpers(ExprType.Desc, Params);
|
||||
end;
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@ implementation
|
||||
begin
|
||||
'Hello'.Twice{declaration:bug28861_unit1.TStringHelper.Twice};
|
||||
'Hello'.Thrice{declaration:bug28861_unit1.TStringHelper.Thrice};
|
||||
'Hello'.GetTheLength{declaration:bug28861_unit1.TStringHelper.GetTheLength};
|
||||
'Hello'.{collectidentifiers:}
|
||||
'Hello'.TheLength{declaration:bug28861_unit1.TStringHelper.TheLength};
|
||||
end.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user