mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 06:16:05 +02:00
IDE: Move "Enclose selection" from Source menu to Refactor menu.
git-svn-id: trunk@29722 -
This commit is contained in:
parent
c7a08aeb7f
commit
dc92d03dc0
@ -402,7 +402,7 @@ procedure TEncloseSelectionDialog.EncloseSelectionDialogCREATE(Sender: TObject);
|
|||||||
var
|
var
|
||||||
t: TEncloseSelectionType;
|
t: TEncloseSelectionType;
|
||||||
begin
|
begin
|
||||||
Caption:=lisEncloseSelection;
|
Caption:=lisKMEncloseSelection;
|
||||||
|
|
||||||
TypeRadiogroup.Caption:=lisChooseStructureToEncloseSelection;
|
TypeRadiogroup.Caption:=lisChooseStructureToEncloseSelection;
|
||||||
with TypeRadiogroup.Items do begin
|
with TypeRadiogroup.Items do begin
|
||||||
|
@ -2284,7 +2284,6 @@ resourcestring
|
|||||||
uemMovePageRightmost='Move page rightmost';
|
uemMovePageRightmost='Move page rightmost';
|
||||||
uemRefactor = 'Refactoring';
|
uemRefactor = 'Refactoring';
|
||||||
uemCompleteCode = 'Complete Code';
|
uemCompleteCode = 'Complete Code';
|
||||||
uemEncloseSelection = 'Enclose Selection';
|
|
||||||
uemExtractProc = 'Extract Procedure';
|
uemExtractProc = 'Extract Procedure';
|
||||||
uemInvertAssignment = 'Invert Assignment';
|
uemInvertAssignment = 'Invert Assignment';
|
||||||
uemFindIdentifierReferences = 'Find Identifier References';
|
uemFindIdentifierReferences = 'Find Identifier References';
|
||||||
@ -2556,13 +2555,13 @@ resourcestring
|
|||||||
|
|
||||||
// edit menu
|
// edit menu
|
||||||
srkmecSelectionTabs2Spaces = 'Convert tabs to spaces in selection';
|
srkmecSelectionTabs2Spaces = 'Convert tabs to spaces in selection';
|
||||||
lisKMEncloseSelection = 'Enclose selection';
|
lisKMEncloseSelection = 'Enclose selection';
|
||||||
srkmecInsertCharacter = 'Insert from Charactermap';
|
srkmecInsertCharacter = 'Insert from Charactermap';
|
||||||
srkmecInsertGPLNotice = 'Insert GPL notice';
|
srkmecInsertGPLNotice = 'Insert GPL notice';
|
||||||
srkmecInsertLGPLNotice = 'Insert LGPL notice';
|
srkmecInsertLGPLNotice = 'Insert LGPL notice';
|
||||||
srkmecInsertModifiedLGPLNotice = 'Insert modified LGPL notice';
|
srkmecInsertModifiedLGPLNotice = 'Insert modified LGPL notice';
|
||||||
lisKMInsertUsername = 'Insert username';
|
lisKMInsertUsername = 'Insert username';
|
||||||
lisKMInsertDateAndTime = 'Insert date and time';
|
lisKMInsertDateAndTime = 'Insert date and time';
|
||||||
srkmecInsertUserName = 'Insert current username';
|
srkmecInsertUserName = 'Insert current username';
|
||||||
srkmecInsertDateTime = 'Insert current date and time';
|
srkmecInsertDateTime = 'Insert current date and time';
|
||||||
srkmecInsertChangeLogEntry = 'Insert ChangeLog entry';
|
srkmecInsertChangeLogEntry = 'Insert ChangeLog entry';
|
||||||
@ -4247,10 +4246,8 @@ resourcestring
|
|||||||
lisHlpOptsDatabases = 'Databases';
|
lisHlpOptsDatabases = 'Databases';
|
||||||
|
|
||||||
// enclose selection dialog
|
// enclose selection dialog
|
||||||
lisEncloseSelection = 'Enclose Selection';
|
|
||||||
lisEnclose = 'Enclose';
|
lisEnclose = 'Enclose';
|
||||||
lisChooseStructureToEncloseSelection =
|
lisChooseStructureToEncloseSelection = 'Choose structure to enclose selection';
|
||||||
'Choose structure to enclose selection';
|
|
||||||
|
|
||||||
lisErrors = 'Errors';
|
lisErrors = 'Errors';
|
||||||
lisLFMFile = 'LFM file';
|
lisLFMFile = 'LFM file';
|
||||||
|
@ -228,7 +228,6 @@ type
|
|||||||
procedure mnuSourceClicked(Sender: TObject);
|
procedure mnuSourceClicked(Sender: TObject);
|
||||||
procedure mnuSourceIndentBlockClicked(Sender: TObject);
|
procedure mnuSourceIndentBlockClicked(Sender: TObject);
|
||||||
procedure mnuSourceUnindentBlockClicked(Sender: TObject);
|
procedure mnuSourceUnindentBlockClicked(Sender: TObject);
|
||||||
procedure mnuSourceEncloseBlockClicked(Sender: TObject);
|
|
||||||
procedure mnuSourceUpperCaseBlockClicked(Sender: TObject);
|
procedure mnuSourceUpperCaseBlockClicked(Sender: TObject);
|
||||||
procedure mnuSourceLowerCaseBlockClicked(Sender: TObject);
|
procedure mnuSourceLowerCaseBlockClicked(Sender: TObject);
|
||||||
procedure mnuSourceTabsToSpacesBlockClicked(Sender: TObject);
|
procedure mnuSourceTabsToSpacesBlockClicked(Sender: TObject);
|
||||||
@ -261,6 +260,7 @@ type
|
|||||||
|
|
||||||
// refactor menu
|
// refactor menu
|
||||||
procedure mnuRefactorClicked(Sender: TObject);
|
procedure mnuRefactorClicked(Sender: TObject);
|
||||||
|
procedure mnuRefactorEncloseBlockClicked(Sender: TObject);
|
||||||
procedure mnuRefactorCompleteCodeClicked(Sender: TObject);
|
procedure mnuRefactorCompleteCodeClicked(Sender: TObject);
|
||||||
procedure mnuRefactorExtractProcClicked(Sender: TObject);
|
procedure mnuRefactorExtractProcClicked(Sender: TObject);
|
||||||
procedure mnuRefactorRenameIdentifierClicked(Sender: TObject);
|
procedure mnuRefactorRenameIdentifierClicked(Sender: TObject);
|
||||||
@ -2404,7 +2404,6 @@ begin
|
|||||||
mnuSource.OnClick:=@mnuSourceClicked;
|
mnuSource.OnClick:=@mnuSourceClicked;
|
||||||
itmSourceIndentBlock.OnClick:=@mnuSourceIndentBlockClicked;
|
itmSourceIndentBlock.OnClick:=@mnuSourceIndentBlockClicked;
|
||||||
itmSourceUnindentBlock.OnClick:=@mnuSourceUnindentBlockClicked;
|
itmSourceUnindentBlock.OnClick:=@mnuSourceUnindentBlockClicked;
|
||||||
itmSourceEncloseBlock.OnClick:=@mnuSourceEncloseBlockClicked;
|
|
||||||
itmSourceUpperCaseBlock.OnClick:=@mnuSourceUpperCaseBlockClicked;
|
itmSourceUpperCaseBlock.OnClick:=@mnuSourceUpperCaseBlockClicked;
|
||||||
itmSourceLowerCaseBlock.OnClick:=@mnuSourceLowerCaseBlockClicked;
|
itmSourceLowerCaseBlock.OnClick:=@mnuSourceLowerCaseBlockClicked;
|
||||||
itmSourceTabsToSpacesBlock.OnClick:=@mnuSourceTabsToSpacesBlockClicked;
|
itmSourceTabsToSpacesBlock.OnClick:=@mnuSourceTabsToSpacesBlockClicked;
|
||||||
@ -2443,6 +2442,7 @@ begin
|
|||||||
with MainIDEBar do begin
|
with MainIDEBar do begin
|
||||||
mnuRefactor.OnClick:=@mnuRefactorClicked;
|
mnuRefactor.OnClick:=@mnuRefactorClicked;
|
||||||
itmRefactorCompleteCode.OnClick:=@mnuRefactorCompleteCodeClicked;
|
itmRefactorCompleteCode.OnClick:=@mnuRefactorCompleteCodeClicked;
|
||||||
|
itmSourceEncloseBlock.OnClick:=@mnuRefactorEncloseBlockClicked;
|
||||||
itmRefactorExtractProc.OnClick:=@mnuRefactorExtractProcClicked;
|
itmRefactorExtractProc.OnClick:=@mnuRefactorExtractProcClicked;
|
||||||
itmRefactorRenameIdentifier.OnClick:=@mnuRefactorRenameIdentifierClicked;
|
itmRefactorRenameIdentifier.OnClick:=@mnuRefactorRenameIdentifierClicked;
|
||||||
end;
|
end;
|
||||||
@ -3762,7 +3762,6 @@ begin
|
|||||||
//itmSourceBlockIndentation: TIDEMenuSection;
|
//itmSourceBlockIndentation: TIDEMenuSection;
|
||||||
itmSourceIndentBlock.Enabled:=SelEditable;
|
itmSourceIndentBlock.Enabled:=SelEditable;
|
||||||
itmSourceUnindentBlock.Enabled:=SelEditable;
|
itmSourceUnindentBlock.Enabled:=SelEditable;
|
||||||
itmSourceEncloseBlock.Enabled:=SelEditable;
|
|
||||||
itmSourceCommentBlock.Enabled:=SelEditable;
|
itmSourceCommentBlock.Enabled:=SelEditable;
|
||||||
itmSourceUncommentBlock.Enabled:=SelEditable;
|
itmSourceUncommentBlock.Enabled:=SelEditable;
|
||||||
itmSourceConditionalBlock.Enabled:=SelEditable;
|
itmSourceConditionalBlock.Enabled:=SelEditable;
|
||||||
@ -3809,6 +3808,7 @@ begin
|
|||||||
with MainIDEBar do begin
|
with MainIDEBar do begin
|
||||||
//itmRefactorMenuCodeTools: TIDEMenuSection;
|
//itmRefactorMenuCodeTools: TIDEMenuSection;
|
||||||
itmRefactorCompleteCode.Enabled:=Editable;
|
itmRefactorCompleteCode.Enabled:=Editable;
|
||||||
|
itmSourceEncloseBlock.Enabled:=SelEditable;
|
||||||
itmRefactorExtractProc.Enabled:=SelEditable;
|
itmRefactorExtractProc.Enabled:=SelEditable;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -17527,7 +17527,7 @@ begin
|
|||||||
DoSourceEditorCommand(ecBlockUnindent);
|
DoSourceEditorCommand(ecBlockUnindent);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.mnuSourceEncloseBlockClicked(Sender: TObject);
|
procedure TMainIDE.mnuRefactorEncloseBlockClicked(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
DoSourceEditorCommand(ecSelectionEnclose);
|
DoSourceEditorCommand(ecSelectionEnclose);
|
||||||
end;
|
end;
|
||||||
|
@ -154,7 +154,6 @@ type
|
|||||||
//itmSourceBlockIndentation: TIDEMenuSection;
|
//itmSourceBlockIndentation: TIDEMenuSection;
|
||||||
itmSourceIndentBlock: TIDEMenuCommand;
|
itmSourceIndentBlock: TIDEMenuCommand;
|
||||||
itmSourceUnindentBlock: TIDEMenuCommand;
|
itmSourceUnindentBlock: TIDEMenuCommand;
|
||||||
itmSourceEncloseBlock: TIDEMenuCommand;
|
|
||||||
itmSourceCommentBlock: TIDEMenuCommand;
|
itmSourceCommentBlock: TIDEMenuCommand;
|
||||||
itmSourceUncommentBlock: TIDEMenuCommand;
|
itmSourceUncommentBlock: TIDEMenuCommand;
|
||||||
itmSourceToggleComment: TIDEMenuCommand;
|
itmSourceToggleComment: TIDEMenuCommand;
|
||||||
@ -190,6 +189,7 @@ type
|
|||||||
//mnuRefactor: TIDEMenuSection;
|
//mnuRefactor: TIDEMenuSection;
|
||||||
//itmEditMenuCodeTools: TIDEMenuSection;
|
//itmEditMenuCodeTools: TIDEMenuSection;
|
||||||
itmRefactorCompleteCode: TIDEMenuCommand;
|
itmRefactorCompleteCode: TIDEMenuCommand;
|
||||||
|
itmSourceEncloseBlock: TIDEMenuCommand;
|
||||||
itmRefactorExtractProc: TIDEMenuCommand;
|
itmRefactorExtractProc: TIDEMenuCommand;
|
||||||
itmRefactorRenameIdentifier: TIDEMenuCommand;
|
itmRefactorRenameIdentifier: TIDEMenuCommand;
|
||||||
|
|
||||||
|
@ -493,7 +493,6 @@ begin
|
|||||||
|
|
||||||
CreateMenuItem(ParentMI,itmSourceIndentBlock,'itmSourceIndentBlock',lisMenuIndentSelection,'menu_indent');
|
CreateMenuItem(ParentMI,itmSourceIndentBlock,'itmSourceIndentBlock',lisMenuIndentSelection,'menu_indent');
|
||||||
CreateMenuItem(ParentMI,itmSourceUnindentBlock,'itmSourceUnindentBlock',lisMenuUnindentSelection,'menu_unindent');
|
CreateMenuItem(ParentMI,itmSourceUnindentBlock,'itmSourceUnindentBlock',lisMenuUnindentSelection,'menu_unindent');
|
||||||
CreateMenuItem(ParentMI,itmSourceEncloseBlock,'itmSourceEncloseBlock',lisMenuEncloseSelection);
|
|
||||||
CreateMenuItem(ParentMI,itmSourceCommentBlock,'itmSourceCommentBlock',lisMenuCommentSelection, 'menu_comment');
|
CreateMenuItem(ParentMI,itmSourceCommentBlock,'itmSourceCommentBlock',lisMenuCommentSelection, 'menu_comment');
|
||||||
CreateMenuItem(ParentMI,itmSourceUncommentBlock,'itmSourceUncommentBlock',lisMenuUncommentSelection, 'menu_uncomment');
|
CreateMenuItem(ParentMI,itmSourceUncommentBlock,'itmSourceUncommentBlock',lisMenuUncommentSelection, 'menu_uncomment');
|
||||||
CreateMenuItem(ParentMI,itmSourceToggleComment,'itmSourceToggleComment',lisMenuToggleComment, 'menu_comment');
|
CreateMenuItem(ParentMI,itmSourceToggleComment,'itmSourceToggleComment',lisMenuToggleComment, 'menu_comment');
|
||||||
@ -552,6 +551,7 @@ begin
|
|||||||
CreateMenuSeparatorSection(mnuRefactor,itmRefactorMenuCodeTools,'itmRefactorMenuCodeTools');
|
CreateMenuSeparatorSection(mnuRefactor,itmRefactorMenuCodeTools,'itmRefactorMenuCodeTools');
|
||||||
ParentMI:=itmRefactorMenuCodeTools;
|
ParentMI:=itmRefactorMenuCodeTools;
|
||||||
CreateMenuItem(ParentMI,itmRefactorCompleteCode,'itmRefactorCompleteCode',lisMenuCompleteCode);
|
CreateMenuItem(ParentMI,itmRefactorCompleteCode,'itmRefactorCompleteCode',lisMenuCompleteCode);
|
||||||
|
CreateMenuItem(ParentMI,itmSourceEncloseBlock,'itmSourceEncloseBlock',lisMenuEncloseSelection);
|
||||||
CreateMenuItem(ParentMI,itmRefactorExtractProc,'itmRefactorExtractProc',lisMenuExtractProc);
|
CreateMenuItem(ParentMI,itmRefactorExtractProc,'itmRefactorExtractProc',lisMenuExtractProc);
|
||||||
CreateMenuItem(ParentMI,itmRefactorRenameIdentifier,'itmRefactorRenameIdentifier',lisMenuRenameIdentifier);
|
CreateMenuItem(ParentMI,itmRefactorRenameIdentifier,'itmRefactorRenameIdentifier',lisMenuRenameIdentifier);
|
||||||
end;
|
end;
|
||||||
|
@ -1450,7 +1450,7 @@ begin
|
|||||||
SrcEditMenuCompleteCode := RegisterIDEMenuCommand
|
SrcEditMenuCompleteCode := RegisterIDEMenuCommand
|
||||||
(AParent,'CompleteCode', uemCompleteCode, nil, @ExecuteIdeMenuClick);
|
(AParent,'CompleteCode', uemCompleteCode, nil, @ExecuteIdeMenuClick);
|
||||||
SrcEditMenuEncloseSelection := RegisterIDEMenuCommand
|
SrcEditMenuEncloseSelection := RegisterIDEMenuCommand
|
||||||
(AParent, 'EncloseSelection',uemEncloseSelection);
|
(AParent, 'EncloseSelection',lisKMEncloseSelection);
|
||||||
SrcEditMenuRenameIdentifier := RegisterIDEMenuCommand
|
SrcEditMenuRenameIdentifier := RegisterIDEMenuCommand
|
||||||
(AParent, 'RenameIdentifier',uemRenameIdentifier, nil, @ExecuteIdeMenuClick);
|
(AParent, 'RenameIdentifier',uemRenameIdentifier, nil, @ExecuteIdeMenuClick);
|
||||||
SrcEditMenuFindIdentifierReferences := RegisterIDEMenuCommand
|
SrcEditMenuFindIdentifierReferences := RegisterIDEMenuCommand
|
||||||
|
Loading…
Reference in New Issue
Block a user