Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 25, 2019. It is now read-only.

Commit 0059ad1

Browse files
author
Dean Sofer
committed
Fixed #6
1 parent 3e2f1ef commit 0059ad1

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

‎NGUtils.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ define(function (require, exports, module) {
1010
"use strict";
1111

1212
// Load brackets modules
13-
var Async = brackets.getModule("utils/Async"),
14-
DocumentManager = brackets.getModule("document/DocumentManager"),
15-
FileUtils = brackets.getModule("file/FileUtils"),
16-
CollectionUtils =brackets.getModule("utils/CollectionUtils"),
17-
StringUtils = brackets.getModule("utils/StringUtils");
13+
var Async = require("utils/Async"),
14+
DocumentManager = require("document/DocumentManager"),
15+
FileUtils = require("file/FileUtils"),
16+
_ =require("thirdparty/lodash"),
17+
StringUtils = require("utils/StringUtils");
1818

1919
/**
2020
* Function matching regular expression. Recognizes the forms:
@@ -182,7 +182,7 @@ define(function (require, exports, module) {
182182
// Need to call CollectionUtils.hasProperty here since docEntry.functions could
183183
// have an entry for "hasOwnProperty", which results in an error if trying to
184184
// invoke docEntry.functions.hasOwnProperty().
185-
if (CollectionUtils.hasProperty(docEntry.functions, functionName)) {
185+
if (_.has(docEntry.functions, functionName)) {
186186
var functionsInDocument = docEntry.functions[functionName];
187187
matchedDocuments.push({doc: docEntry.doc, fileInfo: docEntry.fileInfo, functions: functionsInDocument});
188188
}
@@ -230,7 +230,7 @@ define(function (require, exports, module) {
230230
docEntries.push(docInfo);
231231
}, function (error) {
232232
// If one file fails, continue to search
233-
oneResult.resolve();
233+
return;
234234
});
235235
}).promise();
236236
}
@@ -280,7 +280,7 @@ define(function (require, exports, module) {
280280
var result = [];
281281
var lines = text.split("\n");
282282

283-
CollectionUtils.forEach(allFunctions, function (functions, functionName) {
283+
_.forEach(allFunctions, function (functions, functionName) {
284284
if (functionName === searchName || searchName === "*") {
285285
functions.forEach(function (funcEntry) {
286286
var endOffset = _getFunctionEndOffset(text, funcEntry.offsetStart);

‎main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ define(function (require, exports, module) {
77
"use strict";
88

99
// Brackets modules
10-
var MultiRangeInlineEditor = brackets.getModule("editor/MultiRangeInlineEditor").MultiRangeInlineEditor,
11-
ProjectManager = brackets.getModule("project/ProjectManager"),
12-
EditorManager = brackets.getModule("editor/EditorManager"),
10+
var MultiRangeInlineEditor = require("editor/MultiRangeInlineEditor").MultiRangeInlineEditor,
11+
ProjectManager = require("project/ProjectManager"),
12+
EditorManager = require("editor/EditorManager"),
1313
NGUtils = require("NGUtils");
1414

1515
var patterns = {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /