mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 13:56:00 +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
|
begin
|
||||||
// identifier found
|
// identifier found
|
||||||
{$IFDEF ShowTriedIdentifiers}
|
{$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}
|
{$ENDIF}
|
||||||
Params.SetResult(Self,SrcNode,CurPos.StartPos);
|
Params.SetResult(Self,SrcNode,CurPos.StartPos);
|
||||||
Result:=CheckResult(true,true);
|
Result:=CheckResult(true,true);
|
||||||
|
@ -865,6 +865,7 @@ var
|
|||||||
Node: TCodeTreeNode;
|
Node: TCodeTreeNode;
|
||||||
ProtectedForeignClass: Boolean;
|
ProtectedForeignClass: Boolean;
|
||||||
Lvl: LongInt;
|
Lvl: LongInt;
|
||||||
|
NamePos: TAtomPosition;
|
||||||
begin
|
begin
|
||||||
// proceed searching ...
|
// proceed searching ...
|
||||||
Result:=ifrProceedSearch;
|
Result:=ifrProceedSearch;
|
||||||
@ -1003,6 +1004,12 @@ begin
|
|||||||
if (FoundContext.Tool=Self) then begin
|
if (FoundContext.Tool=Self) then begin
|
||||||
Ident:=@Src[FoundContext.Node.StartPos];
|
Ident:=@Src[FoundContext.Node.StartPos];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
ctnUnit,ctnProgram,ctnLibrary,ctnPackage:
|
||||||
|
if (FoundContext.Tool=Self)
|
||||||
|
and GetSourceNamePos(NamePos) then
|
||||||
|
Ident:=@Src[NamePos.StartPos];
|
||||||
|
|
||||||
end;
|
end;
|
||||||
if Ident=nil then exit;
|
if Ident=nil then exit;
|
||||||
|
|
||||||
@ -1021,6 +1028,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF ShowFoundIdents}
|
{$IFDEF ShowFoundIdents}
|
||||||
|
if FoundContext.Tool=Self then
|
||||||
DebugLn(' IDENT COLLECTED: ',NewItem.AsString);
|
DebugLn(' IDENT COLLECTED: ',NewItem.AsString);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user