mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-29 05:50:36 +02:00
ide: find/rename identifier: fixed IsSourceName
This commit is contained in:
parent
1ef6c404e4
commit
164625520b
@ -95,7 +95,6 @@ type
|
|||||||
procedure SetAllowRename(const AValue: boolean);
|
procedure SetAllowRename(const AValue: boolean);
|
||||||
procedure SetIsPrivate(const AValue: boolean);
|
procedure SetIsPrivate(const AValue: boolean);
|
||||||
procedure SetFiles(const Files:TStringList);
|
procedure SetFiles(const Files:TStringList);
|
||||||
procedure SetIsSourceName(const AValue: boolean);
|
|
||||||
procedure UpdateRename;
|
procedure UpdateRename;
|
||||||
procedure GatherFiles;
|
procedure GatherFiles;
|
||||||
function NewIdentifierIsConflicted(var ErrMsg: string): boolean;
|
function NewIdentifierIsConflicted(var ErrMsg: string): boolean;
|
||||||
@ -107,13 +106,13 @@ type
|
|||||||
procedure LoadFromOptions(Options: TFindRenameIdentifierOptions);
|
procedure LoadFromOptions(Options: TFindRenameIdentifierOptions);
|
||||||
procedure SaveToOptions(Options: TFindRenameIdentifierOptions);
|
procedure SaveToOptions(Options: TFindRenameIdentifierOptions);
|
||||||
procedure SetIdentifier(const NewIdentifierFilename: string;
|
procedure SetIdentifier(const NewIdentifierFilename: string;
|
||||||
var NewIdentifierPosition: TPoint);
|
var NewIdentifierPosition: TPoint; IsSrcName: boolean);
|
||||||
|
|
||||||
property IdentifierFilename: string read FIdentifierFilename;
|
property IdentifierFilename: string read FIdentifierFilename;
|
||||||
property IdentifierPosition: TPoint read FIdentifierPosition;
|
property IdentifierPosition: TPoint read FIdentifierPosition;
|
||||||
property AllowRename: boolean read FAllowRename write SetAllowRename;
|
property AllowRename: boolean read FAllowRename write SetAllowRename;
|
||||||
property IsPrivate: boolean read FIsPrivate write SetIsPrivate;
|
property IsPrivate: boolean read FIsPrivate write SetIsPrivate;
|
||||||
property IsSourceName: boolean read FIsSourceName write SetIsSourceName;
|
property IsSourceName: boolean read FIsSourceName write FIsSourceName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ShowFindRenameIdentifierDialog(const Filename: string;
|
function ShowFindRenameIdentifierDialog(const Filename: string;
|
||||||
@ -173,9 +172,8 @@ begin
|
|||||||
FindRenameIdentifierDialog:=TFindRenameIdentifierDialog.Create(nil);
|
FindRenameIdentifierDialog:=TFindRenameIdentifierDialog.Create(nil);
|
||||||
try
|
try
|
||||||
FindRenameIdentifierDialog.LoadFromConfig;
|
FindRenameIdentifierDialog.LoadFromConfig;
|
||||||
FindRenameIdentifierDialog.SetIdentifier(Filename,Position);
|
FindRenameIdentifierDialog.SetIdentifier(Filename,Position,IsSourceName);
|
||||||
FindRenameIdentifierDialog.AllowRename:=AllowRename;
|
FindRenameIdentifierDialog.AllowRename:=AllowRename;
|
||||||
FindRenameIdentifierDialog.IsSourceName:=IsSourceName;
|
|
||||||
FindRenameIdentifierDialog.RenameCheckBox.Checked:=SetRenameActive and AllowRename;
|
FindRenameIdentifierDialog.RenameCheckBox.Checked:=SetRenameActive and AllowRename;
|
||||||
if Options<>nil then
|
if Options<>nil then
|
||||||
FindRenameIdentifierDialog.ShowResultCheckBox.Checked:=Options.RenameShowResult and AllowRename;
|
FindRenameIdentifierDialog.ShowResultCheckBox.Checked:=Options.RenameShowResult and AllowRename;
|
||||||
@ -1433,12 +1431,6 @@ begin
|
|||||||
FFiles.Assign(Files);
|
FFiles.Assign(Files);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFindRenameIdentifierDialog.SetIsSourceName(const AValue: boolean);
|
|
||||||
begin
|
|
||||||
if FIsSourceName=AValue then Exit;
|
|
||||||
FIsSourceName:=AValue;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TFindRenameIdentifierDialog.FindOrRenameButtonClick(Sender: TObject);
|
procedure TFindRenameIdentifierDialog.FindOrRenameButtonClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
ACodeBuffer:TCodeBuffer;
|
ACodeBuffer:TCodeBuffer;
|
||||||
@ -1657,8 +1649,8 @@ begin
|
|||||||
Options.Scope:=frCurrentUnit;
|
Options.Scope:=frCurrentUnit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFindRenameIdentifierDialog.SetIdentifier(
|
procedure TFindRenameIdentifierDialog.SetIdentifier(const NewIdentifierFilename: string;
|
||||||
const NewIdentifierFilename: string; var NewIdentifierPosition: TPoint);
|
var NewIdentifierPosition: TPoint; IsSrcName: boolean);
|
||||||
var
|
var
|
||||||
s: String;
|
s: String;
|
||||||
ACodeBuffer, CurCode: TCodeBuffer;
|
ACodeBuffer, CurCode: TCodeBuffer;
|
||||||
@ -1668,6 +1660,7 @@ var
|
|||||||
CleanPos: integer;
|
CleanPos: integer;
|
||||||
Node: TCodeTreeNode;
|
Node: TCodeTreeNode;
|
||||||
begin
|
begin
|
||||||
|
IsSourceName:=IsSrcName;
|
||||||
FIdentifierFilename:=NewIdentifierFilename;
|
FIdentifierFilename:=NewIdentifierFilename;
|
||||||
FIdentifierPosition:=NewIdentifierPosition;
|
FIdentifierPosition:=NewIdentifierPosition;
|
||||||
FNode:=nil;
|
FNode:=nil;
|
||||||
|
Loading…
Reference in New Issue
Block a user