Skip to content

Commit 41a4cad

Browse files
committed
remove action handler. add simple handler.
1 parent 0482290 commit 41a4cad

File tree

4 files changed

+589
-8
lines changed

4 files changed

+589
-8
lines changed

lib/HandlerFactory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
import Handler from './Handler'
44
import Factory from './Factory'
5-
import ActionHandler from './ActionHandler'
5+
import SimpleHandler from './SimpleHandler'
66
import ContextHandler from './ContextHandler'
77

88
export default class HandlerFactory extends Factory {
99
static create() {
10-
let handler = new ActionHandler()
10+
let handler = new SimpleHandler()
1111
let instance = Factory.create(ContextHandler, handler)
1212
return instance
1313
}

lib/ActionHandler.js renamed to lib/SimpleHandler.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import SuggestionHelper from './SuggestionHelper'
66
/**
77
* knows how to perform the operations associated with carrying out a request.
88
*/
9-
export default class ActionHandler extends Handler {
9+
export default class SimpleHandler extends Handler {
1010

1111
/* TODO limit the scope of suggestions using the current contexts.
1212
* Determine whether or not to delegate to the successor.
@@ -16,7 +16,14 @@ export default class ActionHandler extends Handler {
1616
editor, bufferPosition, scopeDescriptor, prefix,
1717
activatedManually, completions, suggestions, contexts
1818
} = request
19-
SuggestionHelper.append(completions.actions, suggestions)
20-
this.delegate(request)
19+
completions.simple.forEach((item) => {
20+
suggestions.push({
21+
snippet: item,
22+
displayText: item,
23+
type: 'keyword',
24+
description: item,
25+
descriptionMoreURL: 'http://web.cecs.pdx.edu/~len/sql1999.pdf'
26+
})
27+
})
2128
}
2229
}

0 commit comments

Comments
 (0)