@@ -257,73 +257,6 @@ define(function (require, exports, module) {
257
257
result . reject ( ) ;
258
258
} ) ;
259
259
260
- return result ;
261
-
262
- // Use Tern jump-to-definition helper, if it's available, to find InlineEditor target.
263
- var helper = brackets . _jsCodeHintsHelper ;
264
- if ( helper === null ) {
265
- return null ;
266
- }
267
-
268
-
269
- PerfUtils . markStart ( PerfUtils . JAVASCRIPT_INLINE_CREATE ) ;
270
-
271
- var response = helper ( ) ;
272
- if ( response . hasOwnProperty ( "promise" ) ) {
273
- response . promise . done ( function ( jumpResp ) {
274
- var resolvedPath = jumpResp . fullPath ;
275
- if ( resolvedPath ) {
276
-
277
- // Tern doesn't always return entire function extent.
278
- // Use QuickEdit search now that we know which file to look at.
279
- var fileInfos = [ ] ;
280
- fileInfos . push ( { name : jumpResp . resultFile , fullPath : resolvedPath } ) ;
281
- JSUtils . findMatchingFunctions ( functionName , fileInfos , true )
282
- . done ( function ( functions ) {
283
- if ( functions && functions . length > 0 ) {
284
- var jsInlineEditor = new MultiRangeInlineEditor ( functions ) ;
285
- jsInlineEditor . load ( hostEditor ) ;
286
-
287
- PerfUtils . addMeasurement ( PerfUtils . JAVASCRIPT_INLINE_CREATE ) ;
288
- result . resolve ( jsInlineEditor ) ;
289
- } else {
290
- // No matching functions were found
291
- PerfUtils . addMeasurement ( PerfUtils . JAVASCRIPT_INLINE_CREATE ) ;
292
- result . reject ( ) ;
293
- }
294
- } )
295
- . fail ( function ( ) {
296
- PerfUtils . addMeasurement ( PerfUtils . JAVASCRIPT_INLINE_CREATE ) ;
297
- result . reject ( ) ;
298
- } ) ;
299
-
300
- } else { // no result from Tern. Fall back to _findInProject().
301
-
302
- _findInProject ( functionName ) . done ( function ( functions ) {
303
- if ( functions && functions . length > 0 ) {
304
- var jsInlineEditor = new MultiRangeInlineEditor ( functions ) ;
305
- jsInlineEditor . load ( hostEditor ) ;
306
-
307
- PerfUtils . addMeasurement ( PerfUtils . JAVASCRIPT_INLINE_CREATE ) ;
308
- result . resolve ( jsInlineEditor ) ;
309
- } else {
310
- // No matching functions were found
311
- PerfUtils . addMeasurement ( PerfUtils . JAVASCRIPT_INLINE_CREATE ) ;
312
- result . reject ( ) ;
313
- }
314
- } ) . fail ( function ( ) {
315
- PerfUtils . finalizeMeasurement ( PerfUtils . JAVASCRIPT_INLINE_CREATE ) ;
316
- result . reject ( ) ;
317
- } ) ;
318
- }
319
-
320
- } ) . fail ( function ( ) {
321
- PerfUtils . finalizeMeasurement ( PerfUtils . JAVASCRIPT_INLINE_CREATE ) ;
322
- result . reject ( ) ;
323
- } ) ;
324
-
325
- }
326
-
327
260
return result . promise ( ) ;
328
261
}
329
262
0 commit comments