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

Commit 1ec5c8f

Browse files
Fixes after first review
1 parent 57e2e86 commit 1ec5c8f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/search/QuickOpen.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ define(function (require, exports, module) {
125125
* Parameter Documentation:
126126
*
127127
* name - plug-in name, **must be unique**
128-
* languageIds - language ids array. Example: ["javascript", "css", "html"]. An empty array
129-
* indicates all language ids.
128+
* languageIds - language Ids array. Example: ["javascript", "css", "html"]. An empty array
129+
* indicates all language IDs.
130130
* done - called when quick open is complete. Plug-in should clear its internal state.
131131
* search - takes a query string and a StringMatcher (the use of which is optional but can speed up your searches) and returns an array of strings that match the query.
132132
* match - takes a query string and returns true if this plug-in wants to provide
@@ -143,11 +143,11 @@ define(function (require, exports, module) {
143143
*/
144144
function addQuickOpenPlugin(pluginDef) {
145145
if (pluginDef.fileTypes) {
146-
console.warn("Using file endings for QuickOpen plugins is deprecated. Use language ids instead.");
147-
pluginDef.languageIds = [];
148-
pluginDef.fileTypes.forEach(function (value) {
149-
pluginDef.languageIds.push(LanguageManager.getLanguageForPath("file." + value).getId());
146+
console.warn("Using fileTypes for QuickOpen plugins is deprecated. Use languageIds instead.");
147+
pluginDef.languageIds = pluginDef.fileTypes.map(function (extension) {
148+
return LanguageManager.getLanguageForPath("file." + extension).getId();
150149
});
150+
delete pluginDef.fileTypes;
151151
}
152152

153153
plugins.push(new QuickOpenPlugin(

0 commit comments

Comments
 (0)