mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-30 22:22:40 +02:00
codetools: identifier completion: unit name of self
git-svn-id: trunk@37071 -
This commit is contained in:
parent
122d9d1daa
commit
5b0d16c0df
@ -2917,7 +2917,8 @@ var
|
||||
begin
|
||||
// identifier found
|
||||
{$IFDEF ShowTriedIdentifiers}
|
||||
DebugLn(' Source Name Identifier found="',GetIdentifier(Params.Identifier),'"');
|
||||
if not (fdfCollect in Params.Flags) then
|
||||
DebugLn(' Source Name Identifier found="',GetIdentifier(Params.Identifier),'"');
|
||||
{$ENDIF}
|
||||
Params.SetResult(Self,SrcNode,CurPos.StartPos);
|
||||
Result:=CheckResult(true,true);
|
||||
|
@ -865,6 +865,7 @@ var
|
||||
Node: TCodeTreeNode;
|
||||
ProtectedForeignClass: Boolean;
|
||||
Lvl: LongInt;
|
||||
NamePos: TAtomPosition;
|
||||
begin
|
||||
// proceed searching ...
|
||||
Result:=ifrProceedSearch;
|
||||
@ -1003,6 +1004,12 @@ begin
|
||||
if (FoundContext.Tool=Self) then begin
|
||||
Ident:=@Src[FoundContext.Node.StartPos];
|
||||
end;
|
||||
|
||||
ctnUnit,ctnProgram,ctnLibrary,ctnPackage:
|
||||
if (FoundContext.Tool=Self)
|
||||
and GetSourceNamePos(NamePos) then
|
||||
Ident:=@Src[NamePos.StartPos];
|
||||
|
||||
end;
|
||||
if Ident=nil then exit;
|
||||
|
||||
@ -1021,6 +1028,7 @@ begin
|
||||
end;
|
||||
|
||||
{$IFDEF ShowFoundIdents}
|
||||
if FoundContext.Tool=Self then
|
||||
DebugLn(' IDENT COLLECTED: ',NewItem.AsString);
|
||||
{$ENDIF}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user