mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 20:10:20 +02:00
ide: find rename idenfifier of ctnUseUnit
This commit is contained in:
parent
3ac22c5abe
commit
4c647e3963
@ -239,12 +239,17 @@ var
|
|||||||
NamePos: TAtomPosition;
|
NamePos: TAtomPosition;
|
||||||
CodeXYPos, NewDeclCodeXY: TCodeXYPosition;
|
CodeXYPos, NewDeclCodeXY: TCodeXYPosition;
|
||||||
begin
|
begin
|
||||||
if not (DeclNode.Desc in [ctnUseUnitNamespace,ctnUseUnitClearName]) then
|
case DeclNode.Desc of
|
||||||
|
ctnUseUnit: ;
|
||||||
|
ctnUseUnitNamespace,ctnUseUnitClearName:
|
||||||
|
DeclNode:=DeclNode.Parent;
|
||||||
|
else
|
||||||
exit(true);
|
exit(true);
|
||||||
|
end;
|
||||||
// renaming a uses -> rename the unit
|
// renaming a uses -> rename the unit
|
||||||
// find unit
|
// find unit
|
||||||
Result:=false;
|
Result:=false;
|
||||||
aUnitName:=DeclTool.ExtractUsedUnitName(DeclNode.Parent,@InFilename);
|
aUnitName:=DeclTool.ExtractUsedUnitName(DeclNode,@InFilename);
|
||||||
if aUnitName='' then begin
|
if aUnitName='' then begin
|
||||||
Err(20250206143851,'ExtractUsedUnitName failed');
|
Err(20250206143851,'ExtractUsedUnitName failed');
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user