mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 09:35:38 -05:00
More layering (#6541)
* layer unlayered code; fix layering * readd os * fix definition of recommended extensions * protect against tests
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';
|
||||
import { ShowCurrentReleaseNotesAction } from 'sql/workbench/update/electron-browser/releaseNotes';
|
||||
import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
|
||||
// add product update and release notes contributions
|
||||
Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions)
|
||||
.registerWorkbenchAction(new SyncActionDescriptor(ShowCurrentReleaseNotesAction, ShowCurrentReleaseNotesAction.ID, ShowCurrentReleaseNotesAction.LABEL), 'Show Getting Started');
|
||||
51
src/sql/workbench/update/electron-browser/releaseNotes.ts
Normal file
51
src/sql/workbench/update/electron-browser/releaseNotes.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import nls = require('vs/nls');
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import pkg from 'vs/platform/product/node/package';
|
||||
import product from 'vs/platform/product/node/product';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions';
|
||||
import { AbstractShowReleaseNotesAction } from 'vs/workbench/contrib/update/electron-browser/update';
|
||||
|
||||
export class OpenGettingStartedInBrowserAction extends Action {
|
||||
|
||||
constructor(
|
||||
@IOpenerService private openerService: IOpenerService
|
||||
) {
|
||||
super('update.openGettingStartedGuide', nls.localize('gettingStarted', "Get Started"), undefined, true);
|
||||
}
|
||||
|
||||
run(): Promise<any> {
|
||||
const uri = URI.parse(product.gettingStartedUrl);
|
||||
return this.openerService.open(uri);
|
||||
}
|
||||
}
|
||||
|
||||
export class ShowCurrentReleaseNotesAction extends AbstractShowReleaseNotesAction {
|
||||
|
||||
static ID = 'update.showGettingStarted';
|
||||
static LABEL = nls.localize('showReleaseNotes', "Show Getting Started");
|
||||
|
||||
constructor(
|
||||
id = ShowCurrentReleaseNotesAction.ID,
|
||||
label = ShowCurrentReleaseNotesAction.LABEL,
|
||||
@IInstantiationService instantiationService: IInstantiationService
|
||||
) {
|
||||
super(id, label, pkg.version, instantiationService);
|
||||
}
|
||||
}
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarHelpMenu, {
|
||||
group: '1_welcome',
|
||||
command: {
|
||||
id: ShowCurrentReleaseNotesAction.ID,
|
||||
title: nls.localize({ key: 'miGettingStarted', comment: ['&& denotes a mnemonic'] }, "Getting &&Started")
|
||||
},
|
||||
order: 1
|
||||
});
|
||||
Reference in New Issue
Block a user