Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit d2d9e50

Browse files
committed
Merge pull request #9640 from le717/remove-more-deprecated
Remove even more deprecated code
2 parents 0b949dd + a0b6d55 commit d2d9e50

4 files changed

Lines changed: 4 additions & 43 deletions

File tree

src/command/Commands.js

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
/*
22
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
3-
*
3+
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),
66
* to deal in the Software without restriction, including without limitation
77
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
88
* and/or sell copies of the Software, and to permit persons to whom the
99
* Software is furnished to do so, subject to the following conditions:
10-
*
10+
*
1111
* The above copyright notice and this permission notice shall be included in
1212
* all copies or substantial portions of the Software.
13-
*
13+
*
1414
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1515
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1616
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1717
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1818
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1919
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2020
* DEALINGS IN THE SOFTWARE.
21-
*
21+
*
2222
*/
2323

2424

@@ -176,16 +176,5 @@ define(function (require, exports, module) {
176176
DeprecationWarning.deprecateConstant(exports, "SORT_WORKINGSET_BY_NAME", "CMD_WORKINGSET_SORT_BY_NAME");
177177
DeprecationWarning.deprecateConstant(exports, "SORT_WORKINGSET_BY_TYPE", "CMD_WORKINGSET_SORT_BY_TYPE");
178178
DeprecationWarning.deprecateConstant(exports, "SORT_WORKINGSET_AUTO", "CMD_WORKING_SORT_TOGGLE_AUTO");
179-
180-
// DEPRECATED: Edit commands that were moved from the Edit Menu to the Find Menu
181-
DeprecationWarning.deprecateConstant(exports, "EDIT_FIND", "CMD_FIND");
182-
DeprecationWarning.deprecateConstant(exports, "EDIT_FIND_IN_SELECTED", "CMD_FIND_IN_SELECTED");
183-
DeprecationWarning.deprecateConstant(exports, "EDIT_FIND_IN_SUBTREE", "CMD_FIND_IN_SUBTREE");
184-
DeprecationWarning.deprecateConstant(exports, "EDIT_FIND_NEXT", "CMD_FIND_NEXT");
185-
DeprecationWarning.deprecateConstant(exports, "EDIT_FIND_PREVIOUS", "CMD_FIND_PREVIOUS");
186-
DeprecationWarning.deprecateConstant(exports, "EDIT_FIND_ALL_AND_SELECT", "CMD_FIND_ALL_AND_SELECT");
187-
DeprecationWarning.deprecateConstant(exports, "EDIT_ADD_NEXT_MATCH", "CMD_ADD_NEXT_MATCH");
188-
DeprecationWarning.deprecateConstant(exports, "EDIT_SKIP_CURRENT_MATCH", "CMD_SKIP_CURRENT_MATCH");
189-
DeprecationWarning.deprecateConstant(exports, "EDIT_REPLACE", "CMD_REPLACE");
190179
});
191180

src/command/Menus.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ define(function (require, exports, module) {
9494
EDIT_CODE_HINTS_COMMANDS: {sectionMarker: Commands.SHOW_CODE_HINTS},
9595
EDIT_TOGGLE_OPTIONS: {sectionMarker: Commands.TOGGLE_CLOSE_BRACKETS},
9696

97-
// DEPRECATED: Old Edit menu sections redirected to existing Edit menu section
98-
EDIT_FIND_COMMANDS: {sectionMarker: Commands.TOGGLE_CLOSE_BRACKETS},
99-
EDIT_REPLACE_COMMANDS: {sectionMarker: Commands.TOGGLE_CLOSE_BRACKETS},
100-
10197
FIND_FIND_COMMANDS: {sectionMarker: Commands.CMD_FIND},
10298
FIND_FIND_IN_COMMANDS: {sectionMarker: Commands.CMD_FIND_IN_FILES},
10399
FIND_REPLACE_COMMANDS: {sectionMarker: Commands.CMD_REPLACE},
@@ -558,14 +554,6 @@ define(function (require, exports, module) {
558554
name,
559555
commandID;
560556

561-
if (relativeID === MenuSection.EDIT_FIND_COMMANDS) {
562-
DeprecationWarning.deprecationWarning("Add " + command + " Command to the Find Menu instead of the Edit Menu.", true);
563-
DeprecationWarning.deprecationWarning("Use MenuSection.FIND_FIND_COMMANDS instead of MenuSection.EDIT_FIND_COMMANDS.", true);
564-
} else if (relativeID === MenuSection.EDIT_REPLACE_COMMANDS) {
565-
DeprecationWarning.deprecationWarning("Add " + command + " Command to the Find Menu instead of the Edit Menu.", true);
566-
DeprecationWarning.deprecationWarning("Use MenuSection.FIND_REPLACE_COMMANDS instead of MenuSection.EDIT_REPLACE_COMMANDS.", true);
567-
}
568-
569557
if (!command) {
570558
console.error("addMenuItem(): missing required parameters: command");
571559
return null;

src/editor/Editor.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,6 @@ define(function (require, exports, module) {
838838

839839
// Redispatch these CodeMirror key events as jQuery events
840840
function _onKeyEvent(instance, event) {
841-
$(self).triggerHandler("keyEvent", [self, event]); // deprecated
842841
$(self).triggerHandler(event.type, [self, event]);
843842
return event.defaultPrevented; // false tells CodeMirror we didn't eat the event
844843
}

src/search/QuickOpen.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,6 @@ define(function (require, exports, module) {
145145
* cancels Quick Open (via Esc), those changes are automatically reverted.
146146
*/
147147
function addQuickOpenPlugin(pluginDef) {
148-
// Backwards compatibility (for now) for old fileTypes field, if newer languageIds not specified
149-
if (pluginDef.fileTypes && !pluginDef.languageIds) {
150-
console.warn("Using fileTypes for QuickOpen plugins is deprecated. Use languageIds instead.");
151-
pluginDef.languageIds = pluginDef.fileTypes.map(function (extension) {
152-
return LanguageManager.getLanguageForPath("file." + extension).getId();
153-
});
154-
delete pluginDef.fileTypes;
155-
}
156-
157148
plugins.push(new QuickOpenPlugin(
158149
pluginDef.name,
159150
pluginDef.languageIds,
@@ -958,10 +949,4 @@ define(function (require, exports, module) {
958949
exports.beginSearch = beginSearch;
959950
exports.addQuickOpenPlugin = addQuickOpenPlugin;
960951
exports.highlightMatch = highlightMatch;
961-
962-
// accessing these from this module will ultimately be deprecated
963-
exports.stringMatch = StringMatch.stringMatch;
964-
exports.SearchResult = StringMatch.SearchResult;
965-
exports.basicMatchSort = StringMatch.basicMatchSort;
966-
exports.multiFieldSort = StringMatch.multiFieldSort;
967952
});

0 commit comments

Comments
 (0)