Frames

My Story

0
1
1import * as vscode from "vscode";
2import { registerCommands } from "./commands";
3import { registerCommentController } from "./comments";
4import { registerFileSystemProvider } from "./fileSystem";
5import { log } from "./logger";
6import { registerPlaygroundContentProvider } from "./playgrounds/contentProvider";
7import { store } from "./store";
8import { refreshShowcase } from "./store/actions";
9import { initializeAuth } from "./store/auth";
10import { initializeStorage } from "./store/storage";
11import { registerTreeProvider } from "./tree";
12import { registerTreeProvider as registerActiveGistTreeProvider } from "./tree/activeGist";
13import { registerTreeProvider as registerShowcaseTreeProvider } from "./tree/showcase";
14import { registerProtocolHander } from "./uriHandler";
15import { getGistWorkspaceId, isGistWorkspace, openGistFiles } from "./utils";
16
17export async function activate(context: vscode.ExtensionContext) {
18 log.setLoggingChannel(vscode.window.createOutputChannel("GistPad"));
19
20 registerCommands(context);
21 registerCommentController();
22 registerFileSystemProvider(store);
23 registerPlaygroundContentProvider();
24 registerProtocolHander();
25 registerTreeProvider(store, context.extensionPath);
26 registerActiveGistTreeProvider(store, context.extensionPath);
27
28 if (isGistWorkspace()) {
29 const gistId = getGistWorkspaceId();
30 openGistFiles(gistId);
31 }
32
33 initializeStorage(context);
34 initializeAuth();
35
36 registerShowcaseTreeProvider(store, context.extensionPath);
37 refreshShowcase();
38}
39