IDE: rename unit, update references: added options

git-svn-id: trunk@19359 -
This commit is contained in:
mattias 2009-04-11 18:34:25 +00:00
parent 9f6ed9ea7d
commit d17044ea69
6 changed files with 183 additions and 73 deletions

View File

@ -95,13 +95,6 @@ type
);
TAmbiguousFileActions = set of TAmbiguousFileAction;
TCharCaseFileAction = (
ccfaAsk,
ccfaAutoRename,
ccfaIgnore
);
TCharCaseFileActions = set of TCharCaseFileAction;
const
AmbiguousFileActionNames: array[TAmbiguousFileAction] of string = (
'Ask',
@ -111,12 +104,36 @@ const
'Ignore'
);
type
TCharCaseFileAction = (
ccfaAsk,
ccfaAutoRename,
ccfaIgnore
);
TCharCaseFileActions = set of TCharCaseFileAction;
const
CharCaseFileActionNames: array[TCharCaseFileAction] of string = (
'Ask',
'AutoRename',
'Ignore'
);
type
TUnitRenameReferencesAction = (
urraAlways, // update references in other files
urraAsk, // scan, then ask, then update
urraNever // don't scan, don't ask, don't update
);
TUnitRenameReferencesActions = set of TUnitRenameReferencesAction;
const
UnitRenameReferencesActionNames: array[TUnitRenameReferencesAction] of string = (
'Always',
'Ask',
'Never'
);
type
{ TEnvironmentOptions - class for storing environment options }
@ -221,7 +238,8 @@ type
fPascalFileExtension: TPascalExtType;
fCharcaseFileAction : TCharCaseFileAction;
fAmbiguousFileAction: TAmbiguousFileAction;
FUnitRenameReferencesAction: TUnitRenameReferencesAction;
// lazdoc
FLazDocPaths: string;
@ -424,6 +442,8 @@ type
write fAmbiguousFileAction;
property CharcaseFileAction: TCharCaseFileAction read fCharcaseFileAction
write fCharcaseFileAction;
property UnitRenameReferencesAction: TUnitRenameReferencesAction
read FUnitRenameReferencesAction write FUnitRenameReferencesAction;
// lazdoc
property LazDocPaths: string read FLazDocPaths write FLazDocPaths;
@ -448,6 +468,7 @@ function DebuggerNameToType(const s: string): TDebuggerType;
function PascalExtToType(const Ext: string): TPascalExtType;
function AmbiguousFileActionNameToType(const Action: string): TAmbiguousFileAction;
function CharCaseFileActionNameToType(const Action: string): TCharCaseFileAction;
function UnitRenameReferencesActionNameToType(const Action: string): TUnitRenameReferencesAction;
function CheckFileChanged(const OldFilename, NewFilename: string): boolean;
function CheckExecutable(const OldFilename, NewFilename: string;
@ -487,23 +508,29 @@ end;
function AmbiguousFileActionNameToType(
const Action: string): TAmbiguousFileAction;
begin
for Result:=Low(TAmbiguousFileAction) to High(TAmbiguousFileAction) do begin
for Result:=Low(TAmbiguousFileAction) to High(TAmbiguousFileAction) do
if CompareText(AmbiguousFileActionNames[Result],Action)=0 then
exit;
end;
Result:=afaAsk;
end;
function CharCaseFileActionNameToType(
const Action: string): TCharCaseFileAction;
begin
for Result:=Low(TCharCaseFileAction) to High(TCharCaseFileAction) do begin
for Result:=Low(TCharCaseFileAction) to High(TCharCaseFileAction) do
if CompareText(CharCaseFileActionNames[Result],Action)=0 then
exit;
end;
Result:=ccfaAutoRename;
end;
function UnitRenameReferencesActionNameToType(const Action: string
): TUnitRenameReferencesAction;
begin
for Result:=Low(TUnitRenameReferencesAction) to High(TUnitRenameReferencesAction) do
if CompareText(UnitRenameReferencesActionNames[Result],Action)=0 then
exit;
Result:=urraAsk;
end;
function CheckFileChanged(const OldFilename,
NewFilename: string): boolean;
@ -664,6 +691,7 @@ begin
// naming
fPascalFileExtension:=petPAS;
fCharcaseFileAction:=ccfaAutoRename;
FUnitRenameReferencesAction:=urraAsk;
// lazdoc
FLazDocPaths:=SetDirSeparators(DefaultLazDocPath);
@ -950,12 +978,6 @@ begin
// naming
LoadPascalFileExt(Path+'');
//lazdoc
FLazDocPaths := XMLConfig.GetValue(Path+'LazDoc/Paths', DefaultLazDocPath);
if FileVersion<=105 then
FLazDocPaths:=LineBreaksToDelimiter(FLazDocPaths,';');
if FileVersion>=103 then begin
fCharcaseFileAction:=CharCaseFileActionNameToType(XMLConfig.GetValue(
Path+'CharcaseFileAction/Value',''));
@ -968,13 +990,19 @@ begin
else
fCharcaseFileAction:=ccfaIgnore;
end;
if FileVersion>=104 then
CurPath:=Path+'AmbiguousFileAction/Value'
else
CurPath:=Path+'AmbigiousFileAction/Value';
fAmbiguousFileAction:=AmbiguousFileActionNameToType(XMLConfig.GetValue(
CurPath,AmbiguousFileActionNames[fAmbiguousFileAction]));
FUnitRenameReferencesAction:=UnitRenameReferencesActionNameToType(XMLConfig.GetValue(
Path+'UnitRenameReferencesAction/Value',UnitRenameReferencesActionNames[urraAsk]));
//lazdoc
FLazDocPaths := XMLConfig.GetValue(Path+'LazDoc/Paths', DefaultLazDocPath);
if FileVersion<=105 then
FLazDocPaths:=LineBreaksToDelimiter(FLazDocPaths,';');
// 'new items'
FNewUnitTemplate:=XMLConfig.GetValue(Path+'New/UnitTemplate/Value',FileDescNamePascalUnit);
@ -1180,6 +1208,10 @@ begin
CharCaseFileActionNames[fCharcaseFileAction],
CharCaseFileActionNames[ccfaAutoRename]);
XMLConfig.SetDeleteValue(Path+'UnitRenameReferencesAction/Value',
UnitRenameReferencesActionNames[FUnitRenameReferencesAction],
UnitRenameReferencesActionNames[urraAsk]);
XMLConfig.SetDeleteValue(Path+'AutoDeleteAmbiguousSources/Value',
AmbiguousFileActionNames[fAmbiguousFileAction],
AmbiguousFileActionNames[afaAsk]);

View File

@ -1,19 +1,21 @@
inherited NamingOptionsFrame: TNamingOptionsFrame
Height = 367
Width = 507
ClientHeight = 367
ClientWidth = 507
ClientHeight = 363
ClientWidth = 503
TabOrder = 0
Visible = False
DesignLeft = 22
DesignTop = 29
DesignLeft = 374
DesignTop = 366
object PascalFileExtRadiogroup: TRadioGroup[0]
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 47
Width = 507
Top = 0
Width = 503
Align = alTop
AutoFill = True
Caption = 'PascalFileExtRadiogroup'
@ -33,9 +35,10 @@ inherited NamingOptionsFrame: TNamingOptionsFrame
AnchorSideTop.Control = CharcaseFileActionRadioGroup
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 100
Top = 53
Width = 507
Width = 503
Align = alTop
AutoFill = True
BorderSpacing.Top = 6
@ -56,9 +59,10 @@ inherited NamingOptionsFrame: TNamingOptionsFrame
AnchorSideTop.Control = AmbiguousFileActionRadioGroup
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 85
Top = 159
Width = 507
Width = 503
Align = alTop
AutoFill = True
BorderSpacing.Top = 6
@ -74,4 +78,25 @@ inherited NamingOptionsFrame: TNamingOptionsFrame
Columns = 2
TabOrder = 2
end
object UnitReferencesRadioGroup: TRadioGroup[3]
Left = 0
Height = 50
Top = 244
Width = 503
Align = alTop
AutoFill = True
AutoSize = True
Caption = 'UnitReferencesRadioGroup'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 3
Columns = 3
Constraints.MinHeight = 50
TabOrder = 3
end
end

View File

@ -2,38 +2,48 @@
LazarusResources.Add('TNamingOptionsFrame','FORMDATA',[
'TPF0'#241#19'TNamingOptionsFrame'#18'NamingOptionsFrame'#6'Height'#3'o'#1#5
+'Width'#3#251#1#12'ClientHeight'#3'o'#1#11'ClientWidth'#3#251#1#8'TabOrder'#2
+#0#7'Visible'#8#10'DesignLeft'#2#22#9'DesignTop'#2#29#0#242#2#0#11'TRadioGro'
+'up'#23'PascalFileExtRadiogroup'#22'AnchorSideLeft.Control'#7#5'Owner'#21'An'
+'chorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'A'
+'nchorSideRight.Side'#7#9'asrBottom'#6'Height'#2'/'#5'Width'#3#251#1#5'Align'
+#7#5'alTop'#8'AutoFill'#9#7'Caption'#6#23'PascalFileExtRadiogroup'#28'ChildS'
+'izing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSi'
+'zing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.Enlar'
+'geVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'
+#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18
+'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Cont'
+'rolsPerLine'#2#2#7'Columns'#2#2#8'TabOrder'#2#0#0#0#242#2#1#11'TRadioGroup'
+#29'AmbiguousFileActionRadioGroup'#22'AnchorSideLeft.Control'#7#5'Owner'#21
+'AnchorSideTop.Control'#7#28'CharcaseFileActionRadioGroup'#23'AnchorSideRigh'
+'t.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#6'Height'#2'd'
+#3'Top'#2'5'#5'Width'#3#251#1#5'Align'#7#5'alTop'#8'AutoFill'#9#17'BorderSpa'
+'cing.Top'#2#6#7'Caption'#6#29'AmbiguousFileActionRadioGroup'#28'ChildSizing'
+'.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.'
+'EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVer'
+'tical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14
+'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'Chil'
+'dSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Controls'
+'PerLine'#2#2#7'Columns'#2#2#8'TabOrder'#2#1#0#0#242#2#2#11'TRadioGroup'#28
+'CharcaseFileActionRadioGroup'#22'AnchorSideLeft.Control'#7#5'Owner'#21'Anch'
+'orSideTop.Control'#7#29'AmbiguousFileActionRadioGroup'#23'AnchorSideRight.C'
+'ontrol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#6'Height'#2'U'#3
+'Top'#3#159#0#5'Width'#3#251#1#5'Align'#7#5'alTop'#8'AutoFill'#9#17'BorderSp'
+'acing.Top'#2#6#7'Caption'#6#28'CharcaseFileActionRadioGroup'#28'ChildSizing'
+'.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.'
+'EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVer'
+'tical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14
+'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'Chil'
+'dSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Controls'
+'PerLine'#2#2#7'Columns'#2#2#8'TabOrder'#2#2#0#0#0
+'Width'#3#251#1#12'ClientHeight'#3'k'#1#11'ClientWidth'#3#247#1#8'TabOrder'#2
+#0#7'Visible'#8#10'DesignLeft'#3'v'#1#9'DesignTop'#3'n'#1#0#242#2#0#11'TRadi'
+'oGroup'#23'PascalFileExtRadiogroup'#22'AnchorSideLeft.Control'#7#5'Owner'#21
+'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20
+'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#2'/'#3'Top'#2#0#5
+'Width'#3#247#1#5'Align'#7#5'alTop'#8'AutoFill'#9#7'Caption'#6#23'PascalFile'
+'ExtRadiogroup'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBotto'
+'mSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResi'
+'ze'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'Child'
+'Sizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'
+#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBot'
+'tom'#27'ChildSizing.ControlsPerLine'#2#2#7'Columns'#2#2#8'TabOrder'#2#0#0#0
+#242#2#1#11'TRadioGroup'#29'AmbiguousFileActionRadioGroup'#22'AnchorSideLeft'
+'.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#28'CharcaseFileActionRadio'
+'Group'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9
+'asrBottom'#4'Left'#2#0#6'Height'#2'd'#3'Top'#2'5'#5'Width'#3#247#1#5'Align'
+#7#5'alTop'#8'AutoFill'#9#17'BorderSpacing.Top'#2#6#7'Caption'#6#29'Ambiguou'
+'sFileActionRadioGroup'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.'
+'TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousC'
+'hildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'
+#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.Shrink'
+'Vertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightTh'
+'enTopToBottom'#27'ChildSizing.ControlsPerLine'#2#2#7'Columns'#2#2#8'TabOrde'
+'r'#2#1#0#0#242#2#2#11'TRadioGroup'#28'CharcaseFileActionRadioGroup'#22'Anch'
+'orSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#29'AmbiguousFile'
+'ActionRadioGroup'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight'
+'.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#2'U'#3'Top'#3#159#0#5'Width'#3
+#247#1#5'Align'#7#5'alTop'#8'AutoFill'#9#17'BorderSpacing.Top'#2#6#7'Caption'
+#6#28'CharcaseFileActionRadioGroup'#28'ChildSizing.LeftRightSpacing'#2#6#28
+'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'cr'
+'sHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousC'
+'hildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildS'
+'izing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclL'
+'eftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#2#7'Columns'#2
+#2#8'TabOrder'#2#2#0#0#242#2#3#11'TRadioGroup'#24'UnitReferencesRadioGroup'#4
+'Left'#2#0#6'Height'#2'2'#3'Top'#3#244#0#5'Width'#3#247#1#5'Align'#7#5'alTop'
+#8'AutoFill'#9#8'AutoSize'#9#7'Caption'#6#24'UnitReferencesRadioGroup'#28'Ch'
+'ildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'Chi'
+'ldSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.E'
+'nlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizon'
+'tal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChild'
+'s'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizin'
+'g.ControlsPerLine'#2#3#7'Columns'#2#3#21'Constraints.MinHeight'#2'2'#8'TabO'
+'rder'#2#3#0#0#0
]);

View File

@ -36,6 +36,7 @@ type
AmbiguousFileActionRadioGroup: TRadioGroup;
CharcaseFileActionRadioGroup: TRadioGroup;
PascalFileExtRadiogroup: TRadioGroup;
UnitReferencesRadioGroup: TRadioGroup;
private
public
function GetTitle: String; override;
@ -72,6 +73,21 @@ begin
PascalFileExtRadiogroup.Columns:=PascalFileExtRadiogroup.Items.Count;
end;
with AmbiguousFileActionRadioGroup do
begin
Caption:=dlgAmbigFileAct;
with Items do
begin
BeginUpdate;
Add(dlgEnvAsk);
Add(dlgAutoDel);
Add(dlgAutoRen);
Add(dlgAmbigWarn);
Add(dlgIgnoreVerb);
EndUpdate;
end;
end;
with CharcaseFileActionRadioGroup do
begin
Caption:=dlgCharCaseFileAct;
@ -85,17 +101,15 @@ begin
end;
end;
with AmbiguousFileActionRadioGroup do
with UnitReferencesRadioGroup do
begin
Caption:=dlgAmbigFileAct;
Caption:=lisWhenAUnitIsRenamedUpdateReferences;
with Items do
begin
BeginUpdate;
Add(lisAlways);
Add(dlgEnvAsk);
Add(dlgAutoDel);
Add(dlgAutoRen);
Add(dlgAmbigWarn);
Add(dlgIgnoreVerb);
Add(lisNever);
EndUpdate;
end;
end;
@ -113,6 +127,7 @@ begin
CharCaseFileActionRadioGroup.ItemIndex := ord(CharCaseFileAction);
AmbiguousFileActionRadioGroup.ItemIndex := ord(AmbiguousFileAction);
UnitReferencesRadioGroup.ItemIndex := ord(UnitRenameReferencesAction);
end;
end;
@ -126,6 +141,7 @@ begin
PascalFileExtension := petPAS;
CharcaseFileAction := TCharCaseFileAction(CharcaseFileActionRadioGroup.ItemIndex);
AmbiguousFileAction := TAmbiguousFileAction(AmbiguousFileActionRadioGroup.ItemIndex);
UnitRenameReferencesAction := TUnitRenameReferencesAction(UnitReferencesRadioGroup.ItemIndex);
end;
end;

View File

@ -1020,9 +1020,13 @@ resourcestring
dlgAmbigFileAct = 'Ambiguous file action:';
dlgEnvAsk = 'Ask';
lisNever = 'Never';
dlgAutoDel = 'Auto delete file';
dlgAutoRen = 'Auto rename file lowercase';
dlgnoAutomaticRenaming = 'no automatic renaming';
lisWhenAUnitIsRenamedUpdateReferences = 'When a unit is renamed, update '
+'references ...';
lisAlways = 'Always';
dlgAmbigWarn = 'Warn on compile';
dlgIgnoreVerb = 'Ignore';
// OI colors
@ -2456,6 +2460,9 @@ resourcestring
lisCodeToolsDefsInvalidParent = 'Invalid parent';
lisACanNotHoldTControlsYouCanOnlyPutNonVisualComponen = 'A %s can not hold '
+'TControls.%sYou can only put non visual components on it.';
lisUpdateReferences = 'Update references?';
lisTheUnitIsUsedByOtherFilesUpdateReferencesAutomatic = 'The unit %s is '
+'used by other files.%sUpdate references automatically?';
lisCodeToolsDefsAutoCreatedNodesReadOnly = 'Auto created nodes can not be '
+'edited,%snor can they have non auto created child nodes.';
lisCodeToolsDefsInvalidParentNode = 'Invalid parent node';

View File

@ -863,7 +863,7 @@ type
function DoFindRenameIdentifier(Rename: boolean): TModalResult;
function DoReplaceUnitUse(OldFilename, OldUnitName,
NewFilename, NewUnitName: string;
IgnoreErrors, Quiet: boolean): TModalResult;
IgnoreErrors, Quiet, Confirm: boolean): TModalResult;
function DoShowAbstractMethods: TModalResult;
function DoRemoveEmptyMethods: TModalResult;
function DoRemoveUnusedUnits: TModalResult;
@ -7292,11 +7292,11 @@ begin
NewFilename:=ActiveUnitInfo.Filename;
if (OldUnitName<>NewUnitName)
or (CompareFilenames(OldFilename,NewFilename)<>0) then begin
Result:=mrOk;
{$IFDEF EnableReplaceUnitUse}
Result:=DoReplaceUnitUse(OldFilename,OldUnitName,NewFilename,NewUnitName,
true,true);
{$ENDIF}
if EnvironmentOptions.UnitRenameReferencesAction=urraNever then
Result:=mrOK
else
Result:=DoReplaceUnitUse(OldFilename,OldUnitName,NewFilename,NewUnitName,
true,true,EnvironmentOptions.UnitRenameReferencesAction=urraAsk);
if Result<>mrOk then exit;
end;
@ -14945,7 +14945,7 @@ begin
end;
function TMainIDE.DoReplaceUnitUse(OldFilename, OldUnitName, NewFilename,
NewUnitName: string; IgnoreErrors, Quiet: boolean): TModalResult;
NewUnitName: string; IgnoreErrors, Quiet, Confirm: boolean): TModalResult;
{ Replaces all references to a unit
}
@ -14957,6 +14957,7 @@ var
OldCodeCreated: Boolean;
PascalReferences: TAVLTree;
i: Integer;
MsgResult: TModalResult;
begin
if (CompareFilenames(OldFilename,NewFilename)=0)
and (OldUnitName=NewUnitName) then // compare unitnames case sensitive, maybe only the case changed
@ -15013,6 +15014,25 @@ begin
// replace
if (PascalReferences<>nil) and (PascalReferences.Count>0) then begin
if Confirm then begin
MsgResult:=IDEQuestionDialog(lisUpdateReferences,
Format(lisTheUnitIsUsedByOtherFilesUpdateReferencesAutomatic, [
OldUnitName, #13]), mtConfirmation,
[mrYes,mrNo,mrYesToAll,mrNoToAll],'');
case MsgResult of
mrYes: ;
mrYesToAll: EnvironmentOptions.UnitRenameReferencesAction:=urraAlways;
mrNoToAll:
begin
EnvironmentOptions.UnitRenameReferencesAction:=urraNever;
Result:=mrOk;
exit;
end;
else
Result:=mrOk;
exit;
end;
end;
if not CodeToolBoss.RenameIdentifier(PascalReferences,
OldUnitName,NewUnitName)
then begin