IDE: Move "Enclose selection" from Source menu to Refactor menu.

git-svn-id: trunk@29722 -
This commit is contained in:
juha 2011-03-04 07:17:16 +00:00
parent c7a08aeb7f
commit dc92d03dc0
6 changed files with 12 additions and 15 deletions

View File

@ -402,7 +402,7 @@ procedure TEncloseSelectionDialog.EncloseSelectionDialogCREATE(Sender: TObject);
var
t: TEncloseSelectionType;
begin
Caption:=lisEncloseSelection;
Caption:=lisKMEncloseSelection;
TypeRadiogroup.Caption:=lisChooseStructureToEncloseSelection;
with TypeRadiogroup.Items do begin

View File

@ -2284,7 +2284,6 @@ resourcestring
uemMovePageRightmost='Move page rightmost';
uemRefactor = 'Refactoring';
uemCompleteCode = 'Complete Code';
uemEncloseSelection = 'Enclose Selection';
uemExtractProc = 'Extract Procedure';
uemInvertAssignment = 'Invert Assignment';
uemFindIdentifierReferences = 'Find Identifier References';
@ -2556,13 +2555,13 @@ resourcestring
// edit menu
srkmecSelectionTabs2Spaces = 'Convert tabs to spaces in selection';
lisKMEncloseSelection = 'Enclose selection';
lisKMEncloseSelection = 'Enclose selection';
srkmecInsertCharacter = 'Insert from Charactermap';
srkmecInsertGPLNotice = 'Insert GPL notice';
srkmecInsertLGPLNotice = 'Insert LGPL notice';
srkmecInsertModifiedLGPLNotice = 'Insert modified LGPL notice';
lisKMInsertUsername = 'Insert username';
lisKMInsertDateAndTime = 'Insert date and time';
lisKMInsertUsername = 'Insert username';
lisKMInsertDateAndTime = 'Insert date and time';
srkmecInsertUserName = 'Insert current username';
srkmecInsertDateTime = 'Insert current date and time';
srkmecInsertChangeLogEntry = 'Insert ChangeLog entry';
@ -4247,10 +4246,8 @@ resourcestring
lisHlpOptsDatabases = 'Databases';
// enclose selection dialog
lisEncloseSelection = 'Enclose Selection';
lisEnclose = 'Enclose';
lisChooseStructureToEncloseSelection =
'Choose structure to enclose selection';
lisChooseStructureToEncloseSelection = 'Choose structure to enclose selection';
lisErrors = 'Errors';
lisLFMFile = 'LFM file';

View File

@ -228,7 +228,6 @@ type
procedure mnuSourceClicked(Sender: TObject);
procedure mnuSourceIndentBlockClicked(Sender: TObject);
procedure mnuSourceUnindentBlockClicked(Sender: TObject);
procedure mnuSourceEncloseBlockClicked(Sender: TObject);
procedure mnuSourceUpperCaseBlockClicked(Sender: TObject);
procedure mnuSourceLowerCaseBlockClicked(Sender: TObject);
procedure mnuSourceTabsToSpacesBlockClicked(Sender: TObject);
@ -261,6 +260,7 @@ type
// refactor menu
procedure mnuRefactorClicked(Sender: TObject);
procedure mnuRefactorEncloseBlockClicked(Sender: TObject);
procedure mnuRefactorCompleteCodeClicked(Sender: TObject);
procedure mnuRefactorExtractProcClicked(Sender: TObject);
procedure mnuRefactorRenameIdentifierClicked(Sender: TObject);
@ -2404,7 +2404,6 @@ begin
mnuSource.OnClick:=@mnuSourceClicked;
itmSourceIndentBlock.OnClick:=@mnuSourceIndentBlockClicked;
itmSourceUnindentBlock.OnClick:=@mnuSourceUnindentBlockClicked;
itmSourceEncloseBlock.OnClick:=@mnuSourceEncloseBlockClicked;
itmSourceUpperCaseBlock.OnClick:=@mnuSourceUpperCaseBlockClicked;
itmSourceLowerCaseBlock.OnClick:=@mnuSourceLowerCaseBlockClicked;
itmSourceTabsToSpacesBlock.OnClick:=@mnuSourceTabsToSpacesBlockClicked;
@ -2443,6 +2442,7 @@ begin
with MainIDEBar do begin
mnuRefactor.OnClick:=@mnuRefactorClicked;
itmRefactorCompleteCode.OnClick:=@mnuRefactorCompleteCodeClicked;
itmSourceEncloseBlock.OnClick:=@mnuRefactorEncloseBlockClicked;
itmRefactorExtractProc.OnClick:=@mnuRefactorExtractProcClicked;
itmRefactorRenameIdentifier.OnClick:=@mnuRefactorRenameIdentifierClicked;
end;
@ -3762,7 +3762,6 @@ begin
//itmSourceBlockIndentation: TIDEMenuSection;
itmSourceIndentBlock.Enabled:=SelEditable;
itmSourceUnindentBlock.Enabled:=SelEditable;
itmSourceEncloseBlock.Enabled:=SelEditable;
itmSourceCommentBlock.Enabled:=SelEditable;
itmSourceUncommentBlock.Enabled:=SelEditable;
itmSourceConditionalBlock.Enabled:=SelEditable;
@ -3809,6 +3808,7 @@ begin
with MainIDEBar do begin
//itmRefactorMenuCodeTools: TIDEMenuSection;
itmRefactorCompleteCode.Enabled:=Editable;
itmSourceEncloseBlock.Enabled:=SelEditable;
itmRefactorExtractProc.Enabled:=SelEditable;
end;
end;
@ -17527,7 +17527,7 @@ begin
DoSourceEditorCommand(ecBlockUnindent);
end;
procedure TMainIDE.mnuSourceEncloseBlockClicked(Sender: TObject);
procedure TMainIDE.mnuRefactorEncloseBlockClicked(Sender: TObject);
begin
DoSourceEditorCommand(ecSelectionEnclose);
end;

View File

@ -154,7 +154,6 @@ type
//itmSourceBlockIndentation: TIDEMenuSection;
itmSourceIndentBlock: TIDEMenuCommand;
itmSourceUnindentBlock: TIDEMenuCommand;
itmSourceEncloseBlock: TIDEMenuCommand;
itmSourceCommentBlock: TIDEMenuCommand;
itmSourceUncommentBlock: TIDEMenuCommand;
itmSourceToggleComment: TIDEMenuCommand;
@ -190,6 +189,7 @@ type
//mnuRefactor: TIDEMenuSection;
//itmEditMenuCodeTools: TIDEMenuSection;
itmRefactorCompleteCode: TIDEMenuCommand;
itmSourceEncloseBlock: TIDEMenuCommand;
itmRefactorExtractProc: TIDEMenuCommand;
itmRefactorRenameIdentifier: TIDEMenuCommand;

View File

@ -493,7 +493,6 @@ begin
CreateMenuItem(ParentMI,itmSourceIndentBlock,'itmSourceIndentBlock',lisMenuIndentSelection,'menu_indent');
CreateMenuItem(ParentMI,itmSourceUnindentBlock,'itmSourceUnindentBlock',lisMenuUnindentSelection,'menu_unindent');
CreateMenuItem(ParentMI,itmSourceEncloseBlock,'itmSourceEncloseBlock',lisMenuEncloseSelection);
CreateMenuItem(ParentMI,itmSourceCommentBlock,'itmSourceCommentBlock',lisMenuCommentSelection, 'menu_comment');
CreateMenuItem(ParentMI,itmSourceUncommentBlock,'itmSourceUncommentBlock',lisMenuUncommentSelection, 'menu_uncomment');
CreateMenuItem(ParentMI,itmSourceToggleComment,'itmSourceToggleComment',lisMenuToggleComment, 'menu_comment');
@ -552,6 +551,7 @@ begin
CreateMenuSeparatorSection(mnuRefactor,itmRefactorMenuCodeTools,'itmRefactorMenuCodeTools');
ParentMI:=itmRefactorMenuCodeTools;
CreateMenuItem(ParentMI,itmRefactorCompleteCode,'itmRefactorCompleteCode',lisMenuCompleteCode);
CreateMenuItem(ParentMI,itmSourceEncloseBlock,'itmSourceEncloseBlock',lisMenuEncloseSelection);
CreateMenuItem(ParentMI,itmRefactorExtractProc,'itmRefactorExtractProc',lisMenuExtractProc);
CreateMenuItem(ParentMI,itmRefactorRenameIdentifier,'itmRefactorRenameIdentifier',lisMenuRenameIdentifier);
end;

View File

@ -1450,7 +1450,7 @@ begin
SrcEditMenuCompleteCode := RegisterIDEMenuCommand
(AParent,'CompleteCode', uemCompleteCode, nil, @ExecuteIdeMenuClick);
SrcEditMenuEncloseSelection := RegisterIDEMenuCommand
(AParent, 'EncloseSelection',uemEncloseSelection);
(AParent, 'EncloseSelection',lisKMEncloseSelection);
SrcEditMenuRenameIdentifier := RegisterIDEMenuCommand
(AParent, 'RenameIdentifier',uemRenameIdentifier, nil, @ExecuteIdeMenuClick);
SrcEditMenuFindIdentifierReferences := RegisterIDEMenuCommand