Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/sessions/contrib/fileTreeView/browser/fileTreeView.contribution.ts
13401 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { Disposable } from '../../../../base/common/lifecycle.js';
7
import { IFileService } from '../../../../platform/files/common/files.js';
8
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
9
import { registerWorkbenchContribution2, WorkbenchPhase } from '../../../../workbench/common/contributions.js';
10
import { GITHUB_REMOTE_FILE_SCHEME } from '../../../services/sessions/common/session.js';
11
import { GitHubFileSystemProvider } from './githubFileSystemProvider.js';
12
13
// --- View registration is currently disabled in favor of the "Add Context" picker.
14
// The Files view will be re-enabled once we finalize the sessions auxiliary bar layout.
15
16
// --- Session Repo FileSystem Provider Registration
17
18
class GitHubFileSystemProviderContribution extends Disposable {
19
20
static readonly ID = 'workbench.contrib.githubFileSystemProvider';
21
22
constructor(
23
@IFileService fileService: IFileService,
24
@IInstantiationService instantiationService: IInstantiationService,
25
) {
26
super();
27
const provider = this._register(instantiationService.createInstance(GitHubFileSystemProvider));
28
this._register(fileService.registerProvider(GITHUB_REMOTE_FILE_SCHEME, provider));
29
}
30
}
31
32
registerWorkbenchContribution2(
33
GitHubFileSystemProviderContribution.ID,
34
GitHubFileSystemProviderContribution,
35
WorkbenchPhase.AfterRestored
36
);
37
38