This repository was archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Fix for issue #6084: Move Find items to different menu #7488
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
06e9b2a
Add new Search menu
lkcampbell 7317a29
Add 'Find in Selected File/Folder' menu item
lkcampbell 42cd989
Give 'Find in Selected' it's own Command
lkcampbell d298003
Change Search to Find. Replace SEARCH prefix with CMD prefix.
lkcampbell 56ab3e9
Add deprecation code
lkcampbell e337d24
Merge pull request #7544 from adobe/alf_localization
pthiess 12983f6
Merge branch 'fix-6084' of github.com:lkcampbell/brackets into fix-6084
lkcampbell 427c8e9
Fix merge conflict
lkcampbell 7ca5f89
Update Commands deprecation code
lkcampbell 4c633af
Small Code clean up
lkcampbell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,8 @@ define(function (require, exports, module) { | |
| StringUtils = require("utils/StringUtils"), | ||
| CommandManager = require("command/CommandManager"), | ||
| PopUpManager = require("widgets/PopUpManager"), | ||
| ViewUtils = require("utils/ViewUtils"); | ||
| ViewUtils = require("utils/ViewUtils"), | ||
| DeprecationWarning = require("utils/DeprecationWarning"); | ||
|
|
||
| /** | ||
| * Brackets Application Menu Constants | ||
|
|
@@ -46,6 +47,7 @@ define(function (require, exports, module) { | |
| var AppMenuBar = { | ||
| FILE_MENU : "file-menu", | ||
| EDIT_MENU : "edit-menu", | ||
| FIND_MENU : "find-menu", | ||
| VIEW_MENU : "view-menu", | ||
| NAVIGATE_MENU : "navigate-menu", | ||
| HELP_MENU : "help-menu" | ||
|
|
@@ -85,13 +87,19 @@ define(function (require, exports, module) { | |
| EDIT_UNDO_REDO_COMMANDS: {sectionMarker: Commands.EDIT_UNDO}, | ||
| EDIT_TEXT_COMMANDS: {sectionMarker: Commands.EDIT_CUT}, | ||
| EDIT_SELECTION_COMMANDS: {sectionMarker: Commands.EDIT_SELECT_ALL}, | ||
| EDIT_FIND_COMMANDS: {sectionMarker: Commands.EDIT_FIND}, | ||
| EDIT_REPLACE_COMMANDS: {sectionMarker: Commands.EDIT_REPLACE}, | ||
| EDIT_MODIFY_SELECTION: {sectionMarker: Commands.EDIT_INDENT}, | ||
| EDIT_COMMENT_SELECTION: {sectionMarker: Commands.EDIT_LINE_COMMENT}, | ||
| EDIT_CODE_HINTS_COMMANDS: {sectionMarker: Commands.SHOW_CODE_HINTS}, | ||
| EDIT_TOGGLE_OPTIONS: {sectionMarker: Commands.TOGGLE_CLOSE_BRACKETS}, | ||
|
|
||
|
|
||
| // DEPRECATED: Old Edit menu sections redirected to existing Edit menu section | ||
| EDIT_FIND_COMMANDS: {sectionMarker: Commands.TOGGLE_CLOSE_BRACKETS}, | ||
| EDIT_REPLACE_COMMANDS: {sectionMarker: Commands.TOGGLE_CLOSE_BRACKETS}, | ||
|
|
||
| FIND_FIND_COMMANDS: {sectionMarker: Commands.CMD_FIND}, | ||
| FIND_FIND_IN_COMMANDS: {sectionMarker: Commands.CMD_FIND_IN_FILES}, | ||
| FIND_REPLACE_COMMANDS: {sectionMarker: Commands.CMD_REPLACE}, | ||
|
|
||
| VIEW_HIDESHOW_COMMANDS: {sectionMarker: Commands.VIEW_HIDE_SIDEBAR}, | ||
| VIEW_FONTSIZE_COMMANDS: {sectionMarker: Commands.VIEW_INCREASE_FONT_SIZE}, | ||
| VIEW_TOGGLE_OPTIONS: {sectionMarker: Commands.TOGGLE_ACTIVE_LINE}, | ||
|
|
@@ -359,7 +367,7 @@ define(function (require, exports, module) { | |
| */ | ||
| Menu.prototype._getRelativeMenuItem = function (relativeID, position) { | ||
| var $relativeElement; | ||
|
|
||
| if (relativeID) { | ||
| if (position === FIRST_IN_SECTION || position === LAST_IN_SECTION) { | ||
| if (!relativeID.hasOwnProperty("sectionMarker")) { | ||
|
|
@@ -547,7 +555,15 @@ define(function (require, exports, module) { | |
| menuItem, | ||
| name, | ||
| commandID; | ||
|
|
||
|
|
||
| if (relativeID === MenuSection.EDIT_FIND_COMMANDS) { | ||
| DeprecationWarning.deprecationWarning("Add " + command + " Command to the Find Menu instead of the Edit Menu.", true); | ||
| DeprecationWarning.deprecationWarning("Use MenuSection.FIND_FIND_COMMANDS instead of MenuSection.EDIT_FIND_COMMANDS.", true); | ||
| } else if (relativeID === MenuSection.EDIT_REPLACE_COMMANDS) { | ||
| DeprecationWarning.deprecationWarning("Add " + command + "Command to the Find Menu instead of the Edit Menu.", true); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: need space before "Command" |
||
| DeprecationWarning.deprecationWarning("Use MenuSection.FIND_REPLACE_COMMANDS instead of MenuSection.EDIT_REPLACE_COMMANDS.", true); | ||
| } | ||
|
|
||
| if (!command) { | ||
| console.error("addMenuItem(): missing required parameters: command"); | ||
| return null; | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove the trailing period - it's sometimes confusing when you stare at an object notation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.