jiebi/CodeConvo huggingface dataset:
import paths = require('vs/base/common/paths'); import { dirname, join } from 'path'; import { nfcall } from 'vs/base/common/async'; import fs = require('fs'); <ins> export function isRoot(path: string): boolean { return path === dirname(path); } </ins> export function readdir(path: string): TPromise<string[]> { return nfcall(extfs.readdir, path); }
.pipe(util.cleanNodeModule('oniguruma', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('windows-mutex', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('native-keymap', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node'])) <ins> .pipe(util.cleanNodeModule('windows-foreground-love', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) </ins> .pipe(util.cleanNodeModule('gc-signals', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) .pipe(util.cleanNodeModule('pty.js', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['build/Release/**']));
"from": "vscode-textmate@2.2.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-2.2.0.tgz" }, <ins> "windows-foreground-love": { "version": "0.1.0", "from": "windows-foreground-love@0.1.0", "resolved": "https://registry.npmjs.org/windows-foreground-love/-/windows-foreground-love-0.1.0.tgz" }, </ins> "windows-mutex": { "version": "0.2.0", "from": "windows-mutex@>=0.2.0 <0.3.0",
export interface ILaunchService { start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise<void>; <ins> getMainProcessId(): TPromise<number>; </ins> } export interface ILaunchChannel extends IChannel { call(command: 'start', arg: IStartArguments): TPromise<void>; <ins> call(command: 'get-main-process-id', arg: null): TPromise<any>; </ins> call(command: string, arg: any): TPromise<any>; }
constructor(private service: ILaunchService) { } call(command: string, arg: any): TPromise<any> { <del> const { args, userEnv } = arg as IStartArguments; </del> switch (command) { <del> case 'start': return this.service.start(args, userEnv); </del> <ins> case 'start': const { args, userEnv } = arg as IStartArguments; return this.service.start(args, userEnv); case 'get-main-process-id': return this.service.getMainProcessId(); </ins> } } }
const channel = client.getChannel<ILaunchChannel>('launch'); const service = new LaunchChannelClient(channel); <del> return service.start(environmentService.args, process.env) </del> <ins> let promise = TPromise.as(null); if (platform.isWindows) { promise = service.getMainProcessId() .then(processId => { logService.log('Sending some foreground love to the running instance:', processId); try { const { allowSetForegroundWindow } = <any>require.__$__nodeRequire('windows-foreground-love'); allowSetForegroundWindow(processId); } catch (e) { // noop } }); } return promise .then(() => service.start(environmentService.args, process.env)) </ins> .then(() => client.dispose()) .then(() => TPromise.wrapError('Sent env to running instance. Terminating...')); },
const setupDir = (arch, target) => path.join(repoPath, '.build', `win32-${arch}`, `${target}-setup`); const issPath = path.join(__dirname, 'win32', 'code.iss'); const innoSetupPath = path.join(path.dirname(path.dirname(require.resolve('innosetup-compiler'))), 'bin', 'ISCC.exe'); <ins> const signPS1 = path.join(repoPath, 'build', 'tfs', 'win32', 'sign.ps1'); </ins> function packageInnoSetup(iss, options, cb) { options = options || {};
keys.forEach(key => assert(typeof definitions[key] === 'string', `Missing value for '${key}' in Inno Setup package step`)); const defs = keys.map(key => `/d${key}=${definitions[key]}`); <del> const args = [iss].concat(defs); </del> <ins> const args = [ iss, ...defs, `/sesrp=powershell.exe -ExecutionPolicy bypass ${signPS1} $f` ]; </ins> cp.spawn(innoSetupPath, args, { stdio: ['ignore', 'inherit', 'inherit'] }) .on('error', cb)
] SessionTimeout: 120 <ins> - task: NuGetCommand@2 displayName: Install ESRPClient.exe inputs: restoreSolution: 'buildtfswin32ESRPClientpackages.config' feedsToUse: config nugetConfigPath: 'buildtfswin32ESRPClientNuGet.config' externalFeedCredentials: 3fc0b7f7-da09-4ae7-a9c8-d69824b1819b restoreDirectory: packages - task: ESRPImportCertTask@1 displayName: Import ESRP Request Signing Certificate inputs: ESRP: 'ESRP CodeSign' </ins> - powershell: | $ErrorActionPreference = "Stop" <del> npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-archive" "vscode-win32-$(VSCODE_ARCH)-system-setup" "vscode-win32-$(VSCODE_ARCH)-user-setup" - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 inputs: ConnectedServiceName: 'ESRP CodeSign' FolderPath: '$(agent.builddirectory)' Pattern: VSCodeSetup.exe signConfigType: inlineSignParams inlineOperation: | [ { "keyCode": "CP-229803", "operationSetCode": "SigntoolSign", "parameters": [ { "parameterName": "OpusName", "parameterValue": "VS Code" }, { "parameterName": "OpusInfo", "parameterValue": "https://code.visualstudio.com/" }, { "parameterName": "PageHash", "parameterValue": "/NPH" }, { "parameterName": "TimeStamp", "parameterValue": "/t "http://ts4096.gtm.microsoft.com/TSS/AuthenticodeTS"" } ], "toolName": "sign", "toolVersion": "1.0" }, { "keyCode": "CP-230012", "operationSetCode": "SigntoolSign", "parameters": [ { "parameterName": "OpusName", "parameterValue": "VS Code" }, { "parameterName": "OpusInfo", "parameterValue": "https://code.visualstudio.com/" }, { "parameterName": "Append", "parameterValue": "/as" }, { "parameterName": "FileDigest", "parameterValue": "/fd "SHA256"" }, { "parameterName": "PageHash", "parameterValue": "/NPH" }, { "parameterName": "TimeStamp", "parameterValue": "/tr "http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer" /td sha256" } ], "toolName": "sign", "toolVersion": "1.0" }, { "keyCode": "CP-230012", "operationSetCode": "SigntoolVerify", "parameters": [ { "parameterName": "VerifyAll", "parameterValue": "/all" } ], "toolName": "sign", "toolVersion": "1.0" } ] SessionTimeout: 120 </del> <ins> .buildtfswin32import-esrp-auth-cert.ps1 -AuthCertificateBase64 $(ESRP_AUTH_CERTIFICATE) -AuthCertificateKey $(ESRP_AUTH_CERTIFICATE_KEY) displayName: Import ESRP Auth Certificate </ins> - powershell: | $ErrorActionPreference = "Stop" <ins> npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-archive" "vscode-win32-$(VSCODE_ARCH)-system-setup" "vscode-win32-$(VSCODE_ARCH)-user-setup" </ins> $Repo = "$(pwd)" $Root = "$Repo.." $SystemExe = "$Repo.buildwin32-$(VSCODE_ARCH)system-setupVSCodeSetup.exe"
<ins> Param( [string]$AuthCertificateBase64, [string]$AuthCertificateKey ) # Import auth certificate $AuthCertificateFileName = [System.IO.Path]::GetTempFileName() $AuthCertificateBytes = [Convert]::FromBase64String($AuthCertificateBase64) [IO.File]::WriteAllBytes($AuthCertificateFileName, $AuthCertificateBytes) $AuthCertificate = Import-PfxCertificate -FilePath $AuthCertificateFileName -CertStoreLocation Cert:LocalMachineMy -Password (ConvertTo-SecureString $AuthCertificateKey -AsPlainText -Force) rm $AuthCertificateFileName $ESRPAuthCertificateSubjectName = $AuthCertificate.Subject Write-Output ("##vso[task.setvariable variable=ESRPAuthCertificateSubjectName;]$ESRPAuthCertificateSubjectName") </ins>  No newline at end of file
<ins> function Create-TmpJson($Obj) { $FileName = [System.IO.Path]::GetTempFileName() ConvertTo-Json -Depth 100 $Obj | Out-File -Encoding UTF8 $FileName return $FileName } $Auth = Create-TmpJson @{ Version = "1.0.0" AuthenticationType = "AAD_CERT" ClientId = $env:ESRPClientId AuthCert = @{ SubjectName = $env:ESRPAuthCertificateSubjectName StoreLocation = "LocalMachine" StoreName = "My" } RequestSigningCert = @{ SubjectName = $env:ESRPCertificateSubjectName StoreLocation = "LocalMachine" StoreName = "My" } } $Policy = Create-TmpJson @{ Version = "1.0.0" } $Input = Create-TmpJson @{ Version = "1.0.0" SignBatches = @( @{ SourceLocationType = "UNC" SignRequestFiles = @( @{ SourceLocation = $args[0] } ) SigningInfo = @{ Operations = @( @{ KeyCode = "CP-229803" OperationCode = "SigntoolSign" Parameters = @{ OpusName = "VS Code" OpusInfo = "https://code.visualstudio.com/" PageHash = "/NPH" TimeStamp = "/t `"http://ts4096.gtm.microsoft.com/TSS/AuthenticodeTS`"" } ToolName = "sign" ToolVersion = "1.0" }, @{ KeyCode = "CP-230012" OperationCode = "SigntoolSign" Parameters = @{ OpusName = "VS Code" OpusInfo = "https://code.visualstudio.com/" Append = "/as" FileDigest = "/fd `"SHA256`"" PageHash = "/NPH" TimeStamp = "/tr `"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer`" /td sha256" } ToolName = "sign" ToolVersion = "1.0" }, @{ KeyCode = "CP-230012" OperationCode = "SigntoolVerify" Parameters = @{ VerifyAll = "/all" } ToolName = "sign" ToolVersion = "1.0" } ) } } ) } $Output = [System.IO.Path]::GetTempFileName() $ScriptPath = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent & "$ScriptPathESRPClientpackagesEsrpClient.1.0.27toolsESRPClient.exe" Sign -a $Auth -p $Policy -i $Input -o $Output </ins>  No newline at end of file
context.subscriptions.push(vscode.languages.registerDocumentSymbolProvider(selector, new MDDocumentSymbolProvider(engine))); context.subscriptions.push(vscode.languages.registerDocumentLinkProvider(selector, new LinkProvider())); <ins> context.subscriptions.push(vscode.languages.registerFoldingProvider(selector, new MarkdownFoldingProvider(engine))); </ins> const previewSecuritySelector = new PreviewSecuritySelector(cspArbiter, previewManager);
<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; import { MarkdownEngine } from '../markdownEngine'; import { TableOfContentsProvider } from '../tableOfContentsProvider'; export default class MarkdownFoldingProvider implements vscode.FoldingProvider { constructor( private readonly engine: MarkdownEngine ) { } public async provideFoldingRanges( document: vscode.TextDocument, _token: vscode.CancellationToken ): Promise<vscode.FoldingRangeList> { const tocProvider = new TableOfContentsProvider(this.engine, document); const toc = await tocProvider.getToc(); const foldingRanges = toc.map((entry, startIndex) => { const start = entry.line; let end: number | undefined = undefined; for (let i = startIndex + 1; i < toc.length; ++i) { if (toc[i].level <= entry.level) { end = toc[i].line - 1; break; } } return new vscode.FoldingRange( start, typeof end === 'number' ? end : document.lineCount - 1); }); return new vscode.FoldingRangeList(foldingRanges); } } </ins>  No newline at end of file
<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ export interface IScrollEvent { vertical: boolean; horizontal: boolean; } export interface IDelegate<T> { getHeight(element: T): number; getTemplateId(element: T): string; } export interface IRenderer<TElement, TTemplateData> { renderTemplate(container: HTMLElement): TTemplateData; renderElement(element: TElement, templateData: TTemplateData): void; disposeTemplate(templateData: TTemplateData): void; } export interface IRendererMap<T> { [templateId: string]: IRenderer<T, any>; } </ins>
Root: HKCR; Subkey: "{#RegValueName}SourceFileDefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}resourcesappresourceswin32code_file.ico" Root: HKCR; Subkey: "{#RegValueName}SourceFileshellopencommand"; ValueType: string; ValueName: ""; ValueData: """{app}{#ExeBasename}.exe"" ""%1""" <ins> Root: HKCR; Subkey: "Applications{#ExeBasename}.exe"; ValueType: none; ValueName: ""; Flags: uninsdeletekey Root: HKCR; Subkey: "Applications{#ExeBasename}.exeDefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}resourcesappresourceswin32code_file.ico" Root: HKCR; Subkey: "Applications{#ExeBasename}.exeshellopencommand"; ValueType: string; ValueName: ""; ValueData: """{app}{#ExeBasename}.exe"" ""%1""" </ins> Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}bin"; Tasks: addtopath; Check: NeedsAddPath(ExpandConstant('{app}bin')) Root: HKCU; Subkey: "SOFTWAREClasses*shell{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "Open with {#ShellNameShort}"; Tasks: addcontextmenufiles; Flags: uninsdeletekey
public disposeTemplate(templateId: string, templateData: any): void { if (templateId === templateEntryItem) { this.entryItemRenderer.disposeTemplate(null, templateId, templateData); <ins> } else { const data = templateData as IQuickOpenEntryGroupTemplateData; data.actionBar.dispose(); data.actionBar = null; data.container = null; data.description.dispose(); data.description = null; data.detail.dispose(); data.detail = null; data.group = null; data.icon = null; data.label.dispose(); data.label = null; data.prefix = null; </ins> } <del> const data = templateData as IQuickOpenEntryGroupTemplateData; data.actionBar.dispose(); data.actionBar = null; data.container = null; data.description.dispose(); data.description = null; data.detail.dispose(); data.detail = null; data.group = null; data.icon = null; data.label.dispose(); data.label = null; data.prefix = null; </del> } }
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { relative } from 'path'; <ins> import { IProcessEnvironment, isWindows } from 'vs/base/common/platform'; </ins> export class ConfigurationResolverService implements IConfigurationResolverService { _serviceBrand: any;
let regexp = /${(.*?)}/g; const originalValue = value; const resolvedString = value.replace(regexp, (match: string, name: string) => { <del> let newValue = (<any>this)[name]; </del> <ins> const key = (isWindows && match.indexOf('env:') > 0) ? name.toLowerCase() : name; let newValue = (<any>this)[key]; </ins> if (types.isString(newValue)) { return newValue; } else {
suite('Configuration Resolver Service', () => { let configurationResolverService: IConfigurationResolverService; <del> let envVariables: { [key: string]: string } = { key1: 'Value for Key1', key2: 'Value for Key2' }; </del> <ins> let envVariables: { [key: string]: string } = { key1: 'Value for key1', key2: 'Value for key2' }; </ins> let mockCommandService: MockCommandService; let editorService: TestEditorService; let workspace: IWorkspaceFolder;
test('substitute one env variable', () => { if (platform.isWindows) { <del> assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${workspaceFolder} ${env:key1} xyz'), 'abc VSCodeworkspaceLocation Value for Key1 xyz'); </del> <ins> assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${workspaceFolder} ${env:key1} xyz'), 'abc VSCodeworkspaceLocation Value for key1 xyz'); </ins> } else { <del> assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${workspaceFolder} ${env:key1} xyz'), 'abc /VSCode/workspaceLocation Value for Key1 xyz'); </del> <ins> assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${workspaceFolder} ${env:key1} xyz'), 'abc /VSCode/workspaceLocation Value for key1 xyz'); </ins> } }); test('substitute many env variable', () => { if (platform.isWindows) { <del> assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), 'VSCodeworkspaceLocation - VSCodeworkspaceLocation Value for Key1 - Value for Key2'); </del> <ins> assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), 'VSCodeworkspaceLocation - VSCodeworkspaceLocation Value for key1 - Value for key2'); </ins> } else { <del> assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), '/VSCode/workspaceLocation - /VSCode/workspaceLocation Value for Key1 - Value for Key2'); </del> <ins> assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), '/VSCode/workspaceLocation - /VSCode/workspaceLocation Value for key1 - Value for key2'); } }); test('substitute one env variable using platform case sensitivity', () => { if (platform.isWindows) { assert.strictEqual(configurationResolverService.resolve(workspace, '${env:key1} - ${env:Key1}'), 'Value for key1 - Value for key1'); } else { assert.strictEqual(configurationResolverService.resolve(workspace, '${env:key1} - ${env:Key1}'), 'Value for key1 - '); </ins> } });
let service = new ConfigurationResolverService(envVariables, new TestEditorService(), TestEnvironmentService, configurationService, mockCommandService); if (platform.isWindows) { <del> assert.strictEqual(service.resolve(workspace, 'abc ${config:editor.fontFamily} ${workspaceFolder} ${env:key1} xyz'), 'abc foo VSCodeworkspaceLocation Value for Key1 xyz'); </del> <ins> assert.strictEqual(service.resolve(workspace, 'abc ${config:editor.fontFamily} ${workspaceFolder} ${env:key1} xyz'), 'abc foo VSCodeworkspaceLocation Value for key1 xyz'); </ins> } else { <del> assert.strictEqual(service.resolve(workspace, 'abc ${config:editor.fontFamily} ${workspaceFolder} ${env:key1} xyz'), 'abc foo /VSCode/workspaceLocation Value for Key1 xyz'); </del> <ins> assert.strictEqual(service.resolve(workspace, 'abc ${config:editor.fontFamily} ${workspaceFolder} ${env:key1} xyz'), 'abc foo /VSCode/workspaceLocation Value for key1 xyz'); </ins> } });
let service = new ConfigurationResolverService(envVariables, new TestEditorService(), TestEnvironmentService, configurationService, mockCommandService); if (platform.isWindows) { <del> assert.strictEqual(service.resolve(workspace, '${config:editor.fontFamily} ${config:terminal.integrated.fontFamily} ${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), 'foo bar VSCodeworkspaceLocation - VSCodeworkspaceLocation Value for Key1 - Value for Key2'); </del> <ins> assert.strictEqual(service.resolve(workspace, '${config:editor.fontFamily} ${config:terminal.integrated.fontFamily} ${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), 'foo bar VSCodeworkspaceLocation - VSCodeworkspaceLocation Value for key1 - Value for key2'); </ins> } else { <del> assert.strictEqual(service.resolve(workspace, '${config:editor.fontFamily} ${config:terminal.integrated.fontFamily} ${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), 'foo bar /VSCode/workspaceLocation - /VSCode/workspaceLocation Value for Key1 - Value for Key2'); </del> <ins> assert.strictEqual(service.resolve(workspace, '${config:editor.fontFamily} ${config:terminal.integrated.fontFamily} ${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), 'foo bar /VSCode/workspaceLocation - /VSCode/workspaceLocation Value for key1 - Value for key2'); </ins> } });
import {ActionItem, BaseActionItem, Separator} from 'vs/base/browser/ui/actionbar/actionbar'; import {Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor} from 'vs/workbench/browser/actionBarRegistry'; import {IEditorInputActionContext, IEditorInputAction, EditorInputActionContributor} from 'vs/workbench/browser/parts/editor/baseEditor'; <del> import {AddToWorkingFiles, FocusWorkingFiles, FocusFilesExplorer, OpenPreviousWorkingFile, OpenNextWorkingFile, CloseAllFilesAction, CloseFileAction, CloseOtherFilesAction, GlobalCompareResourcesAction, GlobalNewFolderAction, RevertFileAction, SaveFilesAction, SaveAllAction, SaveFileAction, keybindingForAction, MoveFileToTrashAction, TriggerRenameFileAction, PasteFileAction, CopyFileAction, SelectResourceForCompareAction, CompareResourcesAction, NewFolderAction, NewFileAction, OpenToSideAction, ShowActiveFileInExplorer} from 'vs/workbench/parts/files/browser/fileActions'; </del> <ins> import {AddToWorkingFiles, FocusWorkingFiles, FocusFilesExplorer, OpenPreviousWorkingFile, OpenNextWorkingFile, CloseAllFilesAction, CloseFileAction, CloseOtherFilesAction, GlobalCompareResourcesAction, GlobalNewFileAction, GlobalNewFolderAction, RevertFileAction, SaveFilesAction, SaveAllAction, SaveFileAction, keybindingForAction, MoveFileToTrashAction, TriggerRenameFileAction, PasteFileAction, CopyFileAction, SelectResourceForCompareAction, CompareResourcesAction, NewFolderAction, NewFileAction, OpenToSideAction, ShowActiveFileInExplorer} from 'vs/workbench/parts/files/browser/fileActions'; </ins> import {RevertLocalChangesAction, AcceptLocalChangesAction, ConflictResolutionDiffEditorInput} from 'vs/workbench/parts/files/browser/saveErrorHandler'; import {SyncActionDescriptor} from 'vs/platform/actions/common/actions'; import {IWorkbenchActionRegistry, Extensions as ActionExtensions} from 'vs/workbench/common/actionRegistry';
registry.registerWorkbenchAction(new SyncActionDescriptor(SaveAllAction, SaveAllAction.ID, SaveAllAction.LABEL), category, ['save', 'all', 'files']); registry.registerWorkbenchAction(new SyncActionDescriptor(SaveFilesAction, SaveFilesAction.ID, null /* only for programmatic trigger */)); registry.registerWorkbenchAction(new SyncActionDescriptor(RevertFileAction, RevertFileAction.ID, RevertFileAction.LABEL), category, ['revert', 'file']); <ins> registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalNewFileAction, GlobalNewFileAction.ID, GlobalNewFileAction.LABEL), category, ['new', 'file']); </ins> registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalNewFolderAction, GlobalNewFolderAction.ID, GlobalNewFolderAction.LABEL), category, ['new', 'folder']); registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalCompareResourcesAction, GlobalCompareResourcesAction.ID, GlobalCompareResourcesAction.LABEL), category, ['compare', 'files']); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseFileAction, CloseFileAction.ID, CloseFileAction.LABEL, { primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_W) }), category, ['close', 'file']);
} /* Create new file from anywhere: Open untitled */ <del> export class GlobalNewFileAction extends Action { </del> <ins> export class GlobalNewUntitledFileAction extends Action { </ins> public static ID = 'workbench.action.files.newUntitledFile'; <del> public static LABEL = nls.localize('newFile', "New File"); </del> <ins> public static LABEL = nls.localize('newUntitledFile', "New Untitled File"); </ins> constructor( id: string,
} } <ins> /* Create new file from anywhere */ export class GlobalNewFileAction extends BaseGlobalNewAction { public static ID = 'workbench.action.files.newFile'; public static LABEL = nls.localize('newFile', "New File"); protected getAction(): IConstructorSignature2<ITree, IFileStat, Action> { return NewFileAction; } } </ins> /* Create new folder from anywhere */ export class GlobalNewFolderAction extends BaseGlobalNewAction { public static ID = 'workbench.action.files.newFolder';
export function keybindingForAction(id: string): Keybinding { switch (id) { <del> case GlobalNewFileAction.ID: </del> <ins> case GlobalNewUntitledFileAction.ID: </ins> return new Keybinding(KeyMod.CtrlCmd | KeyCode.KEY_N); case TriggerRenameFileAction.ID: return new Keybinding(isMacintosh ? KeyCode.Enter : KeyCode.F2);