Skip to content

Commit 654bc08

Browse files
committed
Remove dead code
1 parent 75b241e commit 654bc08

File tree

2 files changed

+2
-60
lines changed

2 files changed

+2
-60
lines changed
Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import last from "lodash/last"
21
import { makeAutosuggest, getPathForPosition } from "./autosuggest-helpers/core"
32
import { getSnippetsForPath } from "./autosuggest-helpers/snippet-helpers"
4-
import { getKeywordsForPath, getContextType } from "./autosuggest-helpers/keyword-helpers"
5-
import { buildSuggestions, parseDomain } from "./autosuggest-helpers/hub-ref-helpers.hub.js"
3+
import { getKeywordsForPath } from "./autosuggest-helpers/keyword-helpers"
64
import keywordMap from "./autosuggest-helpers/keyword-map"
75
import snippets from "./autosuggest-helpers/snippets"
86

@@ -35,31 +33,7 @@ export default function(editor, { fetchDomainSuggestions }, { langTools, AST, sp
3533
}
3634
}
3735

38-
let HubRefCompleter = {
39-
getCompletions: function(editor, session, pos, prefix, callback) {
40-
editor.completer.autoSelect = true
41-
42-
let editorValue = session.getValue()
43-
44-
let path = getPathForPosition({ pos, prefix, editorValue, AST })
45-
46-
if(last(path) === "$ref") {
47-
let type = getContextType(path)
48-
fetchDomainSuggestions(path, prefix, type)
49-
.then(res => {
50-
let suggestions = res.apis.reduce( function( prev, rawDomain, i ){
51-
var domain = parseDomain( rawDomain, i )
52-
return buildSuggestions( domain, i, type).concat( prev )
53-
}, [] )
54-
callback(null, suggestions)
55-
})
56-
} else {
57-
callback(null, [])
58-
}
59-
}
60-
}
61-
6236
return makeAutosuggest({
63-
completers: [SnippetCompleter, KeywordCompleter, HubRefCompleter]
37+
completers: [SnippetCompleter, KeywordCompleter]
6438
})(editor, {fetchDomainSuggestions}, { langTools, AST, specObject })
6539
}

src/plugins/editor/editor-plugins/autosuggest-helpers/hub-ref-helpers.hub.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)