@@ -37,7 +37,8 @@ define(function (require, exports, module) {
3737 StringUtils = require ( "utils/StringUtils" ) ,
3838 CommandManager = require ( "command/CommandManager" ) ,
3939 PopUpManager = require ( "widgets/PopUpManager" ) ,
40- ViewUtils = require ( "utils/ViewUtils" ) ;
40+ ViewUtils = require ( "utils/ViewUtils" ) ,
41+ DeprecationWarning = require ( "utils/DeprecationWarning" ) ;
4142
4243 /**
4344 * Brackets Application Menu Constants
@@ -91,6 +92,10 @@ define(function (require, exports, module) {
9192 EDIT_CODE_HINTS_COMMANDS : { sectionMarker : Commands . SHOW_CODE_HINTS } ,
9293 EDIT_TOGGLE_OPTIONS : { sectionMarker : Commands . TOGGLE_CLOSE_BRACKETS } ,
9394
95+ // DEPRECATED: Old Edit menu sections redirected to existing Edit menu section
96+ EDIT_FIND_COMMANDS : { sectionMarker : Commands . TOGGLE_CLOSE_BRACKETS } ,
97+ EDIT_REPLACE_COMMANDS : { sectionMarker : Commands . TOGGLE_CLOSE_BRACKETS } ,
98+
9499 FIND_FIND_COMMANDS : { sectionMarker : Commands . CMD_FIND } ,
95100 FIND_FIND_IN_COMMANDS : { sectionMarker : Commands . CMD_FIND_IN_FILES } ,
96101 FIND_REPLACE_COMMANDS : { sectionMarker : Commands . CMD_REPLACE } ,
@@ -362,7 +367,7 @@ define(function (require, exports, module) {
362367 */
363368 Menu . prototype . _getRelativeMenuItem = function ( relativeID , position ) {
364369 var $relativeElement ;
365-
370+
366371 if ( relativeID ) {
367372 if ( position === FIRST_IN_SECTION || position === LAST_IN_SECTION ) {
368373 if ( ! relativeID . hasOwnProperty ( "sectionMarker" ) ) {
@@ -550,7 +555,15 @@ define(function (require, exports, module) {
550555 menuItem ,
551556 name ,
552557 commandID ;
553-
558+
559+ if ( relativeID === MenuSection . EDIT_FIND_COMMANDS ) {
560+ DeprecationWarning . deprecationWarning ( "Add " + command + " Command to the Find Menu instead of the Edit Menu." , true ) ;
561+ DeprecationWarning . deprecationWarning ( "Use MenuSection.FIND_FIND_COMMANDS instead of MenuSection.EDIT_FIND_COMMANDS." , true ) ;
562+ } else if ( relativeID === MenuSection . EDIT_REPLACE_COMMANDS ) {
563+ DeprecationWarning . deprecationWarning ( "Add " + command + "Command to the Find Menu instead of the Edit Menu." , true ) ;
564+ DeprecationWarning . deprecationWarning ( "Use MenuSection.FIND_REPLACE_COMMANDS instead of MenuSection.EDIT_REPLACE_COMMANDS." , true ) ;
565+ }
566+
554567 if ( ! command ) {
555568 console . error ( "addMenuItem(): missing required parameters: command" ) ;
556569 return null ;
0 commit comments