update.contribution.ts 1.7 KB
Newer Older
J
Joao Moreno 已提交
1 2 3 4 5
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

6
import 'vs/platform/update/node/update.config.contribution';
A
Alex Dima 已提交
7
import * as platform from 'vs/base/common/platform';
8
import { Registry } from 'vs/platform/registry/common/platform';
J
Johannes Rieken 已提交
9
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
B
Benjamin Pasero 已提交
10
import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';
J
Johannes Rieken 已提交
11
import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
12
import { ShowCurrentReleaseNotesAction, ProductContribution, UpdateContribution, Win3264BitContribution } from './update';
13
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
J
Joao Moreno 已提交
14

15
const workbench = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
J
Joao Moreno 已提交
16

B
Benjamin Pasero 已提交
17
workbench.registerWorkbenchContribution(ProductContribution, LifecyclePhase.Restored);
18 19 20

if (platform.isWindows) {
	if (process.arch === 'ia32') {
B
Benjamin Pasero 已提交
21
		workbench.registerWorkbenchContribution(Win3264BitContribution, LifecyclePhase.Restored);
22
	}
J
Joao Moreno 已提交
23 24
}

25
workbench.registerWorkbenchContribution(UpdateContribution, LifecyclePhase.Restored);
J
Joao Moreno 已提交
26 27

// Editor
J
Joao Moreno 已提交
28
Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions)
29
	.registerWorkbenchAction(new SyncActionDescriptor(ShowCurrentReleaseNotesAction, ShowCurrentReleaseNotesAction.ID, ShowCurrentReleaseNotesAction.LABEL), 'Show Release Notes');