forked from eclipse-cdt-cloud/vscode-memory-inspector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextension.ts
More file actions
47 lines (42 loc) · 2.19 KB
/
extension.ts
File metadata and controls
47 lines (42 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/********************************************************************************
* Copyright (C) 2022 Ericsson, Arm and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import * as vscode from 'vscode';
import { AdapterRegistry } from '../../plugin/adapter-registry/adapter-registry';
import { CAdapter } from '../../plugin/adapter-registry/c-adapter';
import { ContextTracker } from '../../plugin/context-tracker';
import { MemoryProviderManager } from '../../plugin/memory-provider-manager';
import { MemoryStorage } from '../../plugin/memory-storage';
import { MemoryWebview } from '../../plugin/memory-webview-main';
import { SessionTracker } from '../../plugin/session-tracker';
export const activate = async (context: vscode.ExtensionContext): Promise<AdapterRegistry> => {
const registry = new AdapterRegistry();
const sessionTracker = new SessionTracker();
new ContextTracker(sessionTracker);
const memoryProviderManager = new MemoryProviderManager(registry, sessionTracker);
const memoryStorage = new MemoryStorage(sessionTracker, memoryProviderManager);
const memoryView = new MemoryWebview(context.extensionUri, memoryProviderManager, sessionTracker, memoryStorage);
const cAdapter = new CAdapter(registry);
registry.activate(context);
sessionTracker.activate(context);
memoryProviderManager.activate(context);
memoryView.activate(context);
memoryStorage.activate(context);
cAdapter.activate(context);
return registry;
};
export const deactivate = async (): Promise<void> => {
// Do nothing for now
};