|
1 | | -import { commands, window /* , ExtensionContext */} from 'vscode'; |
| 1 | +import { commands, ExtensionContext, window } from 'vscode'; |
2 | 2 | import * as nls from 'vscode-nls'; |
3 | 3 | import { compose } from './commands/compose'; |
4 | 4 | import { deleteItem } from './commands/deleteItem'; |
5 | 5 | import { editTags } from './commands/editTags'; |
6 | 6 | import { makePublic } from './commands/makePublic'; |
| 7 | +import { openItem } from './commands/openItem'; |
7 | 8 | import { openItemExternal } from './commands/openItemExternal'; |
8 | 9 | import { QiitaItemProvider } from './explorer/qiitaItems'; |
9 | 10 | import './polyfills'; |
10 | 11 |
|
11 | 12 | nls.config(process.env.VSCODE_NLS_CONFIG as nls.Options)(); |
12 | 13 |
|
13 | | -export function activate (/*context: ExtensionContext */) { |
| 14 | +export function activate (context: ExtensionContext) { |
| 15 | + console.log(context); |
14 | 16 | window.registerTreeDataProvider('qiitaItems', new QiitaItemProvider()); |
15 | 17 |
|
16 | | - commands.registerCommand('qiita.openItem', () => undefined); |
17 | | - commands.registerCommand('qiita.editTags', editTags); |
18 | | - commands.registerCommand('qiita.makePublic', makePublic); |
19 | | - commands.registerCommand('qiita.compose', compose); |
20 | | - commands.registerCommand('qiita.openItemExternal', openItemExternal); |
21 | | - commands.registerCommand('qiita.deleteItem', deleteItem); |
| 18 | + context.subscriptions.push( |
| 19 | + commands.registerCommand('qiita.openItem', openItem(context.storagePath)), |
| 20 | + commands.registerCommand('qiita.editTags', editTags), |
| 21 | + commands.registerCommand('qiita.makePublic', makePublic), |
| 22 | + commands.registerCommand('qiita.compose', compose), |
| 23 | + commands.registerCommand('qiita.openItemExternal', openItemExternal), |
| 24 | + commands.registerCommand('qiita.deleteItem', deleteItem), |
| 25 | + ); |
22 | 26 | } |
23 | 27 |
|
24 | 28 | export function deactivate () { |
|
0 commit comments