mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 02:48:30 -05:00
Move some files for correct code layering (#23624)
This commit is contained in:
@@ -7,7 +7,11 @@ import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
|
||||
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
|
||||
import { NativeEnablePreviewFeatures } from 'sql/workbench/contrib/welcome/gettingStarted/electron-browser/enablePreviewFeatures';
|
||||
import { ShowGettingStartedAction } from 'sql/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted';
|
||||
import { registerAction2 } from 'vs/platform/actions/common/actions';
|
||||
|
||||
Registry
|
||||
.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench)
|
||||
.registerWorkbenchContribution(NativeEnablePreviewFeatures, LifecyclePhase.Eventually);
|
||||
|
||||
registerAction2(ShowGettingStartedAction);
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* 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 product from 'vs/platform/product/common/product';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { MenuRegistry, MenuId, Action2 } from 'vs/platform/actions/common/actions';
|
||||
import { ServicesAccessor } from 'vs/editor/browser/editorExtensions';
|
||||
|
||||
export class ShowGettingStartedAction extends Action2 {
|
||||
static ID = 'update.showGettingStarted';
|
||||
static LABEL_ORG = 'Show Getting Started';
|
||||
static LABEL = nls.localize('showReleaseNotes', "Show Getting Started");
|
||||
|
||||
constructor() {
|
||||
super({
|
||||
id: ShowGettingStartedAction.ID,
|
||||
title: {
|
||||
value: ShowGettingStartedAction.LABEL,
|
||||
original: ShowGettingStartedAction.LABEL_ORG
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
override run(accessor: ServicesAccessor): Promise<any> {
|
||||
const openerService = accessor.get(IOpenerService);
|
||||
const uri = URI.parse(product.gettingStartedUrl);
|
||||
return openerService.open(uri);
|
||||
}
|
||||
}
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarHelpMenu, {
|
||||
group: '1_welcome',
|
||||
command: {
|
||||
id: ShowGettingStartedAction.ID,
|
||||
title: nls.localize({ key: 'miGettingStarted', comment: ['&& denotes a mnemonic'] }, "Getting &&Started")
|
||||
},
|
||||
order: 1
|
||||
});
|
||||
Reference in New Issue
Block a user