mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 09:17:53 +02:00
IDE: Revert part of "Find Identifier reference" changes. Allow renaming with same name, changes char case only.
This commit is contained in:
parent
c7c059282d
commit
25939375b1
@ -67,7 +67,6 @@ object FindRenameIdentifierDialog: TFindRenameIdentifierDialog
|
||||
BorderSpacing.Around = 6
|
||||
TabOrder = 2
|
||||
Text = 'NewEdit'
|
||||
OnChange = NewEditChange
|
||||
end
|
||||
object RenameCheckBox: TCheckBox
|
||||
Left = 6
|
||||
|
@ -71,13 +71,11 @@ type
|
||||
procedure FindRenameIdentifierDialogCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure HelpButtonClick(Sender: TObject);
|
||||
procedure NewEditChange(Sender: TObject);
|
||||
procedure RenameCheckBoxChange(Sender: TObject);
|
||||
private
|
||||
FAllowRename: boolean;
|
||||
FIdentifierFilename: string;
|
||||
FIdentifierPosition: TPoint;
|
||||
FIdentifier: string;
|
||||
FIsPrivate: boolean;
|
||||
procedure SetAllowRename(const AValue: boolean);
|
||||
procedure SetIsPrivate(const AValue: boolean);
|
||||
@ -776,11 +774,6 @@ begin
|
||||
OpenUrl('http://wiki.freepascal.org/IDE_Window:_Find_or_Rename_identifier');
|
||||
end;
|
||||
|
||||
procedure TFindRenameIdentifierDialog.NewEditChange(Sender: TObject);
|
||||
begin
|
||||
UpdateRename;
|
||||
end;
|
||||
|
||||
procedure TFindRenameIdentifierDialog.RenameCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
UpdateRename;
|
||||
@ -795,8 +788,6 @@ begin
|
||||
ButtonPanel1.OKButton.Caption:=lisFRIRenameAllReferences
|
||||
else
|
||||
ButtonPanel1.OKButton.Caption:=lisFRIFindReferences;
|
||||
ButtonPanel1.OKButton.Enabled := not NewEdit.Enabled or
|
||||
((NewEdit.Text <> FIdentifier) and (NewEdit.Text <> ''));
|
||||
end;
|
||||
|
||||
procedure TFindRenameIdentifierDialog.SetAllowRename(const AValue: boolean);
|
||||
@ -890,6 +881,7 @@ var
|
||||
ListOfCodeBuffer: TFPList;
|
||||
i: Integer;
|
||||
CurCode: TCodeBuffer;
|
||||
NewIdentifier: String;
|
||||
Tool: TCodeTool;
|
||||
CodeXY: TCodeXYPosition;
|
||||
CleanPos: integer;
|
||||
@ -915,12 +907,11 @@ begin
|
||||
ListOfCodeBuffer.Free;
|
||||
end;
|
||||
if CodeToolBoss.GetIdentifierAt(ACodeBuffer,
|
||||
NewIdentifierPosition.X,NewIdentifierPosition.Y,FIdentifier) then
|
||||
NewIdentifierPosition.X,NewIdentifierPosition.Y,NewIdentifier) then
|
||||
begin
|
||||
CurrentGroupBox.Caption:=Format(lisFRIIdentifier, [FIdentifier]);
|
||||
NewEdit.Text:=FIdentifier;
|
||||
end else
|
||||
FIdentifier := '';
|
||||
CurrentGroupBox.Caption:=Format(lisFRIIdentifier, [NewIdentifier]);
|
||||
NewEdit.Text:=NewIdentifier;
|
||||
end;
|
||||
// check if in implementation or private section
|
||||
if CodeToolBoss.Explore(ACodeBuffer,Tool,false) then begin
|
||||
CodeXY:=CodeXYPosition(NewIdentifierPosition.X,NewIdentifierPosition.Y,ACodeBuffer);
|
||||
|
Loading…
Reference in New Issue
Block a user