From 88f02431b2c4814597fd956efd17d5660c37e1ed Mon Sep 17 00:00:00 2001 From: Bugra Cuhadaroglu Date: Tue, 27 Jun 2017 21:35:59 -0700 Subject: [PATCH 001/615] Feature 29241: Add option to disable git indicators in gutter --- .../scm/electron-browser/dirtydiffDecorator.ts | 9 ++++++++- .../scm/electron-browser/scm.contribution.ts | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index 32b3d1689d2..ede07c61666 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -19,6 +19,7 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IModelService } from 'vs/editor/common/services/modelService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import URI from 'vs/base/common/uri'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISCMService } from 'vs/workbench/services/scm/common/scm'; @@ -214,7 +215,8 @@ export class DirtyDiffDecorator implements ext.IWorkbenchContribution { @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IEditorGroupService editorGroupService: IEditorGroupService, @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private instantiationService: IInstantiationService, + @IConfigurationService private configurationService: IConfigurationService ) { this.toDispose.push(editorGroupService.onEditorsChanged(() => this.onEditorsChanged())); } @@ -228,6 +230,11 @@ export class DirtyDiffDecorator implements ext.IWorkbenchContribution { // or not. Needs context from the editor, to know whether it is a diff editor, in place editor // etc. + const enableDecorators = this.configurationService.lookup('editor.enableDecorators').value; + if (!enableDecorators) { + return; + } + const models = this.editorService.getVisibleEditors() // map to the editor controls diff --git a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts index cf3f2c4cac5..48de568e1b9 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -22,6 +22,7 @@ import { ISCMService } from 'vs/workbench/services/scm/common/scm'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { StatusUpdater } from './scmActivity'; +import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; class OpenSCMViewletAction extends ToggleViewletAction { @@ -82,6 +83,20 @@ const viewletDescriptor = new ViewletDescriptor( 36 ); +// Configuration +Registry.as(ConfigurationExtensions.Configuration).registerConfiguration({ + id: 'editor', + order: 5, + type: 'object', + properties: { + 'editor.enableDecorators': { + 'type': 'boolean', + 'default': true, + 'description': localize('enableDecorators', "Enables or disables color decorators when changes happen in the editor.") + }, + } +}); + Registry.as(ViewletExtensions.Viewlets) .registerViewlet(viewletDescriptor); From b25ad5c74d8b5246c02ea574069d5409a00b82bf Mon Sep 17 00:00:00 2001 From: Jeyanthinath Date: Sat, 23 Sep 2017 12:49:37 +0530 Subject: [PATCH 002/615] fix vscode #32681 --- extensions/git/src/commands.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 7b4c807989d..77b2e408074 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -550,8 +550,10 @@ export class CommandCenter { const originalDocument = await workspace.openTextDocument(originalUri); const selections = textEditor.selections; const selectedDiffs = diffs.filter(diff => { - const modifiedRange = diff.modifiedEndLineNumber === 0 - ? new Range(modifiedDocument.lineAt(diff.modifiedStartLineNumber - 1).range.end, modifiedDocument.lineAt(diff.modifiedStartLineNumber).range.start) + const modifiedRange = diff.modifiedEndLineNumber === 0 + ? diff.modifiedStartLineNumber === 0 + ? new Range(modifiedDocument.lineAt(diff.modifiedStartLineNumber).range.end, modifiedDocument.lineAt(diff.modifiedStartLineNumber).range.start) + : new Range(modifiedDocument.lineAt(diff.modifiedStartLineNumber - 1).range.end, modifiedDocument.lineAt(diff.modifiedStartLineNumber).range.start) : new Range(modifiedDocument.lineAt(diff.modifiedStartLineNumber - 1).range.start, modifiedDocument.lineAt(diff.modifiedEndLineNumber - 1).range.end); return selections.every(selection => !selection.intersection(modifiedRange)); From 282afd597905d832bc286b6fe302d38d8855282f Mon Sep 17 00:00:00 2001 From: Jeyanthinath Date: Sat, 23 Sep 2017 13:12:02 +0530 Subject: [PATCH 003/615] fixed hygiene --- extensions/git/src/commands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 77b2e408074..eb46204d644 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -550,7 +550,7 @@ export class CommandCenter { const originalDocument = await workspace.openTextDocument(originalUri); const selections = textEditor.selections; const selectedDiffs = diffs.filter(diff => { - const modifiedRange = diff.modifiedEndLineNumber === 0 + const modifiedRange = diff.modifiedEndLineNumber === 0 ? diff.modifiedStartLineNumber === 0 ? new Range(modifiedDocument.lineAt(diff.modifiedStartLineNumber).range.end, modifiedDocument.lineAt(diff.modifiedStartLineNumber).range.start) : new Range(modifiedDocument.lineAt(diff.modifiedStartLineNumber - 1).range.end, modifiedDocument.lineAt(diff.modifiedStartLineNumber).range.start) From 5206273a118daed2c5299cb1bbf57f53610dc3ed Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 25 Sep 2017 09:36:02 +0200 Subject: [PATCH 004/615] safepoint --- src/vs/editor/common/core/lineTokens.ts | 41 +- src/vs/editor/common/core/viewLineToken.ts | 73 ++- .../editor/common/model/editableTextModel.ts | 10 +- src/vs/editor/common/model/modelLine.ts | 595 +++++++++--------- .../common/model/textModelWithTokens.ts | 31 +- .../common/modes/textToHtmlTokenizer.ts | 1 + src/vs/editor/standalone/browser/colorizer.ts | 1 + .../test/common/core/lineTokens.test.ts | 5 +- .../test/common/model/model.line.test.ts | 449 +++++++++++-- .../test/common/model/model.modes.test.ts | 7 +- src/vs/editor/test/common/modesTestUtils.ts | 1 + 11 files changed, 811 insertions(+), 403 deletions(-) diff --git a/src/vs/editor/common/core/lineTokens.ts b/src/vs/editor/common/core/lineTokens.ts index 06b8d03b8ba..58fd21d0304 100644 --- a/src/vs/editor/common/core/lineTokens.ts +++ b/src/vs/editor/common/core/lineTokens.ts @@ -98,7 +98,10 @@ export class LineTokens { } public getTokenStartOffset(tokenIndex: number): number { - return this._tokens[(tokenIndex << 1)]; + if (tokenIndex > 0) { + return this._tokens[(tokenIndex - 1) << 1]; + } + return 0; } public getLanguageId(tokenIndex: number): LanguageId { @@ -112,20 +115,11 @@ export class LineTokens { } public getTokenEndOffset(tokenIndex: number): number { - if (tokenIndex + 1 < this._tokensCount) { - return this._tokens[(tokenIndex + 1) << 1]; - } - return this._textLength; + return this._tokens[tokenIndex << 1]; } /** * Find the token containing offset `offset`. - * ``` - * For example, with the following tokens [0, 5), [5, 9), [9, infinity) - * Searching for 0, 1, 2, 3 or 4 will return 0. - * Searching for 5, 6, 7 or 8 will return 1. - * Searching for 9, 10, 11, ... will return 2. - * ``` * @param offset The search offset * @return The index of the token containing the offset. */ @@ -139,13 +133,12 @@ export class LineTokens { } public tokenAt(tokenIndex: number): LineToken { - let startOffset = this._tokens[(tokenIndex << 1)]; - let endOffset: number; - if (tokenIndex + 1 < this._tokensCount) { - endOffset = this._tokens[(tokenIndex + 1) << 1]; - } else { - endOffset = this._textLength; - } + const startOffset = ( + tokenIndex > 0 + ? this._tokens[(tokenIndex - 1) << 1] + : 0 + ); + const endOffset = this._tokens[tokenIndex << 1]; let metadata = this._tokens[(tokenIndex << 1) + 1]; return new LineToken(this, tokenIndex, this._tokensCount, startOffset, endOffset, metadata); } @@ -165,10 +158,20 @@ export class LineTokens { } public inflate(): ViewLineToken[] { - return ViewLineTokenFactory.inflateArr(this._tokens, this._textLength); + return ViewLineTokenFactory.inflateArr(this._tokens); } public sliceAndInflate(startOffset: number, endOffset: number, deltaOffset: number): ViewLineToken[] { return ViewLineTokenFactory.sliceAndInflate(this._tokens, startOffset, endOffset, deltaOffset, this._textLength); } + + public static convertToEndOffset(tokens: Uint32Array, lineTextLength: number): void { + // TODO@tokenize: massage, use tokenLength + const tokenCount = (tokens.length >>> 1); + const lastTokenIndex = tokenCount - 1; + for (let tokenIndex = 0; tokenIndex < lastTokenIndex; tokenIndex++) { + tokens[tokenIndex << 1] = tokens[(tokenIndex + 1) << 1]; + } + tokens[lastTokenIndex << 1] = lineTextLength; + } } diff --git a/src/vs/editor/common/core/viewLineToken.ts b/src/vs/editor/common/core/viewLineToken.ts index 9dc11ad465e..fff2f8364e1 100644 --- a/src/vs/editor/common/core/viewLineToken.ts +++ b/src/vs/editor/common/core/viewLineToken.ts @@ -60,12 +60,13 @@ export class ViewLineToken { export class ViewLineTokenFactory { - public static inflateArr(tokens: Uint32Array, lineLength: number): ViewLineToken[] { - let result: ViewLineToken[] = []; + public static inflateArr(tokens: Uint32Array): ViewLineToken[] { + const tokensCount = (tokens.length >>> 1); - for (let i = 0, len = (tokens.length >>> 1); i < len; i++) { - let endOffset = (i + 1 < len ? tokens[((i + 1) << 1)] : lineLength); - let metadata = tokens[(i << 1) + 1]; + let result: ViewLineToken[] = new Array(tokensCount); + for (let i = 0; i < tokensCount; i++) { + const endOffset = tokens[i << 1]; + const metadata = tokens[(i << 1) + 1]; result[i] = new ViewLineToken(endOffset, metadata); } @@ -79,15 +80,15 @@ export class ViewLineTokenFactory { let result: ViewLineToken[] = [], resultLen = 0; for (let i = tokenIndex, len = (tokens.length >>> 1); i < len; i++) { - let tokenStartOffset = tokens[(i << 1)]; + const tokenStartOffset = (i > 0 ? tokens[((i - 1) << 1)] : 0); if (tokenStartOffset >= endOffset) { break; } - let tokenEndOffset = (i + 1 < len ? tokens[((i + 1) << 1)] : lineLength); - let newEndOffset = Math.min(maxEndOffset, tokenEndOffset - startOffset + deltaOffset); - let metadata = tokens[(i << 1) + 1]; + const tokenEndOffset = tokens[(i << 1)]; + const newEndOffset = Math.min(maxEndOffset, tokenEndOffset - startOffset + deltaOffset); + const metadata = tokens[(i << 1) + 1]; result[resultLen++] = new ViewLineToken(newEndOffset, metadata); } @@ -96,23 +97,55 @@ export class ViewLineTokenFactory { } public static findIndexInSegmentsArray(tokens: Uint32Array, desiredIndex: number): number { + // // TODO@tokenize: implement binary search + // const tokensCount = (tokens.length >>> 1); + // for (let tokenIndex = 0; tokenIndex < tokensCount; tokenIndex++) { + // const endOffset = tokens[tokenIndex << 1]; + // if (endOffset > desiredIndex) { + // return tokenIndex; + // } + // } + // return tokensCount - 1; - let low = 0; - let high = (tokens.length >>> 1) - 1; + return this._alt(tokens, desiredIndex); - while (low < high) { + // let low = 0; + // let high = (tokens.length >>> 1) - 1; - let mid = low + Math.ceil((high - low) / 2); + // while (low < high) { - let value = tokens[(mid << 1)]; + // let mid = low + Math.floor((high - low) / 2); - if (value > desiredIndex) { - high = mid - 1; - } else { - low = mid; + // let endOffset = tokens[(mid << 1)]; + + // if (endOffset < desiredIndex) { + // low = mid + 1; + // } else { + // high = mid; + // } + // // if (value > desiredIndex) { + // // high = mid - 1; + // // } else { + // // low = mid; + // // } + // } + + // let me = low; + // if (me !== ref) { + // throw new Error(`nope`); + // } + // return low; + } + + private static _alt(tokens: Uint32Array, desiredIndex: number): number { + // TODO@tokenize: implement binary search + const tokensCount = (tokens.length >>> 1); + for (let tokenIndex = 0; tokenIndex < tokensCount; tokenIndex++) { + const endOffset = tokens[tokenIndex << 1]; + if (endOffset > desiredIndex) { + return tokenIndex; } } - - return low; + return tokensCount - 1; } } diff --git a/src/vs/editor/common/model/editableTextModel.ts b/src/vs/editor/common/model/editableTextModel.ts index 66566d1092b..0826f1b505c 100644 --- a/src/vs/editor/common/model/editableTextModel.ts +++ b/src/vs/editor/common/model/editableTextModel.ts @@ -675,11 +675,15 @@ export class EditableTextModel extends TextModelWithDecorations implements edito ); } - contentChanges.push({ - range: new Range(startLineNumber, startColumn, endLineNumber, endColumn), + const contentChangeRange = new Range(startLineNumber, startColumn, endLineNumber, endColumn); + const contentChange: textModelEvents.IModelContentChange = { + range: contentChangeRange, rangeLength: op.rangeLength, text: op.lines ? op.lines.join(this.getEOL()) : '' - }); + }; + + contentChanges.push(contentChange); + this._tokens.applyEdits2(contentChangeRange, op.lines); // console.log('AFTER:'); // console.log('<<<\n' + this._lines.map(l => l.text).join('\n') + '\n>>>'); diff --git a/src/vs/editor/common/model/modelLine.ts b/src/vs/editor/common/model/modelLine.ts index e71219bd689..f438110e302 100644 --- a/src/vs/editor/common/model/modelLine.ts +++ b/src/vs/editor/common/model/modelLine.ts @@ -8,7 +8,10 @@ import { IState, FontStyle, StandardTokenType, MetadataConsts, ColorId, Language import { CharCode } from 'vs/base/common/charCode'; import { LineTokens } from 'vs/editor/common/core/lineTokens'; import { Position } from 'vs/editor/common/core/position'; +import { Range } from 'vs/editor/common/core/range'; import { Constants } from 'vs/editor/common/core/uint'; +import { ViewLineTokenFactory } from 'vs/editor/common/core/viewLineToken'; +import * as arrays from 'vs/base/common/arrays'; export interface ILineEdit { startColumn: number; @@ -97,21 +100,12 @@ export class MarkersTracker { } } -export interface ITokensAdjuster { - adjust(toColumn: number, delta: number, minimumAllowedColumn: number): void; - finish(delta: number, lineTextLength: number): void; -} - interface IMarkersAdjuster { adjustDelta(toColumn: number, delta: number, minimumAllowedColumn: number, moveSemantics: MarkerMoveSemantics): void; adjustSet(toColumn: number, newColumn: number, moveSemantics: MarkerMoveSemantics): void; finish(delta: number, lineTextLength: number): void; } -var NO_OP_TOKENS_ADJUSTER: ITokensAdjuster = { - adjust: () => { }, - finish: () => { } -}; var NO_OP_MARKERS_ADJUSTER: IMarkersAdjuster = { adjustDelta: () => { }, adjustSet: () => { }, @@ -163,15 +157,6 @@ export interface IModelLine { removeMarkers(deleteMarkers: { [markerId: string]: boolean; }): void; getMarkers(): LineMarker[]; - // --- tokenization - resetTokenizationState(): void; - isInvalid(): boolean; - setIsInvalid(isInvalid: boolean): void; - getState(): IState; - setState(state: IState): void; - getTokens(topLevelLanguageId: LanguageId): LineTokens; - setTokens(topLevelLanguageId: LanguageId, tokens: Uint32Array): void; - // --- indentation updateTabSize(tabSize: number): void; getIndentLevel(): number; @@ -197,7 +182,6 @@ export abstract class AbstractModelLine { public abstract get text(): string; protected abstract _setText(text: string, tabSize: number): void; - protected abstract _createTokensAdjuster(): ITokensAdjuster; protected abstract _createModelLine(text: string, tabSize: number): IModelLine; /// @@ -308,7 +292,6 @@ export abstract class AbstractModelLine { let deltaColumn = 0; let resultText = this.text; - let tokensAdjuster = this._createTokensAdjuster(); let markersAdjuster = this._createMarkersAdjuster(markersTracker); for (let i = 0, len = edits.length; i < len; i++) { @@ -326,15 +309,12 @@ export abstract class AbstractModelLine { // Adjust tokens & markers before this edit // console.log('Adjust tokens & markers before this edit'); - tokensAdjuster.adjust(edit.startColumn - 1, deltaColumn, 1); markersAdjuster.adjustDelta(edit.startColumn, deltaColumn, 1, edit.forceMoveMarkers ? MarkerMoveSemantics.ForceMove : (deletingCnt > 0 ? MarkerMoveSemantics.ForceStay : MarkerMoveSemantics.MarkerDefined)); // Adjust tokens & markers for the common part of this edit let commonLength = Math.min(deletingCnt, insertingCnt); if (commonLength > 0) { // console.log('Adjust tokens & markers for the common part of this edit'); - tokensAdjuster.adjust(edit.startColumn - 1 + commonLength, deltaColumn, startColumn); - if (!edit.forceMoveMarkers) { markersAdjuster.adjustDelta(edit.startColumn + commonLength, deltaColumn, startColumn, edit.forceMoveMarkers ? MarkerMoveSemantics.ForceMove : (deletingCnt > insertingCnt ? MarkerMoveSemantics.ForceStay : MarkerMoveSemantics.MarkerDefined)); } @@ -346,12 +326,10 @@ export abstract class AbstractModelLine { // Adjust tokens & markers inside this edit // console.log('Adjust tokens & markers inside this edit'); - tokensAdjuster.adjust(edit.endColumn, deltaColumn, startColumn); markersAdjuster.adjustSet(edit.endColumn, startColumn + insertingCnt, edit.forceMoveMarkers ? MarkerMoveSemantics.ForceMove : MarkerMoveSemantics.MarkerDefined); } // Wrap up tokens & markers; adjust remaining if needed - tokensAdjuster.finish(deltaColumn, resultText.length); markersAdjuster.finish(deltaColumn, resultText.length); // Save the resulting text @@ -525,14 +503,6 @@ export class ModelLine extends AbstractModelLine implements IModelLine { */ private _metadata: number; - public isInvalid(): boolean { - return (this._metadata & 0x00000001) ? true : false; - } - - public setIsInvalid(isInvalid: boolean): void { - this._metadata = (this._metadata & 0xfffffffe) | (isInvalid ? 1 : 0); - } - /** * Returns: * - -1 => the line consists of whitespace @@ -555,238 +525,16 @@ export class ModelLine extends AbstractModelLine implements IModelLine { } } - private _state: IState; - private _lineTokens: ArrayBuffer; - constructor(text: string, tabSize: number) { super(true); this._metadata = 0; this._setText(text, tabSize); - this._state = null; - this._lineTokens = null; } protected _createModelLine(text: string, tabSize: number): IModelLine { return new ModelLine(text, tabSize); } - public split(markersTracker: MarkersTracker, splitColumn: number, forceMoveMarkers: boolean, tabSize: number): IModelLine { - let result = super.split(markersTracker, splitColumn, forceMoveMarkers, tabSize); - - // Mark overflowing tokens for deletion & delete marked tokens - this._deleteMarkedTokens(this._markOverflowingTokensForDeletion(0, this.text.length)); - - return result; - } - - public append(markersTracker: MarkersTracker, myLineNumber: number, other: IModelLine, tabSize: number): void { - let thisTextLength = this.text.length; - - super.append(markersTracker, myLineNumber, other, tabSize); - - if (other instanceof ModelLine) { - let otherRawTokens = other._lineTokens; - if (otherRawTokens) { - // Other has real tokens - - let otherTokens = new Uint32Array(otherRawTokens); - - // Adjust other tokens - if (thisTextLength > 0) { - for (let i = 0, len = (otherTokens.length >>> 1); i < len; i++) { - otherTokens[(i << 1)] = otherTokens[(i << 1)] + thisTextLength; - } - } - - // Append other tokens - let myRawTokens = this._lineTokens; - if (myRawTokens) { - // I have real tokens - let myTokens = new Uint32Array(myRawTokens); - let result = new Uint32Array(myTokens.length + otherTokens.length); - result.set(myTokens, 0); - result.set(otherTokens, myTokens.length); - this._lineTokens = result.buffer; - } else { - // I don't have real tokens - this._lineTokens = otherTokens.buffer; - } - } - } - } - - // --- BEGIN STATE - - public resetTokenizationState(): void { - this._state = null; - this._lineTokens = null; - } - - public setState(state: IState): void { - this._state = state; - } - - public getState(): IState { - return this._state || null; - } - - // --- END STATE - - // --- BEGIN TOKENS - - public setTokens(topLevelLanguageId: LanguageId, tokens: Uint32Array): void { - if (!tokens || tokens.length === 0) { - this._lineTokens = null; - return; - } - if (tokens.length === 2) { - // there is one token - if (tokens[0] === 0 && tokens[1] === getDefaultMetadata(topLevelLanguageId)) { - this._lineTokens = null; - return; - } - } - this._lineTokens = tokens.buffer; - } - - public getTokens(topLevelLanguageId: LanguageId): LineTokens { - let rawLineTokens = this._lineTokens; - if (rawLineTokens) { - return new LineTokens(new Uint32Array(rawLineTokens), this._text); - } - - let lineTokens = new Uint32Array(2); - lineTokens[0] = 0; - lineTokens[1] = getDefaultMetadata(topLevelLanguageId); - return new LineTokens(lineTokens, this._text); - } - - // --- END TOKENS - - protected _createTokensAdjuster(): ITokensAdjuster { - if (!this._lineTokens) { - // This line does not have real tokens, so there is nothing to adjust - return NO_OP_TOKENS_ADJUSTER; - } - - let lineTokens = new Uint32Array(this._lineTokens); - let tokensLength = (lineTokens.length >>> 1); - let tokenIndex = 0; - let tokenStartOffset = 0; - let removeTokensCount = 0; - - let adjust = (toColumn: number, delta: number, minimumAllowedColumn: number) => { - // console.log(`------------------------------------------------------------------`); - // console.log(`before call: tokenIndex: ${tokenIndex}: ${lineTokens}`); - // console.log(`adjustTokens: ${toColumn} with delta: ${delta} and [${minimumAllowedColumn}]`); - // console.log(`tokenStartOffset: ${tokenStartOffset}`); - let minimumAllowedIndex = minimumAllowedColumn - 1; - - while (tokenStartOffset < toColumn && tokenIndex < tokensLength) { - - if (tokenStartOffset > 0 && delta !== 0) { - // adjust token's `startIndex` by `delta` - let newTokenStartOffset = Math.max(minimumAllowedIndex, tokenStartOffset + delta); - lineTokens[(tokenIndex << 1)] = newTokenStartOffset; - - // console.log(` * adjusted token start offset for token at ${tokenIndex}: ${newTokenStartOffset}`); - - if (delta < 0) { - let tmpTokenIndex = tokenIndex; - while (tmpTokenIndex > 0) { - let prevTokenStartOffset = lineTokens[((tmpTokenIndex - 1) << 1)]; - if (prevTokenStartOffset >= newTokenStartOffset) { - if (prevTokenStartOffset !== Constants.MAX_UINT_32) { - // console.log(` * marking for deletion token at ${tmpTokenIndex - 1}`); - lineTokens[((tmpTokenIndex - 1) << 1)] = Constants.MAX_UINT_32; - removeTokensCount++; - } - tmpTokenIndex--; - } else { - break; - } - } - } - } - - tokenIndex++; - if (tokenIndex < tokensLength) { - tokenStartOffset = lineTokens[(tokenIndex << 1)]; - } - } - // console.log(`after call: tokenIndex: ${tokenIndex}: ${lineTokens}`); - }; - - let finish = (delta: number, lineTextLength: number) => { - adjust(Constants.MAX_SAFE_SMALL_INTEGER, delta, 1); - - // Mark overflowing tokens for deletion & delete marked tokens - this._deleteMarkedTokens(this._markOverflowingTokensForDeletion(removeTokensCount, lineTextLength)); - }; - - return { - adjust: adjust, - finish: finish - }; - } - - private _markOverflowingTokensForDeletion(removeTokensCount: number, lineTextLength: number): number { - if (!this._lineTokens) { - return removeTokensCount; - } - - let lineTokens = new Uint32Array(this._lineTokens); - let tokensLength = (lineTokens.length >>> 1); - - if (removeTokensCount + 1 === tokensLength) { - // no more removing, cannot end up without any tokens for mode transition reasons - return removeTokensCount; - } - - for (let tokenIndex = tokensLength - 1; tokenIndex > 0; tokenIndex--) { - let tokenStartOffset = lineTokens[(tokenIndex << 1)]; - if (tokenStartOffset < lineTextLength) { - // valid token => stop iterating - return removeTokensCount; - } - - // this token now overflows the text => mark it for removal - if (tokenStartOffset !== Constants.MAX_UINT_32) { - // console.log(` * marking for deletion token at ${tokenIndex}`); - lineTokens[(tokenIndex << 1)] = Constants.MAX_UINT_32; - removeTokensCount++; - - if (removeTokensCount + 1 === tokensLength) { - // no more removing, cannot end up without any tokens for mode transition reasons - return removeTokensCount; - } - } - } - - return removeTokensCount; - } - - private _deleteMarkedTokens(removeTokensCount: number): void { - if (removeTokensCount === 0) { - return; - } - - let lineTokens = new Uint32Array(this._lineTokens); - let tokensLength = (lineTokens.length >>> 1); - let newTokens = new Uint32Array(((tokensLength - removeTokensCount) << 1)), newTokenIdx = 0; - for (let i = 0; i < tokensLength; i++) { - let startOffset = lineTokens[(i << 1)]; - if (startOffset === Constants.MAX_UINT_32) { - // marked for deletion - continue; - } - let metadata = lineTokens[(i << 1) + 1]; - newTokens[newTokenIdx++] = startOffset; - newTokens[newTokenIdx++] = metadata; - } - this._lineTokens = newTokens.buffer; - } - protected _setText(text: string, tabSize: number): void { this._text = text; if (tabSize === 0) { @@ -796,7 +544,6 @@ export class ModelLine extends AbstractModelLine implements IModelLine { this._setPlusOneIndentLevel(computePlusOneIndentLevel(text, tabSize)); } } - } /** @@ -836,47 +583,6 @@ export class MinimalModelLine extends AbstractModelLine implements IModelLine { return new MinimalModelLine(text, tabSize); } - public split(markersTracker: MarkersTracker, splitColumn: number, forceMoveMarkers: boolean, tabSize: number): IModelLine { - return super.split(markersTracker, splitColumn, forceMoveMarkers, tabSize); - } - - public append(markersTracker: MarkersTracker, myLineNumber: number, other: IModelLine, tabSize: number): void { - super.append(markersTracker, myLineNumber, other, tabSize); - } - - // --- BEGIN STATE - - public resetTokenizationState(): void { - } - - public setState(state: IState): void { - } - - public getState(): IState { - return null; - } - - // --- END STATE - - // --- BEGIN TOKENS - - public setTokens(topLevelLanguageId: LanguageId, tokens: Uint32Array): void { - } - - public getTokens(topLevelLanguageId: LanguageId): LineTokens { - let lineTokens = new Uint32Array(2); - lineTokens[0] = 0; - lineTokens[1] = getDefaultMetadata(topLevelLanguageId); - return new LineTokens(lineTokens, this._text); - } - - // --- END TOKENS - - protected _createTokensAdjuster(): ITokensAdjuster { - // This line does not have real tokens, so there is nothing to adjust - return NO_OP_TOKENS_ADJUSTER; - } - protected _setText(text: string, tabSize: number): void { this._text = text; } @@ -891,3 +597,298 @@ function getDefaultMetadata(topLevelLanguageId: LanguageId): number { | (ColorId.DefaultBackground << MetadataConsts.BACKGROUND_OFFSET) ) >>> 0; } + +const EMPTY_LINE_TOKENS = new Uint32Array(0); + +class ModelLineTokens { + _state: IState; + _lineTokens: ArrayBuffer; + _invalid: boolean; + + constructor(state: IState) { + this._state = state; + this._lineTokens = null; + this._invalid = true; + } + + public deleteBeginning(toChIndex: number): void { + if (this._lineTokens === null || this._lineTokens === EMPTY_LINE_TOKENS) { + return; + } + this.delete(0, toChIndex); + } + + public deleteEnding(fromChIndex: number): void { + if (this._lineTokens === null || this._lineTokens === EMPTY_LINE_TOKENS) { + return; + } + + const tokens = new Uint32Array(this._lineTokens); + const lineTextLength = tokens[tokens.length - 2]; + this.delete(fromChIndex, lineTextLength); + } + + public delete(fromChIndex: number, toChIndex: number): void { + if (this._lineTokens === null || this._lineTokens === EMPTY_LINE_TOKENS || fromChIndex === toChIndex) { + return; + } + + const tokens = new Uint32Array(this._lineTokens); + const tokensCount = (tokens.length >>> 1); + + // special case: deleting everything + if (fromChIndex === 0 && tokens[tokens.length - 2] === toChIndex) { + this._lineTokens = EMPTY_LINE_TOKENS; + return; + } + + const fromTokenIndex = ViewLineTokenFactory.findIndexInSegmentsArray(tokens, fromChIndex); + const fromTokenStartOffset = (fromTokenIndex > 0 ? tokens[(fromTokenIndex - 1) << 1] : 0); + const fromTokenEndOffset = tokens[fromTokenIndex << 1]; + + if (toChIndex < fromTokenEndOffset) { + // the delete range is inside a single token + const delta = (toChIndex - fromChIndex); + for (let i = fromTokenIndex; i < tokensCount; i++) { + tokens[i << 1] -= delta; + } + return; + } + + let dest: number; + let lastEnd: number; + if (fromTokenStartOffset !== fromChIndex) { + tokens[fromTokenIndex << 1] = fromChIndex; + dest = ((fromTokenIndex + 1) << 1); + lastEnd = fromChIndex; + } else { + dest = (fromTokenIndex << 1); + lastEnd = fromTokenStartOffset; + } + + const delta = (toChIndex - fromChIndex); + for (let tokenIndex = fromTokenIndex + 1; tokenIndex < tokensCount; tokenIndex++) { + const tokenEndOffset = tokens[tokenIndex << 1] - delta; + if (tokenEndOffset > lastEnd) { + tokens[dest++] = tokenEndOffset; + tokens[dest++] = tokens[(tokenIndex << 1) + 1]; + lastEnd = tokenEndOffset; + } + } + + if (dest === tokens.length) { + // nothing to trim + return; + } + + let tmp = new Uint32Array(dest); + tmp.set(tokens.subarray(0, dest), 0); + this._lineTokens = tmp.buffer; + } + + public append(_otherTokens: ArrayBuffer): void { + if (_otherTokens === EMPTY_LINE_TOKENS) { + return; + } + if (this._lineTokens === EMPTY_LINE_TOKENS) { + this._lineTokens = _otherTokens; + return; + } + if (this._lineTokens === null) { + return; + } + if (_otherTokens === null) { + // cannot determine combined line length... + this._lineTokens = null; + return; + } + const myTokens = new Uint32Array(this._lineTokens); + const otherTokens = new Uint32Array(_otherTokens); + const otherTokensCount = (otherTokens.length >>> 1); + + let result = new Uint32Array(myTokens.length + otherTokens.length); + result.set(myTokens, 0); + let dest = myTokens.length; + const delta = myTokens[myTokens.length - 2]; + for (let i = 0; i < otherTokensCount; i++) { + result[dest++] = otherTokens[(i << 1)] + delta; + result[dest++] = otherTokens[(i << 1) + 1]; + } + this._lineTokens = result.buffer; + } + + public insert(chIndex: number, textLength: number): void { + if (!this._lineTokens) { + // nothing to do + return; + } + + const tokens = new Uint32Array(this._lineTokens); + const tokensCount = (tokens.length >>> 1); + + let fromTokenIndex = ViewLineTokenFactory.findIndexInSegmentsArray(tokens, chIndex); + if (fromTokenIndex > 0) { + const fromTokenStartOffset = (fromTokenIndex > 0 ? tokens[(fromTokenIndex - 1) << 1] : 0); + if (fromTokenStartOffset === chIndex) { + fromTokenIndex--; + } + } + for (let tokenIndex = fromTokenIndex; tokenIndex < tokensCount; tokenIndex++) { + tokens[tokenIndex << 1] += textLength; + } + } +} + +export class ModelLinesTokens { + + private _tokens: ModelLineTokens[]; + + constructor() { + this._tokens = []; + } + + public setInitialState(initialState: IState): void { + this._tokens[0] = new ModelLineTokens(initialState); + } + + public getTokens(topLevelLanguageId: LanguageId, lineIndex: number, lineText: string): LineTokens { + let rawLineTokens: ArrayBuffer = null; + if (lineIndex < this._tokens.length) { + rawLineTokens = this._tokens[lineIndex]._lineTokens; + } + + if (rawLineTokens !== null && rawLineTokens !== EMPTY_LINE_TOKENS) { + return new LineTokens(new Uint32Array(rawLineTokens), lineText); + } + + let lineTokens = new Uint32Array(2); + lineTokens[0] = lineText.length; + lineTokens[1] = getDefaultMetadata(topLevelLanguageId); + return new LineTokens(lineTokens, lineText); + } + + public setIsInvalid(lineIndex: number, invalid: boolean): void { + if (lineIndex < this._tokens.length) { + this._tokens[lineIndex]._invalid = invalid; + } + } + + public isInvalid(lineIndex: number): boolean { + if (lineIndex < this._tokens.length) { + return this._tokens[lineIndex]._invalid; + } + return true; + } + + public getState(lineIndex: number): IState { + if (lineIndex < this._tokens.length) { + return this._tokens[lineIndex]._state; + } + return null; + } + + public setTokens(topLevelLanguageId: LanguageId, lineIndex: number, lineTextLength: number, tokens: Uint32Array): void { + let target: ModelLineTokens; + if (lineIndex < this._tokens.length) { + target = this._tokens[lineIndex]; + } else { + target = new ModelLineTokens(null); + this._tokens[lineIndex] = target; + } + + if (lineTextLength === 0) { + target._lineTokens = EMPTY_LINE_TOKENS; + return; + } + + if (!tokens || tokens.length === 0) { + tokens = new Uint32Array(2); + tokens[0] = 0; + tokens[1] = getDefaultMetadata(topLevelLanguageId); + } + + LineTokens.convertToEndOffset(tokens, lineTextLength); + + target._lineTokens = tokens.buffer; + } + + public setState(lineIndex: number, state: IState): void { + if (lineIndex < this._tokens.length) { + this._tokens[lineIndex]._state = state; + } else { + const tmp = new ModelLineTokens(state); + this._tokens[lineIndex] = tmp; + } + } + + // --- editing + + public applyEdits2(range: Range, lines: string[]): void { + this._acceptDeleteRange(range); + this._acceptInsertText(new Position(range.startLineNumber, range.startColumn), lines); + } + + private _acceptDeleteRange(range: Range): void { + + const firstLineIndex = range.startLineNumber - 1; + if (firstLineIndex >= this._tokens.length) { + return; + } + + if (range.startLineNumber === range.endLineNumber) { + if (range.startColumn === range.endColumn) { + // Nothing to delete + return; + } + + this._tokens[firstLineIndex].delete(range.startColumn - 1, range.endColumn - 1); + return; + } + + const firstLine = this._tokens[firstLineIndex]; + firstLine.deleteEnding(range.startColumn - 1); + + const lastLineIndex = range.endLineNumber - 1; + let lastLineTokens: ArrayBuffer = null; + if (lastLineIndex < this._tokens.length) { + const lastLine = this._tokens[lastLineIndex]; + lastLine.deleteBeginning(range.endColumn - 1); + lastLineTokens = lastLine._lineTokens; + } + + // Take remaining text on last line and append it to remaining text on first line + firstLine.append(lastLineTokens); + + // Delete middle lines + this._tokens.splice(range.startLineNumber, range.endLineNumber - range.startLineNumber); + } + + private _acceptInsertText(position: Position, insertLines: string[]): void { + + if (!insertLines || insertLines.length === 0) { + // Nothing to insert + return; + } + + const lineIndex = position.lineNumber - 1; + if (lineIndex >= this._tokens.length) { + return; + } + + if (insertLines.length === 1) { + // Inserting text on one line + this._tokens[lineIndex].insert(position.column - 1, insertLines[0].length); + return; + } + + const line = this._tokens[lineIndex]; + line.deleteEnding(position.column - 1); + line.insert(position.column - 1, insertLines[0].length); + + let insert: ModelLineTokens[] = new Array(insertLines.length - 1); + for (let i = insertLines.length - 2; i >= 0; i--) { + insert[i] = new ModelLineTokens(null); + } + this._tokens = arrays.arrayInsert(this._tokens, position.lineNumber, insert); + } +} diff --git a/src/vs/editor/common/model/textModelWithTokens.ts b/src/vs/editor/common/model/textModelWithTokens.ts index 14c19d4a080..583a7c1edb7 100644 --- a/src/vs/editor/common/model/textModelWithTokens.ts +++ b/src/vs/editor/common/model/textModelWithTokens.ts @@ -23,6 +23,7 @@ import { TokenizationResult2 } from 'vs/editor/common/core/token'; import { ITextSource, IRawTextSource } from 'vs/editor/common/model/textSource'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; import { IndentRange, computeRanges } from 'vs/editor/common/model/indentRanges'; +import { ModelLinesTokens } from 'vs/editor/common/model/modelLine'; class ModelTokensChangedEventBuilder { @@ -74,6 +75,7 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke private _languageRegistryListener: IDisposable; private _revalidateTokensTimeout: number; + /*protected*/_tokens: ModelLinesTokens; constructor(rawTextSource: IRawTextSource, creationOptions: editorCommon.ITextModelCreationOptions, languageIdentifier: LanguageIdentifier) { super(rawTextSource, creationOptions); @@ -132,9 +134,7 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke protected _resetTokenizationState(): void { this._clearTimers(); - for (let i = 0; i < this._lines.length; i++) { - this._lines[i].resetTokenizationState(); - } + this._tokens = new ModelLinesTokens(); this._tokenizationSupport = null; if (!this._isTooLargeForTokenization) { @@ -152,7 +152,7 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke } if (initialState) { - this._lines[0].setState(initialState); + this._tokens.setInitialState(initialState); } } @@ -213,7 +213,8 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke } private _getLineTokens(lineNumber: number): LineTokens { - return this._lines[lineNumber - 1].getTokens(this._languageIdentifier.id); + const lineText = this._lines[lineNumber - 1].text; + return this._tokens.getTokens(this._languageIdentifier.id, lineNumber - 1, lineText); } public getLanguageIdentifier(): LanguageIdentifier { @@ -263,10 +264,10 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke } protected _invalidateLine(lineIndex: number): void { - this._lines[lineIndex].setIsInvalid(true); + this._tokens.setIsInvalid(lineIndex, true); if (lineIndex < this._invalidLineStartIndex) { if (this._invalidLineStartIndex < this._lines.length) { - this._lines[this._invalidLineStartIndex].setIsInvalid(true); + this._tokens.setIsInvalid(this._invalidLineStartIndex, true); } this._invalidLineStartIndex = lineIndex; this._beginBackgroundTokenization(); @@ -363,7 +364,7 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke try { // Tokenize only the first X characters - let freshState = this._lines[lineIndex].getState().clone(); + let freshState = this._tokens.getState(lineIndex).clone(); r = this._tokenizationSupport.tokenize2(this._lines[lineIndex].text, freshState, 0); } catch (e) { e.friendlyMessage = TextModelWithTokens.MODE_TOKENIZATION_FAILED_MSG; @@ -371,22 +372,22 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke } if (!r) { - r = nullTokenize2(this._languageIdentifier.id, text, this._lines[lineIndex].getState(), 0); + r = nullTokenize2(this._languageIdentifier.id, text, this._tokens.getState(lineIndex), 0); } - this._lines[lineIndex].setTokens(this._languageIdentifier.id, r.tokens); + this._tokens.setTokens(this._languageIdentifier.id, lineIndex, this._lines[lineIndex].text.length, r.tokens); eventBuilder.registerChangedTokens(lineIndex + 1); - this._lines[lineIndex].setIsInvalid(false); + this._tokens.setIsInvalid(lineIndex, false); if (endStateIndex < linesLength) { - if (this._lines[endStateIndex].getState() !== null && r.endState.equals(this._lines[endStateIndex].getState())) { + if (this._tokens.getState(endStateIndex) !== null && r.endState.equals(this._tokens.getState(endStateIndex))) { // The end state of this line remains the same let nextInvalidLineIndex = lineIndex + 1; while (nextInvalidLineIndex < linesLength) { - if (this._lines[nextInvalidLineIndex].isInvalid()) { + if (this._tokens.isInvalid(nextInvalidLineIndex)) { break; } if (nextInvalidLineIndex + 1 < linesLength) { - if (this._lines[nextInvalidLineIndex + 1].getState() === null) { + if (this._tokens.getState(nextInvalidLineIndex + 1) === null) { break; } } else { @@ -399,7 +400,7 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke this._invalidLineStartIndex = Math.max(this._invalidLineStartIndex, nextInvalidLineIndex); lineIndex = nextInvalidLineIndex - 1; // -1 because the outer loop increments it } else { - this._lines[endStateIndex].setState(r.endState); + this._tokens.setState(endStateIndex, r.endState); } } else { this._lastState = r.endState; diff --git a/src/vs/editor/common/modes/textToHtmlTokenizer.ts b/src/vs/editor/common/modes/textToHtmlTokenizer.ts index ec741759baa..2378b6b9112 100644 --- a/src/vs/editor/common/modes/textToHtmlTokenizer.ts +++ b/src/vs/editor/common/modes/textToHtmlTokenizer.ts @@ -109,6 +109,7 @@ function _tokenizeToString(text: string, tokenizationSupport: ITokenizationSuppo } let tokenizationResult = tokenizationSupport.tokenize2(line, currentState, 0); + LineTokens.convertToEndOffset(tokenizationResult.tokens, line.length); let lineTokens = new LineTokens(tokenizationResult.tokens, line); let viewLineTokens = lineTokens.inflate(); diff --git a/src/vs/editor/standalone/browser/colorizer.ts b/src/vs/editor/standalone/browser/colorizer.ts index c8fa5477679..1ef854e18ef 100644 --- a/src/vs/editor/standalone/browser/colorizer.ts +++ b/src/vs/editor/standalone/browser/colorizer.ts @@ -166,6 +166,7 @@ function _actualColorize(lines: string[], tabSize: number, tokenizationSupport: for (let i = 0, length = lines.length; i < length; i++) { let line = lines[i]; let tokenizeResult = tokenizationSupport.tokenize2(line, state, 0); + LineTokens.convertToEndOffset(tokenizeResult.tokens, line.length); let lineTokens = new LineTokens(tokenizeResult.tokens, line); let renderResult = renderViewLine(new RenderLineInput( false, diff --git a/src/vs/editor/test/common/core/lineTokens.test.ts b/src/vs/editor/test/common/core/lineTokens.test.ts index a80638a8bc9..0f58c44da8d 100644 --- a/src/vs/editor/test/common/core/lineTokens.test.ts +++ b/src/vs/editor/test/common/core/lineTokens.test.ts @@ -21,10 +21,9 @@ suite('LineTokens', () => { let binTokens = new Uint32Array(tokens.length << 1); for (let i = 0, len = tokens.length; i < len; i++) { - let token = tokens[i]; - binTokens[(i << 1)] = token.startIndex; + binTokens[(i << 1)] = (i + 1 < len ? tokens[i + 1].startIndex : text.length); binTokens[(i << 1) + 1] = ( - token.foreground << MetadataConsts.FOREGROUND_OFFSET + tokens[i].foreground << MetadataConsts.FOREGROUND_OFFSET ) >>> 0; } diff --git a/src/vs/editor/test/common/model/model.line.test.ts b/src/vs/editor/test/common/model/model.line.test.ts index 81dbba468d5..3c18a3810a6 100644 --- a/src/vs/editor/test/common/model/model.line.test.ts +++ b/src/vs/editor/test/common/model/model.line.test.ts @@ -7,12 +7,18 @@ import * as assert from 'assert'; import { LineTokens } from 'vs/editor/common/core/lineTokens'; import { ModelLine, ILineEdit, LineMarker, MarkersTracker } from 'vs/editor/common/model/modelLine'; -import { MetadataConsts } from 'vs/editor/common/modes'; +import { MetadataConsts, LanguageIdentifier } from 'vs/editor/common/modes'; import { Position } from 'vs/editor/common/core/position'; +import { Range } from 'vs/editor/common/core/range'; import { ViewLineToken, ViewLineTokenFactory } from 'vs/editor/common/core/viewLineToken'; +import { EditableTextModel } from 'vs/editor/common/model/editableTextModel'; +import { TextModel } from 'vs/editor/common/model/textModel'; +import { RawTextSource } from 'vs/editor/common/model/textSource'; function assertLineTokens(_actual: LineTokens, _expected: TestToken[]): void { - let expected = ViewLineTokenFactory.inflateArr(TestToken.toTokens(_expected), _actual.getLineLength()); + let tmp = TestToken.toTokens(_expected); + LineTokens.convertToEndOffset(tmp, _actual.getLineLength()); + let expected = ViewLineTokenFactory.inflateArr(tmp); let actual = _actual.inflate(); let decode = (token: ViewLineToken) => { return { @@ -294,28 +300,375 @@ class TestToken { } } -suite('Editor Model - modelLine.applyEdits text & tokens', () => { +suite('ModelLinesTokens', () => { + interface IBufferLineState { + text: string; + tokens: TestToken[]; + } + + interface IEdit { + range: Range; + text: string; + } + + function testApplyEdits(initial: IBufferLineState[], edits: IEdit[], expected: IBufferLineState[]): void { + const initialText = initial.map(el => el.text).join('\n'); + const model = new EditableTextModel(RawTextSource.fromString(initialText), TextModel.DEFAULT_CREATION_OPTIONS, new LanguageIdentifier('test', 0)); + for (let lineIndex = 0; lineIndex < initial.length; lineIndex++) { + const lineTokens = initial[lineIndex].tokens; + const lineTextLength = model.getLineMaxColumn(lineIndex + 1) - 1; + model._tokens.setTokens(0, lineIndex, lineTextLength, TestToken.toTokens(lineTokens)); + } + + model.applyEdits(edits.map((ed) => ({ + identifier: null, + range: ed.range, + text: ed.text, + forceMoveMarkers: false + }))); + + for (let lineIndex = 0; lineIndex < expected.length; lineIndex++) { + const actualLine = model.getLineContent(lineIndex + 1); + const actualTokens = model.getLineTokens(lineIndex + 1); + assert.equal(actualLine, expected[lineIndex].text); + assertLineTokens(actualTokens, expected[lineIndex].tokens); + } + } + + test('single delete 1', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }], + [{ range: new Range(1, 1, 1, 2), text: '' }], + [{ + text: 'ello world', + tokens: [new TestToken(0, 1), new TestToken(4, 2), new TestToken(5, 3)] + }] + ); + }); + + test('single delete 2', () => { + testApplyEdits( + [{ + text: 'helloworld', + tokens: [new TestToken(0, 1), new TestToken(5, 2)] + }], + [{ range: new Range(1, 3, 1, 8), text: '' }], + [{ + text: 'herld', + tokens: [new TestToken(0, 1), new TestToken(2, 2)] + }] + ); + }); + + test('single delete 3', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }], + [{ range: new Range(1, 1, 1, 6), text: '' }], + [{ + text: ' world', + tokens: [new TestToken(0, 2), new TestToken(1, 3)] + }] + ); + }); + + test('single delete 4', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }], + [{ range: new Range(1, 2, 1, 7), text: '' }], + [{ + text: 'hworld', + tokens: [new TestToken(0, 1), new TestToken(1, 3)] + }] + ); + }); + + test('single delete 5', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }], + [{ range: new Range(1, 1, 1, 12), text: '' }], + [{ + text: '', + tokens: [new TestToken(0, 1)] + }] + ); + }); + + test('multi delete 6', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }, { + text: 'hello world', + tokens: [new TestToken(0, 4), new TestToken(5, 5), new TestToken(6, 6)] + }, { + text: 'hello world', + tokens: [new TestToken(0, 7), new TestToken(5, 8), new TestToken(6, 9)] + }], + [{ range: new Range(1, 6, 3, 6), text: '' }], + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 8), new TestToken(6, 9)] + }] + ); + }); + + test('multi delete 7', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }, { + text: 'hello world', + tokens: [new TestToken(0, 4), new TestToken(5, 5), new TestToken(6, 6)] + }, { + text: 'hello world', + tokens: [new TestToken(0, 7), new TestToken(5, 8), new TestToken(6, 9)] + }], + [{ range: new Range(1, 12, 3, 12), text: '' }], + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }] + ); + }); + + test('multi delete 8', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }, { + text: 'hello world', + tokens: [new TestToken(0, 4), new TestToken(5, 5), new TestToken(6, 6)] + }, { + text: 'hello world', + tokens: [new TestToken(0, 7), new TestToken(5, 8), new TestToken(6, 9)] + }], + [{ range: new Range(1, 1, 3, 1), text: '' }], + [{ + text: 'hello world', + tokens: [new TestToken(0, 7), new TestToken(5, 8), new TestToken(6, 9)] + }] + ); + }); + + test('multi delete 9', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }, { + text: 'hello world', + tokens: [new TestToken(0, 4), new TestToken(5, 5), new TestToken(6, 6)] + }, { + text: 'hello world', + tokens: [new TestToken(0, 7), new TestToken(5, 8), new TestToken(6, 9)] + }], + [{ range: new Range(1, 12, 3, 1), text: '' }], + [{ + text: 'hello worldhello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3), new TestToken(11, 7), new TestToken(16, 8), new TestToken(17, 9)] + }] + ); + }); + + test('single insert 1', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }], + [{ range: new Range(1, 1, 1, 1), text: 'xx' }], + [{ + text: 'xxhello world', + tokens: [new TestToken(0, 1), new TestToken(7, 2), new TestToken(8, 3)] + }] + ); + }); + + test('single insert 2', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }], + [{ range: new Range(1, 2, 1, 2), text: 'xx' }], + [{ + text: 'hxxello world', + tokens: [new TestToken(0, 1), new TestToken(7, 2), new TestToken(8, 3)] + }] + ); + }); + + test('single insert 3', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }], + [{ range: new Range(1, 6, 1, 6), text: 'xx' }], + [{ + text: 'helloxx world', + tokens: [new TestToken(0, 1), new TestToken(7, 2), new TestToken(8, 3)] + }] + ); + }); + + test('single insert 4', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }], + [{ range: new Range(1, 7, 1, 7), text: 'xx' }], + [{ + text: 'hello xxworld', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(8, 3)] + }] + ); + }); + + test('single insert 5', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }], + [{ range: new Range(1, 12, 1, 12), text: 'xx' }], + [{ + text: 'hello worldxx', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }] + ); + }); + + test('multi insert 6', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }], + [{ range: new Range(1, 1, 1, 1), text: '\n' }], + [{ + text: '', + tokens: [new TestToken(0, 1)] + }, { + text: 'hello world', + tokens: [new TestToken(0, 1)] + }] + ); + }); + + test('multi insert 7', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }], + [{ range: new Range(1, 12, 1, 12), text: '\n' }], + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }, { + text: '', + tokens: [new TestToken(0, 1)] + }] + ); + }); + + test('multi insert 8', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }], + [{ range: new Range(1, 7, 1, 7), text: '\n' }], + [{ + text: 'hello ', + tokens: [new TestToken(0, 1), new TestToken(5, 2)] + }, { + text: 'world', + tokens: [new TestToken(0, 1)] + }] + ); + }); + + test('multi insert 9', () => { + testApplyEdits( + [{ + text: 'hello world', + tokens: [new TestToken(0, 1), new TestToken(5, 2), new TestToken(6, 3)] + }, { + text: 'hello world', + tokens: [new TestToken(0, 4), new TestToken(5, 5), new TestToken(6, 6)] + }], + [{ range: new Range(1, 7, 1, 7), text: 'xx\nyy' }], + [{ + text: 'hello xx', + tokens: [new TestToken(0, 1), new TestToken(5, 2)] + }, { + text: 'yyworld', + tokens: [new TestToken(0, 1)] + }, { + text: 'hello world', + tokens: [new TestToken(0, 4), new TestToken(5, 5), new TestToken(6, 6)] + }] + ); + }); function testLineEditTokens(initialText: string, initialTokens: TestToken[], edits: ILineEdit[], expectedText: string, expectedTokens: TestToken[]): void { - let line = new ModelLine(initialText, NO_TAB_SIZE); - line.setTokens(0, TestToken.toTokens(initialTokens)); - - line.applyEdits(new MarkersTracker(), edits, NO_TAB_SIZE); - - assert.equal(line.text, expectedText); - assertLineTokens(line.getTokens(0), expectedTokens); + testApplyEdits( + [{ + text: initialText, + tokens: initialTokens + }], + edits.map((ed) => ({ + range: new Range(1, ed.startColumn, 1, ed.endColumn), + text: ed.text + })), + [{ + text: expectedText, + tokens: expectedTokens + }] + ); } test('insertion on empty line', () => { - let line = new ModelLine('some text', NO_TAB_SIZE); - line.setTokens(0, TestToken.toTokens([new TestToken(0, 1)])); + const model = new EditableTextModel(RawTextSource.fromString('some text'), TextModel.DEFAULT_CREATION_OPTIONS, new LanguageIdentifier('test', 0)); + model._tokens.setTokens(0, 0, model.getLineMaxColumn(1) - 1, TestToken.toTokens([new TestToken(0, 1)])); - line.applyEdits(new MarkersTracker(), [{ startColumn: 1, endColumn: 10, text: '', forceMoveMarkers: false }], NO_TAB_SIZE); - line.setTokens(0, new Uint32Array(0)); + model.applyEdits([{ + identifier: null, + range: new Range(1, 1, 1, 10), + text: '', + forceMoveMarkers: false + }]); - line.applyEdits(new MarkersTracker(), [{ startColumn: 1, endColumn: 1, text: 'a', forceMoveMarkers: false }], NO_TAB_SIZE); - assertLineTokens(line.getTokens(0), [new TestToken(0, 1)]); + model._tokens.setTokens(0, 0, model.getLineMaxColumn(1) - 1, new Uint32Array(0)); + + model.applyEdits([{ + identifier: null, + range: new Range(1, 1, 1, 1), + text: 'a', + forceMoveMarkers: false + }]); + + const actualTokens = model.getLineTokens(1); + assertLineTokens(actualTokens, [new TestToken(0, 1)]); }); test('updates tokens on insertion 1', () => { @@ -736,7 +1089,7 @@ suite('Editor Model - modelLine.applyEdits text & tokens', () => { }], '', [ - new TestToken(0, 3) + new TestToken(0, 1) ] ); }); @@ -826,8 +1179,7 @@ suite('Editor Model - modelLine.applyEdits text & tokens', () => { }], 'Hi world, ciao', [ - new TestToken(0, 1), - new TestToken(2, 0), + new TestToken(0, 0), new TestToken(3, 2), new TestToken(8, 0), new TestToken(10, 0), @@ -858,26 +1210,32 @@ suite('Editor Model - modelLine.applyEdits text & tokens', () => { }], 'Hi wmy friends, ciao', [ - new TestToken(0, 1), - new TestToken(2, 0), + new TestToken(0, 0), new TestToken(3, 2), new TestToken(14, 0), new TestToken(16, 0), ] ); }); -}); -suite('Editor Model - modelLine.split text & tokens', () => { function testLineSplitTokens(initialText: string, initialTokens: TestToken[], splitColumn: number, expectedText1: string, expectedText2: string, expectedTokens: TestToken[]): void { - let line = new ModelLine(initialText, NO_TAB_SIZE); - line.setTokens(0, TestToken.toTokens(initialTokens)); - - let other = line.split(new MarkersTracker(), splitColumn, false, NO_TAB_SIZE); - - assert.equal(line.text, expectedText1); - assert.equal(other.text, expectedText2); - assertLineTokens(line.getTokens(0), expectedTokens); + testApplyEdits( + [{ + text: initialText, + tokens: initialTokens + }], + [{ + range: new Range(1, splitColumn, 1, splitColumn), + text: '\n' + }], + [{ + text: expectedText1, + tokens: expectedTokens + }, { + text: expectedText2, + tokens: [new TestToken(0, 1)] + }] + ); } test('split at the beginning', () => { @@ -950,20 +1308,25 @@ suite('Editor Model - modelLine.split text & tokens', () => { ] ); }); -}); -suite('Editor Model - modelLine.append text & tokens', () => { function testLineAppendTokens(aText: string, aTokens: TestToken[], bText: string, bTokens: TestToken[], expectedText: string, expectedTokens: TestToken[]): void { - let a = new ModelLine(aText, NO_TAB_SIZE); - a.setTokens(0, TestToken.toTokens(aTokens)); - - let b = new ModelLine(bText, NO_TAB_SIZE); - b.setTokens(0, TestToken.toTokens(bTokens)); - - a.append(new MarkersTracker(), 1, b, NO_TAB_SIZE); - - assert.equal(a.text, expectedText); - assertLineTokens(a.getTokens(0), expectedTokens); + testApplyEdits( + [{ + text: aText, + tokens: aTokens + }, { + text: bText, + tokens: bTokens + }], + [{ + range: new Range(1, aText.length + 1, 2, 1), + text: '' + }], + [{ + text: expectedText, + tokens: expectedTokens + }] + ); } test('append empty 1', () => { diff --git a/src/vs/editor/test/common/model/model.modes.test.ts b/src/vs/editor/test/common/model/model.modes.test.ts index 5d970ea6c69..38ad0009c0d 100644 --- a/src/vs/editor/test/common/model/model.modes.test.ts +++ b/src/vs/editor/test/common/model/model.modes.test.ts @@ -185,7 +185,7 @@ suite('Editor Model - Model Modes 2', () => { function invalidEqual(model: Model, expected: number[]): void { let actual: number[] = []; for (let i = 0, len = model.getLineCount(); i < len; i++) { - if (model._lines[i].isInvalid()) { + if (model._tokens.isInvalid(i)) { actual.push(i); } } @@ -199,7 +199,7 @@ suite('Editor Model - Model Modes 2', () => { function statesEqual(model: Model, states: string[]): void { var i, len = states.length - 1; for (i = 0; i < len; i++) { - stateEqual(model._lines[i].getState(), states[i]); + stateEqual(model._tokens.getState(i), states[i]); } stateEqual((model)._lastState, states[len]); } @@ -253,8 +253,9 @@ suite('Editor Model - Model Modes 2', () => { thisModel.forceTokenization(5); statesEqual(thisModel, ['', 'Line1', 'Line2', 'Line3', 'Line4', 'Line5']); thisModel.applyEdits([EditOperation.insert(new Position(1, 6), '\nNew line\nAnother new line')]); + invalidEqual(thisModel, [0, 1, 2]); thisModel.applyEdits([EditOperation.insert(new Position(5, 6), '-')]); - invalidEqual(thisModel, [0, 4]); + invalidEqual(thisModel, [0, 1, 2, 4]); thisModel.forceTokenization(7); statesEqual(thisModel, ['', 'Line1', 'New line', 'Another new line', 'Line2', 'Line3-', 'Line4', 'Line5']); }); diff --git a/src/vs/editor/test/common/modesTestUtils.ts b/src/vs/editor/test/common/modesTestUtils.ts index 211362c220a..8dceda3b0a0 100644 --- a/src/vs/editor/test/common/modesTestUtils.ts +++ b/src/vs/editor/test/common/modesTestUtils.ts @@ -30,5 +30,6 @@ export function createFakeScopedLineTokens(rawTokens: TokenText[]): ScopedLineTo line += rawToken.text; } + LineTokens.convertToEndOffset(tokens, line.length); return createScopedLineTokens(new LineTokens(tokens, line), 0); } From 26aa18de15974d0ec57d48ad3a6767cf253c3645 Mon Sep 17 00:00:00 2001 From: Matthew Ferderber Date: Fri, 29 Sep 2017 17:21:14 -0400 Subject: [PATCH 005/615] use previous commit msg for amend, Fixes #35182 --- extensions/git/src/commands.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 5ca21612e77..02b278034f3 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -856,9 +856,17 @@ export class CommandCenter { return message; } + const getPreviousCommitMessage = async () => { + //Only return the previous commit message if it's an amend commit and the repo already has a commit + if (opts && opts.amend && repository.HEAD && repository.HEAD.commit) { + return (await repository.getCommit('HEAD')).message; + } + }; + return await window.showInputBox({ placeHolder: localize('commit message', "Commit message"), prompt: localize('provide commit message', "Please provide a commit message"), + value: await getPreviousCommitMessage(), ignoreFocusOut: true }); }; From 27e4463134a17c3514a0187509d0497fb33eab13 Mon Sep 17 00:00:00 2001 From: Dmitry Kabardinov Date: Fri, 6 Oct 2017 13:06:09 +0300 Subject: [PATCH 006/615] Commit unstaged files after pop-up confirmation (#35185) --- extensions/git/src/commands.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index fc66825d924..355c5e8a2e5 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -832,6 +832,8 @@ export class CommandCenter { if (!opts) { opts = { all: noStagedChanges }; + } else if ((opts.all === false) && noStagedChanges) { + opts = { ...opts, all: noStagedChanges }; } // enable signing of commits if configurated From 22d926fed60d0646c759dc3805321af8347df8d9 Mon Sep 17 00:00:00 2001 From: Dmitry Kabardinov Date: Fri, 6 Oct 2017 14:27:01 +0300 Subject: [PATCH 007/615] Git - show there are no changes to stash message only if there are neither staged nor unsataged files (#35645) --- extensions/git/src/commands.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index fc66825d924..334c008f953 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1283,7 +1283,9 @@ export class CommandCenter { @command('git.stash', { repository: true }) async stash(repository: Repository): Promise { - if (repository.workingTreeGroup.resourceStates.length === 0) { + const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0; + const noStagedChanges = repository.indexGroup.resourceStates.length === 0; + if (noUnstagedChanges && noStagedChanges) { window.showInformationMessage(localize('no changes stash', "There are no changes to stash.")); return; } From 6c40a968f42b464b38263c177e58108f71b973b6 Mon Sep 17 00:00:00 2001 From: BattleBas Date: Thu, 12 Oct 2017 20:19:07 -0500 Subject: [PATCH 008/615] Added setting "git.autoRepositoryDetection" When opening just one file, the setting "autoRepositoryDetection" allows the user to control whether the entire repository changes will be displayed or just the changes of the current file. --- extensions/git/package.json | 5 +++++ extensions/git/package.nls.json | 1 + extensions/git/src/repository.ts | 21 ++++++++++++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index abb7f5400ea..de983bed86c 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -769,6 +769,11 @@ "default": null, "isExecutable": true }, + "git.autoRepositoryDetection": { + "type": "boolean", + "description": "%config.autoRepositoryDetection%", + "default": true + }, "git.autorefresh": { "type": "boolean", "description": "%config.autorefresh%", diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index d191adfadf4..d960307f53c 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -45,6 +45,7 @@ "command.stashPopLatest": "Pop Latest Stash", "config.enabled": "Whether git is enabled", "config.path": "Path to the git executable", + "config.autoRepositoryDetection": "Whether a repository should be automatically detected for a single file", "config.autorefresh": "Whether auto refreshing is enabled", "config.autofetch": "Whether auto fetching is enabled", "config.enableLongCommitWarning": "Whether long commit messages should be warned about", diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 6c9f781c58f..b99158bbc96 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -742,9 +742,18 @@ export class Repository implements Disposable { const index: Resource[] = []; const workingTree: Resource[] = []; const merge: Resource[] = []; + const repoDetection = config.get('autoRepositoryDetection') === true; status.forEach(raw => { - const uri = Uri.file(path.join(this.repository.root, raw.path)); + const fullFilePath = path.join(this.repository.root, raw.path); + + if (!repoDetection && workspace.workspaceFolders === undefined) { + if (!this.detectActiveFile(fullFilePath)) { + return; + } + } + + const uri = Uri.file(fullFilePath); const renameUri = raw.rename ? Uri.file(path.join(this.repository.root, raw.rename)) : undefined; switch (raw.x + raw.y) { @@ -802,6 +811,16 @@ export class Repository implements Disposable { this._onDidChangeStatus.fire(); } + private detectActiveFile(fullFilePath: string): boolean { + if (window.activeTextEditor !== undefined) { + if (window.activeTextEditor.document.fileName === fullFilePath) { + return true; + } + } + + return false; + } + private onFSChange(uri: Uri): void { const config = workspace.getConfiguration('git'); const autorefresh = config.get('autorefresh'); From 9e2338a8c7d58b0011b7c6d7760cc4f031d00e6f Mon Sep 17 00:00:00 2001 From: Peter Kahle Date: Thu, 12 Oct 2017 21:43:25 -0400 Subject: [PATCH 009/615] First, naive pass at supporting submodules. Scan for submodules when a module is added, and add those repositories immediately. --- extensions/git/src/git.ts | 12 ++++++++++++ extensions/git/src/model.ts | 17 +++++++++++++++++ extensions/git/src/repository.ts | 4 ++++ 3 files changed, 33 insertions(+) diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index d0f69123a04..77596b31976 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -997,6 +997,18 @@ export class Repository { return uniqBy(rawRemotes, remote => remote.name); } + async getSubmodules(): Promise { + const result = await this.run(['submodule', 'status']); + const regex = /^([ \+\-U])\w* (\w*)( \(.*\))?/; + const submodules = result.stdout.split('\n') + .filter(b => !!b) + .map(line => regex.exec(line)) + .filter(g => !!g) + .map((groups: RegExpExecArray) => path.join(this.repositoryRoot, groups[2])); + //this._git.onOutput.emit('log', submodules); + return submodules; + } + async getBranch(name: string): Promise { if (name === 'HEAD') { return this.getHEAD(); diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 93a809a20fe..cb5a6f266ea 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -185,6 +185,22 @@ export class Model { }); } + private scanForSubmodules(repository: Repository) { + const submodules = repository.getSubmodules(); + submodules.then((elements) => elements.forEach(submoduleRoot => { + //console.log(`Opening ${submoduleRoot} as git repository`); + try { + // We can't call tryOpenRepository, because a submodule is going to be under an open repository, so will fail. + const subRepository = new Repository(this.git.open((submoduleRoot))); + this.open(subRepository); + } catch (err) { + if (err.gitErrorCode === GitErrorCodes.NotAGitRepository) { + return; + } + } + })); + } + @sequentialize async tryOpenRepository(path: string): Promise { if (this.getRepository(path)) { @@ -228,6 +244,7 @@ export class Model { const openRepository = { repository, dispose }; this.openRepositories.push(openRepository); this._onDidOpenRepository.fire(repository); + this.scanForSubmodules(repository); } close(repository: Repository): void { diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index f4dab0e46e5..3938b7a56f2 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -602,6 +602,10 @@ export class Repository implements Disposable { }); } + async getSubmodules(): Promise { + return await this.repository.getSubmodules(); + } + async getStashes(): Promise { return await this.repository.getStashes(); } From 472349046bb57c045764a03345b6b85a5e3420e8 Mon Sep 17 00:00:00 2001 From: Peter Kahle Date: Fri, 13 Oct 2017 08:50:11 -0400 Subject: [PATCH 010/615] Sorting repositories when searching by Uri to ensure nested repositories are found if appropriate. --- extensions/git/src/model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index cb5a6f266ea..36a79c6f8b2 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -299,7 +299,7 @@ export class Model { if (hint instanceof Uri) { const resourcePath = hint.fsPath; - for (const liveRepository of this.openRepositories) { + for (const liveRepository of this.openRepositories.sort((a, b) => b.repository.root.length - a.repository.root.length)) { const relativePath = path.relative(liveRepository.repository.root, resourcePath); if (!/^\.\./.test(relativePath)) { From b97bad54b16af593ec1e50086ba99f6ad6bcdfd8 Mon Sep 17 00:00:00 2001 From: Peter Kahle Date: Sun, 15 Oct 2017 20:46:07 -0400 Subject: [PATCH 011/615] When clicking on a changed submodule in the git window, do nothing. --- extensions/git/src/commands.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index c41d60d2fbb..d6e024917c3 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -13,6 +13,7 @@ import { toGitUri, fromGitUri } from './uri'; import { grep } from './util'; import { applyLineChanges, intersectDiffWithRange, toLineRanges, invertLineChange } from './staging'; import * as path from 'path'; +import { lstatSync } from 'fs'; import * as os from 'os'; import TelemetryReporter from 'vscode-extension-telemetry'; import * as nls from 'vscode-nls'; @@ -159,6 +160,9 @@ export class CommandCenter { } private async _openResource(resource: Resource, preview?: boolean, preserveFocus?: boolean, preserveSelection?: boolean): Promise { + if (lstatSync(resource.resourceUri.fsPath).isDirectory()) { + return; // it's a submodule. + } const left = this.getLeftResource(resource); const right = this.getRightResource(resource); const title = this.getTitle(resource); From 124b9a4032e6d524d5f841d7a903d94f46c9bf50 Mon Sep 17 00:00:00 2001 From: Peter Kahle Date: Sun, 15 Oct 2017 21:15:36 -0400 Subject: [PATCH 012/615] Cleaning up handling of Git Submodule status --- extensions/git/src/git.ts | 9 +++++++-- extensions/git/src/model.ts | 4 ++-- extensions/git/src/repository.ts | 26 +++++++++++++++++++++++--- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 77596b31976..910c3d2c828 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -32,6 +32,11 @@ export interface Remote { url: string; } +export interface ISubmodule { + Root: string; + Status: string; +} + export interface Stash { index: number; description: string; @@ -997,14 +1002,14 @@ export class Repository { return uniqBy(rawRemotes, remote => remote.name); } - async getSubmodules(): Promise { + async getSubmodules(): Promise { const result = await this.run(['submodule', 'status']); const regex = /^([ \+\-U])\w* (\w*)( \(.*\))?/; const submodules = result.stdout.split('\n') .filter(b => !!b) .map(line => regex.exec(line)) .filter(g => !!g) - .map((groups: RegExpExecArray) => path.join(this.repositoryRoot, groups[2])); + .map((groups: RegExpExecArray) => ({ Root: path.join(this.repositoryRoot, groups[2]), Status: groups[1] })); //this._git.onOutput.emit('log', submodules); return submodules; } diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 36a79c6f8b2..428403564df 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -187,11 +187,11 @@ export class Model { private scanForSubmodules(repository: Repository) { const submodules = repository.getSubmodules(); - submodules.then((elements) => elements.forEach(submoduleRoot => { + submodules.then((elements) => elements.forEach(submodule => { //console.log(`Opening ${submoduleRoot} as git repository`); try { // We can't call tryOpenRepository, because a submodule is going to be under an open repository, so will fail. - const subRepository = new Repository(this.git.open((submoduleRoot))); + const subRepository = new Repository(this.git.open((submodule.Root))); this.open(subRepository); } catch (err) { if (err.gitErrorCode === GitErrorCodes.NotAGitRepository) { diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 3938b7a56f2..e7e8149e101 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -6,7 +6,7 @@ 'use strict'; import { Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor } from 'vscode'; -import { Repository as BaseRepository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash, RefType } from './git'; +import { Repository as BaseRepository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash, RefType, ISubmodule } from './git'; import { anyEvent, filterEvent, eventToPromise, dispose, find } from './util'; import { memoize, throttle, debounce } from './decorators'; import { toGitUri } from './uri'; @@ -304,6 +304,17 @@ export interface GitResourceGroup extends SourceControlResourceGroup { resourceStates: Resource[]; } +export enum SubmoduleStatus { + Uninitialized, + Current, + Conflict, + Modified +} + +export interface Submodule { + Root: string; + Status: SubmoduleStatus; +} export class Repository implements Disposable { private _onDidChangeRepository = new EventEmitter(); @@ -602,8 +613,17 @@ export class Repository implements Disposable { }); } - async getSubmodules(): Promise { - return await this.repository.getSubmodules(); + async getSubmodules(): Promise { + const submodules: ISubmodule[] = await this.repository.getSubmodules(); + return submodules.map(isub => { + var status = SubmoduleStatus.Current; + switch (isub.Status) { + case '-': { status = SubmoduleStatus.Uninitialized; break; } + case '+': { status = SubmoduleStatus.Modified; break; } + case 'U': { status = SubmoduleStatus.Conflict; break; } + } + return { Root: isub.Root, Status: status }; + }); } async getStashes(): Promise { From 3afbdb412663aeaa15d80f8e523e10c65f4c64e5 Mon Sep 17 00:00:00 2001 From: Stuart Baker Date: Tue, 17 Oct 2017 14:38:08 +0100 Subject: [PATCH 013/615] Ask to publish branch if there is no upstream --- extensions/git/src/commands.ts | 24 ++++++++++++++++++++++-- extensions/git/src/git.ts | 5 ++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 2988ad609a7..80ccf7ac511 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1197,7 +1197,27 @@ export class CommandCenter { return; } - await repository.push(); + if (!repository.HEAD || !repository.HEAD.name) { + window.showWarningMessage(localize('nobranch', "Please check out a branch to push to a remote.")); + return; + } + + try { + await repository.push(); + } catch (err) { + if (err.gitErrorCode !== GitErrorCodes.NoUpstreamBranch) { + throw err; + } + + const branchName = repository.HEAD.name; + const message = localize('confirm publish branch', "The branch '{0}' has no upstream branch. Would you like to publish this branch?", branchName); + const yes = localize('ok', "OK"); + const pick = await window.showWarningMessage(message, { modal: true }, yes); + + if (pick === yes) { + await this.publish(repository); + } + } } @command('git.pushWithTags', { repository: true }) @@ -1523,4 +1543,4 @@ export class CommandCenter { dispose(): void { this.disposables.forEach(d => d.dispose()); } -} \ No newline at end of file +} diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index d0f69123a04..4dc5311e794 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -290,7 +290,8 @@ export const GitErrorCodes = { NoRemoteReference: 'NoRemoteReference', NoLocalChanges: 'NoLocalChanges', NoStashFound: 'NoStashFound', - LocalChangesOverwritten: 'LocalChangesOverwritten' + LocalChangesOverwritten: 'LocalChangesOverwritten', + NoUpstreamBranch: 'NoUpstreamBranch' }; function getGitErrorCode(stderr: string): string | undefined { @@ -841,6 +842,8 @@ export class Repository { err.gitErrorCode = GitErrorCodes.PushRejected; } else if (/Could not read from remote repository/.test(err.stderr || '')) { err.gitErrorCode = GitErrorCodes.RemoteConnectionError; + } else if (/^fatal: The current branch .* has no upstream branch/.test(err.stderr || '')) { + err.gitErrorCode = GitErrorCodes.NoUpstreamBranch; } throw err; From 170161d67febfc0d916707edb28bd58772be8ff2 Mon Sep 17 00:00:00 2001 From: BattleBas Date: Tue, 17 Oct 2017 22:23:52 -0500 Subject: [PATCH 014/615] Simplified method to check active file Updated the "detectActiveFile" method to be more simple and straightforward. Thanks to @lodenrogue suggestion! --- extensions/git/src/repository.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index b99158bbc96..ac2d24fe1be 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -811,14 +811,8 @@ export class Repository implements Disposable { this._onDidChangeStatus.fire(); } - private detectActiveFile(fullFilePath: string): boolean { - if (window.activeTextEditor !== undefined) { - if (window.activeTextEditor.document.fileName === fullFilePath) { - return true; - } - } - - return false; + private detectActiveFile(fullFilePath: string): boolean | undefined { + return window.activeTextEditor && window.activeTextEditor.document.fileName === fullFilePath; } private onFSChange(uri: Uri): void { From b4d51dcc6cbdd84b4cf84d293a77618733ea76bd Mon Sep 17 00:00:00 2001 From: Keegan Carruthers-Smith Date: Fri, 27 Oct 2017 11:07:03 +0200 Subject: [PATCH 015/615] git: Sort RepositoryPicks to rank active repo first --- extensions/git/src/model.ts | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index be87561ae9a..0d6339668b2 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -27,7 +27,7 @@ class RepositoryPick implements QuickPickItem { .join(' '); } - constructor(public readonly repository: Repository) { } + constructor(public readonly repository: Repository, public readonly index: number) { } } export interface ModelChangeEvent { @@ -257,7 +257,34 @@ export class Model { throw new Error(localize('no repositories', "There are no available repositories")); } - const picks = this.openRepositories.map(e => new RepositoryPick(e.repository)); + const picks = this.openRepositories.map((e, index) => new RepositoryPick(e.repository, index)); + + // Sort picks such that repositories containing the active text editor + // appear first. + const active = window.activeTextEditor; + if (active && active.document.fileName) { + const hasActiveEditor = (root: string) => { + const relative = path.relative(root, active.document.fileName); + return !!relative && !relative.startsWith('..') && !path.isAbsolute(relative); + }; + picks.sort((a, b) => { + const aHas = hasActiveEditor(a.repository.root); + const bHas = hasActiveEditor(b.repository.root); + if (aHas !== bHas) { + return aHas ? -1 : 1; + } + if (aHas && a.repository.root.length !== b.repository.root.length) { + // Both a and b contain the active editor document, so one + // is an ancestor of the other. We prefer to return the + // child (likely a submodule) since the active editor will + // be part of that repo. Child is the longer path. + return b.repository.root.length - a.repository.root.length; + } + // Otherwise everything else is equal, so keeps the positions stable + return a.index - b.index; + }); + } + const placeHolder = localize('pick repo', "Choose a repository"); const pick = await window.showQuickPick(picks, { placeHolder }); From 325d2af34d62abfadb18dd508b4c81f88fec2745 Mon Sep 17 00:00:00 2001 From: warpdesign Date: Tue, 31 Oct 2017 14:45:24 +0100 Subject: [PATCH 016/615] copy from terminal doesn't work #31902 --- .../electron-browser/terminalInstance.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 378e96b3648..7f78447e001 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -111,6 +111,8 @@ export class TerminalInstance implements ITerminalInstance { private _widgetManager: TerminalWidgetManager; private _linkHandler: TerminalLinkHandler; + private _selectionStarted: boolean; + public get id(): number { return this._id; } public get processId(): number { return this._processId; } public get onDisposed(): Event { return this._onDisposed.event; } @@ -148,6 +150,7 @@ export class TerminalInstance implements ITerminalInstance { this._id = TerminalInstance._idCounter++; this._terminalHasTextContextKey = KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED.bindTo(this._contextKeyService); this._preLaunchInputQueue = ''; + this._selectionStarted = false; this._onDisposed = new Emitter(); this._onDataForApi = new Emitter<{ instance: ITerminalInstance, data: string }>(); @@ -328,12 +331,28 @@ export class TerminalInstance implements ITerminalInstance { return undefined; }); + + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'mousedown', (event: KeyboardEvent) => { + // Track down the mousedown event since we may not have the corresponding mouseup: + // in case the mouse is released outside of _xterm.element. + this._selectionStarted = true; + })); + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'mouseup', (event: KeyboardEvent) => { // Wait until mouseup has propagated through the DOM before // evaluating the new selection state. setTimeout(() => this._refreshSelectionContextKey(), 0); })); + // We need to listen to the mouseup event up to the document since the user may release the mouse button anywhere + // outside of _xterm.element. + this._instanceDisposables.push(dom.addDisposableListener(document, 'mouseup', (event: KeyboardEvent) => { + // Only refresh selection if the mouseup event happened inside _xterm.element. + if (this._selectionStarted === true) { + setTimeout(() => this._refreshSelectionContextKey(), 0); + } + })); + // xterm.js currently drops selection on keyup as we need to handle this case. this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'keyup', (event: KeyboardEvent) => { // Wait until keyup has propagated through the DOM before evaluating @@ -556,7 +575,9 @@ export class TerminalInstance implements ITerminalInstance { private _refreshSelectionContextKey() { const activePanel = this._panelService.getActivePanel(); const isActive = activePanel && activePanel.getId() === TERMINAL_PANEL_ID; + this._terminalHasTextContextKey.set(isActive && this.hasSelection()); + this._selectionStarted = false; } protected _getCwd(shell: IShellLaunchConfig, root: Uri): string { From b1f2d50f0fac5d3a8bce3d1526093d73ecce0721 Mon Sep 17 00:00:00 2001 From: warpdesign Date: Thu, 2 Nov 2017 10:41:15 +0100 Subject: [PATCH 017/615] xterm element mouseup handler no longer needed --- .../parts/terminal/electron-browser/terminalInstance.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 7f78447e001..c9b664152ff 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -338,12 +338,6 @@ export class TerminalInstance implements ITerminalInstance { this._selectionStarted = true; })); - this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'mouseup', (event: KeyboardEvent) => { - // Wait until mouseup has propagated through the DOM before - // evaluating the new selection state. - setTimeout(() => this._refreshSelectionContextKey(), 0); - })); - // We need to listen to the mouseup event up to the document since the user may release the mouse button anywhere // outside of _xterm.element. this._instanceDisposables.push(dom.addDisposableListener(document, 'mouseup', (event: KeyboardEvent) => { From 51b33f314fa2afa2ed52545aa7b567b7412e3f49 Mon Sep 17 00:00:00 2001 From: warpdesign Date: Fri, 3 Nov 2017 10:14:05 +0100 Subject: [PATCH 018/615] removed un-necessary property on terminalInstance --- .../electron-browser/terminalInstance.ts | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index c9b664152ff..ad47b0d867f 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -111,8 +111,6 @@ export class TerminalInstance implements ITerminalInstance { private _widgetManager: TerminalWidgetManager; private _linkHandler: TerminalLinkHandler; - private _selectionStarted: boolean; - public get id(): number { return this._id; } public get processId(): number { return this._processId; } public get onDisposed(): Event { return this._onDisposed.event; } @@ -150,7 +148,6 @@ export class TerminalInstance implements ITerminalInstance { this._id = TerminalInstance._idCounter++; this._terminalHasTextContextKey = KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED.bindTo(this._contextKeyService); this._preLaunchInputQueue = ''; - this._selectionStarted = false; this._onDisposed = new Emitter(); this._onDataForApi = new Emitter<{ instance: ITerminalInstance, data: string }>(); @@ -333,18 +330,12 @@ export class TerminalInstance implements ITerminalInstance { }); this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'mousedown', (event: KeyboardEvent) => { - // Track down the mousedown event since we may not have the corresponding mouseup: - // in case the mouse is released outside of _xterm.element. - this._selectionStarted = true; - })); - - // We need to listen to the mouseup event up to the document since the user may release the mouse button anywhere - // outside of _xterm.element. - this._instanceDisposables.push(dom.addDisposableListener(document, 'mouseup', (event: KeyboardEvent) => { - // Only refresh selection if the mouseup event happened inside _xterm.element. - if (this._selectionStarted === true) { + // We need to listen to the mouseup event up to the document since the user may release the mouse button anywhere + // outside of _xterm.element. + const listener = dom.addDisposableListener(document, 'mouseup', (event: KeyboardEvent) => { setTimeout(() => this._refreshSelectionContextKey(), 0); - } + listener.dispose(); + }); })); // xterm.js currently drops selection on keyup as we need to handle this case. @@ -571,7 +562,6 @@ export class TerminalInstance implements ITerminalInstance { const isActive = activePanel && activePanel.getId() === TERMINAL_PANEL_ID; this._terminalHasTextContextKey.set(isActive && this.hasSelection()); - this._selectionStarted = false; } protected _getCwd(shell: IShellLaunchConfig, root: Uri): string { From adb68e27f4a091b2fbc37f80cac01ae1333a92b5 Mon Sep 17 00:00:00 2001 From: cleidigh Date: Sat, 11 Nov 2017 16:31:03 -0500 Subject: [PATCH 019/615] Add cwd to TerminalOptions for extension API --- src/vs/vscode.d.ts | 6 ++++++ .../api/electron-browser/mainThreadTerminalService.ts | 3 ++- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- src/vs/workbench/api/node/extHostTerminalService.ts | 6 ++++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index c201468107c..5de295f4eef 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -4986,6 +4986,12 @@ declare module 'vscode' { * Args for the custom shell executable, this does not work on Windows (see #8429) */ shellArgs?: string[]; + + /** + * A path for the current working directory to be used for the terminal. + */ + cwd?: string; + /** * Object with environment variables that will be added to the VS Code process. */ diff --git a/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts b/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts index aade4a664e3..e7b0968d860 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts @@ -33,11 +33,12 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape // when the extension host process goes down ? } - public $createTerminal(name?: string, shellPath?: string, shellArgs?: string[], env?: { [key: string]: string }, waitOnExit?: boolean): TPromise { + public $createTerminal(name?: string, shellPath?: string, shellArgs?: string[], cwd?: string, env?: { [key: string]: string }, waitOnExit?: boolean): TPromise { const shellLaunchConfig: IShellLaunchConfig = { name, executable: shellPath, args: shellArgs, + cwd: cwd, waitOnExit, ignoreConfigurationCwd: true, env diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 42ae15c73ab..3768e1f1f14 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -296,7 +296,7 @@ export interface MainThreadProgressShape extends IDisposable { } export interface MainThreadTerminalServiceShape extends IDisposable { - $createTerminal(name?: string, shellPath?: string, shellArgs?: string[], env?: { [key: string]: string }, waitOnExit?: boolean): TPromise; + $createTerminal(name?: string, shellPath?: string, shellArgs?: string[], cwd?: string, env?: { [key: string]: string }, waitOnExit?: boolean): TPromise; $dispose(terminalId: number): void; $hide(terminalId: number): void; $sendText(terminalId: number, text: string, addNewLine: boolean): void; diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index dd7e1c10b60..a088da5029f 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -24,6 +24,7 @@ export class ExtHostTerminal implements vscode.Terminal { name?: string, shellPath?: string, shellArgs?: string[], + cwd?: string, env?: { [key: string]: string }, waitOnExit?: boolean ) { @@ -33,7 +34,8 @@ export class ExtHostTerminal implements vscode.Terminal { this._pidPromise = new TPromise(c => { this._pidPromiseComplete = c; }); - this._proxy.$createTerminal(name, shellPath, shellArgs, env, waitOnExit).then((id) => { + + this._proxy.$createTerminal(name, shellPath, shellArgs, cwd, env, waitOnExit).then((id) => { this._id = id; this._queuedRequests.forEach((r) => { r.run(this._proxy, this._id); @@ -114,7 +116,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { } public createTerminalFromOptions(options: vscode.TerminalOptions): vscode.Terminal { - let terminal = new ExtHostTerminal(this._proxy, options.name, options.shellPath, options.shellArgs, options.env/*, options.waitOnExit*/); + let terminal = new ExtHostTerminal(this._proxy, options.name, options.shellPath, options.shellArgs, options.cwd, options.env /*, options.waitOnExit*/); this._terminals.push(terminal); return terminal; } From 2faf7344b92775aadd21de847fd5cd5e3d6bbe25 Mon Sep 17 00:00:00 2001 From: Joe Martella Date: Mon, 13 Nov 2017 22:45:22 -0800 Subject: [PATCH 020/615] Adds "copy on select" feature (with setting) --- .../electron-browser/terminal.contribution.ts | 5 +++++ .../terminal/electron-browser/terminalPanel.ts | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index cc79fb6c3ff..efa1a808d38 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -120,6 +120,11 @@ configurationRegistry.registerConfiguration({ 'type': 'boolean', 'default': TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE }, + 'terminal.integrated.copyOnSelection': { + 'description': nls.localize('terminal.integrated.copyOnSelection', "When set, text selected in the terminal will be copied to the clipboard."), + 'type': 'boolean', + 'default': false + }, 'terminal.integrated.fontFamily': { 'description': nls.localize('terminal.integrated.fontFamily', "Controls the font family of the terminal, this defaults to editor.fontFamily's value."), 'type': 'string' diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 2dd16ba5775..2fbbfab149d 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -221,6 +221,20 @@ export class TerminalPanel extends Panel { } } })); + this._register(dom.addDisposableListener(this._parentDomElement, 'mouseup', (event: MouseEvent) => { + if (this._configurationService.getValue('terminal.integrated.copyOnSelection')) { + if (this._terminalService.terminalInstances.length === 0) { + return; + } + + if (event.which === 1) { + let terminal = this._terminalService.getActiveInstance(); + if (terminal.hasSelection()) { + terminal.copySelection(); + } + } + } + })); this._register(dom.addDisposableListener(this._parentDomElement, 'contextmenu', (event: MouseEvent) => { if (!this._cancelContextMenu) { const standardEvent = new StandardMouseEvent(event); From 89b9d1e40a5cce7024045adf02bcc495b49a1514 Mon Sep 17 00:00:00 2001 From: Nick Snyder Date: Tue, 14 Nov 2017 16:50:08 -0800 Subject: [PATCH 021/615] ensure all cases are handled By removing the default case and undefined from the return type, the type system can ensure that all cases are handled. --- extensions/git/src/repository.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 826b27bff8a..9875d4e05d0 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -184,7 +184,7 @@ export class Resource implements SourceControlResourceState { return { strikeThrough, faded, tooltip, light, dark, letter, color, source: 'git.resource' /*todo@joh*/ }; } - get letter(): string | undefined { + get letter(): string { switch (this.type) { case Status.INDEX_MODIFIED: case Status.MODIFIED: @@ -209,12 +209,10 @@ export class Resource implements SourceControlResourceState { case Status.BOTH_ADDED: case Status.BOTH_MODIFIED: return 'C'; - default: - return undefined; } } - get color(): ThemeColor | undefined { + get color(): ThemeColor { switch (this.type) { case Status.INDEX_MODIFIED: case Status.MODIFIED: @@ -237,8 +235,6 @@ export class Resource implements SourceControlResourceState { case Status.BOTH_ADDED: case Status.BOTH_MODIFIED: return new ThemeColor('gitDecoration.conflictingResourceForeground'); - default: - return undefined; } } @@ -263,7 +259,7 @@ export class Resource implements SourceControlResourceState { } } - get resourceDecoration(): DecorationData | undefined { + get resourceDecoration(): DecorationData { const title = this.tooltip; const abbreviation = this.letter; const color = this.color; From 924b1002bbdf10e2c068e02f9042136e17d07662 Mon Sep 17 00:00:00 2001 From: Sindre Tellevik Date: Fri, 17 Nov 2017 00:09:23 +0100 Subject: [PATCH 022/615] Git branches sorted by committerdate, latest first. --- extensions/git/src/git.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 21475fbd434..cd9de30c4c4 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -1059,7 +1059,7 @@ export class Repository { } async getRefs(): Promise { - const result = await this.run(['for-each-ref', '--format', '%(refname) %(objectname)']); + const result = await this.run(['for-each-ref', '--format', '%(refname) %(objectname)', '--sort', '-committerdate']); const fn = (line: string): Ref | null => { let match: RegExpExecArray | null; From f32ed90bebdeef4713ba62fc2c4a663e693a3905 Mon Sep 17 00:00:00 2001 From: CoenraadS Date: Sun, 19 Nov 2017 13:23:56 +0100 Subject: [PATCH 023/615] Use keydown instead of keypress to close terminal This allows the terminal to be closed using the arrow keys. https://github.com/Microsoft/vscode/issues/37983 --- .../parts/terminal/electron-browser/terminalInstance.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 46cc64e1c2f..5370446febf 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -714,7 +714,7 @@ export class TerminalInstance implements ITerminalInstance { } private _attachPressAnyKeyToCloseListener() { - this._processDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'keypress', (event: KeyboardEvent) => { + this._processDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'keydown', (event: KeyboardEvent) => { this.dispose(); event.preventDefault(); })); From 3a10793dada956e5d32d97ec4287c1c02107d111 Mon Sep 17 00:00:00 2001 From: Pradeep Murugesan Date: Mon, 16 Oct 2017 15:47:22 +0200 Subject: [PATCH 024/615] added a warning when user tries to commit, and there are unsaved files --- extensions/git/src/commands.ts | 8 +++++++- extensions/git/src/util.ts | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 57a1701510e..3507de84ce9 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -10,7 +10,7 @@ import { Ref, RefType, Git, GitErrorCodes, Branch } from './git'; import { Repository, Resource, Status, CommitOptions, ResourceGroupType } from './repository'; import { Model } from './model'; import { toGitUri, fromGitUri } from './uri'; -import { grep } from './util'; +import { grep, hasUnSavedFiles } from './util'; import { applyLineChanges, intersectDiffWithRange, toLineRanges, invertLineChange } from './staging'; import * as path from 'path'; import * as os from 'os'; @@ -927,6 +927,12 @@ export class CommandCenter { const noStagedChanges = repository.indexGroup.resourceStates.length === 0; const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0; + if (hasUnSavedFiles()) { + const message = localize('unsaved files', "There are some unsaved files.\n\n Save the files before proceeding"); + window.showInformationMessage(message, { modal: true }); + return false; + } + // no changes, and the user has not configured to commit all in this case if (!noUnstagedChanges && noStagedChanges && !enableSmartCommit) { diff --git a/extensions/git/src/util.ts b/extensions/git/src/util.ts index ef13e9de13c..ed4c48f149a 100644 --- a/extensions/git/src/util.ts +++ b/extensions/git/src/util.ts @@ -5,7 +5,7 @@ 'use strict'; -import { Event } from 'vscode'; +import { Event, workspace } from 'vscode'; import { dirname } from 'path'; import { Readable } from 'stream'; import * as fs from 'fs'; @@ -273,4 +273,10 @@ export function detectUnicodeEncoding(buffer: Buffer): Encoding | null { } return null; +} + +export function hasUnSavedFiles(): boolean { + return workspace.textDocuments + .filter(textDocument => !textDocument.isUntitled && textDocument.isDirty) + .length > 0; } \ No newline at end of file From 17f12b6238bedcf679a9a547d8f31481b259adf7 Mon Sep 17 00:00:00 2001 From: Till Date: Wed, 22 Nov 2017 07:36:42 +0100 Subject: [PATCH 025/615] Fix #38623 CodeActions are sorted by type --- src/vs/editor/contrib/quickFix/quickFix.ts | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/quickFix/quickFix.ts b/src/vs/editor/contrib/quickFix/quickFix.ts index a7de10300ec..7c9eaf759c0 100644 --- a/src/vs/editor/contrib/quickFix/quickFix.ts +++ b/src/vs/editor/contrib/quickFix/quickFix.ts @@ -31,7 +31,30 @@ export function getCodeActions(model: IReadOnlyModel, range: Range): TPromise<(C }); }); - return TPromise.join(promises).then(() => allResults); + return TPromise.join(promises).then(() => + allResults.sort(codeActionsAndCommandsComparator) + ); +} + +function isCommand(quickFix: CodeAction | Command): quickFix is Command { + return (quickFix).id !== undefined; +} + +function codeActionsAndCommandsComparator(a: (CodeAction | Command), b: (CodeAction | Command)): number { + if (isCommand(a)) { + if (isCommand(b)) { + return a.title.localeCompare(b.title); + } else { + return 1; + } + } + else { + if (isCommand(b)) { + return -1; + } else { + return a.title.localeCompare(b.title); + } + } } registerLanguageCommand('_executeCodeActionProvider', function (accessor, args) { From e567b71fbc7bbeea538f517e3365c3e5b96c2a14 Mon Sep 17 00:00:00 2001 From: Dozed12 Date: Mon, 27 Nov 2017 15:59:05 +0000 Subject: [PATCH 026/615] Show remote branches Fixes #37492 --- extensions/git/src/commands.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 46128ca252f..578d228ecf0 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1249,25 +1249,24 @@ export class CommandCenter { return; } - const picks = remotes.map(r => ({ label: r.name, description: r.url })); + const remotePicks = remotes.map(r => ({ label: r.name, description: r.url })); const placeHolder = localize('pick remote pull repo', "Pick a remote to pull the branch from"); - const pick = await window.showQuickPick(picks, { placeHolder }); + const remotePick = await window.showQuickPick(remotePicks, { placeHolder }); - if (!pick) { + if (!remotePick) { return; } - const branchName = await window.showInputBox({ - placeHolder: localize('branch name', "Branch name"), - prompt: localize('provide branch name', "Please provide a branch name"), - ignoreFocusOut: true - }); + const remoteRefs = repository.refs; + const remoteRefsFiltered = remoteRefs.filter(r => (r.remote === remotePick.label)); + const branchPicks = remoteRefsFiltered.map(r => ({ label: r.name})) as {label : string; description : string}[]; + const branchPick = await window.showQuickPick(branchPicks, { placeHolder }); - if (!branchName) { + if (!branchPick) { return; } - repository.pull(false, pick.label, branchName); + repository.pull(false, remotePick.label, branchPick.label); } @command('git.pull', { repository: true }) From 87efd098686542d2acf42759d28b3594d7fb3b7a Mon Sep 17 00:00:00 2001 From: Dozed12 Date: Mon, 27 Nov 2017 16:04:47 +0000 Subject: [PATCH 027/615] Revert "Show remote branches" This reverts commit e567b71fbc7bbeea538f517e3365c3e5b96c2a14. --- extensions/git/src/commands.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 578d228ecf0..46128ca252f 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1249,24 +1249,25 @@ export class CommandCenter { return; } - const remotePicks = remotes.map(r => ({ label: r.name, description: r.url })); + const picks = remotes.map(r => ({ label: r.name, description: r.url })); const placeHolder = localize('pick remote pull repo', "Pick a remote to pull the branch from"); - const remotePick = await window.showQuickPick(remotePicks, { placeHolder }); + const pick = await window.showQuickPick(picks, { placeHolder }); - if (!remotePick) { + if (!pick) { return; } - const remoteRefs = repository.refs; - const remoteRefsFiltered = remoteRefs.filter(r => (r.remote === remotePick.label)); - const branchPicks = remoteRefsFiltered.map(r => ({ label: r.name})) as {label : string; description : string}[]; - const branchPick = await window.showQuickPick(branchPicks, { placeHolder }); + const branchName = await window.showInputBox({ + placeHolder: localize('branch name', "Branch name"), + prompt: localize('provide branch name', "Please provide a branch name"), + ignoreFocusOut: true + }); - if (!branchPick) { + if (!branchName) { return; } - repository.pull(false, remotePick.label, branchPick.label); + repository.pull(false, pick.label, branchName); } @command('git.pull', { repository: true }) From 7f2fd6b81e9cc9a4c457ddadf5f570deedfc19ff Mon Sep 17 00:00:00 2001 From: Dozed12 Date: Mon, 27 Nov 2017 16:09:25 +0000 Subject: [PATCH 028/615] Show remote branches in 'git pull from' As reequested in #37490 --- extensions/git/src/commands.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 46128ca252f..578d228ecf0 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1249,25 +1249,24 @@ export class CommandCenter { return; } - const picks = remotes.map(r => ({ label: r.name, description: r.url })); + const remotePicks = remotes.map(r => ({ label: r.name, description: r.url })); const placeHolder = localize('pick remote pull repo', "Pick a remote to pull the branch from"); - const pick = await window.showQuickPick(picks, { placeHolder }); + const remotePick = await window.showQuickPick(remotePicks, { placeHolder }); - if (!pick) { + if (!remotePick) { return; } - const branchName = await window.showInputBox({ - placeHolder: localize('branch name', "Branch name"), - prompt: localize('provide branch name', "Please provide a branch name"), - ignoreFocusOut: true - }); + const remoteRefs = repository.refs; + const remoteRefsFiltered = remoteRefs.filter(r => (r.remote === remotePick.label)); + const branchPicks = remoteRefsFiltered.map(r => ({ label: r.name})) as {label : string; description : string}[]; + const branchPick = await window.showQuickPick(branchPicks, { placeHolder }); - if (!branchName) { + if (!branchPick) { return; } - repository.pull(false, pick.label, branchName); + repository.pull(false, remotePick.label, branchPick.label); } @command('git.pull', { repository: true }) From f0e2c7d5c431da7c6e9a5c60649d266f66ebad7c Mon Sep 17 00:00:00 2001 From: Francisco Moreira Date: Mon, 27 Nov 2017 22:59:06 +0000 Subject: [PATCH 029/615] Fix pull --- extensions/git/src/commands.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 578d228ecf0..ae3461a2229 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1266,7 +1266,9 @@ export class CommandCenter { return; } - repository.pull(false, remotePick.label, branchPick.label); + const remoteCharCnt = remotePick.label.length; + + repository.pull(false, remotePick.label, branchPick.label.slice(remoteCharCnt+1)); } @command('git.pull', { repository: true }) From 5e4f10511768a2757714c9d13cd13325b5d5a87f Mon Sep 17 00:00:00 2001 From: Shivam Mittal Date: Tue, 28 Nov 2017 16:34:13 +0530 Subject: [PATCH 030/615] Setting to always show Source Control Providers Show source control provider even for single repository Closes #38785 Signed-off-by: Shivam Mittal --- .../scm/electron-browser/scm.contribution.ts | 27 +++++++++++++++---- .../parts/scm/electron-browser/scmViewlet.ts | 14 ++++++++-- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts index 2dc55faba6d..50cfa92f40d 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -5,7 +5,6 @@ 'use strict'; -import { localize } from 'vs/nls'; import { Registry } from 'vs/platform/registry/common/platform'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { DirtyDiffWorkbenchController } from './dirtydiffDecorator'; @@ -19,11 +18,13 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { StatusUpdater, StatusBarController } from './scmActivity'; import { SCMViewlet } from 'vs/workbench/parts/scm/electron-browser/scmViewlet'; import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; +import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; +import * as nls from 'vs/nls'; class OpenSCMViewletAction extends ToggleViewletAction { static ID = VIEWLET_ID; - static LABEL = localize('toggleGitViewlet', "Show Git"); + static LABEL = nls.localize('toggleGitViewlet', "Show Git"); constructor(id: string, label: string, @IViewletService viewletService: IViewletService, @IWorkbenchEditorService editorService: IWorkbenchEditorService) { super(id, label, VIEWLET_ID, viewletService, editorService); @@ -36,7 +37,7 @@ Registry.as(WorkbenchExtensions.Workbench) const viewletDescriptor = new ViewletDescriptor( SCMViewlet, VIEWLET_ID, - localize('source control', "Source Control"), + nls.localize('source control', "Source Control"), 'scm', 36 ); @@ -52,12 +53,28 @@ Registry.as(WorkbenchExtensions.Workbench) // Register Action to Open Viewlet Registry.as(WorkbenchActionExtensions.WorkbenchActions).registerWorkbenchAction( - new SyncActionDescriptor(OpenSCMViewletAction, VIEWLET_ID, localize('toggleSCMViewlet', "Show SCM"), { + new SyncActionDescriptor(OpenSCMViewletAction, VIEWLET_ID, nls.localize('toggleSCMViewlet', "Show SCM"), { primary: null, win: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G }, linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G }, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_G } }), 'View: Show SCM', - localize('view', "View") + nls.localize('view', "View") ); + +// Register configuration +const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration); +configurationRegistry.registerConfiguration({ + id: 'scm', + order: 20, + title: nls.localize('scmConfigurationTitle', "SCM"), + type: 'object', + properties: { + 'scm.showSingleSourceControlProvider': { + type: 'boolean', + description: nls.localize({ comment: ['This is the description for a setting'], key: 'showSingleSourceControlProvider' }, "Whether to show Source Control Provider for single repository."), + default: false + } + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index 4530cff6727..6f40a561516 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -56,6 +56,7 @@ import { format } from 'vs/base/common/strings'; import { ISpliceable, ISequence, ISplice } from 'vs/base/common/sequence'; import { firstIndex } from 'vs/base/common/arrays'; import { WorkbenchList, IListService } from 'vs/platform/list/browser/listService'; +import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; // TODO@Joao // Need to subclass MenuItemActionItem in order to respect @@ -980,12 +981,14 @@ export class SCMViewlet extends PanelViewlet implements IViewModel { @IWorkbenchEditorService protected editorService: IWorkbenchEditorService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IStorageService storageService: IStorageService, - @IExtensionService extensionService: IExtensionService + @IExtensionService extensionService: IExtensionService, + @IConfigurationService private configurationService: IConfigurationService ) { super(VIEWLET_ID, { showHeaderInTitleWhenSingleView: true }, telemetryService, themeService); this.menus = instantiationService.createInstance(SCMMenus, undefined); this.menus.onDidChangeTitle(this.updateTitleArea, this, this.disposables); + this._register(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(e))); } async create(parent: Builder): TPromise { @@ -1002,6 +1005,12 @@ export class SCMViewlet extends PanelViewlet implements IViewModel { this.onDidChangeRepositories(); } + private onConfigurationUpdated(e: IConfigurationChangeEvent): void { + if (e.affectsConfiguration('scm.showSingleSourceControlProvider')) { + this.onDidChangeRepositories(); + } + } + private onDidAddRepository(repository: ISCMRepository): void { const index = this._repositories.length; this._repositories.push(repository); @@ -1032,7 +1041,8 @@ export class SCMViewlet extends PanelViewlet implements IViewModel { private onDidChangeRepositories(): void { toggleClass(this.el, 'empty', this.scmService.repositories.length === 0); - const shouldMainPanelBeVisible = this.scmService.repositories.length > 1; + const shouldMainPanelBeVisible = this.scmService.repositories.length > + (this.configurationService.getValue('scm.showSingleSourceControlProvider') ? 0 : 1); if (!!this.mainPanel === shouldMainPanelBeVisible) { return; From a54b448fd925315060a2eabe69c7f3da6d5901f0 Mon Sep 17 00:00:00 2001 From: Jared Moore Date: Thu, 30 Nov 2017 09:31:46 -0500 Subject: [PATCH 031/615] Tilde expansion for files to include and exclude (fixes #36792) --- src/vs/workbench/parts/search/common/queryBuilder.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/search/common/queryBuilder.ts b/src/vs/workbench/parts/search/common/queryBuilder.ts index 5c8e0d65015..5862685e220 100644 --- a/src/vs/workbench/parts/search/common/queryBuilder.ts +++ b/src/vs/workbench/parts/search/common/queryBuilder.ts @@ -12,9 +12,11 @@ import * as glob from 'vs/base/common/glob'; import * as paths from 'vs/base/common/paths'; import * as strings from 'vs/base/common/strings'; import uri from 'vs/base/common/uri'; +import { untildify } from 'vs/base/common/labels'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IPatternInfo, IQueryOptions, IFolderQuery, ISearchQuery, QueryType, ISearchConfiguration, getExcludes, pathIncludedInQuery } from 'vs/platform/search/common/search'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; export interface ISearchPathPattern { searchPath: uri; @@ -30,8 +32,9 @@ export class QueryBuilder { constructor( @IConfigurationService private configurationService: IConfigurationService, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService) { - } + @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, + @IEnvironmentService private environmentService: IEnvironmentService + ) { } public text(contentPattern: IPatternInfo, folderResources?: uri[], options?: IQueryOptions): ISearchQuery { return this.query(QueryType.Text, contentPattern, folderResources, options); @@ -105,7 +108,8 @@ export class QueryBuilder { return paths.isAbsolute(segment) || strings.startsWith(segment, './') || strings.startsWith(segment, '.\\'); }; - const segments = splitGlobPattern(pattern); + const segments = splitGlobPattern(pattern) + .map(segment => untildify(segment, this.environmentService.userHome)); const groups = collections.groupBy(segments, segment => isSearchPath(segment) ? 'searchPaths' : 'exprSegments'); From b090448a6b8cb5ee04049ef11f08fd06bb2965d1 Mon Sep 17 00:00:00 2001 From: Jared Moore Date: Thu, 30 Nov 2017 10:16:44 -0500 Subject: [PATCH 032/615] Added environment service mock to query builder tests --- .../workbench/parts/search/test/common/queryBuilder.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/search/test/common/queryBuilder.test.ts b/src/vs/workbench/parts/search/test/common/queryBuilder.test.ts index ac6d1e3d763..c3f0c111323 100644 --- a/src/vs/workbench/parts/search/test/common/queryBuilder.test.ts +++ b/src/vs/workbench/parts/search/test/common/queryBuilder.test.ts @@ -14,7 +14,9 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { IWorkspaceContextService, Workspace, toWorkspaceFolders } from 'vs/platform/workspace/common/workspace'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; import { QueryBuilder, ISearchPathsResult } from 'vs/workbench/parts/search/common/queryBuilder'; -import { TestContextService } from 'vs/workbench/test/workbenchTestServices'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { TestContextService, TestEnvironmentService } from 'vs/workbench/test/workbenchTestServices'; + import { ISearchQuery, QueryType, IPatternInfo, IFolderQuery } from 'vs/platform/search/common/search'; @@ -44,6 +46,8 @@ suite('QueryBuilder', () => { mockContextService.setWorkspace(mockWorkspace); instantiationService.stub(IWorkspaceContextService, mockContextService); + instantiationService.stub(IEnvironmentService, TestEnvironmentService); + queryBuilder = instantiationService.createInstance(QueryBuilder); }); From b86ac090ed925db1d3993369d301eb3862ee7115 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Fri, 1 Dec 2017 15:12:49 -0800 Subject: [PATCH 033/615] Support '../' and '..\' for specifying relative paths in search, fixes #38144 --- src/vs/workbench/parts/search/common/queryBuilder.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/search/common/queryBuilder.ts b/src/vs/workbench/parts/search/common/queryBuilder.ts index 5c8e0d65015..9fb9b925183 100644 --- a/src/vs/workbench/parts/search/common/queryBuilder.ts +++ b/src/vs/workbench/parts/search/common/queryBuilder.ts @@ -10,7 +10,6 @@ import * as objects from 'vs/base/common/objects'; import * as collections from 'vs/base/common/collections'; import * as glob from 'vs/base/common/glob'; import * as paths from 'vs/base/common/paths'; -import * as strings from 'vs/base/common/strings'; import uri from 'vs/base/common/uri'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IPatternInfo, IQueryOptions, IFolderQuery, ISearchQuery, QueryType, ISearchConfiguration, getExcludes, pathIncludedInQuery } from 'vs/platform/search/common/search'; @@ -101,8 +100,8 @@ export class QueryBuilder { */ public parseSearchPaths(pattern: string): ISearchPathsResult { const isSearchPath = (segment: string) => { - // A segment is a search path if it is an absolute path or starts with ./ - return paths.isAbsolute(segment) || strings.startsWith(segment, './') || strings.startsWith(segment, '.\\'); + // A segment is a search path if it is an absolute path or starts with ./, ../, .\, or ..\ + return paths.isAbsolute(segment) || /^\.\.?[\/\\]/.test(segment); }; const segments = splitGlobPattern(pattern); From caa0c8212b95470cb9481d3eb572fa8757f18a44 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Fri, 1 Dec 2017 17:06:24 -0800 Subject: [PATCH 034/615] Add unit test --- .../parts/search/test/common/queryBuilder.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vs/workbench/parts/search/test/common/queryBuilder.test.ts b/src/vs/workbench/parts/search/test/common/queryBuilder.test.ts index ac6d1e3d763..6b39f0db4ae 100644 --- a/src/vs/workbench/parts/search/test/common/queryBuilder.test.ts +++ b/src/vs/workbench/parts/search/test/common/queryBuilder.test.ts @@ -473,6 +473,14 @@ suite('QueryBuilder', () => { }] } ], + [ + '../', + { + searchPaths: [{ + searchPath: getUri('foo/') + }] + } + ] ]; cases.forEach(testIncludesDataItem); }); From 42829509f4071d638cf6c851fb124a2d05912b4d Mon Sep 17 00:00:00 2001 From: Yitong Date: Sat, 2 Dec 2017 22:01:00 -0500 Subject: [PATCH 035/615] add selectedText to variable substitution --- .../configurationResolverService.ts | 16 ++++++++++++++++ .../configurationResolverService.test.ts | 4 ++++ src/vs/workbench/test/workbenchTestServices.ts | 5 ++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts b/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts index c0da65c8d9b..c16b8cbd18c 100644 --- a/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts +++ b/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts @@ -103,6 +103,22 @@ export class ConfigurationResolverService implements IConfigurationResolverServi return ''; } + private get selectedText(): string { + const activeEditor = this.editorService.getActiveEditor(); + if (activeEditor) { + const editorControl = (activeEditor.getControl()); + if (editorControl) { + const editorModel = editorControl.getModel(); + const editorSelection = editorControl.getSelection(); + if (editorModel && editorSelection) { + return editorModel.getValueInRange(editorSelection); + } + } + } + + return ''; + } + private getFilePath(): string { let input = this.editorService.getActiveEditorInput(); if (input instanceof DiffEditorInput) { diff --git a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts index 069638e9d81..0901965ceea 100644 --- a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts +++ b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts @@ -56,6 +56,10 @@ suite('Configuration Resolver Service', () => { assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${lineNumber} xyz'), `abc ${editorService.mockLineNumber} xyz`); }); + test('current selected text', () => { + assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${selectedText} xyz'), `abc ${editorService.mockSelectedText} xyz`); + }); + test('substitute many', () => { if (platform.isWindows) { assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder}'), '\\VSCode\\workspaceLocation - \\VSCode\\workspaceLocation'); diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 3c78c660ced..b93b95cf9d8 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -584,12 +584,14 @@ export class TestEditorService implements IWorkbenchEditorService { public activeEditorOptions: IEditorOptions; public activeEditorPosition: Position; public mockLineNumber: number; + public mockSelectedText: string; private callback: (method: string) => void; constructor(callback?: (method: string) => void) { this.callback = callback || ((s: string) => { }); this.mockLineNumber = 15; + this.mockSelectedText = 'selected text'; } public openEditors(inputs: any[]): Promise { @@ -618,7 +620,8 @@ export class TestEditorService implements IWorkbenchEditorService { getId: () => { return null; }, getControl: () => { return { - getSelection: () => { return { positionLineNumber: this.mockLineNumber }; } + getSelection: () => { return { positionLineNumber: this.mockLineNumber }; }, + getModel: () => { return { getValueInRange: () => this.mockSelectedText }; } }; }, focus: () => { }, From ffa2ce61a896bd1c72812dfdbc35ae2ef1ca0972 Mon Sep 17 00:00:00 2001 From: Nico Date: Tue, 5 Dec 2017 12:37:35 +0000 Subject: [PATCH 036/615] Support local install of Git Bash --- .../workbench/parts/terminal/electron-browser/terminalService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts index 4afb673317d..69b7f514480 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts @@ -180,6 +180,7 @@ export class TerminalService extends AbstractTerminalService implements ITermina `${process.env['ProgramW6432']}\\Git\\usr\\bin\\bash.exe`, `${process.env['ProgramFiles']}\\Git\\bin\\bash.exe`, `${process.env['ProgramFiles']}\\Git\\usr\\bin\\bash.exe`, + `${process.env['LocalAppData']}\\Git\\usr\\bin\\bash.exe`, ] }; const promises: TPromise<[string, string]>[] = []; From 87002fb3ca6c433c115d40b036cb4c6742c942a1 Mon Sep 17 00:00:00 2001 From: Nico Date: Tue, 5 Dec 2017 13:09:48 +0000 Subject: [PATCH 037/615] Fix lint tab issue --- .../parts/terminal/electron-browser/terminalService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts index 69b7f514480..8406f7c1025 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts @@ -180,7 +180,7 @@ export class TerminalService extends AbstractTerminalService implements ITermina `${process.env['ProgramW6432']}\\Git\\usr\\bin\\bash.exe`, `${process.env['ProgramFiles']}\\Git\\bin\\bash.exe`, `${process.env['ProgramFiles']}\\Git\\usr\\bin\\bash.exe`, - `${process.env['LocalAppData']}\\Git\\usr\\bin\\bash.exe`, + `${process.env['LocalAppData']}\\Git\\usr\\bin\\bash.exe`, ] }; const promises: TPromise<[string, string]>[] = []; From 45d02b8a27b7c5e92169502d783835172f380188 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Tue, 5 Dec 2017 07:56:06 -0800 Subject: [PATCH 038/615] Allow decorators to change font-weight and font-style. Resolves issue #38005. --- .../browser/services/codeEditorServiceImpl.ts | 6 ++++-- src/vs/editor/common/editorCommon.ts | 4 ++++ src/vs/vscode.d.ts | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index 5dfe1c8c4c5..b17af16b5f1 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -210,6 +210,8 @@ const _CSS_MAP = { borderStyle: 'border-style:{0};', borderWidth: 'border-width:{0};', + fontStyle: 'font-style:{0};', + fontWeight: 'font-weight:{0};', textDecoration: 'text-decoration:{0};', cursor: 'cursor:{0};', letterSpacing: 'letter-spacing:{0};', @@ -357,7 +359,7 @@ class DecorationCSSRules { return ''; } let cssTextArr: string[] = []; - this.collectCSSText(opts, ['textDecoration', 'cursor', 'color', 'letterSpacing'], cssTextArr); + this.collectCSSText(opts, ['fontStyle', 'fontWeight', 'textDecoration', 'cursor', 'color', 'letterSpacing'], cssTextArr); return cssTextArr.join(''); } @@ -383,7 +385,7 @@ class DecorationCSSRules { cssTextArr.push(strings.format(_CSS_MAP.contentText, escaped)); } - this.collectCSSText(opts, ['textDecoration', 'color', 'backgroundColor', 'margin'], cssTextArr); + this.collectCSSText(opts, ['fontStyle', 'fontWeight', 'textDecoration', 'color', 'backgroundColor', 'margin'], cssTextArr); if (this.collectCSSText(opts, ['width', 'height'], cssTextArr)) { cssTextArr.push('display:inline-block;'); } diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 4133daa1337..e31b00f7cca 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -1578,6 +1578,8 @@ export interface IThemeDecorationRenderOptions { borderStyle?: string; borderWidth?: string; + fontStyle?: string; + fontWeight?: string; textDecoration?: string; cursor?: string; color?: string | ThemeColor; @@ -1601,6 +1603,8 @@ export interface IContentDecorationRenderOptions { border?: string; borderColor?: string | ThemeColor; + fontStyle?: string; + fontWeight?: string; textDecoration?: string; color?: string | ThemeColor; backgroundColor?: string | ThemeColor; diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index b5d494496dd..cca12323a79 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -836,6 +836,16 @@ declare module 'vscode' { */ borderWidth?: string; + /** + * CSS styling property that will be applied to text enclosed by a decoration. + */ + fontStyle?: string; + + /** + * CSS styling property that will be applied to text enclosed by a decoration. + */ + fontWeight?: string; + /** * CSS styling property that will be applied to text enclosed by a decoration. */ @@ -902,6 +912,14 @@ declare module 'vscode' { * CSS styling property that will be applied to text enclosed by a decoration. */ borderColor?: string | ThemeColor; + /** + * CSS styling property that will be applied to the decoration attachment. + */ + fontStyle?: string; + /** + * CSS styling property that will be applied to the decoration attachment. + */ + fontWeight?: string; /** * CSS styling property that will be applied to the decoration attachment. */ From 076b3aa60db8ddcf3331861426415263ed20add3 Mon Sep 17 00:00:00 2001 From: Changyu Date: Tue, 5 Dec 2017 17:11:26 -0500 Subject: [PATCH 039/615] Allow resize open editors --- .../electron-browser/views/openEditorsView.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index b9fb56c5d8b..25dbe6afb91 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -318,7 +318,8 @@ export class OpenEditorsView extends ViewsViewletPanel { private updateSize(): void { // Adjust expanded body size - this.minimumBodySize = this.maximumBodySize = this.getExpandedBodySize(this.model); + this.minimumBodySize = this.getMinExpandedBodySize(); + this.maximumBodySize = this.getMaxExpandedBodySize(); } private updateDirtyIndicator(): void { @@ -332,7 +333,14 @@ export class OpenEditorsView extends ViewsViewletPanel { } } - private getExpandedBodySize(model: IEditorStacksModel): number { + private getMaxExpandedBodySize(): number { + const elementCount = this.model.groups.map(g => g.count) + .reduce((first, second) => first + second, this.model.groups.length > 1 + ? this.model.groups.length : 0); + return elementCount * OpenEditorsDelegate.ITEM_HEIGHT; + } + + private getMinExpandedBodySize(): number { let visibleOpenEditors = this.configurationService.getValue('explorer.openEditors.visible'); if (typeof visibleOpenEditors !== 'number') { visibleOpenEditors = OpenEditorsView.DEFAULT_VISIBLE_OPEN_EDITORS; @@ -343,10 +351,10 @@ export class OpenEditorsView extends ViewsViewletPanel { dynamicHeight = OpenEditorsView.DEFAULT_DYNAMIC_HEIGHT; } - return this.computeExpandedBodySize(visibleOpenEditors, dynamicHeight); + return this.computeMinExpandedBodySize(visibleOpenEditors, dynamicHeight); } - private computeExpandedBodySize(visibleOpenEditors = OpenEditorsView.DEFAULT_VISIBLE_OPEN_EDITORS, dynamicHeight = OpenEditorsView.DEFAULT_DYNAMIC_HEIGHT): number { + private computeMinExpandedBodySize(visibleOpenEditors = OpenEditorsView.DEFAULT_VISIBLE_OPEN_EDITORS, dynamicHeight = OpenEditorsView.DEFAULT_DYNAMIC_HEIGHT): number { let itemsToShow: number; if (dynamicHeight) { const elementCount = this.model.groups.map(g => g.count) From b814b26b3f76e9f4559b8836d39126b7d160e89a Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 6 Dec 2017 22:13:48 +0000 Subject: [PATCH 040/615] terminal scroll cursor set to default --- .../parts/terminal/electron-browser/media/scrollbar.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/scrollbar.css b/src/vs/workbench/parts/terminal/electron-browser/media/scrollbar.css index 0bff305aae4..70af76ab868 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/scrollbar.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/scrollbar.css @@ -26,6 +26,7 @@ .monaco-workbench .panel.integrated-terminal .xterm:focus .xterm-viewport, .monaco-workbench .panel.integrated-terminal .xterm:hover .xterm-viewport { transition: opacity 100ms linear; + cursor: default; } .monaco-workbench .panel.integrated-terminal .xterm .xterm-viewport::-webkit-scrollbar-thumb:hover { From eb81a0b2f856860afd52320985cf332323705b8e Mon Sep 17 00:00:00 2001 From: AiryShift Date: Thu, 7 Dec 2017 13:20:16 +1100 Subject: [PATCH 041/615] Fixes #39750 Doesn't edit the model unless an edit is required, which means the undo stack is updated properly. Behaviour should be similar to trimTrailingWhitespace --- .../api/electron-browser/mainThreadSaveParticipant.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts index 5c6e9b6f321..cb655514f46 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts @@ -157,7 +157,11 @@ export class TrimFinalNewLinesParticipant implements ISaveParticipant { currentLine = model.getLineContent(currentLineNumber); currentLineIsEmptyOrWhitespace = strings.lastNonWhitespaceIndex(currentLine) === -1; } - model.pushEditOperations(prevSelection, [EditOperation.delete(new Range(currentLineNumber + 1, 1, lineCount + 1, 1))], edits => prevSelection); + + const deletionRange = new Range(currentLineNumber + 1, 1, lineCount + 1, 1); + if (!deletionRange.isEmpty()) { + model.pushEditOperations(prevSelection, [EditOperation.delete(deletionRange)], edits => prevSelection); + } if (editor) { editor.setSelections(prevSelection); From 37f4030344ee2332ed75286aeec888a5bd2f9ae9 Mon Sep 17 00:00:00 2001 From: Tan Jay Jun Date: Wed, 25 Oct 2017 19:39:20 +0800 Subject: [PATCH 042/615] Add character countdown to commit message input --- .../parts/scm/electron-browser/scmViewlet.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index 4530cff6727..dfa90ace492 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -45,7 +45,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { IStorageService } from 'vs/platform/storage/common/storage'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IExtensionsViewlet, VIEWLET_ID as EXTENSIONS_VIEWLET_ID } from 'vs/workbench/parts/extensions/common/extensions'; -import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; +import { InputBox, MessageType } from 'vs/base/browser/ui/inputbox/inputBox'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { Command } from 'vs/editor/common/modes'; @@ -753,7 +753,21 @@ export class RepositoryPanel extends ViewletPanel { this.inputBox.setPlaceHolder(placeholder); }; - this.inputBox = new InputBox(this.inputBoxContainer, this.contextViewService, { flexibleHeight: true }); + this.inputBox = new InputBox(this.inputBoxContainer, this.contextViewService, { + flexibleHeight: true, + validationOptions: { + validation: (text: string) => { + const charactersLeft = 72 - text.length; + if (text.length > 72) { + return { content: `${charactersLeft} characters left`, type: MessageType.ERROR }; + } else if (text.length > 55) { + return { content: `${charactersLeft} characters left`, type: MessageType.WARNING }; + } else { + return { content: `${charactersLeft} characters left`, type: MessageType.INFO }; + } + } + } + }); this.disposables.push(attachInputBoxStyler(this.inputBox, this.themeService)); this.disposables.push(this.inputBox); From c407635fdfc3efc515760f31cbaafe9798505624 Mon Sep 17 00:00:00 2001 From: Tan Jay Jun Date: Sat, 11 Nov 2017 21:09:54 +0800 Subject: [PATCH 043/615] Add warningLength to SourceControlInputBox --- extensions/git/src/repository.ts | 1 + src/vs/vscode.d.ts | 5 +++ .../api/electron-browser/mainThreadSCM.ts | 10 +++++ src/vs/workbench/api/node/extHost.protocol.ts | 1 + src/vs/workbench/api/node/extHostSCM.ts | 13 ++++++- .../parts/scm/electron-browser/scmViewlet.ts | 38 ++++++++++++------- src/vs/workbench/services/scm/common/scm.ts | 2 + .../services/scm/common/scmService.ts | 12 +++++- 8 files changed, 67 insertions(+), 15 deletions(-) diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index c400a818d9d..3bbe3bdd68e 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -484,6 +484,7 @@ export class Repository implements Disposable { this._sourceControl.inputBox.placeholder = localize('commitMessage', "Message (press {0} to commit)"); this._sourceControl.acceptInputCommand = { command: 'git.commitWithInput', title: localize('commit', "Commit"), arguments: [this._sourceControl] }; this._sourceControl.quickDiffProvider = this; + this._sourceControl.inputBox.warningLength = 72; this.disposables.push(this._sourceControl); this._mergeGroup = this._sourceControl.createResourceGroup('merge', localize('merge changes', "Merge Changes")); diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index b02773f70b9..31988396618 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -5782,6 +5782,11 @@ declare module 'vscode' { * A string to show as place holder in the input box to guide the user. */ placeholder: string; + + /** + * The warning threshold for commit messages. + */ + warningLength: number | undefined; } interface QuickDiffProvider { diff --git a/src/vs/workbench/api/electron-browser/mainThreadSCM.ts b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts index 88c6377b3c4..7e728e798bd 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSCM.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts @@ -391,4 +391,14 @@ export class MainThreadSCM implements MainThreadSCMShape { repository.input.placeholder = placeholder; } + + $setWarningLength(sourceControlHandle: number, warningLength: number): void { + const repository = this._repositories[sourceControlHandle]; + + if (!repository) { + return; + } + + repository.input.warningLength = warningLength; + } } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index cb65d9c5c87..16e43487787 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -410,6 +410,7 @@ export interface MainThreadSCMShape extends IDisposable { $setInputBoxValue(sourceControlHandle: number, value: string): void; $setInputBoxPlaceholder(sourceControlHandle: number, placeholder: string): void; + $setWarningLength(sourceControlHandle: number, warningLength: number): void; } export type DebugSessionUUID = string; diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 9444ef00744..2f8ea94d5b6 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -110,7 +110,7 @@ function compareResourceStates(a: vscode.SourceControlResourceState, b: vscode.S return result; } -export class ExtHostSCMInputBox { +export class ExtHostSCMInputBox implements vscode.SourceControlInputBox { private _value: string = ''; @@ -140,6 +140,17 @@ export class ExtHostSCMInputBox { this._placeholder = placeholder; } + private _warningLength: number | undefined; + + get warningLength(): number | undefined { + return this._warningLength; + } + + set warningLength(warningLength: number) { + this._proxy.$setWarningLength(this._sourceControlHandle, warningLength); + this._warningLength = warningLength; + } + constructor(private _proxy: MainThreadSCMShape, private _sourceControlHandle: number) { // noop } diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index dfa90ace492..982d059e337 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -45,7 +45,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { IStorageService } from 'vs/platform/storage/common/storage'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IExtensionsViewlet, VIEWLET_ID as EXTENSIONS_VIEWLET_ID } from 'vs/workbench/parts/extensions/common/extensions'; -import { InputBox, MessageType } from 'vs/base/browser/ui/inputbox/inputBox'; +import { IMessage, InputBox, MessageType } from 'vs/base/browser/ui/inputbox/inputBox'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { Command } from 'vs/editor/common/modes'; @@ -753,20 +753,32 @@ export class RepositoryPanel extends ViewletPanel { this.inputBox.setPlaceHolder(placeholder); }; + const validation = (text: string): IMessage => { + const warningLength = this.repository.input.warningLength; + if (warningLength === undefined) { + return { + content: localize('commitMessageInfo', "{0} characters", text.length), + type: MessageType.INFO + }; + } + + const charactersLeft = warningLength - text.length; + if (charactersLeft > 0) { + return { + content: localize('commitMessageCountdown', "{0} characters left", text.length), + type: MessageType.INFO + }; + } else { + return { + content: localize('commitMessageWarning', "{0} characters over", text.length), + type: MessageType.WARNING + }; + } + }; + this.inputBox = new InputBox(this.inputBoxContainer, this.contextViewService, { flexibleHeight: true, - validationOptions: { - validation: (text: string) => { - const charactersLeft = 72 - text.length; - if (text.length > 72) { - return { content: `${charactersLeft} characters left`, type: MessageType.ERROR }; - } else if (text.length > 55) { - return { content: `${charactersLeft} characters left`, type: MessageType.WARNING }; - } else { - return { content: `${charactersLeft} characters left`, type: MessageType.INFO }; - } - } - } + validationOptions: { validation: validation } }); this.disposables.push(attachInputBoxStyler(this.inputBox, this.themeService)); this.disposables.push(this.inputBox); diff --git a/src/vs/workbench/services/scm/common/scm.ts b/src/vs/workbench/services/scm/common/scm.ts index 78c1252f599..b10ab4dc7cc 100644 --- a/src/vs/workbench/services/scm/common/scm.ts +++ b/src/vs/workbench/services/scm/common/scm.ts @@ -74,6 +74,8 @@ export interface ISCMInput { placeholder: string; readonly onDidChangePlaceholder: Event; + + warningLength: number | undefined; } export interface ISCMRepository extends IDisposable { diff --git a/src/vs/workbench/services/scm/common/scmService.ts b/src/vs/workbench/services/scm/common/scmService.ts index db569fc7c57..a16e88a7436 100644 --- a/src/vs/workbench/services/scm/common/scmService.ts +++ b/src/vs/workbench/services/scm/common/scmService.ts @@ -39,6 +39,16 @@ class SCMInput implements ISCMInput { private _onDidChangePlaceholder = new Emitter(); get onDidChangePlaceholder(): Event { return this._onDidChangePlaceholder.event; } + + private _warningLength: number | undefined; + + get warningLength(): number | undefined { + return this._warningLength; + } + + set warningLength(warningLength: number) { + this._warningLength = warningLength; + } } class SCMRepository implements ISCMRepository { @@ -106,4 +116,4 @@ export class SCMService implements ISCMService { return repository; } -} \ No newline at end of file +} From 2780fe74dba0434b60a7871a087d2f2cb2788aee Mon Sep 17 00:00:00 2001 From: Sylvain Joyeux Date: Fri, 8 Dec 2017 15:54:37 -0200 Subject: [PATCH 044/615] append messages instead of resetting them in multi-line patterns --- src/vs/platform/markers/common/problemMatcher.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/markers/common/problemMatcher.ts b/src/vs/platform/markers/common/problemMatcher.ts index b518a234e3f..6a8ac03cb5d 100644 --- a/src/vs/platform/markers/common/problemMatcher.ts +++ b/src/vs/platform/markers/common/problemMatcher.ts @@ -208,7 +208,7 @@ abstract class AbstractLineMatcher implements ILineMatcher { protected fillProblemData(data: ProblemData, pattern: ProblemPattern, matches: RegExpExecArray): void { this.fillProperty(data, 'file', pattern, matches, true); - this.fillProperty(data, 'message', pattern, matches, true); + this.appendProperty(data, 'message', pattern, matches, true); this.fillProperty(data, 'code', pattern, matches, true); this.fillProperty(data, 'severity', pattern, matches, true); this.fillProperty(data, 'location', pattern, matches, true); @@ -218,6 +218,19 @@ abstract class AbstractLineMatcher implements ILineMatcher { this.fillProperty(data, 'endCharacter', pattern, matches); } + private appendProperty(data: ProblemData, property: keyof ProblemData, pattern: ProblemPattern, matches: RegExpExecArray, trim: boolean = false): void { + if (Types.isUndefined(data[property])) { + this.fillProperty(data, property, pattern, matches, trim); + } + else if (!Types.isUndefined(pattern[property]) && pattern[property] < matches.length) { + let value = matches[pattern[property]]; + if (trim) { + value = Strings.trim(value); + } + data[property] += '\n' + value; + } + } + private fillProperty(data: ProblemData, property: keyof ProblemData, pattern: ProblemPattern, matches: RegExpExecArray, trim: boolean = false): void { if (Types.isUndefined(data[property]) && !Types.isUndefined(pattern[property]) && pattern[property] < matches.length) { let value = matches[pattern[property]]; From 641e287bf6a8e6b023ba9449d76853a633e03628 Mon Sep 17 00:00:00 2001 From: Fong Kye Pascal Date: Fri, 8 Dec 2017 21:05:43 +0100 Subject: [PATCH 045/615] fix: #39738 Replaces starting tilde with home directory when entered in git clone prompt --- extensions/git/src/commands.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 07e7594aa6b..b6c1c8bd33d 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -307,6 +307,10 @@ export class CommandCenter { return ''; } + private handlePathTilde(path: string): string { + return path.replace(/^~/, os.homedir()); + } + private static cloneId = 0; @command('git.clone') @@ -330,11 +334,10 @@ export class CommandCenter { const config = workspace.getConfiguration('git'); let value = config.get('defaultCloneDirectory') || os.homedir(); - value = value.replace(/^~/, os.homedir()); const parentPath = await window.showInputBox({ prompt: localize('parent', "Parent Directory"), - value, + value: this.handlePathTilde(value), ignoreFocusOut: true }); @@ -358,7 +361,7 @@ export class CommandCenter { statusBarItem.command = cancelCommandId; statusBarItem.show(); - const clonePromise = this.git.clone(url, parentPath, tokenSource.token); + const clonePromise = this.git.clone(url, this.handlePathTilde(parentPath), tokenSource.token); try { window.withProgress({ location: ProgressLocation.SourceControl, title: localize('cloning', "Cloning git repository...") }, () => clonePromise); From 45e59bf578d819ea3ba860b0676f9b69030caf14 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 10 Dec 2017 09:59:11 +0300 Subject: [PATCH 046/615] Expose border style for debug toolbar --- .../parts/debug/browser/debugActionsWidget.ts | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts index 10db5a16c85..5c8b5433016 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts @@ -38,6 +38,11 @@ export const debugToolBarBackground = registerColor('debugToolBar.background', { light: '#F3F3F3', hc: '#000000' }, localize('debugToolBarBackground', "Debug toolbar background color.")); +export const debugToolBarBorder = registerColor('debugToolBar.border', { + dark: null, + light: null, + hc: null +}, localize('debugToolBarBorder', "Debug toolbar border color.")); export class DebugActionsWidget extends Themable implements IWorkbenchContribution { @@ -159,9 +164,16 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi this.$el.style('box-shadow', widgetShadowColor ? `0 5px 8px ${widgetShadowColor}` : null); const contrastBorderColor = this.getColor(contrastBorder); - this.$el.style('border-style', contrastBorderColor ? 'solid' : null); - this.$el.style('border-width', contrastBorderColor ? '1px' : null); - this.$el.style('border-color', contrastBorderColor); + const borderColor = this.getColor(debugToolBarBorder); + + if (contrastBorderColor) { + this.$el.style('border', `1px solid ${contrastBorderColor}`); + } else { + this.$el.style({ + 'border': `1px solid ${borderColor ? borderColor : 'transparent'}`, + 'border-width': '1px 0' + }); + } } } @@ -282,4 +294,4 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi delete this.$el; } } -} \ No newline at end of file +} From 40d75abdae7f5b2a1a2d613d75da24883dd61e70 Mon Sep 17 00:00:00 2001 From: Adam Skinner Date: Sun, 10 Dec 2017 11:19:59 -0500 Subject: [PATCH 047/615] eslint-compact to use absolute pathnames --- src/vs/platform/markers/common/problemMatcher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/platform/markers/common/problemMatcher.ts b/src/vs/platform/markers/common/problemMatcher.ts index b518a234e3f..05b4f7bc294 100644 --- a/src/vs/platform/markers/common/problemMatcher.ts +++ b/src/vs/platform/markers/common/problemMatcher.ts @@ -1598,7 +1598,7 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { label: localize('eslint-compact', 'ESLint compact problems'), owner: 'eslint', applyTo: ApplyToKind.allDocuments, - fileLocation: FileLocationKind.Relative, + fileLocation: FileLocationKind.Absolute, filePrefix: '${workspaceFolder}', pattern: ProblemPatternRegistry.get('eslint-compact') }); From 3155771c17168313036db7aa42111d5bbf8dda6c Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Sun, 10 Dec 2017 21:34:37 -0800 Subject: [PATCH 048/615] Disable sticky which was for dev purposes Fixes #38484 --- src/vs/editor/contrib/suggest/suggestWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/suggestWidget.ts b/src/vs/editor/contrib/suggest/suggestWidget.ts index 8755293fa81..1742ab97781 100644 --- a/src/vs/editor/contrib/suggest/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/suggestWidget.ts @@ -34,7 +34,7 @@ import { MarkdownRenderer } from 'vs/editor/contrib/markdown/markdownRenderer'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IOpenerService } from 'vs/platform/opener/common/opener'; -const sticky = true; // for development purposes +const sticky = false; // for development purposes const expandSuggestionDocsByDefault = false; const maxSuggestionsToShow = 12; From ec87b2b666267a3763045c7201792543b61f1a1f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 10:35:38 +0100 Subject: [PATCH 049/615] add unit-test for #39893 --- .../contrib/suggest/suggestController.ts | 2 +- .../contrib/suggest/test/suggestModel.test.ts | 58 ++++++++++++++++++- 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/contrib/suggest/suggestController.ts b/src/vs/editor/contrib/suggest/suggestController.ts index ac65ff1abd4..7d7013aaa1a 100644 --- a/src/vs/editor/contrib/suggest/suggestController.ts +++ b/src/vs/editor/contrib/suggest/suggestController.ts @@ -193,7 +193,7 @@ export class SuggestController implements IEditorContribution { } } - private _onDidSelectItem(item: ICompletionItem): void { + protected _onDidSelectItem(item: ICompletionItem): void { if (!item) { this._model.cancel(); return; diff --git a/src/vs/editor/contrib/suggest/test/suggestModel.test.ts b/src/vs/editor/contrib/suggest/test/suggestModel.test.ts index 264040790bb..d0c081f90a5 100644 --- a/src/vs/editor/contrib/suggest/test/suggestModel.test.ts +++ b/src/vs/editor/contrib/suggest/test/suggestModel.test.ts @@ -22,15 +22,18 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Range } from 'vs/editor/common/core/range'; -import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { CoreEditingCommands } from 'vs/editor/browser/controller/coreCommands'; +import { SuggestController } from 'vs/editor/contrib/suggest/suggestController'; +import { IStorageService, NullStorageService } from 'vs/platform/storage/common/storage'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/snippetController2'; function createMockEditor(model: Model): TestCodeEditor { const contextKeyService = new MockContextKeyService(); const telemetryService = NullTelemetryService; const instantiationService = new InstantiationService(new ServiceCollection( [IContextKeyService, contextKeyService], - [ITelemetryService, telemetryService] + [ITelemetryService, telemetryService], + [IStorageService, NullStorageService] )); const editor = new TestCodeEditor(new MockScopeLocation(), {}, instantiationService, contextKeyService); @@ -102,7 +105,7 @@ suite('SuggestModel - TriggerAndCancelOracle', function () { disposables.push(model); }); - function withOracle(callback: (model: SuggestModel, editor: ICodeEditor) => any): TPromise { + function withOracle(callback: (model: SuggestModel, editor: TestCodeEditor) => any): TPromise { return new TPromise((resolve, reject) => { const editor = createMockEditor(model); @@ -564,4 +567,53 @@ suite('SuggestModel - TriggerAndCancelOracle', function () { }); }); }); + + test('Text changes for completion CodeAction are affected by the completion #39893', function () { + disposables.push(SuggestRegistry.register({ scheme: 'test' }, { + provideCompletionItems(doc, pos): ISuggestResult { + return { + incomplete: true, + suggestions: [{ + label: 'bar', + type: 'property', + insertText: 'bar', + overwriteBefore: 2, + additionalTextEdits: [{ + text: ', bar', + range: { startLineNumber: 1, endLineNumber: 1, startColumn: 17, endColumn: 17 } + }] + }] + }; + } + })); + + model.setValue('ba; import { foo } from "./b"'); + + return withOracle(async (sugget, editor) => { + class TestCtrl extends SuggestController { + _onDidSelectItem(item) { + super._onDidSelectItem(item); + } + } + const ctrl = editor.registerAndInstantiateContribution(TestCtrl); + editor.registerAndInstantiateContribution(SnippetController2); + + await assertEvent(sugget.onDidSuggest, () => { + editor.setPosition({ lineNumber: 1, column: 3 }); + sugget.trigger({ auto: false }); + }, event => { + + assert.equal(event.completionModel.items.length, 1); + const [first] = event.completionModel.items; + assert.equal(first.suggestion.label, 'bar'); + + ctrl._onDidSelectItem(first); + }); + + assert.equal( + model.getValue(), + 'bar; import { foo, bar } from "./b"' + ); + }); + }); }); From 5cfbc48a8f1bb14639ab8dfbed9b036024071c6b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 11:28:43 +0100 Subject: [PATCH 050/615] :lipstick: uri --- src/vs/base/common/uri.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/base/common/uri.ts b/src/vs/base/common/uri.ts index d99a0e403db..2ccad2d4ad3 100644 --- a/src/vs/base/common/uri.ts +++ b/src/vs/base/common/uri.ts @@ -174,27 +174,27 @@ export default class URI implements UriComponents { if (scheme === void 0) { scheme = this.scheme; } else if (scheme === null) { - scheme = ''; + scheme = _empty; } if (authority === void 0) { authority = this.authority; } else if (authority === null) { - authority = ''; + authority = _empty; } if (path === void 0) { path = this.path; } else if (path === null) { - path = ''; + path = _empty; } if (query === void 0) { query = this.query; } else if (query === null) { - query = ''; + query = _empty; } if (fragment === void 0) { fragment = this.fragment; } else if (fragment === null) { - fragment = ''; + fragment = _empty; } if (scheme === this.scheme From 834ba9b9b0ed90291a1a252d290e17beba8b0bed Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 11 Dec 2017 12:03:28 +0100 Subject: [PATCH 051/615] debt - clean up some todos and migration code --- .../parts/quickopen/browser/quickOpenModel.ts | 11 ++-- src/vs/code/electron-main/window.ts | 2 +- src/vs/code/electron-main/windows.ts | 47 ++------------ .../platform/extensions/common/extensions.ts | 1 - .../electron-main/historyMainService.ts | 8 +-- .../telemetry/common/telemetryUtils.ts | 1 - src/vs/platform/windows/common/windows.ts | 1 - .../parts/quickopen/quickOpenController.ts | 2 +- .../common/editor/resourceEditorInput.ts | 3 +- .../parts/backup/common/backupRestorer.ts | 2 - .../browser/editors/fileEditorTracker.ts | 3 +- .../files/common/editors/fileEditorInput.ts | 2 +- .../parts/search/browser/openFileHandler.ts | 4 +- .../media/update.contribution.css | 2 +- .../textfile/common/textFileEditorModel.ts | 3 +- .../workspace/node/workspaceEditingService.ts | 62 ++----------------- 16 files changed, 27 insertions(+), 127 deletions(-) diff --git a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts index 773a4b79b4d..914878e5454 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts @@ -171,8 +171,13 @@ export class QuickOpenEntry { return false; } - public isFile(): boolean { - return false; // TODO@Ben debt with editor history merging + /** + * Determines if this quick open entry should merge with the editor history in quick open. If set to true + * and the resource of this entry is the same as the resource for an editor history, it will not show up + * because it is considered to be a duplicate of an editor history. + */ + public mergeWithEditorHistory(): boolean { + return false; } } @@ -412,8 +417,6 @@ class Renderer implements IRenderer { data.actionBar.context = entry; // make sure the context is the current element this.actionProvider.getActions(null, entry).then((actions) => { - // TODO@Ben this will not work anymore as soon as quick open has more actions - // but as long as there is only one are ok if (data.actionBar.isEmpty() && actions && actions.length > 0) { data.actionBar.push(actions, { icon: true, label: false }); } else if (!data.actionBar.isEmpty() && (!actions || actions.length === 0)) { diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 6f0871deb7a..fbb29ab568c 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -194,7 +194,7 @@ export class CodeWindow implements ICodeWindow { this._win = new BrowserWindow(options); this._id = this._win.id; - // TODO@Ben Bug in Electron (https://github.com/electron/electron/issues/10862). On multi-monitor setups, + // Bug in Electron (https://github.com/electron/electron/issues/10862). On multi-monitor setups, // it can happen that the position we set to the window is not the correct one on the display. // To workaround, we ask the window for its position and set it again if not matching. // This only applies if the window is not fullscreen or maximized and multiple monitors are used. diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 1561c4bb792..2dab6f94941 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -45,10 +45,6 @@ interface INewWindowState extends ISingleWindowState { hasDefaultState?: boolean; } -interface ILegacyWindowState extends IWindowState { - workspacePath?: string; -} - interface IWindowState { workspace?: IWorkspaceIdentifier; folderPath?: string; @@ -56,10 +52,6 @@ interface IWindowState { uiState: ISingleWindowState; } -interface ILegacyWindowsState extends IWindowsState { - openedFolders?: IWindowState[]; -} - interface IWindowsState { lastActiveWindow?: IWindowState; lastPluginDevelopmentHostWindow?: IWindowState; @@ -151,39 +143,12 @@ export class WindowsManager implements IWindowsMainService { @IInstantiationService private instantiationService: IInstantiationService ) { this.windowsState = this.stateService.getItem(WindowsManager.windowsStateStorageKey) || { openedWindows: [] }; + if (!Array.isArray(this.windowsState.openedWindows)) { + this.windowsState.openedWindows = []; + } this.fileDialog = new FileDialog(environmentService, telemetryService, stateService, this); this.workspacesManager = new WorkspacesManager(workspacesMainService, backupMainService, environmentService, this); - - this.migrateLegacyWindowState(); - } - - private migrateLegacyWindowState(): void { - const state: ILegacyWindowsState = this.windowsState; - - // TODO@Ben migration from previous openedFolders to new openedWindows property - if (Array.isArray(state.openedFolders) && state.openedFolders.length > 0) { - state.openedWindows = state.openedFolders; - state.openedFolders = void 0; - } else if (!state.openedWindows) { - state.openedWindows = []; - } - - // TODO@Ben migration from previous workspacePath in window state to folderPath - const states: ILegacyWindowState[] = []; - states.push(state.lastActiveWindow); - states.push(state.lastPluginDevelopmentHostWindow); - states.push(...state.openedWindows); - states.forEach(state => { - if (!state) { - return; - } - - if (typeof state.workspacePath === 'string') { - state.folderPath = state.workspacePath; - state.workspacePath = void 0; - } - }); } public ready(initialUserEnv: IProcessEnvironment): void { @@ -277,7 +242,7 @@ export class WindowsManager implements IWindowsMainService { // - closeAll(2): onBeforeWindowClose(2, false), onBeforeWindowClose(2, false), onBeforeQuit(0) // private onBeforeQuit(): void { - const currentWindowsState: ILegacyWindowsState = { + const currentWindowsState: IWindowsState = { openedWindows: [], lastPluginDevelopmentHostWindow: this.windowsState.lastPluginDevelopmentHostWindow, lastActiveWindow: this.lastClosedWindowState @@ -940,10 +905,6 @@ export class WindowsManager implements IWindowsMainService { const windowConfig = this.configurationService.getValue('window'); restoreWindows = ((windowConfig && windowConfig.restoreWindows) || 'one') as RestoreWindowsSetting; - if (restoreWindows === 'one' /* default */ && windowConfig && windowConfig.reopenFolders) { - restoreWindows = windowConfig.reopenFolders; // TODO@Ben migration from deprecated window.reopenFolders setting - } - if (['all', 'folders', 'one', 'none'].indexOf(restoreWindows) === -1) { restoreWindows = 'one'; } diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts index 7c78e26544b..fe757879b07 100644 --- a/src/vs/platform/extensions/common/extensions.ts +++ b/src/vs/platform/extensions/common/extensions.ts @@ -127,7 +127,6 @@ export interface IExtensionService { _serviceBrand: any; /** - * TODO@Ben: Delete this and use `whenInstalledExtensionsRegistered` * An event emitted when extensions are registered after their extension points got handled. * * This event will also fire on startup to signal the installed extensions. diff --git a/src/vs/platform/history/electron-main/historyMainService.ts b/src/vs/platform/history/electron-main/historyMainService.ts index 7e20f516ecf..761b5c05265 100644 --- a/src/vs/platform/history/electron-main/historyMainService.ts +++ b/src/vs/platform/history/electron-main/historyMainService.ts @@ -22,10 +22,6 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { isEqual } from 'vs/base/common/paths'; import { RunOnceScheduler } from 'vs/base/common/async'; -export interface ILegacyRecentlyOpened extends IRecentlyOpened { - folders: string[]; // TODO@Ben migration -} - export class HistoryMainService implements IHistoryMainService { private static readonly MAX_TOTAL_RECENT_ENTRIES = 100; @@ -179,9 +175,9 @@ export class HistoryMainService implements IHistoryMainService { let files: string[]; // Get from storage - const storedRecents = this.stateService.getItem(HistoryMainService.recentlyOpenedStorageKey) as ILegacyRecentlyOpened; + const storedRecents = this.stateService.getItem(HistoryMainService.recentlyOpenedStorageKey); if (storedRecents) { - workspaces = storedRecents.workspaces || storedRecents.folders || []; + workspaces = storedRecents.workspaces || []; files = storedRecents.files || []; } else { workspaces = []; diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 4890d1d609a..41c3db8d63f 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -134,7 +134,6 @@ const configurationValueWhitelist = [ 'workbench.sideBar.location', 'window.openFilesInNewWindow', 'javascript.validate.enable', - 'window.reopenFolders', 'window.restoreWindows', 'extensions.autoUpdate', 'files.eol', diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index 29af4d3a449..ca7ec0fcb2e 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -207,7 +207,6 @@ export interface IWindowSettings { openFilesInNewWindow: 'on' | 'off' | 'default'; openFoldersInNewWindow: 'on' | 'off' | 'default'; restoreWindows: 'all' | 'folders' | 'one' | 'none'; - reopenFolders: 'all' | 'one' | 'none'; // TODO@Ben deprecated restoreFullscreen: boolean; zoomLevel: number; titleBarStyle: 'native' | 'custom'; diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index b594ff1ea96..c5e59196388 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -857,7 +857,7 @@ export class QuickOpenController extends Component implements IQuickOpenService const result = handlerResults[i]; const resource = result.getResource(); - if (!result.isFile() || !resource || !mapEntryToResource[resource.toString()]) { + if (!result.mergeWithEditorHistory() || !resource || !mapEntryToResource[resource.toString()]) { additionalHandlerResults.push(result); } } diff --git a/src/vs/workbench/common/editor/resourceEditorInput.ts b/src/vs/workbench/common/editor/resourceEditorInput.ts index 4f9a57314ec..850154f02bc 100644 --- a/src/vs/workbench/common/editor/resourceEditorInput.ts +++ b/src/vs/workbench/common/editor/resourceEditorInput.ts @@ -93,7 +93,8 @@ export class ResourceEditorInput extends EditorInput { if (!(model instanceof ResourceEditorModel)) { ref.dispose(); this.modelReference = null; - return TPromise.wrapError(new Error(`Unexpected model for ResourceInput: ${this.resource}`)); // TODO@Ben eventually also files should be supported, but we guard due to the dangerous dispose of the model in dispose() + + return TPromise.wrapError(new Error(`Unexpected model for ResourceInput: ${this.resource}`)); } return model; diff --git a/src/vs/workbench/parts/backup/common/backupRestorer.ts b/src/vs/workbench/parts/backup/common/backupRestorer.ts index d1b4010f586..6e1d90e3e7e 100644 --- a/src/vs/workbench/parts/backup/common/backupRestorer.ts +++ b/src/vs/workbench/parts/backup/common/backupRestorer.ts @@ -93,8 +93,6 @@ export class BackupRestorer implements IWorkbenchContribution { const options = { pinned: true, preserveFocus: true, inactive: index > 0 || hasOpenedEditors }; if (resource.scheme === UNTITLED_SCHEMA && !BackupRestorer.UNTITLED_REGEX.test(resource.fsPath)) { - // TODO@Ben debt: instead of guessing if an untitled file has an associated file path or not - // this information should be provided by the backup service and stored as meta data within return { filePath: resource.fsPath, options }; } diff --git a/src/vs/workbench/parts/files/browser/editors/fileEditorTracker.ts b/src/vs/workbench/parts/files/browser/editors/fileEditorTracker.ts index 1baf91a02d9..a4b89ff6e86 100644 --- a/src/vs/workbench/parts/files/browser/editors/fileEditorTracker.ts +++ b/src/vs/workbench/parts/files/browser/editors/fileEditorTracker.ts @@ -142,8 +142,7 @@ export class FileEditorTracker implements IWorkbenchContribution { // We have received reports of users seeing delete events even though the file still // exists (network shares issue: https://github.com/Microsoft/vscode/issues/13665). // Since we do not want to close an editor without reason, we have to check if the - // file is really gone and not just a faulty file event (TODO@Ben revisit when we - // have a more stable file watcher in place for this scenario). + // file is really gone and not just a faulty file event. // This only applies to external file events, so we need to check for the isExternal // flag. let checkExists: TPromise; diff --git a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts index 0b7c07c9f74..f7994c2ca25 100644 --- a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts +++ b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts @@ -240,7 +240,7 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { // Resolve as text return this.textFileService.models.loadOrCreate(this.resource, { encoding: this.preferredEncoding, reload: refresh }).then(model => { - // TODO@Ben this is a bit ugly, because we first resolve the model and then resolve a model reference. the reason being that binary + // This is a bit ugly, because we first resolve the model and then resolve a model reference. the reason being that binary // or very large files do not resolve to a text file model but should be opened as binary files without text. First calling into // loadOrCreate ensures we are not creating model references for these kind of resources. // In addition we have a bit of payload to take into account (encoding, reload) that the text resolver does not handle yet. diff --git a/src/vs/workbench/parts/search/browser/openFileHandler.ts b/src/vs/workbench/parts/search/browser/openFileHandler.ts index 3a85e381b07..04e8cad5150 100644 --- a/src/vs/workbench/parts/search/browser/openFileHandler.ts +++ b/src/vs/workbench/parts/search/browser/openFileHandler.ts @@ -88,8 +88,8 @@ export class FileEntry extends EditorQuickOpenEntry { this.range = range; } - public isFile(): boolean { - return true; // TODO@Ben debt with editor history merging + public mergeWithEditorHistory(): boolean { + return true; } public getInput(): IResourceInput | EditorInput { diff --git a/src/vs/workbench/parts/update/electron-browser/media/update.contribution.css b/src/vs/workbench/parts/update/electron-browser/media/update.contribution.css index b0a88187489..4e602f932a2 100644 --- a/src/vs/workbench/parts/update/electron-browser/media/update.contribution.css +++ b/src/vs/workbench/parts/update/electron-browser/media/update.contribution.css @@ -8,7 +8,7 @@ -webkit-mask-size: 22px; } -/* HACK @bpasero @ben */ +/* TODO@Ben this is a hack to overwrite the icon for release notes eitor */ .file-icons-enabled .show-file-icons .release-notes-ext-file-icon.file-icon::before { content: ' '; background-image: url('code-icon.svg'); diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index ee7360e86b3..4905dff62b3 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -145,8 +145,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil // We have received reports of users seeing delete events even though the file still // exists (network shares issue: https://github.com/Microsoft/vscode/issues/13665). // Since we do not want to mark the model as orphaned, we have to check if the - // file is really gone and not just a faulty file event (TODO@Ben revisit when we - // have a more stable file watcher in place for this scenario). + // file is really gone and not just a faulty file event. checkOrphanedPromise = TPromise.timeout(100).then(() => { if (this.disposed) { return true; diff --git a/src/vs/workbench/services/workspace/node/workspaceEditingService.ts b/src/vs/workbench/services/workspace/node/workspaceEditingService.ts index 5803459ade3..7bb21530f42 100644 --- a/src/vs/workbench/services/workspace/node/workspaceEditingService.ts +++ b/src/vs/workbench/services/workspace/node/workspaceEditingService.ts @@ -16,7 +16,7 @@ import { IWorkspaceIdentifier, IWorkspaceFolderCreationData } from 'vs/platform/ import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import { WorkspaceService } from 'vs/workbench/services/configuration/node/configurationService'; import { migrateStorageToMultiRootWorkspace } from 'vs/platform/storage/common/migration'; -import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { IStorageService } from 'vs/platform/storage/common/storage'; import { StorageService } from 'vs/platform/storage/common/storageService'; import { ConfigurationScope, IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; import { Registry } from 'vs/platform/registry/common/platform'; @@ -28,15 +28,11 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; import { distinct } from 'vs/base/common/arrays'; import { isLinux } from 'vs/base/common/platform'; import { isEqual } from 'vs/base/common/resources'; -import { Action } from 'vs/base/common/actions'; -import product from 'vs/platform/node/product'; export class WorkspaceEditingService implements IWorkspaceEditingService { public _serviceBrand: any; - private static readonly INFO_MESSAGE_KEY = 'enterWorkspace.message'; - constructor( @IJSONEditingService private jsonEditingService: IJSONEditingService, @IWorkspaceContextService private contextService: WorkspaceService, @@ -145,17 +141,14 @@ export class WorkspaceEditingService implements IWorkspaceEditingService { if (result) { return this.migrate(result.workspace).then(() => { - // Show message to user (once) if entering workspace state - if (this.contextService.getWorkbenchState() !== WorkbenchState.WORKSPACE) { - this.informUserOnce(); // TODO@Ben remove me after a couple of releases - } + // TODO@Ben TODO@Sandeep the following requires ugly casts and should probably have a service interface // Reinitialize backup service - const backupFileService = this.backupFileService as BackupFileService; // TODO@Ben ugly cast + const backupFileService = this.backupFileService as BackupFileService; backupFileService.initialize(result.backupPath); // Reinitialize configuration service - const workspaceImpl = this.contextService as WorkspaceService; // TODO@Ben TODO@Sandeep ugly cast + const workspaceImpl = this.contextService as WorkspaceService; return workspaceImpl.initialize(result.workspace); }); } @@ -168,53 +161,6 @@ export class WorkspaceEditingService implements IWorkspaceEditingService { }); } - private informUserOnce(): void { - if (product.quality !== 'stable') { - return; // only for stable - } - - if (this.storageService.getBoolean(WorkspaceEditingService.INFO_MESSAGE_KEY)) { - return; // user does not want to see it again - } - - const closeAction = new Action( - 'enterWorkspace.close', - nls.localize('enterWorkspace.close', "Close"), - null, - true, - () => TPromise.as(true) - ); - - const dontShowAgainAction = new Action( - 'enterWorkspace.dontShowAgain', - nls.localize('enterWorkspace.dontShowAgain', "Don't Show Again"), - null, - true, - () => { - this.storageService.store(WorkspaceEditingService.INFO_MESSAGE_KEY, true, StorageScope.GLOBAL); - - return TPromise.as(true); - } - ); - const moreInfoAction = new Action( - 'enterWorkspace.moreInfo', - nls.localize('enterWorkspace.moreInfo', "More Information"), - null, - true, - () => { - const uri = URI.parse('https://go.microsoft.com/fwlink/?linkid=861970'); - window.open(uri.toString(true)); - - return TPromise.as(true); - } - ); - - this.messageService.show(Severity.Info, { - message: nls.localize('enterWorkspace.prompt', "Learn more about working with multiple folders in VS Code."), - actions: [moreInfoAction, dontShowAgainAction, closeAction] - }); - } - private migrate(toWorkspace: IWorkspaceIdentifier): TPromise { // Storage (UI State) migration From 218a1c0995e1ea9f7e87935ea1bab08a37e30226 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 12:21:23 +0100 Subject: [PATCH 052/615] fix #28153 --- .../editor/contrib/codelens/codelensController.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/contrib/codelens/codelensController.ts b/src/vs/editor/contrib/codelens/codelensController.ts index e38293a1d12..45fc1d5d584 100644 --- a/src/vs/editor/contrib/codelens/codelensController.ts +++ b/src/vs/editor/contrib/codelens/codelensController.ts @@ -129,12 +129,18 @@ export class CodeLensContribution implements editorCommon.IEditorContribution { this._localToDispose.push(this._editor.onDidChangeModelContent((e) => { this._editor.changeDecorations((changeAccessor) => { this._editor.changeViewZones((viewAccessor) => { - const toDispose: CodeLens[] = []; + let toDispose: CodeLens[] = []; + let lastLensLineNumber: number = -1; + this._lenses.forEach((lens) => { - if (lens.isValid()) { - lens.update(viewAccessor); - } else { + if (!lens.isValid() || lastLensLineNumber === lens.getLineNumber()) { + // invalid -> lens collapsed, attach range doesn't exist anymore + // line_number -> lenses should never be on the same line toDispose.push(lens); + + } else { + lens.update(viewAccessor); + lastLensLineNumber = lens.getLineNumber(); } }); From 0ec4814c6920075e11c1043a95aebbeebdb70a94 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 11 Dec 2017 12:23:00 +0100 Subject: [PATCH 053/615] make sure that revert never fails whenc losing (fixes #39885) --- src/vs/platform/editor/common/editor.ts | 15 ++++++++++++++- .../browser/parts/editor/editorActions.ts | 11 ++++++++--- .../workbench/browser/parts/editor/editorPart.ts | 9 ++++++++- src/vs/workbench/common/editor.ts | 4 ++-- .../parts/files/common/editors/fileEditorInput.ts | 6 +++--- .../parts/files/electron-browser/fileActions.ts | 7 +++++-- .../services/textfile/common/textFileService.ts | 3 ++- .../services/textfile/common/textfiles.ts | 14 +------------- 8 files changed, 43 insertions(+), 26 deletions(-) diff --git a/src/vs/platform/editor/common/editor.ts b/src/vs/platform/editor/common/editor.ts index be03bb99677..98d63a1977b 100644 --- a/src/vs/platform/editor/common/editor.ts +++ b/src/vs/platform/editor/common/editor.ts @@ -192,6 +192,19 @@ export enum Verbosity { LONG } +export interface IRevertOptions { + + /** + * Forces to load the contents of the editor again even if the editor is not dirty. + */ + force?: boolean; + + /** + * A soft revert will clear dirty state of an editor but will not attempt to load it. + */ + soft?: boolean; +} + export interface IEditorInput extends IDisposable { /** @@ -232,7 +245,7 @@ export interface IEditorInput extends IDisposable { /** * Reverts this input. */ - revert(): TPromise; + revert(options?: IRevertOptions): TPromise; /** * Returns if the other object matches this input. diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 39f0717470d..d099ee571e0 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -585,9 +585,14 @@ export class RevertAndCloseEditorAction extends Action { const input = activeEditor.input; const position = activeEditor.position; - return activeEditor.input.revert().then(ok => - this.editorService.closeEditor(position, input) - ); + // first try a normal revert where the contents of the editor are restored + return activeEditor.input.revert().then(() => this.editorService.closeEditor(position, input), error => { + // if that fails, since we are about to close the editor, we accept that + // the editor cannot be reverted and instead do a soft revert that just + // enables us to close the editor. With this, a user can always close a + // dirty editor even when reverting fails. + return activeEditor.input.revert({ soft: true }).then(() => this.editorService.closeEditor(position, input)); + }); } return TPromise.as(false); diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index d99c3e52bad..166e435a60c 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -829,7 +829,14 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService return editor.save().then(ok => !ok); case ConfirmResult.DONT_SAVE: - return editor.revert().then(ok => !ok); + // first try a normal revert where the contents of the editor are restored + return editor.revert().then(ok => !ok, error => { + // if that fails, since we are about to close the editor, we accept that + // the editor cannot be reverted and instead do a soft revert that just + // enables us to close the editor. With this, a user can always close a + // dirty editor even when reverting fails. + return editor.revert({ soft: true }).then(ok => !ok); + }); case ConfirmResult.CANCEL: return true; // veto diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 2a1bbf27e88..fa0547e6294 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -11,7 +11,7 @@ import types = require('vs/base/common/types'); import URI from 'vs/base/common/uri'; import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; import { IEditor, IEditorViewState, IModel, ScrollType } from 'vs/editor/common/editorCommon'; -import { IEditorInput, IEditorModel, IEditorOptions, ITextEditorOptions, IBaseResourceInput, Position, Verbosity, IEditor as IBaseEditor } from 'vs/platform/editor/common/editor'; +import { IEditorInput, IEditorModel, IEditorOptions, ITextEditorOptions, IBaseResourceInput, Position, Verbosity, IEditor as IBaseEditor, IRevertOptions } from 'vs/platform/editor/common/editor'; import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { Registry } from 'vs/platform/registry/common/platform'; @@ -214,7 +214,7 @@ export abstract class EditorInput implements IEditorInput { /** * Reverts the editor if it is dirty. Subclasses return a promise with a boolean indicating the success of the operation. */ - public revert(): TPromise { + public revert(options?: IRevertOptions): TPromise { return TPromise.as(true); } diff --git a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts index f7994c2ca25..37df37a64d7 100644 --- a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts +++ b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts @@ -21,7 +21,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IDisposable, dispose, IReference } from 'vs/base/common/lifecycle'; import { telemetryURIDescriptor } from 'vs/platform/telemetry/common/telemetryUtils'; -import { Verbosity } from 'vs/platform/editor/common/editor'; +import { Verbosity, IRevertOptions } from 'vs/platform/editor/common/editor'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IHashService } from 'vs/workbench/services/hash/common/hashService'; @@ -222,8 +222,8 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { return this.textFileService.save(this.resource); } - public revert(): TPromise { - return this.textFileService.revert(this.resource); + public revert(options?: IRevertOptions): TPromise { + return this.textFileService.revert(this.resource, options); } public getPreferredEditorId(candidates: string[]): string { diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index 97dac5b3dad..2b3598a96ba 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -1670,7 +1670,8 @@ export class RevertFileAction extends Action { id: string, label: string, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @ITextFileService private textFileService: ITextFileService + @ITextFileService private textFileService: ITextFileService, + @IMessageService private messageService: IMessageService ) { super(id, label); @@ -1690,7 +1691,9 @@ export class RevertFileAction extends Action { } if (resource && resource.scheme !== 'untitled') { - return this.textFileService.revert(resource, { force: true }); + return this.textFileService.revert(resource, { force: true }).then(null, error => { + this.messageService.show(Severity.Error, nls.localize('genericRevertError', "Failed to revert '{0}': {1}", paths.basename(resource.fsPath), toErrorMessage(error, false))); + }); } return TPromise.as(true); diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index 0ceca07a1f2..da197f08234 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -14,7 +14,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import platform = require('vs/base/common/platform'); import { IWindowsService } from 'vs/platform/windows/common/windows'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; -import { IRevertOptions, IResult, ITextFileOperationResult, ITextFileService, IRawTextContent, IAutoSaveConfiguration, AutoSaveMode, SaveReason, ITextFileEditorModelManager, ITextFileEditorModel, ModelState, ISaveOptions } from 'vs/workbench/services/textfile/common/textfiles'; +import { IResult, ITextFileOperationResult, ITextFileService, IRawTextContent, IAutoSaveConfiguration, AutoSaveMode, SaveReason, ITextFileEditorModelManager, ITextFileEditorModel, ModelState, ISaveOptions } from 'vs/workbench/services/textfile/common/textfiles'; import { ConfirmResult } from 'vs/workbench/common/editor'; import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; @@ -30,6 +30,7 @@ import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { ResourceMap } from 'vs/base/common/map'; import { Schemas } from 'vs/base/common/network'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; +import { IRevertOptions } from 'vs/platform/editor/common/editor'; export interface IBackupResult { didBackup: boolean; diff --git a/src/vs/workbench/services/textfile/common/textfiles.ts b/src/vs/workbench/services/textfile/common/textfiles.ts index fc5bb023221..81c64fdf345 100644 --- a/src/vs/workbench/services/textfile/common/textfiles.ts +++ b/src/vs/workbench/services/textfile/common/textfiles.ts @@ -13,6 +13,7 @@ import { IBaseStat, IResolveContentOptions } from 'vs/platform/files/common/file import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { IRawTextSource } from 'vs/editor/common/model/textSource'; +import { IRevertOptions } from 'vs/platform/editor/common/editor'; /** * The save error handler can be installed on the text text file editor model to install code that executes when save errors occur. @@ -210,19 +211,6 @@ export interface ITextFileEditorModel extends ITextEditorModel, IEncodingSupport isDisposed(): boolean; } -export interface IRevertOptions { - - /** - * Forces to load the contents from disk again even if the file is not dirty. - */ - force?: boolean; - - /** - * A soft revert will clear dirty state of a file but not attempt to load the contents from disk. - */ - soft?: boolean; -} - export interface ITextFileService extends IDisposable { _serviceBrand: any; onAutoSaveConfigurationChange: Event; From e02a1c3507a1557edfa5b672b4b26b8353dbfd36 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 11 Dec 2017 12:24:50 +0100 Subject: [PATCH 054/615] perf - pass over window ID instead of accessing via remote call on startup --- src/vs/code/electron-main/window.ts | 3 +++ src/vs/platform/windows/common/windows.ts | 1 + src/vs/workbench/electron-browser/main.ts | 14 ++++++-------- src/vs/workbench/electron-browser/shell.ts | 9 +++------ 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index fbb29ab568c..bdf16efb1f5 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -563,6 +563,9 @@ export class CodeWindow implements ICodeWindow { private getUrl(windowConfiguration: IWindowConfiguration): string { + // Set window ID + windowConfiguration.windowId = this._win.id; + // Set zoomlevel const windowConfig = this.configurationService.getValue('window'); const zoomLevel = windowConfig && windowConfig.zoomLevel; diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index ca7ec0fcb2e..b221607ef39 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -292,6 +292,7 @@ export interface IAddFoldersRequest { export interface IWindowConfiguration extends ParsedArgs, IOpenFileRequest { machineId: string; + windowId: number; appRoot: string; execPath: string; diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index 4549d6a1c33..ed776746567 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -32,7 +32,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { StorageService, inMemoryLocalStorageInstance } from 'vs/platform/storage/common/storageService'; import { Client as ElectronIPCClient } from 'vs/base/parts/ipc/electron-browser/ipc.electron-browser'; -import { webFrame, remote } from 'electron'; +import { webFrame } from 'electron'; import { UpdateChannelClient } from 'vs/platform/update/common/updateIpc'; import { IUpdateService } from 'vs/platform/update/common/update'; import { URLChannelClient } from 'vs/platform/url/common/urlIpc'; @@ -45,8 +45,6 @@ import fs = require('fs'); import { ConsoleLogService, MultiplexLogService } from 'vs/platform/log/common/log'; gracefulFs.gracefulify(fs); // enable gracefulFs -const currentWindowId = remote.getCurrentWindow().id; - export function startup(configuration: IWindowConfiguration): TPromise { // Ensure others can listen to zoom level changes @@ -70,11 +68,11 @@ export function startup(configuration: IWindowConfiguration): TPromise { } function openWorkbench(configuration: IWindowConfiguration): TPromise { - const mainProcessClient = new ElectronIPCClient(String(`window${currentWindowId}`)); - const mainServices = createMainProcessServices(mainProcessClient); + const mainProcessClient = new ElectronIPCClient(String(`window${configuration.windowId}`)); + const mainServices = createMainProcessServices(mainProcessClient, configuration); const environmentService = new EnvironmentService(configuration, configuration.execPath); - const spdlogService = createLogService(`renderer${currentWindowId}`, environmentService); + const spdlogService = createLogService(`renderer${configuration.windowId}`, environmentService); const consoleLogService = new ConsoleLogService(environmentService); const logService = new MultiplexLogService([consoleLogService, spdlogService]); @@ -194,7 +192,7 @@ function createStorageService(workspaceService: IWorkspaceContextService, enviro return new StorageService(storage, storage, workspaceId, secondaryWorkspaceId); } -function createMainProcessServices(mainProcessClient: ElectronIPCClient): ServiceCollection { +function createMainProcessServices(mainProcessClient: ElectronIPCClient, configuration: IWindowConfiguration): ServiceCollection { const serviceCollection = new ServiceCollection(); const windowsChannel = mainProcessClient.getChannel('windows'); @@ -204,7 +202,7 @@ function createMainProcessServices(mainProcessClient: ElectronIPCClient): Servic serviceCollection.set(IUpdateService, new SyncDescriptor(UpdateChannelClient, updateChannel)); const urlChannel = mainProcessClient.getChannel('url'); - serviceCollection.set(IURLService, new SyncDescriptor(URLChannelClient, urlChannel, currentWindowId)); + serviceCollection.set(IURLService, new SyncDescriptor(URLChannelClient, urlChannel, configuration.windowId)); const workspacesChannel = mainProcessClient.getChannel('workspaces'); serviceCollection.set(IWorkspacesService, new WorkspacesChannelClient(workspacesChannel)); diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 74046987d31..39c875e92bc 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -71,7 +71,6 @@ import { IExtensionManagementChannel, ExtensionManagementChannelClient } from 'v import { IExtensionManagementService, IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { ExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionEnablementService'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; -import { remote } from 'electron'; import { BareFontInfo } from 'vs/editor/common/config/fontInfo'; import { restoreFontInfo, readFontInfo, saveFontInfo } from 'vs/editor/browser/config/configuration'; import * as browser from 'vs/base/browser/browser'; @@ -101,8 +100,6 @@ export interface ICoreServices { storageService: IStorageService; } -const currentWindow = remote.getCurrentWindow(); - /** * The workbench shell contains the workbench with a rich header containing navigation and the activity bar. * With the Shell being the top level element in the page, it is also responsible for driving the layouting. @@ -293,13 +290,13 @@ export class WorkbenchShell { const instantiationService: IInstantiationService = new InstantiationService(serviceCollection, true); - this.broadcastService = new BroadcastService(currentWindow.id); + this.broadcastService = new BroadcastService(this.configuration.windowId); serviceCollection.set(IBroadcastService, this.broadcastService); - serviceCollection.set(IWindowService, new SyncDescriptor(WindowService, currentWindow.id, this.configuration)); + serviceCollection.set(IWindowService, new SyncDescriptor(WindowService, this.configuration.windowId, this.configuration)); const sharedProcess = (serviceCollection.get(IWindowsService)).whenSharedProcessReady() - .then(() => connectNet(this.environmentService.sharedIPCHandle, `window:${currentWindow.id}`)); + .then(() => connectNet(this.environmentService.sharedIPCHandle, `window:${this.configuration.windowId}`)); sharedProcess .done(client => client.registerChannel('choice', instantiationService.createInstance(ChoiceChannel))); From 97087f8e84dc305da722fb38ebf2b9abda973089 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 11 Dec 2017 12:28:04 +0100 Subject: [PATCH 055/615] debt - call shell.dispose and forward to workbench when window closes or unloads --- .../parts/editor/editorGroupsControl.ts | 1 - src/vs/workbench/electron-browser/shell.ts | 35 +++---- .../workbench/electron-browser/workbench.ts | 91 ++++++++----------- 3 files changed, 51 insertions(+), 76 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index ef5edcc636e..9a7c8113942 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -87,7 +87,6 @@ export interface IEditorGroupsControl { getRatio(): number[]; - dispose(): void; } diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 39c875e92bc..cf13abcc7cc 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -51,7 +51,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; -import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; +import { ILifecycleService, LifecyclePhase, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IMessageService, IChoiceService, Severity } from 'vs/platform/message/common/message'; @@ -273,14 +273,12 @@ export class WorkbenchShell { } private initServiceCollection(container: HTMLElement): [IInstantiationService, ServiceCollection] { - const disposables: IDisposable[] = []; - const serviceCollection = new ServiceCollection(); serviceCollection.set(IWorkspaceContextService, this.contextService); serviceCollection.set(IConfigurationService, this.configurationService); serviceCollection.set(IEnvironmentService, this.environmentService); serviceCollection.set(ILogService, this.logService); - disposables.push(this.logService); + this.toUnbind.push(this.logService); serviceCollection.set(ITimerService, this.timerService); serviceCollection.set(IStorageService, this.storageService); @@ -329,13 +327,13 @@ export class WorkbenchShell { const errorTelemetry = new ErrorTelemetry(telemetryService); - disposables.push(telemetryService, errorTelemetry); + this.toUnbind.push(telemetryService, errorTelemetry); } else { this.telemetryService = NullTelemetryService; } serviceCollection.set(ITelemetryService, this.telemetryService); - disposables.push(configurationTelemetry(this.telemetryService, this.configurationService)); + this.toUnbind.push(configurationTelemetry(this.telemetryService, this.configurationService)); let crashReporterService = NullCrashReporterService; if (!this.environmentService.disableCrashReporter && product.crashReporter && product.hockeyApp) { @@ -348,8 +346,7 @@ export class WorkbenchShell { serviceCollection.set(IChoiceService, this.messageService); const lifecycleService = instantiationService.createInstance(LifecycleService); - this.toUnbind.push(lifecycleService.onShutdown(reason => dispose(disposables))); - this.toUnbind.push(lifecycleService.onShutdown(reason => saveFontInfo(this.storageService))); + this.toUnbind.push(lifecycleService.onShutdown(reason => this.dispose(reason))); serviceCollection.set(ILifecycleService, lifecycleService); this.lifecycleService = lifecycleService; @@ -358,7 +355,7 @@ export class WorkbenchShell { const extensionEnablementService = instantiationService.createInstance(ExtensionEnablementService); serviceCollection.set(IExtensionEnablementService, extensionEnablementService); - disposables.push(extensionEnablementService); + this.toUnbind.push(extensionEnablementService); this.extensionService = instantiationService.createInstance(ExtensionService); serviceCollection.set(IExtensionService, this.extensionService); @@ -463,20 +460,18 @@ export class WorkbenchShell { this.workbench.layout(); } - public dispose(): void { + public dispose(reason = ShutdownReason.QUIT): void { - // Workbench - if (this.workbench) { - this.workbench.dispose(); - } - - this.contextViewService.dispose(); - - // Listeners + // Dispose bindings this.toUnbind = dispose(this.toUnbind); - // Container - $(this.container).empty(); + // Keep font info for next startup around + saveFontInfo(this.storageService); + + // Dispose Workbench + if (this.workbench) { + this.workbench.dispose(reason); + } } } diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index f2fc7efb4be..be4fdf87384 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -190,8 +190,7 @@ export class Workbench implements IPartService { private statusbarPart: StatusbarPart; private quickOpen: QuickOpenController; private workbenchLayout: WorkbenchLayout; - private toDispose: IDisposable[]; - private toShutdown: { shutdown: () => void; }[]; + private toUnbind: IDisposable[]; private sideBarHidden: boolean; private statusBarHidden: boolean; private activityBarHidden: boolean; @@ -240,8 +239,7 @@ export class Workbench implements IPartService { (configuration.filesToOpen && configuration.filesToOpen.length > 0) || (configuration.filesToDiff && configuration.filesToDiff.length > 0); - this.toDispose = []; - this.toShutdown = []; + this.toUnbind = []; this.editorBackgroundDelayer = new Delayer(50); this.closeEmptyWindowScheduler = new RunOnceScheduler(() => this.onAllEditorsClosed(), 50); @@ -281,7 +279,7 @@ export class Workbench implements IPartService { const inputFocused = InputFocusedContext.bindTo(this.contextKeyService); const onWindowsFocusIn = domEvent(window, 'focusin', true); - onWindowsFocusIn(() => inputFocused.set(document.activeElement && (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA')), null, this.toDispose); + onWindowsFocusIn(() => inputFocused.set(document.activeElement && (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA')), null, this.toUnbind); // Set workbench state context const WorkbenchStateContext = new RawContextKey('workbenchState', getWorkbenchStateString(this.configurationService.getWorkbenchState())); @@ -290,8 +288,8 @@ export class Workbench implements IPartService { const WorkspaceFolderCountContext = new RawContextKey('workspaceFolderCount', this.configurationService.getWorkspace().folders.length); const workspaceFolderCountContext = WorkspaceFolderCountContext.bindTo(this.contextKeyService); - this.toDispose.push(this.configurationService.onDidChangeWorkbenchState(() => workbenchStateContext.set(getWorkbenchStateString(this.configurationService.getWorkbenchState())))); - this.toDispose.push(this.configurationService.onDidChangeWorkspaceFolders(() => workspaceFolderCountContext.set(this.configurationService.getWorkspace().folders.length))); + this.toUnbind.push(this.configurationService.onDidChangeWorkbenchState(() => workbenchStateContext.set(getWorkbenchStateString(this.configurationService.getWorkbenchState())))); + this.toUnbind.push(this.configurationService.onDidChangeWorkspaceFolders(() => workspaceFolderCountContext.set(this.configurationService.getWorkspace().folders.length))); // Register Listeners this.registerListeners(); @@ -511,8 +509,6 @@ export class Workbench implements IPartService { private initServices(): void { const { serviceCollection } = this.workbenchParams; - this.toDispose.push(this.lifecycleService.onShutdown(this.shutdownComponents, this)); - // Services we contribute serviceCollection.set(IPartService, this); @@ -521,8 +517,7 @@ export class Workbench implements IPartService { // Status bar this.statusbarPart = this.instantiationService.createInstance(StatusbarPart, Identifiers.STATUSBAR_PART); - this.toDispose.push(this.statusbarPart); - this.toShutdown.push(this.statusbarPart); + this.toUnbind.push({ dispose: () => this.statusbarPart.shutdown() }); serviceCollection.set(IStatusbarService, this.statusbarPart); // Progress 2 @@ -546,8 +541,7 @@ export class Workbench implements IPartService { // Sidebar part this.sidebarPart = this.instantiationService.createInstance(SidebarPart, Identifiers.SIDEBAR_PART); - this.toDispose.push(this.sidebarPart); - this.toShutdown.push(this.sidebarPart); + this.toUnbind.push({ dispose: () => this.sidebarPart.shutdown() }); // Viewlet service this.viewletService = this.instantiationService.createInstance(ViewletService, this.sidebarPart); @@ -555,34 +549,30 @@ export class Workbench implements IPartService { // Panel service (panel part) this.panelPart = this.instantiationService.createInstance(PanelPart, Identifiers.PANEL_PART); - this.toDispose.push(this.panelPart); - this.toShutdown.push(this.panelPart); + this.toUnbind.push({ dispose: () => this.panelPart.shutdown() }); serviceCollection.set(IPanelService, this.panelPart); // Activity service (activitybar part) this.activitybarPart = this.instantiationService.createInstance(ActivitybarPart, Identifiers.ACTIVITYBAR_PART); - this.toDispose.push(this.activitybarPart); - this.toShutdown.push(this.activitybarPart); + this.toUnbind.push({ dispose: () => this.activitybarPart.shutdown() }); const activityService = this.instantiationService.createInstance(ActivityService, this.activitybarPart, this.panelPart); serviceCollection.set(IActivityService, activityService); // File Service this.fileService = this.instantiationService.createInstance(RemoteFileService); serviceCollection.set(IFileService, this.fileService); - this.toDispose.push(this.fileService.onFileChanges(e => this.configurationService.handleWorkspaceFileEvents(e))); + this.toUnbind.push(this.fileService.onFileChanges(e => this.configurationService.handleWorkspaceFileEvents(e))); // Editor service (editor part) this.editorPart = this.instantiationService.createInstance(EditorPart, Identifiers.EDITOR_PART, !this.hasFilesToCreateOpenOrDiff); - this.toDispose.push(this.editorPart); - this.toShutdown.push(this.editorPart); + this.toUnbind.push({ dispose: () => this.editorPart.shutdown() }); this.editorService = this.instantiationService.createInstance(WorkbenchEditorService, this.editorPart); serviceCollection.set(IWorkbenchEditorService, this.editorService); serviceCollection.set(IEditorGroupService, this.editorPart); // Title bar this.titlebarPart = this.instantiationService.createInstance(TitlebarPart, Identifiers.TITLEBAR_PART); - this.toDispose.push(this.titlebarPart); - this.toShutdown.push(this.titlebarPart); + this.toUnbind.push({ dispose: () => this.titlebarPart.shutdown() }); serviceCollection.set(ITitleService, this.titlebarPart); // History @@ -619,8 +609,7 @@ export class Workbench implements IPartService { // Quick open service (quick open controller) this.quickOpen = this.instantiationService.createInstance(QuickOpenController); - this.toDispose.push(this.quickOpen); - this.toShutdown.push(this.quickOpen); + this.toUnbind.push({ dispose: () => this.quickOpen.shutdown() }); serviceCollection.set(IQuickOpenService, this.quickOpen); // Contributed services @@ -962,26 +951,7 @@ export class Workbench implements IPartService { document.body.style['-webkit-font-smoothing'] = (aliasing === 'default' ? '' : aliasing); } - public dispose(): void { - if (this.isStarted()) { - this.shutdownComponents(); - this.workbenchShutdown = true; - } - - this.toDispose = dispose(this.toDispose); - } - - /** - * Asks the workbench and all its UI components inside to lay out according to - * the containers dimension the workbench is living in. - */ - public layout(options?: ILayoutOptions): void { - if (this.isStarted()) { - this.workbenchLayout.layout(options); - } - } - - private shutdownComponents(reason = ShutdownReason.QUIT): void { + public dispose(reason = ShutdownReason.QUIT): void { // Restore sidebar if we are being shutdown as a matter of a reload if (reason === ShutdownReason.RELOAD) { @@ -997,14 +967,27 @@ export class Workbench implements IPartService { this.storageService.remove(Workbench.zenModeActiveStorageKey, StorageScope.WORKSPACE); } + // Dispose bindings + this.toUnbind = dispose(this.toUnbind); + // Pass shutdown on to each participant - this.toShutdown.forEach(s => s.shutdown()); + this.workbenchShutdown = true; + } + + /** + * Asks the workbench and all its UI components inside to lay out according to + * the containers dimension the workbench is living in. + */ + public layout(options?: ILayoutOptions): void { + if (this.isStarted()) { + this.workbenchLayout.layout(options); + } } private registerListeners(): void { // Listen to editor changes - this.toDispose.push(this.editorPart.onEditorsChanged(() => this.onEditorsChanged())); + this.toUnbind.push(this.editorPart.onEditorsChanged(() => this.onEditorsChanged())); // Listen to editor closing (if we run with --wait) const filesToWait = this.workbenchParams.configuration.filesToWait; @@ -1013,21 +996,21 @@ export class Workbench implements IPartService { const waitMarkerFile = URI.file(filesToWait.waitMarkerFilePath); const listenerDispose = this.editorPart.getStacksModel().onEditorClosed(() => this.onEditorClosed(listenerDispose, resourcesToWaitFor, waitMarkerFile)); - this.toDispose.push(listenerDispose); + this.toUnbind.push(listenerDispose); } // Handle message service and quick open events - this.toDispose.push((this.messageService).onMessagesShowing(() => this.messagesVisibleContext.set(true))); - this.toDispose.push((this.messageService).onMessagesCleared(() => this.messagesVisibleContext.reset())); + this.toUnbind.push((this.messageService).onMessagesShowing(() => this.messagesVisibleContext.set(true))); + this.toUnbind.push((this.messageService).onMessagesCleared(() => this.messagesVisibleContext.reset())); - this.toDispose.push(this.quickOpen.onShow(() => (this.messageService).suspend())); // when quick open is open, don't show messages behind - this.toDispose.push(this.quickOpen.onHide(() => (this.messageService).resume())); // resume messages once quick open is closed again + this.toUnbind.push(this.quickOpen.onShow(() => (this.messageService).suspend())); // when quick open is open, don't show messages behind + this.toUnbind.push(this.quickOpen.onHide(() => (this.messageService).resume())); // resume messages once quick open is closed again // Configuration changes - this.toDispose.push(this.configurationService.onDidChangeConfiguration(() => this.onDidUpdateConfiguration())); + this.toUnbind.push(this.configurationService.onDidChangeConfiguration(() => this.onDidUpdateConfiguration())); // Fullscreen changes - this.toDispose.push(browser.onDidChangeFullscreen(() => this.onFullscreenChanged())); + this.toUnbind.push(browser.onDidChangeFullscreen(() => this.onFullscreenChanged())); } private onFullscreenChanged(): void { @@ -1143,8 +1126,6 @@ export class Workbench implements IPartService { }, this.quickOpen // Quickopen ); - - this.toDispose.push(this.workbenchLayout); } private renderWorkbench(): void { From 2f914692bb546f604156133e1e2b5e163298b903 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 11 Dec 2017 12:32:51 +0100 Subject: [PATCH 056/615] Enhance tab (hover) styling (fixes #30901) --- .../browser/parts/editor/tabsTitleControl.ts | 44 ++++++++++++++++++- src/vs/workbench/common/theme.ts | 24 ++++++++++ 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 157d3cdb771..343b62a71a9 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -40,7 +40,7 @@ import { extractResources } from 'vs/workbench/browser/editor'; import { getOrSet } from 'vs/base/common/map'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_FOREGROUND, TAB_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, TAB_UNFOCUSED_ACTIVE_FOREGROUND, TAB_UNFOCUSED_INACTIVE_FOREGROUND, TAB_UNFOCUSED_ACTIVE_BORDER, TAB_ACTIVE_BORDER } from 'vs/workbench/common/theme'; +import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_FOREGROUND, TAB_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, TAB_UNFOCUSED_ACTIVE_FOREGROUND, TAB_UNFOCUSED_INACTIVE_FOREGROUND, TAB_UNFOCUSED_ACTIVE_BORDER, TAB_ACTIVE_BORDER, TAB_HOVER_BACKGROUND, TAB_HOVER_BORDER, TAB_UNFOCUSED_HOVER_BACKGROUND, TAB_UNFOCUSED_HOVER_BORDER } from 'vs/workbench/common/theme'; import { activeContrastBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { IFileService } from 'vs/platform/files/common/files'; import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; @@ -281,7 +281,9 @@ export class TabsTitleControl extends TitleControl { const isGroupActive = this.stacks.isActive(group); if (isGroupActive) { DOM.addClass(this.titleContainer, 'active'); + DOM.removeClass(this.titleContainer, 'inactive'); } else { + DOM.addClass(this.titleContainer, 'inactive'); DOM.removeClass(this.titleContainer, 'active'); } @@ -958,4 +960,42 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { } `); } -}); \ No newline at end of file + + // Hover Background + const tabHoverBackground = theme.getColor(TAB_HOVER_BACKGROUND); + if (tabHoverBackground) { + collector.addRule(` + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.active .tabs-container > .tab:hover { + background: ${tabHoverBackground} !important; + } + `); + } + + const tabUnfocusedHoverBackground = theme.getColor(TAB_UNFOCUSED_HOVER_BACKGROUND); + if (tabUnfocusedHoverBackground) { + collector.addRule(` + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.inactive .tabs-container > .tab:hover { + background: ${tabUnfocusedHoverBackground} !important; + } + `); + } + + // Hover Border + const tabHoverBorder = theme.getColor(TAB_HOVER_BORDER); + if (tabHoverBorder) { + collector.addRule(` + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.active .tabs-container > .tab:hover { + box-shadow: ${tabHoverBorder} 0 -1px inset !important; + } + `); + } + + const tabUnfocusedHoverBorder = theme.getColor(TAB_UNFOCUSED_HOVER_BORDER); + if (tabUnfocusedHoverBorder) { + collector.addRule(` + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.inactive .tabs-container > .tab:hover { + box-shadow: ${tabUnfocusedHoverBorder} 0 -1px inset !important; + } + `); + } +}); diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 77887fd950d..5ea4917d224 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -23,6 +23,18 @@ export const TAB_INACTIVE_BACKGROUND = registerColor('tab.inactiveBackground', { hc: null }, nls.localize('tabInactiveBackground', "Inactive tab background color. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); +export const TAB_HOVER_BACKGROUND = registerColor('tab.hoverBackground', { + dark: null, + light: null, + hc: null +}, nls.localize('tabHoverBackground', "Tab background color when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); + +export const TAB_UNFOCUSED_HOVER_BACKGROUND = registerColor('tab.unfocusedHoverBackground', { + dark: transparent(TAB_HOVER_BACKGROUND, 0.5), + light: transparent(TAB_HOVER_BACKGROUND, 0.7), + hc: null +}, nls.localize('tabUnfocusedHoverBackground', "Tab background color in an unfocused group when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); + export const TAB_BORDER = registerColor('tab.border', { dark: '#252526', light: '#F3F3F3', @@ -41,6 +53,18 @@ export const TAB_UNFOCUSED_ACTIVE_BORDER = registerColor('tab.unfocusedActiveBor hc: null }, nls.localize('tabActiveUnfocusedBorder', "Border to highlight active tabs in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); +export const TAB_HOVER_BORDER = registerColor('tab.hoverBorder', { + dark: null, + light: null, + hc: null +}, nls.localize('tabHoverBorder', "Border to highlight tabs when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); + +export const TAB_UNFOCUSED_HOVER_BORDER = registerColor('tab.unfocusedHoverBorder', { + dark: transparent(TAB_HOVER_BORDER, 0.5), + light: transparent(TAB_HOVER_BORDER, 0.7), + hc: null +}, nls.localize('tabUnfocusedHoverBorder', "Border to highlight tabs in an unfocused group when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); + export const TAB_ACTIVE_FOREGROUND = registerColor('tab.activeForeground', { dark: Color.white, light: '#333333', From 9e64b030583cd6f1ac58ab8d502e2cc61cf0acd4 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 11 Dec 2017 12:36:39 +0100 Subject: [PATCH 057/615] editor picker: open while going through results (fixes #34324) --- .../workbench/browser/parts/editor/editorPicker.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorPicker.ts b/src/vs/workbench/browser/parts/editor/editorPicker.ts index 979df653a59..abe0d8a17a9 100644 --- a/src/vs/workbench/browser/parts/editor/editorPicker.ts +++ b/src/vs/workbench/browser/parts/editor/editorPicker.ts @@ -16,7 +16,7 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { getIconClasses } from 'vs/workbench/browser/labels'; import { IModelService } from 'vs/editor/common/services/modelService'; import { QuickOpenHandler } from 'vs/workbench/browser/quickopen'; -import { Position } from 'vs/platform/editor/common/editor'; +import { Position, IEditorOptions } from 'vs/platform/editor/common/editor'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -71,15 +71,13 @@ export class EditorPickerEntry extends QuickOpenEntryGroup { } public run(mode: Mode, context: IEntryRunContext): boolean { - if (mode === Mode.OPEN) { - return this.runOpen(context); + let options: IEditorOptions; + if (mode === Mode.PREVIEW) { + options = { preserveFocus: true }; // in preview, make sure to keep focus in quick open } - return super.run(mode, context); - } - - private runOpen(context: IEntryRunContext): boolean { - this.editorService.openEditor(this.editor, null, this.stacks.positionOfGroup(this.group)).done(null, errors.onUnexpectedError); + // Open Editor + this.editorService.openEditor(this.editor, options, this.stacks.positionOfGroup(this.group)).done(null, errors.onUnexpectedError); return true; } From 81f8ee02f720704aa122a68cf60bbc9ad4d709c6 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 11 Dec 2017 12:48:36 +0100 Subject: [PATCH 058/615] improve cross window tab dnd (support dirty, restore UI state) --- src/vs/base/browser/dnd.ts | 21 ++- src/vs/base/parts/tree/browser/treeDnd.ts | 3 +- src/vs/base/parts/tree/browser/treeView.ts | 3 +- src/vs/workbench/browser/editor.ts | 44 ++++- .../parts/editor/editorAreaDropHandler.ts | 171 ++++++++++++++++++ .../parts/editor/editorGroupsControl.ts | 51 +----- .../browser/parts/editor/tabsTitleControl.ts | 67 +++---- .../browser/parts/editor/titleControl.ts | 77 -------- .../electron-browser/views/explorerViewer.ts | 5 +- .../electron-browser/terminalPanel.ts | 3 +- .../services/backup/common/backup.ts | 8 + .../services/backup/node/backupFileService.ts | 8 +- .../test/node/backupFileService.test.ts | 8 +- .../workbench/test/workbenchTestServices.ts | 4 +- 14 files changed, 290 insertions(+), 183 deletions(-) create mode 100644 src/vs/workbench/browser/parts/editor/editorAreaDropHandler.ts diff --git a/src/vs/base/browser/dnd.ts b/src/vs/base/browser/dnd.ts index 7ca472fe69e..b95e397071f 100644 --- a/src/vs/base/browser/dnd.ts +++ b/src/vs/base/browser/dnd.ts @@ -39,4 +39,23 @@ export class DelayedDragHandler { public dispose(): void { this.clearDragTimeout(); } -} \ No newline at end of file +} + +// Common data transfers +export const DataTransfers = { + + /** + * Application specific resource transfer type. + */ + URL: 'URL', + + /** + * Browser specific transfer type to download. + */ + DOWNLOAD_URL: 'DownloadURL', + + /** + * Typicaly transfer type for copy/paste transfers. + */ + TEXT: 'text/plain' +}; \ No newline at end of file diff --git a/src/vs/base/parts/tree/browser/treeDnd.ts b/src/vs/base/parts/tree/browser/treeDnd.ts index abae2bcfd18..7b2fa8c4b1a 100644 --- a/src/vs/base/parts/tree/browser/treeDnd.ts +++ b/src/vs/base/parts/tree/browser/treeDnd.ts @@ -10,6 +10,7 @@ import { DefaultDragAndDrop } from 'vs/base/parts/tree/browser/treeDefaults'; import URI from 'vs/base/common/uri'; import { basename } from 'vs/base/common/paths'; import { getPathLabel } from 'vs/base/common/labels'; +import { DataTransfers } from 'vs/base/browser/dnd'; export class ElementsDragAndDropData implements _.IDragAndDropData { @@ -116,7 +117,7 @@ export class SimpleFileResourceDragAndDrop extends DefaultDragAndDrop { // Apply some datatransfer types to allow for dragging the element outside of the application const resource = this.toResource(source); if (resource) { - originalEvent.dataTransfer.setData('text/plain', getPathLabel(resource)); + originalEvent.dataTransfer.setData(DataTransfers.TEXT, getPathLabel(resource)); } } } \ No newline at end of file diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index f15a5b120df..041c4285a43 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -24,6 +24,7 @@ import _ = require('vs/base/parts/tree/browser/tree'); import { KeyCode } from 'vs/base/common/keyCodes'; import Event, { Emitter } from 'vs/base/common/event'; import { IDomNodePagePosition } from 'vs/base/browser/dom'; +import { DataTransfers } from 'vs/base/browser/dnd'; export interface IRow { element: HTMLElement; @@ -1291,7 +1292,7 @@ export class TreeView extends HeightMap { } e.dataTransfer.effectAllowed = 'copyMove'; - e.dataTransfer.setData('URL', item.uri); + e.dataTransfer.setData(DataTransfers.URL, item.uri); if (e.dataTransfer.setDragImage) { let label: string; diff --git a/src/vs/workbench/browser/editor.ts b/src/vs/workbench/browser/editor.ts index 24c226052d9..16a6140a6e4 100644 --- a/src/vs/workbench/browser/editor.ts +++ b/src/vs/workbench/browser/editor.ts @@ -12,6 +12,8 @@ import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { IConstructorSignature0, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { isArray } from 'vs/base/common/types'; import URI from 'vs/base/common/uri'; +import { DataTransfers } from 'vs/base/browser/dnd'; +import { IEditorViewState } from 'vs/editor/common/editorCommon'; export interface IEditorDescriptor { instantiate(instantiationService: IInstantiationService): BaseEditor; @@ -204,20 +206,50 @@ export interface IDraggedResource { isExternal: boolean; } -export function extractResources(e: DragEvent, externalOnly?: boolean): IDraggedResource[] { - const resources: IDraggedResource[] = []; +export interface IDraggedEditor extends IDraggedResource { + backupResource?: URI; + viewState?: IEditorViewState; +} + +export interface ISerializedDraggedEditor { + resource: string; + backupResource: string; + viewState: IEditorViewState; +} + +export const CodeDataTransfers = { + EDITOR: 'CodeEditor' +}; + +export function extractResources(e: DragEvent, externalOnly?: boolean): (IDraggedResource | IDraggedEditor)[] { + const resources: (IDraggedResource | IDraggedEditor)[] = []; if (e.dataTransfer.types.length > 0) { - // Check for in-app DND + // Check for window-to-window DND if (!externalOnly) { - const rawData = e.dataTransfer.getData('URL'); - if (rawData) { + + // Data Transfer: Code Editor + const rawEditorData = e.dataTransfer.getData(CodeDataTransfers.EDITOR); + if (rawEditorData) { try { - resources.push({ resource: URI.parse(rawData), isExternal: false }); + const draggedEditor = JSON.parse(rawEditorData) as ISerializedDraggedEditor; + resources.push({ resource: URI.parse(draggedEditor.resource), backupResource: URI.parse(draggedEditor.backupResource), viewState: draggedEditor.viewState, isExternal: false }); } catch (error) { // Invalid URI } } + + // Data Transfer: URL + else { + const rawURLData = e.dataTransfer.getData(DataTransfers.URL); + if (rawURLData) { + try { + resources.push({ resource: URI.parse(rawURLData), isExternal: false }); + } catch (error) { + // Invalid URI + } + } + } } // Check for native file transfer diff --git a/src/vs/workbench/browser/parts/editor/editorAreaDropHandler.ts b/src/vs/workbench/browser/parts/editor/editorAreaDropHandler.ts new file mode 100644 index 00000000000..587ceeb9128 --- /dev/null +++ b/src/vs/workbench/browser/parts/editor/editorAreaDropHandler.ts @@ -0,0 +1,171 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { IDraggedResource, IDraggedEditor, extractResources } from 'vs/workbench/browser/editor'; +import { WORKSPACE_EXTENSION, IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; +import { extname } from 'vs/base/common/paths'; +import { IFileService } from 'vs/platform/files/common/files'; +import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; +import URI from 'vs/base/common/uri'; +import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { BACKUP_FILE_RESOLVE_OPTIONS, IBackupFileService } from 'vs/workbench/services/backup/common/backup'; +import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { Schemas } from 'vs/base/common/network'; +import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { Position } from 'vs/platform/editor/common/editor'; +import { onUnexpectedError } from 'vs/base/common/errors'; + +/** + * Shared function across some editor components to handle drag & drop of external resources. E.g. of folders and workspace files + * to open them in the window instead of the editor or to handle dirty editors being dropped between instances of Code. + */ +export class EditorAreaDropHandler { + + constructor( + @IFileService private fileService: IFileService, + @IWindowsService private windowsService: IWindowsService, + @IWindowService private windowService: IWindowService, + @IWorkspacesService private workspacesService: IWorkspacesService, + @ITextFileService private textFileService: ITextFileService, + @IBackupFileService private backupFileService: IBackupFileService, + @IEditorGroupService private groupService: IEditorGroupService, + @IUntitledEditorService private untitledEditorService: IUntitledEditorService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + ) { + } + + public handleDrop(event: DragEvent, afterDrop: () => void, targetPosition: Position, targetIndex?: number): void { + const resources = extractResources(event).filter(r => r.resource.scheme === Schemas.file || r.resource.scheme === Schemas.untitled); + if (!resources.length) { + return; + } + + return this.doHandleDrop(resources).then(isWorkspaceOpening => { + if (isWorkspaceOpening) { + return void 0; // return early if the drop operation resulted in this window changing to a workspace + } + + // Add external ones to recently open list unless dropped resource is a workspace + const externalResources = resources.filter(d => d.isExternal).map(d => d.resource); + if (externalResources.length) { + this.windowsService.addRecentlyOpened(externalResources.map(resource => resource.fsPath)); + } + + // Open in Editor + return this.windowService.focusWindow() + .then(() => this.editorService.openEditors(resources.map(r => { + return { + input: { + resource: r.resource, + options: { + pinned: true, + index: targetIndex, + viewState: (r as IDraggedEditor).viewState + } + }, + position: targetPosition + }; + }))).then(() => { + + // Finish with provided function + afterDrop(); + }); + }).done(null, onUnexpectedError); + } + + private doHandleDrop(resources: (IDraggedResource | IDraggedEditor)[]): TPromise { + + // Check for dirty editor being dropped + if (resources.length === 1 && !resources[0].isExternal && (resources[0] as IDraggedEditor).backupResource) { + return this.handleDirtyEditorDrop(resources[0]); + } + + // Check for workspace file being dropped + if (resources.some(r => r.isExternal)) { + return this.handleWorkspaceFileDrop(resources); + } + + return TPromise.as(false); + } + + private handleDirtyEditorDrop(droppedDirtyEditor: IDraggedEditor): TPromise { + + // Untitled: always ensure that we open a new untitled for each file we drop + if (droppedDirtyEditor.resource.scheme === Schemas.untitled) { + droppedDirtyEditor.resource = this.untitledEditorService.createOrGet().getResource(); + } + + // Return early if the resource is already dirty in target or opened already + if (this.textFileService.isDirty(droppedDirtyEditor.resource) || this.groupService.getStacksModel().isOpen(droppedDirtyEditor.resource)) { + return TPromise.as(false); + } + + // Resolve the contents of the dropped dirty resource from source + return this.textFileService.resolveTextContent(droppedDirtyEditor.backupResource, BACKUP_FILE_RESOLVE_OPTIONS).then(content => { + + // Set the contents of to the resource to the target + return this.backupFileService.backupResource(droppedDirtyEditor.resource, this.backupFileService.parseBackupContent(content.value)); + }).then(() => false, () => false /* ignore any error */); + } + + private handleWorkspaceFileDrop(resources: (IDraggedResource | IDraggedEditor)[]): TPromise { + const externalResources = resources.filter(d => d.isExternal).map(d => d.resource); + + const externalWorkspaceResources: { workspaces: URI[], folders: URI[] } = { + workspaces: [], + folders: [] + }; + + return TPromise.join(externalResources.map(resource => { + + // Check for Workspace + if (extname(resource.fsPath) === `.${WORKSPACE_EXTENSION}`) { + externalWorkspaceResources.workspaces.push(resource); + + return void 0; + } + + // Check for Folder + return this.fileService.resolveFile(resource).then(stat => { + if (stat.isDirectory) { + externalWorkspaceResources.folders.push(stat.resource); + } + }, error => void 0); + })).then(_ => { + const { workspaces, folders } = externalWorkspaceResources; + + // Return early if no external resource is a folder or workspace + if (workspaces.length === 0 && folders.length === 0) { + return false; + } + + // Pass focus to window + this.windowService.focusWindow(); + + let workspacesToOpen: TPromise; + + // Open in separate windows if we drop workspaces or just one folder + if (workspaces.length > 0 || folders.length === 1) { + workspacesToOpen = TPromise.as([...workspaces, ...folders].map(resources => resources.fsPath)); + } + + // Multiple folders: Create new workspace with folders and open + else if (folders.length > 1) { + workspacesToOpen = this.workspacesService.createWorkspace(folders.map(folder => ({ uri: folder }))).then(workspace => [workspace.configPath]); + } + + // Open + workspacesToOpen.then(workspaces => { + this.windowsService.openWindow(workspaces, { forceReuseWindow: true }); + }); + + return true; + }); + } +} \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index 9a7c8113942..a6e2d0b65b7 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -26,20 +26,16 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { TabsTitleControl } from 'vs/workbench/browser/parts/editor/tabsTitleControl'; -import { TitleControl, ITitleAreaControl, handleWorkspaceExternalDrop } from 'vs/workbench/browser/parts/editor/titleControl'; +import { TitleControl, ITitleAreaControl } from 'vs/workbench/browser/parts/editor/titleControl'; import { NoTabsTitleControl } from 'vs/workbench/browser/parts/editor/noTabsTitleControl'; import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup, EditorOptions, TextEditorOptions, IEditorIdentifier } from 'vs/workbench/common/editor'; -import { extractResources } from 'vs/workbench/browser/editor'; -import { IWindowService, IWindowsService } from 'vs/platform/windows/common/windows'; import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorBackground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { Themable, EDITOR_GROUP_HEADER_TABS_BACKGROUND, EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND, EDITOR_GROUP_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_GROUP_BACKGROUND, EDITOR_GROUP_HEADER_TABS_BORDER } from 'vs/workbench/common/theme'; import { attachProgressBarStyler } from 'vs/platform/theme/common/styler'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { IFileService } from 'vs/platform/files/common/files'; -import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; import { IDisposable, combinedDisposable } from 'vs/base/common/lifecycle'; +import { EditorAreaDropHandler } from 'vs/workbench/browser/parts/editor/editorAreaDropHandler'; export enum Rochade { NONE, @@ -148,12 +144,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro @IContextKeyService private contextKeyService: IContextKeyService, @IExtensionService private extensionService: IExtensionService, @IInstantiationService private instantiationService: IInstantiationService, - @IWindowService private windowService: IWindowService, - @IWindowsService private windowsService: IWindowsService, - @IThemeService themeService: IThemeService, - @IFileService private fileService: IFileService, - @IMessageService private messageService: IMessageService, - @IWorkspacesService private workspacesService: IWorkspacesService + @IThemeService themeService: IThemeService ) { super(themeService); @@ -1121,36 +1112,14 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro // Check for URI transfer else { - const droppedResources = extractResources(e).filter(r => r.resource.scheme === 'file' || r.resource.scheme === 'untitled'); - if (droppedResources.length) { - handleWorkspaceExternalDrop(droppedResources, $this.fileService, $this.messageService, $this.windowsService, $this.windowService, $this.workspacesService).then(handled => { - if (handled) { - return; - } + const dropHandler = $this.instantiationService.createInstance(EditorAreaDropHandler); + dropHandler.handleDrop(e, () => { + if (splitEditor && splitTo !== freeGroup) { + groupService.moveGroup(freeGroup, splitTo); + } - // Add external ones to recently open list - const externalResources = droppedResources.filter(d => d.isExternal).map(d => d.resource); - if (externalResources.length) { - $this.windowsService.addRecentlyOpened(externalResources.map(resource => resource.fsPath)); - } - - // Open in Editor - $this.windowService.focusWindow() - .then(() => editorService.openEditors(droppedResources.map(d => { - return { - input: { resource: d.resource, options: { pinned: true } }, - position: splitEditor ? freeGroup : position - }; - }))).then(() => { - if (splitEditor && splitTo !== freeGroup) { - groupService.moveGroup(freeGroup, splitTo); - } - - groupService.focusGroup(splitEditor ? splitTo : position); - }) - .done(null, errors.onUnexpectedError); - }); - } + groupService.focusGroup(splitEditor ? splitTo : position); + }, splitEditor ? freeGroup : position); } } diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 343b62a71a9..5b3f369e3d6 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -30,22 +30,24 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IMenuService } from 'vs/platform/actions/common/actions'; -import { IWindowService, IWindowsService } from 'vs/platform/windows/common/windows'; -import { TitleControl, handleWorkspaceExternalDrop } from 'vs/workbench/browser/parts/editor/titleControl'; +import { TitleControl } from 'vs/workbench/browser/parts/editor/titleControl'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { IDisposable, dispose, combinedDisposable } from 'vs/base/common/lifecycle'; import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; -import { extractResources } from 'vs/workbench/browser/editor'; +import { CodeDataTransfers, ISerializedDraggedEditor } from 'vs/workbench/browser/editor'; import { getOrSet } from 'vs/base/common/map'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_FOREGROUND, TAB_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, TAB_UNFOCUSED_ACTIVE_FOREGROUND, TAB_UNFOCUSED_INACTIVE_FOREGROUND, TAB_UNFOCUSED_ACTIVE_BORDER, TAB_ACTIVE_BORDER, TAB_HOVER_BACKGROUND, TAB_HOVER_BORDER, TAB_UNFOCUSED_HOVER_BACKGROUND, TAB_UNFOCUSED_HOVER_BORDER } from 'vs/workbench/common/theme'; import { activeContrastBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { IFileService } from 'vs/platform/files/common/files'; -import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; import { Dimension } from 'vs/base/browser/builder'; import { scheduleAtNextAnimationFrame } from 'vs/base/browser/dom'; +import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; +import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { DataTransfers } from 'vs/base/browser/dnd'; +import { EditorAreaDropHandler } from 'vs/workbench/browser/parts/editor/editorAreaDropHandler'; +import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor'; interface IEditorInputLabel { name: string; @@ -78,11 +80,9 @@ export class TabsTitleControl extends TitleControl { @IMessageService messageService: IMessageService, @IMenuService menuService: IMenuService, @IQuickOpenService quickOpenService: IQuickOpenService, - @IWindowService private windowService: IWindowService, - @IWindowsService private windowsService: IWindowsService, @IThemeService themeService: IThemeService, - @IFileService private fileService: IFileService, - @IWorkspacesService private workspacesService: IWorkspacesService + @ITextFileService private textFileService: ITextFileService, + @IBackupFileService private backupFileService: IBackupFileService ) { super(contextMenuService, instantiationService, editorService, editorGroupService, contextKeyService, keybindingService, telemetryService, messageService, menuService, quickOpenService, themeService); @@ -763,12 +763,22 @@ export class TabsTitleControl extends TitleControl { const resource = toResource(editor, { supportSideBySide: true }); if (resource) { const resourceStr = resource.toString(); - e.dataTransfer.setData('URL', resourceStr); // enables cross window DND of tabs - e.dataTransfer.setData('text/plain', getPathLabel(resource)); // enables dropping tab resource path into text controls + + e.dataTransfer.setData(DataTransfers.TEXT, getPathLabel(resource)); // enables dropping tab resource path into text controls if (resource.scheme === 'file') { - e.dataTransfer.setData('DownloadURL', [MIME_BINARY, editor.getName(), resourceStr].join(':')); // enables support to drag a tab as file to desktop + e.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, editor.getName(), resourceStr].join(':')); // enables support to drag a tab as file to desktop } + + // Prepare IDraggedEditor transfer + const activeEditor = this.editorService.getActiveEditor(); + const draggedEditor: ISerializedDraggedEditor = { + resource: resourceStr, + backupResource: this.textFileService.isDirty(resource) ? this.backupFileService.toBackupResource(resource).toString() : void 0, + viewState: activeEditor instanceof BaseTextEditor ? activeEditor.getControl().saveViewState() : void 0 + }; + + e.dataTransfer.setData(CodeDataTransfers.EDITOR, JSON.stringify(draggedEditor)); // enables cross window DND of tabs into the editor area } // Fixes https://github.com/Microsoft/vscode/issues/18733 @@ -872,37 +882,8 @@ export class TabsTitleControl extends TitleControl { // External DND else { - this.handleExternalDrop(e, targetPosition, targetIndex); - } - } - - private handleExternalDrop(e: DragEvent, targetPosition: Position, targetIndex: number): void { - const droppedResources = extractResources(e).filter(r => r.resource.scheme === 'file' || r.resource.scheme === 'untitled'); - if (droppedResources.length) { - DOM.EventHelper.stop(e, true); - - handleWorkspaceExternalDrop(droppedResources, this.fileService, this.messageService, this.windowsService, this.windowService, this.workspacesService).then(handled => { - if (handled) { - return; - } - - // Add external ones to recently open list - const externalResources = droppedResources.filter(d => d.isExternal).map(d => d.resource); - if (externalResources.length) { - this.windowsService.addRecentlyOpened(externalResources.map(resource => resource.fsPath)); - } - - // Open in Editor - this.windowService.focusWindow() - .then(() => this.editorService.openEditors(droppedResources.map(d => { - return { - input: { resource: d.resource, options: { pinned: true, index: targetIndex } }, - position: targetPosition - }; - }))).then(() => { - this.editorGroupService.focusGroup(targetPosition); - }).done(null, errors.onUnexpectedError); - }); + const dropHandler = this.instantiationService.createInstance(EditorAreaDropHandler); + dropHandler.handleDrop(e, () => this.editorGroupService.focusGroup(targetPosition), targetPosition, targetIndex); } } diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index 83aed1cf0b3..fbc40c16124 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -37,12 +37,6 @@ import { IMenuService, MenuId, IMenu, ExecuteCommandAction } from 'vs/platform/a import { ResourceContextKey } from 'vs/workbench/common/resources'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Themable } from 'vs/workbench/common/theme'; -import { IDraggedResource } from 'vs/workbench/browser/editor'; -import { WORKSPACE_EXTENSION, IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; -import { extname } from 'vs/base/common/paths'; -import { IFileService } from 'vs/platform/files/common/files'; -import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; -import URI from 'vs/base/common/uri'; import { isDiffEditor, isCodeEditor } from 'vs/editor/browser/editorBrowser'; import { Dimension } from 'vs/base/browser/builder'; @@ -500,74 +494,3 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl this.editorActionsToolbar.dispose(); } } - -/** - * Shared function across some editor components to handle drag & drop of folders and workspace files - * to open them in the window instead of the editor. - */ -export function handleWorkspaceExternalDrop( - resources: IDraggedResource[], - fileService: IFileService, - messageService: IMessageService, - windowsService: IWindowsService, - windowService: IWindowService, - workspacesService: IWorkspacesService -): TPromise { - - // Return early if there are no external resources - const externalResources = resources.filter(d => d.isExternal).map(d => d.resource); - if (!externalResources.length) { - return TPromise.as(false); - } - - const externalWorkspaceResources: { workspaces: URI[], folders: URI[] } = { - workspaces: [], - folders: [] - }; - - return TPromise.join(externalResources.map(resource => { - - // Check for Workspace - if (extname(resource.fsPath) === `.${WORKSPACE_EXTENSION}`) { - externalWorkspaceResources.workspaces.push(resource); - - return void 0; - } - - // Check for Folder - return fileService.resolveFile(resource).then(stat => { - if (stat.isDirectory) { - externalWorkspaceResources.folders.push(stat.resource); - } - }, error => void 0); - })).then(_ => { - const { workspaces, folders } = externalWorkspaceResources; - - // Return early if no external resource is a folder or workspace - if (workspaces.length === 0 && folders.length === 0) { - return false; - } - - // Pass focus to window - windowService.focusWindow(); - - let workspacesToOpen: TPromise; - - // Open in separate windows if we drop workspaces or just one folder - if (workspaces.length > 0 || folders.length === 1) { - workspacesToOpen = TPromise.as([...workspaces, ...folders].map(resources => resources.fsPath)); - } - - // Multiple folders: Create new workspace with folders and open - else if (folders.length > 1) { - workspacesToOpen = workspacesService.createWorkspace(folders.map(folder => ({ uri: folder }))).then(workspace => [workspace.configPath]); - } - - // Open - workspacesToOpen.then(workspaces => { - windowsService.openWindow(workspaces, { forceReuseWindow: true }); - }); - - return true; - }); -} diff --git a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts index d41113e034d..242683e3f09 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts @@ -56,6 +56,7 @@ import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common import { getPathLabel } from 'vs/base/common/labels'; import { extractResources } from 'vs/workbench/browser/editor'; import { relative } from 'path'; +import { DataTransfers } from 'vs/base/browser/dnd'; export class FileDataSource implements IDataSource { constructor( @@ -793,10 +794,10 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { // Apply some datatransfer types to allow for dragging the element outside of the application if (source) { if (!source.isDirectory) { - originalEvent.dataTransfer.setData('DownloadURL', [MIME_BINARY, source.name, source.resource.toString()].join(':')); + originalEvent.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, source.name, source.resource.toString()].join(':')); } - originalEvent.dataTransfer.setData('text/plain', getPathLabel(source.resource)); + originalEvent.dataTransfer.setData(DataTransfers.TEXT, getPathLabel(source.resource)); } } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 2dd16ba5775..626397cd57b 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -26,6 +26,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; import { PANEL_BACKGROUND } from 'vs/workbench/common/theme'; import { TERMINAL_BACKGROUND_COLOR } from 'vs/workbench/parts/terminal/electron-browser/terminalColorRegistry'; +import { DataTransfers } from 'vs/base/browser/dnd'; export class TerminalPanel extends Panel { @@ -256,7 +257,7 @@ export class TerminalPanel extends Panel { } // Check if the file was dragged from the tree explorer - let uri = e.dataTransfer.getData('URL'); + let uri = e.dataTransfer.getData(DataTransfers.URL); if (uri) { uri = URI.parse(uri).path; } else if (e.dataTransfer.files.length > 0) { diff --git a/src/vs/workbench/services/backup/common/backup.ts b/src/vs/workbench/services/backup/common/backup.ts index c43688b8b48..25c3948dced 100644 --- a/src/vs/workbench/services/backup/common/backup.ts +++ b/src/vs/workbench/services/backup/common/backup.ts @@ -40,6 +40,14 @@ export interface IBackupFileService { */ loadBackupResource(resource: Uri): TPromise; + /** + * Given a resource, returns the associated backup resource. + * + * @param resource The resource to get the backup resource for. + * @return The backup resource. + */ + toBackupResource(resource: Uri): Uri; + /** * Backs up a resource. * diff --git a/src/vs/workbench/services/backup/node/backupFileService.ts b/src/vs/workbench/services/backup/node/backupFileService.ts index af5ca6bda2b..1a00d797b91 100644 --- a/src/vs/workbench/services/backup/node/backupFileService.ts +++ b/src/vs/workbench/services/backup/node/backupFileService.ts @@ -135,7 +135,7 @@ export class BackupFileService implements IBackupFileService { public loadBackupResource(resource: Uri): TPromise { return this.ready.then(model => { - const backupResource = this.getBackupResource(resource); + const backupResource = this.toBackupResource(resource); if (!backupResource) { return void 0; } @@ -155,7 +155,7 @@ export class BackupFileService implements IBackupFileService { } return this.ready.then(model => { - const backupResource = this.getBackupResource(resource); + const backupResource = this.toBackupResource(resource); if (!backupResource) { return void 0; } @@ -175,7 +175,7 @@ export class BackupFileService implements IBackupFileService { public discardResourceBackup(resource: Uri): TPromise { return this.ready.then(model => { - const backupResource = this.getBackupResource(resource); + const backupResource = this.toBackupResource(resource); if (!backupResource) { return void 0; } @@ -218,7 +218,7 @@ export class BackupFileService implements IBackupFileService { return textSource.lines.slice(1).join(textSource.EOL); // The first line of a backup text file is the file name } - protected getBackupResource(resource: Uri): Uri { + public toBackupResource(resource: Uri): Uri { if (!this.backupEnabled) { return null; } diff --git a/src/vs/workbench/services/backup/test/node/backupFileService.test.ts b/src/vs/workbench/services/backup/test/node/backupFileService.test.ts index 5309017f4ea..66be679cdde 100644 --- a/src/vs/workbench/services/backup/test/node/backupFileService.test.ts +++ b/src/vs/workbench/services/backup/test/node/backupFileService.test.ts @@ -41,8 +41,8 @@ class TestBackupFileService extends BackupFileService { super(workspaceBackupPath, fileService); } - public getBackupResource(resource: Uri): Uri { - return super.getBackupResource(resource); + public toBackupResource(resource: Uri): Uri { + return super.toBackupResource(resource); } } @@ -73,7 +73,7 @@ suite('BackupFileService', () => { const workspaceHash = crypto.createHash('md5').update(workspaceResource.fsPath).digest('hex'); const filePathHash = crypto.createHash('md5').update(backupResource.fsPath).digest('hex'); const expectedPath = Uri.file(path.join(backupHome, workspaceHash, 'file', filePathHash)).fsPath; - assert.equal(service.getBackupResource(backupResource).fsPath, expectedPath); + assert.equal(service.toBackupResource(backupResource).fsPath, expectedPath); }); test('should get the correct backup path for untitled files', () => { @@ -82,7 +82,7 @@ suite('BackupFileService', () => { const workspaceHash = crypto.createHash('md5').update(workspaceResource.fsPath).digest('hex'); const filePathHash = crypto.createHash('md5').update(backupResource.fsPath).digest('hex'); const expectedPath = Uri.file(path.join(backupHome, workspaceHash, 'untitled', filePathHash)).fsPath; - assert.equal(service.getBackupResource(backupResource).fsPath, expectedPath); + assert.equal(service.toBackupResource(backupResource).fsPath, expectedPath); }); }); diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index e243bc645dc..2d36b27c3b0 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -831,7 +831,7 @@ export class TestBackupFileService implements IBackupFileService { public loadBackupResource(resource: URI): TPromise { return this.hasBackup(resource).then(hasBackup => { if (hasBackup) { - return this.getBackupResource(resource); + return this.toBackupResource(resource); } return void 0; @@ -846,7 +846,7 @@ export class TestBackupFileService implements IBackupFileService { return TPromise.as(void 0); } - public getBackupResource(resource: URI): URI { + public toBackupResource(resource: URI): URI { return null; } From d1f35e8a6eeec44d6e0d39b5ba940af32ac40386 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 13:06:37 +0100 Subject: [PATCH 059/615] add monaco-compile to travis and appveyor --- .travis.yml | 1 + appveyor.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index cdf6766096d..c059d86c9f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,6 +53,7 @@ install: script: - node_modules/.bin/gulp hygiene - node_modules/.bin/gulp electron --silent + - node_modules/.bin/tsc -p ./src/tsconfig.monaco.json - node_modules/.bin/gulp compile --silent --max_old_space_size=4096 - node_modules/.bin/gulp optimize-vscode --silent --max_old_space_size=4096 - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/test.sh --coverage --reporter dot; else ./scripts/test.sh --reporter dot; fi diff --git a/appveyor.yml b/appveyor.yml index d9471f2a8f8..3f40be52772 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,6 +11,7 @@ install: build_script: - yarn - .\node_modules\.bin\gulp electron + - .\node_modules\.bin\tsc -p .\src\tsconfig.monaco.json - npm run compile test_script: From 3a1d48425f0fe69996d1ca83d00098b71a34cdc6 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 13:56:59 +0100 Subject: [PATCH 060/615] explicitly set --noEmit --- .travis.yml | 2 +- appveyor.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c059d86c9f1..12d94a22d1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,7 +53,7 @@ install: script: - node_modules/.bin/gulp hygiene - node_modules/.bin/gulp electron --silent - - node_modules/.bin/tsc -p ./src/tsconfig.monaco.json + - node_modules/.bin/tsc -p ./src/tsconfig.monaco.json --noEmit - node_modules/.bin/gulp compile --silent --max_old_space_size=4096 - node_modules/.bin/gulp optimize-vscode --silent --max_old_space_size=4096 - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/test.sh --coverage --reporter dot; else ./scripts/test.sh --reporter dot; fi diff --git a/appveyor.yml b/appveyor.yml index 3f40be52772..3ece36f7a3e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,7 +11,7 @@ install: build_script: - yarn - .\node_modules\.bin\gulp electron - - .\node_modules\.bin\tsc -p .\src\tsconfig.monaco.json + - .\node_modules\.bin\tsc -p .\src\tsconfig.monaco.json --noEmit - npm run compile test_script: From 9faf001bad599aad1cba6806ec3b19f0970dd1d6 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 14:07:36 +0100 Subject: [PATCH 061/615] eng - less TPromise in extHostCommands --- .../api/electron-browser/mainThreadCommands.ts | 2 +- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- src/vs/workbench/api/node/extHostCommands.ts | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadCommands.ts b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts index f0a84773a51..2b21782e38c 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadCommands.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts @@ -33,7 +33,7 @@ export class MainThreadCommands implements MainThreadCommandsShape { this._generateCommandsDocumentationRegistration.dispose(); } - private _generateCommandsDocumentation(): TPromise { + private _generateCommandsDocumentation(): Thenable { return this._proxy.$getContributedCommandHandlerDescriptions().then(result => { // add local commands const commands = CommandsRegistry.getCommands(); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index cb65d9c5c87..729372242e2 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -431,7 +431,7 @@ export interface MainThreadWindowShape extends IDisposable { export interface ExtHostCommandsShape { $executeContributedCommand(id: string, ...args: any[]): Thenable; - $getContributedCommandHandlerDescriptions(): TPromise<{ [id: string]: string | ICommandHandlerDescription }>; + $getContributedCommandHandlerDescriptions(): Thenable<{ [id: string]: string | ICommandHandlerDescription }>; } export interface ExtHostConfigurationShape { diff --git a/src/vs/workbench/api/node/extHostCommands.ts b/src/vs/workbench/api/node/extHostCommands.ts index 860a1e74ea4..0fea03506f5 100644 --- a/src/vs/workbench/api/node/extHostCommands.ts +++ b/src/vs/workbench/api/node/extHostCommands.ts @@ -6,7 +6,6 @@ import { validateConstraint } from 'vs/base/common/types'; import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; -import { TPromise } from 'vs/base/common/winjs.base'; import * as extHostTypes from 'vs/workbench/api/node/extHostTypes'; import * as extHostTypeConverter from 'vs/workbench/api/node/extHostTypeConverters'; import { cloneAndChange } from 'vs/base/common/objects'; @@ -106,7 +105,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { $executeContributedCommand(id: string, ...args: any[]): Thenable { let command = this._commands.get(id); if (!command) { - return TPromise.wrapError(new Error(`Contributed command '${id}' does not exist.`)); + return Promise.reject(new Error(`Contributed command '${id}' does not exist.`)); } let { callback, thisArg, description } = command; @@ -116,7 +115,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { try { validateConstraint(args[i], description.args[i].constraint); } catch (err) { - return TPromise.wrapError(new Error(`Running the contributed command:'${id}' failed. Illegal argument '${description.args[i].name}' - ${description.args[i].description}`)); + return Promise.reject(new Error(`Running the contributed command:'${id}' failed. Illegal argument '${description.args[i].name}' - ${description.args[i].description}`)); } } } @@ -125,7 +124,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { try { let result = callback.apply(thisArg, args); - return TPromise.as(result); + return Promise.resolve(result); } catch (err) { // console.log(err); // try { @@ -133,7 +132,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { // } catch (err) { // // // } - return TPromise.wrapError(new Error(`Running the contributed command:'${id}' failed.`)); + return Promise.reject(new Error(`Running the contributed command:'${id}' failed.`)); } } @@ -148,7 +147,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { }); } - $getContributedCommandHandlerDescriptions(): TPromise<{ [id: string]: string | ICommandHandlerDescription }> { + $getContributedCommandHandlerDescriptions(): Thenable<{ [id: string]: string | ICommandHandlerDescription }> { const result: { [id: string]: string | ICommandHandlerDescription } = Object.create(null); this._commands.forEach((command, id) => { let { description } = command; @@ -156,7 +155,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { result[id] = description; } }); - return TPromise.as(result); + return Promise.resolve(result); } } From 15f8dacc7da228d567bc725943215d7a967dc81e Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 11 Dec 2017 14:21:52 +0100 Subject: [PATCH 062/615] dnd - make sure to stop bubble --- src/vs/workbench/browser/parts/editor/tabsTitleControl.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 5b3f369e3d6..a80ab21c3f0 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -859,13 +859,14 @@ export class TabsTitleControl extends TitleControl { } private onDrop(e: DragEvent, group: IEditorGroup, targetPosition: Position, targetIndex: number): void { + DOM.EventHelper.stop(e, true); + this.updateDropFeedback(this.tabsContainer, false); DOM.removeClass(this.tabsContainer, 'scroll'); // Local DND const draggedEditor = TabsTitleControl.getDraggedEditor(); if (draggedEditor) { - DOM.EventHelper.stop(e, true); // Move editor to target position and index if (this.isMoveOperation(e, draggedEditor.group, group)) { From f7436faf675837e9500137e5073491fd30b74918 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 11 Dec 2017 14:29:29 +0100 Subject: [PATCH 063/615] open editors: keep focus when dragging editors across groups --- .../parts/files/electron-browser/views/openEditorsView.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index b9fb56c5d8b..f90f41ef588 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -449,7 +449,8 @@ class EditorGroupRenderer implements IRenderer { From d221a2825c3e5edf9cea7e6c30118748ad4fbeef Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 14:29:54 +0100 Subject: [PATCH 064/615] eng - less TPromise (mainThreadMessageService) --- .../workbench/api/electron-browser/mainThreadMessageService.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadMessageService.ts b/src/vs/workbench/api/electron-browser/mainThreadMessageService.ts index 090834e9b6a..c62b072f539 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadMessageService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadMessageService.ts @@ -8,7 +8,6 @@ import nls = require('vs/nls'); import { IMessageService, IChoiceService } from 'vs/platform/message/common/message'; import Severity from 'vs/base/common/severity'; import { Action } from 'vs/base/common/actions'; -import { TPromise as Promise } from 'vs/base/common/winjs.base'; import { MainThreadMessageServiceShape, MainContext, IExtHostContext, MainThreadMessageOptions } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; From 5e840a6de2ca82e965b2fe00849223b867e20e58 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 14:31:46 +0100 Subject: [PATCH 065/615] eng - no TPromise in save participants --- src/vs/base/common/async.ts | 9 +++--- .../mainThreadSaveParticipant.ts | 15 +++++----- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- .../node/extHostDocumentSaveParticipant.ts | 28 +++++++++++-------- .../extHostDocumentSaveParticipant.test.ts | 17 +++++------ 5 files changed, 37 insertions(+), 34 deletions(-) diff --git a/src/vs/base/common/async.ts b/src/vs/base/common/async.ts index 9eff176c713..90e4c4ffdd6 100644 --- a/src/vs/base/common/async.ts +++ b/src/vs/base/common/async.ts @@ -349,13 +349,14 @@ export function always(promise: TPromise, f: Function): TPromise { * Runs the provided list of promise factories in sequential order. The returned * promise will complete to an array of results from each promise. */ -export function sequence(promiseFactories: ITask>[]): TPromise { + +export function sequence(promiseFactories: ITask>[]): TPromise { const results: T[] = []; // reverse since we start with last element using pop() promiseFactories = promiseFactories.reverse(); - function next(): Promise { + function next(): Thenable { if (promiseFactories.length) { return promiseFactories.pop()(); } @@ -363,7 +364,7 @@ export function sequence(promiseFactories: ITask>[]): TPromise { if (result !== undefined && result !== null) { results.push(result); } @@ -692,4 +693,4 @@ export class ThrottledEmitter extends Emitter { this.hasLastEvent = false; this.lastEvent = void 0; } -} \ No newline at end of file +} diff --git a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts index 5c6e9b6f321..90ee7c35ba9 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts @@ -5,7 +5,6 @@ 'use strict'; -import { TPromise } from 'vs/base/common/winjs.base'; import { sequence } from 'vs/base/common/async'; import * as strings from 'vs/base/common/strings'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; @@ -175,7 +174,7 @@ class FormatOnSaveParticipant implements ISaveParticipant { // Nothing } - participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise { + participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): Promise { const model = editorModel.textEditorModel; if (env.reason === SaveReason.AUTO @@ -186,7 +185,7 @@ class FormatOnSaveParticipant implements ISaveParticipant { const versionNow = model.getVersionId(); const { tabSize, insertSpaces } = model.getOptions(); - return new TPromise((resolve, reject) => { + return new Promise((resolve, reject) => { setTimeout(reject, 750); getDocumentFormattingEdits(model, { tabSize, insertSpaces }) .then(edits => this._editorWorkerService.computeMoreMinimalEdits(model.uri, edits)) @@ -241,13 +240,13 @@ class ExtHostSaveParticipant implements ISaveParticipant { this._proxy = extHostContext.get(ExtHostContext.ExtHostDocumentSaveParticipant); } - participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise { - return new TPromise((resolve, reject) => { + participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): Promise { + return new Promise((resolve, reject) => { setTimeout(reject, 1750); this._proxy.$participateInSave(editorModel.getResource(), env.reason).then(values => { for (const success of values) { if (!success) { - return TPromise.wrapError(new Error('listener failed')); + return Promise.reject(new Error('listener failed')); } } return undefined; @@ -286,9 +285,9 @@ export class SaveParticipant implements ISaveParticipant { TextFileEditorModel.setSaveParticipant(undefined); } - participate(model: ITextFileEditorModel, env: { reason: SaveReason }): TPromise { + participate(model: ITextFileEditorModel, env: { reason: SaveReason }): Thenable { const promiseFactory = this._saveParticipants.map(p => () => { - return TPromise.as(p.participate(model, env)); + return Promise.resolve(p.participate(model, env)); }); return sequence(promiseFactory).then(() => { }); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 729372242e2..9dbf881de70 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -462,7 +462,7 @@ export interface ExtHostDocumentsShape { } export interface ExtHostDocumentSaveParticipantShape { - $participateInSave(resource: URI, reason: SaveReason): TPromise; + $participateInSave(resource: URI, reason: SaveReason): Thenable; } export interface ITextEditorAddData { diff --git a/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts b/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts index 607c8c27b4d..479ac970cd4 100644 --- a/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts +++ b/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts @@ -8,7 +8,6 @@ import Event from 'vs/base/common/event'; import URI from 'vs/base/common/uri'; import { sequence, always } from 'vs/base/common/async'; import { illegalState } from 'vs/base/common/errors'; -import { TPromise } from 'vs/base/common/winjs.base'; import { ExtHostDocumentSaveParticipantShape, MainThreadEditorsShape, IWorkspaceResourceEdit } from 'vs/workbench/api/node/extHost.protocol'; import { TextEdit } from 'vs/workbench/api/node/extHostTypes'; import { fromRange, TextDocumentSaveReason, EndOfLine } from 'vs/workbench/api/node/extHostTypeConverters'; @@ -46,7 +45,7 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic }; } - $participateInSave(resource: URI, reason: SaveReason): TPromise { + $participateInSave(resource: URI, reason: SaveReason): Thenable { const entries = this._callbacks.toArray(); let didTimeout = false; @@ -68,11 +67,11 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic return always(promise, () => clearTimeout(didTimeoutHandle)); } - private _deliverEventAsyncAndBlameBadListeners(listener: Function, thisArg: any, stubEvent: vscode.TextDocumentWillSaveEvent): TPromise { + private _deliverEventAsyncAndBlameBadListeners(listener: Function, thisArg: any, stubEvent: vscode.TextDocumentWillSaveEvent): Promise { const errors = this._badListeners.get(listener); if (errors > this._thresholds.errors) { // bad listener - ignore - return TPromise.wrap(false); + return Promise.resolve(false); } return this._deliverEventAsync(listener, thisArg, stubEvent).then(() => { @@ -93,9 +92,9 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic }); } - private _deliverEventAsync(listener: Function, thisArg: any, stubEvent: vscode.TextDocumentWillSaveEvent): TPromise { + private _deliverEventAsync(listener: Function, thisArg: any, stubEvent: vscode.TextDocumentWillSaveEvent): Promise { - const promises: TPromise[] = []; + const promises: Promise[] = []; const { document, reason } = stubEvent; const { version } = document; @@ -107,7 +106,7 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic if (Object.isFrozen(promises)) { throw illegalState('waitUntil can not be called async'); } - promises.push(TPromise.wrap(p)); + promises.push(Promise.resolve(p)); } }); @@ -115,16 +114,23 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic // fire event listener.apply(thisArg, [event]); } catch (err) { - return TPromise.wrapError(err); + return Promise.reject(err); } // freeze promises after event call Object.freeze(promises); - return new TPromise((resolve, reject) => { + return new Promise((resolve, reject) => { // join on all listener promises, reject after timeout const handle = setTimeout(() => reject(new Error('timeout')), this._thresholds.timeout); - return always(TPromise.join(promises), () => clearTimeout(handle)).then(resolve, reject); + + return Promise.all(promises).then(edits => { + clearTimeout(handle); + resolve(edits); + }).catch(err => { + clearTimeout(handle); + reject(err); + }); }).then(values => { @@ -156,7 +162,7 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic } // TODO@joh bubble this to listener? - return TPromise.wrapError(new Error('concurrent_edits')); + return Promise.reject(new Error('concurrent_edits')); }); } } diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts index 06167349726..d937c8af433 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts @@ -128,7 +128,7 @@ suite('ExtHostDocumentSaveParticipant', () => { }); }); - test('event delivery, ignore bad listeners', () => { + test('event delivery, ignore bad listeners', async () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors, { timeout: 5, errors: 1 }); let callCount = 0; @@ -137,16 +137,13 @@ suite('ExtHostDocumentSaveParticipant', () => { throw new Error('boom'); }); - return TPromise.join([ - participant.$participateInSave(resource, SaveReason.EXPLICIT), - participant.$participateInSave(resource, SaveReason.EXPLICIT), - participant.$participateInSave(resource, SaveReason.EXPLICIT), - participant.$participateInSave(resource, SaveReason.EXPLICIT) + await participant.$participateInSave(resource, SaveReason.EXPLICIT); + await participant.$participateInSave(resource, SaveReason.EXPLICIT); + await participant.$participateInSave(resource, SaveReason.EXPLICIT); + await participant.$participateInSave(resource, SaveReason.EXPLICIT); - ]).then(values => { - sub.dispose(); - assert.equal(callCount, 2); - }); + sub.dispose(); + assert.equal(callCount, 2); }); test('event delivery, overall timeout', () => { From 491f0d7b80a956af629d868654b9af83fb67448b Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 11 Dec 2017 14:37:28 +0100 Subject: [PATCH 066/615] fixes #40022 --- src/vs/workbench/parts/debug/browser/debugViewlet.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugViewlet.ts b/src/vs/workbench/parts/debug/browser/debugViewlet.ts index cdd88383ed6..6107937695a 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewlet.ts @@ -59,7 +59,6 @@ export class DebugViewlet extends PersistentViewsViewlet { const el = parent.getHTMLElement(); DOM.addClass(el, 'debug-viewlet'); - this.updateBreakpointsMaxSize(); } public focus(): void { @@ -116,6 +115,7 @@ export class DebugViewlet extends PersistentViewsViewlet { // attach event listener to if (panel.id === BREAKPOINTS_VIEW_ID) { this.breakpointView = panel; + this.updateBreakpointsMaxSize(); } else { this.panelListeners.set(panel.id, panel.onDidChange(() => this.updateBreakpointsMaxSize())); } @@ -128,9 +128,11 @@ export class DebugViewlet extends PersistentViewsViewlet { } private updateBreakpointsMaxSize(): void { - // We need to update the breakpoints view since all other views are collapsed #25384 - const allOtherCollapsed = this.views.every(view => !view.isExpanded() || view === this.breakpointView); - this.breakpointView.maximumBodySize = allOtherCollapsed ? Number.POSITIVE_INFINITY : this.breakpointView.minimumBodySize; + if (this.breakpointView) { + // We need to update the breakpoints view since all other views are collapsed #25384 + const allOtherCollapsed = this.views.every(view => !view.isExpanded() || view === this.breakpointView); + this.breakpointView.maximumBodySize = allOtherCollapsed ? Number.POSITIVE_INFINITY : this.breakpointView.minimumBodySize; + } } } From bfe83a84d1122b91315301d8b38a19aaf04a9523 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 14:41:29 +0100 Subject: [PATCH 067/615] eng - less TPromise --- src/vs/base/browser/htmlContentRenderer.ts | 12 ++++++------ .../workbench/api/node/extHostExtensionService.ts | 15 +++------------ 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/vs/base/browser/htmlContentRenderer.ts b/src/vs/base/browser/htmlContentRenderer.ts index 1a0097aadf8..d9cc2348e9c 100644 --- a/src/vs/base/browser/htmlContentRenderer.ts +++ b/src/vs/base/browser/htmlContentRenderer.ts @@ -8,16 +8,16 @@ import * as DOM from 'vs/base/browser/dom'; import { defaultGenerator } from 'vs/base/common/idGenerator'; import { escape } from 'vs/base/common/strings'; -import { TPromise } from 'vs/base/common/winjs.base'; import { removeMarkdownEscapes, IMarkdownString } from 'vs/base/common/htmlContent'; import { marked } from 'vs/base/common/marked/marked'; import { IMouseEvent } from 'vs/base/browser/mouseEvent'; +import { isThenable } from 'vs/base/common/async'; export interface RenderOptions { className?: string; inline?: boolean; actionCallback?: (content: string, event?: IMouseEvent) => void; - codeBlockRenderer?: (modeId: string, value: string) => string | TPromise; + codeBlockRenderer?: (modeId: string, value: string) => string | Thenable; } function createElement(options: RenderOptions): HTMLElement { @@ -53,7 +53,7 @@ export function renderMarkdown(markdown: IMarkdownString, options: RenderOptions // signal to code-block render that the // element has been created let signalInnerHTML: Function; - const withInnerHTML = new TPromise(c => signalInnerHTML = c); + const withInnerHTML = new Promise(c => signalInnerHTML = c); const renderer = new marked.Renderer(); renderer.image = (href: string, title: string, text: string) => { @@ -122,17 +122,17 @@ export function renderMarkdown(markdown: IMarkdownString, options: RenderOptions return value; } - if (TPromise.is(value)) { + if (isThenable(value)) { // when code-block rendering is async we return sync // but update the node with the real result later. const id = defaultGenerator.nextId(); - TPromise.join([value, withInnerHTML]).done(values => { + Promise.all([value, withInnerHTML]).then(values => { const strValue = values[0] as string; const span = element.querySelector(`div[data-code="${id}"]`); if (span) { span.innerHTML = strValue; } - }, err => { + }).catch(err => { // ignore }); return `
${escape(code)}
`; diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 6d15e7a8675..71a56b06be4 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -6,7 +6,7 @@ import { dispose } from 'vs/base/common/lifecycle'; import { join } from 'path'; -import { mkdirp, dirExists } from 'vs/base/node/pfs'; +import { mkdirp, dirExists, realpath } from 'vs/base/node/pfs'; import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/node/extensionDescriptionRegistry'; @@ -18,7 +18,6 @@ import { IExtensionMemento, ExtensionsActivator, ActivatedExtension, IExtensionA import { ExtHostThreadService } from 'vs/workbench/services/thread/node/extHostThreadService'; import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration'; import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; -import { realpath } from 'fs'; import { TernarySearchTree } from 'vs/base/common/map'; import { Barrier } from 'vs/base/common/async'; import { ILogService } from 'vs/platform/log/common/log'; @@ -222,16 +221,8 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { if (!ext.main) { return undefined; } - return new TPromise((resolve, reject) => { - realpath(ext.extensionFolderPath, (err, path) => { - if (err) { - reject(err); - } else { - tree.set(path, ext); - resolve(void 0); - } - }); - }); + return realpath(ext.extensionFolderPath).then(value => tree.set(value, ext)); + }); this._extensionPathIndex = TPromise.join(extensions).then(() => tree); } From 73ebe0df86cb3f8a39c1d4dc7fd230998c5f42c9 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 14:43:30 +0100 Subject: [PATCH 068/615] eng - use Thenable in progress service --- src/vs/platform/progress/common/progress.ts | 2 +- src/vs/workbench/api/electron-browser/mainThreadProgress.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/platform/progress/common/progress.ts b/src/vs/platform/progress/common/progress.ts index cd966c7e193..358d61cabb9 100644 --- a/src/vs/platform/progress/common/progress.ts +++ b/src/vs/platform/progress/common/progress.ts @@ -78,5 +78,5 @@ export interface IProgressService2 { _serviceBrand: any; - withProgress(options: IProgressOptions, task: (progress: IProgress) => TPromise): void; + withProgress(options: IProgressOptions, task: (progress: IProgress) => Thenable): void; } diff --git a/src/vs/workbench/api/electron-browser/mainThreadProgress.ts b/src/vs/workbench/api/electron-browser/mainThreadProgress.ts index 5ddce6f738b..4b0f1c69aca 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadProgress.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadProgress.ts @@ -5,7 +5,6 @@ 'use strict'; import { IProgressService2, IProgress, IProgressOptions, IProgressStep } from 'vs/platform/progress/common/progress'; -import { TPromise } from 'vs/base/common/winjs.base'; import { MainThreadProgressShape, MainContext, IExtHostContext } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; @@ -47,7 +46,7 @@ export class MainThreadProgress implements MainThreadProgressShape { private _createTask(handle: number) { return (progress: IProgress) => { - return new TPromise(resolve => { + return new Promise(resolve => { this._progress.set(handle, { resolve, progress }); }); }; From 7db472bacf5250f3daff84414d2bfcd2f61aef0c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 14:44:00 +0100 Subject: [PATCH 069/615] eng - don't use TPromise in dialogs api --- .../api/electron-browser/mainThreadDialogs.ts | 13 ++++++------- src/vs/workbench/api/node/extHost.protocol.ts | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts b/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts index 6a4e7b7c164..dfc8714ca3b 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { TPromise } from 'vs/base/common/winjs.base'; import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import { MainThreadDiaglogsShape, MainContext, IExtHostContext, MainThreadDialogOpenOptions, MainThreadDialogSaveOptions } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; @@ -25,12 +24,12 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape { // } - $showOpenDialog(options: MainThreadDialogOpenOptions): TPromise { + $showOpenDialog(options: MainThreadDialogOpenOptions): Promise { // TODO@joh what about remote dev setup? if (options.defaultUri && options.defaultUri.scheme !== 'file') { - return TPromise.wrapError(new Error('Not supported - Open-dialogs can only be opened on `file`-uris.')); + return Promise.reject(new Error('Not supported - Open-dialogs can only be opened on `file`-uris.')); } - return new TPromise(resolve => { + return new Promise(resolve => { const filenames = this._windowService.showOpenDialog( MainThreadDialogs._convertOpenOptions(options) ); @@ -39,12 +38,12 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape { }); } - $showSaveDialog(options: MainThreadDialogSaveOptions): TPromise { + $showSaveDialog(options: MainThreadDialogSaveOptions): Promise { // TODO@joh what about remote dev setup? if (options.defaultUri && options.defaultUri.scheme !== 'file') { - return TPromise.wrapError(new Error('Not supported - Save-dialogs can only be opened on `file`-uris.')); + return Promise.reject(new Error('Not supported - Save-dialogs can only be opened on `file`-uris.')); } - return new TPromise(resolve => { + return new Promise(resolve => { const filename = this._windowService.showSaveDialog( MainThreadDialogs._convertSaveOptions(options) ); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 9dbf881de70..111a4643be8 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -144,8 +144,8 @@ export interface MainThreadDialogSaveOptions { } export interface MainThreadDiaglogsShape extends IDisposable { - $showOpenDialog(options: MainThreadDialogOpenOptions): TPromise; - $showSaveDialog(options: MainThreadDialogSaveOptions): TPromise; + $showOpenDialog(options: MainThreadDialogOpenOptions): Thenable; + $showSaveDialog(options: MainThreadDialogSaveOptions): Thenable; } export interface MainThreadDecorationsShape extends IDisposable { From 9451b7848c4a3fe21428e498565cf8b5039b2019 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 14:56:19 +0100 Subject: [PATCH 070/615] fix #38772 --- src/vs/editor/contrib/snippet/snippetSession.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/editor/contrib/snippet/snippetSession.ts b/src/vs/editor/contrib/snippet/snippetSession.ts index a588b76930d..0764236fae9 100644 --- a/src/vs/editor/contrib/snippet/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/snippetSession.ts @@ -386,11 +386,13 @@ export class SnippetSession { next(): void { const newSelections = this._move(true); this._editor.setSelections(newSelections); + this._editor.revealPositionInCenterIfOutsideViewport(newSelections[0].getPosition()); } prev(): void { const newSelections = this._move(false); this._editor.setSelections(newSelections); + this._editor.revealPositionInCenterIfOutsideViewport(newSelections[0].getPosition()); } private _move(fwd: boolean | undefined): Selection[] { From 8b662b72bb07a22676273a98c1ecb453141e91cc Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 11 Dec 2017 14:58:23 +0100 Subject: [PATCH 071/615] fixes #40014 --- src/vs/workbench/parts/files/common/files.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/files/common/files.ts b/src/vs/workbench/parts/files/common/files.ts index ba9c28aa478..b817c709192 100644 --- a/src/vs/workbench/parts/files/common/files.ts +++ b/src/vs/workbench/parts/files/common/files.ts @@ -20,6 +20,7 @@ import { IModelService } from 'vs/editor/common/services/modelService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IViewlet } from 'vs/workbench/common/viewlet'; +import { InputFocusedContextKey } from 'vs/platform/workbench/common/contextkeys'; /** * Explorer viewlet id. @@ -52,8 +53,8 @@ export const OpenEditorsFocusedContext = new RawContextKey(openEditorsF export const ExplorerFocusedContext = new RawContextKey(explorerViewletFocusId, true); export const OpenEditorsVisibleCondition = ContextKeyExpr.has(openEditorsVisibleId); -export const FilesExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(filesExplorerFocusId)); -export const ExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(explorerViewletFocusId)); +export const FilesExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(filesExplorerFocusId), ContextKeyExpr.not(InputFocusedContextKey)); +export const ExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(explorerViewletFocusId), ContextKeyExpr.not(InputFocusedContextKey)); /** * File editor input id. From 0426920441b0f7b889486897f61c498b0c6f818f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 15:04:51 +0100 Subject: [PATCH 072/615] fix #35098 --- src/vs/vscode.proposed.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index cc732a7adfa..566fc38c017 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -86,9 +86,9 @@ declare module 'vscode' { // todo@joh discover files etc export interface FileSystemProvider { - onDidChange?: Event; + readonly onDidChange?: Event; - root: Uri; + readonly root: Uri; // more... // From 55b132de0995c19a3257b00a8c7cfbe884370386 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 11 Dec 2017 15:16:08 +0100 Subject: [PATCH 073/615] Open editors view: render drag image same as in tree fixes #40012 --- .../files/electron-browser/views/openEditorsView.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index f90f41ef588..8d23f75ad38 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -500,7 +500,16 @@ class OpenEditorRenderer implements IRenderer { + editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_START, (e: DragEvent) => { + + const dragImage = document.createElement('div'); + e.dataTransfer.effectAllowed = 'copyMove'; + dragImage.className = 'monaco-tree-drag-image'; + dragImage.textContent = editorTemplate.openEditor.editorInput.getName(); + document.body.appendChild(dragImage); + e.dataTransfer.setDragImage(dragImage, -10, -10); + setTimeout(() => document.body.removeChild(dragImage), 0); + OpenEditorRenderer.DRAGGED_OPEN_EDITOR = editorTemplate.openEditor; })); editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_OVER, () => { From 4a99ffbb1f4203a757f4cf925c2c2b0a96a2804a Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 15:41:54 +0100 Subject: [PATCH 074/615] fix promise issue --- .../services/progress/browser/progressService2.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/services/progress/browser/progressService2.ts b/src/vs/workbench/services/progress/browser/progressService2.ts index b6de990d858..2e1c2e4153c 100644 --- a/src/vs/workbench/services/progress/browser/progressService2.ts +++ b/src/vs/workbench/services/progress/browser/progressService2.ts @@ -65,7 +65,7 @@ export class ProgressService2 implements IProgressService2 { // } - withProgress(options: IProgressOptions, task: (progress: IProgress<{ message?: string, percentage?: number }>) => TPromise): void { + withProgress(options: IProgressOptions, task: (progress: IProgress<{ message?: string, percentage?: number }>) => Thenable): void { const { location } = options; switch (location) { case ProgressLocation.Window: @@ -80,7 +80,7 @@ export class ProgressService2 implements IProgressService2 { } - private _withWindowProgress(options: IProgressOptions, callback: (progress: IProgress<{ message?: string, percentage?: number }>) => TPromise): void { + private _withWindowProgress(options: IProgressOptions, callback: (progress: IProgress<{ message?: string, percentage?: number }>) => Thenable): void { const task: [IProgressOptions, Progress] = [options, new Progress(() => this._updateWindowProgress())]; @@ -104,7 +104,7 @@ export class ProgressService2 implements IProgressService2 { }, 150); // cancel delay if promise finishes below 150ms - always(promise, () => clearTimeout(delayHandle)); + always(TPromise.wrap(promise), () => clearTimeout(delayHandle)); } private _updateWindowProgress(idx: number = 0) { @@ -138,14 +138,14 @@ export class ProgressService2 implements IProgressService2 { } } - private _withViewletProgress(viewletId: string, task: (progress: IProgress<{ message?: string, percentage?: number }>) => TPromise): void { + private _withViewletProgress(viewletId: string, task: (progress: IProgress<{ message?: string, percentage?: number }>) => Thenable): void { const promise = task(emptyProgress); // show in viewlet const viewletProgress = this._viewletService.getProgressIndicator(viewletId); if (viewletProgress) { - viewletProgress.showWhile(promise); + viewletProgress.showWhile(TPromise.wrap(promise)); } // show activity bar From 4c72a606ad789ac4fe7a304015e3b71a76858cc6 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 11 Dec 2017 15:45:00 +0100 Subject: [PATCH 075/615] debug: fire on did change breakpoints event when exception breakpoints change fixes #39973 --- src/vs/workbench/parts/debug/common/debugModel.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index c1ecd12ab90..620a46ecbc7 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -852,6 +852,7 @@ export class Model implements IModel { const ebp = this.exceptionBreakpoints.filter(ebp => ebp.filter === d.filter).pop(); return new ExceptionBreakpoint(d.filter, d.label, ebp ? ebp.enabled : d.default); }); + this._onDidChangeBreakpoints.fire(); } } From dc6451db4273df75395564403689fb59d7c86d58 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 11 Dec 2017 15:49:34 +0100 Subject: [PATCH 076/615] Fixes #40024 --- src/vs/workbench/api/node/extHost.api.impl.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 3af68d9fddb..a39cdf3556e 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -127,8 +127,6 @@ export function createApiFactory( return function (extension: IExtensionDescription): typeof vscode { - const EXTENSION_ID = extension.id; - if (!isFalsyOrEmpty(product.extensionAllowedProposedApi) && product.extensionAllowedProposedApi.indexOf(extension.id) >= 0 ) { @@ -395,13 +393,8 @@ export function createApiFactory( }; // namespace: workspace - let warnedRootPath = false; const workspace: typeof vscode.workspace = { get rootPath() { - if (!warnedRootPath) { - warnedRootPath = true; - extensionService.addMessage(EXTENSION_ID, Severity.Warning, 'workspace.rootPath is deprecated'); - } return extHostWorkspace.getPath(); }, set rootPath(value) { From 15965f44c4307ea0691889c14638247663361a07 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 11 Dec 2017 16:18:02 +0100 Subject: [PATCH 077/615] cleanup 'scm.enableDiffDecorations' setting --- .../electron-browser/dirtydiffDecorator.ts | 50 ++++++++++++++----- .../scm/electron-browser/scm.contribution.ts | 6 +-- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index e18ffa437c5..154be590d96 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -1000,30 +1000,59 @@ class DirtyDiffItem { export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution, IModelRegistry { + private enabled = false; private models: IModel[] = []; private items: { [modelId: string]: DirtyDiffItem; } = Object.create(null); + private transientDisposables: IDisposable[] = []; private disposables: IDisposable[] = []; constructor( @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IEditorGroupService editorGroupService: IEditorGroupService, + @IEditorGroupService private editorGroupService: IEditorGroupService, @IInstantiationService private instantiationService: IInstantiationService, @IConfigurationService private configurationService: IConfigurationService ) { - this.disposables.push(editorGroupService.onEditorsChanged(() => this.onEditorsChanged())); + const onDidChangeEnablement = filterEvent(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.enableDiffDecorations')); + onDidChangeEnablement(this.onDidChangeEnablement, this, this.disposables); + this.onDidChangeEnablement(); } - private onEditorsChanged(): void { - // HACK: This is the best current way of figuring out whether to draw these decorations - // or not. Needs context from the editor, to know whether it is a diff editor, in place editor - // etc. + private onDidChangeEnablement(): void { + const enabled = this.configurationService.getValue('scm.enableDiffDecorations'); - const enableDecorators = this.configurationService.getValue('editor.enableDecorators'); + if (enabled) { + this.enable(); + } else { + this.disable(); + } + } - if (!enableDecorators) { + private enable(): void { + if (this.enabled) { return; } + this.transientDisposables.push(this.editorGroupService.onEditorsChanged(() => this.onEditorsChanged())); + this.onEditorsChanged(); + this.enabled = true; + } + + private disable(): void { + if (!this.enabled) { + return; + } + + this.transientDisposables = dispose(this.transientDisposables); + this.models.forEach(m => this.items[m.id].dispose()); + this.models = []; + this.items = Object.create(null); + this.enabled = false; + } + + // HACK: This is the best current way of figuring out whether to draw these decorations + // or not. Needs context from the editor, to know whether it is a diff editor, in place editor + // etc. + private onEditorsChanged(): void { const models = this.editorService.getVisibleEditors() // map to the editor controls @@ -1075,11 +1104,8 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution, } dispose(): void { + this.disable(); this.disposables = dispose(this.disposables); - this.models.forEach(m => this.items[m.id].dispose()); - - this.models = null; - this.items = null; } } diff --git a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts index 444ef323efd..fcbe4f68f73 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -64,14 +64,14 @@ Registry.as(WorkbenchActionExtensions.WorkbenchActions ); Registry.as(ConfigurationExtensions.Configuration).registerConfiguration({ - id: 'editor', + id: 'scm', order: 5, type: 'object', properties: { - 'editor.enableDecorators': { + 'scm.enableDiffDecorations': { 'type': 'boolean', 'default': true, - 'description': localize('enableDecorators', "Enables or disables color decorators when changes happen in the editor.") + 'description': localize('enableDiffDecorations', "Enables or disables diff decorations in the editor.") }, } }); \ No newline at end of file From 7ac1546bf84c6bde102fe01a2b67399ef0d5883e Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 11 Dec 2017 16:21:29 +0100 Subject: [PATCH 078/615] panel part title: tweaks to the size fixes #40010 --- src/vs/workbench/browser/parts/panel/media/panelpart.css | 6 ++++-- src/vs/workbench/browser/parts/panel/panelPart.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/browser/parts/panel/media/panelpart.css b/src/vs/workbench/browser/parts/panel/media/panelpart.css index a2c6d72ff21..a72286fe791 100644 --- a/src/vs/workbench/browser/parts/panel/media/panelpart.css +++ b/src/vs/workbench/browser/parts/panel/media/panelpart.css @@ -50,7 +50,8 @@ } .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar { - line-height: 32px; + line-height: 30px; + height: 35px; } .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:first-child { @@ -62,7 +63,8 @@ padding-left: 16px; padding-right: 16px; font-size: 11px; - padding-bottom: 4px; /* puts the bottom border down */ + padding-bottom: 3px; /* puts the bottom border down */ + padding-top: 2px; display: flex; } diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 38da57ef74a..b195a3511b0 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -331,7 +331,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { outline-style: solid; border-bottom: none; padding-bottom: 0; - outline-offset: 3px; + outline-offset: 1px; } .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:not(.checked) .action-label:hover { From d8509840aea93d0e7ecc504cdccf4c41933dec8e Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 11 Dec 2017 16:33:39 +0100 Subject: [PATCH 079/615] layout: second vertical sash should be hidden if panel is not visible fixes # --- src/vs/workbench/browser/layout.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index cc17759c64b..81b49fbed8d 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -682,10 +682,14 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal return this.workbenchSize.width - this.sidebarWidth - this.activitybarWidth; } - return this.workbenchSize.width - (this.partService.isVisible(Parts.PANEL_PART) ? this.panelWidth : 0) - (sidebarPosition === Position.RIGHT ? this.sidebarWidth + this.activitybarWidth : 0); + return this.workbenchSize.width - this.panelWidth - (sidebarPosition === Position.RIGHT ? this.sidebarWidth + this.activitybarWidth : 0); } public getVerticalSashHeight(sash: Sash): number { + if (sash === this.sashXTwo && !this.partService.isVisible(Parts.PANEL_PART)) { + return 0; + } + return this.sidebarHeight; } From 1a53332be7d1bd0ee6fb290342c9060eaa2b228b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 11 Dec 2017 17:15:45 +0100 Subject: [PATCH 080/615] align amend commit message preserving --- extensions/git/src/commands.ts | 19 ++++++++----------- extensions/git/src/repository.ts | 1 - 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index ddcb91699e0..3ae4c4b4b2c 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -996,6 +996,12 @@ export class CommandCenter { return message; } + let value: string | undefined = undefined; + + if (opts && opts.amend && repository.HEAD && repository.HEAD.commit) { + value = (await repository.getCommit(repository.HEAD.commit)).message; + } + const getPreviousCommitMessage = async () => { //Only return the previous commit message if it's an amend commit and the repo already has a commit if (opts && opts.amend && repository.HEAD && repository.HEAD.commit) { @@ -1004,10 +1010,9 @@ export class CommandCenter { }; return await window.showInputBox({ - value: opts && opts.defaultMsg, + value, placeHolder: localize('commit message', "Commit message"), prompt: localize('provide commit message', "Please provide a commit message"), - value: await getPreviousCommitMessage(), ignoreFocusOut: true }); }; @@ -1049,15 +1054,7 @@ export class CommandCenter { @command('git.commitStagedAmend', { repository: true }) async commitStagedAmend(repository: Repository): Promise { - let msg; - if (repository.HEAD) { - if (repository.HEAD.commit) { - let id = repository.HEAD.commit; - let commit = await repository.getCommit(id); - msg = commit.message; - } - } - await this.commitWithAnyInput(repository, { all: false, amend: true, defaultMsg: msg }); + await this.commitWithAnyInput(repository, { all: false, amend: true }); } @command('git.commitAll', { repository: true }) diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index c400a818d9d..098ee2bd954 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -373,7 +373,6 @@ export interface CommitOptions { amend?: boolean; signoff?: boolean; signCommit?: boolean; - defaultMsg?: string; } export interface GitResourceGroup extends SourceControlResourceGroup { From 0636f54e9045af23bcdc70f739a8189d505e73c0 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 11 Dec 2017 17:30:50 +0100 Subject: [PATCH 081/615] :lipstick: --- extensions/git/src/commands.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index e37bd056c1c..8138e0c1533 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -963,8 +963,8 @@ export class CommandCenter { if (!opts) { opts = { all: noStagedChanges }; - } else if ((opts.all === false) && noStagedChanges) { - opts = { ...opts, all: noStagedChanges }; + } else if (!opts.all && noStagedChanges) { + opts = { ...opts, all: true }; } // enable signing of commits if configurated From ec602cda43e4e23bfd537a6f02ce8504281939e2 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 11 Dec 2017 17:39:38 +0100 Subject: [PATCH 082/615] debug issues to me --- .github/classifier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/classifier.yml b/.github/classifier.yml index 7f7e749a8b4..d66324e01fa 100644 --- a/.github/classifier.yml +++ b/.github/classifier.yml @@ -6,7 +6,7 @@ api: [], color-picker: [], css-less-sass: [], - debug: [ weinand ], + debug: [ isidorn ], diff-editor: [], editor: [], editor-1000-limit: [], From 88c117e5ace74efd94c22725d51e5fd5b1430430 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 11 Dec 2017 11:52:40 +0100 Subject: [PATCH 083/615] Mark an extension as uninstalled when Uninstalled and do not delete it. --- .../node/extensionManagementService.ts | 175 ++++++++++-------- 1 file changed, 95 insertions(+), 80 deletions(-) diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index c447fb77b99..b7b7926e58b 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -36,7 +36,7 @@ import { isMacintosh } from 'vs/base/common/platform'; import { MANIFEST_CACHE_FOLDER, USER_MANIFEST_CACHE_FILE } from 'vs/platform/extensions/common/extensions'; const SystemExtensionsRoot = path.normalize(path.join(URI.parse(require.toUrl('')).fsPath, '..', 'extensions')); -const INSTALL_ERROR_OBSOLETE = 'obsolete'; +const INSTALL_ERROR_UNSET_UNINSTALLED = 'unsetUninstalled'; const INSTALL_ERROR_INCOMPATIBLE = 'incompatible'; const INSTALL_ERROR_DOWNLOADING = 'downloading'; const INSTALL_ERROR_VALIDATING = 'validating'; @@ -99,9 +99,9 @@ export class ExtensionManagementService implements IExtensionManagementService { _serviceBrand: any; private extensionsPath: string; - private obsoletePath: string; + private uninstalledPath: string; private userDataPath: string; - private obsoleteFileLimiter: Limiter; + private uninstalledFileLimiter: Limiter; private disposables: IDisposable[] = []; private _onInstallExtension = new Emitter(); @@ -122,9 +122,9 @@ export class ExtensionManagementService implements IExtensionManagementService { @IExtensionGalleryService private galleryService: IExtensionGalleryService ) { this.extensionsPath = environmentService.extensionsPath; - this.obsoletePath = path.join(this.extensionsPath, '.obsolete'); + this.uninstalledPath = path.join(this.extensionsPath, '.obsolete'); this.userDataPath = environmentService.userDataPath; - this.obsoleteFileLimiter = new Limiter(1); + this.uninstalledFileLimiter = new Limiter(1); } private deleteExtensionsManifestCache(): void { @@ -142,23 +142,32 @@ export class ExtensionManagementService implements IExtensionManagementService { return validateLocalExtension(zipPath) .then(manifest => { const identifier = { id: getLocalExtensionIdFromManifest(manifest) }; - return this.isObsolete(identifier.id) - .then(isObsolete => { - if (isObsolete) { - return TPromise.wrapError(new Error(nls.localize('restartCodeLocal', "Please restart Code before reinstalling {0}.", manifest.displayName || manifest.name))); - } - return this.checkOutdated(manifest) - .then(validated => { - if (validated) { - this._onInstallExtension.fire({ identifier, zipPath }); - return this.getMetadata(getGalleryExtensionId(manifest.publisher, manifest.name)) - .then( - metadata => this.installFromZipPath(identifier, zipPath, metadata, manifest), - error => this.installFromZipPath(identifier, zipPath, null, manifest)); - } - return null; - }); - }); + return this.unsetUninstalledAndRemove(identifier.id) + .then( + () => this.checkOutdated(manifest) + .then(validated => { + if (validated) { + this._onInstallExtension.fire({ identifier, zipPath }); + return this.getMetadata(getGalleryExtensionId(manifest.publisher, manifest.name)) + .then( + metadata => this.installFromZipPath(identifier, zipPath, metadata, manifest), + error => this.installFromZipPath(identifier, zipPath, null, manifest)); + } + return null; + }), + e => TPromise.wrapError(new Error(nls.localize('restartCode', "Please restart Code before reinstalling {0}.", manifest.displayName || manifest.name)))); + }); + } + + private unsetUninstalledAndRemove(id: string): TPromise { + return this.isUninstalled(id) + .then(isUninstalled => { + if (isUninstalled) { + const extensionPath = path.join(this.extensionsPath, id); + return pfs.rimraf(extensionPath) + .then(() => this.unsetUninstalled(id)); + } + return null; }); } @@ -230,14 +239,7 @@ export class ExtensionManagementService implements IExtensionManagementService { } return this.getDependenciesToInstall(compatible.properties.dependencies) .then( - dependenciesToInstall => { - const extensionsToInstall = [compatible, ...dependenciesToInstall.filter(d => d.identifier.uuid !== compatible.identifier.uuid)]; - return this.checkForObsolete(extensionsToInstall) - .then( - extensionsToInstall => extensionsToInstall, - error => TPromise.wrapError(new InstallationError(this.joinErrors(error).message, INSTALL_ERROR_OBSOLETE)) - ); - }, + dependenciesToInstall => ([compatible, ...dependenciesToInstall.filter(d => d.identifier.uuid !== compatible.identifier.uuid)]), error => TPromise.wrapError(new InstallationError(this.joinErrors(error).message, INSTALL_ERROR_GALLERY))); }, error => TPromise.wrapError(new InstallationError(this.joinErrors(error).message, INSTALL_ERROR_GALLERY))); @@ -253,19 +255,6 @@ export class ExtensionManagementService implements IExtensionManagementService { error => TPromise.wrapError(new InstallationError(this.joinErrors(error).message, INSTALL_ERROR_LOCAL))); } - private checkForObsolete(extensionsToInstall: IGalleryExtension[]): TPromise { - return this.filterObsolete(...extensionsToInstall.map(i => getLocalExtensionIdFromGallery(i, i.version))) - .then(obsolete => { - if (obsolete.length) { - if (isMacintosh) { - return TPromise.wrapError(new Error(nls.localize('quitCode', "Unable to install because an obsolete instance of the extension is still running. Please Quit and Start VS Code before reinstalling."))); - } - return TPromise.wrapError(new Error(nls.localize('exitCode', "Unable to install because an obsolete instance of the extension is still running. Please Exit and Start VS Code before reinstalling."))); - } - return extensionsToInstall; - }); - } - private downloadInstallableExtension(extension: IGalleryExtension, installed: ILocalExtension[]): TPromise { const current = installed.filter(i => i.identifier.uuid === extension.identifier.uuid)[0]; const id = getLocalExtensionIdFromGallery(extension, extension.version); @@ -346,9 +335,38 @@ export class ExtensionManagementService implements IExtensionManagementService { return filtered.length ? filtered[0] : null; } - private installExtension({ zipPath, id, metadata, current }: InstallableExtension): TPromise { - const extensionPath = path.join(this.extensionsPath, id); + private installExtension(installableExtension: InstallableExtension): TPromise { + return this.unsetUninstalledAndGetLocal(installableExtension.id) + .then( + local => { + if (local) { + return local; + } + return this.extractAndInstall(installableExtension); + }, + e => { + if (isMacintosh) { + return TPromise.wrapError(new InstallationError(nls.localize('quitCode', "Unable to install the extension. Please Quit and Start VS Code before reinstalling."), INSTALL_ERROR_UNSET_UNINSTALLED)); + } + return TPromise.wrapError(new InstallationError(nls.localize('exitCode', "Unable to install the extension. Please Exit and Start VS Code before reinstalling."), INSTALL_ERROR_UNSET_UNINSTALLED)); + }); + } + private unsetUninstalledAndGetLocal(id: string): TPromise { + return this.isUninstalled(id) + .then(isUninstalled => { + if (isUninstalled) { + // If the same version of extension is marked as uninstalled, remove it from there and return the local. + return this.unsetUninstalled(id) + .then(() => this.getInstalled()) + .then(installed => installed.filter(i => i.identifier.id === id)[0]); + } + return null; + }); + } + + private extractAndInstall({ zipPath, id, metadata, current }: InstallableExtension): TPromise { + const extensionPath = path.join(this.extensionsPath, id); return pfs.rimraf(extensionPath).then(() => { return extract(zipPath, extensionPath, { sourcePath: 'extension', overwrite: true }) .then(() => readManifest(extensionPath)) @@ -416,7 +434,7 @@ export class ExtensionManagementService implements IExtensionManagementService { private checkForRename(currentExtension: ILocalExtension, newExtension: ILocalExtension): TPromise { // Check if the gallery id for current and new exensions are same, if not, remove the current one. if (currentExtension && getGalleryExtensionIdFromLocal(currentExtension) !== getGalleryExtensionIdFromLocal(newExtension)) { - return this.setObsolete(currentExtension.identifier.id); + return this.markUninstalled(currentExtension.identifier.id); } return TPromise.as(null); } @@ -565,10 +583,7 @@ export class ExtensionManagementService implements IExtensionManagementService { } private uninstallExtension({ id }: IExtensionIdentifier): TPromise { - const extensionPath = path.join(this.extensionsPath, id); - return this.setObsolete(id) - .then(() => pfs.rimraf(extensionPath)) - .then(() => this.unsetObsolete(id)); + return this.markUninstalled(id); } private async postUninstallExtension(extension: ILocalExtension, error?: string): TPromise { @@ -636,14 +651,14 @@ export class ExtensionManagementService implements IExtensionManagementService { } private scanExtensionFolders(root: string): TPromise { - return this.getObsoleteExtensions() - .then(obsolete => pfs.readdir(root).then(extensions => extensions.filter(id => !obsolete[id]))); + return this.getUninstalledExtensions() + .then(uninstalled => pfs.readdir(root).then(extensions => extensions.filter(id => !uninstalled[id]))); } removeDeprecatedExtensions(): TPromise { return TPromise.join([ // Remove obsolte extensions first to avoid removing installed older extension. See #38609. - this.removeObsoleteExtensions(), + this.removeUninstalledExtensions(), this.removeOutdatedExtensions() ]); } @@ -653,16 +668,16 @@ export class ExtensionManagementService implements IExtensionManagementService { .then(extensionIds => this.removeExtensions(extensionIds)); } - private removeObsoleteExtensions(): TPromise { - return this.getObsoleteExtensions() - .then(obsolete => Object.keys(obsolete)) + private removeUninstalledExtensions(): TPromise { + return this.getUninstalledExtensions() + .then(uninstalled => Object.keys(uninstalled)) .then(extensionIds => this.removeExtensions(extensionIds)); } private removeExtensions(extensionsIds: string[]): TPromise { return TPromise.join(extensionsIds.map(id => { return pfs.rimraf(path.join(this.extensionsPath, id)) - .then(() => this.withObsoleteExtensions(obsolete => delete obsolete[id])); + .then(() => this.withUninstalledExtensions(uninstalled => delete uninstalled[id])); })); } @@ -680,47 +695,47 @@ export class ExtensionManagementService implements IExtensionManagementService { }); } - private isObsolete(id: string): TPromise { - return this.filterObsolete(id).then(obsolete => obsolete.length === 1); + private isUninstalled(id: string): TPromise { + return this.filterUninstalled(id).then(uninstalled => uninstalled.length === 1); } - private filterObsolete(...ids: string[]): TPromise { - return this.withObsoleteExtensions(allObsolete => { - const obsolete = []; + private filterUninstalled(...ids: string[]): TPromise { + return this.withUninstalledExtensions(allUninstalled => { + const uninstalled = []; for (const id of ids) { - if (!!allObsolete[id]) { - obsolete.push(id); + if (!!allUninstalled[id]) { + uninstalled.push(id); } } - return obsolete; + return uninstalled; }); } - private setObsolete(id: string): TPromise { - return this.withObsoleteExtensions(obsolete => assign(obsolete, { [id]: true })); + private markUninstalled(id: string): TPromise { + return this.withUninstalledExtensions(uninstalled => assign(uninstalled, { [id]: true })); } - private unsetObsolete(id: string): TPromise { - return this.withObsoleteExtensions(obsolete => delete obsolete[id]); + private unsetUninstalled(id: string): TPromise { + return this.withUninstalledExtensions(uninstalled => delete uninstalled[id]); } - private getObsoleteExtensions(): TPromise<{ [id: string]: boolean; }> { - return this.withObsoleteExtensions(obsolete => obsolete); + private getUninstalledExtensions(): TPromise<{ [id: string]: boolean; }> { + return this.withUninstalledExtensions(uninstalled => uninstalled); } - private withObsoleteExtensions(fn: (obsolete: { [id: string]: boolean; }) => T): TPromise { - return this.obsoleteFileLimiter.queue(() => { + private withUninstalledExtensions(fn: (uninstalled: { [id: string]: boolean; }) => T): TPromise { + return this.uninstalledFileLimiter.queue(() => { let result: T = null; - return pfs.readFile(this.obsoletePath, 'utf8') + return pfs.readFile(this.uninstalledPath, 'utf8') .then(null, err => err.code === 'ENOENT' ? TPromise.as('{}') : TPromise.wrapError(err)) .then<{ [id: string]: boolean }>(raw => { try { return JSON.parse(raw); } catch (e) { return {}; } }) - .then(obsolete => { result = fn(obsolete); return obsolete; }) - .then(obsolete => { - if (Object.keys(obsolete).length === 0) { - return pfs.rimraf(this.obsoletePath); + .then(uninstalled => { result = fn(uninstalled); return uninstalled; }) + .then(uninstalled => { + if (Object.keys(uninstalled).length === 0) { + return pfs.rimraf(this.uninstalledPath); } else { - const raw = JSON.stringify(obsolete); - return pfs.writeFile(this.obsoletePath, raw); + const raw = JSON.stringify(uninstalled); + return pfs.writeFile(this.uninstalledPath, raw); } }) .then(() => result); From f7765c1c27173aa60098400ec370981f3663c299 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 11 Dec 2017 12:22:57 +0100 Subject: [PATCH 084/615] more detailed error code while extracting and install --- .../node/extensionManagementService.ts | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index b7b7926e58b..834c8018fd8 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -43,9 +43,10 @@ const INSTALL_ERROR_VALIDATING = 'validating'; const INSTALL_ERROR_GALLERY = 'gallery'; const INSTALL_ERROR_LOCAL = 'local'; const INSTALL_ERROR_EXTRACTING = 'extracting'; +const INSTALL_ERROR_DELETING = 'deleting'; const INSTALL_ERROR_UNKNOWN = 'unknown'; -export class InstallationError extends Error { +export class ExtensionManagementError extends Error { constructor(message: string, readonly code: string) { super(message); } @@ -235,14 +236,14 @@ export class ExtensionManagementService implements IExtensionManagementService { return this.galleryService.loadCompatibleVersion(extension) .then(compatible => { if (!compatible) { - return TPromise.wrapError(new InstallationError(nls.localize('notFoundCompatible', "Unable to install because, the extension '{0}' compatible with current version '{1}' of VS Code is not found.", extension.identifier.id, pkg.version), INSTALL_ERROR_INCOMPATIBLE)); + return TPromise.wrapError(new ExtensionManagementError(nls.localize('notFoundCompatible', "Unable to install because, the extension '{0}' compatible with current version '{1}' of VS Code is not found.", extension.identifier.id, pkg.version), INSTALL_ERROR_INCOMPATIBLE)); } return this.getDependenciesToInstall(compatible.properties.dependencies) .then( dependenciesToInstall => ([compatible, ...dependenciesToInstall.filter(d => d.identifier.uuid !== compatible.identifier.uuid)]), - error => TPromise.wrapError(new InstallationError(this.joinErrors(error).message, INSTALL_ERROR_GALLERY))); + error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_GALLERY))); }, - error => TPromise.wrapError(new InstallationError(this.joinErrors(error).message, INSTALL_ERROR_GALLERY))); + error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_GALLERY))); } private downloadAndInstallExtensions(extensions: IGalleryExtension[]): TPromise { @@ -250,9 +251,9 @@ export class ExtensionManagementService implements IExtensionManagementService { .then( installed => TPromise.join(extensions.map(extensionToInstall => this.downloadInstallableExtension(extensionToInstall, installed) - .then(installableExtension => this.installExtension(installableExtension).then(null, e => TPromise.wrapError(new InstallationError(this.joinErrors(e).message, INSTALL_ERROR_EXTRACTING)))) + .then(installableExtension => this.installExtension(installableExtension)) )).then(null, errors => this.rollback(extensions).then(() => TPromise.wrapError(errors), () => TPromise.wrapError(errors))), - error => TPromise.wrapError(new InstallationError(this.joinErrors(error).message, INSTALL_ERROR_LOCAL))); + error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_LOCAL))); } private downloadInstallableExtension(extension: IGalleryExtension, installed: ILocalExtension[]): TPromise { @@ -273,14 +274,14 @@ export class ExtensionManagementService implements IExtensionManagementService { zipPath => validateLocalExtension(zipPath) .then( () => ({ zipPath, id, metadata, current }), - error => TPromise.wrapError(new InstallationError(this.joinErrors(error).message, INSTALL_ERROR_VALIDATING)) + error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_VALIDATING)) ), - error => TPromise.wrapError(new InstallationError(this.joinErrors(error).message, INSTALL_ERROR_DOWNLOADING))); + error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_DOWNLOADING))); } else { - return TPromise.wrapError(new InstallationError(nls.localize('notFoundCompatibleDependency', "Unable to install because, the depending extension '{0}' compatible with current version '{1}' of VS Code is not found.", extension.identifier.id, pkg.version), INSTALL_ERROR_INCOMPATIBLE)); + return TPromise.wrapError(new ExtensionManagementError(nls.localize('notFoundCompatibleDependency', "Unable to install because, the depending extension '{0}' compatible with current version '{1}' of VS Code is not found.", extension.identifier.id, pkg.version), INSTALL_ERROR_INCOMPATIBLE)); } }, - error => TPromise.wrapError(new InstallationError(this.joinErrors(error).message, INSTALL_ERROR_GALLERY))); + error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_GALLERY))); } private rollback(extensions: IGalleryExtension[]): TPromise { @@ -304,7 +305,7 @@ export class ExtensionManagementService implements IExtensionManagementService { if (local) { this._onDidInstallExtension.fire({ identifier, gallery, local }); } else { - const errorCode = error && (error).code ? (error).code : INSTALL_ERROR_UNKNOWN; + const errorCode = error && (error).code ? (error).code : INSTALL_ERROR_UNKNOWN; this._onDidInstallExtension.fire({ identifier, gallery, error: errorCode }); } }); @@ -346,9 +347,9 @@ export class ExtensionManagementService implements IExtensionManagementService { }, e => { if (isMacintosh) { - return TPromise.wrapError(new InstallationError(nls.localize('quitCode', "Unable to install the extension. Please Quit and Start VS Code before reinstalling."), INSTALL_ERROR_UNSET_UNINSTALLED)); + return TPromise.wrapError(new ExtensionManagementError(nls.localize('quitCode', "Unable to install the extension. Please Quit and Start VS Code before reinstalling."), INSTALL_ERROR_UNSET_UNINSTALLED)); } - return TPromise.wrapError(new InstallationError(nls.localize('exitCode', "Unable to install the extension. Please Exit and Start VS Code before reinstalling."), INSTALL_ERROR_UNSET_UNINSTALLED)); + return TPromise.wrapError(new ExtensionManagementError(nls.localize('exitCode', "Unable to install the extension. Please Exit and Start VS Code before reinstalling."), INSTALL_ERROR_UNSET_UNINSTALLED)); }); } @@ -367,11 +368,14 @@ export class ExtensionManagementService implements IExtensionManagementService { private extractAndInstall({ zipPath, id, metadata, current }: InstallableExtension): TPromise { const extensionPath = path.join(this.extensionsPath, id); - return pfs.rimraf(extensionPath).then(() => { - return extract(zipPath, extensionPath, { sourcePath: 'extension', overwrite: true }) - .then(() => readManifest(extensionPath)) - .then(({ manifest }) => { - return pfs.readdir(extensionPath).then(children => { + return pfs.rimraf(extensionPath) + .then(() => { + return extract(zipPath, extensionPath, { sourcePath: 'extension', overwrite: true }) + .then( + () => TPromise.join([readManifest(extensionPath), pfs.readdir(extensionPath)]) + .then(null, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_LOCAL))), + e => TPromise.wrapError(new ExtensionManagementError(e.message, INSTALL_ERROR_EXTRACTING))) + .then(([{ manifest }, children]) => { const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0]; const readmeUrl = readme ? URI.file(path.join(extensionPath, readme)).toString() : null; const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0]; @@ -383,10 +387,9 @@ export class ExtensionManagementService implements IExtensionManagementService { return this.saveMetadataForLocalExtension(local) .then(() => this.checkForRename(current, local)) - .then(() => local); + .then(() => local, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_LOCAL))); }); - }); - }); + }, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_DELETING))); } uninstall(extension: ILocalExtension, force = false): TPromise { From 67e8f7813460d7dee6e5788d6fc48d509fb61aac Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 11 Dec 2017 17:47:38 +0100 Subject: [PATCH 085/615] Fix #37268 --- .../common/extensionManagementUtil.ts | 21 +++ .../node/extensionManagementService.ts | 131 +++++++----------- .../electron-browser/extensionPoints.ts | 22 +-- 3 files changed, 82 insertions(+), 92 deletions(-) diff --git a/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts b/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts index 8fd3621d647..3b60c27a367 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts @@ -39,6 +39,27 @@ export function adoptToGalleryExtensionId(id: string): string { return id.replace(EXTENSION_IDENTIFIER_REGEX, (match, publisher: string, name: string) => getGalleryExtensionId(publisher, name)); } +export function groupByExtension(extensions: T[], getExtensionIdentifier: (t: T) => IExtensionIdentifier): T[][] { + const byExtension: T[][] = []; + const findGroup = extension => { + for (const group of byExtension) { + if (group.some(e => areSameExtensions(getExtensionIdentifier(e), getExtensionIdentifier(extension)))) { + return group; + } + } + return null; + }; + for (const extension of extensions) { + const group = findGroup(extension); + if (group) { + group.push(extension); + } else { + byExtension.push([extension]); + } + } + return byExtension; +} + export function getLocalExtensionTelemetryData(extension: ILocalExtension): any { return { id: getGalleryExtensionIdFromLocal(extension), diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index 834c8018fd8..79af6ca31ca 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -21,14 +21,12 @@ import { StatisticType, IExtensionIdentifier } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { getGalleryExtensionIdFromLocal, adoptToGalleryExtensionId, areSameExtensions, getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; -import { getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/node/extensionManagementUtil'; +import { getGalleryExtensionIdFromLocal, adoptToGalleryExtensionId, areSameExtensions, getGalleryExtensionId, groupByExtension } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { localizeManifest } from '../common/extensionNls'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { Limiter } from 'vs/base/common/async'; import Event, { Emitter } from 'vs/base/common/event'; import * as semver from 'semver'; -import { groupBy, values } from 'vs/base/common/collections'; import URI from 'vs/base/common/uri'; import { IChoiceService, Severity } from 'vs/platform/message/common/message'; import pkg from 'vs/platform/node/package'; @@ -92,7 +90,6 @@ interface InstallableExtension { zipPath: string; id: string; metadata?: IGalleryMetadata; - current?: ILocalExtension; } export class ExtensionManagementService implements IExtensionManagementService { @@ -202,7 +199,7 @@ export class ExtensionManagementService implements IExtensionManagementService { return this.getDependenciesToInstall(local.manifest.extensionDependencies) .then(dependenciesToInstall => this.downloadAndInstallExtensions(metadata ? dependenciesToInstall.filter(d => d.identifier.uuid !== metadata.id) : dependenciesToInstall)) .then(() => local, error => { - this.uninstallExtension(local.identifier); + this.uninstallExtension(local); return TPromise.wrapError(error); }); } @@ -247,17 +244,12 @@ export class ExtensionManagementService implements IExtensionManagementService { } private downloadAndInstallExtensions(extensions: IGalleryExtension[]): TPromise { - return this.getInstalled(LocalExtensionType.User) - .then( - installed => TPromise.join(extensions.map(extensionToInstall => - this.downloadInstallableExtension(extensionToInstall, installed) - .then(installableExtension => this.installExtension(installableExtension)) - )).then(null, errors => this.rollback(extensions).then(() => TPromise.wrapError(errors), () => TPromise.wrapError(errors))), - error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_LOCAL))); + return TPromise.join(extensions.map(extensionToInstall => this.downloadInstallableExtension(extensionToInstall) + .then(installableExtension => this.installExtension(installableExtension)) + )).then(null, errors => this.rollback(extensions).then(() => TPromise.wrapError(errors), () => TPromise.wrapError(errors))); } - private downloadInstallableExtension(extension: IGalleryExtension, installed: ILocalExtension[]): TPromise { - const current = installed.filter(i => i.identifier.uuid === extension.identifier.uuid)[0]; + private downloadInstallableExtension(extension: IGalleryExtension): TPromise { const id = getLocalExtensionIdFromGallery(extension, extension.version); const metadata = { id: extension.identifier.uuid, @@ -273,7 +265,7 @@ export class ExtensionManagementService implements IExtensionManagementService { .then( zipPath => validateLocalExtension(zipPath) .then( - () => ({ zipPath, id, metadata, current }), + () => ({ zipPath, id, metadata }), error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_VALIDATING)) ), error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_DOWNLOADING))); @@ -286,7 +278,7 @@ export class ExtensionManagementService implements IExtensionManagementService { private rollback(extensions: IGalleryExtension[]): TPromise { return this.filterOutUninstalled(extensions) - .then(installed => TPromise.join(installed.map(local => this.uninstallExtension(local.identifier)))) + .then(installed => TPromise.join(installed.map(local => this.uninstallExtension(local)))) .then(() => null, () => null); } @@ -366,7 +358,7 @@ export class ExtensionManagementService implements IExtensionManagementService { }); } - private extractAndInstall({ zipPath, id, metadata, current }: InstallableExtension): TPromise { + private extractAndInstall({ zipPath, id, metadata }: InstallableExtension): TPromise { const extensionPath = path.join(this.extensionsPath, id); return pfs.rimraf(extensionPath) .then(() => { @@ -386,7 +378,6 @@ export class ExtensionManagementService implements IExtensionManagementService { const local: ILocalExtension = { type, identifier, manifest, metadata, path: extensionPath, readmeUrl, changelogUrl }; return this.saveMetadataForLocalExtension(local) - .then(() => this.checkForRename(current, local)) .then(() => local, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_LOCAL))); }); }, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_DELETING))); @@ -395,16 +386,13 @@ export class ExtensionManagementService implements IExtensionManagementService { uninstall(extension: ILocalExtension, force = false): TPromise { this.deleteExtensionsManifestCache(); - return this.removeOutdatedExtensions() - .then(() => - this.scanUserExtensions() - .then(installed => { - const promises = installed - .filter(e => e.manifest.publisher === extension.manifest.publisher && e.manifest.name === extension.manifest.name) - .map(e => this.checkForDependenciesAndUninstall(e, installed, force)); - return TPromise.join(promises).then(null, error => TPromise.wrapError(this.joinErrors(error))); - })) - .then(() => { /* drop resolved value */ }); + return this.getInstalled(LocalExtensionType.User) + .then(installed => { + const promises = installed + .filter(e => e.manifest.publisher === extension.manifest.publisher && e.manifest.name === extension.manifest.name) + .map(e => this.checkForDependenciesAndUninstall(e, installed, force)); + return TPromise.join(promises).then(() => null, error => TPromise.wrapError(this.joinErrors(error))); + }); } updateMetadata(local: ILocalExtension, metadata: IGalleryMetadata): TPromise { @@ -434,14 +422,6 @@ export class ExtensionManagementService implements IExtensionManagementService { }); } - private checkForRename(currentExtension: ILocalExtension, newExtension: ILocalExtension): TPromise { - // Check if the gallery id for current and new exensions are same, if not, remove the current one. - if (currentExtension && getGalleryExtensionIdFromLocal(currentExtension) !== getGalleryExtensionIdFromLocal(newExtension)) { - return this.markUninstalled(currentExtension.identifier.id); - } - return TPromise.as(null); - } - private joinErrors(errorOrErrors: (Error | string) | ((Error | string)[])): Error { const errors = Array.isArray(errorOrErrors) ? errorOrErrors : [errorOrErrors]; if (errors.length === 1) { @@ -519,7 +499,7 @@ export class ExtensionManagementService implements IExtensionManagementService { if (dependents.length) { return TPromise.wrapError(new Error(this.getDependentsErrorMessage(extension, dependents))); } - return TPromise.join([this.uninstallExtension(extension.identifier), ...dependenciesToUninstall.map(d => this.doUninstall(d))]).then(() => null); + return TPromise.join([this.uninstallExtension(extension), ...dependenciesToUninstall.map(d => this.doUninstall(d))]).then(() => null); } private getDependentsErrorMessage(extension: ILocalExtension, dependents: ILocalExtension[]): string { @@ -570,7 +550,7 @@ export class ExtensionManagementService implements IExtensionManagementService { private doUninstall(extension: ILocalExtension): TPromise { return this.preUninstallExtension(extension) - .then(() => this.uninstallExtension(extension.identifier)) + .then(() => this.uninstallExtension(extension)) .then(() => this.postUninstallExtension(extension), error => { this.postUninstallExtension(extension, INSTALL_ERROR_LOCAL); @@ -585,8 +565,11 @@ export class ExtensionManagementService implements IExtensionManagementService { .then(() => this._onUninstallExtension.fire(extension.identifier)); } - private uninstallExtension({ id }: IExtensionIdentifier): TPromise { - return this.markUninstalled(id); + private uninstallExtension(local: ILocalExtension): TPromise { + const identifier = { id: getGalleryExtensionIdFromLocal(local), uuid: local.identifier.uuid }; + return this.scanUserExtensions(false) // Uninstall all extensions which are same as requested + .then(extensions => extensions.filter(i => areSameExtensions({ id: getGalleryExtensionIdFromLocal(i), uuid: i.identifier.uuid }, identifier))) + .then(uninstalled => this.setUninstalled(...uninstalled.map(u => u.identifier.id))); } private async postUninstallExtension(extension: ILocalExtension, error?: string): TPromise { @@ -608,7 +591,7 @@ export class ExtensionManagementService implements IExtensionManagementService { } if (type === null || type === LocalExtensionType.User) { - promises.push(this.scanUserExtensions()); + promises.push(this.scanUserExtensions(true)); } return TPromise.join(promises).then(flatten); @@ -618,11 +601,15 @@ export class ExtensionManagementService implements IExtensionManagementService { return this.scanExtensions(SystemExtensionsRoot, LocalExtensionType.System); } - private scanUserExtensions(): TPromise { - return this.scanExtensions(this.extensionsPath, LocalExtensionType.User).then(extensions => { - const byId = values(groupBy(extensions, p => getGalleryExtensionIdFromLocal(p))); - return byId.map(p => p.sort((a, b) => semver.rcompare(a.manifest.version, b.manifest.version))[0]); - }); + private scanUserExtensions(excludeOutdated: boolean): TPromise { + return this.scanExtensions(this.extensionsPath, LocalExtensionType.User) + .then(extensions => { + if (excludeOutdated) { + const byExtension: ILocalExtension[][] = groupByExtension(extensions, e => ({ id: getGalleryExtensionIdFromLocal(e), uuid: e.identifier.uuid })); + return byExtension.map(p => p.sort((a, b) => semver.rcompare(a.manifest.version, b.manifest.version))[0]); + } + return extensions; + }); } private scanExtensions(root: string, type: LocalExtensionType): TPromise { @@ -659,42 +646,22 @@ export class ExtensionManagementService implements IExtensionManagementService { } removeDeprecatedExtensions(): TPromise { - return TPromise.join([ - // Remove obsolte extensions first to avoid removing installed older extension. See #38609. - this.removeUninstalledExtensions(), - this.removeOutdatedExtensions() - ]); - } - - private removeOutdatedExtensions(): TPromise { - return this.getOutdatedExtensionIds() - .then(extensionIds => this.removeExtensions(extensionIds)); - } - - private removeUninstalledExtensions(): TPromise { return this.getUninstalledExtensions() - .then(uninstalled => Object.keys(uninstalled)) - .then(extensionIds => this.removeExtensions(extensionIds)); - } + .then(uninstalled => { + const unInstalledExtensionIds = Object.keys(uninstalled); + return this.scanUserExtensions(false) + .then(extensions => { + // Exclude uninstalled extensions + extensions = extensions.filter(e => unInstalledExtensionIds.indexOf(e.identifier.id) === -1); + const byExtension: ILocalExtension[][] = groupByExtension(extensions, e => ({ id: getGalleryExtensionIdFromLocal(e), uuid: e.identifier.uuid })); + const outDatedExtensionIds = flatten(byExtension.map(p => p.sort((a, b) => semver.rcompare(a.manifest.version, b.manifest.version)).slice(1))) + .map(a => a.identifier.id); - private removeExtensions(extensionsIds: string[]): TPromise { - return TPromise.join(extensionsIds.map(id => { - return pfs.rimraf(path.join(this.extensionsPath, id)) - .then(() => this.withUninstalledExtensions(uninstalled => delete uninstalled[id])); - })); - } - - private getOutdatedExtensionIds(): TPromise { - return this.scanExtensionFolders(this.extensionsPath) - .then(folders => { - const galleryFolders = folders - .map(folder => (assign({ folder }, getIdAndVersionFromLocalExtensionId(folder)))) - .filter(({ id, version }) => !!id && !!version); - - const byId = values(groupBy(galleryFolders, p => p.id)); - - return flatten(byId.map(p => p.sort((a, b) => semver.rcompare(a.version, b.version)).slice(1))) - .map(a => a.folder); + return TPromise.join([...unInstalledExtensionIds, ...outDatedExtensionIds].map(id => { + return pfs.rimraf(path.join(this.extensionsPath, id)) + .then(() => this.withUninstalledExtensions(uninstalled => delete uninstalled[id])); + })); + }); }); } @@ -714,8 +681,8 @@ export class ExtensionManagementService implements IExtensionManagementService { }); } - private markUninstalled(id: string): TPromise { - return this.withUninstalledExtensions(uninstalled => assign(uninstalled, { [id]: true })); + private setUninstalled(...ids: string[]): TPromise { + return this.withUninstalledExtensions(uninstalled => assign(uninstalled, ids.reduce((result, id) => { result[id] = true; return result; }, {}))); } private unsetUninstalled(id: string): TPromise { diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionPoints.ts b/src/vs/workbench/services/extensions/electron-browser/extensionPoints.ts index 9bc364ccc7c..b0b0f300177 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionPoints.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionPoints.ts @@ -9,7 +9,6 @@ import * as nls from 'vs/nls'; import * as pfs from 'vs/base/node/pfs'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { TPromise } from 'vs/base/common/winjs.base'; -import { groupBy, values } from 'vs/base/common/collections'; import { join, normalize, extname } from 'path'; import * as json from 'vs/base/common/json'; import * as types from 'vs/base/common/types'; @@ -17,6 +16,7 @@ import { isValidExtensionDescription } from 'vs/platform/extensions/node/extensi import * as semver from 'semver'; import { getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/node/extensionManagementUtil'; import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; +import { groupByExtension } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; const MANIFEST_FILE = 'package.json'; @@ -340,7 +340,7 @@ export class ExtensionScanner { } else { // TODO: align with extensionsService const nonGallery: string[] = []; - const gallery: { folder: string; id: string; version: string; }[] = []; + const gallery: string[] = []; rawFolders.forEach(folder => { if (obsolete[folder]) { @@ -351,22 +351,24 @@ export class ExtensionScanner { if (!id || !version) { nonGallery.push(folder); - return; + } else { + gallery.push(folder); } - - gallery.push({ folder, id, version }); }); - const byId = values(groupBy(gallery, p => p.id)); - const latest = byId.map(p => p.sort((a, b) => semver.rcompare(a.version, b.version))[0]) - .map(a => a.folder); - - folders = [...nonGallery, ...latest]; + folders = [...nonGallery, ...gallery]; } const nlsConfig = ExtensionScannerInput.createNLSConfig(input); let extensionDescriptions = await TPromise.join(folders.map(f => this.scanExtension(input.ourVersion, log, join(absoluteFolderPath, f), isBuiltin, nlsConfig))); extensionDescriptions = extensionDescriptions.filter(item => item !== null); + + if (!isBuiltin) { + // Filter out outdated extensions + const byExtension: IExtensionDescription[][] = groupByExtension(extensionDescriptions, e => ({ id: e.id, uuid: e.uuid })); + extensionDescriptions = byExtension.map(p => p.sort((a, b) => semver.rcompare(a.version, b.version))[0]); + } + extensionDescriptions.sort((a, b) => { if (a.extensionFolderPath < b.extensionFolderPath) { return -1; From 6793990e25bbfbcd35b146ea8b0a3e652bef0b29 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 11 Dec 2017 17:51:40 +0100 Subject: [PATCH 086/615] move autoRepositoryDetection implementation --- extensions/git/package.nls.json | 2 +- extensions/git/src/model.ts | 7 +++++++ extensions/git/src/repository.ts | 15 +-------------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 990c6c8c3ab..542740ef483 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -49,7 +49,7 @@ "command.stashPopLatest": "Pop Latest Stash", "config.enabled": "Whether git is enabled", "config.path": "Path to the git executable", - "config.autoRepositoryDetection": "Whether a repository should be automatically detected for a single file", + "config.autoRepositoryDetection": "Whether repositories should be automatically detected", "config.autorefresh": "Whether auto refreshing is enabled", "config.autofetch": "Whether auto fetching is enabled", "config.enableLongCommitWarning": "Whether long commit messages should be warned about", diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index a28d386c38b..e22242329e7 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -149,6 +149,13 @@ export class Model { } private onDidChangeVisibleTextEditors(editors: TextEditor[]): void { + const config = workspace.getConfiguration('git'); + const enabled = config.get('autoRepositoryDetection') === true; + + if (!enabled) { + return; + } + editors.forEach(editor => { const uri = editor.document.uri; diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 909b6ef570b..098ee2bd954 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -904,18 +904,9 @@ export class Repository implements Disposable { const index: Resource[] = []; const workingTree: Resource[] = []; const merge: Resource[] = []; - const repoDetection = config.get('autoRepositoryDetection') === true; status.forEach(raw => { - const fullFilePath = path.join(this.repository.root, raw.path); - - if (!repoDetection && workspace.workspaceFolders === undefined) { - if (!this.detectActiveFile(fullFilePath)) { - return; - } - } - - const uri = Uri.file(fullFilePath); + const uri = Uri.file(path.join(this.repository.root, raw.path)); const renameUri = raw.rename ? Uri.file(path.join(this.repository.root, raw.rename)) : undefined; switch (raw.x + raw.y) { @@ -973,10 +964,6 @@ export class Repository implements Disposable { this._onDidChangeStatus.fire(); } - private detectActiveFile(fullFilePath: string): boolean | undefined { - return window.activeTextEditor && window.activeTextEditor.document.fileName === fullFilePath; - } - private onFSChange(uri: Uri): void { const config = workspace.getConfiguration('git'); const autorefresh = config.get('autorefresh'); From 43f2e0706c1c8a3109b31f61a408683d792894bd Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 11 Dec 2017 17:23:05 +0100 Subject: [PATCH 087/615] know the extension id when calling on-will-save, #40030 --- src/vs/workbench/api/node/extHost.api.impl.ts | 2 +- .../node/extHostDocumentSaveParticipant.ts | 16 +++--- .../extHostDocumentSaveParticipant.test.ts | 51 +++++++++++-------- 3 files changed, 41 insertions(+), 28 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index a39cdf3556e..feb0e727eb6 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -470,7 +470,7 @@ export function createApiFactory( return extHostDocuments.onDidSaveDocument(listener, thisArgs, disposables); }, onWillSaveTextDocument: (listener, thisArgs?, disposables?) => { - return extHostDocumentSaveParticipant.onWillSaveTextDocumentEvent(listener, thisArgs, disposables); + return extHostDocumentSaveParticipant.getOnWillSaveTextDocumentEvent(extension)(listener, thisArgs, disposables); }, onDidChangeConfiguration: (listener: (_: any) => any, thisArgs?: any, disposables?: extHostTypes.Disposable[]) => { return extHostConfiguration.onDidChangeConfiguration(listener, thisArgs, disposables); diff --git a/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts b/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts index 479ac970cd4..da949bda937 100644 --- a/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts +++ b/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts @@ -15,12 +15,15 @@ import { ExtHostDocuments } from 'vs/workbench/api/node/extHostDocuments'; import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import * as vscode from 'vscode'; import { LinkedList } from 'vs/base/common/linkedList'; +import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; + +type Listener = [Function, any, IExtensionDescription]; export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSaveParticipantShape { private _documents: ExtHostDocuments; private _mainThreadEditors: MainThreadEditorsShape; - private _callbacks = new LinkedList<[Function, any]>(); + private _callbacks = new LinkedList(); private _badListeners = new WeakMap(); private _thresholds: { timeout: number; errors: number; }; @@ -34,9 +37,9 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic this._callbacks.clear(); } - get onWillSaveTextDocumentEvent(): Event { + getOnWillSaveTextDocumentEvent(extension: IExtensionDescription): Event { return (listener, thisArg, disposables) => { - const remove = this._callbacks.push([listener, thisArg]); + const remove = this._callbacks.push([listener, thisArg, extension]); const result = { dispose: remove }; if (Array.isArray(disposables)) { disposables.push(result); @@ -51,7 +54,7 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic let didTimeout = false; let didTimeoutHandle = setTimeout(() => didTimeout = true, this._thresholds.timeout); - const promise = sequence(entries.map(([fn, thisArg]) => { + const promise = sequence(entries.map(listener => { return () => { if (didTimeout) { @@ -60,14 +63,13 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic } const document = this._documents.getDocumentData(resource).document; - return this._deliverEventAsyncAndBlameBadListeners(fn, thisArg, { document, reason: TextDocumentSaveReason.to(reason) }); + return this._deliverEventAsyncAndBlameBadListeners(listener, { document, reason: TextDocumentSaveReason.to(reason) }); }; })); - return always(promise, () => clearTimeout(didTimeoutHandle)); } - private _deliverEventAsyncAndBlameBadListeners(listener: Function, thisArg: any, stubEvent: vscode.TextDocumentWillSaveEvent): Promise { + private _deliverEventAsyncAndBlameBadListeners([listener, thisArg, extension]: Listener, stubEvent: vscode.TextDocumentWillSaveEvent): Promise { const errors = this._badListeners.get(listener); if (errors > this._thresholds.errors) { // bad listener - ignore diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts index d937c8af433..6e802feca8b 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts @@ -16,12 +16,23 @@ import { OneGetThreadService } from './testThreadService'; import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import * as vscode from 'vscode'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; +import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; suite('ExtHostDocumentSaveParticipant', () => { let resource = URI.parse('foo:bar'); let mainThreadEditors = new class extends mock() { }; let documents: ExtHostDocuments; + let nullExtensionDescription: IExtensionDescription = { + id: 'nullExtensionDescription', + name: 'Null Extension Description', + publisher: 'vscode', + enableProposedApi: false, + engines: undefined, + extensionFolderPath: undefined, + isBuiltin: false, + version: undefined + }; setup(() => { const documentsAndEditors = new ExtHostDocumentsAndEditors(OneGetThreadService(null)); @@ -47,7 +58,7 @@ suite('ExtHostDocumentSaveParticipant', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); let event: vscode.TextDocumentWillSaveEvent; - let sub = participant.onWillSaveTextDocumentEvent(function (e) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { event = e; }); @@ -64,7 +75,7 @@ suite('ExtHostDocumentSaveParticipant', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); let event: vscode.TextDocumentWillSaveEvent; - let sub = participant.onWillSaveTextDocumentEvent(function (e) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { event = e; }); @@ -79,7 +90,7 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, bad listener', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); - let sub = participant.onWillSaveTextDocumentEvent(function (e) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { throw new Error('💀'); }); @@ -94,11 +105,11 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, bad listener doesn\'t prevent more events', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); - let sub1 = participant.onWillSaveTextDocumentEvent(function (e) { + let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { throw new Error('💀'); }); let event: vscode.TextDocumentWillSaveEvent; - let sub2 = participant.onWillSaveTextDocumentEvent(function (e) { + let sub2 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { event = e; }); @@ -114,11 +125,11 @@ suite('ExtHostDocumentSaveParticipant', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); let counter = 0; - let sub1 = participant.onWillSaveTextDocumentEvent(function (event) { + let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { assert.equal(counter++, 0); }); - let sub2 = participant.onWillSaveTextDocumentEvent(function (event) { + let sub2 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { assert.equal(counter++, 1); }); @@ -132,7 +143,7 @@ suite('ExtHostDocumentSaveParticipant', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors, { timeout: 5, errors: 1 }); let callCount = 0; - let sub = participant.onWillSaveTextDocumentEvent(function (event) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { callCount += 1; throw new Error('boom'); }); @@ -150,17 +161,17 @@ suite('ExtHostDocumentSaveParticipant', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors, { timeout: 20, errors: 5 }); let callCount = 0; - let sub1 = participant.onWillSaveTextDocumentEvent(function (event) { + let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { callCount += 1; event.waitUntil(TPromise.timeout(17)); }); - let sub2 = participant.onWillSaveTextDocumentEvent(function (event) { + let sub2 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { callCount += 1; event.waitUntil(TPromise.timeout(17)); }); - let sub3 = participant.onWillSaveTextDocumentEvent(function (event) { + let sub3 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { callCount += 1; }); @@ -177,7 +188,7 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, waitUntil', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); - let sub = participant.onWillSaveTextDocumentEvent(function (event) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { event.waitUntil(TPromise.timeout(10)); event.waitUntil(TPromise.timeout(10)); @@ -193,7 +204,7 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, waitUntil must be called sync', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); - let sub = participant.onWillSaveTextDocumentEvent(function (event) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { event.waitUntil(new TPromise((resolve, reject) => { setTimeout(() => { @@ -216,7 +227,7 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, waitUntil will timeout', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors, { timeout: 5, errors: 3 }); - let sub = participant.onWillSaveTextDocumentEvent(function (event) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { event.waitUntil(TPromise.timeout(15)); }); @@ -231,12 +242,12 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, waitUntil failure handling', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); - let sub1 = participant.onWillSaveTextDocumentEvent(function (e) { + let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { e.waitUntil(TPromise.wrapError(new Error('dddd'))); }); let event: vscode.TextDocumentWillSaveEvent; - let sub2 = participant.onWillSaveTextDocumentEvent(function (e) { + let sub2 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { event = e; }); @@ -257,7 +268,7 @@ suite('ExtHostDocumentSaveParticipant', () => { } }); - let sub = participant.onWillSaveTextDocumentEvent(function (e) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { e.waitUntil(TPromise.as([TextEdit.insert(new Position(0, 0), 'bar')])); e.waitUntil(TPromise.as([TextEdit.setEndOfLine(EndOfLine.CRLF)])); }); @@ -280,7 +291,7 @@ suite('ExtHostDocumentSaveParticipant', () => { } }); - let sub = participant.onWillSaveTextDocumentEvent(function (e) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { // concurrent change from somewhere documents.$acceptModelChanged(resource.toString(), { @@ -330,7 +341,7 @@ suite('ExtHostDocumentSaveParticipant', () => { const document = documents.getDocumentData(resource).document; - let sub1 = participant.onWillSaveTextDocumentEvent(function (e) { + let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { // the document state we started with assert.equal(document.version, 1); assert.equal(document.getText(), 'foo'); @@ -338,7 +349,7 @@ suite('ExtHostDocumentSaveParticipant', () => { e.waitUntil(TPromise.as([TextEdit.insert(new Position(0, 0), 'bar')])); }); - let sub2 = participant.onWillSaveTextDocumentEvent(function (e) { + let sub2 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { // the document state AFTER the first listener kicked in assert.equal(document.version, 2); assert.equal(document.getText(), 'barfoo'); From c76eefbf4aa5fa5bd100196d7196f35aae284378 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 11 Dec 2017 17:57:33 +0100 Subject: [PATCH 088/615] Do not filter unisntalled extensions again. Scanned extensions does it already --- .../extensionManagement/node/extensionManagementService.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index 79af6ca31ca..a02c6e3c284 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -651,8 +651,6 @@ export class ExtensionManagementService implements IExtensionManagementService { const unInstalledExtensionIds = Object.keys(uninstalled); return this.scanUserExtensions(false) .then(extensions => { - // Exclude uninstalled extensions - extensions = extensions.filter(e => unInstalledExtensionIds.indexOf(e.identifier.id) === -1); const byExtension: ILocalExtension[][] = groupByExtension(extensions, e => ({ id: getGalleryExtensionIdFromLocal(e), uuid: e.identifier.uuid })); const outDatedExtensionIds = flatten(byExtension.map(p => p.sort((a, b) => semver.rcompare(a.manifest.version, b.manifest.version)).slice(1))) .map(a => a.identifier.id); From 9408d421cf2df1e44c611774072600d6157e81ec Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 11 Dec 2017 17:59:42 +0100 Subject: [PATCH 089/615] fixes #22769 --- src/vs/workbench/electron-browser/commands.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/vs/workbench/electron-browser/commands.ts b/src/vs/workbench/electron-browser/commands.ts index 3b8202afec7..b7f991b44e9 100644 --- a/src/vs/workbench/electron-browser/commands.ts +++ b/src/vs/workbench/electron-browser/commands.ts @@ -21,6 +21,7 @@ import { IEditorOptions, Position as EditorPosition } from 'vs/platform/editor/c import { openFolderCommand, openFileInNewWindowCommand, openFileFolderInNewWindowCommand, openFolderInNewWindowCommand, openWorkspaceInNewWindowCommand } from 'vs/workbench/browser/actions/workspaceActions'; import { WorkbenchListFocusContextKey, IListService } from 'vs/platform/list/browser/listService'; import { PagedList } from 'vs/base/browser/ui/list/listPaging'; +import { range } from 'vs/base/common/arrays'; // --- List Commands @@ -300,6 +301,22 @@ export function registerCommands(): void { } }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: 'list.selectAll', + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: WorkbenchListFocusContextKey, + primary: KeyMod.CtrlCmd | KeyCode.KEY_A, + handler: (accessor) => { + const focused = accessor.get(IListService).lastFocusedList; + + // List + if (focused instanceof List || focused instanceof PagedList) { + const list = focused; + list.setSelection(range(list.length)); + } + } + }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.toggleExpand', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), From 24ce0dfa70d6be4a3873a70269a97bb70c9598cf Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 11 Dec 2017 18:00:24 +0100 Subject: [PATCH 090/615] adopt lifecycleservice in integrity check --- src/vs/platform/integrity/common/integrity.ts | 3 +-- .../platform/integrity/node/integrityServiceImpl.ts | 12 +++++++----- src/vs/workbench/electron-browser/actions.ts | 6 +++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/vs/platform/integrity/common/integrity.ts b/src/vs/platform/integrity/common/integrity.ts index 747c07ca50d..6984b0fa8e7 100644 --- a/src/vs/platform/integrity/common/integrity.ts +++ b/src/vs/platform/integrity/common/integrity.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { TPromise } from 'vs/base/common/winjs.base'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import URI from 'vs/base/common/uri'; @@ -25,5 +24,5 @@ export interface IntegrityTestResult { export interface IIntegrityService { _serviceBrand: any; - isPure(): TPromise; + isPure(): Thenable; } diff --git a/src/vs/platform/integrity/node/integrityServiceImpl.ts b/src/vs/platform/integrity/node/integrityServiceImpl.ts index 33ce7582d89..96798846b0b 100644 --- a/src/vs/platform/integrity/node/integrityServiceImpl.ts +++ b/src/vs/platform/integrity/node/integrityServiceImpl.ts @@ -15,6 +15,7 @@ import URI from 'vs/base/common/uri'; import Severity from 'vs/base/common/severity'; import { Action } from 'vs/base/common/actions'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; interface IStorageData { dontShowPrompt: boolean; @@ -60,11 +61,12 @@ export class IntegrityServiceImpl implements IIntegrityService { private _messageService: IMessageService; private _storage: IntegrityStorage; - private _isPurePromise: TPromise; + private _isPurePromise: Thenable; constructor( @IMessageService messageService: IMessageService, - @IStorageService storageService: IStorageService + @IStorageService storageService: IStorageService, + @ILifecycleService private lifecycleService: ILifecycleService ) { this._messageService = messageService; this._storage = new IntegrityStorage(storageService); @@ -124,14 +126,14 @@ export class IntegrityServiceImpl implements IIntegrityService { }); } - public isPure(): TPromise { + public isPure(): Thenable { return this._isPurePromise; } - private _isPure(): TPromise { + private _isPure(): Thenable { const expectedChecksums = product.checksums || {}; - return TPromise.timeout(10000).then(() => { + return this.lifecycleService.when(LifecyclePhase.Eventually).then(() => { let asyncResults: TPromise[] = Object.keys(expectedChecksums).map((filename) => { return this._resolve(filename, expectedChecksums[filename]); }); diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 3b49a85201f..76d1c2d8e3a 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -999,13 +999,13 @@ export class ReportPerformanceIssueAction extends Action { } public run(appendix?: string): TPromise { - return this.integrityService.isPure().then(res => { + this.integrityService.isPure().then(res => { const issueUrl = this.generatePerformanceIssueUrl(product.reportIssueUrl, pkg.name, pkg.version, product.commit, product.date, res.isPure, appendix); window.open(issueUrl); - - return TPromise.as(true); }); + + return TPromise.wrap(true); } private generatePerformanceIssueUrl(baseUrl: string, name: string, version: string, commit: string, date: string, isPure: boolean, appendix?: string): string { From 29aeb102dc0ea5ebdfda1b96acf26412b8c6cd03 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 11 Dec 2017 18:14:59 +0100 Subject: [PATCH 091/615] Error code while scanning extensions --- .../node/extensionManagementService.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index a02c6e3c284..1acb28d74e6 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -34,6 +34,8 @@ import { isMacintosh } from 'vs/base/common/platform'; import { MANIFEST_CACHE_FOLDER, USER_MANIFEST_CACHE_FILE } from 'vs/platform/extensions/common/extensions'; const SystemExtensionsRoot = path.normalize(path.join(URI.parse(require.toUrl('')).fsPath, '..', 'extensions')); +const ERROR_SCANNING_SYS_EXTENSIONS = 'scanningSystem'; +const ERROR_SCANNING_USER_EXTENSIONS = 'scanningUser'; const INSTALL_ERROR_UNSET_UNINSTALLED = 'unsetUninstalled'; const INSTALL_ERROR_INCOMPATIBLE = 'incompatible'; const INSTALL_ERROR_DOWNLOADING = 'downloading'; @@ -171,7 +173,7 @@ export class ExtensionManagementService implements IExtensionManagementService { private checkOutdated(manifest: IExtensionManifest): TPromise { const extensionIdentifier = { id: getGalleryExtensionId(manifest.publisher, manifest.name) }; - return this.getInstalled() + return this.getInstalled(LocalExtensionType.User) .then(installedExtensions => { const newer = installedExtensions.filter(local => areSameExtensions(extensionIdentifier, { id: getGalleryExtensionIdFromLocal(local) }) && semver.gt(local.manifest.version, manifest.version))[0]; if (newer) { @@ -351,7 +353,7 @@ export class ExtensionManagementService implements IExtensionManagementService { if (isUninstalled) { // If the same version of extension is marked as uninstalled, remove it from there and return the local. return this.unsetUninstalled(id) - .then(() => this.getInstalled()) + .then(() => this.getInstalled(LocalExtensionType.User)) .then(installed => installed.filter(i => i.identifier.id === id)[0]); } return null; @@ -587,14 +589,14 @@ export class ExtensionManagementService implements IExtensionManagementService { const promises = []; if (type === null || type === LocalExtensionType.System) { - promises.push(this.scanSystemExtensions()); + promises.push(this.scanSystemExtensions().then(null, e => new ExtensionManagementError(this.joinErrors(e).message, ERROR_SCANNING_SYS_EXTENSIONS))); } if (type === null || type === LocalExtensionType.User) { - promises.push(this.scanUserExtensions(true)); + promises.push(this.scanUserExtensions(true).then(null, e => new ExtensionManagementError(this.joinErrors(e).message, ERROR_SCANNING_USER_EXTENSIONS))); } - return TPromise.join(promises).then(flatten); + return TPromise.join(promises).then(flatten, errors => TPromise.wrapError(this.joinErrors(errors))); } private scanSystemExtensions(): TPromise { From d09e6ef353fceffd8f3b5b16b9cd08e98b2d7103 Mon Sep 17 00:00:00 2001 From: colinfang Date: Mon, 11 Dec 2017 18:32:05 +0000 Subject: [PATCH 092/615] Fix md block under a list is recognized as a paragraph (#39952) --- extensions/markdown/syntaxes/markdown.tmLanguage | 8 ++++---- extensions/markdown/syntaxes/markdown.tmLanguage.base | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extensions/markdown/syntaxes/markdown.tmLanguage b/extensions/markdown/syntaxes/markdown.tmLanguage index 1c1edd48ad9..26a48c15d3e 100644 --- a/extensions/markdown/syntaxes/markdown.tmLanguage +++ b/extensions/markdown/syntaxes/markdown.tmLanguage @@ -522,11 +522,11 @@ include - #list_paragraph + #block include - #block + #list_paragraph while @@ -549,11 +549,11 @@ include - #list_paragraph + #block include - #block + #list_paragraph while diff --git a/extensions/markdown/syntaxes/markdown.tmLanguage.base b/extensions/markdown/syntaxes/markdown.tmLanguage.base index 91e71b45a4e..ca8b920a22f 100644 --- a/extensions/markdown/syntaxes/markdown.tmLanguage.base +++ b/extensions/markdown/syntaxes/markdown.tmLanguage.base @@ -347,11 +347,11 @@ include - #list_paragraph + #block include - #block + #list_paragraph while @@ -374,11 +374,11 @@ include - #list_paragraph + #block include - #block + #list_paragraph while From b82b1cd1b994c4092308336e63f083f387b0d95d Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 11 Dec 2017 19:26:07 +0100 Subject: [PATCH 093/615] Add logs to extension management service --- .../node/extensionManagementService.ts | 71 ++++++++++++++----- 1 file changed, 55 insertions(+), 16 deletions(-) diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index 1acb28d74e6..b1ab432828f 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -32,6 +32,7 @@ import { IChoiceService, Severity } from 'vs/platform/message/common/message'; import pkg from 'vs/platform/node/package'; import { isMacintosh } from 'vs/base/common/platform'; import { MANIFEST_CACHE_FOLDER, USER_MANIFEST_CACHE_FILE } from 'vs/platform/extensions/common/extensions'; +import { ILogService } from 'vs/platform/log/common/log'; const SystemExtensionsRoot = path.normalize(path.join(URI.parse(require.toUrl('')).fsPath, '..', 'extensions')); const ERROR_SCANNING_SYS_EXTENSIONS = 'scanningSystem'; @@ -119,7 +120,8 @@ export class ExtensionManagementService implements IExtensionManagementService { constructor( @IEnvironmentService environmentService: IEnvironmentService, @IChoiceService private choiceService: IChoiceService, - @IExtensionGalleryService private galleryService: IExtensionGalleryService + @IExtensionGalleryService private galleryService: IExtensionGalleryService, + @ILogService private logService: ILogService, ) { this.extensionsPath = environmentService.extensionsPath; this.uninstalledPath = path.join(this.extensionsPath, '.obsolete'); @@ -147,11 +149,13 @@ export class ExtensionManagementService implements IExtensionManagementService { () => this.checkOutdated(manifest) .then(validated => { if (validated) { + this.logService.info('Installing the extension', identifier.id); this._onInstallExtension.fire({ identifier, zipPath }); return this.getMetadata(getGalleryExtensionId(manifest.publisher, manifest.name)) .then( metadata => this.installFromZipPath(identifier, zipPath, metadata, manifest), - error => this.installFromZipPath(identifier, zipPath, null, manifest)); + error => this.installFromZipPath(identifier, zipPath, null, manifest)) + .then(() => this.logService.info('Successfully installed the extension', identifier.id), e => this.logService.error('Failed to install the extension', identifier.id, e.message)); } return null; }), @@ -163,9 +167,11 @@ export class ExtensionManagementService implements IExtensionManagementService { return this.isUninstalled(id) .then(isUninstalled => { if (isUninstalled) { + this.logService.trace('Removing the extension', id); const extensionPath = path.join(this.extensionsPath, id); return pfs.rimraf(extensionPath) - .then(() => this.unsetUninstalled(id)); + .then(() => this.unsetUninstalled(id)) + .then(() => this.logService.info('Reomved the extension', id)); } return null; }); @@ -263,13 +269,17 @@ export class ExtensionManagementService implements IExtensionManagementService { .then( compatible => { if (compatible) { + this.logService.trace('Downloading extension', extension.name); return this.galleryService.download(extension) .then( - zipPath => validateLocalExtension(zipPath) - .then( - () => ({ zipPath, id, metadata }), - error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_VALIDATING)) - ), + zipPath => { + this.logService.info('Downloaded extension', extension.name); + return validateLocalExtension(zipPath) + .then( + () => ({ zipPath, id, metadata }), + error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_VALIDATING)) + ); + }, error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_DOWNLOADING))); } else { return TPromise.wrapError(new ExtensionManagementError(nls.localize('notFoundCompatibleDependency', "Unable to install because, the depending extension '{0}' compatible with current version '{1}' of VS Code is not found.", extension.identifier.id, pkg.version), INSTALL_ERROR_INCOMPATIBLE)); @@ -286,6 +296,7 @@ export class ExtensionManagementService implements IExtensionManagementService { private onInstallExtensions(extensions: IGalleryExtension[]): void { for (const extension of extensions) { + this.logService.info('Installing extension', extension.name); const id = getLocalExtensionIdFromGallery(extension, extension.version); this._onInstallExtension.fire({ identifier: { id, uuid: extension.identifier.uuid }, gallery: extension }); } @@ -297,9 +308,11 @@ export class ExtensionManagementService implements IExtensionManagementService { const local = locals[index]; const error = errors[index]; if (local) { + this.logService.info(`Extensions installed successfully`, gallery.identifier.id); this._onDidInstallExtension.fire({ identifier, gallery, local }); } else { const errorCode = error && (error).code ? (error).code : INSTALL_ERROR_UNKNOWN; + this.logService.error(`Failed to install extension`, gallery.identifier.id, error ? error.message : errorCode); this._onDidInstallExtension.fire({ identifier, gallery, error: errorCode }); } }); @@ -351,9 +364,13 @@ export class ExtensionManagementService implements IExtensionManagementService { return this.isUninstalled(id) .then(isUninstalled => { if (isUninstalled) { + this.logService.trace('Removing the extension from uninstalled list', id); // If the same version of extension is marked as uninstalled, remove it from there and return the local. return this.unsetUninstalled(id) - .then(() => this.getInstalled(LocalExtensionType.User)) + .then(() => { + this.logService.info('Removed the extension from uninstalled list', id); + return this.getInstalled(LocalExtensionType.User); + }) .then(installed => installed.filter(i => i.identifier.id === id)[0]); } return null; @@ -364,10 +381,14 @@ export class ExtensionManagementService implements IExtensionManagementService { const extensionPath = path.join(this.extensionsPath, id); return pfs.rimraf(extensionPath) .then(() => { + this.logService.trace(`Extracting the extension from ${zipPath} to ${extensionPath}`, id); return extract(zipPath, extensionPath, { sourcePath: 'extension', overwrite: true }) .then( - () => TPromise.join([readManifest(extensionPath), pfs.readdir(extensionPath)]) - .then(null, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_LOCAL))), + () => { + this.logService.info(`Extracted extension to ${extensionPath}`, id); + return TPromise.join([readManifest(extensionPath), pfs.readdir(extensionPath)]) + .then(null, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_LOCAL))); + }, e => TPromise.wrapError(new ExtensionManagementError(e.message, INSTALL_ERROR_EXTRACTING))) .then(([{ manifest }, children]) => { const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0]; @@ -379,8 +400,12 @@ export class ExtensionManagementService implements IExtensionManagementService { const local: ILocalExtension = { type, identifier, manifest, metadata, path: extensionPath, readmeUrl, changelogUrl }; + this.logService.trace(`Updating metadata of the extension`, id); return this.saveMetadataForLocalExtension(local) - .then(() => local, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_LOCAL))); + .then(() => { + this.logService.info(`Updated metadata of the extension`, id); + return local; + }, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_LOCAL))); }); }, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_DELETING))); } @@ -472,6 +497,7 @@ export class ExtensionManagementService implements IExtensionManagementService { const dependencies = distinct(this.getDependenciesToUninstallRecursively(extension, installed, [])).filter(e => e !== extension); return this.uninstallWithDependencies(extension, dependencies, installed); } + this.logService.info('Cancelled uninstalling extension', extension.identifier.id); return TPromise.wrapError(errors.canceled()); }, error => TPromise.wrapError(errors.canceled())); } @@ -491,6 +517,7 @@ export class ExtensionManagementService implements IExtensionManagementService { if (value === 0) { return this.uninstallWithDependencies(extension, [], installed); } + this.logService.info('Cancelled uninstalling extension', extension.identifier.id); return TPromise.wrapError(errors.canceled()); }, error => TPromise.wrapError(errors.canceled())); } @@ -564,7 +591,10 @@ export class ExtensionManagementService implements IExtensionManagementService { const extensionPath = path.join(this.extensionsPath, extension.identifier.id); return pfs.exists(extensionPath) .then(exists => exists ? null : TPromise.wrapError(new Error(nls.localize('notExists', "Could not find extension")))) - .then(() => this._onUninstallExtension.fire(extension.identifier)); + .then(() => { + this.logService.info('Uninstalling extesion', extension.identifier.id); + this._onUninstallExtension.fire(extension.identifier); + }); } private uninstallExtension(local: ILocalExtension): TPromise { @@ -575,13 +605,15 @@ export class ExtensionManagementService implements IExtensionManagementService { } private async postUninstallExtension(extension: ILocalExtension, error?: string): TPromise { - if (!error) { + if (error) { + this.logService.info('Successfully uninstalled extesion', extension.identifier.id); + } else { + this.logService.error('Failed to uninstall extesion', extension.identifier.id, error); // only report if extension has a mapped gallery extension. UUID identifies the gallery extension. if (extension.identifier.uuid) { await this.galleryService.reportStatistic(extension.manifest.publisher, extension.manifest.name, extension.manifest.version, StatisticType.Uninstall); } } - this._onDidUninstallExtension.fire({ identifier: extension.identifier, error }); } @@ -600,12 +632,19 @@ export class ExtensionManagementService implements IExtensionManagementService { } private scanSystemExtensions(): TPromise { - return this.scanExtensions(SystemExtensionsRoot, LocalExtensionType.System); + this.logService.trace('Scanning system extesions'); + return this.scanExtensions(SystemExtensionsRoot, LocalExtensionType.System) + .then(result => { + this.logService.info('Finished scanning system extesions', result.length); + return result; + }); } private scanUserExtensions(excludeOutdated: boolean): TPromise { + this.logService.trace('Scanning user extesions'); return this.scanExtensions(this.extensionsPath, LocalExtensionType.User) .then(extensions => { + this.logService.info('Finished scanning user extesions', extensions.length); if (excludeOutdated) { const byExtension: ILocalExtension[][] = groupByExtension(extensions, e => ({ id: getGalleryExtensionIdFromLocal(e), uuid: e.identifier.uuid })); return byExtension.map(p => p.sort((a, b) => semver.rcompare(a.manifest.version, b.manifest.version))[0]); From 97876fc0f553195ce9be2a28174c051792200d24 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 11 Dec 2017 19:35:12 +0100 Subject: [PATCH 094/615] add logs to extension management service --- .../node/extensionManagementService.ts | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index b1ab432828f..8e98dd7857a 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -149,13 +149,13 @@ export class ExtensionManagementService implements IExtensionManagementService { () => this.checkOutdated(manifest) .then(validated => { if (validated) { - this.logService.info('Installing the extension', identifier.id); + this.logService.info('Installing the extension:', identifier.id); this._onInstallExtension.fire({ identifier, zipPath }); return this.getMetadata(getGalleryExtensionId(manifest.publisher, manifest.name)) .then( metadata => this.installFromZipPath(identifier, zipPath, metadata, manifest), error => this.installFromZipPath(identifier, zipPath, null, manifest)) - .then(() => this.logService.info('Successfully installed the extension', identifier.id), e => this.logService.error('Failed to install the extension', identifier.id, e.message)); + .then(() => this.logService.info('Successfully installed the extension:', identifier.id), e => this.logService.error('Failed to install the extension:', identifier.id, e.message)); } return null; }), @@ -167,11 +167,11 @@ export class ExtensionManagementService implements IExtensionManagementService { return this.isUninstalled(id) .then(isUninstalled => { if (isUninstalled) { - this.logService.trace('Removing the extension', id); + this.logService.trace('Removing the extension:', id); const extensionPath = path.join(this.extensionsPath, id); return pfs.rimraf(extensionPath) .then(() => this.unsetUninstalled(id)) - .then(() => this.logService.info('Reomved the extension', id)); + .then(() => this.logService.info('Reomved the extension:', id)); } return null; }); @@ -269,11 +269,11 @@ export class ExtensionManagementService implements IExtensionManagementService { .then( compatible => { if (compatible) { - this.logService.trace('Downloading extension', extension.name); + this.logService.trace('Started downloading extension:', extension.name); return this.galleryService.download(extension) .then( zipPath => { - this.logService.info('Downloaded extension', extension.name); + this.logService.info('Downloaded extension:', extension.name); return validateLocalExtension(zipPath) .then( () => ({ zipPath, id, metadata }), @@ -296,7 +296,7 @@ export class ExtensionManagementService implements IExtensionManagementService { private onInstallExtensions(extensions: IGalleryExtension[]): void { for (const extension of extensions) { - this.logService.info('Installing extension', extension.name); + this.logService.info('Installing extension:', extension.name); const id = getLocalExtensionIdFromGallery(extension, extension.version); this._onInstallExtension.fire({ identifier: { id, uuid: extension.identifier.uuid }, gallery: extension }); } @@ -308,11 +308,11 @@ export class ExtensionManagementService implements IExtensionManagementService { const local = locals[index]; const error = errors[index]; if (local) { - this.logService.info(`Extensions installed successfully`, gallery.identifier.id); + this.logService.info(`Extensions installed successfully:`, gallery.identifier.id); this._onDidInstallExtension.fire({ identifier, gallery, local }); } else { const errorCode = error && (error).code ? (error).code : INSTALL_ERROR_UNKNOWN; - this.logService.error(`Failed to install extension`, gallery.identifier.id, error ? error.message : errorCode); + this.logService.error(`Failed to install extension:`, gallery.identifier.id, error ? error.message : errorCode); this._onDidInstallExtension.fire({ identifier, gallery, error: errorCode }); } }); @@ -364,11 +364,11 @@ export class ExtensionManagementService implements IExtensionManagementService { return this.isUninstalled(id) .then(isUninstalled => { if (isUninstalled) { - this.logService.trace('Removing the extension from uninstalled list', id); + this.logService.trace('Removing the extension from uninstalled list:', id); // If the same version of extension is marked as uninstalled, remove it from there and return the local. return this.unsetUninstalled(id) .then(() => { - this.logService.info('Removed the extension from uninstalled list', id); + this.logService.info('Removed the extension from uninstalled list:', id); return this.getInstalled(LocalExtensionType.User); }) .then(installed => installed.filter(i => i.identifier.id === id)[0]); @@ -381,11 +381,11 @@ export class ExtensionManagementService implements IExtensionManagementService { const extensionPath = path.join(this.extensionsPath, id); return pfs.rimraf(extensionPath) .then(() => { - this.logService.trace(`Extracting the extension from ${zipPath} to ${extensionPath}`, id); + this.logService.trace(`Started extracting the extension from ${zipPath} to ${extensionPath}`); return extract(zipPath, extensionPath, { sourcePath: 'extension', overwrite: true }) .then( () => { - this.logService.info(`Extracted extension to ${extensionPath}`, id); + this.logService.info(`Extracted extension to ${extensionPath}:`, id); return TPromise.join([readManifest(extensionPath), pfs.readdir(extensionPath)]) .then(null, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_LOCAL))); }, @@ -400,10 +400,10 @@ export class ExtensionManagementService implements IExtensionManagementService { const local: ILocalExtension = { type, identifier, manifest, metadata, path: extensionPath, readmeUrl, changelogUrl }; - this.logService.trace(`Updating metadata of the extension`, id); + this.logService.trace(`Updating metadata of the extension:`, id); return this.saveMetadataForLocalExtension(local) .then(() => { - this.logService.info(`Updated metadata of the extension`, id); + this.logService.info(`Updated metadata of the extension:`, id); return local; }, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_LOCAL))); }); @@ -497,7 +497,7 @@ export class ExtensionManagementService implements IExtensionManagementService { const dependencies = distinct(this.getDependenciesToUninstallRecursively(extension, installed, [])).filter(e => e !== extension); return this.uninstallWithDependencies(extension, dependencies, installed); } - this.logService.info('Cancelled uninstalling extension', extension.identifier.id); + this.logService.info('Cancelled uninstalling extension:', extension.identifier.id); return TPromise.wrapError(errors.canceled()); }, error => TPromise.wrapError(errors.canceled())); } @@ -517,7 +517,7 @@ export class ExtensionManagementService implements IExtensionManagementService { if (value === 0) { return this.uninstallWithDependencies(extension, [], installed); } - this.logService.info('Cancelled uninstalling extension', extension.identifier.id); + this.logService.info('Cancelled uninstalling extension:', extension.identifier.id); return TPromise.wrapError(errors.canceled()); }, error => TPromise.wrapError(errors.canceled())); } @@ -592,7 +592,7 @@ export class ExtensionManagementService implements IExtensionManagementService { return pfs.exists(extensionPath) .then(exists => exists ? null : TPromise.wrapError(new Error(nls.localize('notExists', "Could not find extension")))) .then(() => { - this.logService.info('Uninstalling extesion', extension.identifier.id); + this.logService.info('Uninstalling extension:', extension.identifier.id); this._onUninstallExtension.fire(extension.identifier); }); } @@ -606,9 +606,9 @@ export class ExtensionManagementService implements IExtensionManagementService { private async postUninstallExtension(extension: ILocalExtension, error?: string): TPromise { if (error) { - this.logService.info('Successfully uninstalled extesion', extension.identifier.id); + this.logService.info('Successfully uninstalled extension:', extension.identifier.id); } else { - this.logService.error('Failed to uninstall extesion', extension.identifier.id, error); + this.logService.error('Failed to uninstall extension:', extension.identifier.id, error); // only report if extension has a mapped gallery extension. UUID identifies the gallery extension. if (extension.identifier.uuid) { await this.galleryService.reportStatistic(extension.manifest.publisher, extension.manifest.name, extension.manifest.version, StatisticType.Uninstall); @@ -632,19 +632,19 @@ export class ExtensionManagementService implements IExtensionManagementService { } private scanSystemExtensions(): TPromise { - this.logService.trace('Scanning system extesions'); + this.logService.trace('Started scanning system extensions'); return this.scanExtensions(SystemExtensionsRoot, LocalExtensionType.System) .then(result => { - this.logService.info('Finished scanning system extesions', result.length); + this.logService.info('Scanned system extensions:', result.length); return result; }); } private scanUserExtensions(excludeOutdated: boolean): TPromise { - this.logService.trace('Scanning user extesions'); + this.logService.trace('Started scanning user extensions'); return this.scanExtensions(this.extensionsPath, LocalExtensionType.User) .then(extensions => { - this.logService.info('Finished scanning user extesions', extensions.length); + this.logService.info('Scanned user extensions:', extensions.length); if (excludeOutdated) { const byExtension: ILocalExtension[][] = groupByExtension(extensions, e => ({ id: getGalleryExtensionIdFromLocal(e), uuid: e.identifier.uuid })); return byExtension.map(p => p.sort((a, b) => semver.rcompare(a.manifest.version, b.manifest.version))[0]); From d52302cd1ac3b36a3277c2848d93f495c05e178a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 11 Dec 2017 19:37:59 +0100 Subject: [PATCH 095/615] Fix logging --- .../extensionManagement/node/extensionManagementService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index 8e98dd7857a..0a8bac15123 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -606,9 +606,9 @@ export class ExtensionManagementService implements IExtensionManagementService { private async postUninstallExtension(extension: ILocalExtension, error?: string): TPromise { if (error) { - this.logService.info('Successfully uninstalled extension:', extension.identifier.id); - } else { this.logService.error('Failed to uninstall extension:', extension.identifier.id, error); + } else { + this.logService.info('Successfully uninstalled extension:', extension.identifier.id); // only report if extension has a mapped gallery extension. UUID identifies the gallery extension. if (extension.identifier.uuid) { await this.galleryService.reportStatistic(extension.manifest.publisher, extension.manifest.name, extension.manifest.version, StatisticType.Uninstall); From 380dc6349fbe8e2b214368d4f8bc519d34405673 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Mon, 11 Dec 2017 10:48:12 -0800 Subject: [PATCH 096/615] Fix #40040. we don't necessarily need to check whether we should trigger suggestions immediately after type. Postpone it to next tick. --- src/vs/editor/contrib/suggest/suggestModel.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/contrib/suggest/suggestModel.ts b/src/vs/editor/contrib/suggest/suggestModel.ts index fd804919392..6e3f371d09f 100644 --- a/src/vs/editor/contrib/suggest/suggestModel.ts +++ b/src/vs/editor/contrib/suggest/suggestModel.ts @@ -289,9 +289,9 @@ export class SuggestModel implements IDisposable { this.cancel(); - if (LineContext.shouldAutoTrigger(this._editor)) { - this._triggerAutoSuggestPromise = TPromise.timeout(this._quickSuggestDelay); - this._triggerAutoSuggestPromise.then(() => { + this._triggerAutoSuggestPromise = TPromise.timeout(this._quickSuggestDelay); + this._triggerAutoSuggestPromise.then(() => { + if (LineContext.shouldAutoTrigger(this._editor)) { const model = this._editor.getModel(); const pos = this._editor.getPosition(); @@ -319,10 +319,10 @@ export class SuggestModel implements IDisposable { } } - this._triggerAutoSuggestPromise = null; this.trigger({ auto: true }); - }); - } + } + this._triggerAutoSuggestPromise = null; + }); } } } From d8aec33ba6cfd0d45ef1734bd045581f2cf23251 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 11 Dec 2017 11:20:47 -0800 Subject: [PATCH 097/615] Remove some unused terminal code Part of #38414 --- .../workbench/parts/terminal/common/terminal.ts | 10 ---------- .../electron-browser/terminalInstance.ts | 16 ---------------- 2 files changed, 26 deletions(-) diff --git a/src/vs/workbench/parts/terminal/common/terminal.ts b/src/vs/workbench/parts/terminal/common/terminal.ts index 68add6effcc..850f7921cd8 100644 --- a/src/vs/workbench/parts/terminal/common/terminal.ts +++ b/src/vs/workbench/parts/terminal/common/terminal.ts @@ -349,16 +349,6 @@ export interface ITerminalInstance { */ setVisible(visible: boolean): void; - /** - * Attach a listener to the data stream from the terminal's pty process. - * - * @param listener The listener function which takes the processes' data stream (including - * ANSI escape sequences). - * - * @deprecated onLineData will replace this. - */ - onData(listener: (data: string) => void): IDisposable; - /** * Attach a listener to listen for new lines added to this terminal instance. * diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 46cc64e1c2f..f5886a2d038 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -823,22 +823,6 @@ export class TerminalInstance implements ITerminalInstance { return env; } - public onData(listener: (data: string) => void): lifecycle.IDisposable { - let callback = (message) => { - if (message.type === 'data') { - listener(message.content); - } - }; - this._process.on('message', callback); - return { - dispose: () => { - if (this._process) { - this._process.removeListener('message', callback); - } - } - }; - } - public onLineData(listener: (lineData: string) => void): lifecycle.IDisposable { this._onLineDataListeners.push(listener); return { From 267136923e55c2e671810591c659329d34d6d4ec Mon Sep 17 00:00:00 2001 From: TeeSeal Date: Mon, 11 Dec 2017 22:55:51 +0200 Subject: [PATCH 098/615] Handle Ruby auto-indent issues --- extensions/ruby/language-configuration.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/ruby/language-configuration.json b/extensions/ruby/language-configuration.json index fc4125f0691..830e9b2a060 100644 --- a/extensions/ruby/language-configuration.json +++ b/extensions/ruby/language-configuration.json @@ -23,7 +23,7 @@ ["'", "'"] ], "indentationRules": { - "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while)|(.*\\sdo\\b))\\b[^\\{;]*$", - "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif)\\b)" + "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|(.*\\sdo\\b))\\b[^\\{;]*$|.*=\\s*(case|if|unless)\\s*.+$", + "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)" } } From c8ef5888699d359b0f0268497000c3461ccd925f Mon Sep 17 00:00:00 2001 From: TeeSeal Date: Mon, 11 Dec 2017 23:28:55 +0200 Subject: [PATCH 099/615] Update regexp --- extensions/ruby/language-configuration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/ruby/language-configuration.json b/extensions/ruby/language-configuration.json index 830e9b2a060..a0a130e35cf 100644 --- a/extensions/ruby/language-configuration.json +++ b/extensions/ruby/language-configuration.json @@ -23,7 +23,7 @@ ["'", "'"] ], "indentationRules": { - "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|(.*\\sdo\\b))\\b[^\\{;]*$|.*=\\s*(case|if|unless)\\s*.+$", + "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|(.*\\sdo\\b))\\b[^\\{;]*$|.*=\\s*(case|if|unless).*$", "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)" } } From 18f96925bc9ad1258ae336f21b0ca426c5ebf11a Mon Sep 17 00:00:00 2001 From: TeeSeal Date: Mon, 11 Dec 2017 23:38:24 +0200 Subject: [PATCH 100/615] Move that along with the others --- extensions/ruby/language-configuration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/ruby/language-configuration.json b/extensions/ruby/language-configuration.json index a0a130e35cf..04a0fae6e09 100644 --- a/extensions/ruby/language-configuration.json +++ b/extensions/ruby/language-configuration.json @@ -23,7 +23,7 @@ ["'", "'"] ], "indentationRules": { - "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|(.*\\sdo\\b))\\b[^\\{;]*$|.*=\\s*(case|if|unless).*$", + "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|(.*\\sdo\\b)|(.*=\\s*(case|if|unless)))\\b[^\\{;]*$", "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)" } } From 36371dcaa5e23372a46105be6a46826e0bed720b Mon Sep 17 00:00:00 2001 From: Pine Wu Date: Mon, 11 Dec 2017 13:54:08 -0800 Subject: [PATCH 101/615] Point to correct keybinding in smoketest --- test/smoke/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke/src/main.ts b/test/smoke/src/main.ts index 41133e687b6..1d922106600 100644 --- a/test/smoke/src/main.ts +++ b/test/smoke/src/main.ts @@ -151,7 +151,7 @@ async function setup(): Promise { console.log('*** Test data:', testDataPath); console.log('*** Preparing smoketest setup...'); - const keybindingsUrl = `https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.${getKeybindingPlatform()}.json`; + const keybindingsUrl = `https://raw.githubusercontent.com/Microsoft/vscode-docs/master/build/keybindings/doc.keybindings.${getKeybindingPlatform()}.json`; console.log('*** Fetching keybindings...'); await new Promise((c, e) => { From 838189f2f11204e3473a362408205accbf3c402c Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Mon, 11 Dec 2017 13:57:07 -0800 Subject: [PATCH 102/615] Test case for #39750. --- .../api/mainThreadSaveParticipant.test.ts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts index e3e90a945e4..86df2854d43 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts @@ -15,6 +15,8 @@ import { IModelService } from 'vs/editor/common/services/modelService'; import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel'; import { ITextFileService, SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import { TextFileEditorModelManager } from 'vs/workbench/services/textfile/common/textFileEditorModelManager'; +import { Selection } from 'vs/editor/common/core/selection'; +import { Range } from 'vs/editor/common/core/range'; class ServiceAccessor { constructor( @ITextFileService public textFileService: TestTextFileService, @IModelService public modelService: IModelService) { @@ -112,4 +114,33 @@ suite('MainThreadSaveParticipant', function () { done(); }); }); + + test('trim final new lines bug#39750', function (done) { + const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/trim_final_new_line.txt'), 'utf8'); + + model.load().then(() => { + const configService = new TestConfigurationService(); + configService.setUserConfiguration('files', { 'trimFinalNewlines': true }); + + const participant = new TrimFinalNewLinesParticipant(configService, undefined); + + const textContent = 'Trim New Line'; + + // single line + let lineContent = `${textContent}`; + model.textEditorModel.setValue(lineContent); + // apply edits and push to undo stack. + let textEdits = [{ identifier: null, range: new Range(1, 14, 1, 14), text: '.', forceMoveMarkers: false }]; + model.textEditorModel.pushEditOperations([new Selection(1, 14, 1, 14)], textEdits, () => { return [new Selection(1, 15, 1, 15)]; }); + // undo + model.textEditorModel.undo(); + assert.equal(model.getValue(), `${textContent}`); + // trim final new lines should not mess the undo stack + participant.participate(model, { reason: SaveReason.EXPLICIT }); + model.textEditorModel.redo(); + assert.equal(model.getValue(), `${textContent}.`); + done(); + }); + }); + }); From ef7c07d87bacfe6687749f565b3052a54c5f8a70 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Mon, 11 Dec 2017 14:08:37 -0800 Subject: [PATCH 103/615] Carefull with autoimports as it doesn't handle imports order. --- .../electron-browser/api/mainThreadSaveParticipant.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts index 86df2854d43..d6f3681d331 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts @@ -12,11 +12,11 @@ import { TestConfigurationService } from 'vs/platform/configuration/test/common/ import { workbenchInstantiationService, TestTextFileService } from 'vs/workbench/test/workbenchTestServices'; import { toResource } from 'vs/base/test/common/utils'; import { IModelService } from 'vs/editor/common/services/modelService'; +import { Range } from 'vs/editor/common/core/range'; +import { Selection } from 'vs/editor/common/core/selection'; import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel'; import { ITextFileService, SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import { TextFileEditorModelManager } from 'vs/workbench/services/textfile/common/textFileEditorModelManager'; -import { Selection } from 'vs/editor/common/core/selection'; -import { Range } from 'vs/editor/common/core/range'; class ServiceAccessor { constructor( @ITextFileService public textFileService: TestTextFileService, @IModelService public modelService: IModelService) { From 4b6a988173138fe61f21b21e6ee79c60e69bd51a Mon Sep 17 00:00:00 2001 From: Nico Date: Mon, 11 Dec 2017 22:55:47 +0000 Subject: [PATCH 104/615] Fix LocalAppData location --- .../parts/terminal/electron-browser/terminalService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts index 8406f7c1025..871138e90c6 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts @@ -180,7 +180,7 @@ export class TerminalService extends AbstractTerminalService implements ITermina `${process.env['ProgramW6432']}\\Git\\usr\\bin\\bash.exe`, `${process.env['ProgramFiles']}\\Git\\bin\\bash.exe`, `${process.env['ProgramFiles']}\\Git\\usr\\bin\\bash.exe`, - `${process.env['LocalAppData']}\\Git\\usr\\bin\\bash.exe`, + `${process.env['LocalAppData']}\\Programs\\Git\\bin\\bash.exe`, ] }; const promises: TPromise<[string, string]>[] = []; From 0419dfb7b781c97c0aa685e1b79a0b6f5925e9f5 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Mon, 11 Dec 2017 14:58:01 -0800 Subject: [PATCH 105/615] Skip extension recommendations during extension development Fixes #29673 --- .../extensions/electron-browser/extensionTipsService.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts index ec1a3d56ead..d0fc19c59fb 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts @@ -28,6 +28,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import * as pfs from 'vs/base/node/pfs'; import * as os from 'os'; import { flatten, distinct } from 'vs/base/common/arrays'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; interface IExtensionsContent { recommendations: string[]; @@ -61,11 +62,12 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe @IWorkspaceContextService private contextService: IWorkspaceContextService, @IConfigurationService private configurationService: IConfigurationService, @IMessageService private messageService: IMessageService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private telemetryService: ITelemetryService, + @IEnvironmentService private environmentService: IEnvironmentService ) { super(); - if (!this._galleryService.isEnabled()) { + if (!this._galleryService.isEnabled() || this.environmentService.extensionDevelopmentPath) { return; } From 9b0764b65332e070a89a9b9189d0749056936cd9 Mon Sep 17 00:00:00 2001 From: kieferrm Date: Mon, 11 Dec 2017 14:57:51 -0800 Subject: [PATCH 106/615] short names windows processes, fixes #39895 --- src/vs/base/node/ps.ts | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/vs/base/node/ps.ts b/src/vs/base/node/ps.ts index 5f161533b5b..4fae9b9466d 100644 --- a/src/vs/base/node/ps.ts +++ b/src/vs/base/node/ps.ts @@ -61,12 +61,30 @@ export function listProcesses(rootPid: number): Promise { function findName(cmd: string): string { const RENDERER_PROCESS_HINT = /--disable-blink-features=Auxclick/; - const WINDOWS_WATCHER_HINT = /\\watcher\\win32\\CodeHelper.exe/; + const WINDOWS_WATCHER_HINT = /\\watcher\\win32\\CodeHelper\.exe/; + const WINDOWS_CRASH_REPORTER = /--crashes-directory/; + const WINDOWS_PTY = /\\pipe\\winpty-control/; + const WINDOWS_CONSOLE_HOST = /conhost\.exe/; const TYPE = /--type=([a-zA-Z-]+)/; // find windows file watcher if (WINDOWS_WATCHER_HINT.exec(cmd)) { - return 'watcherService'; + return 'watcherService '; + } + + // find windows crash reporter + if (WINDOWS_CRASH_REPORTER.exec(cmd)) { + return 'electron-crash-reporter'; + } + + // find windows pty process + if (WINDOWS_PTY.exec(cmd)) { + return 'winpty-process'; + } + + //find windows console host process + if (WINDOWS_CONSOLE_HOST.exec(cmd)) { + return 'console-window-host (Windows internal process)'; } // find "--type=xxxx" From b4bb439b2782bcc65e9f7b9b54b6a097755dd8ba Mon Sep 17 00:00:00 2001 From: Till Date: Tue, 12 Dec 2017 09:27:17 +0100 Subject: [PATCH 107/615] Merge with master --- .github/classifier.yml | 34 +- .github/commands.yml | 28 +- .nvmrc | 1 + .travis.yml | 1 + .vscode/settings.json | 3 +- OSSREADME.json | 37 + ThirdPartyNotices.txt | 193 +- appveyor.yml | 1 + build/gulpfile.hygiene.js | 1 + build/gulpfile.vscode.js | 9 +- build/lib/i18n.js | 2 +- build/lib/i18n.ts | 2 +- .../lib/tslint/noUnexternalizedStringsRule.js | 10 + .../lib/tslint/noUnexternalizedStringsRule.ts | 9 + build/tslint.json | 2 +- build/win32/i18n/messages.ja.isl | 2 +- extensions/OSSREADME.json | 7 + extensions/bat/package.json | 4 + .../bat/snippets/batchfile.snippets.json | 16 + .../coffeescript/language-configuration.json | 8 +- extensions/coffeescript/package.json | 6 +- .../snippets/coffeescript.snippets.json | 16 + extensions/configuration-editing/package.json | 2 +- .../configuration-editing/src/extension.ts | 4 +- .../src/settingsDocumentHelper.ts | 15 +- extensions/cpp/language-configuration.json | 4 - extensions/css/client/src/cssMain.ts | 29 +- extensions/css/server/package.json | 10 +- extensions/css/server/yarn.lock | 6 +- extensions/emmet/package.json | 21 +- extensions/emmet/package.nls.json | 5 +- extensions/emmet/src/abbreviationActions.ts | 96 +- .../emmet/src/defaultCompletionProvider.ts | 71 +- .../emmet/src/test/abbreviationAction.test.ts | 346 +- .../emmet/src/test/updateImageSize.test.ts | 274 +- extensions/emmet/yarn.lock | 6 +- extensions/git/package.json | 223 +- extensions/git/package.nls.json | 2 + extensions/git/resources/icons/dark/clean.svg | 2 +- .../git/resources/icons/light/clean.svg | 2 +- extensions/git/src/api.ts | 42 + extensions/git/src/autofetch.ts | 50 +- extensions/git/src/commands.ts | 132 +- extensions/git/src/contentProvider.ts | 4 +- extensions/git/src/decorationProvider.ts | 26 +- extensions/git/src/git.ts | 6 +- extensions/git/src/main.ts | 36 +- extensions/git/src/model.ts | 93 +- extensions/git/src/repository.ts | 72 +- extensions/git/src/staging.ts | 12 +- extensions/git/src/statusbar.ts | 4 +- extensions/git/src/util.ts | 16 +- extensions/go/language-configuration.json | 2 +- extensions/html/client/src/htmlMain.ts | 27 +- extensions/html/language-configuration.json | 8 +- extensions/html/package.json | 10 + extensions/html/server/package.json | 16 +- extensions/html/server/src/htmlServerMain.ts | 2 +- .../html/server/src/modes/javascriptMode.ts | 1 + extensions/html/server/yarn.lock | 12 +- .../html.json => snippets/html.snippets.json} | 10 +- extensions/java/package.json | 4 + extensions/java/snippets/java.snippets.json | 16 + extensions/javascript/package.json | 4 + .../src/features/bowerJSONContribution.ts | 12 +- .../syntaxes/JavaScript.tmLanguage.json | 22 +- .../syntaxes/JavaScriptReact.tmLanguage.json | 22 +- .../test/colorize-results/test_jsx.json | 18 +- extensions/json/client/src/jsonMain.ts | 12 +- extensions/json/package.json | 31 +- extensions/json/server/package.json | 10 +- extensions/json/server/src/jsonServerMain.ts | 86 +- extensions/json/server/src/utils/errors.ts | 33 + extensions/json/server/yarn.lock | 6 +- extensions/less/language-configuration.json | 6 + extensions/markdown/src/commandManager.ts | 36 + extensions/markdown/src/commands.ts | 291 + extensions/markdown/src/extension.ts | 315 +- .../{ => features}/documentLinkProvider.ts | 14 +- .../{ => features}/documentSymbolProvider.ts | 4 +- extensions/markdown/src/markdownExtensions.ts | 86 + .../markdown/src/previewContentProvider.ts | 318 - extensions/markdown/src/security.ts | 2 +- extensions/markdown/src/telemetryReporter.ts | 60 + .../markdown/syntaxes/markdown.tmLanguage | 12 +- .../syntaxes/markdown.tmLanguage.base | 12 +- .../markdown/test/colorize-fixtures/test.md | 1 + .../test/colorize-results/test_md.json | 44 + extensions/merge-conflict/package.json | 5 + extensions/merge-conflict/package.nls.json | 1 + .../ms-vscode.node-debug/OSSREADME.json | 143 +- .../ms-vscode.node-debug/package-lock.json | 7077 +++++++++++++++++ .../ms-vscode.node-debug2/OSSREADME.json | 171 +- .../ms-vscode.node-debug2/package-lock.json | 5106 ++++++++++++ extensions/package.json | 2 +- extensions/php/package.json | 2 +- .../snippets/{php.json => php.snippets.json} | 14 + .../src/features/completionItemProvider.ts | 12 +- extensions/php/src/phpMain.ts | 1 - extensions/python/language-configuration.json | 18 +- extensions/ruby/language-configuration.json | 4 +- extensions/scss/language-configuration.json | 8 +- .../theme-defaults/themes/dark_plus.json | 3 +- .../theme-defaults/themes/hc_black.json | 3 +- .../theme-defaults/themes/light_plus.json | 3 +- .../themes/quietlight-color-theme.json | 24 +- extensions/typescript/package.json | 28 +- extensions/typescript/src/commands.ts | 100 + extensions/typescript/src/extension.ts | 97 + .../src/features/completionItemProvider.ts | 67 +- .../src/features/formattingProvider.ts | 6 +- .../src/features/quickFixProvider.ts | 30 +- .../src/features/refactorProvider.ts | 2 +- .../typescript/src/features/taskProvider.ts | 47 +- extensions/typescript/src/typescriptMain.ts | 228 +- .../typescript/src/typescriptServiceClient.ts | 23 +- extensions/typescript/src/utils/api.ts | 4 + .../typescript/src/utils/fileSchemes.ts | 20 + .../src/utils/languageDescription.ts | 27 + extensions/typescript/src/utils/lazy.ts | 39 + .../src/utils/managedFileContext.ts | 51 + extensions/typescript/src/utils/previewer.ts | 1 + extensions/typescript/src/utils/tsconfig.ts | 3 +- .../typescript/src/utils/versionStatus.ts | 19 +- .../syntaxes/TypeScript.tmLanguage.json | 24 +- .../syntaxes/TypeScriptReact.tmLanguage.json | 22 +- extensions/yarn.lock | 6 +- .../css/client/out/cssMain.i18n.json | 4 +- i18n/chs/extensions/css/package.i18n.json | 2 +- .../extensions/git/out/autofetch.i18n.json | 11 + .../chs/extensions/git/out/commands.i18n.json | 8 +- i18n/chs/extensions/git/out/main.i18n.json | 5 +- .../extensions/git/out/repository.i18n.json | 1 + i18n/chs/extensions/git/package.i18n.json | 11 +- .../html/client/out/htmlMain.i18n.json | 4 +- .../markdown/out/commands.i18n.json | 9 + .../features/previewContentProvider.i18n.json | 10 + .../markdown/out/security.i18n.json | 3 + .../merge-conflict/package.i18n.json | 1 + i18n/chs/extensions/php/package.i18n.json | 2 +- .../features/completionItemProvider.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 7 - .../src/vs/code/electron-main/main.i18n.json | 12 + .../src/vs/code/electron-main/menus.i18n.json | 13 +- .../src/vs/code/node/cliProcessMain.i18n.json | 2 +- .../browser/services/bulkEdit.i18n.json | 11 + .../config/commonEditorConfig.i18n.json | 18 +- .../bracketMatching/bracketMatching.i18n.json | 8 + .../caretOperations/caretOperations.i18n.json | 9 + .../caretOperations/transpose.i18n.json | 8 + .../contrib/clipboard/clipboard.i18n.json | 11 + .../editor/contrib/comment/comment.i18n.json | 11 + .../contrib/contextmenu/contextmenu.i18n.json | 8 + .../contrib/find/findController.i18n.json | 15 + .../editor/contrib/find/findWidget.i18n.json | 21 + .../contrib/find/simpleFindWidget.i18n.json | 12 + .../editor/contrib/folding/folding.i18n.json | 15 + .../contrib/format/formatActions.i18n.json | 14 + .../goToDeclarationCommands.i18n.json | 23 + .../goToDeclarationMouse.i18n.json | 8 + .../contrib/gotoError/gotoError.i18n.json | 14 + .../vs/editor/contrib/hover/hover.i18n.json | 8 + .../contrib/hover/modesContentHover.i18n.json | 8 + .../inPlaceReplace/inPlaceReplace.i18n.json | 9 + .../contrib/indentation/indentation.i18n.json | 15 + .../linesOperations/linesOperations.i18n.json | 25 + .../vs/editor/contrib/links/links.i18n.json | 16 + .../contrib/multicursor/multicursor.i18n.json | 16 + .../parameterHints/parameterHints.i18n.json | 8 + .../parameterHintsWidget.i18n.json | 8 + .../quickFix/quickFixCommands.i18n.json | 10 + .../referenceSearch/peekViewWidget.i18n.json | 8 + .../referenceSearch/referenceSearch.i18n.json | 9 + .../referencesController.i18n.json | 8 + .../referenceSearch/referencesModel.i18n.json | 14 + .../referencesWidget.i18n.json | 27 + .../vs/editor/contrib/rename/rename.i18n.json | 11 + .../contrib/rename/renameInputField.i18n.json | 8 + .../contrib/smartSelect/smartSelect.i18n.json | 9 + .../suggest/suggestController.i18n.json | 9 + .../contrib/suggest/suggestWidget.i18n.json | 21 + .../toggleTabFocusMode.i18n.json | 8 + .../wordHighlighter/wordHighlighter.i18n.json | 13 + .../menusExtensionPoint.i18n.json | 4 +- .../platform/environment/node/argv.i18n.json | 7 +- .../node/extensionGalleryService.i18n.json | 3 +- .../node/extensionManagementService.i18n.json | 9 +- .../common/extensionsRegistry.i18n.json | 12 +- .../theme/common/colorRegistry.i18n.json | 6 +- .../actions/toggleTabsVisibility.i18n.json | 9 + .../compositeBarActions.i18n.json | 1 + .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorCommands.i18n.json | 2 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../electron-browser/actions.i18n.json | 24 +- .../main.contribution.i18n.json | 12 +- .../debug/browser/debugActions.i18n.json | 1 - .../breakpointsView.i18n.json | 11 + .../electron-browser/callStackView.i18n.json | 18 + .../debug.contribution.i18n.json | 5 + .../electron-browser/debugService.i18n.json | 3 +- .../electron-browser/variablesView.i18n.json | 12 + .../watchExpressionsView.i18n.json | 13 + .../browser/extensionEditor.i18n.json | 2 + .../browser/extensionsActions.i18n.json | 15 +- .../browser/extensionsQuickOpen.i18n.json | 2 +- .../browser/extensionsWidgets.i18n.json | 8 + .../extensionProfileService.i18n.json | 8 + .../extensions.contribution.i18n.json | 4 +- .../extensionsViewlet.i18n.json | 2 +- .../runtimeExtensionsEditor.i18n.json | 19 + .../parts/files/browser/fileActions.i18n.json | 4 +- .../explorerViewlet.i18n.json | 8 + .../fileActions.contribution.i18n.json | 11 + .../electron-browser/fileActions.i18n.json | 75 + .../electron-browser/fileCommands.i18n.json | 9 + .../files.contribution.i18n.json | 53 + .../saveErrorHandler.i18n.json | 16 + .../views/emptyView.i18n.json | 13 + .../explorerDecorationsProvider.i18n.json | 9 + .../views/explorerView.i18n.json | 9 + .../views/explorerViewer.i18n.json | 19 + .../views/openEditorsView.i18n.json | 16 + .../views/openEditorsViewer.i18n.json | 15 + .../markers/browser/markersPanel.i18n.json | 9 + .../parts/markers/common/messages.i18n.json | 3 +- .../startupProfiler.i18n.json | 13 + .../browser/keybindingWidgets.i18n.json | 2 +- .../browser/keybindingsEditor.i18n.json | 1 + .../browser/preferencesActions.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 6 +- .../browser/preferencesRenderers.i18n.json | 2 - .../browser/preferencesWidgets.i18n.json | 9 +- .../preferences.contribution.i18n.json | 10 + .../scm/electron-browser/scmViewlet.i18n.json | 1 - .../browser/patternInputWidget.i18n.json | 3 +- .../browser/search.contribution.i18n.json | 1 - .../search/browser/searchActions.i18n.json | 7 +- .../search.contribution.i18n.json | 22 + .../electron-browser/searchActions.i18n.json | 9 + .../task.contribution.i18n.json | 7 +- .../terminalTaskSystem.i18n.json | 1 + .../tasks/node/taskConfiguration.i18n.json | 4 +- .../browser/terminalQuickOpen.i18n.json | 2 +- .../terminal.contribution.i18n.json | 2 +- .../terminalService.i18n.json | 2 +- .../themes.contribution.i18n.json | 6 +- .../vs_code_welcome_page.i18n.json | 2 +- .../configurationExtensionPoint.i18n.json | 2 +- .../crashReporterService.i18n.json | 9 + .../extensionHostProfiler.i18n.json | 8 + .../extensionService.i18n.json | 3 +- .../services/files/node/fileService.i18n.json | 2 +- .../keybindingService.i18n.json | 2 +- .../textfile/common/textFileService.i18n.json | 2 +- .../workbenchThemeService.i18n.json | 2 - .../extensions/git/out/autofetch.i18n.json | 9 + .../cht/extensions/git/out/commands.i18n.json | 4 +- i18n/cht/extensions/git/out/main.i18n.json | 2 +- .../extensions/git/out/repository.i18n.json | 1 + i18n/cht/extensions/git/package.i18n.json | 3 + .../markdown/out/commands.i18n.json | 9 + .../features/previewContentProvider.i18n.json | 10 + .../extensions/typescript/package.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 7 - .../src/vs/code/electron-main/main.i18n.json | 11 + .../src/vs/code/electron-main/menus.i18n.json | 9 +- .../browser/services/bulkEdit.i18n.json | 11 + .../config/commonEditorConfig.i18n.json | 12 +- .../bracketMatching/bracketMatching.i18n.json | 8 + .../caretOperations/caretOperations.i18n.json | 9 + .../caretOperations/transpose.i18n.json | 8 + .../contrib/clipboard/clipboard.i18n.json | 11 + .../editor/contrib/comment/comment.i18n.json | 11 + .../contrib/contextmenu/contextmenu.i18n.json | 8 + .../contrib/find/findController.i18n.json | 15 + .../editor/contrib/find/findWidget.i18n.json | 21 + .../contrib/find/simpleFindWidget.i18n.json | 12 + .../editor/contrib/folding/folding.i18n.json | 15 + .../contrib/format/formatActions.i18n.json | 14 + .../goToDeclarationCommands.i18n.json | 23 + .../goToDeclarationMouse.i18n.json | 8 + .../contrib/gotoError/gotoError.i18n.json | 14 + .../vs/editor/contrib/hover/hover.i18n.json | 8 + .../contrib/hover/modesContentHover.i18n.json | 8 + .../inPlaceReplace/inPlaceReplace.i18n.json | 9 + .../contrib/indentation/indentation.i18n.json | 15 + .../linesOperations/linesOperations.i18n.json | 25 + .../vs/editor/contrib/links/links.i18n.json | 16 + .../contrib/multicursor/multicursor.i18n.json | 16 + .../parameterHints/parameterHints.i18n.json | 8 + .../parameterHintsWidget.i18n.json | 8 + .../quickFix/quickFixCommands.i18n.json | 10 + .../referenceSearch/peekViewWidget.i18n.json | 8 + .../referenceSearch/referenceSearch.i18n.json | 9 + .../referencesController.i18n.json | 8 + .../referenceSearch/referencesModel.i18n.json | 14 + .../referencesWidget.i18n.json | 27 + .../vs/editor/contrib/rename/rename.i18n.json | 11 + .../contrib/rename/renameInputField.i18n.json | 8 + .../contrib/smartSelect/smartSelect.i18n.json | 9 + .../suggest/suggestController.i18n.json | 9 + .../contrib/suggest/suggestWidget.i18n.json | 21 + .../toggleTabFocusMode.i18n.json | 8 + .../wordHighlighter/wordHighlighter.i18n.json | 13 + .../platform/environment/node/argv.i18n.json | 3 + .../node/extensionGalleryService.i18n.json | 3 +- .../node/extensionManagementService.i18n.json | 9 +- .../common/extensionsRegistry.i18n.json | 1 + .../actions/toggleTabsVisibility.i18n.json | 9 + .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorCommands.i18n.json | 2 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../electron-browser/actions.i18n.json | 13 +- .../main.contribution.i18n.json | 10 +- .../debug/browser/debugActions.i18n.json | 1 - .../breakpointsView.i18n.json | 11 + .../electron-browser/callStackView.i18n.json | 18 + .../debug.contribution.i18n.json | 1 + .../electron-browser/debugService.i18n.json | 1 - .../electron-browser/variablesView.i18n.json | 12 + .../watchExpressionsView.i18n.json | 13 + .../browser/extensionEditor.i18n.json | 2 + .../browser/extensionsActions.i18n.json | 15 +- .../browser/extensionsWidgets.i18n.json | 6 + .../extensionProfileService.i18n.json | 6 + .../extensions.contribution.i18n.json | 4 +- .../runtimeExtensionsEditor.i18n.json | 8 + .../parts/files/browser/fileActions.i18n.json | 4 +- .../explorerViewlet.i18n.json | 8 + .../fileActions.contribution.i18n.json | 11 + .../electron-browser/fileActions.i18n.json | 75 + .../electron-browser/fileCommands.i18n.json | 9 + .../files.contribution.i18n.json | 53 + .../saveErrorHandler.i18n.json | 16 + .../views/emptyView.i18n.json | 13 + .../explorerDecorationsProvider.i18n.json | 9 + .../views/explorerView.i18n.json | 9 + .../views/explorerViewer.i18n.json | 19 + .../views/openEditorsView.i18n.json | 16 + .../views/openEditorsViewer.i18n.json | 15 + .../markers/browser/markersPanel.i18n.json | 6 + .../parts/markers/common/messages.i18n.json | 2 - .../startupProfiler.i18n.json | 13 + .../browser/keybindingWidgets.i18n.json | 1 - .../browser/keybindingsEditor.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 6 +- .../browser/preferencesRenderers.i18n.json | 2 - .../browser/preferencesWidgets.i18n.json | 7 +- .../preferences.contribution.i18n.json | 10 + .../scm/electron-browser/scmViewlet.i18n.json | 1 - .../browser/patternInputWidget.i18n.json | 3 +- .../browser/search.contribution.i18n.json | 1 - .../search/browser/searchActions.i18n.json | 7 +- .../search.contribution.i18n.json | 22 + .../electron-browser/searchActions.i18n.json | 9 + .../task.contribution.i18n.json | 4 +- .../terminalTaskSystem.i18n.json | 1 + .../tasks/node/taskConfiguration.i18n.json | 2 - .../browser/terminalQuickOpen.i18n.json | 2 +- .../terminal.contribution.i18n.json | 1 - .../themes.contribution.i18n.json | 5 +- .../configurationExtensionPoint.i18n.json | 2 +- .../crashReporterService.i18n.json | 9 + .../browser/decorationsService.i18n.json | 4 +- .../extensionHostProfiler.i18n.json | 6 + .../services/files/node/fileService.i18n.json | 2 +- .../keybindingService.i18n.json | 3 +- .../textfile/common/textFileService.i18n.json | 4 +- .../workbenchThemeService.i18n.json | 2 - .../extensions/git/out/autofetch.i18n.json | 9 + .../deu/extensions/git/out/commands.i18n.json | 5 +- i18n/deu/extensions/git/out/main.i18n.json | 3 +- .../extensions/git/out/repository.i18n.json | 1 + i18n/deu/extensions/git/package.i18n.json | 2 + .../markdown/out/commands.i18n.json | 9 + .../features/previewContentProvider.i18n.json | 10 + .../src/vs/base/common/errorMessage.i18n.json | 7 - .../src/vs/code/electron-main/main.i18n.json | 8 + .../src/vs/code/electron-main/menus.i18n.json | 11 +- .../browser/services/bulkEdit.i18n.json | 11 + .../config/commonEditorConfig.i18n.json | 12 +- .../bracketMatching/bracketMatching.i18n.json | 8 + .../caretOperations/caretOperations.i18n.json | 9 + .../caretOperations/transpose.i18n.json | 8 + .../contrib/clipboard/clipboard.i18n.json | 11 + .../editor/contrib/comment/comment.i18n.json | 11 + .../contrib/contextmenu/contextmenu.i18n.json | 8 + .../contrib/find/findController.i18n.json | 15 + .../editor/contrib/find/findWidget.i18n.json | 21 + .../contrib/find/simpleFindWidget.i18n.json | 12 + .../editor/contrib/folding/folding.i18n.json | 15 + .../contrib/format/formatActions.i18n.json | 14 + .../goToDeclarationCommands.i18n.json | 23 + .../goToDeclarationMouse.i18n.json | 8 + .../contrib/gotoError/gotoError.i18n.json | 14 + .../vs/editor/contrib/hover/hover.i18n.json | 8 + .../contrib/hover/modesContentHover.i18n.json | 8 + .../inPlaceReplace/inPlaceReplace.i18n.json | 9 + .../contrib/indentation/indentation.i18n.json | 15 + .../linesOperations/linesOperations.i18n.json | 25 + .../vs/editor/contrib/links/links.i18n.json | 16 + .../contrib/multicursor/multicursor.i18n.json | 16 + .../parameterHints/parameterHints.i18n.json | 8 + .../parameterHintsWidget.i18n.json | 8 + .../quickFix/quickFixCommands.i18n.json | 10 + .../referenceSearch/peekViewWidget.i18n.json | 8 + .../referenceSearch/referenceSearch.i18n.json | 9 + .../referencesController.i18n.json | 8 + .../referenceSearch/referencesModel.i18n.json | 14 + .../referencesWidget.i18n.json | 27 + .../vs/editor/contrib/rename/rename.i18n.json | 11 + .../contrib/rename/renameInputField.i18n.json | 8 + .../contrib/smartSelect/smartSelect.i18n.json | 9 + .../suggest/suggestController.i18n.json | 9 + .../contrib/suggest/suggestWidget.i18n.json | 21 + .../toggleTabFocusMode.i18n.json | 8 + .../wordHighlighter/wordHighlighter.i18n.json | 13 + .../node/extensionGalleryService.i18n.json | 3 +- .../node/extensionManagementService.i18n.json | 5 +- .../actions/toggleTabsVisibility.i18n.json | 8 + .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorCommands.i18n.json | 1 - .../parts/editor/editorStatus.i18n.json | 3 +- .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../electron-browser/actions.i18n.json | 13 +- .../main.contribution.i18n.json | 10 +- .../debug/browser/debugActions.i18n.json | 1 - .../breakpointsView.i18n.json | 11 + .../electron-browser/callStackView.i18n.json | 18 + .../electron-browser/debugService.i18n.json | 1 - .../electron-browser/variablesView.i18n.json | 12 + .../watchExpressionsView.i18n.json | 13 + .../browser/extensionsActions.i18n.json | 15 +- .../browser/extensionsWidgets.i18n.json | 6 + .../extensionProfileService.i18n.json | 6 + .../extensions.contribution.i18n.json | 4 +- .../runtimeExtensionsEditor.i18n.json | 8 + .../explorerViewlet.i18n.json | 8 + .../fileActions.contribution.i18n.json | 11 + .../electron-browser/fileActions.i18n.json | 73 + .../electron-browser/fileCommands.i18n.json | 9 + .../files.contribution.i18n.json | 53 + .../saveErrorHandler.i18n.json | 16 + .../views/emptyView.i18n.json | 12 + .../explorerDecorationsProvider.i18n.json | 9 + .../views/explorerView.i18n.json | 9 + .../views/explorerViewer.i18n.json | 18 + .../views/openEditorsView.i18n.json | 16 + .../views/openEditorsViewer.i18n.json | 15 + .../markers/browser/markersPanel.i18n.json | 6 + .../parts/markers/common/messages.i18n.json | 2 - .../startupProfiler.i18n.json | 13 + .../browser/keybindingWidgets.i18n.json | 1 - .../browser/keybindingsEditor.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 6 +- .../browser/preferencesRenderers.i18n.json | 2 - .../browser/preferencesWidgets.i18n.json | 6 +- .../preferences.contribution.i18n.json | 10 + .../scm/electron-browser/scmViewlet.i18n.json | 1 - .../browser/patternInputWidget.i18n.json | 4 +- .../browser/search.contribution.i18n.json | 1 - .../search/browser/searchActions.i18n.json | 7 +- .../search.contribution.i18n.json | 22 + .../electron-browser/searchActions.i18n.json | 9 + .../task.contribution.i18n.json | 3 - .../tasks/node/taskConfiguration.i18n.json | 2 - .../browser/terminalQuickOpen.i18n.json | 2 +- .../terminal.contribution.i18n.json | 1 - .../themes.contribution.i18n.json | 3 +- .../configurationExtensionPoint.i18n.json | 2 +- .../crashReporterService.i18n.json | 9 + .../browser/decorationsService.i18n.json | 4 +- .../extensionHostProfiler.i18n.json | 6 + .../services/files/node/fileService.i18n.json | 2 +- .../keybindingService.i18n.json | 3 +- .../textfile/common/textFileService.i18n.json | 4 +- .../workbenchThemeService.i18n.json | 2 - .../css/client/out/cssMain.i18n.json | 4 +- .../extensions/git/out/autofetch.i18n.json | 11 + .../esn/extensions/git/out/commands.i18n.json | 8 +- i18n/esn/extensions/git/out/main.i18n.json | 5 +- .../extensions/git/out/repository.i18n.json | 1 + i18n/esn/extensions/git/package.i18n.json | 5 + .../html/client/out/htmlMain.i18n.json | 4 +- .../markdown/out/commands.i18n.json | 9 + .../features/previewContentProvider.i18n.json | 10 + .../markdown/out/security.i18n.json | 3 + .../merge-conflict/package.i18n.json | 1 + .../features/completionItemProvider.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 7 - .../src/vs/code/electron-main/main.i18n.json | 12 + .../src/vs/code/electron-main/menus.i18n.json | 13 +- .../browser/services/bulkEdit.i18n.json | 11 + .../config/commonEditorConfig.i18n.json | 10 +- .../bracketMatching/bracketMatching.i18n.json | 8 + .../caretOperations/caretOperations.i18n.json | 9 + .../caretOperations/transpose.i18n.json | 8 + .../contrib/clipboard/clipboard.i18n.json | 11 + .../editor/contrib/comment/comment.i18n.json | 11 + .../contrib/contextmenu/contextmenu.i18n.json | 8 + .../contrib/find/findController.i18n.json | 15 + .../editor/contrib/find/findWidget.i18n.json | 21 + .../contrib/find/simpleFindWidget.i18n.json | 12 + .../editor/contrib/folding/folding.i18n.json | 15 + .../contrib/format/formatActions.i18n.json | 14 + .../goToDeclarationCommands.i18n.json | 23 + .../goToDeclarationMouse.i18n.json | 8 + .../contrib/gotoError/gotoError.i18n.json | 14 + .../vs/editor/contrib/hover/hover.i18n.json | 8 + .../contrib/hover/modesContentHover.i18n.json | 8 + .../inPlaceReplace/inPlaceReplace.i18n.json | 9 + .../contrib/indentation/indentation.i18n.json | 15 + .../linesOperations/linesOperations.i18n.json | 25 + .../vs/editor/contrib/links/links.i18n.json | 16 + .../contrib/multicursor/multicursor.i18n.json | 16 + .../parameterHints/parameterHints.i18n.json | 8 + .../parameterHintsWidget.i18n.json | 8 + .../quickFix/quickFixCommands.i18n.json | 10 + .../referenceSearch/peekViewWidget.i18n.json | 8 + .../referenceSearch/referenceSearch.i18n.json | 9 + .../referencesController.i18n.json | 8 + .../referenceSearch/referencesModel.i18n.json | 14 + .../referencesWidget.i18n.json | 27 + .../vs/editor/contrib/rename/rename.i18n.json | 11 + .../contrib/rename/renameInputField.i18n.json | 8 + .../contrib/smartSelect/smartSelect.i18n.json | 9 + .../suggest/suggestController.i18n.json | 9 + .../contrib/suggest/suggestWidget.i18n.json | 21 + .../toggleTabFocusMode.i18n.json | 8 + .../wordHighlighter/wordHighlighter.i18n.json | 13 + .../platform/environment/node/argv.i18n.json | 3 + .../node/extensionGalleryService.i18n.json | 3 +- .../node/extensionManagementService.i18n.json | 9 +- .../common/extensionsRegistry.i18n.json | 2 + .../actions/toggleTabsVisibility.i18n.json | 9 + .../compositeBarActions.i18n.json | 1 + .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorCommands.i18n.json | 2 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../electron-browser/actions.i18n.json | 24 +- .../main.contribution.i18n.json | 12 +- .../debug/browser/debugActions.i18n.json | 1 - .../breakpointsView.i18n.json | 11 + .../electron-browser/callStackView.i18n.json | 18 + .../debug.contribution.i18n.json | 5 + .../electron-browser/debugService.i18n.json | 1 - .../electron-browser/variablesView.i18n.json | 12 + .../watchExpressionsView.i18n.json | 13 + .../browser/extensionEditor.i18n.json | 2 + .../browser/extensionsActions.i18n.json | 15 +- .../browser/extensionsWidgets.i18n.json | 8 + .../extensionProfileService.i18n.json | 8 + .../extensionTipsService.i18n.json | 2 +- .../extensions.contribution.i18n.json | 4 +- .../runtimeExtensionsEditor.i18n.json | 19 + .../parts/files/browser/fileActions.i18n.json | 4 +- .../explorerViewlet.i18n.json | 8 + .../fileActions.contribution.i18n.json | 11 + .../electron-browser/fileActions.i18n.json | 75 + .../electron-browser/fileCommands.i18n.json | 9 + .../files.contribution.i18n.json | 53 + .../saveErrorHandler.i18n.json | 16 + .../views/emptyView.i18n.json | 13 + .../explorerDecorationsProvider.i18n.json | 9 + .../views/explorerView.i18n.json | 9 + .../views/explorerViewer.i18n.json | 19 + .../views/openEditorsView.i18n.json | 16 + .../views/openEditorsViewer.i18n.json | 15 + .../markers/browser/markersPanel.i18n.json | 9 + .../parts/markers/common/messages.i18n.json | 3 +- .../startupProfiler.i18n.json | 13 + .../browser/keybindingWidgets.i18n.json | 2 +- .../browser/keybindingsEditor.i18n.json | 1 + .../browser/preferencesActions.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 6 +- .../browser/preferencesRenderers.i18n.json | 2 - .../browser/preferencesWidgets.i18n.json | 9 +- .../preferences.contribution.i18n.json | 10 + .../scm/electron-browser/scmViewlet.i18n.json | 1 - .../browser/patternInputWidget.i18n.json | 3 +- .../browser/search.contribution.i18n.json | 1 - .../search/browser/searchActions.i18n.json | 7 +- .../search.contribution.i18n.json | 22 + .../electron-browser/searchActions.i18n.json | 9 + .../task.contribution.i18n.json | 5 +- .../terminalTaskSystem.i18n.json | 1 + .../tasks/node/taskConfiguration.i18n.json | 4 +- .../browser/terminalQuickOpen.i18n.json | 1 - .../themes.contribution.i18n.json | 5 +- .../configurationExtensionPoint.i18n.json | 2 +- .../crashReporterService.i18n.json | 9 + .../browser/decorationsService.i18n.json | 2 +- .../extensionHostProfiler.i18n.json | 6 + .../extensionService.i18n.json | 3 +- .../services/files/node/fileService.i18n.json | 2 +- .../keybindingService.i18n.json | 2 +- .../textfile/common/textFileService.i18n.json | 2 +- .../workbenchThemeService.i18n.json | 2 - .../css/client/out/cssMain.i18n.json | 4 +- .../extensions/git/out/autofetch.i18n.json | 11 + .../fra/extensions/git/out/commands.i18n.json | 8 +- i18n/fra/extensions/git/out/main.i18n.json | 5 +- .../extensions/git/out/repository.i18n.json | 1 + i18n/fra/extensions/git/package.i18n.json | 7 +- .../html/client/out/htmlMain.i18n.json | 4 +- .../markdown/out/commands.i18n.json | 9 + .../features/previewContentProvider.i18n.json | 10 + .../markdown/out/security.i18n.json | 3 + .../merge-conflict/package.i18n.json | 1 + .../features/completionItemProvider.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 7 - .../src/vs/code/electron-main/main.i18n.json | 12 + .../src/vs/code/electron-main/menus.i18n.json | 13 +- .../browser/services/bulkEdit.i18n.json | 11 + .../config/commonEditorConfig.i18n.json | 14 +- .../bracketMatching/bracketMatching.i18n.json | 8 + .../caretOperations/caretOperations.i18n.json | 9 + .../caretOperations/transpose.i18n.json | 8 + .../contrib/clipboard/clipboard.i18n.json | 11 + .../editor/contrib/comment/comment.i18n.json | 11 + .../contrib/contextmenu/contextmenu.i18n.json | 8 + .../contrib/find/findController.i18n.json | 15 + .../editor/contrib/find/findWidget.i18n.json | 21 + .../contrib/find/simpleFindWidget.i18n.json | 12 + .../editor/contrib/folding/folding.i18n.json | 15 + .../contrib/format/formatActions.i18n.json | 14 + .../goToDeclarationCommands.i18n.json | 23 + .../goToDeclarationMouse.i18n.json | 8 + .../contrib/gotoError/gotoError.i18n.json | 14 + .../vs/editor/contrib/hover/hover.i18n.json | 8 + .../contrib/hover/modesContentHover.i18n.json | 8 + .../inPlaceReplace/inPlaceReplace.i18n.json | 9 + .../contrib/indentation/indentation.i18n.json | 15 + .../linesOperations/linesOperations.i18n.json | 25 + .../vs/editor/contrib/links/links.i18n.json | 16 + .../contrib/multicursor/multicursor.i18n.json | 16 + .../parameterHints/parameterHints.i18n.json | 8 + .../parameterHintsWidget.i18n.json | 8 + .../quickFix/quickFixCommands.i18n.json | 10 + .../referenceSearch/peekViewWidget.i18n.json | 8 + .../referenceSearch/referenceSearch.i18n.json | 9 + .../referencesController.i18n.json | 8 + .../referenceSearch/referencesModel.i18n.json | 14 + .../referencesWidget.i18n.json | 27 + .../vs/editor/contrib/rename/rename.i18n.json | 11 + .../contrib/rename/renameInputField.i18n.json | 8 + .../contrib/smartSelect/smartSelect.i18n.json | 9 + .../suggest/suggestController.i18n.json | 9 + .../contrib/suggest/suggestWidget.i18n.json | 21 + .../toggleTabFocusMode.i18n.json | 8 + .../wordHighlighter/wordHighlighter.i18n.json | 13 + .../platform/environment/node/argv.i18n.json | 3 + .../node/extensionGalleryService.i18n.json | 3 +- .../node/extensionManagementService.i18n.json | 9 +- .../common/extensionsRegistry.i18n.json | 2 + .../actions/toggleTabsVisibility.i18n.json | 9 + .../compositeBarActions.i18n.json | 1 + .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorCommands.i18n.json | 2 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../electron-browser/actions.i18n.json | 24 +- .../main.contribution.i18n.json | 12 +- .../debug/browser/debugActions.i18n.json | 1 - .../breakpointsView.i18n.json | 11 + .../electron-browser/callStackView.i18n.json | 18 + .../debug.contribution.i18n.json | 5 + .../electron-browser/debugService.i18n.json | 1 - .../electron-browser/variablesView.i18n.json | 12 + .../watchExpressionsView.i18n.json | 13 + .../browser/extensionEditor.i18n.json | 2 + .../browser/extensionsActions.i18n.json | 15 +- .../browser/extensionsWidgets.i18n.json | 8 + .../extensionProfileService.i18n.json | 8 + .../extensions.contribution.i18n.json | 4 +- .../runtimeExtensionsEditor.i18n.json | 19 + .../parts/files/browser/fileActions.i18n.json | 4 +- .../explorerViewlet.i18n.json | 8 + .../fileActions.contribution.i18n.json | 11 + .../electron-browser/fileActions.i18n.json | 75 + .../electron-browser/fileCommands.i18n.json | 9 + .../files.contribution.i18n.json | 53 + .../saveErrorHandler.i18n.json | 16 + .../views/emptyView.i18n.json | 13 + .../explorerDecorationsProvider.i18n.json | 9 + .../views/explorerView.i18n.json | 9 + .../views/explorerViewer.i18n.json | 19 + .../views/openEditorsView.i18n.json | 16 + .../views/openEditorsViewer.i18n.json | 15 + .../markers/browser/markersPanel.i18n.json | 9 + .../parts/markers/common/messages.i18n.json | 3 +- .../startupProfiler.i18n.json | 13 + .../browser/keybindingWidgets.i18n.json | 2 +- .../browser/keybindingsEditor.i18n.json | 1 + .../browser/preferencesActions.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 6 +- .../browser/preferencesRenderers.i18n.json | 2 - .../browser/preferencesWidgets.i18n.json | 9 +- .../preferences.contribution.i18n.json | 10 + .../scm/electron-browser/scmViewlet.i18n.json | 1 - .../browser/patternInputWidget.i18n.json | 3 +- .../browser/search.contribution.i18n.json | 1 - .../search/browser/searchActions.i18n.json | 7 +- .../search.contribution.i18n.json | 22 + .../electron-browser/searchActions.i18n.json | 9 + .../task.contribution.i18n.json | 5 +- .../terminalTaskSystem.i18n.json | 1 + .../tasks/node/taskConfiguration.i18n.json | 4 +- .../browser/terminalQuickOpen.i18n.json | 2 +- .../themes.contribution.i18n.json | 6 +- .../configurationExtensionPoint.i18n.json | 2 +- .../crashReporterService.i18n.json | 9 + .../browser/decorationsService.i18n.json | 2 +- .../extensionHostProfiler.i18n.json | 8 + .../extensionService.i18n.json | 3 +- .../services/files/node/fileService.i18n.json | 2 +- .../keybindingService.i18n.json | 2 +- .../textfile/common/textFileService.i18n.json | 2 +- .../workbenchThemeService.i18n.json | 2 - .../extensions/git/out/autofetch.i18n.json | 11 + .../hun/extensions/git/out/commands.i18n.json | 7 +- i18n/hun/extensions/git/out/main.i18n.json | 5 +- .../extensions/git/out/repository.i18n.json | 1 + i18n/hun/extensions/git/package.i18n.json | 5 + .../markdown/out/commands.i18n.json | 9 + .../features/previewContentProvider.i18n.json | 10 + .../markdown/out/security.i18n.json | 3 + .../merge-conflict/package.i18n.json | 1 + .../features/completionItemProvider.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 7 - .../src/vs/code/electron-main/main.i18n.json | 12 + .../src/vs/code/electron-main/menus.i18n.json | 11 +- .../src/vs/code/node/cliProcessMain.i18n.json | 1 + .../browser/services/bulkEdit.i18n.json | 11 + .../config/commonEditorConfig.i18n.json | 15 +- .../bracketMatching/bracketMatching.i18n.json | 8 + .../caretOperations/caretOperations.i18n.json | 9 + .../caretOperations/transpose.i18n.json | 8 + .../contrib/clipboard/clipboard.i18n.json | 11 + .../editor/contrib/comment/comment.i18n.json | 11 + .../contrib/contextmenu/contextmenu.i18n.json | 8 + .../contrib/find/findController.i18n.json | 15 + .../editor/contrib/find/findWidget.i18n.json | 21 + .../contrib/find/simpleFindWidget.i18n.json | 12 + .../editor/contrib/folding/folding.i18n.json | 17 + .../contrib/format/formatActions.i18n.json | 14 + .../goToDeclarationCommands.i18n.json | 23 + .../goToDeclarationMouse.i18n.json | 8 + .../contrib/gotoError/gotoError.i18n.json | 14 + .../vs/editor/contrib/hover/hover.i18n.json | 8 + .../contrib/hover/modesContentHover.i18n.json | 8 + .../inPlaceReplace/inPlaceReplace.i18n.json | 9 + .../contrib/indentation/indentation.i18n.json | 15 + .../linesOperations/linesOperations.i18n.json | 25 + .../vs/editor/contrib/links/links.i18n.json | 16 + .../contrib/multicursor/multicursor.i18n.json | 16 + .../parameterHints/parameterHints.i18n.json | 8 + .../parameterHintsWidget.i18n.json | 8 + .../quickFix/quickFixCommands.i18n.json | 10 + .../referenceSearch/peekViewWidget.i18n.json | 8 + .../referenceSearch/referenceSearch.i18n.json | 9 + .../referencesController.i18n.json | 8 + .../referenceSearch/referencesModel.i18n.json | 14 + .../referencesWidget.i18n.json | 27 + .../vs/editor/contrib/rename/rename.i18n.json | 11 + .../contrib/rename/renameInputField.i18n.json | 8 + .../contrib/smartSelect/smartSelect.i18n.json | 9 + .../suggest/suggestController.i18n.json | 9 + .../contrib/suggest/suggestWidget.i18n.json | 21 + .../toggleTabFocusMode.i18n.json | 8 + .../wordHighlighter/wordHighlighter.i18n.json | 13 + .../platform/environment/node/argv.i18n.json | 4 + .../node/extensionGalleryService.i18n.json | 3 +- .../node/extensionManagementService.i18n.json | 9 +- .../common/extensionsRegistry.i18n.json | 2 + .../actions/toggleTabsVisibility.i18n.json | 9 + .../compositeBarActions.i18n.json | 1 + .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorCommands.i18n.json | 2 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../electron-browser/actions.i18n.json | 25 +- .../main.contribution.i18n.json | 12 +- .../debug/browser/debugActions.i18n.json | 1 - .../breakpointsView.i18n.json | 11 + .../electron-browser/callStackView.i18n.json | 18 + .../debug.contribution.i18n.json | 5 + .../electron-browser/debugService.i18n.json | 2 +- .../electron-browser/variablesView.i18n.json | 12 + .../watchExpressionsView.i18n.json | 13 + .../browser/extensionEditor.i18n.json | 2 + .../browser/extensionsActions.i18n.json | 15 +- .../browser/extensionsWidgets.i18n.json | 6 + .../extensionProfileService.i18n.json | 6 + .../extensionTipsService.i18n.json | 4 +- .../extensions.contribution.i18n.json | 4 +- .../runtimeExtensionsEditor.i18n.json | 8 + .../explorerViewlet.i18n.json | 8 + .../fileActions.contribution.i18n.json | 11 + .../electron-browser/fileActions.i18n.json | 75 + .../electron-browser/fileCommands.i18n.json | 9 + .../files.contribution.i18n.json | 53 + .../saveErrorHandler.i18n.json | 16 + .../views/emptyView.i18n.json | 13 + .../explorerDecorationsProvider.i18n.json | 9 + .../views/explorerView.i18n.json | 9 + .../views/explorerViewer.i18n.json | 19 + .../views/openEditorsView.i18n.json | 16 + .../views/openEditorsViewer.i18n.json | 15 + .../markers/browser/markersPanel.i18n.json | 9 + .../parts/markers/common/messages.i18n.json | 3 +- .../startupProfiler.i18n.json | 13 + .../browser/keybindingWidgets.i18n.json | 2 +- .../browser/keybindingsEditor.i18n.json | 3 +- .../browser/preferencesActions.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 6 +- .../browser/preferencesRenderers.i18n.json | 2 - .../browser/preferencesWidgets.i18n.json | 9 +- .../preferences.contribution.i18n.json | 10 + .../browser/commandsHandler.i18n.json | 2 +- .../scm/electron-browser/scmViewlet.i18n.json | 1 - .../browser/patternInputWidget.i18n.json | 3 +- .../browser/search.contribution.i18n.json | 1 - .../search/browser/searchActions.i18n.json | 7 +- .../search.contribution.i18n.json | 22 + .../electron-browser/searchActions.i18n.json | 9 + .../task.contribution.i18n.json | 5 +- .../terminalTaskSystem.i18n.json | 1 + .../tasks/node/taskConfiguration.i18n.json | 4 +- .../browser/terminalQuickOpen.i18n.json | 2 +- .../terminal.contribution.i18n.json | 2 +- .../themes.contribution.i18n.json | 5 +- .../electron-browser/watermark.i18n.json | 2 +- .../configurationExtensionPoint.i18n.json | 2 +- .../crashReporterService.i18n.json | 9 + .../browser/decorationsService.i18n.json | 2 +- .../extensionHostProfiler.i18n.json | 6 + .../services/files/node/fileService.i18n.json | 2 +- .../keybindingService.i18n.json | 2 +- .../textfile/common/textFileService.i18n.json | 2 +- .../workbenchThemeService.i18n.json | 2 - .../extensions/git/out/autofetch.i18n.json | 9 + .../ita/extensions/git/out/commands.i18n.json | 5 +- i18n/ita/extensions/git/out/main.i18n.json | 3 +- .../extensions/git/out/repository.i18n.json | 1 + i18n/ita/extensions/git/package.i18n.json | 3 + .../markdown/out/commands.i18n.json | 8 + .../features/previewContentProvider.i18n.json | 10 + .../extensions/typescript/package.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 7 - .../src/vs/code/electron-main/main.i18n.json | 8 + .../src/vs/code/electron-main/menus.i18n.json | 10 +- .../browser/services/bulkEdit.i18n.json | 11 + .../config/commonEditorConfig.i18n.json | 12 +- .../bracketMatching/bracketMatching.i18n.json | 8 + .../caretOperations/caretOperations.i18n.json | 9 + .../caretOperations/transpose.i18n.json | 8 + .../contrib/clipboard/clipboard.i18n.json | 11 + .../editor/contrib/comment/comment.i18n.json | 11 + .../contrib/contextmenu/contextmenu.i18n.json | 8 + .../contrib/find/findController.i18n.json | 15 + .../editor/contrib/find/findWidget.i18n.json | 21 + .../contrib/find/simpleFindWidget.i18n.json | 12 + .../editor/contrib/folding/folding.i18n.json | 14 + .../contrib/format/formatActions.i18n.json | 14 + .../goToDeclarationCommands.i18n.json | 23 + .../goToDeclarationMouse.i18n.json | 8 + .../contrib/gotoError/gotoError.i18n.json | 14 + .../vs/editor/contrib/hover/hover.i18n.json | 8 + .../contrib/hover/modesContentHover.i18n.json | 8 + .../inPlaceReplace/inPlaceReplace.i18n.json | 9 + .../contrib/indentation/indentation.i18n.json | 15 + .../linesOperations/linesOperations.i18n.json | 25 + .../vs/editor/contrib/links/links.i18n.json | 16 + .../contrib/multicursor/multicursor.i18n.json | 16 + .../parameterHints/parameterHints.i18n.json | 8 + .../parameterHintsWidget.i18n.json | 8 + .../quickFix/quickFixCommands.i18n.json | 10 + .../referenceSearch/peekViewWidget.i18n.json | 8 + .../referenceSearch/referenceSearch.i18n.json | 9 + .../referencesController.i18n.json | 8 + .../referenceSearch/referencesModel.i18n.json | 14 + .../referencesWidget.i18n.json | 27 + .../vs/editor/contrib/rename/rename.i18n.json | 11 + .../contrib/rename/renameInputField.i18n.json | 8 + .../contrib/smartSelect/smartSelect.i18n.json | 9 + .../suggest/suggestController.i18n.json | 9 + .../contrib/suggest/suggestWidget.i18n.json | 21 + .../toggleTabFocusMode.i18n.json | 8 + .../wordHighlighter/wordHighlighter.i18n.json | 13 + .../node/extensionGalleryService.i18n.json | 5 +- .../node/extensionManagementService.i18n.json | 3 +- .../actions/toggleTabsVisibility.i18n.json | 9 + .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorCommands.i18n.json | 1 - .../parts/editor/editorStatus.i18n.json | 2 +- .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../electron-browser/actions.i18n.json | 13 +- .../main.contribution.i18n.json | 10 +- .../debug/browser/debugActions.i18n.json | 1 - .../breakpointsView.i18n.json | 11 + .../electron-browser/callStackView.i18n.json | 18 + .../debug.contribution.i18n.json | 1 + .../electron-browser/debugService.i18n.json | 1 - .../electron-browser/variablesView.i18n.json | 12 + .../watchExpressionsView.i18n.json | 13 + .../browser/extensionsActions.i18n.json | 15 +- .../browser/extensionsWidgets.i18n.json | 6 + .../extensionProfileService.i18n.json | 6 + .../extensions.contribution.i18n.json | 4 +- .../runtimeExtensionsEditor.i18n.json | 8 + .../parts/files/browser/fileActions.i18n.json | 4 +- .../explorerViewlet.i18n.json | 8 + .../fileActions.contribution.i18n.json | 9 + .../electron-browser/fileActions.i18n.json | 72 + .../electron-browser/fileCommands.i18n.json | 9 + .../files.contribution.i18n.json | 52 + .../saveErrorHandler.i18n.json | 16 + .../views/emptyView.i18n.json | 12 + .../explorerDecorationsProvider.i18n.json | 8 + .../views/explorerView.i18n.json | 9 + .../views/explorerViewer.i18n.json | 19 + .../views/openEditorsView.i18n.json | 16 + .../views/openEditorsViewer.i18n.json | 15 + .../markers/browser/markersPanel.i18n.json | 6 + .../parts/markers/common/messages.i18n.json | 2 - .../startupProfiler.i18n.json | 13 + .../browser/keybindingWidgets.i18n.json | 1 - .../browser/keybindingsEditor.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 6 +- .../browser/preferencesRenderers.i18n.json | 2 - .../browser/preferencesWidgets.i18n.json | 7 +- .../preferences.contribution.i18n.json | 10 + .../scm/electron-browser/scmViewlet.i18n.json | 1 - .../browser/patternInputWidget.i18n.json | 3 +- .../browser/search.contribution.i18n.json | 1 - .../search/browser/searchActions.i18n.json | 7 +- .../search.contribution.i18n.json | 22 + .../electron-browser/searchActions.i18n.json | 9 + .../task.contribution.i18n.json | 5 +- .../terminalTaskSystem.i18n.json | 1 + .../tasks/node/taskConfiguration.i18n.json | 3 +- .../browser/terminalQuickOpen.i18n.json | 2 +- .../terminal.contribution.i18n.json | 1 - .../themes.contribution.i18n.json | 5 +- .../configurationExtensionPoint.i18n.json | 2 +- .../crashReporterService.i18n.json | 9 + .../browser/decorationsService.i18n.json | 2 +- .../extensionHostProfiler.i18n.json | 6 + .../services/files/node/fileService.i18n.json | 2 +- .../keybindingService.i18n.json | 3 +- .../textfile/common/textFileService.i18n.json | 4 +- .../workbenchThemeService.i18n.json | 2 - .../css/client/out/cssMain.i18n.json | 4 +- .../extensions/git/out/autofetch.i18n.json | 11 + .../jpn/extensions/git/out/commands.i18n.json | 8 +- i18n/jpn/extensions/git/out/main.i18n.json | 5 +- .../extensions/git/out/repository.i18n.json | 1 + i18n/jpn/extensions/git/package.i18n.json | 5 + .../html/client/out/htmlMain.i18n.json | 4 +- .../markdown/out/commands.i18n.json | 9 + .../features/previewContentProvider.i18n.json | 10 + .../markdown/out/security.i18n.json | 3 + .../merge-conflict/package.i18n.json | 1 + .../features/completionItemProvider.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 7 - .../src/vs/code/electron-main/main.i18n.json | 12 + .../src/vs/code/electron-main/menus.i18n.json | 13 +- .../browser/services/bulkEdit.i18n.json | 11 + .../config/commonEditorConfig.i18n.json | 10 +- .../bracketMatching/bracketMatching.i18n.json | 8 + .../caretOperations/caretOperations.i18n.json | 9 + .../caretOperations/transpose.i18n.json | 8 + .../contrib/clipboard/clipboard.i18n.json | 11 + .../editor/contrib/comment/comment.i18n.json | 11 + .../contrib/contextmenu/contextmenu.i18n.json | 8 + .../contrib/find/findController.i18n.json | 15 + .../editor/contrib/find/findWidget.i18n.json | 21 + .../contrib/find/simpleFindWidget.i18n.json | 12 + .../editor/contrib/folding/folding.i18n.json | 15 + .../contrib/format/formatActions.i18n.json | 14 + .../goToDeclarationCommands.i18n.json | 23 + .../goToDeclarationMouse.i18n.json | 8 + .../contrib/gotoError/gotoError.i18n.json | 14 + .../vs/editor/contrib/hover/hover.i18n.json | 8 + .../contrib/hover/modesContentHover.i18n.json | 8 + .../inPlaceReplace/inPlaceReplace.i18n.json | 9 + .../contrib/indentation/indentation.i18n.json | 15 + .../linesOperations/linesOperations.i18n.json | 25 + .../vs/editor/contrib/links/links.i18n.json | 16 + .../contrib/multicursor/multicursor.i18n.json | 16 + .../parameterHints/parameterHints.i18n.json | 8 + .../parameterHintsWidget.i18n.json | 8 + .../quickFix/quickFixCommands.i18n.json | 10 + .../referenceSearch/peekViewWidget.i18n.json | 8 + .../referenceSearch/referenceSearch.i18n.json | 9 + .../referencesController.i18n.json | 8 + .../referenceSearch/referencesModel.i18n.json | 14 + .../referencesWidget.i18n.json | 27 + .../vs/editor/contrib/rename/rename.i18n.json | 11 + .../contrib/rename/renameInputField.i18n.json | 8 + .../contrib/smartSelect/smartSelect.i18n.json | 9 + .../suggest/suggestController.i18n.json | 9 + .../contrib/suggest/suggestWidget.i18n.json | 21 + .../toggleTabFocusMode.i18n.json | 8 + .../wordHighlighter/wordHighlighter.i18n.json | 13 + .../platform/environment/node/argv.i18n.json | 3 + .../node/extensionGalleryService.i18n.json | 3 +- .../node/extensionManagementService.i18n.json | 9 +- .../common/extensionsRegistry.i18n.json | 2 + .../actions/toggleTabsVisibility.i18n.json | 9 + .../compositeBarActions.i18n.json | 1 + .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorCommands.i18n.json | 2 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../electron-browser/actions.i18n.json | 24 +- .../main.contribution.i18n.json | 12 +- .../debug/browser/debugActions.i18n.json | 1 - .../breakpointsView.i18n.json | 11 + .../electron-browser/callStackView.i18n.json | 18 + .../debug.contribution.i18n.json | 5 + .../electron-browser/debugService.i18n.json | 1 - .../electron-browser/variablesView.i18n.json | 12 + .../watchExpressionsView.i18n.json | 13 + .../browser/extensionEditor.i18n.json | 2 + .../browser/extensionsActions.i18n.json | 15 +- .../browser/extensionsWidgets.i18n.json | 8 + .../extensionProfileService.i18n.json | 8 + .../extensions.contribution.i18n.json | 4 +- .../runtimeExtensionsEditor.i18n.json | 19 + .../parts/files/browser/fileActions.i18n.json | 4 +- .../explorerViewlet.i18n.json | 8 + .../fileActions.contribution.i18n.json | 11 + .../electron-browser/fileActions.i18n.json | 75 + .../electron-browser/fileCommands.i18n.json | 9 + .../files.contribution.i18n.json | 53 + .../saveErrorHandler.i18n.json | 16 + .../views/emptyView.i18n.json | 13 + .../explorerDecorationsProvider.i18n.json | 9 + .../views/explorerView.i18n.json | 9 + .../views/explorerViewer.i18n.json | 19 + .../views/openEditorsView.i18n.json | 16 + .../views/openEditorsViewer.i18n.json | 15 + .../markers/browser/markersPanel.i18n.json | 9 + .../parts/markers/common/messages.i18n.json | 3 +- .../startupProfiler.i18n.json | 13 + .../browser/keybindingWidgets.i18n.json | 2 +- .../browser/keybindingsEditor.i18n.json | 1 + .../browser/preferencesActions.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 6 +- .../browser/preferencesRenderers.i18n.json | 2 - .../browser/preferencesWidgets.i18n.json | 9 +- .../preferences.contribution.i18n.json | 10 + .../scm/electron-browser/scmViewlet.i18n.json | 1 - .../browser/patternInputWidget.i18n.json | 3 +- .../browser/search.contribution.i18n.json | 1 - .../search/browser/searchActions.i18n.json | 7 +- .../search.contribution.i18n.json | 22 + .../electron-browser/searchActions.i18n.json | 9 + .../task.contribution.i18n.json | 5 +- .../terminalTaskSystem.i18n.json | 1 + .../tasks/node/taskConfiguration.i18n.json | 4 +- .../browser/terminalQuickOpen.i18n.json | 2 +- .../themes.contribution.i18n.json | 6 +- .../configurationExtensionPoint.i18n.json | 2 +- .../crashReporterService.i18n.json | 9 + .../extensionHostProfiler.i18n.json | 8 + .../extensionService.i18n.json | 3 +- .../services/files/node/fileService.i18n.json | 2 +- .../keybindingService.i18n.json | 2 +- .../textfile/common/textFileService.i18n.json | 2 +- .../workbenchThemeService.i18n.json | 2 - .../extensions/git/out/autofetch.i18n.json | 9 + .../kor/extensions/git/out/commands.i18n.json | 1 - i18n/kor/extensions/git/out/main.i18n.json | 2 +- .../extensions/git/out/repository.i18n.json | 1 + .../markdown/out/commands.i18n.json | 8 + .../features/previewContentProvider.i18n.json | 10 + .../src/vs/base/common/errorMessage.i18n.json | 7 - .../src/vs/code/electron-main/main.i18n.json | 8 + .../src/vs/code/electron-main/menus.i18n.json | 9 +- .../browser/services/bulkEdit.i18n.json | 11 + .../config/commonEditorConfig.i18n.json | 12 +- .../bracketMatching/bracketMatching.i18n.json | 8 + .../caretOperations/caretOperations.i18n.json | 9 + .../caretOperations/transpose.i18n.json | 8 + .../contrib/clipboard/clipboard.i18n.json | 11 + .../editor/contrib/comment/comment.i18n.json | 11 + .../contrib/contextmenu/contextmenu.i18n.json | 8 + .../contrib/find/findController.i18n.json | 15 + .../editor/contrib/find/findWidget.i18n.json | 21 + .../contrib/find/simpleFindWidget.i18n.json | 12 + .../editor/contrib/folding/folding.i18n.json | 15 + .../contrib/format/formatActions.i18n.json | 14 + .../goToDeclarationCommands.i18n.json | 23 + .../goToDeclarationMouse.i18n.json | 8 + .../contrib/gotoError/gotoError.i18n.json | 14 + .../vs/editor/contrib/hover/hover.i18n.json | 8 + .../contrib/hover/modesContentHover.i18n.json | 8 + .../inPlaceReplace/inPlaceReplace.i18n.json | 9 + .../contrib/indentation/indentation.i18n.json | 15 + .../linesOperations/linesOperations.i18n.json | 25 + .../vs/editor/contrib/links/links.i18n.json | 16 + .../contrib/multicursor/multicursor.i18n.json | 16 + .../parameterHints/parameterHints.i18n.json | 8 + .../parameterHintsWidget.i18n.json | 8 + .../quickFix/quickFixCommands.i18n.json | 10 + .../referenceSearch/peekViewWidget.i18n.json | 8 + .../referenceSearch/referenceSearch.i18n.json | 9 + .../referencesController.i18n.json | 8 + .../referenceSearch/referencesModel.i18n.json | 14 + .../referencesWidget.i18n.json | 27 + .../vs/editor/contrib/rename/rename.i18n.json | 11 + .../contrib/rename/renameInputField.i18n.json | 8 + .../contrib/smartSelect/smartSelect.i18n.json | 9 + .../suggest/suggestController.i18n.json | 9 + .../contrib/suggest/suggestWidget.i18n.json | 21 + .../toggleTabFocusMode.i18n.json | 8 + .../wordHighlighter/wordHighlighter.i18n.json | 13 + .../node/extensionGalleryService.i18n.json | 5 +- .../node/extensionManagementService.i18n.json | 3 +- .../actions/toggleTabsVisibility.i18n.json | 8 + .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorCommands.i18n.json | 1 - .../parts/editor/editorStatus.i18n.json | 3 +- .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../electron-browser/actions.i18n.json | 13 +- .../main.contribution.i18n.json | 10 +- .../debug/browser/debugActions.i18n.json | 1 - .../breakpointsView.i18n.json | 11 + .../electron-browser/callStackView.i18n.json | 18 + .../electron-browser/debugService.i18n.json | 1 - .../electron-browser/variablesView.i18n.json | 12 + .../watchExpressionsView.i18n.json | 13 + .../browser/extensionsActions.i18n.json | 15 +- .../browser/extensionsWidgets.i18n.json | 6 + .../extensionProfileService.i18n.json | 6 + .../extensions.contribution.i18n.json | 4 +- .../runtimeExtensionsEditor.i18n.json | 8 + .../explorerViewlet.i18n.json | 8 + .../fileActions.contribution.i18n.json | 11 + .../electron-browser/fileActions.i18n.json | 73 + .../electron-browser/fileCommands.i18n.json | 9 + .../files.contribution.i18n.json | 53 + .../saveErrorHandler.i18n.json | 16 + .../views/emptyView.i18n.json | 12 + .../explorerDecorationsProvider.i18n.json | 9 + .../views/explorerView.i18n.json | 9 + .../views/explorerViewer.i18n.json | 19 + .../views/openEditorsView.i18n.json | 16 + .../views/openEditorsViewer.i18n.json | 15 + .../markers/browser/markersPanel.i18n.json | 6 + .../parts/markers/common/messages.i18n.json | 2 - .../startupProfiler.i18n.json | 13 + .../browser/keybindingWidgets.i18n.json | 1 - .../browser/keybindingsEditor.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 5 +- .../browser/preferencesRenderers.i18n.json | 2 - .../browser/preferencesWidgets.i18n.json | 6 +- .../preferences.contribution.i18n.json | 10 + .../scm/electron-browser/scmViewlet.i18n.json | 1 - .../browser/patternInputWidget.i18n.json | 4 +- .../browser/search.contribution.i18n.json | 1 - .../search/browser/searchActions.i18n.json | 7 +- .../search.contribution.i18n.json | 22 + .../electron-browser/searchActions.i18n.json | 6 + .../task.contribution.i18n.json | 3 - .../tasks/node/taskConfiguration.i18n.json | 2 - .../browser/terminalQuickOpen.i18n.json | 2 +- .../terminal.contribution.i18n.json | 1 - .../themes.contribution.i18n.json | 3 +- .../configurationExtensionPoint.i18n.json | 2 +- .../crashReporterService.i18n.json | 9 + .../browser/decorationsService.i18n.json | 4 +- .../extensionHostProfiler.i18n.json | 6 + .../services/files/node/fileService.i18n.json | 2 +- .../keybindingService.i18n.json | 3 +- .../textfile/common/textFileService.i18n.json | 4 +- .../workbenchThemeService.i18n.json | 2 - .../css/client/out/cssMain.i18n.json | 4 +- .../extensions/git/out/autofetch.i18n.json | 11 + .../ptb/extensions/git/out/commands.i18n.json | 8 +- i18n/ptb/extensions/git/out/main.i18n.json | 5 +- .../extensions/git/out/repository.i18n.json | 1 + i18n/ptb/extensions/git/package.i18n.json | 5 + .../html/client/out/htmlMain.i18n.json | 4 +- .../markdown/out/commands.i18n.json | 9 + .../features/previewContentProvider.i18n.json | 10 + .../markdown/out/security.i18n.json | 3 + .../merge-conflict/package.i18n.json | 1 + .../features/completionItemProvider.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 7 - .../src/vs/code/electron-main/main.i18n.json | 12 + .../src/vs/code/electron-main/menus.i18n.json | 13 +- .../browser/services/bulkEdit.i18n.json | 11 + .../config/commonEditorConfig.i18n.json | 12 +- .../bracketMatching/bracketMatching.i18n.json | 8 + .../caretOperations/caretOperations.i18n.json | 9 + .../caretOperations/transpose.i18n.json | 8 + .../contrib/clipboard/clipboard.i18n.json | 11 + .../editor/contrib/comment/comment.i18n.json | 11 + .../contrib/contextmenu/contextmenu.i18n.json | 8 + .../contrib/find/findController.i18n.json | 15 + .../editor/contrib/find/findWidget.i18n.json | 21 + .../contrib/find/simpleFindWidget.i18n.json | 12 + .../editor/contrib/folding/folding.i18n.json | 15 + .../contrib/format/formatActions.i18n.json | 14 + .../goToDeclarationCommands.i18n.json | 23 + .../goToDeclarationMouse.i18n.json | 8 + .../contrib/gotoError/gotoError.i18n.json | 14 + .../vs/editor/contrib/hover/hover.i18n.json | 8 + .../contrib/hover/modesContentHover.i18n.json | 8 + .../inPlaceReplace/inPlaceReplace.i18n.json | 9 + .../contrib/indentation/indentation.i18n.json | 15 + .../linesOperations/linesOperations.i18n.json | 25 + .../vs/editor/contrib/links/links.i18n.json | 16 + .../contrib/multicursor/multicursor.i18n.json | 16 + .../parameterHints/parameterHints.i18n.json | 8 + .../parameterHintsWidget.i18n.json | 8 + .../quickFix/quickFixCommands.i18n.json | 10 + .../referenceSearch/peekViewWidget.i18n.json | 8 + .../referenceSearch/referenceSearch.i18n.json | 9 + .../referencesController.i18n.json | 8 + .../referenceSearch/referencesModel.i18n.json | 14 + .../referencesWidget.i18n.json | 27 + .../vs/editor/contrib/rename/rename.i18n.json | 11 + .../contrib/rename/renameInputField.i18n.json | 8 + .../contrib/smartSelect/smartSelect.i18n.json | 9 + .../suggest/suggestController.i18n.json | 9 + .../contrib/suggest/suggestWidget.i18n.json | 21 + .../toggleTabFocusMode.i18n.json | 8 + .../wordHighlighter/wordHighlighter.i18n.json | 13 + .../platform/environment/node/argv.i18n.json | 3 + .../node/extensionGalleryService.i18n.json | 3 +- .../node/extensionManagementService.i18n.json | 9 +- .../common/extensionsRegistry.i18n.json | 2 + .../actions/toggleTabsVisibility.i18n.json | 9 + .../compositeBarActions.i18n.json | 1 + .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorCommands.i18n.json | 2 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../electron-browser/actions.i18n.json | 24 +- .../main.contribution.i18n.json | 12 +- .../debug/browser/debugActions.i18n.json | 1 - .../breakpointsView.i18n.json | 11 + .../electron-browser/callStackView.i18n.json | 18 + .../debug.contribution.i18n.json | 3 + .../electron-browser/debugService.i18n.json | 1 - .../electron-browser/variablesView.i18n.json | 12 + .../watchExpressionsView.i18n.json | 13 + .../browser/extensionEditor.i18n.json | 2 + .../browser/extensionsActions.i18n.json | 15 +- .../browser/extensionsWidgets.i18n.json | 8 + .../extensionProfileService.i18n.json | 8 + .../extensions.contribution.i18n.json | 5 +- .../runtimeExtensionsEditor.i18n.json | 16 + .../parts/files/browser/fileActions.i18n.json | 4 +- .../explorerViewlet.i18n.json | 8 + .../fileActions.contribution.i18n.json | 11 + .../electron-browser/fileActions.i18n.json | 75 + .../electron-browser/fileCommands.i18n.json | 9 + .../files.contribution.i18n.json | 53 + .../saveErrorHandler.i18n.json | 16 + .../views/emptyView.i18n.json | 13 + .../explorerDecorationsProvider.i18n.json | 9 + .../views/explorerView.i18n.json | 9 + .../views/explorerViewer.i18n.json | 19 + .../views/openEditorsView.i18n.json | 16 + .../views/openEditorsViewer.i18n.json | 15 + .../markers/browser/markersPanel.i18n.json | 9 + .../parts/markers/common/messages.i18n.json | 3 +- .../startupProfiler.i18n.json | 13 + .../browser/keybindingWidgets.i18n.json | 2 +- .../browser/keybindingsEditor.i18n.json | 1 + .../browser/preferencesActions.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 6 +- .../browser/preferencesRenderers.i18n.json | 2 - .../browser/preferencesWidgets.i18n.json | 9 +- .../preferences.contribution.i18n.json | 10 + .../scm/electron-browser/scmViewlet.i18n.json | 1 - .../browser/patternInputWidget.i18n.json | 3 +- .../browser/search.contribution.i18n.json | 1 - .../search/browser/searchActions.i18n.json | 7 +- .../search.contribution.i18n.json | 22 + .../electron-browser/searchActions.i18n.json | 9 + .../task.contribution.i18n.json | 5 +- .../terminalTaskSystem.i18n.json | 1 + .../tasks/node/taskConfiguration.i18n.json | 4 +- .../browser/terminalQuickOpen.i18n.json | 2 +- .../terminal.contribution.i18n.json | 2 +- .../themes.contribution.i18n.json | 6 +- .../configurationExtensionPoint.i18n.json | 2 +- .../crashReporterService.i18n.json | 9 + .../browser/decorationsService.i18n.json | 2 +- .../extensionHostProfiler.i18n.json | 6 + .../extensionService.i18n.json | 3 +- .../services/files/node/fileService.i18n.json | 2 +- .../keybindingService.i18n.json | 2 +- .../textfile/common/textFileService.i18n.json | 2 +- .../workbenchThemeService.i18n.json | 2 - .../extensions/git/out/autofetch.i18n.json | 9 + .../rus/extensions/git/out/commands.i18n.json | 1 - i18n/rus/extensions/git/out/main.i18n.json | 2 +- .../extensions/git/out/repository.i18n.json | 1 + .../markdown/out/commands.i18n.json | 8 + .../features/previewContentProvider.i18n.json | 10 + .../src/vs/base/common/errorMessage.i18n.json | 7 - .../src/vs/code/electron-main/main.i18n.json | 8 + .../src/vs/code/electron-main/menus.i18n.json | 8 +- .../browser/services/bulkEdit.i18n.json | 11 + .../config/commonEditorConfig.i18n.json | 7 +- .../bracketMatching/bracketMatching.i18n.json | 8 + .../caretOperations/caretOperations.i18n.json | 9 + .../caretOperations/transpose.i18n.json | 8 + .../contrib/clipboard/clipboard.i18n.json | 11 + .../editor/contrib/comment/comment.i18n.json | 11 + .../contrib/contextmenu/contextmenu.i18n.json | 8 + .../contrib/find/findController.i18n.json | 15 + .../editor/contrib/find/findWidget.i18n.json | 21 + .../contrib/find/simpleFindWidget.i18n.json | 12 + .../editor/contrib/folding/folding.i18n.json | 14 + .../contrib/format/formatActions.i18n.json | 14 + .../goToDeclarationCommands.i18n.json | 23 + .../goToDeclarationMouse.i18n.json | 8 + .../contrib/gotoError/gotoError.i18n.json | 14 + .../vs/editor/contrib/hover/hover.i18n.json | 8 + .../contrib/hover/modesContentHover.i18n.json | 8 + .../inPlaceReplace/inPlaceReplace.i18n.json | 9 + .../contrib/indentation/indentation.i18n.json | 15 + .../linesOperations/linesOperations.i18n.json | 25 + .../vs/editor/contrib/links/links.i18n.json | 16 + .../contrib/multicursor/multicursor.i18n.json | 16 + .../parameterHints/parameterHints.i18n.json | 8 + .../parameterHintsWidget.i18n.json | 8 + .../quickFix/quickFixCommands.i18n.json | 10 + .../referenceSearch/peekViewWidget.i18n.json | 8 + .../referenceSearch/referenceSearch.i18n.json | 9 + .../referencesController.i18n.json | 8 + .../referenceSearch/referencesModel.i18n.json | 14 + .../referencesWidget.i18n.json | 27 + .../vs/editor/contrib/rename/rename.i18n.json | 11 + .../contrib/rename/renameInputField.i18n.json | 8 + .../contrib/smartSelect/smartSelect.i18n.json | 9 + .../suggest/suggestController.i18n.json | 9 + .../contrib/suggest/suggestWidget.i18n.json | 21 + .../toggleTabFocusMode.i18n.json | 8 + .../wordHighlighter/wordHighlighter.i18n.json | 13 + .../node/extensionGalleryService.i18n.json | 5 +- .../node/extensionManagementService.i18n.json | 3 +- .../actions/toggleTabsVisibility.i18n.json | 8 + .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorCommands.i18n.json | 1 - .../parts/editor/editorStatus.i18n.json | 3 +- .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../electron-browser/actions.i18n.json | 13 +- .../main.contribution.i18n.json | 10 +- .../debug/browser/debugActions.i18n.json | 1 - .../breakpointsView.i18n.json | 11 + .../electron-browser/callStackView.i18n.json | 18 + .../electron-browser/debugService.i18n.json | 1 - .../electron-browser/variablesView.i18n.json | 12 + .../watchExpressionsView.i18n.json | 13 + .../browser/extensionsActions.i18n.json | 15 +- .../browser/extensionsWidgets.i18n.json | 6 + .../extensionProfileService.i18n.json | 6 + .../extensions.contribution.i18n.json | 4 +- .../runtimeExtensionsEditor.i18n.json | 8 + .../explorerViewlet.i18n.json | 8 + .../fileActions.contribution.i18n.json | 11 + .../electron-browser/fileActions.i18n.json | 72 + .../electron-browser/fileCommands.i18n.json | 9 + .../files.contribution.i18n.json | 53 + .../saveErrorHandler.i18n.json | 16 + .../views/emptyView.i18n.json | 11 + .../explorerDecorationsProvider.i18n.json | 9 + .../views/explorerView.i18n.json | 9 + .../views/explorerViewer.i18n.json | 17 + .../views/openEditorsView.i18n.json | 16 + .../views/openEditorsViewer.i18n.json | 15 + .../markers/browser/markersPanel.i18n.json | 6 + .../parts/markers/common/messages.i18n.json | 2 - .../startupProfiler.i18n.json | 13 + .../browser/keybindingWidgets.i18n.json | 1 - .../browser/keybindingsEditor.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 6 +- .../browser/preferencesRenderers.i18n.json | 2 - .../browser/preferencesWidgets.i18n.json | 6 +- .../preferences.contribution.i18n.json | 10 + .../scm/electron-browser/scmViewlet.i18n.json | 1 - .../browser/patternInputWidget.i18n.json | 4 +- .../browser/search.contribution.i18n.json | 1 - .../search/browser/searchActions.i18n.json | 7 +- .../search.contribution.i18n.json | 22 + .../electron-browser/searchActions.i18n.json | 6 + .../task.contribution.i18n.json | 3 - .../tasks/node/taskConfiguration.i18n.json | 2 - .../browser/terminalQuickOpen.i18n.json | 2 +- .../terminal.contribution.i18n.json | 1 - .../themes.contribution.i18n.json | 3 +- .../configurationExtensionPoint.i18n.json | 2 +- .../crashReporterService.i18n.json | 9 + .../browser/decorationsService.i18n.json | 4 +- .../extensionHostProfiler.i18n.json | 6 + .../services/files/node/fileService.i18n.json | 2 +- .../keybindingService.i18n.json | 3 +- .../textfile/common/textFileService.i18n.json | 4 +- .../workbenchThemeService.i18n.json | 2 - .../extensions/git/out/autofetch.i18n.json | 11 + .../trk/extensions/git/out/commands.i18n.json | 8 +- i18n/trk/extensions/git/out/main.i18n.json | 5 +- .../extensions/git/out/repository.i18n.json | 1 + i18n/trk/extensions/git/package.i18n.json | 7 +- .../markdown/out/commands.i18n.json | 9 + .../features/previewContentProvider.i18n.json | 10 + .../markdown/out/security.i18n.json | 3 + .../out/codelensProvider.i18n.json | 2 +- .../out/commandHandler.i18n.json | 6 +- .../out/mergeDecorator.i18n.json | 2 +- .../merge-conflict/package.i18n.json | 3 +- .../features/completionItemProvider.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 7 - .../src/vs/code/electron-main/main.i18n.json | 12 + .../src/vs/code/electron-main/menus.i18n.json | 11 +- .../src/vs/code/node/cliProcessMain.i18n.json | 1 + .../browser/services/bulkEdit.i18n.json | 11 + .../config/commonEditorConfig.i18n.json | 10 +- .../bracketMatching/bracketMatching.i18n.json | 8 + .../caretOperations/caretOperations.i18n.json | 9 + .../caretOperations/transpose.i18n.json | 8 + .../contrib/clipboard/clipboard.i18n.json | 11 + .../editor/contrib/comment/comment.i18n.json | 11 + .../contrib/contextmenu/contextmenu.i18n.json | 8 + .../contrib/find/findController.i18n.json | 15 + .../editor/contrib/find/findWidget.i18n.json | 21 + .../contrib/find/simpleFindWidget.i18n.json | 12 + .../editor/contrib/folding/folding.i18n.json | 17 + .../contrib/format/formatActions.i18n.json | 14 + .../goToDeclarationCommands.i18n.json | 23 + .../goToDeclarationMouse.i18n.json | 8 + .../contrib/gotoError/gotoError.i18n.json | 14 + .../vs/editor/contrib/hover/hover.i18n.json | 8 + .../contrib/hover/modesContentHover.i18n.json | 8 + .../inPlaceReplace/inPlaceReplace.i18n.json | 9 + .../contrib/indentation/indentation.i18n.json | 15 + .../linesOperations/linesOperations.i18n.json | 25 + .../vs/editor/contrib/links/links.i18n.json | 16 + .../contrib/multicursor/multicursor.i18n.json | 16 + .../parameterHints/parameterHints.i18n.json | 8 + .../parameterHintsWidget.i18n.json | 8 + .../quickFix/quickFixCommands.i18n.json | 10 + .../referenceSearch/peekViewWidget.i18n.json | 8 + .../referenceSearch/referenceSearch.i18n.json | 9 + .../referencesController.i18n.json | 8 + .../referenceSearch/referencesModel.i18n.json | 14 + .../referencesWidget.i18n.json | 27 + .../vs/editor/contrib/rename/rename.i18n.json | 11 + .../contrib/rename/renameInputField.i18n.json | 8 + .../contrib/smartSelect/smartSelect.i18n.json | 9 + .../suggest/suggestController.i18n.json | 9 + .../contrib/suggest/suggestWidget.i18n.json | 21 + .../toggleTabFocusMode.i18n.json | 8 + .../wordHighlighter/wordHighlighter.i18n.json | 13 + .../platform/environment/node/argv.i18n.json | 4 + .../node/extensionGalleryService.i18n.json | 3 +- .../node/extensionManagementService.i18n.json | 9 +- .../common/extensionsRegistry.i18n.json | 2 + .../actions/toggleTabsVisibility.i18n.json | 9 + .../compositeBarActions.i18n.json | 1 + .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorCommands.i18n.json | 2 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../electron-browser/actions.i18n.json | 13 +- .../main.contribution.i18n.json | 12 +- .../debug/browser/debugActions.i18n.json | 1 - .../breakpointsView.i18n.json | 11 + .../electron-browser/callStackView.i18n.json | 18 + .../debug.contribution.i18n.json | 5 + .../electron-browser/debugService.i18n.json | 3 +- .../electron-browser/variablesView.i18n.json | 12 + .../watchExpressionsView.i18n.json | 13 + .../browser/extensionEditor.i18n.json | 2 + .../browser/extensionsActions.i18n.json | 15 +- .../browser/extensionsWidgets.i18n.json | 6 + .../extensionProfileService.i18n.json | 6 + .../extensions.contribution.i18n.json | 4 +- .../runtimeExtensionsEditor.i18n.json | 8 + .../explorerViewlet.i18n.json | 8 + .../fileActions.contribution.i18n.json | 11 + .../electron-browser/fileActions.i18n.json | 75 + .../electron-browser/fileCommands.i18n.json | 9 + .../files.contribution.i18n.json | 53 + .../saveErrorHandler.i18n.json | 16 + .../views/emptyView.i18n.json | 13 + .../explorerDecorationsProvider.i18n.json | 9 + .../views/explorerView.i18n.json | 9 + .../views/explorerViewer.i18n.json | 19 + .../views/openEditorsView.i18n.json | 16 + .../views/openEditorsViewer.i18n.json | 15 + .../markers/browser/markersPanel.i18n.json | 9 + .../parts/markers/common/messages.i18n.json | 3 +- .../startupProfiler.i18n.json | 13 + .../browser/keybindingWidgets.i18n.json | 2 +- .../browser/keybindingsEditor.i18n.json | 1 + .../browser/preferencesActions.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 6 +- .../browser/preferencesRenderers.i18n.json | 2 - .../browser/preferencesWidgets.i18n.json | 9 +- .../preferences.contribution.i18n.json | 10 + .../scm/electron-browser/scmViewlet.i18n.json | 1 - .../browser/patternInputWidget.i18n.json | 3 +- .../browser/search.contribution.i18n.json | 1 - .../search/browser/searchActions.i18n.json | 7 +- .../search.contribution.i18n.json | 22 + .../electron-browser/searchActions.i18n.json | 9 + .../task.contribution.i18n.json | 5 +- .../terminalTaskSystem.i18n.json | 1 + .../tasks/node/taskConfiguration.i18n.json | 4 +- .../browser/terminalQuickOpen.i18n.json | 2 +- .../themes.contribution.i18n.json | 6 +- .../configurationExtensionPoint.i18n.json | 2 +- .../crashReporterService.i18n.json | 9 + .../browser/decorationsService.i18n.json | 2 +- .../extensionHostProfiler.i18n.json | 8 + .../extensionService.i18n.json | 3 +- .../services/files/node/fileService.i18n.json | 2 +- .../keybindingService.i18n.json | 2 +- .../textfile/common/textFileService.i18n.json | 2 +- .../workbenchThemeService.i18n.json | 2 - package.json | 13 +- resources/linux/bin/code.sh | 2 +- src/main.js | 11 +- src/tsconfig.json | 3 +- src/typings/node.d.ts | 6 +- src/typings/spdlog.d.ts | 34 + src/typings/v8-inspect-profiler.d.ts | 37 + src/vs/base/browser/builder.ts | 515 +- src/vs/base/browser/dnd.ts | 21 +- src/vs/base/browser/dom.ts | 17 - src/vs/base/browser/htmlContentRenderer.ts | 12 +- src/vs/base/browser/touch.ts | 131 +- src/vs/base/browser/ui/actionbar/actionbar.ts | 14 +- src/vs/base/browser/ui/dropdown/dropdown.ts | 2 +- src/vs/base/browser/ui/inputbox/inputBox.ts | 4 - src/vs/base/browser/ui/list/list.ts | 25 +- src/vs/base/browser/ui/list/listPaging.ts | 30 +- src/vs/base/browser/ui/list/listView.ts | 146 +- src/vs/base/browser/ui/list/listWidget.ts | 131 +- src/vs/base/browser/ui/sash/sash.ts | 3 +- src/vs/base/browser/ui/splitview/splitview.ts | 50 +- src/vs/base/common/async.ts | 9 +- src/vs/base/common/color.ts | 2 +- src/vs/base/common/date.ts | 25 + src/vs/base/common/diff/diff.ts | 4 +- src/vs/base/common/event.ts | 9 + src/vs/base/common/events.ts | 78 - src/vs/base/common/filters.ts | 70 +- src/vs/base/common/iterator.ts | 2 +- src/vs/base/common/json.ts | 3 + src/vs/base/common/jsonSchema.ts | 1 + src/vs/base/common/labels.ts | 4 + src/vs/base/common/linkedList.ts | 14 +- src/vs/base/common/map.ts | 12 - src/vs/base/common/marshalling.ts | 32 +- src/vs/base/common/types.ts | 2 +- src/vs/base/common/uri.ts | 10 +- src/vs/base/node/encoding.ts | 87 + src/vs/base/node/extfs.ts | 29 + src/vs/base/node/id.ts | 27 +- src/vs/base/node/ports.ts | 30 +- src/vs/base/node/profiler.ts | 100 - src/vs/base/node/ps-win.ps1 | 183 + src/vs/base/node/ps.ts | 253 + src/vs/base/node/stats.ts | 152 + .../parts/quickopen/browser/quickOpenModel.ts | 11 +- .../quickopen/browser/quickOpenWidget.ts | 65 +- .../base/parts/quickopen/common/quickOpen.ts | 12 +- .../parts/quickopen/common/quickOpenScorer.ts | 31 +- .../test/common/quickOpenScorer.test.ts | 37 + src/vs/base/parts/tree/browser/treeDnd.ts | 3 +- src/vs/base/parts/tree/browser/treeView.ts | 27 +- src/vs/base/test/browser/builder.test.ts | 403 +- src/vs/base/test/common/color.test.ts | 6 + src/vs/base/test/common/filters.perf.test.ts | 7 +- src/vs/base/test/common/filters.test.ts | 28 +- src/vs/base/test/common/json.test.ts | 1 + .../base/test/node/encoding/encoding.test.ts | 18 + src/vs/base/test/node/extfs/extfs.test.ts | 25 + src/vs/base/test/node/id.test.ts | 17 + src/vs/base/test/node/port.test.ts | 4 +- src/vs/code/electron-browser/sharedProcess.js | 6 +- .../electron-browser/sharedProcessMain.ts | 45 +- src/vs/code/electron-main/app.ts | 105 +- src/vs/code/electron-main/auth.ts | 4 +- src/vs/code/electron-main/diagnostics.ts | 178 + src/vs/code/electron-main/keyboard.ts | 16 +- src/vs/code/electron-main/launch.ts | 72 +- src/vs/code/electron-main/main.ts | 99 +- src/vs/code/electron-main/menus.ts | 108 +- src/vs/code/electron-main/sharedProcess.ts | 12 +- src/vs/code/electron-main/window.ts | 59 +- src/vs/code/electron-main/windows.ts | 174 +- src/vs/code/node/cli.ts | 162 +- src/vs/code/node/cliProcessMain.ts | 49 +- .../editor/browser/controller/coreCommands.ts | 7 +- .../browser/controller/pointerHandler.ts | 5 +- .../browser/services/codeEditorServiceImpl.ts | 2 +- .../editor/browser/widget/codeEditorWidget.ts | 17 +- .../common/config/commonEditorConfig.ts | 19 +- src/vs/editor/common/config/editorOptions.ts | 16 +- .../editor/common/controller/cursorCommon.ts | 28 +- src/vs/editor/common/core/lineTokens.ts | 60 +- .../common/model/textModelWithTokens.ts | 59 +- src/vs/editor/common/modes.ts | 2 +- .../modes/languageConfigurationRegistry.ts | 39 +- .../common/viewLayout/viewLineRenderer.ts | 10 +- .../contrib/codelens/codelensController.ts | 14 +- src/vs/editor/contrib/dnd/dnd.ts | 22 +- src/vs/editor/contrib/find/findController.ts | 60 +- src/vs/editor/contrib/find/findState.ts | 5 + src/vs/editor/contrib/find/findWidget.ts | 106 +- .../contrib/find/test/findController.test.ts | 119 +- src/vs/editor/contrib/folding/folding.ts | 85 +- src/vs/editor/contrib/folding/foldingModel.ts | 77 +- .../editor/contrib/folding/foldingRanges.ts | 40 + .../contrib/folding/test/foldingModel.test.ts | 44 +- src/vs/editor/contrib/gotoError/gotoError.ts | 12 - src/vs/editor/contrib/hover/hover.css | 10 +- .../editor/contrib/hover/modesContentHover.ts | 6 +- .../editor/contrib/indentation/indentation.ts | 24 +- src/vs/editor/contrib/links/links.css | 1 + src/vs/editor/contrib/quickFix/quickFix.ts | 6 +- .../contrib/quickFix/quickFixCommands.ts | 3 +- .../editor/contrib/quickFix/quickFixModel.ts | 13 +- .../contrib/quickFix/test/quickFix.test.ts | 58 + .../media/referencesWidget.css | 3 +- .../referenceSearch/referencesController.ts | 36 +- .../referenceSearch/referencesWidget.ts | 2 +- .../contrib/snippet/snippetController2.ts | 22 + .../editor/contrib/snippet/snippetSession.css | 6 +- .../editor/contrib/snippet/snippetSession.ts | 94 +- .../test/snippetController2.old.test.ts | 3 +- .../snippet/test/snippetController2.test.ts | 57 +- .../editor/contrib/suggest/completionModel.ts | 52 +- .../contrib/suggest/suggestController.ts | 37 +- .../editor/contrib/suggest/suggestMemory.ts | 107 + src/vs/editor/contrib/suggest/suggestModel.ts | 25 +- .../editor/contrib/suggest/suggestWidget.ts | 9 +- .../suggest/test/completionModel.test.ts | 69 +- .../contrib/suggest/test/suggestModel.test.ts | 88 +- .../wordHighlighter/wordHighlighter.ts | 6 +- .../editor/contrib/zoneWidget/zoneWidget.ts | 8 +- .../quickOpen/quickOpenEditorWidget.ts | 3 +- .../standalone/browser/simpleServices.ts | 6 +- .../viewLayout/viewLineRenderer.test.ts | 30 + .../actions/test/common/menuService.test.ts | 11 +- .../backup/electron-main/backupMainService.ts | 2 +- .../electron-main/backupMainService.test.ts | 4 +- .../clipboard/common/clipboardService.ts | 12 +- .../electron-browser/clipboardService.ts | 16 +- .../commands/common/commandService.ts | 6 +- .../commands/test/commandService.test.ts | 20 +- .../common/configurationRegistry.ts | 25 +- .../contextkey/browser/contextKeyService.ts | 6 +- src/vs/platform/editor/common/editor.ts | 15 +- .../environment/common/environment.ts | 21 +- src/vs/platform/environment/node/argv.ts | 8 +- .../environment/node/environmentService.ts | 87 +- .../test/node/environmentService.test.ts | 2 +- .../common/extensionEnablementService.ts | 7 +- .../common/extensionManagementUtil.ts | 36 +- .../common/extensionNls.ts | 2 +- .../node/extensionGalleryService.ts | 257 +- .../node/extensionManagementService.ts | 485 +- .../node/extensionManagementUtil.ts | 23 + .../test/node/extensionGalleryService.test.ts | 51 + .../platform/extensions/common/extensions.ts | 95 +- .../extensions/common/extensionsRegistry.ts | 10 + src/vs/platform/files/common/files.ts | 6 +- .../electron-main/historyMainService.ts | 24 +- src/vs/platform/integrity/common/integrity.ts | 3 +- .../integrity/node/integrityServiceImpl.ts | 12 +- .../common/abstractKeybindingService.test.ts | 2 +- .../lifecycle/electron-main/lifecycleMain.ts | 24 +- src/vs/platform/list/browser/listService.ts | 222 +- src/vs/platform/log/common/log.ts | 247 +- src/vs/platform/log/node/spdlogService.ts | 111 + .../platform/markers/common/problemMatcher.ts | 2 +- src/vs/platform/message/common/message.ts | 6 +- src/vs/platform/node/product.ts | 1 + src/vs/platform/progress/common/progress.ts | 2 +- .../electron-browser/requestService.ts | 1 + src/vs/platform/state/common/state.ts | 18 + src/vs/platform/state/node/stateService.ts | 110 + src/vs/platform/state/test/node/state.test.ts | 56 + src/vs/platform/storage/node/storage.ts | 94 - .../platform/telemetry/browser/idleMonitor.ts | 78 - .../telemetry/common/telemetryUtils.ts | 13 - .../telemetry/node/commonProperties.ts | 21 +- .../node/workbenchCommonProperties.ts | 40 +- .../electron-browser/commonProperties.test.ts | 64 +- .../update/electron-main/updateService.ts | 11 +- src/vs/platform/windows/common/windows.ts | 12 +- .../windows/electron-browser/windowService.ts | 16 +- .../platform/workbench/common/contextkeys.ts | 11 + .../workspaces/common/workspacesIpc.ts | 4 +- .../electron-main/workspacesMainService.ts | 14 +- .../workspacesMainService.test.ts | 4 +- src/vs/vscode.d.ts | 14 +- src/vs/vscode.proposed.d.ts | 83 +- .../electron-browser/mainThreadCommands.ts | 2 +- .../mainThreadDebugService.ts | 73 +- .../api/electron-browser/mainThreadDialogs.ts | 26 +- .../mainThreadDocumentsAndEditors.ts | 6 +- .../api/electron-browser/mainThreadEditors.ts | 20 - .../api/electron-browser/mainThreadErrors.ts | 4 +- .../mainThreadExtensionService.ts | 17 +- .../mainThreadLanguageFeatures.ts | 2 +- .../mainThreadMessageService.ts | 1 - .../electron-browser/mainThreadProgress.ts | 3 +- .../mainThreadSaveParticipant.ts | 79 +- .../electron-browser/mainThreadTreeViews.ts | 74 +- .../electron-browser/mainThreadWorkspace.ts | 13 +- src/vs/workbench/api/node/extHost.api.impl.ts | 37 +- src/vs/workbench/api/node/extHost.protocol.ts | 55 +- .../workbench/api/node/extHostApiCommands.ts | 17 +- src/vs/workbench/api/node/extHostCommands.ts | 21 +- .../workbench/api/node/extHostDebugService.ts | 89 +- .../node/extHostDocumentSaveParticipant.ts | 42 +- .../api/node/extHostExtensionActivator.ts | 37 +- .../api/node/extHostExtensionService.ts | 109 +- .../api/node/extHostLanguageFeatures.ts | 74 +- src/vs/workbench/api/node/extHostSCM.ts | 14 +- .../workbench/api/node/extHostTextEditors.ts | 4 +- src/vs/workbench/api/node/extHostTreeViews.ts | 213 +- .../api/node/extHostTypeConverters.ts | 18 +- src/vs/workbench/api/node/extHostTypes.ts | 33 + src/vs/workbench/api/node/extHostWorkspace.ts | 26 +- src/vs/workbench/browser/composite.ts | 40 +- src/vs/workbench/browser/editor.ts | 44 +- src/vs/workbench/browser/labels.ts | 2 +- src/vs/workbench/browser/layout.ts | 4 + .../parts/activitybar/activitybarPart.ts | 10 +- .../parts/compositebar/compositeBar.ts | 20 +- .../browser/parts/editor/editorActions.ts | 21 +- .../parts/editor/editorAreaDropHandler.ts | 171 + .../parts/editor/editorGroupsControl.ts | 75 +- .../browser/parts/editor/editorPart.ts | 109 +- .../browser/parts/editor/editorPicker.ts | 14 +- .../browser/parts/editor/media/tabstitle.css | 44 +- .../parts/editor/noTabsTitleControl.ts | 11 +- .../browser/parts/editor/tabsTitleControl.ts | 149 +- .../browser/parts/editor/titleControl.ts | 89 +- .../browser/parts/panel/media/panelpart.css | 34 +- .../browser/parts/panel/panelPart.ts | 24 +- .../parts/quickopen/quickOpenController.ts | 33 +- .../browser/parts/sidebar/sidebarPart.ts | 9 + .../workbench/browser/parts/views/treeView.ts | 66 +- .../browser/parts/views/viewsViewlet.ts | 112 +- src/vs/workbench/browser/quickopen.ts | 21 +- src/vs/workbench/common/actions.ts | 9 +- src/vs/workbench/common/editor.ts | 21 +- .../common/editor/resourceEditorInput.ts | 3 +- src/vs/workbench/common/theme.ts | 24 + src/vs/workbench/common/views.ts | 6 +- src/vs/workbench/electron-browser/actions.ts | 104 +- .../electron-browser/bootstrap/index.js | 122 +- src/vs/workbench/electron-browser/commands.ts | 101 +- .../electron-browser/main.contribution.ts | 240 +- src/vs/workbench/electron-browser/main.ts | 21 +- src/vs/workbench/electron-browser/shell.ts | 88 +- .../workbench/electron-browser/workbench.ts | 121 +- src/vs/workbench/node/extensionHostMain.ts | 43 +- src/vs/workbench/node/extensionHostProcess.ts | 17 + .../parts/backup/common/backupRestorer.ts | 2 - .../languageConfigurationExtensionPoint.ts | 1 + .../electron-browser/selectionClipboard.ts | 6 +- .../parts/debug/browser/debugActions.ts | 6 + .../parts/debug/browser/debugActionsWidget.ts | 38 +- .../parts/debug/browser/debugViewlet.ts | 10 +- .../browser/media/debug.contribution.css | 4 + .../debug/browser/media/debugViewlet.css | 6 +- src/vs/workbench/parts/debug/common/debug.ts | 18 +- .../parts/debug/common/debugModel.ts | 95 +- .../parts/debug/common/debugProtocol.d.ts | 4 +- .../parts/debug/common/debugViewModel.ts | 7 - .../debug/electron-browser/baseDebugView.ts | 248 + .../debug/electron-browser/breakpointsView.ts | 518 ++ .../debug/electron-browser/callStackView.ts | 543 ++ .../electron-browser/debug.contribution.ts | 6 +- .../debug/electron-browser/debugCommands.ts | 10 +- .../debugConfigurationManager.ts | 144 +- .../debugEditorContribution.ts | 18 +- .../debug/electron-browser/debugHover.ts | 22 +- .../debug/electron-browser/debugService.ts | 118 +- .../debug/electron-browser/debugViewer.ts | 1323 --- .../debug/electron-browser/debugViews.ts | 511 -- .../parts/debug/electron-browser/repl.ts | 41 +- .../debug/electron-browser/replViewer.ts | 48 +- .../debug/electron-browser/terminalSupport.ts | 21 +- .../debug/electron-browser/variablesView.ts | 334 + .../electron-browser/watchExpressionsView.ts | 395 + .../electron-browser/TerminalHelper.scpt | Bin 14736 -> 15672 bytes .../electron-browser/iTermHelper.scpt | Bin 6790 -> 7330 bytes .../electron-browser/terminalService.ts | 16 +- .../extensions/browser/extensionEditor.ts | 26 +- .../extensions/browser/extensionsActions.ts | 100 +- .../extensions/browser/extensionsWidgets.ts | 2 + .../browser/media/extensionActions.css | 8 +- .../browser/media/extensionEditor.css | 1 - .../common/extensionsFileTemplate.ts | 1 + .../extensionProfileService.ts | 182 + .../electron-browser/extensionTipsService.ts | 8 +- .../extensions.contribution.ts | 45 +- .../electron-browser/extensionsActions.ts | 4 - .../electron-browser/extensionsUtils.ts | 67 +- .../electron-browser/extensionsViews.ts | 78 +- .../media/profile-start-inverse.svg | 1 + .../electron-browser/media/profile-start.svg | 1 + .../media/profile-stop-inverse.svg | 1 + .../electron-browser/media/profile-stop.svg | 1 + .../media/runtimeExtensionsEditor.css | 126 + .../electron-browser/media/save-inverse.svg | 1 + .../electron-browser/media/save.svg | 1 + .../runtimeExtensionsEditor.ts | 593 ++ .../node/extensionsWorkbenchService.ts | 38 +- .../extensionsWorkbenchService.test.ts | 2 +- .../electron-browser/feedbackStatusbarItem.ts | 4 +- .../browser/editors/fileEditorTracker.ts | 14 +- .../files/common/editors/fileEditorInput.ts | 8 +- src/vs/workbench/parts/files/common/files.ts | 11 +- .../files/electron-browser/explorerViewlet.ts | 7 +- .../files/electron-browser/fileActions.ts | 21 +- .../files/electron-browser/fileCommands.ts | 13 +- .../media/explorerviewlet.css | 33 +- .../electron-browser/media/fileactions.css | 10 +- .../files/electron-browser/views/emptyView.ts | 2 +- .../electron-browser/views/explorerView.ts | 110 +- .../electron-browser/views/explorerViewer.ts | 11 +- .../electron-browser/views/openEditorsView.ts | 651 +- .../views/openEditorsViewer.ts | 521 -- .../parts/html/browser/html.contribution.ts | 3 +- .../parts/html/browser/webview-pre.js | 64 +- .../workbench/parts/html/browser/webview.ts | 157 +- .../parts/markers/browser/markersPanel.ts | 74 +- .../markers/browser/markersPanelActions.ts | 43 +- .../parts/markers/common/constants.ts | 2 +- .../parts/markers/common/markersModel.ts | 31 +- .../performance.contribution.ts | 82 +- .../electron-browser/startupProfiler.ts | 97 + .../preferences/browser/keybindingWidgets.ts | 2 +- .../preferences/browser/keybindingsEditor.ts | 38 +- .../preferences/browser/media/preferences.css | 22 +- .../preferences/browser/preferencesEditor.ts | 35 +- .../browser/preferencesRenderers.ts | 15 +- .../preferences/browser/preferencesService.ts | 6 +- .../preferences/browser/preferencesWidgets.ts | 98 +- .../parts/preferences/common/preferences.ts | 4 +- .../common/preferencesContribution.ts | 2 +- .../preferences/common/preferencesModels.ts | 210 +- .../electron-browser/preferencesSearch.ts | 54 +- .../quickopen/browser/gotoLineHandler.ts | 10 +- .../quickopen/browser/gotoSymbolHandler.ts | 10 +- .../relauncher.contribution.ts | 2 +- .../electron-browser/dirtydiffDecorator.ts | 60 +- .../scm/electron-browser/media/scmViewlet.css | 13 +- .../scm/electron-browser/scm.contribution.ts | 14 + .../parts/scm/electron-browser/scmViewlet.ts | 117 +- .../search/browser/openAnythingHandler.ts | 148 +- .../parts/search/browser/openFileHandler.ts | 7 +- .../search/browser/patternInputWidget.ts | 7 +- .../parts/search/browser/replaceService.ts | 8 +- .../parts/search/browser/searchActions.ts | 207 +- .../parts/search/browser/searchViewlet.ts | 94 +- .../parts/search/common/queryBuilder.ts | 7 +- .../parts/search/common/searchModel.ts | 12 +- .../electron-browser/search.contribution.ts | 23 +- .../search/electron-browser/searchActions.ts | 7 +- .../search/test/common/queryBuilder.test.ts | 34 +- .../electron-browser/snippets.contribution.ts | 1 + .../electron-browser/snippetsService.ts | 1 + .../parts/stats/node/workspaceStats.ts | 47 +- .../electron-browser/task.contribution.ts | 4 +- .../terminal/browser/terminalQuickOpen.ts | 2 +- .../parts/terminal/common/terminal.ts | 10 - .../electron-browser/media/scrollbar.css | 1 + .../electron-browser/terminalInstance.ts | 16 - .../electron-browser/terminalPanel.ts | 3 +- .../electron-browser/terminalService.ts | 3 +- .../parts/terminal/node/terminalProcess.ts | 3 +- .../electron-browser/themes.contribution.ts | 4 +- ...supportedWorkspaceSettings.contribution.ts | 18 - .../electron-browser/media/code-icon.svg | 1 + .../media/update.contribution.css | 6 + .../electron-browser/releaseNotesEditor.ts | 10 +- .../electron-browser/releaseNotesInput.ts | 5 + .../parts/update/electron-browser/update.ts | 5 +- .../watermark/electron-browser/watermark.ts | 11 +- .../page/electron-browser/welcomePage.ts | 25 +- .../electron-browser/walkThroughPart.ts | 26 +- .../walkThrough/node/walkThroughInput.ts | 45 - .../services/backup/common/backup.ts | 8 + .../services/backup/node/backupFileService.ts | 8 +- .../test/node/backupFileService.test.ts | 8 +- .../common/configurationExtensionPoint.ts | 1 + .../configuration/node/configuration.ts | 18 +- .../node/configurationEditingService.ts | 2 +- .../node/configurationService.ts | 48 +- .../node/configurationEditingService.test.ts | 22 + .../test/node/configurationService.test.ts | 20 + .../services/editor/common/editorService.ts | 15 +- .../electron-browser/extensionHost.ts | 67 +- .../electron-browser/extensionHostProfiler.ts | 154 + .../electron-browser/extensionPoints.ts | 219 +- .../electron-browser/extensionService.ts | 417 +- .../files/electron-browser/fileService.ts | 2 + .../services/files/node/fileService.ts | 16 +- .../services/files/test/node/resolver.test.ts | 2 +- .../services/group/common/groupService.ts | 2 + .../electron-browser/keybindingService.ts | 37 +- .../message/browser/messageService.ts | 6 +- .../electron-browser/messageService.ts | 38 +- .../services/part/common/partService.ts | 7 +- .../progress/browser/progressService2.ts | 10 +- .../services/scm/common/scmService.ts | 5 +- .../services/search/node/fileSearch.ts | 12 +- .../services/search/node/ripgrepTextSearch.ts | 38 +- .../services/search/node/searchService.ts | 13 +- .../textfile/common/textFileEditorModel.ts | 3 +- .../textfile/common/textFileService.ts | 31 +- .../services/textfile/common/textfiles.ts | 21 +- .../electron-browser/textFileService.ts | 10 +- .../common/textModelResolverService.ts | 2 + .../themes/common/colorThemeSchema.ts | 1 + .../themes/common/fileIconThemeSchema.ts | 1 + .../services/timer/node/timerService.ts | 2 +- .../workspace/node/workspaceEditingService.ts | 62 +- .../api/extHostApiCommands.test.ts | 19 +- .../api/extHostCommands.test.ts | 5 +- .../extHostDocumentSaveParticipant.test.ts | 68 +- .../api/extHostLanguageFeatures.test.ts | 11 +- .../api/extHostTreeViews.test.ts | 336 +- .../api/mainThreadDocumentsAndEditors.test.ts | 1 - .../api/mainThreadEditors.test.ts | 2 - .../api/mainThreadSaveParticipant.test.ts | 31 + .../quickopen.perf.integrationTest.ts | 2 +- .../textsearch.perf.integrationTest.ts | 2 +- .../workbench/test/workbenchTestServices.ts | 27 +- test/electron/renderer.js | 6 + test/smoke/README.md | 2 +- test/smoke/src/areas/css/css.test.ts | 94 +- test/smoke/src/areas/debug/debug.test.ts | 285 +- test/smoke/src/areas/editor/editor.test.ts | 132 +- .../smoke/src/areas/explorer/explorer.test.ts | 70 +- .../src/areas/extensions/extensions.test.ts | 56 +- test/smoke/src/areas/git/git.test.ts | 125 +- test/smoke/src/areas/git/scm.ts | 6 +- .../src/areas/multiroot/multiroot.test.ts | 50 +- .../src/areas/preferences/preferences.test.ts | 72 +- test/smoke/src/areas/search/search.test.ts | 98 +- .../src/areas/statusbar/statusbar.test.ts | 174 +- .../src/areas/workbench/data-loss.test.ts | 66 +- .../areas/workbench/data-migration.test.ts | 165 +- .../src/areas/workbench/localization.test.ts | 86 +- test/smoke/src/helpers/utilities.ts | 29 - test/smoke/src/main.ts | 85 +- test/smoke/src/spectron/application.ts | 28 +- test/smoke/src/spectron/client.ts | 8 - yarn.lock | 73 +- 1982 files changed, 41842 insertions(+), 12801 deletions(-) create mode 100644 .nvmrc create mode 100644 extensions/OSSREADME.json create mode 100644 extensions/bat/snippets/batchfile.snippets.json create mode 100644 extensions/coffeescript/snippets/coffeescript.snippets.json create mode 100644 extensions/git/src/api.ts rename extensions/html/{snippet/html.json => snippets/html.snippets.json} (77%) create mode 100644 extensions/java/snippets/java.snippets.json create mode 100644 extensions/json/server/src/utils/errors.ts create mode 100644 extensions/markdown/src/commandManager.ts create mode 100644 extensions/markdown/src/commands.ts rename extensions/markdown/src/{ => features}/documentLinkProvider.ts (93%) rename extensions/markdown/src/{ => features}/documentSymbolProvider.ts (88%) create mode 100644 extensions/markdown/src/markdownExtensions.ts delete mode 100644 extensions/markdown/src/previewContentProvider.ts create mode 100644 extensions/markdown/src/telemetryReporter.ts create mode 100644 extensions/ms-vscode.node-debug/package-lock.json create mode 100644 extensions/ms-vscode.node-debug2/package-lock.json rename extensions/php/snippets/{php.json => php.snippets.json} (95%) create mode 100644 extensions/typescript/src/commands.ts create mode 100644 extensions/typescript/src/extension.ts create mode 100644 extensions/typescript/src/utils/fileSchemes.ts create mode 100644 extensions/typescript/src/utils/languageDescription.ts create mode 100644 extensions/typescript/src/utils/lazy.ts create mode 100644 extensions/typescript/src/utils/managedFileContext.ts create mode 100644 i18n/chs/extensions/git/out/autofetch.i18n.json create mode 100644 i18n/chs/extensions/markdown/out/commands.i18n.json create mode 100644 i18n/chs/extensions/markdown/out/features/previewContentProvider.i18n.json create mode 100644 i18n/chs/src/vs/code/electron-main/main.i18n.json create mode 100644 i18n/chs/src/vs/editor/browser/services/bulkEdit.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/caretOperations/transpose.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/clipboard/clipboard.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/comment/comment.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/find/findController.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/find/findWidget.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/find/simpleFindWidget.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/folding/folding.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/format/formatActions.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/gotoError/gotoError.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/hover/hover.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/hover/modesContentHover.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/indentation/indentation.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/links/links.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/multicursor/multicursor.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/rename/rename.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/rename/renameInputField.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/suggest/suggestController.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/suggest/suggestWidget.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json create mode 100644 i18n/chs/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json create mode 100644 i18n/chs/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json create mode 100644 i18n/chs/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json create mode 100644 i18n/cht/extensions/git/out/autofetch.i18n.json create mode 100644 i18n/cht/extensions/markdown/out/commands.i18n.json create mode 100644 i18n/cht/extensions/markdown/out/features/previewContentProvider.i18n.json create mode 100644 i18n/cht/src/vs/code/electron-main/main.i18n.json create mode 100644 i18n/cht/src/vs/editor/browser/services/bulkEdit.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/caretOperations/transpose.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/clipboard/clipboard.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/comment/comment.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/find/findController.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/find/findWidget.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/find/simpleFindWidget.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/folding/folding.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/format/formatActions.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/gotoError/gotoError.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/hover/hover.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/hover/modesContentHover.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/indentation/indentation.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/links/links.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/multicursor/multicursor.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/rename/rename.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/rename/renameInputField.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/suggest/suggestController.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/suggest/suggestWidget.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json create mode 100644 i18n/cht/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json create mode 100644 i18n/cht/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json create mode 100644 i18n/cht/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json create mode 100644 i18n/deu/extensions/git/out/autofetch.i18n.json create mode 100644 i18n/deu/extensions/markdown/out/commands.i18n.json create mode 100644 i18n/deu/extensions/markdown/out/features/previewContentProvider.i18n.json create mode 100644 i18n/deu/src/vs/code/electron-main/main.i18n.json create mode 100644 i18n/deu/src/vs/editor/browser/services/bulkEdit.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/caretOperations/transpose.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/clipboard/clipboard.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/comment/comment.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/find/findController.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/find/findWidget.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/find/simpleFindWidget.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/folding/folding.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/format/formatActions.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/gotoError/gotoError.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/hover/hover.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/hover/modesContentHover.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/indentation/indentation.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/links/links.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/multicursor/multicursor.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/rename/rename.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/rename/renameInputField.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/suggest/suggestController.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/suggest/suggestWidget.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json create mode 100644 i18n/deu/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json create mode 100644 i18n/deu/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json create mode 100644 i18n/deu/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json create mode 100644 i18n/esn/extensions/git/out/autofetch.i18n.json create mode 100644 i18n/esn/extensions/markdown/out/commands.i18n.json create mode 100644 i18n/esn/extensions/markdown/out/features/previewContentProvider.i18n.json create mode 100644 i18n/esn/src/vs/code/electron-main/main.i18n.json create mode 100644 i18n/esn/src/vs/editor/browser/services/bulkEdit.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/caretOperations/transpose.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/clipboard/clipboard.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/comment/comment.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/find/findController.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/find/findWidget.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/find/simpleFindWidget.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/folding/folding.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/format/formatActions.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/gotoError/gotoError.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/hover/hover.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/hover/modesContentHover.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/indentation/indentation.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/links/links.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/multicursor/multicursor.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/rename/rename.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/rename/renameInputField.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/suggest/suggestController.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/suggest/suggestWidget.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json create mode 100644 i18n/esn/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json create mode 100644 i18n/esn/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json create mode 100644 i18n/esn/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json create mode 100644 i18n/fra/extensions/git/out/autofetch.i18n.json create mode 100644 i18n/fra/extensions/markdown/out/commands.i18n.json create mode 100644 i18n/fra/extensions/markdown/out/features/previewContentProvider.i18n.json create mode 100644 i18n/fra/src/vs/code/electron-main/main.i18n.json create mode 100644 i18n/fra/src/vs/editor/browser/services/bulkEdit.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/caretOperations/transpose.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/clipboard/clipboard.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/comment/comment.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/find/findController.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/find/findWidget.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/find/simpleFindWidget.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/folding/folding.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/format/formatActions.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/gotoError/gotoError.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/hover/hover.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/hover/modesContentHover.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/indentation/indentation.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/links/links.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/multicursor/multicursor.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/rename/rename.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/rename/renameInputField.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/suggest/suggestController.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/suggest/suggestWidget.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json create mode 100644 i18n/fra/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json create mode 100644 i18n/fra/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json create mode 100644 i18n/fra/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json create mode 100644 i18n/hun/extensions/git/out/autofetch.i18n.json create mode 100644 i18n/hun/extensions/markdown/out/commands.i18n.json create mode 100644 i18n/hun/extensions/markdown/out/features/previewContentProvider.i18n.json create mode 100644 i18n/hun/src/vs/code/electron-main/main.i18n.json create mode 100644 i18n/hun/src/vs/editor/browser/services/bulkEdit.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/caretOperations/transpose.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/clipboard/clipboard.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/comment/comment.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/find/findController.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/find/findWidget.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/find/simpleFindWidget.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/folding/folding.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/format/formatActions.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/gotoError/gotoError.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/hover/hover.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/hover/modesContentHover.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/indentation/indentation.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/links/links.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/multicursor/multicursor.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/rename/rename.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/rename/renameInputField.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/suggest/suggestController.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/suggest/suggestWidget.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json create mode 100644 i18n/ita/extensions/git/out/autofetch.i18n.json create mode 100644 i18n/ita/extensions/markdown/out/commands.i18n.json create mode 100644 i18n/ita/extensions/markdown/out/features/previewContentProvider.i18n.json create mode 100644 i18n/ita/src/vs/code/electron-main/main.i18n.json create mode 100644 i18n/ita/src/vs/editor/browser/services/bulkEdit.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/caretOperations/transpose.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/clipboard/clipboard.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/comment/comment.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/find/findController.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/find/findWidget.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/find/simpleFindWidget.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/folding/folding.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/format/formatActions.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/gotoError/gotoError.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/hover/hover.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/hover/modesContentHover.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/indentation/indentation.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/links/links.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/multicursor/multicursor.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/rename/rename.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/rename/renameInputField.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/suggest/suggestController.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/suggest/suggestWidget.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json create mode 100644 i18n/ita/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json create mode 100644 i18n/ita/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json create mode 100644 i18n/ita/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json create mode 100644 i18n/jpn/extensions/git/out/autofetch.i18n.json create mode 100644 i18n/jpn/extensions/markdown/out/commands.i18n.json create mode 100644 i18n/jpn/extensions/markdown/out/features/previewContentProvider.i18n.json create mode 100644 i18n/jpn/src/vs/code/electron-main/main.i18n.json create mode 100644 i18n/jpn/src/vs/editor/browser/services/bulkEdit.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/caretOperations/transpose.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/clipboard/clipboard.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/comment/comment.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/find/findController.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/find/findWidget.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/find/simpleFindWidget.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/folding/folding.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/format/formatActions.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/gotoError/gotoError.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/hover/hover.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/hover/modesContentHover.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/indentation/indentation.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/links/links.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/multicursor/multicursor.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/rename/rename.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/rename/renameInputField.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/suggest/suggestController.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/suggest/suggestWidget.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json create mode 100644 i18n/kor/extensions/git/out/autofetch.i18n.json create mode 100644 i18n/kor/extensions/markdown/out/commands.i18n.json create mode 100644 i18n/kor/extensions/markdown/out/features/previewContentProvider.i18n.json create mode 100644 i18n/kor/src/vs/code/electron-main/main.i18n.json create mode 100644 i18n/kor/src/vs/editor/browser/services/bulkEdit.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/caretOperations/transpose.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/clipboard/clipboard.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/comment/comment.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/find/findController.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/find/findWidget.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/find/simpleFindWidget.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/folding/folding.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/format/formatActions.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/gotoError/gotoError.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/hover/hover.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/hover/modesContentHover.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/indentation/indentation.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/links/links.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/multicursor/multicursor.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/rename/rename.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/rename/renameInputField.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/suggest/suggestController.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/suggest/suggestWidget.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json create mode 100644 i18n/kor/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json create mode 100644 i18n/kor/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json create mode 100644 i18n/kor/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json create mode 100644 i18n/ptb/extensions/git/out/autofetch.i18n.json create mode 100644 i18n/ptb/extensions/markdown/out/commands.i18n.json create mode 100644 i18n/ptb/extensions/markdown/out/features/previewContentProvider.i18n.json create mode 100644 i18n/ptb/src/vs/code/electron-main/main.i18n.json create mode 100644 i18n/ptb/src/vs/editor/browser/services/bulkEdit.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/caretOperations/transpose.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/clipboard/clipboard.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/comment/comment.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/find/findController.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/find/findWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/find/simpleFindWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/folding/folding.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/format/formatActions.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/gotoError/gotoError.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/hover/hover.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/hover/modesContentHover.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/indentation/indentation.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/links/links.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/multicursor/multicursor.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/rename/rename.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/rename/renameInputField.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/suggest/suggestController.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/suggest/suggestWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json create mode 100644 i18n/rus/extensions/git/out/autofetch.i18n.json create mode 100644 i18n/rus/extensions/markdown/out/commands.i18n.json create mode 100644 i18n/rus/extensions/markdown/out/features/previewContentProvider.i18n.json create mode 100644 i18n/rus/src/vs/code/electron-main/main.i18n.json create mode 100644 i18n/rus/src/vs/editor/browser/services/bulkEdit.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/caretOperations/transpose.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/clipboard/clipboard.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/comment/comment.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/find/findController.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/find/findWidget.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/find/simpleFindWidget.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/folding/folding.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/format/formatActions.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/gotoError/gotoError.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/hover/hover.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/hover/modesContentHover.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/indentation/indentation.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/links/links.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/multicursor/multicursor.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/rename/rename.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/rename/renameInputField.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/suggest/suggestController.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/suggest/suggestWidget.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json create mode 100644 i18n/rus/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json create mode 100644 i18n/rus/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json create mode 100644 i18n/rus/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json create mode 100644 i18n/trk/extensions/git/out/autofetch.i18n.json create mode 100644 i18n/trk/extensions/markdown/out/commands.i18n.json create mode 100644 i18n/trk/extensions/markdown/out/features/previewContentProvider.i18n.json create mode 100644 i18n/trk/src/vs/code/electron-main/main.i18n.json create mode 100644 i18n/trk/src/vs/editor/browser/services/bulkEdit.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/caretOperations/transpose.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/clipboard/clipboard.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/comment/comment.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/find/findController.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/find/findWidget.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/find/simpleFindWidget.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/folding/folding.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/format/formatActions.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/gotoError/gotoError.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/hover/hover.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/hover/modesContentHover.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/indentation/indentation.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/links/links.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/multicursor/multicursor.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/rename/rename.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/rename/renameInputField.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/suggest/suggestController.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/suggest/suggestWidget.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json create mode 100644 src/typings/spdlog.d.ts create mode 100644 src/typings/v8-inspect-profiler.d.ts create mode 100644 src/vs/base/common/date.ts delete mode 100644 src/vs/base/common/events.ts delete mode 100644 src/vs/base/node/profiler.ts create mode 100644 src/vs/base/node/ps-win.ps1 create mode 100644 src/vs/base/node/ps.ts create mode 100644 src/vs/base/node/stats.ts create mode 100644 src/vs/base/test/node/id.test.ts create mode 100644 src/vs/code/electron-main/diagnostics.ts create mode 100644 src/vs/editor/contrib/quickFix/test/quickFix.test.ts create mode 100644 src/vs/editor/contrib/suggest/suggestMemory.ts create mode 100644 src/vs/platform/extensionManagement/node/extensionManagementUtil.ts create mode 100644 src/vs/platform/extensionManagement/test/node/extensionGalleryService.test.ts create mode 100644 src/vs/platform/log/node/spdlogService.ts create mode 100644 src/vs/platform/state/common/state.ts create mode 100644 src/vs/platform/state/node/stateService.ts create mode 100644 src/vs/platform/state/test/node/state.test.ts delete mode 100644 src/vs/platform/storage/node/storage.ts delete mode 100644 src/vs/platform/telemetry/browser/idleMonitor.ts create mode 100644 src/vs/platform/workbench/common/contextkeys.ts create mode 100644 src/vs/workbench/browser/parts/editor/editorAreaDropHandler.ts create mode 100644 src/vs/workbench/parts/debug/electron-browser/baseDebugView.ts create mode 100644 src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts create mode 100644 src/vs/workbench/parts/debug/electron-browser/callStackView.ts delete mode 100644 src/vs/workbench/parts/debug/electron-browser/debugViewer.ts delete mode 100644 src/vs/workbench/parts/debug/electron-browser/debugViews.ts create mode 100644 src/vs/workbench/parts/debug/electron-browser/variablesView.ts create mode 100644 src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts create mode 100644 src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.ts create mode 100644 src/vs/workbench/parts/extensions/electron-browser/media/profile-start-inverse.svg create mode 100644 src/vs/workbench/parts/extensions/electron-browser/media/profile-start.svg create mode 100644 src/vs/workbench/parts/extensions/electron-browser/media/profile-stop-inverse.svg create mode 100644 src/vs/workbench/parts/extensions/electron-browser/media/profile-stop.svg create mode 100644 src/vs/workbench/parts/extensions/electron-browser/media/runtimeExtensionsEditor.css create mode 100644 src/vs/workbench/parts/extensions/electron-browser/media/save-inverse.svg create mode 100644 src/vs/workbench/parts/extensions/electron-browser/media/save.svg create mode 100644 src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts delete mode 100644 src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.ts create mode 100644 src/vs/workbench/parts/performance/electron-browser/startupProfiler.ts create mode 100644 src/vs/workbench/parts/update/electron-browser/media/code-icon.svg create mode 100644 src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.ts diff --git a/.github/classifier.yml b/.github/classifier.yml index 8124cd886da..d66324e01fa 100644 --- a/.github/classifier.yml +++ b/.github/classifier.yml @@ -3,26 +3,34 @@ alwaysRequireAssignee: false, labelsRequiringAssignee: [ feature-request ], autoAssignees: { - accessibility: [], api: [], + color-picker: [], css-less-sass: [], - debug: [ weinand ], + debug: [ isidorn ], + diff-editor: [], editor: [], + editor-1000-limit: [], + editor-autoclosing: [], + editor-autoindent: [], editor-brackets: [], editor-clipboard: [], - editor-colors: [], + editor-columnselect: [], editor-contrib: [], editor-core: [], editor-find-widget: [], editor-folding: [], editor-ime: [], - editor-indentation: [], editor-input: [], editor-minimap: [], editor-multicursor: [], + editor-smooth: [], editor-wrapping: [], emmet: [ ramya-rao-a ], error-list: [], + extensions: [], + file-encoding: [ bpasero ], + file-explorer: [ isidorn ], + format: [], git: [ joaomoreno ], hot-exit: [ Tyriar ], html: [ aeschli ], @@ -31,15 +39,31 @@ integrated-terminal: [ Tyriar ], javascript: [ mjbvz ], json: [], + keybindings: [], + keyboard-layout: [], languages basic: [], markdown: [ mjbvz ], merge-conflict: [ chrmarti ], perf-profile: [], php: [ roblourens ], + proxy: [], + scm: [], search: [ roblourens ], snippets: [ jrieken ], tasks: [ dbaeumer ], + telemetry: [], + themes: [], typescript: [ mjbvz ], - workbench: [ bpasero ] + workbench: [ bpasero ], + workbench-dnd: [ bpasero ], + workbench-editors: [ bpasero ], + workbench-feedback: [ bpasero ], + workbench-layout: [ bpasero ], + workbench-menu: [ bpasero ], + workbench-notifications: [ bpasero ], + workbench-state: [ bpasero ], + workbench-status: [ bpasero ], + workbench-tabs: [ bpasero ], + workbench-welcome: [ chrmarti ], } } diff --git a/.github/commands.yml b/.github/commands.yml index a44236ef6ec..8076f05fd1f 100644 --- a/.github/commands.yml +++ b/.github/commands.yml @@ -5,25 +5,37 @@ type: 'label', name: '*question', action: 'close', - comment: "This issue has been closed because it represents a question. Questions are better addressed on [StackOverflow](https://aka.ms/vscodestackoverflow). See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!" + comment: "Please ask your question on [StackOverflow](https://aka.ms/vscodestackoverflow). We have a great community over [there](https://aka.ms/vscodestackoverflow). They have already answered thousands of questions and are happy to answer yours as well. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!" + }, + { + type: 'label', + name: '*dev-question', + action: 'close', + comment: "We have a great developer community [over on slack](https://aka.ms/vscode-dev-community) where extension authors help each other. This is a great place for you to ask questions and find support.\n\nHappy Coding!" }, { type: 'label', name: '*extension-candidate', action: 'close', - comment: "This issue has been closed because it is not within the scope of the core product, but could be addressed by an extension. The [VS Code Marketplace](https://aka.ms/vscodemarketplace) shows all existing extensions and you can get started [writing your own extension](https://aka.ms/vscodewritingextensions) in a few simple steps. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!" + comment: "We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the [VS Code Marketplace](https://aka.ms/vscodemarketplace). Just in case, in a few simple steps you can get started [writing your own extension](https://aka.ms/vscodewritingextensions). See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!" }, { type: 'label', name: '*not-reproducible', action: 'close', - comment: "This issue has been closed because the problem could not be reproduced either because it is already fixed in later versions of the product or because it requires additional details on how to reproduce it. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!" + comment: "We closed this issue because we are unable to reproduce the problem with the steps you describe. Chances are we've already fixed your problem in a recent version of VS Code. If not, please ask us to reopen the issue and provide us with more detail. Our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines might help you with that.\n\nHappy Coding!" }, { type: 'label', name: '*out-of-scope', action: 'close', - comment: "This feature request will not be considered in the next [6-12 months roadmap](https://aka.ms/vscoderoadmap) and has been closed to keep the number of issues we have to maintain manageable. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nThanks for your understanding and happy coding!" + comment: "This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that have been on the backlog for a long time but have not gained traction: We look at the number of votes the issue has received and the number of duplicate issues filed. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.\n\nIf you wonder what we are up to, please see our [roadmap](https://aka.ms/vscoderoadmap) and [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nThanks for your understanding and happy coding!" + }, + { + type: 'label', + name: '*caused-by-extension', + action: 'close', + comment: "This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the [marketplace](https://aka.ms/vscodemarketplace) for VS Code. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!" }, { type: 'comment', @@ -36,7 +48,13 @@ name: '*duplicate', allowTriggerByBot: true, action: 'close', - comment: "This issue has been closed because it is already tracked by another issue. See also our [GitHub issues](https://aka.ms/vscodeissuesearch) to search for existing issues and our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!" + comment: "Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues [here](https://aka.ms/vscodeissuesearch). See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!" + }, + { + type: 'comment', + name: 'confirm', + action: 'updateLabels', + addLabel: 'confirmed' }, ] } diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000000..32c861f970d --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +8.9.2 diff --git a/.travis.yml b/.travis.yml index cdf6766096d..12d94a22d1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,6 +53,7 @@ install: script: - node_modules/.bin/gulp hygiene - node_modules/.bin/gulp electron --silent + - node_modules/.bin/tsc -p ./src/tsconfig.monaco.json --noEmit - node_modules/.bin/gulp compile --silent --max_old_space_size=4096 - node_modules/.bin/gulp optimize-vscode --silent --max_old_space_size=4096 - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/test.sh --coverage --reporter dot; else ./scripts/test.sh --reporter dot; fi diff --git a/.vscode/settings.json b/.vscode/settings.json index 0d85ac560db..d4cdcdbedd8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -34,5 +34,6 @@ "command": "${workspaceFolder}\\scripts\\test.bat --coverage --run ${file}" } } - ] + ], + "typescript.tsdk": "node_modules/typescript/lib" } \ No newline at end of file diff --git a/OSSREADME.json b/OSSREADME.json index 8d13681d416..ccc6ceb8c2e 100644 --- a/OSSREADME.json +++ b/OSSREADME.json @@ -771,5 +771,42 @@ "\"\"\"" ], "isProd": true +}, +{ + "name": "spdlog original", + "version": "0.14.0", + "repositoryURL": "https://github.com/gabime/spdlog", + "license": "MIT", + "isProd": true +}, +{ + "isLicense": true, + "name": "spdlog", + "version": "0.14.0", + "repositoryURL": "https://github.com/gabime/spdlog", + "license": "MIT", + "licenseDetail": [ + "MIT License", + "", + "Copyright (c) Microsoft Corporation. All rights reserved.", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and associated documentation files (the \"Software\"), to deal", + "in the Software without restriction, including without limitation the rights", + "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", + "copies of the Software, and to permit persons to whom the Software is", + "furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in all", + "copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", + "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", + "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", + "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", + "SOFTWARE" + ] } ] diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt index 4a73d4a61eb..00e7f5e3da9 100644 --- a/ThirdPartyNotices.txt +++ b/ThirdPartyNotices.txt @@ -12,52 +12,52 @@ This project incorporates components from the projects listed below. The origina 5. atom/language-java (https://github.com/atom/language-java) 6. atom/language-objective-c (https://github.com/atom/language-objective-c) 7. atom/language-sass version 0.52.0 (https://github.com/atom/language-sass) -8. atom/language-xml (https://github.com/atom/language-xml) -9. Benvie/JavaScriptNext.tmLanguage (https://github.com/Microsoft/vscode-JSON.tmLanguage) -10. chjj-marked version 0.3.6 (https://github.com/npmcomponent/chjj-marked) -11. chriskempson/tomorrow-theme (https://github.com/chriskempson/tomorrow-theme) -12. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes) -13. daaain/Handlebars (https://github.com/daaain/Handlebars) -14. davidrios/jade-tmbundle (https://github.com/davidrios/jade-tmbundle) -15. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped) -16. demyte/language-cshtml (https://github.com/demyte/language-cshtml) -17. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage) -18. expand-abbreviation version 0.5.8 (https://github.com/emmetio/expand-abbreviation) -19. fadeevab/make.tmbundle (https://github.com/fadeevab/make.tmbundle) -20. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift) -21. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/) -22. Ikuyadeu/vscode-R (https://github.com/Ikuyadeu/vscode-R) -23. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site) -24. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar) -25. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify) -26. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert) -27. language-docker (https://github.com/moby/moby) -28. language-go version 0.39.0 (https://github.com/atom/language-go) -29. language-less (https://github.com/atom/language-less) -30. language-php (https://github.com/atom/language-php) -31. language-rust version 0.4.9 (https://github.com/zargony/atom-language-rust) -32. MagicStack/MagicPython (https://github.com/MagicStack/MagicPython) -33. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage) -34. Microsoft/vscode-mssql (https://github.com/Microsoft/vscode-mssql) -35. octicons-code version 3.1.0 (https://octicons.github.com) -36. octicons-font version 3.1.0 (https://octicons.github.com) -37. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui) -38. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage) -39. sublimehq/Packages (https://github.com/sublimehq/Packages) -40. SublimeText/PowerShell (https://github.com/SublimeText/PowerShell) -41. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle) -42. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle) -43. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle) -44. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle) -45. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle) -46. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle) -47. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle) -48. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle) -49. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle) -50. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle) -51. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle) -52. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle) -53. textmate/shellscript.tmbundle (https://github.com/textmate/shellscript.tmbundle) +8. atom/language-shellscript (https://github.com/atom/language-shellscript) +9. atom/language-xml (https://github.com/atom/language-xml) +10. Benvie/JavaScriptNext.tmLanguage (https://github.com/Microsoft/vscode-JSON.tmLanguage) +11. chjj-marked version 0.3.6 (https://github.com/npmcomponent/chjj-marked) +12. chriskempson/tomorrow-theme (https://github.com/chriskempson/tomorrow-theme) +13. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes) +14. daaain/Handlebars (https://github.com/daaain/Handlebars) +15. davidrios/jade-tmbundle (https://github.com/davidrios/jade-tmbundle) +16. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped) +17. demyte/language-cshtml (https://github.com/demyte/language-cshtml) +18. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage) +19. expand-abbreviation version 0.5.8 (https://github.com/emmetio/expand-abbreviation) +20. fadeevab/make.tmbundle (https://github.com/fadeevab/make.tmbundle) +21. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift) +22. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/) +23. Ikuyadeu/vscode-R (https://github.com/Ikuyadeu/vscode-R) +24. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site) +25. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar) +26. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify) +27. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert) +28. language-docker (https://github.com/moby/moby) +29. language-go version 0.39.0 (https://github.com/atom/language-go) +30. language-less (https://github.com/atom/language-less) +31. language-php (https://github.com/atom/language-php) +32. language-rust version 0.4.9 (https://github.com/zargony/atom-language-rust) +33. MagicStack/MagicPython (https://github.com/MagicStack/MagicPython) +34. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage) +35. Microsoft/vscode-mssql (https://github.com/Microsoft/vscode-mssql) +36. mmims/language-batchfile (https://github.com/mmims/language-batchfile) +37. octicons-code version 3.1.0 (https://octicons.github.com) +38. octicons-font version 3.1.0 (https://octicons.github.com) +39. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui) +40. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage) +41. SublimeText/PowerShell (https://github.com/SublimeText/PowerShell) +42. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle) +43. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle) +44. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle) +45. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle) +46. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle) +47. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle) +48. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle) +49. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle) +50. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle) +51. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle) +52. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle) +53. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle) 54. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle) 55. TypeScript-TmLanguage version 0.1.8 (https://github.com/Microsoft/TypeScript-TmLanguage) 56. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift) @@ -371,6 +371,43 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ========================================= END OF atom/language-sass NOTICES AND INFORMATION +%% atom/language-shellscript NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2014 GitHub Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +This package was derived from a TextMate bundle located at +https://github.com/textmate/shellscript.tmbundle and distributed under the +following license, located in `README.mdown`: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. +========================================= +END OF atom/language-shellscript NOTICES AND INFORMATION + %% atom/language-xml NOTICES AND INFORMATION BEGIN HERE ========================================= The MIT License (MIT) @@ -1303,6 +1340,32 @@ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ========================================= END OF Microsoft/vscode-mssql NOTICES AND INFORMATION +%% mmims/language-batchfile NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2017 Michael Mims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF mmims/language-batchfile NOTICES AND INFORMATION + %% octicons-code NOTICES AND INFORMATION BEGIN HERE ========================================= The MIT License (MIT) @@ -1471,24 +1534,6 @@ SOFTWARE. ========================================= END OF shaders-tmLanguage NOTICES AND INFORMATION -%% sublimehq/Packages NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) Sublime Packages project authors - -If not otherwise specified (see below), files in this folder fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF sublimehq/Packages NOTICES AND INFORMATION - %% SublimeText/PowerShell NOTICES AND INFORMATION BEGIN HERE ========================================= The MIT License (MIT) @@ -1728,24 +1773,6 @@ to the base-name name of the original file, and an extension of txt, html, or si ========================================= END OF textmate/ruby.tmbundle NOTICES AND INFORMATION -%% textmate/shellscript.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-shellscript.tmbundle project authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/shellscript.tmbundle NOTICES AND INFORMATION - %% textmate/yaml.tmbundle NOTICES AND INFORMATION BEGIN HERE ========================================= Copyright (c) 2015 FichteFoll @@ -1819,4 +1846,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ========================================= -END OF vscode-swift NOTICES AND INFORMATION \ No newline at end of file +END OF vscode-swift NOTICES AND INFORMATION diff --git a/appveyor.yml b/appveyor.yml index d9471f2a8f8..3ece36f7a3e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,6 +11,7 @@ install: build_script: - yarn - .\node_modules\.bin\gulp electron + - .\node_modules\.bin\tsc -p .\src\tsconfig.monaco.json --noEmit - npm run compile test_script: diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js index c67dd07beb7..f766cfaca0f 100644 --- a/build/gulpfile.hygiene.js +++ b/build/gulpfile.hygiene.js @@ -69,6 +69,7 @@ const indentationFilter = [ '!**/vs/base/common/marked/raw.marked.js', '!**/vs/base/common/winjs.base.raw.js', '!**/vs/base/node/terminateProcess.sh', + '!**/vs/base/node/ps-win.ps1', '!**/vs/nls.js', '!**/vs/css.js', '!**/vs/loader.js', diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index d2c53d94ce6..a74246fa4d6 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -45,8 +45,8 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.19.1' }, - { name: 'ms-vscode.node-debug2', version: '1.19.0' } + { name: 'ms-vscode.node-debug', version: '1.19.7' }, + { name: 'ms-vscode.node-debug2', version: '1.19.3' } ]; const excludedExtensions = [ @@ -69,7 +69,7 @@ const vscodeResources = [ 'out-build/paths.js', 'out-build/vs/**/*.{svg,png,cur,html}', 'out-build/vs/base/common/performance.js', - 'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh}', + 'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,ps-win.ps1}', 'out-build/vs/base/browser/ui/octiconLabel/octicons/**', 'out-build/vs/workbench/browser/media/*-theme.css', 'out-build/vs/workbench/electron-browser/bootstrap/**', @@ -138,7 +138,6 @@ const config = { role: 'Editor', ostypes: ["TEXT", "utxt", "TUTX", "****"], extensions: ["ascx", "asp", "aspx", "bash", "bash_login", "bash_logout", "bash_profile", "bashrc", "bat", "bowerrc", "c", "cc", "clj", "cljs", "cljx", "clojure", "cmd", "code-workspace", "coffee", "config", "cpp", "cs", "cshtml", "csproj", "css", "csx", "ctp", "cxx", "dockerfile", "dot", "dtd", "editorconfig", "edn", "eyaml", "eyml", "fs", "fsi", "fsscript", "fsx", "gemspec", "gitattributes", "gitconfig", "gitignore", "go", "h", "handlebars", "hbs", "hh", "hpp", "htm", "html", "hxx", "ini", "jade", "jav", "java", "js", "jscsrc", "jshintrc", "jshtm", "json", "jsp", "less", "lua", "m", "makefile", "markdown", "md", "mdoc", "mdown", "mdtext", "mdtxt", "mdwn", "mkd", "mkdn", "ml", "mli", "php", "phtml", "pl", "pl6", "pm", "pm6", "pod", "pp", "profile", "properties", "ps1", "psd1", "psgi", "psm1", "py", "r", "rb", "rhistory", "rprofile", "rs", "rt", "scss", "sh", "shtml", "sql", "svg", "svgz", "t", "ts", "txt", "vb", "wxi", "wxl", "wxs", "xaml", "xcodeproj", "xcworkspace", "xml", "yaml", "yml", "zlogin", "zlogout", "zprofile", "zsh", "zshenv", "zshrc"], - utis: ['public.source-code'], iconFile: 'resources/darwin/code_file.icns' }], darwinBundleURLTypes: [{ @@ -298,11 +297,11 @@ function packageTask(platform, arch, opts) { .pipe(util.cleanNodeModule('windows-mutex', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('native-keymap', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('native-watchdog', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) + .pipe(util.cleanNodeModule('spdlog', ['binding.gyp', 'build/**', 'deps/**', 'src/**', 'test/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('jschardet', ['dist/**'])) .pipe(util.cleanNodeModule('windows-foreground-love', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('windows-process-tree', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('gc-signals', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) - .pipe(util.cleanNodeModule('v8-profiler', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) .pipe(util.cleanNodeModule('keytar', ['binding.gyp', 'build/**', 'src/**', 'script/**', 'node_modules/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('node-pty', ['binding.gyp', 'build/**', 'src/**', 'tools/**'], ['build/Release/**'])) .pipe(util.cleanNodeModule('nsfw', ['binding.gyp', 'build/**', 'src/**', 'openpa/**', 'includes/**'], ['**/*.node', '**/*.a'])) diff --git a/build/lib/i18n.js b/build/lib/i18n.js index 09a94bc33f1..1be9709523f 100644 --- a/build/lib/i18n.js +++ b/build/lib/i18n.js @@ -141,7 +141,7 @@ var XLF = /** @class */ (function () { }; XLF.prototype.addStringItem = function (item) { if (!item.id || !item.message) { - throw new Error('No item ID or value specified.'); + throw new Error("No item ID or value specified: " + JSON.stringify(item)); } this.appendNewLine("", 4); this.appendNewLine("" + item.message + "", 6); diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index abfe57c8afc..db67ffc3812 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -192,7 +192,7 @@ export class XLF { private addStringItem(item: Item): void { if (!item.id || !item.message) { - throw new Error('No item ID or value specified.'); + throw new Error(`No item ID or value specified: ${JSON.stringify(item)}`); } this.appendNewLine(``, 4); diff --git a/build/lib/tslint/noUnexternalizedStringsRule.js b/build/lib/tslint/noUnexternalizedStringsRule.js index 3114c4d98aa..d5ad583f442 100644 --- a/build/lib/tslint/noUnexternalizedStringsRule.js +++ b/build/lib/tslint/noUnexternalizedStringsRule.js @@ -144,6 +144,16 @@ var NoUnexternalizedStringsRuleWalker = /** @class */ (function (_super) { }; NoUnexternalizedStringsRuleWalker.prototype.recordKey = function (keyNode, messageNode) { var text = keyNode.getText(); + // We have an empty key + if (text.match(/(['"]) *\1/)) { + if (messageNode) { + this.addFailureAtNode(keyNode, "Key is empty for message: " + messageNode.getText()); + } + else { + this.addFailureAtNode(keyNode, "Key is empty."); + } + return; + } var occurrences = this.usedKeys[text]; if (!occurrences) { occurrences = []; diff --git a/build/lib/tslint/noUnexternalizedStringsRule.ts b/build/lib/tslint/noUnexternalizedStringsRule.ts index 3327a5a4bc6..abcd5496670 100644 --- a/build/lib/tslint/noUnexternalizedStringsRule.ts +++ b/build/lib/tslint/noUnexternalizedStringsRule.ts @@ -169,6 +169,15 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker { private recordKey(keyNode: ts.StringLiteral, messageNode: ts.Node) { let text = keyNode.getText(); + // We have an empty key + if (text.match(/(['"]) *\1/)) { + if (messageNode) { + this.addFailureAtNode(keyNode, `Key is empty for message: ${messageNode.getText()}`); + } else { + this.addFailureAtNode(keyNode, `Key is empty.`); + } + return; + } let occurrences: KeyMessagePair[] = this.usedKeys[text]; if (!occurrences) { occurrences = []; diff --git a/build/tslint.json b/build/tslint.json index e269a87c0e6..a85e98b95dc 100644 --- a/build/tslint.json +++ b/build/tslint.json @@ -2,10 +2,10 @@ "rules": { "no-unused-expression": true, "no-duplicate-variable": true, - "no-unused-variable": true, "curly": true, "class-name": true, "semicolon": [ + true, "always" ], "triple-equals": true diff --git a/build/win32/i18n/messages.ja.isl b/build/win32/i18n/messages.ja.isl index ee2ccd82bdb..8a4b1240c96 100644 --- a/build/win32/i18n/messages.ja.isl +++ b/build/win32/i18n/messages.ja.isl @@ -2,7 +2,7 @@ AddContextMenuFiles=ƒGƒNƒXƒvƒ[ƒ‰[‚̃tƒ@ƒCƒ‹ ƒRƒ“ƒeƒLƒXƒg ƒƒjƒ…[‚É [%1 ‚ÅŠJ‚­] ƒAƒNƒVƒ‡ƒ“‚ð’ljÁ‚·‚é AddContextMenuFolders=ƒGƒNƒXƒvƒ[ƒ‰[‚̃fƒBƒŒƒNƒgƒŠ ƒRƒ“ƒeƒLƒXƒg ƒƒjƒ…[‚É [%1 ‚ÅŠJ‚­] ƒAƒNƒVƒ‡ƒ“‚ð’ljÁ‚·‚é AssociateWithFiles=ƒTƒ|[ƒg‚³‚ê‚Ä‚¢‚éƒtƒ@ƒCƒ‹‚ÌŽí—ނ̃GƒfƒBƒ^[‚Æ‚µ‚ÄA%1 ‚ð“o˜^‚·‚é -AddToPath=PATH ‚ւ̒ljÁ (Ä‹N“®Œã‚ÉŽg—p‰Â”\‚ɂȂé) +AddToPath=PATH ‚ւ̒ljÁiÄ‹N“®Œã‚ÉŽg—p‰Â”\j RunAfter=ƒCƒ“ƒXƒg[ƒ‹Œã‚É %1 ‚ðŽÀs‚·‚é Other=‚»‚Ì‘¼: SourceFile=%1 ƒ\[ƒX ƒtƒ@ƒCƒ‹ \ No newline at end of file diff --git a/extensions/OSSREADME.json b/extensions/OSSREADME.json new file mode 100644 index 00000000000..518d360d232 --- /dev/null +++ b/extensions/OSSREADME.json @@ -0,0 +1,7 @@ +[{ + "name": "typescript", + "version": "2.6.2", + "license": "Apache-2.0", + "repositoryURL": "https://github.com/Microsoft/TypeScript", + "isProd": true +}] diff --git a/extensions/bat/package.json b/extensions/bat/package.json index 8363d58ed04..d9f1cba592b 100644 --- a/extensions/bat/package.json +++ b/extensions/bat/package.json @@ -17,6 +17,10 @@ "language": "bat", "scopeName": "source.batchfile", "path": "./syntaxes/batchfile.tmLanguage.json" + }], + "snippets": [{ + "language": "bat", + "path": "./snippets/batchfile.snippets.json" }] } } \ No newline at end of file diff --git a/extensions/bat/snippets/batchfile.snippets.json b/extensions/bat/snippets/batchfile.snippets.json new file mode 100644 index 00000000000..3759e25eacd --- /dev/null +++ b/extensions/bat/snippets/batchfile.snippets.json @@ -0,0 +1,16 @@ +{ + "Region Start": { + "prefix": "#region", + "body": [ + "::#region" + ], + "description": "Folding Region Start" + }, + "Region End": { + "prefix": "#endregion", + "body": [ + "::#endregion" + ], + "description": "Folding Region End" + } +} diff --git a/extensions/coffeescript/language-configuration.json b/extensions/coffeescript/language-configuration.json index 8c7fbd458df..01fc34db790 100644 --- a/extensions/coffeescript/language-configuration.json +++ b/extensions/coffeescript/language-configuration.json @@ -23,6 +23,10 @@ ["'", "'"] ], "folding": { - "offSide": true + "offSide": true, + "markers": { + "start": "^\\s*#region\\b", + "end": "^\\s*#endregion\\b" + } } -} \ No newline at end of file +} diff --git a/extensions/coffeescript/package.json b/extensions/coffeescript/package.json index 5c8f11b7206..c688f7b0836 100644 --- a/extensions/coffeescript/package.json +++ b/extensions/coffeescript/package.json @@ -22,6 +22,10 @@ { "language": "coffeescript" } - ] + ], + "snippets": [{ + "language": "coffeescript", + "path": "./snippets/coffeescript.snippets.json" + }] } } \ No newline at end of file diff --git a/extensions/coffeescript/snippets/coffeescript.snippets.json b/extensions/coffeescript/snippets/coffeescript.snippets.json new file mode 100644 index 00000000000..49d6a927993 --- /dev/null +++ b/extensions/coffeescript/snippets/coffeescript.snippets.json @@ -0,0 +1,16 @@ +{ + "Region Start": { + "prefix": "#region", + "body": [ + "#region" + ], + "description": "Folding Region Start" + }, + "Region End": { + "prefix": "#endregion", + "body": [ + "#endregion" + ], + "description": "Folding Region End" + } +} diff --git a/extensions/configuration-editing/package.json b/extensions/configuration-editing/package.json index 67c6c899c16..9659fdcbc96 100644 --- a/extensions/configuration-editing/package.json +++ b/extensions/configuration-editing/package.json @@ -10,7 +10,7 @@ "Other" ], "activationEvents": [ - "onLanguage:json" + "onLanguage:json", "onLanguage:jsonc" ], "main": "./out/extension", "scripts": { diff --git a/extensions/configuration-editing/src/extension.ts b/extensions/configuration-editing/src/extension.ts index ea0655e5bf3..e215f0fb5a9 100644 --- a/extensions/configuration-editing/src/extension.ts +++ b/extensions/configuration-editing/src/extension.ts @@ -60,7 +60,7 @@ function registerKeybindingsCompletions(): vscode.Disposable { } function registerSettingsCompletions(): vscode.Disposable { - return vscode.languages.registerCompletionItemProvider({ language: 'json', pattern: '**/settings.json' }, { + return vscode.languages.registerCompletionItemProvider({ language: 'jsonc', pattern: '**/settings.json' }, { provideCompletionItems(document, position, token) { return new SettingsDocument(document).provideCompletionItems(position, token); } @@ -173,7 +173,7 @@ function updateLaunchJsonDecorations(editor: vscode.TextEditor | undefined): voi editor.setDecorations(decoration, ranges); } -vscode.languages.registerDocumentSymbolProvider({ pattern: '**/launch.json', language: 'json' }, { +vscode.languages.registerDocumentSymbolProvider({ pattern: '**/launch.json', language: 'jsonc' }, { provideDocumentSymbols(document: vscode.TextDocument, token: vscode.CancellationToken): vscode.ProviderResult { const result: vscode.SymbolInformation[] = []; let name: string = ''; diff --git a/extensions/configuration-editing/src/settingsDocumentHelper.ts b/extensions/configuration-editing/src/settingsDocumentHelper.ts index 32c6ac14854..5f9cc61c9a9 100644 --- a/extensions/configuration-editing/src/settingsDocumentHelper.ts +++ b/extensions/configuration-editing/src/settingsDocumentHelper.ts @@ -151,9 +151,18 @@ export class SettingsDocument { private provideLanguageCompletionItems(location: Location, range: vscode.Range, formatFunc: (string: string) => string = (l) => JSON.stringify(l)): vscode.ProviderResult { return vscode.languages.getLanguages().then(languages => { - return languages.map(l => { - return this.newSimpleCompletionItem(formatFunc(l), range); - }); + const completionItems = []; + const configuration = vscode.workspace.getConfiguration(); + for (const language of languages) { + const inspect = configuration.inspect(`[${language}]`); + if (!inspect || !inspect.defaultValue) { + const item = new vscode.CompletionItem(formatFunc(language)); + item.kind = vscode.CompletionItemKind.Property; + item.range = range; + completionItems.push(item); + } + } + return completionItems; }); } diff --git a/extensions/cpp/language-configuration.json b/extensions/cpp/language-configuration.json index a4f6c85aeab..23d99a485e1 100644 --- a/extensions/cpp/language-configuration.json +++ b/extensions/cpp/language-configuration.json @@ -22,10 +22,6 @@ ["\"", "\""], ["'", "'"] ], - "indentationRules": { - "increaseIndentPattern": "^.*\\{[^}\"\\']*$|^.*\\([^\\)\"\\']*$|^\\s*(public|private|protected):\\s*$|^\\s*@(public|private|protected)\\s*$|^\\s*\\{\\}$", - "decreaseIndentPattern": "^\\s*(\\s*/[*].*[*]/\\s*)*\\}|^\\s*(\\s*/[*].*[*]/\\s*)*\\)|^\\s*(public|private|protected):\\s*$|^\\s*@(public|private|protected)\\s*$" - }, "folding": { "markers": { "start": "^\\s*#pragma\\s+region\\b", diff --git a/extensions/css/client/src/cssMain.ts b/extensions/css/client/src/cssMain.ts index 1f8095776ad..19f131224ed 100644 --- a/extensions/css/client/src/cssMain.ts +++ b/extensions/css/client/src/cssMain.ts @@ -6,8 +6,8 @@ import * as path from 'path'; -import { languages, window, commands, ExtensionContext, TextDocument, ColorInformation, ColorPresentation, Color } from 'vscode'; -import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, TextEdit } from 'vscode-languageclient'; +import { languages, window, commands, ExtensionContext, TextDocument, ColorInformation, ColorPresentation, Color, Range, Position, CompletionItem, CompletionItemKind, TextEdit, SnippetString } from 'vscode'; +import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind } from 'vscode-languageclient'; import { ConfigurationFeature } from 'vscode-languageclient/lib/configuration.proposed'; import { DocumentColorRequest, DocumentColorParams, ColorPresentationRequest, ColorPresentationParams } from 'vscode-languageserver-protocol/lib/protocol.colorProvider.proposed'; @@ -104,6 +104,31 @@ export function activate(context: ExtensionContext) { indentationRules: indentationRules }); + const regionCompletionRegExpr = /^(\s*)(\/(\*\s*(#\w*)?)?)?/; + languages.registerCompletionItemProvider(documentSelector, { + provideCompletionItems(doc, pos) { + let lineUntilPos = doc.getText(new Range(new Position(pos.line, 0), pos)); + let match = lineUntilPos.match(regionCompletionRegExpr); + if (match) { + let range = new Range(new Position(pos.line, match[1].length), pos); + let beginProposal = new CompletionItem('#region', CompletionItemKind.Snippet); + beginProposal.range = range; TextEdit.replace(range, '/* #region */'); + beginProposal.insertText = new SnippetString('/* #region $1*/'); + beginProposal.documentation = localize('folding.start', 'Folding Region Start'); + beginProposal.filterText = match[2]; + beginProposal.sortText = 'za'; + let endProposal = new CompletionItem('#endregion', CompletionItemKind.Snippet); + endProposal.range = range; + endProposal.insertText = '/* #endregion */'; + endProposal.documentation = localize('folding.end', 'Folding Region End'); + endProposal.sortText = 'zb'; + endProposal.filterText = match[2]; + return [beginProposal, endProposal]; + } + return null; + } + }); + commands.registerCommand('_css.applyCodeAction', applyCodeAction); function applyCodeAction(uri: string, documentVersion: number, edits: TextEdit[]) { diff --git a/extensions/css/server/package.json b/extensions/css/server/package.json index 7915f24a7f6..5dd73152edc 100644 --- a/extensions/css/server/package.json +++ b/extensions/css/server/package.json @@ -8,7 +8,7 @@ "node": "*" }, "dependencies": { - "vscode-css-languageservice": "^3.0.1", + "vscode-css-languageservice": "^3.0.2", "vscode-languageserver": "^3.5.0" }, "devDependencies": { @@ -17,9 +17,9 @@ "scripts": { "compile": "gulp compile-extension:css-server", "watch": "gulp watch-extension:css-server", - "install-service-next": "npm install vscode-css-languageservice@next -f -S", - "install-service-local": "npm install ../../../../vscode-css-languageservice -f -S", - "install-server-next": "npm install vscode-languageserver@next -f -S", - "install-server-local": "npm install ../../../../vscode-languageserver-node/server -f -S" + "install-service-next": "yarn add vscode-css-languageservice@next", + "install-service-local": "npm install ../../../../vscode-css-languageservice -f", + "install-server-next": "yarn add vscode-languageserver@next", + "install-server-local": "npm install ../../../../vscode-languageserver-node/server -f" } } diff --git a/extensions/css/server/yarn.lock b/extensions/css/server/yarn.lock index 5826839458b..24a54f0acdf 100644 --- a/extensions/css/server/yarn.lock +++ b/extensions/css/server/yarn.lock @@ -6,9 +6,9 @@ version "7.0.43" resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c" -vscode-css-languageservice@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-3.0.1.tgz#2fb8f33d959d289289154142e8c22ad501a0139b" +vscode-css-languageservice@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-3.0.2.tgz#ae0c43836318455aa290c777556394d6127b8f6c" dependencies: vscode-languageserver-types "3.5.0" vscode-nls "^2.0.1" diff --git a/extensions/emmet/package.json b/extensions/emmet/package.json index 8dd6947b175..84196a8b658 100644 --- a/extensions/emmet/package.json +++ b/extensions/emmet/package.json @@ -159,6 +159,25 @@ "class" ], "description": "%emmetPreferencesFilterCommentTrigger%" + }, + "format.noIndentTags": { + "type": "array", + "default": [ + "html" + ], + "description": "%emmetPreferencesFormatNoIndentTags%" + }, + "format.forceIndentationForTags": { + "type": "array", + "default": [ + "body" + ], + "description": "%emmetPreferencesFormatForceIndentTags%" + }, + "profile.allowCompactBoolean": { + "type": "boolean", + "default": false, + "description": "%emmetPreferencesAllowCompactBoolean%" } } }, @@ -298,7 +317,7 @@ "@emmetio/html-matcher": "^0.3.1", "@emmetio/css-parser": "ramya-rao-a/css-parser#vscode", "@emmetio/math-expression": "^0.1.1", - "vscode-emmet-helper": "^1.1.17", + "vscode-emmet-helper": "^1.1.19", "vscode-languageserver-types": "^3.0.3", "image-size": "^0.5.2", "vscode-nls": "2.0.2" diff --git a/extensions/emmet/package.nls.json b/extensions/emmet/package.nls.json index 07ffacf4b44..52df8adca11 100644 --- a/extensions/emmet/package.nls.json +++ b/extensions/emmet/package.nls.json @@ -44,5 +44,8 @@ "emmetPreferencesBemModifierSeparator": "Modifier separator used for classes when using the BEM filter", "emmetPreferencesFilterCommentBefore": "A definition of comment that should be placed before matched element when comment filter is applied.", "emmetPreferencesFilterCommentAfter": "A definition of comment that should be placed after matched element when comment filter is applied.", - "emmetPreferencesFilterCommentTrigger": "A comma-separated list of attribute names that should exist in abbreviation for the comment filter to be applied" + "emmetPreferencesFilterCommentTrigger": "A comma-separated list of attribute names that should exist in abbreviation for the comment filter to be applied", + "emmetPreferencesFormatNoIndentTags": "An array of tag names that should not get inner indentation", + "emmetPreferencesFormatForceIndentTags": "An array of tag names that should always get inner indentation", + "emmetPreferencesAllowCompactBoolean": "If true, compact notation of boolean attributes are produced" } diff --git a/extensions/emmet/src/abbreviationActions.ts b/extensions/emmet/src/abbreviationActions.ts index caefcf49290..480699eafe1 100644 --- a/extensions/emmet/src/abbreviationActions.ts +++ b/extensions/emmet/src/abbreviationActions.ts @@ -105,6 +105,11 @@ export function expandEmmetAbbreviation(args: any): Thenable -1) { + return fallbackTab(); + } } const syntax = getSyntaxFromArgs(args); if (!syntax) { @@ -176,7 +181,7 @@ export function expandEmmetAbbreviation(args: any): Thenable { /** * Checks if given position is a valid location to expand emmet abbreviation. * Works only on html and css/less/scss syntax + * @param document current Text Document * @param currentNode parsed node at given position * @param syntax syntax of the abbreviation * @param position position to validate + * @param abbreviationRange The range of the abbreviation for which given position is being validated */ -export function isValidLocationForEmmetAbbreviation(currentNode: Node | null, syntax: string, position: vscode.Position): boolean { - // Continue validation only if the file was parse-able and the currentNode has been found - if (!currentNode) { - return true; - } - +export function isValidLocationForEmmetAbbreviation(document: vscode.TextDocument, currentNode: Node | null, syntax: string, position: vscode.Position, abbreviationRange: vscode.Range): boolean { if (isStyleSheet(syntax)) { + // Continue validation only if the file was parse-able and the currentNode has been found + if (!currentNode) { + return true; + } + // If current node is a rule or at-rule, then perform additional checks to ensure // emmet suggestions are not provided in the rule selector if (currentNode.type !== 'rule' && currentNode.type !== 'at-rule') { @@ -242,13 +249,72 @@ export function isValidLocationForEmmetAbbreviation(currentNode: Node | null, sy return false; } + const startAngle = '<'; + const endAngle = '>'; + const escape = '\\'; const currentHtmlNode = currentNode; - if (currentHtmlNode.close) { + let start = new vscode.Position(0, 0); + + if (currentHtmlNode) { const innerRange = getInnerRange(currentHtmlNode); - return !!innerRange && innerRange.contains(position); + + // Fix for https://github.com/Microsoft/vscode/issues/28829 + if (!innerRange || !innerRange.contains(position)) { + return false; + } + + // Fix for https://github.com/Microsoft/vscode/issues/35128 + // Find the position up till where we will backtrack looking for unescaped < or > + // to decide if current position is valid for emmet expansion + start = innerRange.start; + let lastChildBeforePosition = currentHtmlNode.firstChild; + while (lastChildBeforePosition) { + if (lastChildBeforePosition.end.isAfter(position)) { + break; + } + start = lastChildBeforePosition.end; + lastChildBeforePosition = lastChildBeforePosition.nextSibling; + } + } + let textToBackTrack = document.getText(new vscode.Range(start.line, start.character, abbreviationRange.start.line, abbreviationRange.start.character)); + + // Worse case scenario is when cursor is inside a big chunk of text which needs to backtracked + // Backtrack only 500 offsets to ensure we dont waste time doing this + if (textToBackTrack.length > 500) { + textToBackTrack = textToBackTrack.substr(textToBackTrack.length - 500); } - return false; + if (!textToBackTrack.trim()) { + return true; + } + + let valid = true; + let foundSpace = false; // If < is found before finding whitespace, then its valid abbreviation. Eg: = 0) { + const char = textToBackTrack[i]; + i--; + if (!foundSpace && /\s/.test(char)) { + foundSpace = true; + continue; + } + if (char !== startAngle && char !== endAngle) { + continue; + } + if (i >= 0 && textToBackTrack[i] === escape) { + i--; + continue; + } + if (char === endAngle) { + break; + } + if (char === startAngle) { + valid = !foundSpace; + break; + } + } + + return valid; } /** @@ -343,9 +409,13 @@ function expandAbbr(input: ExpandAbbreviationInput): string | undefined { function getSyntaxFromArgs(args: Object): string | undefined { const mappedModes = getMappingForIncludedLanguages(); - let language: string = args['language']; - let parentMode: string = args['parentMode']; - let excludedLanguages = vscode.workspace.getConfiguration('emmet')['excludeLanguages'] ? vscode.workspace.getConfiguration('emmet')['excludeLanguages'] : []; + const language: string = args['language']; + const parentMode: string = args['parentMode']; + const excludedLanguages = vscode.workspace.getConfiguration('emmet')['excludeLanguages'] ? vscode.workspace.getConfiguration('emmet')['excludeLanguages'] : []; + if (excludedLanguages.indexOf(language) > -1) { + return; + } + let syntax = getEmmetMode((mappedModes[language] ? mappedModes[language] : language), excludedLanguages); if (!syntax) { syntax = getEmmetMode((mappedModes[parentMode] ? mappedModes[parentMode] : parentMode), excludedLanguages); diff --git a/extensions/emmet/src/defaultCompletionProvider.ts b/extensions/emmet/src/defaultCompletionProvider.ts index dc54fe1cbd8..7d331f575b7 100644 --- a/extensions/emmet/src/defaultCompletionProvider.ts +++ b/extensions/emmet/src/defaultCompletionProvider.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { HtmlNode } from 'EmmetNode'; +import { HtmlNode, Node } from 'EmmetNode'; import { isValidLocationForEmmetAbbreviation } from './abbreviationActions'; import { getEmmetHelper, getNode, getInnerRange, getMappingForIncludedLanguages, parseDocument, getEmmetConfiguration, getEmmetMode, isStyleSheet } from './util'; @@ -13,17 +13,37 @@ const allowedMimeTypesInScriptTag = ['text/html', 'text/plain', 'text/x-template export class DefaultCompletionItemProvider implements vscode.CompletionItemProvider { public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable | undefined { - const mappedLanguages = getMappingForIncludedLanguages(); const emmetConfig = vscode.workspace.getConfiguration('emmet'); + const excludedLanguages = emmetConfig['excludeLanguages'] ? emmetConfig['excludeLanguages'] : []; + if (excludedLanguages.indexOf(document.languageId) > -1) { + return; + } - let isSyntaxMapped = mappedLanguages[document.languageId] ? true : false; - let excludedLanguages = emmetConfig['excludeLanguages'] ? emmetConfig['excludeLanguages'] : []; + const mappedLanguages = getMappingForIncludedLanguages(); + const isSyntaxMapped = mappedLanguages[document.languageId] ? true : false; let syntax = getEmmetMode((isSyntaxMapped ? mappedLanguages[document.languageId] : document.languageId), excludedLanguages); + const helper = getEmmetHelper(); + const extractAbbreviationResults = helper.extractAbbreviation(document, position); + if (!extractAbbreviationResults) { + return; + } + + // If document can be html/css parsed, validate syntax and location if (document.languageId === 'html' || isStyleSheet(document.languageId)) { - // Document can be html/css parsed - // Use syntaxHelper to parse file, validate location and update sytnax if needed - syntax = this.syntaxHelper(syntax, document, position); + const rootNode = parseDocument(document, false); + if (!rootNode) { + return; + } + + // Use syntaxHelper to update sytnax if needed + const currentNode = getNode(rootNode, position, true); + syntax = this.syntaxHelper(syntax, currentNode, position); + + // Validate location + if (!syntax || !isValidLocationForEmmetAbbreviation(document, currentNode, syntax, position, extractAbbreviationResults.abbreviationRange)) { + return; + } } if (!syntax @@ -32,23 +52,19 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi return; } - const helper = getEmmetHelper(); let noiseCheckPromise: Thenable = Promise.resolve(); // Fix for https://github.com/Microsoft/vscode/issues/32647 // Check for document symbols in js/ts/jsx/tsx and avoid triggering emmet for abbreviations of the form symbolName.sometext // Presence of > or * or + in the abbreviation denotes valid abbreviation that should trigger emmet if (!isStyleSheet(syntax) && (document.languageId === 'javascript' || document.languageId === 'javascriptreact' || document.languageId === 'typescript' || document.languageId === 'typescriptreact')) { - let extractAbbreviationResults = helper.extractAbbreviation(document, position); - if (extractAbbreviationResults) { - let abbreviation: string = extractAbbreviationResults.abbreviation; - if (abbreviation.startsWith('this.')) { - noiseCheckPromise = Promise.resolve(true); - } else { - noiseCheckPromise = vscode.commands.executeCommand('vscode.executeDocumentSymbolProvider', document.uri).then((symbols: vscode.SymbolInformation[] | undefined) => { - return symbols && symbols.find(x => abbreviation === x.name || (abbreviation.startsWith(x.name + '.') && !/>|\*|\+/.test(abbreviation))); - }); - } + let abbreviation: string = extractAbbreviationResults.abbreviation; + if (abbreviation.startsWith('this.')) { + noiseCheckPromise = Promise.resolve(true); + } else { + noiseCheckPromise = vscode.commands.executeCommand('vscode.executeDocumentSymbolProvider', document.uri).then((symbols: vscode.SymbolInformation[] | undefined) => { + return symbols && symbols.find(x => abbreviation === x.name || (abbreviation.startsWith(x.name + '.') && !/>|\*|\+/.test(abbreviation))); + }); } } @@ -85,21 +101,11 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi /** * Parses given document to check whether given position is valid for emmet abbreviation and returns appropriate syntax * @param syntax string language mode of current document - * @param document vscode.Textdocument + * @param currentNode node in the document that contains the position * @param position vscode.Position position of the abbreviation that needs to be expanded */ - private syntaxHelper(syntax: string | undefined, document: vscode.TextDocument, position: vscode.Position): string | undefined { - if (!syntax) { - return syntax; - } - let rootNode = parseDocument(document, false); - if (!rootNode) { - return; - } - - let currentNode = getNode(rootNode, position, true); - - if (!isStyleSheet(syntax)) { + private syntaxHelper(syntax: string | undefined, currentNode: Node | null, position: vscode.Position): string | undefined { + if (syntax && !isStyleSheet(syntax)) { const currentHtmlNode = currentNode; if (currentHtmlNode && currentHtmlNode.close) { const innerRange = getInnerRange(currentHtmlNode); @@ -118,9 +124,6 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi } } - if (!currentNode || !isValidLocationForEmmetAbbreviation(currentNode, syntax, position)) { - return; - } return syntax; } diff --git a/extensions/emmet/src/test/abbreviationAction.test.ts b/extensions/emmet/src/test/abbreviationAction.test.ts index 6a73b3db30d..101da90685c 100644 --- a/extensions/emmet/src/test/abbreviationAction.test.ts +++ b/extensions/emmet/src/test/abbreviationAction.test.ts @@ -5,10 +5,12 @@ import 'mocha'; import * as assert from 'assert'; -import { Selection, workspace } from 'vscode'; +import { Selection, workspace, CompletionList, CancellationTokenSource, Position } from 'vscode'; import { withRandomFileEditor, closeAllEditors } from './testUtils'; import { expandEmmetAbbreviation, wrapWithAbbreviation, wrapIndividualLinesWithAbbreviation } from '../abbreviationActions'; +import { DefaultCompletionItemProvider } from '../defaultCompletionProvider'; +const completionProvider = new DefaultCompletionItemProvider(); const cssContents = ` .boo { margin: 20px 10px; @@ -40,7 +42,7 @@ const scssContents = ` p40 } } -` +`; const htmlContents = ` @@ -51,7 +53,7 @@ const htmlContents = ` ul>li*2 ul>li.item$*2 ul>li.item$@44*2 -
- - `; - const expectedContents = ` - - - - `; - return withRandomFileEditor(htmlWithCssContents, 'html', (editor, doc) => { - editor.selections = [ - new Selection(6, 50, 6, 50), - new Selection(9, 50, 9, 50), - new Selection(13, 50, 13, 50) - ]; + // test('update image size in css in html file with multiple cursors', () => { + // const htmlWithCssContents = ` + // + // + // + // `; + // const expectedContents = ` + // + // + // + // `; + // return withRandomFileEditor(htmlWithCssContents, 'html', (editor, doc) => { + // editor.selections = [ + // new Selection(6, 50, 6, 50), + // new Selection(9, 50, 9, 50), + // new Selection(13, 50, 13, 50) + // ]; - return updateImageSize()!.then(() => { - assert.equal(doc.getText(), expectedContents); - return Promise.resolve(); - }); - }); - }); + // return updateImageSize()!.then(() => { + // assert.equal(doc.getText(), expectedContents); + // return Promise.resolve(); + // }); + // }); + // }); - test('update image size in img tag in html file with multiple cursors', () => { - const htmlwithimgtag = ` - - - - - - `; - const expectedContents = ` - - - - - - `; - return withRandomFileEditor(htmlwithimgtag, 'html', (editor, doc) => { - editor.selections = [ - new Selection(2, 50, 2, 50), - new Selection(3, 50, 3, 50), - new Selection(4, 50, 4, 50) - ]; + // test('update image size in img tag in html file with multiple cursors', () => { + // const htmlwithimgtag = ` + // + // + // + // + // + // `; + // const expectedContents = ` + // + // + // + // + // + // `; + // return withRandomFileEditor(htmlwithimgtag, 'html', (editor, doc) => { + // editor.selections = [ + // new Selection(2, 50, 2, 50), + // new Selection(3, 50, 3, 50), + // new Selection(4, 50, 4, 50) + // ]; - return updateImageSize()!.then(() => { - assert.equal(doc.getText(), expectedContents); - return Promise.resolve(); - }); - }); - }); + // return updateImageSize()!.then(() => { + // assert.equal(doc.getText(), expectedContents); + // return Promise.resolve(); + // }); + // }); + // }); -}); +// }); diff --git a/extensions/emmet/yarn.lock b/extensions/emmet/yarn.lock index d09eea35b1c..8d8874a062d 100644 --- a/extensions/emmet/yarn.lock +++ b/extensions/emmet/yarn.lock @@ -2048,9 +2048,9 @@ vinyl@~2.0.1: remove-trailing-separator "^1.0.1" replace-ext "^1.0.0" -vscode-emmet-helper@^1.1.17: - version "1.1.17" - resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.1.17.tgz#40eb2955257d27472a6e8d542d70cfa3d247077e" +vscode-emmet-helper@^1.1.19: + version "1.1.19" + resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.1.19.tgz#e5b607076171555c6be3655a8eb11c17f980b2dd" dependencies: "@emmetio/extract-abbreviation" "^0.1.1" vscode-languageserver-types "^3.0.3" diff --git a/extensions/git/package.json b/extensions/git/package.json index 9e6bdb1f56d..65d4faf08a1 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -234,6 +234,11 @@ "title": "%command.createTag%", "category": "Git" }, + { + "command": "git.fetch", + "title": "%command.fetch%", + "category": "Git" + }, { "command": "git.pull", "title": "%command.pull%", @@ -320,33 +325,37 @@ "command": "git.init", "when": "config.git.enabled" }, + { + "command": "git.close", + "when": "gitOpenRepositoryCount != 0" + }, { "command": "git.refresh", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.openFile", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.openHEADFile", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.openChange", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.stage", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.stageAll", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.stageSelectedRanges", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.stageChange", @@ -354,7 +363,7 @@ }, { "command": "git.revertSelectedRanges", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.revertChange", @@ -362,396 +371,404 @@ }, { "command": "git.unstage", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.unstageAll", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.unstageSelectedRanges", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.clean", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.cleanAll", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.commit", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.commitStaged", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.commitStagedSigned", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.commitStagedAmend", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.commitAll", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.commitAllSigned", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.commitAllAmend", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.undoCommit", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.checkout", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.branch", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.deleteBranch", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.renameBranch", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.pull", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.pullFrom", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.pullRebase", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.pullFrom", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.merge", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.createTag", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" + }, + { + "command": "git.fetch", + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.push", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.pushTo", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.pushWithTags", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.sync", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.syncRebase", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.publish", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.showOutput", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.ignore", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" + }, + { + "command": "git.stashIncludeUntracked", + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.stash", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.stashPop", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" }, { "command": "git.stashPopLatest", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "gitOpenRepositoryCount != 0" } ], "scm/title": [ { "command": "git.init", "group": "navigation", - "when": "config.git.enabled && !scmProvider && gitOpenRepositoryCount == 0" + "when": "config.git.enabled && !scmProvider && gitOpenRepositoryCount == 0 && workspaceFolderCount != 0" }, { "command": "git.commit", "group": "navigation", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.refresh", "group": "navigation", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.sync", "group": "1_sync", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.syncRebase", "group": "1_sync", - "when": "config.git.enabled && scmProvider == git && gitState == idle" + "when": "scmProvider == git && gitState == idle" }, { "command": "git.pull", "group": "1_sync", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.pullRebase", "group": "1_sync", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.pullFrom", "group": "1_sync", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.push", "group": "1_sync", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.pushTo", "group": "1_sync", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.publish", "group": "2_publish", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.commitStaged", "group": "3_commit", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.commitStagedSigned", "group": "3_commit", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.commitStagedAmend", "group": "3_commit", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.commitAll", "group": "3_commit", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.commitAllSigned", "group": "3_commit", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.commitAllAmend", "group": "3_commit", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.undoCommit", "group": "3_commit", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.stageAll", "group": "4_stage", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.unstageAll", "group": "4_stage", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.cleanAll", "group": "4_stage", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.stashIncludeUntracked", "group": "5_stash", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.stash", "group": "5_stash", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.stashPop", "group": "5_stash", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.stashPopLatest", "group": "5_stash", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" }, { "command": "git.showOutput", "group": "7_repository", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" } ], "scm/sourceControl": [ { "command": "git.close", "group": "navigation", - "when": "config.git.enabled && scmProvider == git" + "when": "scmProvider == git" } ], "scm/resourceGroup/context": [ { "command": "git.stageAll", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == merge", + "when": "scmProvider == git && scmResourceGroup == merge", "group": "1_modification" }, { "command": "git.stageAll", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == merge", + "when": "scmProvider == git && scmResourceGroup == merge", "group": "inline" }, { "command": "git.unstageAll", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == index", + "when": "scmProvider == git && scmResourceGroup == index", "group": "1_modification" }, { "command": "git.unstageAll", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == index", + "when": "scmProvider == git && scmResourceGroup == index", "group": "inline" }, { "command": "git.cleanAll", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "1_modification" }, { "command": "git.stageAll", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "1_modification" }, { "command": "git.cleanAll", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "inline" }, { "command": "git.stageAll", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "inline" } ], "scm/resourceState/context": [ { "command": "git.stage", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == merge", + "when": "scmProvider == git && scmResourceGroup == merge", "group": "1_modification" }, { "command": "git.stage", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == merge", + "when": "scmProvider == git && scmResourceGroup == merge", "group": "inline" }, { "command": "git.openChange", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == index", + "when": "scmProvider == git && scmResourceGroup == index", "group": "navigation" }, { "command": "git.openFile", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == index", + "when": "scmProvider == git && scmResourceGroup == index", "group": "navigation" }, { "command": "git.openHEADFile", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == index", + "when": "scmProvider == git && scmResourceGroup == index", "group": "navigation" }, { "command": "git.unstage", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == index", + "when": "scmProvider == git && scmResourceGroup == index", "group": "1_modification" }, { "command": "git.unstage", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == index", + "when": "scmProvider == git && scmResourceGroup == index", "group": "inline" }, { "command": "git.openChange", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "navigation" }, { "command": "git.openHEADFile", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "navigation" }, { "command": "git.openFile", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "navigation" }, { "command": "git.stage", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "1_modification" }, { "command": "git.clean", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "1_modification" }, { "command": "git.clean", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "inline" }, { "command": "git.stage", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "inline" }, { "command": "git.ignore", - "when": "config.git.enabled && scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "1_modification@3" } ], @@ -759,37 +776,37 @@ { "command": "git.openFile", "group": "navigation", - "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != extension && resourceScheme != merge-conflict.conflict-diff" + "when": "gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != extension && resourceScheme != merge-conflict.conflict-diff" }, { "command": "git.openChange", "group": "navigation", - "when": "config.git.enabled && gitOpenRepositoryCount != 0 && !isInDiffEditor && resourceScheme == file" + "when": "gitOpenRepositoryCount != 0 && !isInDiffEditor && resourceScheme == file" }, { "command": "git.stageSelectedRanges", "group": "2_git@1", - "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" + "when": "gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" }, { "command": "git.unstageSelectedRanges", "group": "2_git@2", - "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" + "when": "gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" }, { "command": "git.revertSelectedRanges", "group": "2_git@3", - "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" + "when": "gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" } ], "scm/change/title": [ { "command": "git.stageChange", - "when": "config.git.enabled && originalResourceScheme == git" + "when": "originalResourceScheme == git" }, { "command": "git.revertChange", - "when": "config.git.enabled && originalResourceScheme == git" + "when": "originalResourceScheme == git" } ] }, @@ -798,6 +815,7 @@ "properties": { "git.enabled": { "type": "boolean", + "scope": "resource", "description": "%config.enabled%", "default": true }, @@ -810,6 +828,11 @@ "default": null, "isExecutable": true }, + "git.autoRepositoryDetection": { + "type": "boolean", + "description": "%config.autoRepositoryDetection%", + "default": true + }, "git.autorefresh": { "type": "boolean", "description": "%config.autorefresh%", @@ -818,7 +841,7 @@ "git.autofetch": { "type": "boolean", "description": "%config.autofetch%", - "default": true + "default": false }, "git.confirmSync": { "type": "boolean", diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 4f6d0fe91f5..542740ef483 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -31,6 +31,7 @@ "command.renameBranch": "Rename Branch...", "command.merge": "Merge Branch...", "command.createTag": "Create Tag", + "command.fetch": "Fetch", "command.pull": "Pull", "command.pullRebase": "Pull (Rebase)", "command.pullFrom": "Pull from...", @@ -48,6 +49,7 @@ "command.stashPopLatest": "Pop Latest Stash", "config.enabled": "Whether git is enabled", "config.path": "Path to the git executable", + "config.autoRepositoryDetection": "Whether repositories should be automatically detected", "config.autorefresh": "Whether auto refreshing is enabled", "config.autofetch": "Whether auto fetching is enabled", "config.enableLongCommitWarning": "Whether long commit messages should be warned about", diff --git a/extensions/git/resources/icons/dark/clean.svg b/extensions/git/resources/icons/dark/clean.svg index 9f175633389..3770d63d5f9 100644 --- a/extensions/git/resources/icons/dark/clean.svg +++ b/extensions/git/resources/icons/dark/clean.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/extensions/git/resources/icons/light/clean.svg b/extensions/git/resources/icons/light/clean.svg index 1fa6ba48a19..f86ec7d627d 100644 --- a/extensions/git/resources/icons/light/clean.svg +++ b/extensions/git/resources/icons/light/clean.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/extensions/git/src/api.ts b/extensions/git/src/api.ts new file mode 100644 index 00000000000..4e569a8e884 --- /dev/null +++ b/extensions/git/src/api.ts @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { Model } from './model'; +import { SourceControlInputBox, Uri } from 'vscode'; + +export interface InputBox { + value: string; +} + +export interface Repository { + readonly rootUri: Uri; + readonly inputBox: InputBox; +} + +export interface API { + getRepositories(): Promise; +} + +export function createApi(modelPromise: Promise) { + return { + async getRepositories(): Promise { + const model = await modelPromise; + + return model.repositories.map(repository => ({ + rootUri: Uri.file(repository.root), + inputBox: { + set value(value: string) { + repository.inputBox.value = value; + }, + get value(): string { + return repository.inputBox.value; + } + } + })); + } + }; +} \ No newline at end of file diff --git a/extensions/git/src/autofetch.ts b/extensions/git/src/autofetch.ts index 741188de75d..cb8e054e90a 100644 --- a/extensions/git/src/autofetch.ts +++ b/extensions/git/src/autofetch.ts @@ -5,14 +5,22 @@ 'use strict'; -import { workspace, Disposable, EventEmitter } from 'vscode'; +import { workspace, Disposable, EventEmitter, Memento, window, MessageItem, ConfigurationTarget } from 'vscode'; import { GitErrorCodes } from './git'; -import { Repository } from './repository'; -import { eventToPromise, filterEvent } from './util'; +import { Repository, Operation } from './repository'; +import { eventToPromise, filterEvent, onceEvent } from './util'; +import * as nls from 'vscode-nls'; + +const localize = nls.loadMessageBundle(); + +function isRemoteOperation(operation: Operation): boolean { + return operation === Operation.Pull || operation === Operation.Push || operation === Operation.Sync || operation === Operation.Fetch; +} export class AutoFetcher { private static readonly Period = 3 * 60 * 1000 /* three minutes */; + private static DidInformUser = 'autofetch.didInformUser'; private _onDidChange = new EventEmitter(); private onDidChange = this._onDidChange.event; @@ -23,9 +31,43 @@ export class AutoFetcher { private disposables: Disposable[] = []; - constructor(private repository: Repository) { + constructor(private repository: Repository, private globalState: Memento) { workspace.onDidChangeConfiguration(this.onConfiguration, this, this.disposables); this.onConfiguration(); + + const onGoodRemoteOperation = filterEvent(repository.onDidRunOperation, ({ operation, error }) => !error && isRemoteOperation(operation)); + const onFirstGoodRemoteOperation = onceEvent(onGoodRemoteOperation); + onFirstGoodRemoteOperation(this.onFirstGoodRemoteOperation, this, this.disposables); + } + + private async onFirstGoodRemoteOperation(): Promise { + const didInformUser = !this.globalState.get(AutoFetcher.DidInformUser); + + if (this.enabled && !didInformUser) { + this.globalState.update(AutoFetcher.DidInformUser, true); + } + + const shouldInformUser = !this.enabled && didInformUser; + + if (!shouldInformUser) { + return; + } + + const yes: MessageItem = { title: localize('yes', "Yes") }; + const no: MessageItem = { isCloseAffordance: true, title: localize('no', "No") }; + const askLater: MessageItem = { title: localize('not now', "Not Now") }; + const result = await window.showInformationMessage(localize('suggest auto fetch', "Would you like to enable auto fetching of Git repositories?"), yes, no, askLater); + + if (result === askLater) { + return; + } + + if (result === yes) { + const gitConfig = workspace.getConfiguration('git'); + gitConfig.update('autofetch', true, ConfigurationTarget.Global); + } + + this.globalState.update(AutoFetcher.DidInformUser, true); } private onConfiguration(): void { diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 57a1701510e..cdc048a1234 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -207,30 +207,31 @@ export class CommandCenter { } try { - if (ref === '~') { + let gitRef = ref; + + if (gitRef === '~') { const uriString = uri.toString(); const [indexStatus] = repository.indexGroup.resourceStates.filter(r => r.resourceUri.toString() === uriString); - ref = indexStatus ? '' : 'HEAD'; - } - - const { size, object } = await repository.lstree(ref, uri.fsPath); - - if (size > 1000000) { // 1 MB - return Uri.parse(`data:;label:${path.basename(uri.fsPath)};description:${ref},`); + gitRef = indexStatus ? '' : 'HEAD'; } + const { size, object } = await repository.lstree(gitRef, uri.fsPath); const { mimetype, encoding } = await repository.detectObjectType(object); if (mimetype === 'text/plain') { return toGitUri(uri, ref); } - if (ImageMimetypes.indexOf(mimetype) > -1) { - const contents = await repository.buffer(ref, uri.fsPath); - return Uri.parse(`data:${mimetype};label:${path.basename(uri.fsPath)};description:${ref};size:${size};base64,${contents.toString('base64')}`); + if (size > 1000000) { // 1 MB + return Uri.parse(`data:;label:${path.basename(uri.fsPath)};description:${gitRef},`); } - return Uri.parse(`data:;label:${path.basename(uri.fsPath)};description:${ref},`); + if (ImageMimetypes.indexOf(mimetype) > -1) { + const contents = await repository.buffer(gitRef, uri.fsPath); + return Uri.parse(`data:${mimetype};label:${path.basename(uri.fsPath)};description:${gitRef};size:${size};base64,${contents.toString('base64')}`); + } + + return Uri.parse(`data:;label:${path.basename(uri.fsPath)};description:${gitRef},`); } catch (err) { return toGitUri(uri, ref); @@ -407,35 +408,52 @@ export class CommandCenter { @command('git.init') async init(): Promise { - const homeUri = Uri.file(os.homedir()); - const defaultUri = workspace.workspaceFolders && workspace.workspaceFolders.length > 0 - ? Uri.file(workspace.workspaceFolders[0].uri.fsPath) - : homeUri; + let path: string | undefined; - const result = await window.showOpenDialog({ - canSelectFiles: false, - canSelectFolders: true, - canSelectMany: false, - defaultUri, - openLabel: localize('init repo', "Initialize Repository") - }); + if (workspace.workspaceFolders && workspace.workspaceFolders.length > 1) { + const placeHolder = localize('init', "Pick workspace folder to initialize git repo in"); + const items = workspace.workspaceFolders.map(folder => ({ label: folder.name, description: folder.uri.fsPath, folder })); + const item = await window.showQuickPick(items, { placeHolder, ignoreFocusOut: true }); - if (!result || result.length === 0) { - return; - } - - const uri = result[0]; - - if (homeUri.toString().startsWith(uri.toString())) { - const yes = localize('create repo', "Initialize Repository"); - const answer = await window.showWarningMessage(localize('are you sure', "This will create a Git repository in '{0}'. Are you sure you want to continue?", uri.fsPath), yes); - - if (answer !== yes) { + if (!item) { return; } + + path = item.folder.uri.fsPath; + } + + if (!path) { + const homeUri = Uri.file(os.homedir()); + const defaultUri = workspace.workspaceFolders && workspace.workspaceFolders.length > 0 + ? Uri.file(workspace.workspaceFolders[0].uri.fsPath) + : homeUri; + + const result = await window.showOpenDialog({ + canSelectFiles: false, + canSelectFolders: true, + canSelectMany: false, + defaultUri, + openLabel: localize('init repo', "Initialize Repository") + }); + + if (!result || result.length === 0) { + return; + } + + const uri = result[0]; + + if (homeUri.toString().startsWith(uri.toString())) { + const yes = localize('create repo', "Initialize Repository"); + const answer = await window.showWarningMessage(localize('are you sure', "This will create a Git repository in '{0}'. Are you sure you want to continue?", uri.fsPath), yes); + + if (answer !== yes) { + return; + } + } + + path = uri.fsPath; } - const path = uri.fsPath; await this.git.init(path); await this.model.tryOpenRepository(path); } @@ -945,6 +963,8 @@ export class CommandCenter { if (!opts) { opts = { all: noStagedChanges }; + } else if (!opts.all && noStagedChanges) { + opts = { ...opts, all: true }; } // enable signing of commits if configurated @@ -978,8 +998,21 @@ export class CommandCenter { return message; } + let value: string | undefined = undefined; + + if (opts && opts.amend && repository.HEAD && repository.HEAD.commit) { + value = (await repository.getCommit(repository.HEAD.commit)).message; + } + + const getPreviousCommitMessage = async () => { + //Only return the previous commit message if it's an amend commit and the repo already has a commit + if (opts && opts.amend && repository.HEAD && repository.HEAD.commit) { + return (await repository.getCommit('HEAD')).message; + } + }; + return await window.showInputBox({ - value: opts && opts.defaultMsg, + value, placeHolder: localize('commit message', "Commit message"), prompt: localize('provide commit message', "Please provide a commit message"), ignoreFocusOut: true @@ -1023,15 +1056,7 @@ export class CommandCenter { @command('git.commitStagedAmend', { repository: true }) async commitStagedAmend(repository: Repository): Promise { - let msg; - if (repository.HEAD) { - if (repository.HEAD.commit) { - let id = repository.HEAD.commit; - let commit = await repository.getCommit(id); - msg = commit.message; - } - } - await this.commitWithAnyInput(repository, { all: false, amend: true, defaultMsg: msg }); + await this.commitWithAnyInput(repository, { all: false, amend: true }); } @command('git.commitAll', { repository: true }) @@ -1230,6 +1255,16 @@ export class CommandCenter { await repository.tag(name, message); } + @command('git.fetch', { repository: true }) + async fetch(repository: Repository): Promise { + if (repository.remotes.length === 0) { + window.showWarningMessage(localize('no remotes to fetch', "This repository has no remotes configured to fetch from.")); + return; + } + + await repository.fetch(); + } + @command('git.pullFrom', { repository: true }) async pullFrom(repository: Repository): Promise { const remotes = repository.remotes; @@ -1437,7 +1472,10 @@ export class CommandCenter { } private async _stash(repository: Repository, includeUntracked = false): Promise { - if (repository.workingTreeGroup.resourceStates.length === 0) { + const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0; + const noStagedChanges = repository.indexGroup.resourceStates.length === 0; + + if (noUnstagedChanges && noStagedChanges) { window.showInformationMessage(localize('no changes stash', "There are no changes to stash.")); return; } @@ -1543,7 +1581,7 @@ export class CommandCenter { message = localize('clean repo', "Please clean your repository working tree before checkout."); break; case GitErrorCodes.PushRejected: - message = localize('cant push', "Can't push refs to remote. Run 'Pull' first to integrate your changes."); + message = localize('cant push', "Can't push refs to remote. Try running 'Pull' first to integrate your changes."); break; default: const hint = (err.stderr || err.message || String(err)) diff --git a/extensions/git/src/contentProvider.ts b/extensions/git/src/contentProvider.ts index d7bd26dffc2..9ab283dcd1e 100644 --- a/extensions/git/src/contentProvider.ts +++ b/extensions/git/src/contentProvider.ts @@ -9,7 +9,7 @@ import { workspace, Uri, Disposable, Event, EventEmitter, window } from 'vscode' import { debounce, throttle } from './decorators'; import { fromGitUri, toGitUri } from './uri'; import { Model, ModelChangeEvent, OriginalResourceChangeEvent } from './model'; -import { filterEvent, eventToPromise } from './util'; +import { filterEvent, eventToPromise, isDescendant } from './util'; interface CacheRow { uri: Uri; @@ -72,7 +72,7 @@ export class GitContentProvider { const fsPath = uri.fsPath; for (const root of this.changedRepositoryRoots) { - if (fsPath.startsWith(root)) { + if (isDescendant(root, fsPath)) { this._onDidChange.fire(uri); return; } diff --git a/extensions/git/src/decorationProvider.ts b/extensions/git/src/decorationProvider.ts index dcd1077819e..fc068efd8c4 100644 --- a/extensions/git/src/decorationProvider.ts +++ b/extensions/git/src/decorationProvider.ts @@ -6,7 +6,7 @@ 'use strict'; import { window, workspace, Uri, Disposable, Event, EventEmitter, DecorationData, DecorationProvider, ThemeColor } from 'vscode'; -import { Repository, GitResourceGroup } from './repository'; +import { Repository, GitResourceGroup, Status } from './repository'; import { Model } from './model'; import { debounce } from './decorators'; import { filterEvent } from './util'; @@ -74,34 +74,28 @@ class GitDecorationProvider implements DecorationProvider { constructor(private repository: Repository) { this.disposables.push( window.registerDecorationProvider(this), - repository.onDidRunOperation(this.onDidRunOperation, this) + repository.onDidRunGitStatus(this.onDidRunGitStatus, this) ); } - private onDidRunOperation(): void { + private onDidRunGitStatus(): void { let newDecorations = new Map(); this.collectDecorationData(this.repository.indexGroup, newDecorations); this.collectDecorationData(this.repository.workingTreeGroup, newDecorations); this.collectDecorationData(this.repository.mergeGroup, newDecorations); - let uris: Uri[] = []; - newDecorations.forEach((value, uriString) => { - if (this.decorations.has(uriString)) { - this.decorations.delete(uriString); - } else { - uris.push(Uri.parse(uriString)); - } - }); - this.decorations.forEach((value, uriString) => { - uris.push(Uri.parse(uriString)); - }); + const uris = new Set([...this.decorations.keys()].concat([...newDecorations.keys()])); this.decorations = newDecorations; - this._onDidChangeDecorations.fire(uris); + this._onDidChangeDecorations.fire([...uris.values()].map(Uri.parse)); } private collectDecorationData(group: GitResourceGroup, bucket: Map): void { group.resourceStates.forEach(r => { - if (r.resourceDecoration) { + if (r.resourceDecoration + && r.type !== Status.DELETED + && r.type !== Status.INDEX_DELETED + ) { + // not deleted and has a decoration bucket.set(r.original.toString(), r.resourceDecoration); } }); diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index c85ab5551c9..17e6cd29942 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -977,7 +977,7 @@ export class Repository { try { const args = ['stash', 'pop']; - if (typeof index === 'string') { + if (typeof index === 'number') { args.push(`stash@{${index}}`); } @@ -1017,12 +1017,12 @@ export class Repository { const onStdoutData = (raw: string) => { parser.update(raw); - if (parser.status.length > 5000) { + if (parser.status.length > limit) { child.removeListener('exit', onExit); child.stdout.removeListener('data', onStdoutData); child.kill(); - c({ status: parser.status.slice(0, 5000), didHitLimit: true }); + c({ status: parser.status.slice(0, limit), didHitLimit: true }); } }; diff --git a/extensions/git/src/main.ts b/extensions/git/src/main.ts index b9bc3aedcd3..d3e07cd4da0 100644 --- a/extensions/git/src/main.ts +++ b/extensions/git/src/main.ts @@ -16,20 +16,19 @@ import { GitDecorations } from './decorationProvider'; import { Askpass } from './askpass'; import { toDisposable } from './util'; import TelemetryReporter from 'vscode-extension-telemetry'; +import { API, createApi } from './api'; -async function init(context: ExtensionContext, outputChannel: OutputChannel, disposables: Disposable[]): Promise { +async function init(context: ExtensionContext, outputChannel: OutputChannel, disposables: Disposable[]): Promise { const { name, version, aiKey } = require(context.asAbsolutePath('./package.json')) as { name: string, version: string, aiKey: string }; const telemetryReporter: TelemetryReporter = new TelemetryReporter(name, version, aiKey); disposables.push(telemetryReporter); - const config = workspace.getConfiguration('git'); - const enabled = config.get('enabled') === true; const pathHint = workspace.getConfiguration('git').get('path'); const info = await findGit(pathHint, path => outputChannel.appendLine(localize('looking', "Looking for git in: {0}", path))); const askpass = new Askpass(); const env = await askpass.getEnv(); const git = new Git({ gitPath: info.path, version: info.version, env }); - const model = new Model(git); + const model = new Model(git, context.globalState); disposables.push(model); const onRepository = () => commands.executeCommand('setContext', 'gitOpenRepositoryCount', `${model.repositories.length}`); @@ -37,12 +36,6 @@ async function init(context: ExtensionContext, outputChannel: OutputChannel, dis model.onDidCloseRepository(onRepository, null, disposables); onRepository(); - if (!enabled) { - const commandCenter = new CommandCenter(git, model, outputChannel, telemetryReporter); - disposables.push(commandCenter); - return; - } - outputChannel.appendLine(localize('using git', "Using git {0} from {1}", info.version, info.path)); const onOutput = (str: string) => outputChannel.append(str); @@ -56,24 +49,22 @@ async function init(context: ExtensionContext, outputChannel: OutputChannel, dis ); await checkGitVersion(info); + + return model; } -async function _activate(context: ExtensionContext, disposables: Disposable[]): Promise { +async function _activate(context: ExtensionContext, disposables: Disposable[]): Promise { const outputChannel = window.createOutputChannel('Git'); commands.registerCommand('git.showOutput', () => outputChannel.show()); disposables.push(outputChannel); try { - await init(context, outputChannel, disposables); + return await init(context, outputChannel, disposables); } catch (err) { if (!/Git installation not found/.test(err.message || '')) { throw err; } - console.warn(err.message); - outputChannel.appendLine(err.message); - outputChannel.show(); - const config = workspace.getConfiguration('git'); const shouldIgnore = config.get('ignoreMissingGitWarning') === true; @@ -81,6 +72,10 @@ async function _activate(context: ExtensionContext, disposables: Disposable[]): return; } + console.warn(err.message); + outputChannel.appendLine(err.message); + outputChannel.show(); + const download = localize('downloadgit', "Download Git"); const neverShowAgain = localize('neverShowAgain', "Don't show again"); const choice = await window.showWarningMessage( @@ -97,12 +92,15 @@ async function _activate(context: ExtensionContext, disposables: Disposable[]): } } -export function activate(context: ExtensionContext): any { +export function activate(context: ExtensionContext): API { const disposables: Disposable[] = []; context.subscriptions.push(new Disposable(() => Disposable.from(...disposables).dispose())); - _activate(context, disposables) - .catch(err => console.error(err)); + const activatePromise = _activate(context, disposables); + const modelPromise = activatePromise.then(model => model || Promise.reject('Git model not found')); + activatePromise.catch(err => console.error(err)); + + return createApi(modelPromise); } async function checkGitVersion(info: IGit): Promise { diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index be87561ae9a..e22242329e7 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -5,10 +5,10 @@ 'use strict'; -import { workspace, WorkspaceFoldersChangeEvent, Uri, window, Event, EventEmitter, QuickPickItem, Disposable, SourceControl, SourceControlResourceGroup, TextEditor } from 'vscode'; +import { workspace, WorkspaceFoldersChangeEvent, Uri, window, Event, EventEmitter, QuickPickItem, Disposable, SourceControl, SourceControlResourceGroup, TextEditor, Memento, ConfigurationChangeEvent } from 'vscode'; import { Repository, RepositoryState } from './repository'; import { memoize, sequentialize, debounce } from './decorators'; -import { dispose, anyEvent, filterEvent } from './util'; +import { dispose, anyEvent, filterEvent, IDisposable, isDescendant } from './util'; import { Git, GitErrorCodes } from './git'; import * as path from 'path'; import * as fs from 'fs'; @@ -44,10 +44,6 @@ interface OpenRepository extends Disposable { repository: Repository; } -function isParent(parent: string, child: string): boolean { - return child.startsWith(parent); -} - export class Model { private _onDidOpenRepository = new EventEmitter(); @@ -67,45 +63,17 @@ export class Model { private possibleGitRepositoryPaths = new Set(); - private enabled = false; - private configurationChangeDisposable: Disposable; private disposables: Disposable[] = []; - constructor(private git: Git) { - const config = workspace.getConfiguration('git'); - this.enabled = config.get('enabled') === true; - - this.configurationChangeDisposable = workspace.onDidChangeConfiguration(this.onDidChangeConfiguration, this); - - if (this.enabled) { - this.enable(); - } - } - - private onDidChangeConfiguration(): void { - const config = workspace.getConfiguration('git'); - const enabled = config.get('enabled') === true; - - if (enabled === this.enabled) { - return; - } - - this.enabled = enabled; - - if (enabled) { - this.enable(); - } else { - this.disable(); - } - } - - private enable(): void { + constructor(private git: Git, private globalState: Memento) { workspace.onDidChangeWorkspaceFolders(this.onDidChangeWorkspaceFolders, this, this.disposables); this.onDidChangeWorkspaceFolders({ added: workspace.workspaceFolders || [], removed: [] }); window.onDidChangeVisibleTextEditors(this.onDidChangeVisibleTextEditors, this, this.disposables); this.onDidChangeVisibleTextEditors(window.visibleTextEditors); + workspace.onDidChangeConfiguration(this.onDidChangeConfiguration, this, this.disposables); + const fsWatcher = workspace.createFileSystemWatcher('**'); this.disposables.push(fsWatcher); @@ -117,15 +85,6 @@ export class Model { this.scanWorkspaceFolders(); } - private disable(): void { - const openRepositories = [...this.openRepositories]; - openRepositories.forEach(r => r.dispose()); - this.openRepositories = []; - - this.possibleGitRepositoryPaths.clear(); - this.disposables = dispose(this.disposables); - } - /** * Scans the first level of each workspace folder, looking * for git repositories. @@ -169,13 +128,34 @@ export class Model { .map(folder => this.getOpenRepository(folder.uri)) .filter(r => !!r) .filter(r => !activeRepositories.has(r!.repository)) - .filter(r => !(workspace.workspaceFolders || []).some(f => isParent(f.uri.fsPath, r!.repository.root))) as OpenRepository[]; + .filter(r => !(workspace.workspaceFolders || []).some(f => isDescendant(f.uri.fsPath, r!.repository.root))) as OpenRepository[]; + + possibleRepositoryFolders.forEach(p => this.tryOpenRepository(p.uri.fsPath)); + openRepositoriesToDispose.forEach(r => r.dispose()); + } + + private onDidChangeConfiguration(): void { + const possibleRepositoryFolders = (workspace.workspaceFolders || []) + .filter(folder => workspace.getConfiguration('git', folder.uri).get('enabled') === true) + .filter(folder => !this.getOpenRepository(folder.uri)); + + const openRepositoriesToDispose = this.openRepositories + .map(repository => ({ repository, root: Uri.file(repository.repository.root) })) + .filter(({ root }) => workspace.getConfiguration('git', root).get('enabled') !== true) + .map(({ repository }) => repository); possibleRepositoryFolders.forEach(p => this.tryOpenRepository(p.uri.fsPath)); openRepositoriesToDispose.forEach(r => r.dispose()); } private onDidChangeVisibleTextEditors(editors: TextEditor[]): void { + const config = workspace.getConfiguration('git'); + const enabled = config.get('autoRepositoryDetection') === true; + + if (!enabled) { + return; + } + editors.forEach(editor => { const uri = editor.document.uri; @@ -199,6 +179,13 @@ export class Model { return; } + const config = workspace.getConfiguration('git', Uri.file(path)); + const enabled = config.get('enabled') === true; + + if (!enabled) { + return; + } + try { const repositoryRoot = await this.git.getRepositoryRoot(path); @@ -209,7 +196,7 @@ export class Model { return; } - const repository = new Repository(this.git.open(repositoryRoot)); + const repository = new Repository(this.git.open(repositoryRoot), this.globalState); this.open(repository); } catch (err) { @@ -297,7 +284,7 @@ export class Model { for (const liveRepository of this.openRepositories) { const relativePath = path.relative(liveRepository.repository.root, resourcePath); - if (!/^\.\./.test(relativePath)) { + if (isDescendant(liveRepository.repository.root, resourcePath)) { return liveRepository; } } @@ -321,7 +308,11 @@ export class Model { } dispose(): void { - this.disable(); - this.configurationChangeDisposable.dispose(); + const openRepositories = [...this.openRepositories]; + openRepositories.forEach(r => r.dispose()); + this.openRepositories = []; + + this.possibleGitRepositoryPaths.clear(); + this.disposables = dispose(this.disposables); } } \ No newline at end of file diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 93e8386e440..098ee2bd954 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -5,9 +5,9 @@ 'use strict'; -import { Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, DecorationData } from 'vscode'; +import { Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, DecorationData, Memento } from 'vscode'; import { Repository as BaseRepository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash, RefType, GitError } from './git'; -import { anyEvent, filterEvent, eventToPromise, dispose, find } from './util'; +import { anyEvent, filterEvent, eventToPromise, dispose, find, isDescendant } from './util'; import { memoize, throttle, debounce } from './decorators'; import { toGitUri } from './uri'; import { AutoFetcher } from './autofetch'; @@ -171,10 +171,8 @@ export class Resource implements SourceControlResourceState { } get decorations(): SourceControlResourceDecorations { - // TODO@joh, still requires restart/redraw in the SCM viewlet - const decorations = workspace.getConfiguration().get('git.decorations.enabled'); - const light = !decorations ? { iconPath: this.getIconPath('light') } : undefined; - const dark = !decorations ? { iconPath: this.getIconPath('dark') } : undefined; + const light = this._useIcons ? { iconPath: this.getIconPath('light') } : undefined; + const dark = this._useIcons ? { iconPath: this.getIconPath('dark') } : undefined; const tooltip = this.tooltip; const strikeThrough = this.strikeThrough; const faded = this.faded; @@ -275,6 +273,7 @@ export class Resource implements SourceControlResourceState { private _resourceGroupType: ResourceGroupType, private _resourceUri: Uri, private _type: Status, + private _useIcons: boolean, private _renameResourceUri?: Uri ) { } } @@ -374,13 +373,17 @@ export interface CommitOptions { amend?: boolean; signoff?: boolean; signCommit?: boolean; - defaultMsg?: string; } export interface GitResourceGroup extends SourceControlResourceGroup { resourceStates: Resource[]; } +export interface OperationResult { + operation: Operation; + error: any; +} + export class Repository implements Disposable { private _onDidChangeRepository = new EventEmitter(); @@ -390,7 +393,7 @@ export class Repository implements Disposable { readonly onDidChangeState: Event = this._onDidChangeState.event; private _onDidChangeStatus = new EventEmitter(); - readonly onDidChangeStatus: Event = this._onDidChangeStatus.event; + readonly onDidRunGitStatus: Event = this._onDidChangeStatus.event; private _onDidChangeOriginalResource = new EventEmitter(); readonly onDidChangeOriginalResource: Event = this._onDidChangeOriginalResource.event; @@ -398,8 +401,8 @@ export class Repository implements Disposable { private _onRunOperation = new EventEmitter(); readonly onRunOperation: Event = this._onRunOperation.event; - private _onDidRunOperation = new EventEmitter(); - readonly onDidRunOperation: Event = this._onDidRunOperation.event; + private _onDidRunOperation = new EventEmitter(); + readonly onDidRunOperation: Event = this._onDidRunOperation.event; @memoize get onDidChangeOperations(): Event { @@ -462,13 +465,14 @@ export class Repository implements Disposable { private disposables: Disposable[] = []; constructor( - private readonly repository: BaseRepository + private readonly repository: BaseRepository, + globalState: Memento ) { const fsWatcher = workspace.createFileSystemWatcher('**'); this.disposables.push(fsWatcher); const onWorkspaceChange = anyEvent(fsWatcher.onDidChange, fsWatcher.onDidCreate, fsWatcher.onDidDelete); - const onRepositoryChange = filterEvent(onWorkspaceChange, uri => !/^\.\./.test(path.relative(repository.root, uri.fsPath))); + const onRepositoryChange = filterEvent(onWorkspaceChange, uri => isDescendant(repository.root, uri.fsPath)); const onRelevantRepositoryChange = filterEvent(onRepositoryChange, uri => !/\/\.git\/index\.lock$/.test(uri.path)); onRelevantRepositoryChange(this.onFSChange, this, this.disposables); @@ -492,7 +496,7 @@ export class Repository implements Disposable { this.disposables.push(this.indexGroup); this.disposables.push(this.workingTreeGroup); - this.disposables.push(new AutoFetcher(this)); + this.disposables.push(new AutoFetcher(this, globalState)); const statusBar = new StatusBarCommands(this); this.disposables.push(statusBar); @@ -755,7 +759,8 @@ export class Repository implements Disposable { return this.run(Operation.CheckIgnore, () => { return new Promise>((resolve, reject) => { - filePaths = filePaths.filter(filePath => !path.relative(this.root, filePath).startsWith('..')); + filePaths = filePaths + .filter(filePath => isDescendant(this.root, filePath)); if (filePaths.length === 0) { // nothing left @@ -802,6 +807,8 @@ export class Repository implements Disposable { } const run = async () => { + let error: any = null; + this._operations.start(operation); this._onRunOperation.fire(operation); @@ -814,6 +821,8 @@ export class Repository implements Disposable { return result; } catch (err) { + error = err; + if (err.gitErrorCode === GitErrorCodes.NotAGitRepository) { this.state = RepositoryState.Disposed; } @@ -821,7 +830,7 @@ export class Repository implements Disposable { throw err; } finally { this._operations.end(operation); - this._onDidRunOperation.fire(operation); + this._onDidRunOperation.fire({ operation, error }); } }; @@ -853,6 +862,7 @@ export class Repository implements Disposable { const { status, didHitLimit } = await this.repository.getStatus(); const config = workspace.getConfiguration('git'); const shouldIgnore = config.get('ignoreLimitWarning') === true; + const useIcons = config.get('decorations.enabled', true); this.isRepositoryHuge = didHitLimit; @@ -900,30 +910,30 @@ export class Repository implements Disposable { const renameUri = raw.rename ? Uri.file(path.join(this.repository.root, raw.rename)) : undefined; switch (raw.x + raw.y) { - case '??': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.UNTRACKED)); - case '!!': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.IGNORED)); - case 'DD': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_DELETED)); - case 'AU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.ADDED_BY_US)); - case 'UD': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.DELETED_BY_THEM)); - case 'UA': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.ADDED_BY_THEM)); - case 'DU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.DELETED_BY_US)); - case 'AA': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_ADDED)); - case 'UU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_MODIFIED)); + case '??': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.UNTRACKED, useIcons)); + case '!!': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.IGNORED, useIcons)); + case 'DD': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_DELETED, useIcons)); + case 'AU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.ADDED_BY_US, useIcons)); + case 'UD': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.DELETED_BY_THEM, useIcons)); + case 'UA': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.ADDED_BY_THEM, useIcons)); + case 'DU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.DELETED_BY_US, useIcons)); + case 'AA': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_ADDED, useIcons)); + case 'UU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_MODIFIED, useIcons)); } let isModifiedInIndex = false; switch (raw.x) { - case 'M': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_MODIFIED)); isModifiedInIndex = true; break; - case 'A': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_ADDED)); break; - case 'D': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_DELETED)); break; - case 'R': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_RENAMED, renameUri)); break; - case 'C': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_COPIED, renameUri)); break; + case 'M': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_MODIFIED, useIcons)); isModifiedInIndex = true; break; + case 'A': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_ADDED, useIcons)); break; + case 'D': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_DELETED, useIcons)); break; + case 'R': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_RENAMED, useIcons, renameUri)); break; + case 'C': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_COPIED, useIcons, renameUri)); break; } switch (raw.y) { - case 'M': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.MODIFIED, renameUri)); break; - case 'D': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.DELETED, renameUri)); break; + case 'M': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.MODIFIED, useIcons, renameUri)); break; + case 'D': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.DELETED, useIcons, renameUri)); break; } }); diff --git a/extensions/git/src/staging.ts b/extensions/git/src/staging.ts index 8cfe16e6793..863d9f6591b 100644 --- a/extensions/git/src/staging.ts +++ b/extensions/git/src/staging.ts @@ -73,9 +73,15 @@ export function toLineRanges(selections: Selection[], textDocument: TextDocument } function getModifiedRange(textDocument: TextDocument, diff: LineChange): Range { - return diff.modifiedEndLineNumber === 0 - ? new Range(textDocument.lineAt(diff.modifiedStartLineNumber - 1).range.end, textDocument.lineAt(diff.modifiedStartLineNumber).range.start) - : new Range(textDocument.lineAt(diff.modifiedStartLineNumber - 1).range.start, textDocument.lineAt(diff.modifiedEndLineNumber - 1).range.end); + if (diff.modifiedEndLineNumber === 0) { + if (diff.modifiedStartLineNumber === 0) { + return new Range(textDocument.lineAt(diff.modifiedStartLineNumber).range.end, textDocument.lineAt(diff.modifiedStartLineNumber).range.start); + } else { + return new Range(textDocument.lineAt(diff.modifiedStartLineNumber - 1).range.end, textDocument.lineAt(diff.modifiedStartLineNumber).range.start); + } + } else { + return new Range(textDocument.lineAt(diff.modifiedStartLineNumber - 1).range.start, textDocument.lineAt(diff.modifiedEndLineNumber - 1).range.end); + } } export function intersectDiffWithRange(textDocument: TextDocument, diff: LineChange, range: Range): LineChange | null { diff --git a/extensions/git/src/statusbar.ts b/extensions/git/src/statusbar.ts index 4233abec580..8d093e29b21 100644 --- a/extensions/git/src/statusbar.ts +++ b/extensions/git/src/statusbar.ts @@ -20,7 +20,7 @@ class CheckoutStatusBar { private disposables: Disposable[] = []; constructor(private repository: Repository) { - repository.onDidChangeStatus(this._onDidChange.fire, this._onDidChange, this.disposables); + repository.onDidRunGitStatus(this._onDidChange.fire, this._onDidChange, this.disposables); } get command(): Command | undefined { @@ -65,7 +65,7 @@ class SyncStatusBar { } constructor(private repository: Repository) { - repository.onDidChangeStatus(this.onModelChange, this, this.disposables); + repository.onDidRunGitStatus(this.onModelChange, this, this.disposables); repository.onDidChangeOperations(this.onOperationsChange, this, this.disposables); this._onDidChange.fire(); } diff --git a/extensions/git/src/util.ts b/extensions/git/src/util.ts index ef13e9de13c..6831fea9428 100644 --- a/extensions/git/src/util.ts +++ b/extensions/git/src/util.ts @@ -6,7 +6,7 @@ 'use strict'; import { Event } from 'vscode'; -import { dirname } from 'path'; +import { dirname, sep } from 'path'; import { Readable } from 'stream'; import * as fs from 'fs'; import * as byline from 'byline'; @@ -273,4 +273,16 @@ export function detectUnicodeEncoding(buffer: Buffer): Encoding | null { } return null; -} \ No newline at end of file +} + +export function isDescendant(parent: string, descendant: string): boolean { + if (parent === descendant) { + return true; + } + + if (parent.charAt(parent.length - 1) !== sep) { + parent += sep; + } + + return descendant.startsWith(parent); +} diff --git a/extensions/go/language-configuration.json b/extensions/go/language-configuration.json index 51519e3479c..f8b2b18e5b0 100644 --- a/extensions/go/language-configuration.json +++ b/extensions/go/language-configuration.json @@ -26,6 +26,6 @@ ], "indentationRules": { "increaseIndentPattern": "^.*(\\bcase\\b.*:|\\bdefault\\b:|(\\b(func|if|else|switch|select|for|struct)\\b.*)?{[^}]*|\\([^)]*)$", - "decreaseIndentPattern": "^\\s*(\\bcase\\b.*:|\\bdefault\\b:|}[),]?|\\)[,]?)$" + "decreaseIndentPattern": "^\\s*(\\bcase\\b.*:|\\bdefault\\b:|}[)}]*[),]?|\\)[,]?)$" } } \ No newline at end of file diff --git a/extensions/html/client/src/htmlMain.ts b/extensions/html/client/src/htmlMain.ts index f8e3ffd5921..a30fe9ea712 100644 --- a/extensions/html/client/src/htmlMain.ts +++ b/extensions/html/client/src/htmlMain.ts @@ -6,7 +6,7 @@ import * as path from 'path'; -import { languages, ExtensionContext, IndentAction, Position, TextDocument, Color, ColorInformation, ColorPresentation } from 'vscode'; +import { languages, ExtensionContext, IndentAction, Position, TextDocument, Color, ColorInformation, ColorPresentation, Range, CompletionItem, CompletionItemKind, SnippetString } from 'vscode'; import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, RequestType, TextDocumentPositionParams } from 'vscode-languageclient'; import { EMPTY_ELEMENTS } from './htmlEmptyTagsShared'; import { activateTagClosing } from './tagClosing'; @@ -163,6 +163,31 @@ export function activate(context: ExtensionContext) { } ], }); + + const regionCompletionRegExpr = /^(\s*)(<(!(-(-\s*(#\w*)?)?)?)?)?/; + languages.registerCompletionItemProvider(documentSelector, { + provideCompletionItems(doc, pos) { + let lineUntilPos = doc.getText(new Range(new Position(pos.line, 0), pos)); + let match = lineUntilPos.match(regionCompletionRegExpr); + if (match) { + let range = new Range(new Position(pos.line, match[1].length), pos); + let beginProposal = new CompletionItem('#region', CompletionItemKind.Snippet); + beginProposal.range = range; + beginProposal.insertText = new SnippetString(''); + beginProposal.documentation = localize('folding.start', 'Folding Region Start'); + beginProposal.filterText = match[2]; + beginProposal.sortText = 'za'; + let endProposal = new CompletionItem('#endregion', CompletionItemKind.Snippet); + endProposal.range = range; + endProposal.insertText = new SnippetString(''); + endProposal.documentation = localize('folding.end', 'Folding Region End'); + endProposal.filterText = match[2]; + endProposal.sortText = 'zb'; + return [beginProposal, endProposal]; + } + return null; + } + }); } function getPackageInfo(context: ExtensionContext): IPackageInfo | null { diff --git a/extensions/html/language-configuration.json b/extensions/html/language-configuration.json index 51bae7c4088..372ec249687 100644 --- a/extensions/html/language-configuration.json +++ b/extensions/html/language-configuration.json @@ -22,5 +22,11 @@ { "open": "[", "close": "]"}, { "open": "(", "close": ")" }, { "open": "<", "close": ">" } - ] + ], + "folding": { + "markers": { + "start": "^\\s*", + "end": "^^\\s*" + } + } } \ No newline at end of file diff --git a/extensions/html/package.json b/extensions/html/package.json index 32b3b6df823..13e5d82ca51 100644 --- a/extensions/html/package.json +++ b/extensions/html/package.json @@ -67,6 +67,16 @@ } } ], + "folding": { + "markers": { + "start": "^\\s*/", + "end": "^\\s*/" + } + }, + "snippets": [{ + "language": "html", + "path": "./snippets/html.snippets.json" + }], "configuration": { "id": "html", "order": 20, diff --git a/extensions/html/server/package.json b/extensions/html/server/package.json index 441cf4bb411..9056f257be6 100644 --- a/extensions/html/server/package.json +++ b/extensions/html/server/package.json @@ -8,23 +8,23 @@ "node": "*" }, "dependencies": { - "vscode-css-languageservice": "^3.0.1", - "vscode-html-languageservice": "^2.0.11", + "vscode-css-languageservice": "^3.0.2", + "vscode-html-languageservice": "^2.0.13", "vscode-languageserver": "^3.5.0", "vscode-nls": "^2.0.2", "vscode-uri": "^1.0.1" }, "devDependencies": { - "@types/node": "7.0.43", - "@types/mocha": "2.2.33" + "@types/mocha": "2.2.33", + "@types/node": "7.0.43" }, "scripts": { "compile": "gulp compile-extension:html-server", "watch": "gulp watch-extension:html-server", - "install-service-next": "npm install vscode-css-languageservice@next -f -S && npm install vscode-html-languageservice@next -f -S", - "install-service-local": "npm install ../../../../vscode-css-languageservice -f -S && npm install ../../../../vscode-html-languageservice -f -S", - "install-server-next": "npm install vscode-languageserver@next -f -S", - "install-server-local": "npm install ../../../../vscode-languageserver-node/server -f -S", + "install-service-next": "yarn add vscode-css-languageservice@next && yarn add vscode-html-languageservice@next", + "install-service-local": "npm install ../../../../vscode-css-languageservice -f && npm install ../../../../vscode-html-languageservice -f", + "install-server-next": "yarn add vscode-languageserver@next", + "install-server-local": "npm install ../../../../vscode-languageserver-node/server -f", "test": "../../../node_modules/.bin/mocha" } } diff --git a/extensions/html/server/src/htmlServerMain.ts b/extensions/html/server/src/htmlServerMain.ts index 1719e612d2a..2593ab4b147 100644 --- a/extensions/html/server/src/htmlServerMain.ts +++ b/extensions/html/server/src/htmlServerMain.ts @@ -103,7 +103,7 @@ connection.onInitialize((params: InitializeParams): InitializeResult => { let capabilities: ServerCapabilities & CPServerCapabilities = { // Tell the client that the server works in FULL text document sync mode textDocumentSync: documents.syncKind, - completionProvider: clientSnippetSupport ? { resolveProvider: true, triggerCharacters: ['.', ':', '<', '"', '=', '/', '>'] } : undefined, + completionProvider: clientSnippetSupport ? { resolveProvider: true, triggerCharacters: ['.', ':', '<', '"', '=', '/'] } : undefined, hoverProvider: true, documentHighlightProvider: true, documentRangeFormattingProvider: false, diff --git a/extensions/html/server/src/modes/javascriptMode.ts b/extensions/html/server/src/modes/javascriptMode.ts index 59e4b0bb569..a1d0c2850fc 100644 --- a/extensions/html/server/src/modes/javascriptMode.ts +++ b/extensions/html/server/src/modes/javascriptMode.ts @@ -77,6 +77,7 @@ export function getJavascriptMode(documentRegions: LanguageModelCache", "\t", "\t", - "\t{{Page Title}}", + "\t${1:Page Title}", "\t", - "\t", - "\t", + "\t", + "\t", "", "", - "\t{{}}", + "\t$0", "", "" ], "description": "Simple HTML5 starting point" } -} \ No newline at end of file +} diff --git a/extensions/java/package.json b/extensions/java/package.json index d8c9375f0c3..6493004d0a8 100644 --- a/extensions/java/package.json +++ b/extensions/java/package.json @@ -17,6 +17,10 @@ "language": "java", "scopeName": "source.java", "path": "./syntaxes/java.tmLanguage.json" + }], + "snippets": [{ + "language": "java", + "path": "./snippets/java.snippets.json" }] } } \ No newline at end of file diff --git a/extensions/java/snippets/java.snippets.json b/extensions/java/snippets/java.snippets.json new file mode 100644 index 00000000000..9a2300b18f2 --- /dev/null +++ b/extensions/java/snippets/java.snippets.json @@ -0,0 +1,16 @@ +{ + "Region Start": { + "prefix": "#region", + "body": [ + "//#region" + ], + "description": "Folding Region Start" + }, + "Region End": { + "prefix": "#endregion", + "body": [ + "//#endregion" + ], + "description": "Folding Region End" + } +} diff --git a/extensions/javascript/package.json b/extensions/javascript/package.json index b3b68dedd5f..15da42cf0a9 100644 --- a/extensions/javascript/package.json +++ b/extensions/javascript/package.json @@ -115,6 +115,10 @@ "fileMatch": ".babelrc", "url": "http://json.schemastore.org/babelrc" }, + { + "fileMatch": ".babelrc.json", + "url": "http://json.schemastore.org/babelrc" + }, { "fileMatch": "jsconfig.json", "url": "http://json.schemastore.org/jsconfig" diff --git a/extensions/javascript/src/features/bowerJSONContribution.ts b/extensions/javascript/src/features/bowerJSONContribution.ts index a3c7b17e46d..13d6ccd29ee 100644 --- a/extensions/javascript/src/features/bowerJSONContribution.ts +++ b/extensions/javascript/src/features/bowerJSONContribution.ts @@ -13,6 +13,8 @@ import { textToMarkedString } from './markedTextUtil'; import * as nls from 'vscode-nls'; const localize = nls.loadMessageBundle(); +const USER_AGENT = 'Visual Studio Code'; + export class BowerJSONContribution implements IJSONContribution { private topRanked = ['twitter', 'bootstrap', 'angular-1.1.6', 'angular-latest', 'angulerjs', 'd3', 'myjquery', 'jq', 'abcdef1234567890', 'jQuery', 'jquery-1.11.1', 'jquery', @@ -49,10 +51,11 @@ export class BowerJSONContribution implements IJSONContribution { public collectPropertySuggestions(_resource: string, location: Location, currentWord: string, addValue: boolean, isLast: boolean, collector: ISuggestionsCollector): Thenable | null { if ((location.matches(['dependencies']) || location.matches(['devDependencies']))) { if (currentWord.length > 0) { - const queryUrl = 'https://bower.herokuapp.com/packages/search/' + encodeURIComponent(currentWord); + const queryUrl = 'https://registry.bower.io/packages/search/' + encodeURIComponent(currentWord); return this.xhr({ - url: queryUrl + url: queryUrl, + agent: USER_AGENT }).then((success) => { if (success.status === 200) { try { @@ -141,10 +144,11 @@ export class BowerJSONContribution implements IJSONContribution { } private getInfo(pack: string): Thenable { - const queryUrl = 'https://bower.herokuapp.com/packages/' + encodeURIComponent(pack); + const queryUrl = 'https://registry.bower.io/packages/' + encodeURIComponent(pack); return this.xhr({ - url: queryUrl + url: queryUrl, + agent: USER_AGENT }).then((success) => { try { const obj = JSON.parse(success.responseText); diff --git a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json index d9981eea898..9adeabe27aa 100644 --- a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8361b1a232501c67911c81a4664a9460d7922c6b", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/06831946d0a23cb56be0c1ead7cab10be01306cd", "name": "JavaScript (with React support)", "scopeName": "source.js", "fileTypes": [ @@ -278,7 +278,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.js", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.js entity.name.function.js" @@ -512,7 +512,7 @@ } }, { - "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", "captures": { "1": { "name": "storage.modifier.js" @@ -739,7 +739,7 @@ }, { "name": "meta.definition.property.js entity.name.function.js", - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))" + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))" }, { "name": "meta.definition.property.js variable.object.property.js", @@ -1002,7 +1002,7 @@ }, { "name": "meta.arrow.js", - "begin": "(?x) (?:\n (? is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.js" @@ -1946,7 +1946,7 @@ }, { "name": "meta.object.member.js", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.js" @@ -2039,13 +2039,13 @@ ] }, "function-call": { - "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`]([^<>]|\\<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`][^<>]+\\>)+>\\s*)?\\()", - "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`]([^<>]|\\<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`][^<>]+\\>)+>\\s*)?\\()", + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()", + "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()", "patterns": [ { "name": "meta.function-call.js", "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))", - "end": "(?=\\s*(<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`]([^<>]|\\<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`][^<>]+\\>)+>\\s*)?\\()", + "end": "(?=\\s*(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()", "patterns": [ { "include": "#literal" @@ -2492,7 +2492,7 @@ } }, { - "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)?\\()", + "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\\()", "captures": { "1": { "name": "punctuation.accessor.js" @@ -2572,7 +2572,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.js" diff --git a/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json b/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json index c72bdbc95fa..5e5384f0946 100644 --- a/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8361b1a232501c67911c81a4664a9460d7922c6b", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/06831946d0a23cb56be0c1ead7cab10be01306cd", "name": "JavaScript (with React support)", "scopeName": "source.js.jsx", "fileTypes": [ @@ -278,7 +278,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.js.jsx", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.js.jsx entity.name.function.js.jsx" @@ -512,7 +512,7 @@ } }, { - "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", "captures": { "1": { "name": "storage.modifier.js.jsx" @@ -739,7 +739,7 @@ }, { "name": "meta.definition.property.js.jsx entity.name.function.js.jsx", - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))" + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))" }, { "name": "meta.definition.property.js.jsx variable.object.property.js.jsx", @@ -1002,7 +1002,7 @@ }, { "name": "meta.arrow.js.jsx", - "begin": "(?x) (?:\n (? is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.js.jsx" @@ -1946,7 +1946,7 @@ }, { "name": "meta.object.member.js.jsx", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.js.jsx" @@ -2039,13 +2039,13 @@ ] }, "function-call": { - "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`]([^<>]|\\<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`][^<>]+\\>)+>\\s*)?\\()", - "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`]([^<>]|\\<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`][^<>]+\\>)+>\\s*)?\\()", + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()", + "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()", "patterns": [ { "name": "meta.function-call.js.jsx", "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))", - "end": "(?=\\s*(<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`]([^<>]|\\<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`][^<>]+\\>)+>\\s*)?\\()", + "end": "(?=\\s*(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()", "patterns": [ { "include": "#literal" @@ -2492,7 +2492,7 @@ } }, { - "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)?\\()", + "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\\()", "captures": { "1": { "name": "punctuation.accessor.js.jsx" @@ -2572,7 +2572,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.js.jsx" diff --git a/extensions/javascript/test/colorize-results/test_jsx.json b/extensions/javascript/test/colorize-results/test_jsx.json index 7824e567af2..a375d5d7b9d 100644 --- a/extensions/javascript/test/colorize-results/test_jsx.json +++ b/extensions/javascript/test/colorize-results/test_jsx.json @@ -135,11 +135,11 @@ "c": "getInitialState", "t": "source.js.jsx meta.var.expr.js.jsx meta.objectliteral.js.jsx meta.object.member.js.jsx meta.object-literal.key.js.jsx entity.name.function.js.jsx", "r": { - "dark_plus": "meta.object-literal.key entity.name.function: #9CDCFE", - "light_plus": "meta.object-literal.key entity.name.function: #001080", + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "meta.object-literal.key entity.name.function: #9CDCFE" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -399,11 +399,11 @@ "c": "toggle", "t": "source.js.jsx meta.var.expr.js.jsx meta.objectliteral.js.jsx meta.object.member.js.jsx meta.object-literal.key.js.jsx entity.name.function.js.jsx", "r": { - "dark_plus": "meta.object-literal.key entity.name.function: #9CDCFE", - "light_plus": "meta.object-literal.key entity.name.function: #001080", + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "meta.object-literal.key entity.name.function: #9CDCFE" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -927,11 +927,11 @@ "c": "render", "t": "source.js.jsx meta.var.expr.js.jsx meta.objectliteral.js.jsx meta.object.member.js.jsx meta.object-literal.key.js.jsx entity.name.function.js.jsx", "r": { - "dark_plus": "meta.object-literal.key entity.name.function: #9CDCFE", - "light_plus": "meta.object-literal.key entity.name.function: #001080", + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "meta.object-literal.key entity.name.function: #9CDCFE" + "hc_black": "entity.name.function: #DCDCAA" } }, { diff --git a/extensions/json/client/src/jsonMain.ts b/extensions/json/client/src/jsonMain.ts index ecbfa1e35a0..770cdb18d25 100644 --- a/extensions/json/client/src/jsonMain.ts +++ b/extensions/json/client/src/jsonMain.ts @@ -6,7 +6,7 @@ import * as path from 'path'; -import { workspace, languages, ExtensionContext, extensions, Uri, TextDocument, ColorInformation, Color, ColorPresentation } from 'vscode'; +import { workspace, languages, ExtensionContext, extensions, Uri, TextDocument, ColorInformation, Color, ColorPresentation, LanguageConfiguration } from 'vscode'; import { LanguageClient, LanguageClientOptions, RequestType, ServerOptions, TransportKind, NotificationType, DidChangeConfigurationNotification } from 'vscode-languageclient'; import TelemetryReporter from 'vscode-extension-telemetry'; import { ConfigurationFeature } from 'vscode-languageclient/lib/configuration.proposed'; @@ -67,7 +67,7 @@ export function activate(context: ExtensionContext) { // The server is implemented in node let serverModule = context.asAbsolutePath(path.join('server', 'out', 'jsonServerMain.js')); // The debug options for the server - let debugOptions = { execArgv: ['--nolazy', '--inspect=6004'] }; + let debugOptions = { execArgv: ['--nolazy', '--inspect'] }; // If the extension is launch in debug mode the debug server options are use // Otherwise the run options are used @@ -76,7 +76,7 @@ export function activate(context: ExtensionContext) { debug: { module: serverModule, transport: TransportKind.ipc, options: debugOptions } }; - let documentSelector = ['json']; + let documentSelector = ['json', 'jsonc']; // Options to control the language client let clientOptions: LanguageClientOptions = { @@ -159,13 +159,15 @@ export function activate(context: ExtensionContext) { })); }); - languages.setLanguageConfiguration('json', { + let languageConfiguration: LanguageConfiguration = { wordPattern: /("(?:[^\\\"]*(?:\\.)?)*"?)|[^\s{}\[\],:]+/, indentationRules: { increaseIndentPattern: /^.*(\{[^}]*|\[[^\]]*)$/, decreaseIndentPattern: /^\s*[}\]],?\s*$/ } - }); + }; + languages.setLanguageConfiguration('json', languageConfiguration); + languages.setLanguageConfiguration('jsonc', languageConfiguration); } function getSchemaAssociation(context: ExtensionContext): ISchemaAssociations { diff --git a/extensions/json/package.json b/extensions/json/package.json index d6de62b2797..afffbf02d82 100644 --- a/extensions/json/package.json +++ b/extensions/json/package.json @@ -7,7 +7,7 @@ "vscode": "0.10.x" }, "activationEvents": [ - "onLanguage:json" + "onLanguage:json", "onLanguage:jsonc" ], "enableProposedApi": true, "main": "./client/out/jsonMain", @@ -32,8 +32,7 @@ ".jscsrc", ".eslintrc", ".babelrc", - ".webmanifest", - ".code-workspace" + ".webmanifest" ], "filenames": [ ".watchmanconfig", @@ -44,6 +43,27 @@ "application/manifest+json" ], "configuration": "./language-configuration.json" + }, + { + "id": "jsonc", + "aliases": [ + "JSON with Comments" + ], + "extensions": [ + ".code-workspace", + "language-configuration.json", + "icon-theme.json", + "color-theme.json" + ], + "filenames": [ + "settings.json", + "launch.json", + "tasks.json", + "keybindings.json", + "tsconfig.json", + "jsconfig.json" + ], + "configuration": "./language-configuration.json" } ], "grammars": [ @@ -51,6 +71,11 @@ "language": "json", "scopeName": "source.json", "path": "./syntaxes/JSON.tmLanguage.json" + }, + { + "language": "jsonc", + "scopeName": "source.json", + "path": "./syntaxes/JSON.tmLanguage.json" } ], "jsonValidation": [ diff --git a/extensions/json/server/package.json b/extensions/json/server/package.json index 13fe26647e4..a9a68b0a3cf 100644 --- a/extensions/json/server/package.json +++ b/extensions/json/server/package.json @@ -10,7 +10,7 @@ "dependencies": { "jsonc-parser": "^1.0.0", "request-light": "^0.2.1", - "vscode-json-languageservice": "^3.0.1", + "vscode-json-languageservice": "^3.0.4", "vscode-languageserver": "^3.5.0", "vscode-nls": "^2.0.2", "vscode-uri": "^1.0.1" @@ -21,9 +21,9 @@ "scripts": { "compile": "gulp compile-extension:json-server", "watch": "gulp watch-extension:json-server", - "install-service-next": "npm install vscode-json-languageservice@next -f -S", - "install-service-local": "npm install ../../../../vscode-json-languageservice -f -S", - "install-server-next": "npm install vscode-languageserver@next -f -S", - "install-server-local": "npm install ../../../../vscode-languageserver-node/server -f -S" + "install-service-next": "yarn add vscode-json-languageservice@next", + "install-service-local": "npm install ../../../../vscode-json-languageservice -f", + "install-server-next": "yarn add vscode-languageserver@next", + "install-server-local": "npm install ../../../../vscode-languageserver-node/server -f" } } diff --git a/extensions/json/server/src/jsonServerMain.ts b/extensions/json/server/src/jsonServerMain.ts index 1706466ab61..dea8fdc2b21 100644 --- a/extensions/json/server/src/jsonServerMain.ts +++ b/extensions/json/server/src/jsonServerMain.ts @@ -17,7 +17,8 @@ import fs = require('fs'); import URI from 'vscode-uri'; import * as URL from 'url'; import Strings = require('./utils/strings'); -import { JSONDocument, JSONSchema, LanguageSettings, getLanguageService } from 'vscode-json-languageservice'; +import { formatError, runSafe } from './utils/errors'; +import { JSONDocument, JSONSchema, LanguageSettings, getLanguageService, DocumentLanguageSettings } from 'vscode-json-languageservice'; import { getLanguageModelCache } from './languageModelCache'; import * as nls from 'vscode-nls'; @@ -42,6 +43,10 @@ namespace SchemaContentChangeNotification { // Create a connection for the server let connection: IConnection = createConnection(); +process.on('unhandledRejection', e => { + connection.console.error(formatError(`Unhandled exception`, e)); +}); + console.log = connection.console.log.bind(connection.console); console.error = connection.console.error.bind(connection.console); @@ -161,7 +166,7 @@ connection.onDidChangeConfiguration((change) => { let enableFormatter = settings && settings.json && settings.json.format && settings.json.format.enable; if (enableFormatter) { if (!formatterRegistration) { - formatterRegistration = connection.client.register(DocumentRangeFormattingRequest.type, { documentSelector: [{ language: 'json' }] }); + formatterRegistration = connection.client.register(DocumentRangeFormattingRequest.type, { documentSelector: [{ language: 'json' }, { language: 'jsonc' }] }); } } else if (formatterRegistration) { formatterRegistration.then(r => r.dispose()); @@ -251,12 +256,17 @@ function validateTextDocument(textDocument: TextDocument): void { connection.sendDiagnostics({ uri: textDocument.uri, diagnostics: [] }); return; } + try { + let jsonDocument = getJSONDocument(textDocument); - let jsonDocument = getJSONDocument(textDocument); - languageService.doValidation(textDocument, jsonDocument).then(diagnostics => { - // Send the computed diagnostics to VSCode. - connection.sendDiagnostics({ uri: textDocument.uri, diagnostics }); - }); + let documentSettings: DocumentLanguageSettings = textDocument.languageId === 'jsonc' ? { comments: 'ignore', trailingCommas: 'ignore' } : { comments: 'error', trailingCommas: 'error' }; + languageService.doValidation(textDocument, jsonDocument, documentSettings).then(diagnostics => { + // Send the computed diagnostics to VSCode. + connection.sendDiagnostics({ uri: textDocument.uri, diagnostics }); + }); + } catch (e) { + connection.console.error(formatError(`Error while validating ${textDocument.uri}`, e)); + } } connection.onDidChangeWatchedFiles((change) => { @@ -285,48 +295,62 @@ function getJSONDocument(document: TextDocument): JSONDocument { } connection.onCompletion(textDocumentPosition => { - let document = documents.get(textDocumentPosition.textDocument.uri); - let jsonDocument = getJSONDocument(document); - return languageService.doComplete(document, textDocumentPosition.position, jsonDocument); + return runSafe(() => { + let document = documents.get(textDocumentPosition.textDocument.uri); + let jsonDocument = getJSONDocument(document); + return languageService.doComplete(document, textDocumentPosition.position, jsonDocument); + }, null, `Error while computing completions for ${textDocumentPosition.textDocument.uri}`); }); connection.onCompletionResolve(completionItem => { - return languageService.doResolve(completionItem); + return runSafe(() => { + return languageService.doResolve(completionItem); + }, null, `Error while resolving completion proposal`); }); connection.onHover(textDocumentPositionParams => { - let document = documents.get(textDocumentPositionParams.textDocument.uri); - let jsonDocument = getJSONDocument(document); - return languageService.doHover(document, textDocumentPositionParams.position, jsonDocument); + return runSafe(() => { + let document = documents.get(textDocumentPositionParams.textDocument.uri); + let jsonDocument = getJSONDocument(document); + return languageService.doHover(document, textDocumentPositionParams.position, jsonDocument); + }, null, `Error while computing hover for ${textDocumentPositionParams.textDocument.uri}`); }); connection.onDocumentSymbol(documentSymbolParams => { - let document = documents.get(documentSymbolParams.textDocument.uri); - let jsonDocument = getJSONDocument(document); - return languageService.findDocumentSymbols(document, jsonDocument); + return runSafe(() => { + let document = documents.get(documentSymbolParams.textDocument.uri); + let jsonDocument = getJSONDocument(document); + return languageService.findDocumentSymbols(document, jsonDocument); + }, [], `Error while computing document symbols for ${documentSymbolParams.textDocument.uri}`); }); connection.onDocumentRangeFormatting(formatParams => { - let document = documents.get(formatParams.textDocument.uri); - return languageService.format(document, formatParams.range, formatParams.options); + return runSafe(() => { + let document = documents.get(formatParams.textDocument.uri); + return languageService.format(document, formatParams.range, formatParams.options); + }, [], `Error while formatting range for ${formatParams.textDocument.uri}`); }); connection.onRequest(DocumentColorRequest.type, params => { - let document = documents.get(params.textDocument.uri); - if (document) { - let jsonDocument = getJSONDocument(document); - return languageService.findDocumentColors(document, jsonDocument); - } - return []; + return runSafe(() => { + let document = documents.get(params.textDocument.uri); + if (document) { + let jsonDocument = getJSONDocument(document); + return languageService.findDocumentColors(document, jsonDocument); + } + return []; + }, [], `Error while computing document colors for ${params.textDocument.uri}`); }); connection.onRequest(ColorPresentationRequest.type, params => { - let document = documents.get(params.textDocument.uri); - if (document) { - let jsonDocument = getJSONDocument(document); - return languageService.getColorPresentations(document, jsonDocument, params.color, params.range); - } - return []; + return runSafe(() => { + let document = documents.get(params.textDocument.uri); + if (document) { + let jsonDocument = getJSONDocument(document); + return languageService.getColorPresentations(document, jsonDocument, params.color, params.range); + } + return []; + }, [], `Error while computing color presentationsd for ${params.textDocument.uri}`); }); // Listen on the connection diff --git a/extensions/json/server/src/utils/errors.ts b/extensions/json/server/src/utils/errors.ts new file mode 100644 index 00000000000..d5a0c8e7d05 --- /dev/null +++ b/extensions/json/server/src/utils/errors.ts @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +export function formatError(message: string, err: any): string { + if (err instanceof Error) { + let error = err; + return `${message}: ${error.message}\n${error.stack}`; + } else if (typeof err === 'string') { + return `${message}: ${err}`; + } else if (err) { + return `${message}: ${err.toString()}`; + } + return message; +} + +export function runSafe(func: () => Thenable | T, errorVal: T, errorMessage: string): Thenable | T { + try { + let t = func(); + if (t instanceof Promise) { + return t.then(void 0, e => { + console.error(formatError(errorMessage, e)); + return errorVal; + }); + } + return t; + } catch (e) { + console.error(formatError(errorMessage, e)); + return errorVal; + } +} \ No newline at end of file diff --git a/extensions/json/server/yarn.lock b/extensions/json/server/yarn.lock index a32aed0ba40..b7fd490aa8a 100644 --- a/extensions/json/server/yarn.lock +++ b/extensions/json/server/yarn.lock @@ -52,9 +52,9 @@ request-light@^0.2.1: https-proxy-agent "^0.3.5" vscode-nls "^2.0.2" -vscode-json-languageservice@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-3.0.1.tgz#e29eef0ef7c4548be3961b831d9b326cca9bd88d" +vscode-json-languageservice@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-3.0.4.tgz#293970ef3179d7793ffd25887acf158d93ff8733" dependencies: jsonc-parser "^1.0.0" vscode-languageserver-types "^3.5.0" diff --git a/extensions/less/language-configuration.json b/extensions/less/language-configuration.json index f60130d9d46..181954633b0 100644 --- a/extensions/less/language-configuration.json +++ b/extensions/less/language-configuration.json @@ -25,5 +25,11 @@ "indentationRules": { "increaseIndentPattern": "(^.*\\{[^}]*$)", "decreaseIndentPattern": "^\\s*\\}" + }, + "folding": { + "markers": { + "start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/", + "end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/" + } } } \ No newline at end of file diff --git a/extensions/markdown/src/commandManager.ts b/extensions/markdown/src/commandManager.ts new file mode 100644 index 00000000000..359d5b9ca96 --- /dev/null +++ b/extensions/markdown/src/commandManager.ts @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * 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'; + +export interface Command { + readonly id: string; + + execute(...args: any[]): void; +} + +export class CommandManager { + private readonly commands = new Map(); + + public dispose() { + for (const registration of this.commands.values()) { + registration.dispose(); + } + this.commands.clear(); + } + + public register(command: T): T { + this.registerCommand(command.id, command.execute, command); + return command; + } + + private registerCommand(id: string, impl: (...args: any[]) => void, thisArg?: any) { + if (this.commands.has(id)) { + return; + } + + this.commands.set(id, vscode.commands.registerCommand(id, impl, thisArg)); + } +} \ No newline at end of file diff --git a/extensions/markdown/src/commands.ts b/extensions/markdown/src/commands.ts new file mode 100644 index 00000000000..0051c2fa0f8 --- /dev/null +++ b/extensions/markdown/src/commands.ts @@ -0,0 +1,291 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vscode-nls'; +const localize = nls.config(process.env.VSCODE_NLS_CONFIG)(); + +import * as vscode from 'vscode'; +import * as path from 'path'; + +import { Command } from './commandManager'; +import { ExtensionContentSecurityPolicyArbiter, PreviewSecuritySelector } from './security'; +import { getMarkdownUri, MDDocumentContentProvider, isMarkdownFile } from './features/previewContentProvider'; +import { Logger } from './logger'; +import { TableOfContentsProvider } from './tableOfContentsProvider'; +import { MarkdownEngine } from './markdownEngine'; +import { TelemetryReporter } from './telemetryReporter'; + + +function getViewColumn(sideBySide: boolean): vscode.ViewColumn | undefined { + const active = vscode.window.activeTextEditor; + if (!active) { + return vscode.ViewColumn.One; + } + + if (!sideBySide) { + return active.viewColumn; + } + + switch (active.viewColumn) { + case vscode.ViewColumn.One: + return vscode.ViewColumn.Two; + case vscode.ViewColumn.Two: + return vscode.ViewColumn.Three; + } + + return active.viewColumn; +} + +function showPreview( + cspArbiter: ExtensionContentSecurityPolicyArbiter, + telemetryReporter: TelemetryReporter, + uri?: vscode.Uri, + sideBySide: boolean = false, +) { + let resource = uri; + if (!(resource instanceof vscode.Uri)) { + if (vscode.window.activeTextEditor) { + // we are relaxed and don't check for markdown files + resource = vscode.window.activeTextEditor.document.uri; + } + } + + if (!(resource instanceof vscode.Uri)) { + if (!vscode.window.activeTextEditor) { + // this is most likely toggling the preview + return vscode.commands.executeCommand('markdown.showSource'); + } + // nothing found that could be shown or toggled + return; + } + + const thenable = vscode.commands.executeCommand('vscode.previewHtml', + getMarkdownUri(resource), + getViewColumn(sideBySide), + localize('previewTitle', 'Preview {0}', path.basename(resource.fsPath)), + { + allowScripts: true, + allowSvgs: cspArbiter.shouldAllowSvgsForResource(resource) + }); + + telemetryReporter.sendTelemetryEvent('openPreview', { + where: sideBySide ? 'sideBySide' : 'inPlace', + how: (uri instanceof vscode.Uri) ? 'action' : 'pallete' + }); + + return thenable; +} + +export class ShowPreviewCommand implements Command { + public readonly id = 'markdown.showPreview'; + + public constructor( + private readonly cspArbiter: ExtensionContentSecurityPolicyArbiter, + private readonly telemetryReporter: TelemetryReporter + ) { } + + public execute(uri?: vscode.Uri) { + showPreview(this.cspArbiter, this.telemetryReporter, uri, false); + } +} + +export class ShowPreviewToSideCommand implements Command { + public readonly id = 'markdown.showPreviewToSide'; + + public constructor( + private readonly cspArbiter: ExtensionContentSecurityPolicyArbiter, + private readonly telemetryReporter: TelemetryReporter + ) { } + + public execute(uri?: vscode.Uri) { + showPreview(this.cspArbiter, this.telemetryReporter, uri, true); + } +} + +export class ShowSourceCommand implements Command { + public readonly id = 'markdown.showSource'; + + public execute(mdUri?: vscode.Uri) { + if (!mdUri) { + return vscode.commands.executeCommand('workbench.action.navigateBack'); + } + + const docUri = vscode.Uri.parse(mdUri.query); + for (const editor of vscode.window.visibleTextEditors) { + if (editor.document.uri.scheme === docUri.scheme && editor.document.uri.toString() === docUri.toString()) { + return vscode.window.showTextDocument(editor.document, editor.viewColumn); + } + } + + return vscode.workspace.openTextDocument(docUri) + .then(vscode.window.showTextDocument); + } +} + +export class RefreshPreviewCommand implements Command { + public readonly id = 'markdown.refreshPreview'; + + public constructor( + private readonly contentProvider: MDDocumentContentProvider + ) { } + + public execute(resource: string | undefined) { + if (resource) { + const source = vscode.Uri.parse(resource); + this.contentProvider.update(source); + } else if (vscode.window.activeTextEditor && isMarkdownFile(vscode.window.activeTextEditor.document)) { + this.contentProvider.update(getMarkdownUri(vscode.window.activeTextEditor.document.uri)); + } else { + // update all generated md documents + for (const document of vscode.workspace.textDocuments) { + if (document.uri.scheme === 'markdown') { + this.contentProvider.update(document.uri); + } + } + } + } +} + +export class ShowPreviewSecuritySelectorCommand implements Command { + public readonly id = 'markdown.showPreviewSecuritySelector'; + + public constructor( + private readonly previewSecuritySelector: PreviewSecuritySelector + ) { } + + public execute(resource: string | undefined) { + if (resource) { + const source = vscode.Uri.parse(resource).query; + this.previewSecuritySelector.showSecutitySelectorForResource(vscode.Uri.parse(source)); + } else { + if (vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.languageId === 'markdown') { + this.previewSecuritySelector.showSecutitySelectorForResource(vscode.window.activeTextEditor.document.uri); + } + } + } +} + +export class RevealLineCommand implements Command { + public readonly id = '_markdown.revealLine'; + + public constructor( + private logger: Logger + ) { } + + public execute(uri: string, line: number) { + const sourceUri = vscode.Uri.parse(decodeURIComponent(uri)); + this.logger.log('revealLine', { uri, sourceUri: sourceUri.toString(), line }); + + vscode.window.visibleTextEditors + .filter(editor => isMarkdownFile(editor.document) && editor.document.uri.toString() === sourceUri.toString()) + .forEach(editor => { + const sourceLine = Math.floor(line); + const fraction = line - sourceLine; + const text = editor.document.lineAt(sourceLine).text; + const start = Math.floor(fraction * text.length); + editor.revealRange( + new vscode.Range(sourceLine, start, sourceLine + 1, 0), + vscode.TextEditorRevealType.AtTop); + }); + } +} + +export class DidClickCommand implements Command { + public readonly id = '_markdown.didClick'; + + public execute(uri: string, line: number) { + const sourceUri = vscode.Uri.parse(decodeURIComponent(uri)); + return vscode.workspace.openTextDocument(sourceUri) + .then(document => vscode.window.showTextDocument(document)) + .then(editor => + vscode.commands.executeCommand('revealLine', { lineNumber: Math.floor(line), at: 'center' }) + .then(() => editor)) + .then(editor => { + if (editor) { + editor.selection = new vscode.Selection( + new vscode.Position(Math.floor(line), 0), + new vscode.Position(Math.floor(line), 0)); + } + }); + } +} + +export class MoveCursorToPositionCommand implements Command { + public readonly id = '_markdown.moveCursorToPosition'; + + public execute(line: number, character: number) { + if (!vscode.window.activeTextEditor) { + return; + } + const position = new vscode.Position(line, character); + const selection = new vscode.Selection(position, position); + vscode.window.activeTextEditor.revealRange(selection); + vscode.window.activeTextEditor.selection = selection; + } +} + +export class OnPreviewStyleLoadErrorCommand implements Command { + public readonly id = '_markdown.onPreviewStyleLoadError'; + + public execute(resources: string[]) { + vscode.window.showWarningMessage(localize('onPreviewStyleLoadError', "Could not load 'markdown.styles': {0}", resources.join(', '))); + } +} + +export interface OpenDocumentLinkArgs { + path: string; + fragment: string; +} + +export class OpenDocumentLinkCommand implements Command { + private static readonly id = '_markdown.openDocumentLink'; + public readonly id = OpenDocumentLinkCommand.id; + + public static createCommandUri( + path: string, + fragment: string + ): vscode.Uri { + return vscode.Uri.parse(`command:${OpenDocumentLinkCommand.id}?${encodeURIComponent(JSON.stringify({ path, fragment }))}`); + } + + public constructor( + private readonly engine: MarkdownEngine + ) { } + + public execute(args: OpenDocumentLinkArgs) { + const tryRevealLine = async (editor: vscode.TextEditor) => { + if (editor && args.fragment) { + const toc = new TableOfContentsProvider(this.engine, editor.document); + const line = await toc.lookup(args.fragment); + if (!isNaN(line)) { + return editor.revealRange( + new vscode.Range(line, 0, line, 0), + vscode.TextEditorRevealType.AtTop); + } + } + }; + + const tryOpen = async (path: string) => { + if (vscode.window.activeTextEditor && isMarkdownFile(vscode.window.activeTextEditor.document) && vscode.window.activeTextEditor.document.uri.fsPath === path) { + return tryRevealLine(vscode.window.activeTextEditor); + } else { + const resource = vscode.Uri.file(path); + return vscode.workspace.openTextDocument(resource) + .then(vscode.window.showTextDocument) + .then(tryRevealLine); + } + }; + + return tryOpen(args.path).catch(() => { + if (path.extname(args.path) === '') { + return tryOpen(args.path + '.md'); + } + const resource = vscode.Uri.file(args.path); + return Promise.resolve(void 0) + .then(() => vscode.commands.executeCommand('vscode.open', resource)) + .then(() => void 0); + }); + } +} diff --git a/extensions/markdown/src/extension.ts b/extensions/markdown/src/extension.ts index a1c002d35af..77487fbec18 100644 --- a/extensions/markdown/src/extension.ts +++ b/extensions/markdown/src/extension.ts @@ -3,213 +3,52 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as nls from 'vscode-nls'; -const localize = nls.config(process.env.VSCODE_NLS_CONFIG)(); import * as vscode from 'vscode'; -import * as path from 'path'; -import TelemetryReporter from 'vscode-extension-telemetry'; + import { MarkdownEngine } from './markdownEngine'; -import LinkProvider from './documentLinkProvider'; -import MDDocumentSymbolProvider from './documentSymbolProvider'; import { ExtensionContentSecurityPolicyArbiter, PreviewSecuritySelector } from './security'; -import { MDDocumentContentProvider, getMarkdownUri, isMarkdownFile } from './previewContentProvider'; -import { TableOfContentsProvider } from './tableOfContentsProvider'; import { Logger } from './logger'; +import { CommandManager } from './commandManager'; +import * as commands from './commands'; +import { loadDefaultTelemetryReporter } from './telemetryReporter'; +import { loadMarkdownExtensions } from './markdownExtensions'; +import LinkProvider from './features/documentLinkProvider'; +import MDDocumentSymbolProvider from './features/documentSymbolProvider'; +import { MDDocumentContentProvider, getMarkdownUri, isMarkdownFile } from './features/previewContentProvider'; -interface IPackageInfo { - name: string; - version: string; - aiKey: string; -} - -interface OpenDocumentLinkArgs { - path: string; - fragment: string; -} - -const resolveExtensionResources = (extension: vscode.Extension, stylePath: string): vscode.Uri => { - const resource = vscode.Uri.parse(stylePath); - if (resource.scheme) { - return resource; - } - return vscode.Uri.file(path.join(extension.extensionPath, stylePath)); -}; - -var telemetryReporter: TelemetryReporter | null; export function activate(context: vscode.ExtensionContext) { - const packageInfo = getPackageInfo(); - telemetryReporter = packageInfo && new TelemetryReporter(packageInfo.name, packageInfo.version, packageInfo.aiKey); - if (telemetryReporter) { - context.subscriptions.push(telemetryReporter); - } + const telemetryReporter = loadDefaultTelemetryReporter(); + context.subscriptions.push(telemetryReporter); const cspArbiter = new ExtensionContentSecurityPolicyArbiter(context.globalState, context.workspaceState); const engine = new MarkdownEngine(); - const logger = new Logger(); + const selector = 'markdown'; + const contentProvider = new MDDocumentContentProvider(engine, context, cspArbiter, logger); - const contentProviderRegistration = vscode.workspace.registerTextDocumentContentProvider('markdown', contentProvider); + context.subscriptions.push(vscode.workspace.registerTextDocumentContentProvider(selector, contentProvider)); + + loadMarkdownExtensions(contentProvider, engine); + + context.subscriptions.push(vscode.languages.registerDocumentSymbolProvider(selector, new MDDocumentSymbolProvider(engine))); + context.subscriptions.push(vscode.languages.registerDocumentLinkProvider(selector, new LinkProvider())); + const previewSecuritySelector = new PreviewSecuritySelector(cspArbiter, contentProvider); - for (const extension of vscode.extensions.all) { - const contributes = extension.packageJSON && extension.packageJSON.contributes; - if (!contributes) { - continue; - } - - const styles = contributes['markdown.previewStyles']; - if (styles && Array.isArray(styles)) { - for (const style of styles) { - try { - contentProvider.addStyle(resolveExtensionResources(extension, style)); - } catch (e) { - // noop - } - } - } - - const scripts = contributes['markdown.previewScripts']; - if (scripts && Array.isArray(scripts)) { - for (const script of scripts) { - try { - contentProvider.addScript(resolveExtensionResources(extension, script)); - } catch (e) { - // noop - } - } - } - - if (contributes['markdown.markdownItPlugins']) { - extension.activate().then(() => { - if (extension.exports && extension.exports.extendMarkdownIt) { - engine.addPlugin((md: any) => extension.exports.extendMarkdownIt(md)); - } - }); - } - } - - const symbolsProvider = new MDDocumentSymbolProvider(engine); - const symbolsProviderRegistration = vscode.languages.registerDocumentSymbolProvider({ language: 'markdown' }, symbolsProvider); - context.subscriptions.push(contentProviderRegistration, symbolsProviderRegistration); - - context.subscriptions.push(vscode.languages.registerDocumentLinkProvider('markdown', new LinkProvider())); - - context.subscriptions.push(vscode.commands.registerCommand('markdown.showPreview', (uri) => showPreview(cspArbiter, uri, false))); - context.subscriptions.push(vscode.commands.registerCommand('markdown.showPreviewToSide', uri => showPreview(cspArbiter, uri, true))); - context.subscriptions.push(vscode.commands.registerCommand('markdown.showSource', showSource)); - - context.subscriptions.push(vscode.commands.registerCommand('_markdown.moveCursorToPosition', (line: number, character: number) => { - if (!vscode.window.activeTextEditor) { - return; - } - const position = new vscode.Position(line, character); - const selection = new vscode.Selection(position, position); - vscode.window.activeTextEditor.revealRange(selection); - vscode.window.activeTextEditor.selection = selection; - })); - - context.subscriptions.push(vscode.commands.registerCommand('_markdown.revealLine', (uri, line) => { - const sourceUri = vscode.Uri.parse(decodeURIComponent(uri)); - logger.log('revealLine', { uri, sourceUri: sourceUri.toString(), line }); - - vscode.window.visibleTextEditors - .filter(editor => isMarkdownFile(editor.document) && editor.document.uri.toString() === sourceUri.toString()) - .forEach(editor => { - const sourceLine = Math.floor(line); - const fraction = line - sourceLine; - const text = editor.document.lineAt(sourceLine).text; - const start = Math.floor(fraction * text.length); - editor.revealRange( - new vscode.Range(sourceLine, start, sourceLine + 1, 0), - vscode.TextEditorRevealType.AtTop); - }); - })); - - context.subscriptions.push(vscode.commands.registerCommand('_markdown.didClick', (uri: string, line) => { - const sourceUri = vscode.Uri.parse(decodeURIComponent(uri)); - return vscode.workspace.openTextDocument(sourceUri) - .then(document => vscode.window.showTextDocument(document)) - .then(editor => - vscode.commands.executeCommand('revealLine', { lineNumber: Math.floor(line), at: 'center' }) - .then(() => editor)) - .then(editor => { - if (editor) { - editor.selection = new vscode.Selection( - new vscode.Position(Math.floor(line), 0), - new vscode.Position(Math.floor(line), 0)); - } - }); - })); - - context.subscriptions.push(vscode.commands.registerCommand('_markdown.openDocumentLink', (args: OpenDocumentLinkArgs) => { - const tryRevealLine = async (editor: vscode.TextEditor) => { - if (editor && args.fragment) { - const toc = new TableOfContentsProvider(engine, editor.document); - const line = await toc.lookup(args.fragment); - if (!isNaN(line)) { - return editor.revealRange( - new vscode.Range(line, 0, line, 0), - vscode.TextEditorRevealType.AtTop); - } - } - }; - - const tryOpen = async (path: string) => { - if (vscode.window.activeTextEditor && isMarkdownFile(vscode.window.activeTextEditor.document) && vscode.window.activeTextEditor.document.uri.fsPath === path) { - return tryRevealLine(vscode.window.activeTextEditor); - } else { - const resource = vscode.Uri.file(path); - return vscode.workspace.openTextDocument(resource) - .then(vscode.window.showTextDocument) - .then(tryRevealLine); - } - }; - - return tryOpen(args.path).catch(() => { - if (path.extname(args.path) === '') { - return tryOpen(args.path + '.md'); - } - const resource = vscode.Uri.file(args.path); - return Promise.resolve(void 0) - .then(() => vscode.commands.executeCommand('vscode.open', resource)) - .then(() => void 0); - }); - })); - - context.subscriptions.push(vscode.commands.registerCommand('markdown.showPreviewSecuritySelector', (resource: string | undefined) => { - if (resource) { - const source = vscode.Uri.parse(resource).query; - previewSecuritySelector.showSecutitySelectorForResource(vscode.Uri.parse(source)); - } else { - if (vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.languageId === 'markdown') { - previewSecuritySelector.showSecutitySelectorForResource(vscode.window.activeTextEditor.document.uri); - } - } - })); - - context.subscriptions.push(vscode.commands.registerCommand('markdown.refreshPreview', (resource: string | undefined) => { - if (resource) { - const source = vscode.Uri.parse(resource); - contentProvider.update(source); - } else if (vscode.window.activeTextEditor && isMarkdownFile(vscode.window.activeTextEditor.document)) { - contentProvider.update(getMarkdownUri(vscode.window.activeTextEditor.document.uri)); - } else { - // update all generated md documents - for (const document of vscode.workspace.textDocuments) { - if (document.uri.scheme === 'markdown') { - contentProvider.update(document.uri); - } - } - } - })); - - context.subscriptions.push(vscode.commands.registerCommand('_markdown.onPreviewStyleLoadError', (resources: string[]) => { - vscode.window.showWarningMessage(localize('onPreviewStyleLoadError', "Could not load 'markdown.styles': {0}", resources.join(', '))); - })); + const commandManager = new CommandManager(); + context.subscriptions.push(commandManager); + commandManager.register(new commands.ShowPreviewCommand(cspArbiter, telemetryReporter)); + commandManager.register(new commands.ShowPreviewToSideCommand(cspArbiter, telemetryReporter)); + commandManager.register(new commands.ShowSourceCommand()); + commandManager.register(new commands.RefreshPreviewCommand(contentProvider)); + commandManager.register(new commands.RevealLineCommand(logger)); + commandManager.register(new commands.MoveCursorToPositionCommand()); + commandManager.register(new commands.ShowPreviewSecuritySelectorCommand(previewSecuritySelector)); + commandManager.register(new commands.OnPreviewStyleLoadErrorCommand()); + commandManager.register(new commands.DidClickCommand()); + commandManager.register(new commands.OpenDocumentLinkCommand(engine)); context.subscriptions.push(vscode.workspace.onDidSaveTextDocument(document => { if (isMarkdownFile(document)) { @@ -243,95 +82,3 @@ export function activate(context: vscode.ExtensionContext) { } })); } - - -function showPreview(cspArbiter: ExtensionContentSecurityPolicyArbiter, uri?: vscode.Uri, sideBySide: boolean = false) { - let resource = uri; - if (!(resource instanceof vscode.Uri)) { - if (vscode.window.activeTextEditor) { - // we are relaxed and don't check for markdown files - resource = vscode.window.activeTextEditor.document.uri; - } - } - - if (!(resource instanceof vscode.Uri)) { - if (!vscode.window.activeTextEditor) { - // this is most likely toggling the preview - return vscode.commands.executeCommand('markdown.showSource'); - } - // nothing found that could be shown or toggled - return; - } - - const thenable = vscode.commands.executeCommand('vscode.previewHtml', - getMarkdownUri(resource), - getViewColumn(sideBySide), - localize('previewTitle', 'Preview {0}', path.basename(resource.fsPath)), - { - allowScripts: true, - allowSvgs: cspArbiter.shouldAllowSvgsForResource(resource) - }); - - if (telemetryReporter) { - /* __GDPR__ - "openPreview" : { - "where" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "how": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - telemetryReporter.sendTelemetryEvent('openPreview', { - where: sideBySide ? 'sideBySide' : 'inPlace', - how: (uri instanceof vscode.Uri) ? 'action' : 'pallete' - }); - } - - return thenable; -} - -function getViewColumn(sideBySide: boolean): vscode.ViewColumn | undefined { - const active = vscode.window.activeTextEditor; - if (!active) { - return vscode.ViewColumn.One; - } - - if (!sideBySide) { - return active.viewColumn; - } - - switch (active.viewColumn) { - case vscode.ViewColumn.One: - return vscode.ViewColumn.Two; - case vscode.ViewColumn.Two: - return vscode.ViewColumn.Three; - } - - return active.viewColumn; -} - -function showSource(mdUri: vscode.Uri) { - if (!mdUri) { - return vscode.commands.executeCommand('workbench.action.navigateBack'); - } - - const docUri = vscode.Uri.parse(mdUri.query); - for (const editor of vscode.window.visibleTextEditors) { - if (editor.document.uri.scheme === docUri.scheme && editor.document.uri.toString() === docUri.toString()) { - return vscode.window.showTextDocument(editor.document, editor.viewColumn); - } - } - - return vscode.workspace.openTextDocument(docUri) - .then(vscode.window.showTextDocument); -} - -function getPackageInfo(): IPackageInfo | null { - const extention = vscode.extensions.getExtension('Microsoft.vscode-markdown'); - if (extention && extention.packageJSON) { - return { - name: extention.packageJSON.name, - version: extention.packageJSON.version, - aiKey: extention.packageJSON.aiKey - }; - } - return null; -} diff --git a/extensions/markdown/src/documentLinkProvider.ts b/extensions/markdown/src/features/documentLinkProvider.ts similarity index 93% rename from extensions/markdown/src/documentLinkProvider.ts rename to extensions/markdown/src/features/documentLinkProvider.ts index 12ef17312d1..8ad3619b32d 100644 --- a/extensions/markdown/src/documentLinkProvider.ts +++ b/extensions/markdown/src/features/documentLinkProvider.ts @@ -7,8 +7,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; +import { OpenDocumentLinkCommand } from '../commands'; -function normalizeLink(document: vscode.TextDocument, link: string, base: string): vscode.Uri { +function normalizeLink( + document: vscode.TextDocument, + link: string, + base: string +): vscode.Uri { const uri = vscode.Uri.parse(link); if (uri.scheme) { return uri; @@ -27,10 +32,13 @@ function normalizeLink(document: vscode.TextDocument, link: string, base: string resourcePath = path.join(base, uri.path); } - return vscode.Uri.parse(`command:_markdown.openDocumentLink?${encodeURIComponent(JSON.stringify({ fragment: uri.fragment, path: resourcePath }))}`); + return OpenDocumentLinkCommand.createCommandUri(resourcePath, uri.fragment); } -function matchAll(pattern: RegExp, text: string): Array { +function matchAll( + pattern: RegExp, + text: string +): Array { const out: RegExpMatchArray[] = []; pattern.lastIndex = 0; let match: RegExpMatchArray | null; diff --git a/extensions/markdown/src/documentSymbolProvider.ts b/extensions/markdown/src/features/documentSymbolProvider.ts similarity index 88% rename from extensions/markdown/src/documentSymbolProvider.ts rename to extensions/markdown/src/features/documentSymbolProvider.ts index 77c0e0baad8..53213f0661d 100644 --- a/extensions/markdown/src/documentSymbolProvider.ts +++ b/extensions/markdown/src/features/documentSymbolProvider.ts @@ -7,8 +7,8 @@ import * as vscode from 'vscode'; -import { MarkdownEngine } from './markdownEngine'; -import { TableOfContentsProvider } from './tableOfContentsProvider'; +import { MarkdownEngine } from '../markdownEngine'; +import { TableOfContentsProvider } from '../tableOfContentsProvider'; export default class MDDocumentSymbolProvider implements vscode.DocumentSymbolProvider { diff --git a/extensions/markdown/src/markdownExtensions.ts b/extensions/markdown/src/markdownExtensions.ts new file mode 100644 index 00000000000..b01a14b994b --- /dev/null +++ b/extensions/markdown/src/markdownExtensions.ts @@ -0,0 +1,86 @@ +/*--------------------------------------------------------------------------------------------- + * 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 * as path from 'path'; + +import { MDDocumentContentProvider } from './features/previewContentProvider'; +import { MarkdownEngine } from './markdownEngine'; + +const resolveExtensionResources = (extension: vscode.Extension, stylePath: string): vscode.Uri => { + const resource = vscode.Uri.parse(stylePath); + if (resource.scheme) { + return resource; + } + return vscode.Uri.file(path.join(extension.extensionPath, stylePath)); +}; + + +export function loadMarkdownExtensions( + contentProvider: MDDocumentContentProvider, + engine: MarkdownEngine +) { + for (const extension of vscode.extensions.all) { + const contributes = extension.packageJSON && extension.packageJSON.contributes; + if (!contributes) { + continue; + } + + tryLoadPreviewStyles(contributes, contentProvider, extension); + tryLoadPreviewScripts(contributes, contentProvider, extension); + tryLoadMarkdownItPlugins(contributes, extension, engine); + } +} + +function tryLoadMarkdownItPlugins( + contributes: any, + extension: vscode.Extension, + engine: MarkdownEngine +) { + if (contributes['markdown.markdownItPlugins']) { + extension.activate().then(() => { + if (extension.exports && extension.exports.extendMarkdownIt) { + engine.addPlugin((md: any) => extension.exports.extendMarkdownIt(md)); + } + }); + } +} + +function tryLoadPreviewScripts( + contributes: any, + contentProvider: MDDocumentContentProvider, + extension: vscode.Extension +) { + const scripts = contributes['markdown.previewScripts']; + if (scripts && Array.isArray(scripts)) { + for (const script of scripts) { + try { + contentProvider.addScript(resolveExtensionResources(extension, script)); + } + catch (e) { + // noop + } + } + } +} + +function tryLoadPreviewStyles( + contributes: any, + contentProvider: MDDocumentContentProvider, + extension: vscode.Extension +) { + const styles = contributes['markdown.previewStyles']; + if (styles && Array.isArray(styles)) { + for (const style of styles) { + try { + contentProvider.addStyle(resolveExtensionResources(extension, style)); + } + catch (e) { + // noop + } + } + } +} + diff --git a/extensions/markdown/src/previewContentProvider.ts b/extensions/markdown/src/previewContentProvider.ts deleted file mode 100644 index 41a708e44c0..00000000000 --- a/extensions/markdown/src/previewContentProvider.ts +++ /dev/null @@ -1,318 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import * as vscode from 'vscode'; -import * as path from 'path'; -import { MarkdownEngine } from './markdownEngine'; - -import * as nls from 'vscode-nls'; -import { Logger } from './logger'; -import { ContentSecurityPolicyArbiter, MarkdownPreviewSecurityLevel } from './security'; -const localize = nls.loadMessageBundle(); - -const previewStrings = { - cspAlertMessageText: localize('preview.securityMessage.text', 'Some content has been disabled in this document'), - cspAlertMessageTitle: localize('preview.securityMessage.title', 'Potentially unsafe or insecure content has been disabled in the markdown preview. Change the Markdown preview security setting to allow insecure content or enable scripts'), - cspAlertMessageLabel: localize('preview.securityMessage.label', 'Content Disabled Security Warning') -}; - -export function isMarkdownFile(document: vscode.TextDocument) { - return document.languageId === 'markdown' - && document.uri.scheme !== 'markdown'; // prevent processing of own documents -} - -export function getMarkdownUri(uri: vscode.Uri) { - if (uri.scheme === 'markdown') { - return uri; - } - - return uri.with({ - scheme: 'markdown', - path: uri.path + '.rendered', - query: uri.toString() - }); -} - -class MarkdownPreviewConfig { - public static getConfigForResource(resource: vscode.Uri) { - return new MarkdownPreviewConfig(resource); - } - - public readonly scrollBeyondLastLine: boolean; - public readonly wordWrap: boolean; - public readonly previewFrontMatter: string; - public readonly lineBreaks: boolean; - public readonly doubleClickToSwitchToEditor: boolean; - public readonly scrollEditorWithPreview: boolean; - public readonly scrollPreviewWithEditorSelection: boolean; - public readonly markEditorSelection: boolean; - - public readonly lineHeight: number; - public readonly fontSize: number; - public readonly fontFamily: string | undefined; - public readonly styles: string[]; - - private constructor(resource: vscode.Uri) { - const editorConfig = vscode.workspace.getConfiguration('editor', resource); - const markdownConfig = vscode.workspace.getConfiguration('markdown', resource); - const markdownEditorConfig = vscode.workspace.getConfiguration('[markdown]'); - - this.scrollBeyondLastLine = editorConfig.get('scrollBeyondLastLine', false); - - this.wordWrap = editorConfig.get('wordWrap', 'off') !== 'off'; - if (markdownEditorConfig && markdownEditorConfig['editor.wordWrap']) { - this.wordWrap = markdownEditorConfig['editor.wordWrap'] !== 'off'; - } - - this.previewFrontMatter = markdownConfig.get('previewFrontMatter', 'hide'); - this.scrollPreviewWithEditorSelection = !!markdownConfig.get('preview.scrollPreviewWithEditorSelection', true); - this.scrollEditorWithPreview = !!markdownConfig.get('preview.scrollEditorWithPreview', true); - this.lineBreaks = !!markdownConfig.get('preview.breaks', false); - this.doubleClickToSwitchToEditor = !!markdownConfig.get('preview.doubleClickToSwitchToEditor', true); - this.markEditorSelection = !!markdownConfig.get('preview.markEditorSelection', true); - - this.fontFamily = markdownConfig.get('preview.fontFamily', undefined); - this.fontSize = Math.max(8, +markdownConfig.get('preview.fontSize', NaN)); - this.lineHeight = Math.max(0.6, +markdownConfig.get('preview.lineHeight', NaN)); - - this.styles = markdownConfig.get('styles', []); - } - - public isEqualTo(otherConfig: MarkdownPreviewConfig) { - for (let key in this) { - if (this.hasOwnProperty(key) && key !== 'styles') { - if (this[key] !== otherConfig[key]) { - return false; - } - } - } - - // Check styles - if (this.styles.length !== otherConfig.styles.length) { - return false; - } - for (let i = 0; i < this.styles.length; ++i) { - if (this.styles[i] !== otherConfig.styles[i]) { - return false; - } - } - - return true; - } - - [key: string]: any; -} - -class PreviewConfigManager { - private previewConfigurationsForWorkspaces = new Map(); - - public loadAndCacheConfiguration( - resource: vscode.Uri - ) { - const config = MarkdownPreviewConfig.getConfigForResource(resource); - this.previewConfigurationsForWorkspaces.set(this.getKey(resource), config); - return config; - } - - public shouldUpdateConfiguration( - resource: vscode.Uri - ): boolean { - const key = this.getKey(resource); - const currentConfig = this.previewConfigurationsForWorkspaces.get(key); - const newConfig = MarkdownPreviewConfig.getConfigForResource(resource); - return (!currentConfig || !currentConfig.isEqualTo(newConfig)); - } - - private getKey( - resource: vscode.Uri - ): string { - const folder = vscode.workspace.getWorkspaceFolder(resource); - if (!folder) { - return ''; - } - return folder.uri.toString(); - } -} - -export class MDDocumentContentProvider implements vscode.TextDocumentContentProvider { - private _onDidChange = new vscode.EventEmitter(); - private _waiting: boolean = false; - private previewConfigurations = new PreviewConfigManager(); - - private extraStyles: Array = []; - private extraScripts: Array = []; - - constructor( - private engine: MarkdownEngine, - private context: vscode.ExtensionContext, - private cspArbiter: ContentSecurityPolicyArbiter, - private logger: Logger - ) { } - - public addScript(resource: vscode.Uri): void { - this.extraScripts.push(resource); - } - - public addStyle(resource: vscode.Uri): void { - this.extraStyles.push(resource); - } - - private getMediaPath(mediaFile: string): string { - return vscode.Uri.file(this.context.asAbsolutePath(path.join('media', mediaFile))).toString(); - } - - private fixHref(resource: vscode.Uri, href: string): string { - if (!href) { - return href; - } - - // Use href if it is already an URL - const hrefUri = vscode.Uri.parse(href); - if (['file', 'http', 'https'].indexOf(hrefUri.scheme) >= 0) { - return hrefUri.toString(); - } - - // Use href as file URI if it is absolute - if (path.isAbsolute(href)) { - return vscode.Uri.file(href).toString(); - } - - // use a workspace relative path if there is a workspace - let root = vscode.workspace.getWorkspaceFolder(resource); - if (root) { - return vscode.Uri.file(path.join(root.uri.fsPath, href)).toString(); - } - - // otherwise look relative to the markdown file - return vscode.Uri.file(path.join(path.dirname(resource.fsPath), href)).toString(); - } - - private computeCustomStyleSheetIncludes(resource: vscode.Uri, config: MarkdownPreviewConfig): string { - if (config.styles && Array.isArray(config.styles)) { - return config.styles.map(style => { - return ``; - }).join('\n'); - } - return ''; - } - - private getSettingsOverrideStyles(nonce: string, config: MarkdownPreviewConfig): string { - return ``; - } - - private getStyles(resource: vscode.Uri, nonce: string, config: MarkdownPreviewConfig): string { - const baseStyles = [ - this.getMediaPath('markdown.css'), - this.getMediaPath('tomorrow.css') - ].concat(this.extraStyles.map(resource => resource.toString())); - - return `${baseStyles.map(href => ``).join('\n')} - ${this.getSettingsOverrideStyles(nonce, config)} - ${this.computeCustomStyleSheetIncludes(resource, config)}`; - } - - private getScripts(nonce: string): string { - const scripts = [this.getMediaPath('main.js')].concat(this.extraScripts.map(resource => resource.toString())); - return scripts - .map(source => ``) - .join('\n'); - } - - public async provideTextDocumentContent(uri: vscode.Uri): Promise { - const sourceUri = vscode.Uri.parse(uri.query); - - let initialLine: number | undefined = undefined; - const editor = vscode.window.activeTextEditor; - if (editor && editor.document.uri.toString() === sourceUri.toString()) { - initialLine = editor.selection.active.line; - } - - const document = await vscode.workspace.openTextDocument(sourceUri); - const config = this.previewConfigurations.loadAndCacheConfiguration(sourceUri); - - const initialData = { - previewUri: uri.toString(), - source: sourceUri.toString(), - line: initialLine, - scrollPreviewWithEditorSelection: config.scrollPreviewWithEditorSelection, - scrollEditorWithPreview: config.scrollEditorWithPreview, - doubleClickToSwitchToEditor: config.doubleClickToSwitchToEditor, - disableSecurityWarnings: this.cspArbiter.shouldDisableSecurityWarnings() - }; - - this.logger.log('provideTextDocumentContent', initialData); - - // Content Security Policy - const nonce = new Date().getTime() + '' + new Date().getMilliseconds(); - const csp = this.getCspForResource(sourceUri, nonce); - - const body = await this.engine.render(sourceUri, config.previewFrontMatter === 'hide', document.getText()); - return ` - - - - ${csp} - - - - ${this.getStyles(sourceUri, nonce, config)} - - - - ${body} -
- ${this.getScripts(nonce)} - - `; - } - - public updateConfiguration() { - // update all generated md documents - for (const document of vscode.workspace.textDocuments) { - if (document.uri.scheme === 'markdown') { - const sourceUri = vscode.Uri.parse(document.uri.query); - if (this.previewConfigurations.shouldUpdateConfiguration(sourceUri)) { - this.update(document.uri); - } - } - } - } - - get onDidChange(): vscode.Event { - return this._onDidChange.event; - } - - public update(uri: vscode.Uri) { - if (!this._waiting) { - this._waiting = true; - setTimeout(() => { - this._waiting = false; - this._onDidChange.fire(uri); - }, 300); - } - } - - private getCspForResource(resource: vscode.Uri, nonce: string): string { - switch (this.cspArbiter.getSecurityLevelForResource(resource)) { - case MarkdownPreviewSecurityLevel.AllowInsecureContent: - return ``; - - case MarkdownPreviewSecurityLevel.AllowScriptsAndAllContent: - return ''; - - case MarkdownPreviewSecurityLevel.Strict: - default: - return ``; - } - } -} diff --git a/extensions/markdown/src/security.ts b/extensions/markdown/src/security.ts index fe2bd4c8be3..5f0898e4972 100644 --- a/extensions/markdown/src/security.ts +++ b/extensions/markdown/src/security.ts @@ -6,7 +6,7 @@ import * as vscode from 'vscode'; -import { getMarkdownUri, MDDocumentContentProvider } from './previewContentProvider'; +import { getMarkdownUri, MDDocumentContentProvider } from './features/previewContentProvider'; import * as nls from 'vscode-nls'; diff --git a/extensions/markdown/src/telemetryReporter.ts b/extensions/markdown/src/telemetryReporter.ts new file mode 100644 index 00000000000..d00dca386d1 --- /dev/null +++ b/extensions/markdown/src/telemetryReporter.ts @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------------------------- + * 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 { default as VSCodeTelemetryReporter } from 'vscode-extension-telemetry'; + +interface IPackageInfo { + name: string; + version: string; + aiKey: string; +} + +export interface TelemetryReporter { + dispose(): void; + sendTelemetryEvent(eventName: string, properties?: { + [key: string]: string; + }): void; +} + +const nullReporter = new class NullTelemetryReporter implements TelemetryReporter { + sendTelemetryEvent() { /** noop */ } + dispose() { /** noop */ } +}; + +class ExtensionReporter implements TelemetryReporter { + private readonly _reporter: VSCodeTelemetryReporter; + + constructor( + packageInfo: IPackageInfo + ) { + this._reporter = new VSCodeTelemetryReporter(packageInfo.name, packageInfo.version, packageInfo.aiKey); + } + sendTelemetryEvent(eventName: string, properties?: { + [key: string]: string; + }) { + this._reporter.sendTelemetryEvent(eventName, properties); + } + + dispose() { + this._reporter.dispose(); + } +} + +export function loadDefaultTelemetryReporter(): TelemetryReporter { + const packageInfo = getPackageInfo(); + return packageInfo ? new ExtensionReporter(packageInfo) : nullReporter; +} + +function getPackageInfo(): IPackageInfo | null { + const extention = vscode.extensions.getExtension('Microsoft.vscode-markdown'); + if (extention && extention.packageJSON) { + return { + name: extention.packageJSON.name, + version: extention.packageJSON.version, + aiKey: extention.packageJSON.aiKey + }; + } + return null; +} diff --git a/extensions/markdown/syntaxes/markdown.tmLanguage b/extensions/markdown/syntaxes/markdown.tmLanguage index a39b9d80b1e..26a48c15d3e 100644 --- a/extensions/markdown/syntaxes/markdown.tmLanguage +++ b/extensions/markdown/syntaxes/markdown.tmLanguage @@ -478,7 +478,7 @@ list_paragraph begin - (^|\G)(?=\S)(?![*+-]\s|[0-9]+\.\s) + (^|\G)(?=\S)(?![*+->]\s|[0-9]+\.\s) name meta.paragraph.markdown patterns @@ -497,7 +497,7 @@ while - (^|\G)(?!\s*$|#|[ ]{0,3}([-*_][ ]{2,}){3,}[ \t]*$\n?|>|[ ]{0,3}[*+-]|[ ]{0,3}[0-9]+\.) + (^|\G)(?!\s*$|#|[ ]{0,3}([-*_>][ ]{2,}){3,}[ \t]*$\n?|[ ]{0,3}[*+->]|[ ]{0,3}[0-9]+\.) lists @@ -522,11 +522,11 @@ include - #list_paragraph + #block include - #block + #list_paragraph while @@ -549,11 +549,11 @@ include - #list_paragraph + #block include - #block + #list_paragraph while diff --git a/extensions/markdown/syntaxes/markdown.tmLanguage.base b/extensions/markdown/syntaxes/markdown.tmLanguage.base index b24197713a3..ca8b920a22f 100644 --- a/extensions/markdown/syntaxes/markdown.tmLanguage.base +++ b/extensions/markdown/syntaxes/markdown.tmLanguage.base @@ -303,7 +303,7 @@ list_paragraph begin - (^|\G)(?=\S)(?![*+-]\s|[0-9]+\.\s) + (^|\G)(?=\S)(?![*+->]\s|[0-9]+\.\s) name meta.paragraph.markdown patterns @@ -322,7 +322,7 @@ while - (^|\G)(?!\s*$|#|[ ]{0,3}([-*_][ ]{2,}){3,}[ \t]*$\n?|>|[ ]{0,3}[*+-]|[ ]{0,3}[0-9]+\.) + (^|\G)(?!\s*$|#|[ ]{0,3}([-*_>][ ]{2,}){3,}[ \t]*$\n?|[ ]{0,3}[*+->]|[ ]{0,3}[0-9]+\.) lists @@ -347,11 +347,11 @@ include - #list_paragraph + #block include - #block + #list_paragraph while @@ -374,11 +374,11 @@ include - #list_paragraph + #block include - #block + #list_paragraph while diff --git a/extensions/markdown/test/colorize-fixtures/test.md b/extensions/markdown/test/colorize-fixtures/test.md index 5a003c7b7f0..28f3590536e 100644 --- a/extensions/markdown/test/colorize-fixtures/test.md +++ b/extensions/markdown/test/colorize-fixtures/test.md @@ -47,6 +47,7 @@ in_words_are ignored. >> And, they can be nested 1. A numbered list + > Block quotes in list 2. Which is numbered 3. With periods and a space diff --git a/extensions/markdown/test/colorize-results/test_md.json b/extensions/markdown/test/colorize-results/test_md.json index c07d8316525..01b3aac1707 100644 --- a/extensions/markdown/test/colorize-results/test_md.json +++ b/extensions/markdown/test/colorize-results/test_md.json @@ -1792,6 +1792,50 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": " ", + "t": "text.html.markdown markup.list.numbered.markdown", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ">", + "t": "text.html.markdown markup.list.numbered.markdown markup.quote.markdown beginning.punctuation.definition.quote.markdown", + "r": { + "dark_plus": "beginning.punctuation.definition.quote.markdown: #608B4E", + "light_plus": "beginning.punctuation.definition.quote.markdown: #0451A5", + "dark_vs": "beginning.punctuation.definition.quote.markdown: #608B4E", + "light_vs": "beginning.punctuation.definition.quote.markdown: #0451A5", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "text.html.markdown markup.list.numbered.markdown markup.quote.markdown", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "Block quotes in list", + "t": "text.html.markdown markup.list.numbered.markdown markup.quote.markdown meta.paragraph.markdown", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "2.", "t": "text.html.markdown markup.list.numbered.markdown beginning.punctuation.definition.list.markdown", diff --git a/extensions/merge-conflict/package.json b/extensions/merge-conflict/package.json index 38a33087345..02ca68b911e 100644 --- a/extensions/merge-conflict/package.json +++ b/extensions/merge-conflict/package.json @@ -21,6 +21,11 @@ }, "contributes": { "commands": [ + { + "category": "%command.category%", + "title": "%command.accept.all-current%", + "command": "merge-conflict.accept.all-current" + }, { "category": "%command.category%", "title": "%command.accept.all-incoming%", diff --git a/extensions/merge-conflict/package.nls.json b/extensions/merge-conflict/package.nls.json index b2927ca3431..1df5beb9e71 100644 --- a/extensions/merge-conflict/package.nls.json +++ b/extensions/merge-conflict/package.nls.json @@ -1,5 +1,6 @@ { "command.category": "Merge Conflict", + "command.accept.all-current": "Accept All Current", "command.accept.all-incoming": "Accept All Incoming", "command.accept.all-both": "Accept All Both", "command.accept.current": "Accept Current", diff --git a/extensions/ms-vscode.node-debug/OSSREADME.json b/extensions/ms-vscode.node-debug/OSSREADME.json index dd57c88e805..215c33cbe0f 100644 --- a/extensions/ms-vscode.node-debug/OSSREADME.json +++ b/extensions/ms-vscode.node-debug/OSSREADME.json @@ -1,129 +1,16 @@ -// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: -[ -{ - "name": "agent-base", - "repositoryURL": "https://github.com/TooTallNate/node-agent-base", - "version": "1.0.2", +[{ + "isLicense": true, + "name": "@types/source-map", + "repositoryURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", "license": "MIT", - "isProd": true -}, -{ - "name": "balanced-match", - "repositoryURL": "https://github.com/juliangruber/balanced-match", - "version": "1.0.0", - "license": "MIT", - "isProd": true -}, -{ - "name": "brace-expansion", - "repositoryURL": "https://github.com/juliangruber/brace-expansion", - "version": "1.1.8", - "license": "MIT", - "isProd": true -}, -{ - "name": "concat-map", - "repositoryURL": "https://github.com/substack/node-concat-map", - "version": "0.0.1", - "license": "MIT", - "isProd": true -}, -{ - "name": "debug", - "repositoryURL": "https://github.com/visionmedia/debug", - "version": "2.6.8", - "license": "MIT", - "isProd": true -}, -{ - "name": "extend", - "repositoryURL": "https://github.com/justmoon/node-extend", - "version": "3.0.1", - "license": "MIT", - "isProd": true -}, -{ - "name": "fs.realpath", - "repositoryURL": "https://github.com/isaacs/fs.realpath", - "version": "1.0.0", - "license": "ISC", - "isProd": true -}, -{ - "name": "glob", - "repositoryURL": "https://github.com/isaacs/node-glob", - "version": "7.1.2", - "license": "ISC", - "isProd": true -}, -{ - "name": "http-proxy-agent", - "repositoryURL": "https://github.com/TooTallNate/node-http-proxy-agent", - "version": "0.2.7", - "license": "MIT", - "isProd": true -}, -{ - "name": "https-proxy-agent", - "repositoryURL": "https://github.com/TooTallNate/node-https-proxy-agent", - "version": "0.3.6", - "license": "MIT", - "isProd": true -}, -{ - "name": "inflight", - "repositoryURL": "https://github.com/npm/inflight", - "version": "1.0.6", - "license": "ISC", - "isProd": true -}, -{ - "name": "inherits", - "repositoryURL": "https://github.com/isaacs/inherits", - "version": "2.0.3", - "license": "ISC", - "isProd": true -}, -{ - "name": "minimatch", - "repositoryURL": "https://github.com/isaacs/minimatch", - "version": "3.0.4", - "license": "ISC", - "isProd": true -}, -{ - "name": "ms", - "repositoryURL": "https://github.com/rauchg/ms.js", - "version": "2.0.0", - "license": "MIT", - "isProd": true -}, -{ - "name": "once", - "repositoryURL": "https://github.com/isaacs/once", - "version": "1.4.0", - "license": "ISC", - "isProd": true -}, -{ - "name": "path-is-absolute", - "repositoryURL": "https://github.com/sindresorhus/path-is-absolute", - "version": "1.0.1", - "license": "MIT", - "isProd": true -}, -{ - "name": "source-map", - "repositoryURL": "https://github.com/mozilla/source-map", - "version": "0.5.6", - "license": "BSD-3-Clause", - "isProd": true -}, -{ - "name": "wrappy", - "repositoryURL": "https://github.com/npm/wrappy", - "version": "1.0.2", - "license": "ISC", - "isProd": true -} -] \ No newline at end of file + "licenseDetail": [ + "This project is licensed under the MIT license.", + "Copyrights are respective of each contributor listed at the beginning of each definition file.", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + ] +}] diff --git a/extensions/ms-vscode.node-debug/package-lock.json b/extensions/ms-vscode.node-debug/package-lock.json new file mode 100644 index 00000000000..82260da1aa1 --- /dev/null +++ b/extensions/ms-vscode.node-debug/package-lock.json @@ -0,0 +1,7077 @@ +{ + "name": "node-debug", + "version": "1.19.2", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@gulp-sourcemaps/identity-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.1.tgz", + "integrity": "sha1-z6I7xYQPkQTOMqZedNt+epdLvuE=", + "dev": true, + "requires": { + "acorn": "5.2.1", + "css": "2.2.1", + "normalize-path": "2.1.1", + "source-map": "0.5.7", + "through2": "2.0.3" + }, + "dependencies": { + "acorn": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz", + "integrity": "sha512-jG0u7c4Ly+3QkkW18V+NRDN+4bWHdln30NL1ZL2AvFZZmQe/BfopYCtghCKKVBUSetZ4QKcyA0pY6/4Gw8Pv8w==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@gulp-sourcemaps/map-sources": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", + "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=", + "dev": true, + "requires": { + "normalize-path": "2.1.1", + "through2": "2.0.3" + } + }, + "@types/mocha": { + "version": "2.2.42", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.42.tgz", + "integrity": "sha512-b6gVDoxEbAQGwbV7gSzeFw/hy3/eEAokztktdzl4bHvGgb9K5zW4mVQDlVYch2w31m8t/J7L2iqhQvz3r5edCQ==", + "dev": true + }, + "@types/node": { + "version": "6.0.52", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.52.tgz", + "integrity": "sha1-GsOpm0IyD55GNILyWvTCNZRzqqY=", + "dev": true + }, + "@types/source-map": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@types/source-map/-/source-map-0.5.1.tgz", + "integrity": "sha512-/GVAjL1Y8puvZab63n8tsuBiYwZt1bApMdx58/msQ9ID5T05ov+wm/ZV1DvYC/DKKEygpTJViqQvkh5Rhrl4CA==", + "dev": true + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + }, + "agent-base": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-1.0.2.tgz", + "integrity": "sha1-aJDT+yFwBLYrcPiSjg+uX4lSpwY=" + }, + "ajv": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.4.0.tgz", + "integrity": "sha1-MtHPCNvIDEMvQm8S4QslEfa0ZHQ=", + "dev": true, + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "requires": { + "string-width": "2.1.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "dev": true, + "requires": { + "sprintf-js": "1.0.3" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-slice": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz", + "integrity": "sha1-5zA08A3MH0CHYAj9IP6ud71LfC8=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "1.0.3" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true + }, + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/atob/-/atob-1.1.3.tgz", + "integrity": "sha1-lfE2KbEsOlGl0hWr3OKqnzL4B3M=", + "dev": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "boxen": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.2.2.tgz", + "integrity": "sha1-Px1AMsMP/qnUsCwyLq8up0HcvOU=", + "dev": true, + "requires": { + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "2.3.0", + "cli-boxes": "1.0.0", + "string-width": "2.1.1", + "term-size": "1.2.0", + "widest-line": "1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "capture-stack-trace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", + "dev": true + }, + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "cheerio": { + "version": "1.0.0-rc.2", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", + "integrity": "sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=", + "dev": true, + "requires": { + "css-select": "1.2.0", + "dom-serializer": "0.1.0", + "entities": "1.1.1", + "htmlparser2": "3.9.2", + "lodash": "4.17.4", + "parse5": "3.0.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + } + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.1.3", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + } + }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "clone": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", + "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "cloneable-readable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.0.0.tgz", + "integrity": "sha1-pikNQT8hemEjL5XkWP84QYz7ARc=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "process-nextick-args": "1.0.7", + "through2": "2.0.3" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "configstore": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", + "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", + "dev": true, + "requires": { + "dot-prop": "4.2.0", + "graceful-fs": "4.1.11", + "make-dir": "1.1.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "convert-source-map": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "1.0.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "dev": true + }, + "css": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.1.tgz", + "integrity": "sha1-c6TIHehdtmTU7mdPfUcIXjstVdw=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "source-map": "0.1.43", + "source-map-resolve": "0.3.1", + "urix": "0.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "1.0.0", + "css-what": "2.1.0", + "domutils": "1.5.1", + "nth-check": "1.0.1" + } + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", + "dev": true + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "0.10.35" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "dateformat": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "debug-fabulous": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-0.2.1.tgz", + "integrity": "sha512-u0TV6HcfLsZ03xLBhdhSViQMldaiQ2o+8/nSILaXkuNSWvxkx66vYJUAam0Eu7gAilJRX/69J4kKdqajQPaPyw==", + "dev": true, + "requires": { + "debug": "3.1.0", + "memoizee": "0.4.11", + "object-assign": "4.1.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-assign": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz", + "integrity": "sha1-sJJ0O+hCfcYh6gBnzex+cN0Z83s=", + "dev": true, + "requires": { + "is-obj": "1.0.1" + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "dev": true + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "1.0.3" + } + }, + "del": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "dev": true, + "requires": { + "globby": "6.1.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "p-map": "1.2.0", + "pify": "3.0.0", + "rimraf": "2.6.2" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "denodeify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", + "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=", + "dev": true + }, + "deprecated": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", + "dev": true + }, + "detect-file": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz", + "integrity": "sha1-STXe39lIhkjgBrASlWbpOGcR6mM=", + "dev": true, + "requires": { + "fs-exists-sync": "0.1.0" + } + }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true + }, + "diff": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", + "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", + "dev": true + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "dev": true, + "requires": { + "domelementtype": "1.1.3", + "entities": "1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", + "dev": true + }, + "domhandler": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", + "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", + "dev": true, + "requires": { + "domelementtype": "1.3.0" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "1.0.1" + } + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true, + "requires": { + "readable-stream": "1.1.14" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "duplexify": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", + "integrity": "sha512-j5goxHTwVED1Fpe5hh3q9R93Kip0Bg2KVAt4f8CEYM3UEwYcPSvWbXaUQOzdX/HtiNomipv+gU7ASQPDbV7pGQ==", + "dev": true, + "requires": { + "end-of-stream": "1.4.0", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "stream-shift": "1.0.0" + }, + "dependencies": { + "end-of-stream": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", + "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", + "dev": true, + "requires": { + "once": "1.4.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "end-of-stream": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "dev": true, + "requires": { + "once": "1.3.3" + }, + "dependencies": { + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + } + } + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", + "dev": true + }, + "es5-ext": { + "version": "0.10.35", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.35.tgz", + "integrity": "sha1-GO6FjOajxFx9eekcFfzKnsVoSU8=", + "dev": true, + "requires": { + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.35", + "es6-symbol": "3.1.1" + } + }, + "es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", + "dev": true + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.35" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.35", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.35" + } + }, + "event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "dev": true, + "requires": { + "duplexer": "0.1.1", + "from": "0.1.7", + "map-stream": "0.1.0", + "pause-stream": "0.0.11", + "split": "0.3.3", + "stream-combiner": "0.0.4", + "through": "2.3.8" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "2.2.3" + } + }, + "expand-tilde": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", + "dev": true, + "requires": { + "os-homedir": "1.0.2" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fancy-log": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", + "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "time-stamp": "1.1.0" + } + }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fd-slicer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", + "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "dev": true, + "requires": { + "pend": "1.2.0" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", + "dev": true + }, + "findup-sync": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz", + "integrity": "sha1-QAQ5Kee8YK3wt/SCfExudaDeyhI=", + "dev": true, + "requires": { + "detect-file": "0.1.0", + "is-glob": "2.0.1", + "micromatch": "2.3.11", + "resolve-dir": "0.1.1" + } + }, + "fined": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", + "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", + "dev": true, + "requires": { + "expand-tilde": "2.0.2", + "is-plain-object": "2.0.4", + "object.defaults": "1.1.0", + "object.pick": "1.3.0", + "parse-filepath": "1.0.1" + }, + "dependencies": { + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "1.0.1" + } + } + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", + "dev": true + }, + "flagged-respawn": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz", + "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "fs-exists-sync": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.8.0", + "node-pre-gyp": "0.6.39" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", + "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", + "dev": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "aproba": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz", + "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=", + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=", + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.2.tgz", + "integrity": "sha1-ca1dIEvxempsqPRQxhRUBm70YeE=", + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", + "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "dev": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", + "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", + "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", + "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=", + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", + "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", + "dev": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz", + "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==", + "dev": true, + "optional": true, + "requires": { + "detect-libc": "1.0.2", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.0.tgz", + "integrity": "sha512-ocolIkZYZt8UveuiDS0yAkkIjid1o7lPG8cYm05yNYzBn8ykQtaiPMEGp8fY9tKdDgm8okpdKzkvu1y9hUYugA==", + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", + "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", + "integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=", + "dev": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=", + "dev": true + }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.0.tgz", + "integrity": "sha1-/yo+T9BEl1Vf7Zezmg/YL6+zozw=", + "dev": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", + "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.0.tgz", + "integrity": "sha1-I74tf2cagzk3bL2wuP4/3r8xeYQ=", + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "dev": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", + "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=", + "dev": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", + "dev": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + } + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "gaze": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "dev": true, + "requires": { + "globule": "0.1.0" + } + }, + "generate-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", + "dev": true + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "dev": true, + "requires": { + "is-property": "1.0.2" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "glob-stream": { + "version": "3.1.18", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "dev": true, + "requires": { + "glob": "4.5.3", + "glob2base": "0.0.12", + "minimatch": "2.0.10", + "ordered-read-streams": "0.1.0", + "through2": "0.6.5", + "unique-stream": "1.0.0" + }, + "dependencies": { + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "dev": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.4.0" + } + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "dev": true, + "requires": { + "gaze": "0.5.2" + } + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "dev": true, + "requires": { + "find-index": "0.1.1" + } + }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "dev": true, + "requires": { + "ini": "1.3.5" + } + }, + "global-modules": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", + "dev": true, + "requires": { + "global-prefix": "0.1.5", + "is-windows": "0.2.0" + } + }, + "global-prefix": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", + "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", + "dev": true, + "requires": { + "homedir-polyfill": "1.0.1", + "ini": "1.3.5", + "is-windows": "0.2.0", + "which": "1.3.0" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "globule": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "dev": true, + "requires": { + "glob": "3.1.21", + "lodash": "1.0.2", + "minimatch": "0.2.14" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, + "requires": { + "graceful-fs": "1.2.3", + "inherits": "1.0.2", + "minimatch": "0.2.14" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + } + } + }, + "glogg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", + "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", + "dev": true, + "requires": { + "sparkles": "1.0.0" + } + }, + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.0", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" + } + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "dev": true, + "requires": { + "natives": "1.1.0" + } + }, + "growl": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "dev": true + }, + "gulp": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "dev": true, + "requires": { + "archy": "1.0.0", + "chalk": "1.1.3", + "deprecated": "0.0.1", + "gulp-util": "3.0.8", + "interpret": "1.0.4", + "liftoff": "2.3.0", + "minimist": "1.2.0", + "orchestrator": "0.3.8", + "pretty-hrtime": "1.0.3", + "semver": "4.3.6", + "tildify": "1.2.0", + "v8flags": "2.1.1", + "vinyl-fs": "0.3.14" + } + }, + "gulp-chmod": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/gulp-chmod/-/gulp-chmod-2.0.0.tgz", + "integrity": "sha1-AMOQuSigeZslGsz2MaoJ4BzGKZw=", + "dev": true, + "requires": { + "deep-assign": "1.0.0", + "stat-mode": "0.2.2", + "through2": "2.0.3" + } + }, + "gulp-filter": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.0.1.tgz", + "integrity": "sha512-5olRzAhFdXB2klCu1lnazP65aO9YdA/5WfC9VdInIc8PrUeDIoZfaA3Edb0yUBGhVdHv4eHKL9Fg5tUoEJ9z5A==", + "dev": true, + "requires": { + "gulp-util": "3.0.8", + "multimatch": "2.1.0", + "streamfilter": "1.0.5" + } + }, + "gulp-gunzip": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulp-gunzip/-/gulp-gunzip-1.0.0.tgz", + "integrity": "sha1-FbdBFF6Dqcb1CIYkG1fMWHHxUak=", + "dev": true, + "requires": { + "through2": "0.6.5", + "vinyl": "0.4.6" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "0.2.0", + "clone-stats": "0.0.1" + } + } + } + }, + "gulp-remote-src": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/gulp-remote-src/-/gulp-remote-src-0.4.3.tgz", + "integrity": "sha1-VyjP1kNDPdSEXd7wlp8PlxoqtKE=", + "dev": true, + "requires": { + "event-stream": "3.3.4", + "node.extend": "1.1.6", + "request": "2.79.0", + "through2": "2.0.3", + "vinyl": "2.0.2" + }, + "dependencies": { + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "request": { + "version": "2.79.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", + "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", + "dev": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.11.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "2.0.6", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "qs": "6.3.2", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.4.3", + "uuid": "3.1.0" + } + }, + "vinyl": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.0.2.tgz", + "integrity": "sha1-CjcT2NTpIhxY8QyhbAEWyeJe2nw=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-buffer": "1.0.0", + "clone-stats": "1.0.0", + "cloneable-readable": "1.0.0", + "is-stream": "1.1.0", + "remove-trailing-separator": "1.1.0", + "replace-ext": "1.0.0" + } + } + } + }, + "gulp-sourcemaps": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-2.6.1.tgz", + "integrity": "sha512-1qHCI3hdmsMdq/SUotxwUh/L8YzlI6J9zQ5ifNOtx4Y6KV5y5sGuORv1KZzWhuKtz/mXNh5xLESUtwC4EndCjA==", + "dev": true, + "requires": { + "@gulp-sourcemaps/identity-map": "1.0.1", + "@gulp-sourcemaps/map-sources": "1.0.0", + "acorn": "4.0.13", + "convert-source-map": "1.5.0", + "css": "2.2.1", + "debug-fabulous": "0.2.1", + "detect-newline": "2.1.0", + "graceful-fs": "4.1.11", + "source-map": "0.6.1", + "strip-bom-string": "1.0.0", + "through2": "2.0.3", + "vinyl": "1.2.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "gulp-symdest": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/gulp-symdest/-/gulp-symdest-1.1.0.tgz", + "integrity": "sha1-wWUyBzLRks5W/ZQnH/oSMjS/KuA=", + "dev": true, + "requires": { + "event-stream": "3.3.4", + "mkdirp": "0.5.1", + "queue": "3.1.0", + "vinyl-fs": "2.4.4" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + } + }, + "glob-stream": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", + "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "dev": true, + "requires": { + "extend": "3.0.1", + "glob": "5.0.15", + "glob-parent": "3.1.0", + "micromatch": "2.3.11", + "ordered-read-streams": "0.3.0", + "through2": "0.6.5", + "to-absolute-glob": "0.1.1", + "unique-stream": "2.2.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "gulp-sourcemaps": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", + "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", + "dev": true, + "requires": { + "convert-source-map": "1.5.0", + "graceful-fs": "4.1.11", + "strip-bom": "2.0.0", + "through2": "2.0.3", + "vinyl": "1.2.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "ordered-read-streams": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", + "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", + "dev": true, + "requires": { + "is-stream": "1.1.0", + "readable-stream": "2.3.3" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "unique-stream": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", + "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", + "dev": true, + "requires": { + "json-stable-stringify": "1.0.1", + "through2-filter": "2.0.0" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", + "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", + "dev": true, + "requires": { + "duplexify": "3.5.1", + "glob-stream": "5.3.5", + "graceful-fs": "4.1.11", + "gulp-sourcemaps": "1.6.0", + "is-valid-glob": "0.3.0", + "lazystream": "1.0.0", + "lodash.isequal": "4.5.0", + "merge-stream": "1.0.1", + "mkdirp": "0.5.1", + "object-assign": "4.1.1", + "readable-stream": "2.3.3", + "strip-bom": "2.0.0", + "strip-bom-stream": "1.0.0", + "through2": "2.0.3", + "through2-filter": "2.0.0", + "vali-date": "1.0.0", + "vinyl": "1.2.0" + } + } + } + }, + "gulp-tsb": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/gulp-tsb/-/gulp-tsb-2.0.4.tgz", + "integrity": "sha1-CymAktTf1OXP2AZ57Uwdk7/bpko=", + "dev": true, + "requires": { + "gulp-util": "3.0.8", + "through": "2.3.8", + "vinyl": "0.4.6" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "0.2.0", + "clone-stats": "0.0.1" + } + } + } + }, + "gulp-tslint": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/gulp-tslint/-/gulp-tslint-8.1.2.tgz", + "integrity": "sha512-0RNGqbp2TKPdbG+sWU3mNMXEMuF/noY1KS4+jd5lOStkvuFINkFL29dHX3IT1u+vVFD4Glwf+lkcdR2QMVNMzA==", + "dev": true, + "requires": { + "gulp-util": "3.0.8", + "map-stream": "0.0.7", + "through": "2.3.8" + }, + "dependencies": { + "map-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", + "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=", + "dev": true + } + } + }, + "gulp-typescript": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/gulp-typescript/-/gulp-typescript-3.2.2.tgz", + "integrity": "sha1-t+Xh08s193LlPmBAJmAYJuK+d/w=", + "dev": true, + "requires": { + "gulp-util": "3.0.8", + "source-map": "0.5.7", + "through2": "2.0.3", + "vinyl-fs": "2.4.4" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + } + }, + "glob-stream": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", + "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "dev": true, + "requires": { + "extend": "3.0.1", + "glob": "5.0.15", + "glob-parent": "3.1.0", + "micromatch": "2.3.11", + "ordered-read-streams": "0.3.0", + "through2": "0.6.5", + "to-absolute-glob": "0.1.1", + "unique-stream": "2.2.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "gulp-sourcemaps": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", + "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", + "dev": true, + "requires": { + "convert-source-map": "1.5.0", + "graceful-fs": "4.1.11", + "strip-bom": "2.0.0", + "through2": "2.0.3", + "vinyl": "1.2.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "ordered-read-streams": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", + "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", + "dev": true, + "requires": { + "is-stream": "1.1.0", + "readable-stream": "2.3.3" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "unique-stream": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", + "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", + "dev": true, + "requires": { + "json-stable-stringify": "1.0.1", + "through2-filter": "2.0.0" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", + "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", + "dev": true, + "requires": { + "duplexify": "3.5.1", + "glob-stream": "5.3.5", + "graceful-fs": "4.1.11", + "gulp-sourcemaps": "1.6.0", + "is-valid-glob": "0.3.0", + "lazystream": "1.0.0", + "lodash.isequal": "4.5.0", + "merge-stream": "1.0.1", + "mkdirp": "0.5.1", + "object-assign": "4.1.1", + "readable-stream": "2.3.3", + "strip-bom": "2.0.0", + "strip-bom-stream": "1.0.0", + "through2": "2.0.3", + "through2-filter": "2.0.0", + "vali-date": "1.0.0", + "vinyl": "1.2.0" + } + } + } + }, + "gulp-uglify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-2.0.0.tgz", + "integrity": "sha1-y+Sq5P4La912AzW8RvIA//aZxK8=", + "dev": true, + "requires": { + "gulplog": "1.0.0", + "has-gulplog": "0.1.0", + "lodash": "4.17.4", + "make-error-cause": "1.2.2", + "through2": "2.0.3", + "uglify-js": "2.7.0", + "uglify-save-license": "0.4.1", + "vinyl-sourcemaps-apply": "0.2.1" + }, + "dependencies": { + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + } + } + }, + "gulp-untar": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/gulp-untar/-/gulp-untar-0.0.6.tgz", + "integrity": "sha1-1r3v3n6ajgVMnxYjhaB4LEvnQAA=", + "dev": true, + "requires": { + "event-stream": "3.3.4", + "gulp-util": "3.0.8", + "streamifier": "0.1.1", + "tar": "2.2.1", + "through2": "2.0.3" + } + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "dev": true, + "requires": { + "array-differ": "1.0.0", + "array-uniq": "1.0.3", + "beeper": "1.1.1", + "chalk": "1.1.3", + "dateformat": "2.2.0", + "fancy-log": "1.3.0", + "gulplog": "1.0.0", + "has-gulplog": "0.1.0", + "lodash._reescape": "3.0.0", + "lodash._reevaluate": "3.0.0", + "lodash._reinterpolate": "3.0.0", + "lodash.template": "3.6.2", + "minimist": "1.2.0", + "multipipe": "0.1.2", + "object-assign": "3.0.0", + "replace-ext": "0.0.1", + "through2": "2.0.3", + "vinyl": "0.5.3" + }, + "dependencies": { + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + } + } + }, + "gulp-vinyl-zip": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.0.tgz", + "integrity": "sha1-JOQGhdwFtxSZlSRQmeBZAmO+ja0=", + "dev": true, + "requires": { + "event-stream": "3.3.4", + "queue": "4.4.2", + "through2": "2.0.3", + "vinyl": "2.1.0", + "vinyl-fs": "2.4.4", + "yauzl": "2.9.1", + "yazl": "2.4.3" + }, + "dependencies": { + "clone": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", + "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + } + }, + "glob-stream": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", + "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "dev": true, + "requires": { + "extend": "3.0.1", + "glob": "5.0.15", + "glob-parent": "3.1.0", + "micromatch": "2.3.11", + "ordered-read-streams": "0.3.0", + "through2": "0.6.5", + "to-absolute-glob": "0.1.1", + "unique-stream": "2.2.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "gulp-sourcemaps": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", + "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", + "dev": true, + "requires": { + "convert-source-map": "1.5.0", + "graceful-fs": "4.1.11", + "strip-bom": "2.0.0", + "through2": "2.0.3", + "vinyl": "1.2.0" + }, + "dependencies": { + "clone": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", + "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "ordered-read-streams": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", + "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", + "dev": true, + "requires": { + "is-stream": "1.1.0", + "readable-stream": "2.3.3" + } + }, + "queue": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/queue/-/queue-4.4.2.tgz", + "integrity": "sha512-fSMRXbwhMwipcDZ08enW2vl+YDmAmhcNcr43sCJL8DIg+CFOsoRLG23ctxA+fwNk1w55SePSiS7oqQQSgQoVJQ==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "unique-stream": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", + "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", + "dev": true, + "requires": { + "json-stable-stringify": "1.0.1", + "through2-filter": "2.0.0" + } + }, + "vinyl": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", + "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", + "dev": true, + "requires": { + "clone": "2.1.1", + "clone-buffer": "1.0.0", + "clone-stats": "1.0.0", + "cloneable-readable": "1.0.0", + "remove-trailing-separator": "1.1.0", + "replace-ext": "1.0.0" + } + }, + "vinyl-fs": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", + "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", + "dev": true, + "requires": { + "duplexify": "3.5.1", + "glob-stream": "5.3.5", + "graceful-fs": "4.1.11", + "gulp-sourcemaps": "1.6.0", + "is-valid-glob": "0.3.0", + "lazystream": "1.0.0", + "lodash.isequal": "4.5.0", + "merge-stream": "1.0.1", + "mkdirp": "0.5.1", + "object-assign": "4.1.1", + "readable-stream": "2.3.3", + "strip-bom": "2.0.0", + "strip-bom-stream": "1.0.0", + "through2": "2.0.3", + "through2-filter": "2.0.0", + "vali-date": "1.0.0", + "vinyl": "1.2.0" + }, + "dependencies": { + "clone": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", + "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + } + } + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "commander": "2.11.0", + "is-my-json-valid": "2.16.1", + "pinkie-promise": "2.0.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true, + "requires": { + "sparkles": "1.0.0" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "dev": true, + "requires": { + "parse-passwd": "1.0.0" + } + }, + "htmlparser2": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", + "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", + "dev": true, + "requires": { + "domelementtype": "1.3.0", + "domhandler": "2.4.1", + "domutils": "1.5.1", + "entities": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.3" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "http-proxy-agent": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-0.2.7.tgz", + "integrity": "sha1-4X/aZfCQLZUs55IeYsf/iGJlWl4=", + "requires": { + "agent-base": "1.0.2", + "debug": "2.6.9", + "extend": "3.0.1" + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "https-proxy-agent": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-0.3.6.tgz", + "integrity": "sha1-cT+jjl01P1DrFKNC/r4pAz7RYZs=", + "requires": { + "agent-base": "1.0.2", + "debug": "2.6.9", + "extend": "3.0.1" + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "dev": true + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "interpret": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.4.tgz", + "integrity": "sha1-ggzdWIuGj/sZGoCVBtbJyPISsbA=", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", + "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=", + "dev": true + }, + "is-absolute": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "dev": true, + "requires": { + "is-relative": "0.2.1", + "is-windows": "0.2.0" + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "1.11.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "dev": true, + "requires": { + "global-dirs": "0.1.1", + "is-path-inside": "1.0.0" + } + }, + "is-my-json-valid": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", + "integrity": "sha512-ochPsqWS1WXj8ZnMIV0vnNXooaMhp7cyL4FMSIPKTtnV0Ha/T19G2b9kkhcNsabV9bxYkze7/aLZJb/bYuFduQ==", + "dev": true, + "requires": { + "generate-function": "2.0.0", + "generate-object-property": "1.2.0", + "jsonpointer": "4.0.1", + "xtend": "4.0.1" + } + }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true, + "requires": { + "is-path-inside": "1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", + "dev": true + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, + "is-relative": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "dev": true, + "requires": { + "is-unc-path": "0.1.2" + } + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-unc-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "dev": true, + "requires": { + "unc-path-regex": "0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", + "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=", + "dev": true + }, + "is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true, + "requires": { + "package-json": "4.0.1" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "2.3.3" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, + "liftoff": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", + "integrity": "sha1-qY8v9nGD2Lp8+soQVIvX/wVQs4U=", + "dev": true, + "requires": { + "extend": "3.0.1", + "findup-sync": "0.4.3", + "fined": "1.1.0", + "flagged-respawn": "0.3.2", + "lodash.isplainobject": "4.0.6", + "lodash.isstring": "4.0.1", + "lodash.mapvalues": "4.6.0", + "rechoir": "0.6.2", + "resolve": "1.5.0" + } + }, + "linkify-it": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.0.3.tgz", + "integrity": "sha1-2UpGSPmxwXnWT6lykSaL22zpQ08=", + "dev": true, + "requires": { + "uc.micro": "1.0.3" + } + }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", + "dev": true + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "dev": true, + "requires": { + "lodash._basecopy": "3.0.1", + "lodash.keys": "3.1.2" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", + "dev": true + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", + "dev": true + }, + "lodash._bindcallback": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", + "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", + "dev": true + }, + "lodash._createassigner": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", + "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", + "dev": true, + "requires": { + "lodash._bindcallback": "3.0.1", + "lodash._isiterateecall": "3.0.9", + "lodash.restparam": "3.6.1" + } + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", + "dev": true + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, + "lodash.assign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", + "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", + "dev": true, + "requires": { + "lodash._baseassign": "3.2.0", + "lodash._createassigner": "3.1.1", + "lodash.keys": "3.1.2" + } + }, + "lodash.defaults": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-3.1.2.tgz", + "integrity": "sha1-xzCLGNv4vJNy1wGnNJPGEZK9Liw=", + "dev": true, + "requires": { + "lodash.assign": "3.2.0", + "lodash.restparam": "3.6.1" + } + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dev": true, + "requires": { + "lodash._root": "3.0.1" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "lodash.mapvalues": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", + "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", + "dev": true + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "dev": true, + "requires": { + "lodash._basecopy": "3.0.1", + "lodash._basetostring": "3.0.1", + "lodash._basevalues": "3.0.0", + "lodash._isiterateecall": "3.0.9", + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0", + "lodash.keys": "3.1.2", + "lodash.restparam": "3.6.1", + "lodash.templatesettings": "3.1.1" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "dev": true, + "requires": { + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0" + } + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "dev": true, + "requires": { + "es5-ext": "0.10.35" + } + }, + "make-dir": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz", + "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==", + "dev": true, + "requires": { + "pify": "3.0.0" + } + }, + "make-error": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.0.tgz", + "integrity": "sha1-Uq06M5zPEM5itAQLcI/nByRLi5Y=", + "dev": true + }, + "make-error-cause": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz", + "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=", + "dev": true, + "requires": { + "make-error": "1.3.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", + "dev": true + }, + "markdown-it": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.0.tgz", + "integrity": "sha512-tNuOCCfunY5v5uhcO2AUMArvKAyKMygX8tfup/JrgnsDqcCATQsAExBq7o5Ml9iMmO82bk6jYNLj6khcrl0JGA==", + "dev": true, + "requires": { + "argparse": "1.0.9", + "entities": "1.1.1", + "linkify-it": "2.0.3", + "mdurl": "1.0.1", + "uc.micro": "1.0.3" + } + }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, + "memoizee": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.11.tgz", + "integrity": "sha1-vemBdmPJ5A/bKk6hw2cpYIeujI8=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.35", + "es6-weak-map": "2.0.2", + "event-emitter": "0.3.5", + "is-promise": "2.1.0", + "lru-queue": "0.1.0", + "next-tick": "1.0.0", + "timers-ext": "0.1.2" + } + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "2.3.3" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "dev": true + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=", + "dev": true + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "dev": true, + "requires": { + "mime-db": "1.30.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "mocha": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.0.1.tgz", + "integrity": "sha512-evDmhkoA+cBNiQQQdSKZa2b9+W2mpLoj50367lhy+Klnx9OV8XlCIhigUnn1gaTFLQCa0kdNhEGDr0hCXOQFDw==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.3.1", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.3", + "he": "1.1.1", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "1.0.0", + "array-union": "1.0.2", + "arrify": "1.0.1", + "minimatch": "3.0.4" + } + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dev": true, + "requires": { + "duplexer2": "0.0.2" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=", + "dev": true, + "optional": true + }, + "natives": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", + "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "node.extend": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-1.1.6.tgz", + "integrity": "sha1-p7iCyC1sk6SGOlUEvV3o7IYli5Y=", + "dev": true, + "requires": { + "is": "3.2.1" + } + }, + "nodemon": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.12.1.tgz", + "integrity": "sha1-mWpW3EnZ8Wu/G3ik3gjxNjSzh40=", + "dev": true, + "requires": { + "chokidar": "1.7.0", + "debug": "2.6.9", + "es6-promise": "3.3.1", + "ignore-by-default": "1.0.1", + "lodash.defaults": "3.1.2", + "minimatch": "3.0.4", + "ps-tree": "1.1.0", + "touch": "3.1.0", + "undefsafe": "0.0.3", + "update-notifier": "2.3.0" + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "requires": { + "abbrev": "1.1.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "dev": true, + "requires": { + "boolbase": "1.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "1.0.1", + "array-slice": "1.0.0", + "for-own": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "orchestrator": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "dev": true, + "requires": { + "end-of-stream": "0.1.5", + "sequencify": "0.0.7", + "stream-consume": "0.1.0" + } + }, + "ordered-read-streams": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "dev": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "dev": true + }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "6.7.1", + "registry-auth-token": "3.3.1", + "registry-url": "3.1.0", + "semver": "5.4.1" + }, + "dependencies": { + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + } + } + }, + "parse-filepath": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz", + "integrity": "sha1-FZ1hVdQ5BNFsEO9piRHaHpGWm3M=", + "dev": true, + "requires": { + "is-absolute": "0.2.6", + "map-cache": "0.2.2", + "path-root": "0.1.1" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "parse5": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", + "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", + "dev": true, + "requires": { + "@types/node": "6.0.52" + } + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "0.1.2" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true, + "requires": { + "through": "2.3.8" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "ps-tree": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", + "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", + "dev": true, + "requires": { + "event-stream": "3.3.4" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", + "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", + "dev": true + }, + "querystringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz", + "integrity": "sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs=", + "dev": true + }, + "queue": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/queue/-/queue-3.1.0.tgz", + "integrity": "sha1-bEnQHwCeIlZ4h4nyv/rGuLmZBYU=", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "rc": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz", + "integrity": "sha1-2M6ctX6NZNnHut2YdsfDTL48cHc=", + "dev": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + } + }, + "read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", + "dev": true, + "requires": { + "mute-stream": "0.0.7" + } + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.3", + "set-immediate-shim": "1.0.1" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "1.5.0" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "registry-auth-token": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", + "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", + "dev": true, + "requires": { + "rc": "1.2.2", + "safe-buffer": "5.1.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "1.2.2" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "request": { + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "dev": true, + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "dev": true, + "requires": { + "hoek": "4.2.0" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "dev": true, + "requires": { + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "dev": true, + "requires": { + "hoek": "4.2.0" + } + } + } + }, + "form-data": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "dev": true, + "requires": { + "ajv": "5.4.0", + "har-schema": "2.0.0" + } + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "dev": true, + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.0", + "sntp": "2.1.0" + } + }, + "hoek": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "dev": true + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "dev": true, + "requires": { + "hoek": "4.2.0" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "request-light": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.2.1.tgz", + "integrity": "sha1-mG9agok+nRymqJbr5vRsUca0VX8=", + "requires": { + "http-proxy-agent": "0.2.7", + "https-proxy-agent": "0.3.6", + "vscode-nls": "2.0.2" + } + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "dev": true, + "requires": { + "path-parse": "1.0.5" + } + }, + "resolve-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", + "dev": true, + "requires": { + "expand-tilde": "1.2.2", + "global-modules": "0.2.3" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "run-sequence": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/run-sequence/-/run-sequence-2.2.0.tgz", + "integrity": "sha512-xW5DmUwdvoyYQUMPKN8UW7TZSFs7AxtT59xo1m5y91jHbvwGlGgOmdV1Yw5P68fkjf3aHUZ4G1o1mZCtNe0qtw==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "gulp-util": "3.0.8" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "5.4.1" + }, + "dependencies": { + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + } + } + }, + "sequencify": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-resolve": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.3.1.tgz", + "integrity": "sha1-YQ9hIqRFuN1RU1oqcbeD38Ekh2E=", + "dev": true, + "requires": { + "atob": "1.1.3", + "resolve-url": "0.2.1", + "source-map-url": "0.3.0", + "urix": "0.1.0" + } + }, + "source-map-support": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.0.tgz", + "integrity": "sha512-vUoN3I7fHQe0R/SJLKRdKYuEdRGogsviXFkHHo17AWaTGv17VLnxw+CFXvqy+y4ORZ3doWLQcxRYfwKrsd/H7Q==", + "dev": true, + "requires": { + "source-map": "0.6.1" + } + }, + "source-map-url": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.3.0.tgz", + "integrity": "sha1-fsrxO1e80J2opAxdJp2zN5nUqvk=", + "dev": true + }, + "sparkles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", + "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=", + "dev": true + }, + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "dev": true, + "requires": { + "through": "2.3.8" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "dev": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "stat-mode": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-0.2.2.tgz", + "integrity": "sha1-5sgLYjEj19gM8TLOU480YokHJQI=", + "dev": true + }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "dev": true, + "requires": { + "duplexer": "0.1.1" + } + }, + "stream-consume": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", + "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=", + "dev": true + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "streamfilter": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.5.tgz", + "integrity": "sha1-h1BxEb644phFFxe1Ec/tjwAqv1M=", + "dev": true, + "requires": { + "readable-stream": "2.3.3" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "streamifier": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz", + "integrity": "sha1-l+mNj6TRBdYqJpHR3AfoINuN/E8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "dev": true, + "requires": { + "first-chunk-stream": "1.0.0", + "is-utf8": "0.2.1" + } + }, + "strip-bom-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", + "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", + "dev": true, + "requires": { + "first-chunk-stream": "1.0.0", + "strip-bom": "2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } + } + }, + "strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "requires": { + "execa": "0.7.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "2.3.3", + "xtend": "4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "through2-filter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", + "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", + "dev": true, + "requires": { + "through2": "2.0.3", + "xtend": "4.0.1" + } + }, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "dev": true, + "requires": { + "os-homedir": "1.0.2" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "timers-ext": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.2.tgz", + "integrity": "sha1-YcxHp2wavTGV8UUn+XjViulMUgQ=", + "dev": true, + "requires": { + "es5-ext": "0.10.35", + "next-tick": "1.0.0" + } + }, + "tmp": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", + "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", + "dev": true, + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "to-absolute-glob": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz", + "integrity": "sha1-HN+kcqnvUMI57maZm2YsoOs5k38=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1" + } + }, + "touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "requires": { + "nopt": "1.0.10" + } + }, + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "dev": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tslib": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.0.tgz", + "integrity": "sha512-ymKWWZJST0/CkgduC2qkzjMOWr4bouhuURNXCn/inEX0L57BnRG6FhX76o7FOnsjHazCjfU2LKeSrlS2sIKQJg==", + "dev": true + }, + "tslint": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.8.0.tgz", + "integrity": "sha1-H0mtWy53x2w69N3K5VKuTjYS6xM=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "builtin-modules": "1.1.1", + "chalk": "2.3.0", + "commander": "2.11.0", + "diff": "3.3.1", + "glob": "7.1.2", + "minimatch": "3.0.4", + "resolve": "1.5.0", + "semver": "5.4.1", + "tslib": "1.8.0", + "tsutils": "2.12.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "tslint-microsoft-contrib": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/tslint-microsoft-contrib/-/tslint-microsoft-contrib-5.0.1.tgz", + "integrity": "sha1-Mo7pwo0HzfeTKTIEyW4v+rkiGZQ=", + "dev": true, + "requires": { + "tsutils": "1.9.1" + }, + "dependencies": { + "tsutils": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-1.9.1.tgz", + "integrity": "sha1-ufmrROVa+WgYMdXyjQrur1x1DLA=", + "dev": true + } + } + }, + "tsutils": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.12.2.tgz", + "integrity": "sha1-rVikhl0X7D3bZjG2ylO+FKVlb/M=", + "dev": true, + "requires": { + "tslib": "1.8.0" + } + }, + "tunnel": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", + "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=", + "dev": true + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "dev": true + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "typed-rest-client": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-0.9.0.tgz", + "integrity": "sha1-92jMDcP06VDwbgSCXDaz54NKofI=", + "dev": true, + "requires": { + "tunnel": "0.0.4", + "underscore": "1.8.3" + } + }, + "typescript": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.1.tgz", + "integrity": "sha1-7znN6ierrAtQAkLWcmq5DgyEZjE=", + "dev": true + }, + "uc.micro": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.3.tgz", + "integrity": "sha1-ftUNXg+an7ClczeSWfKndFjVAZI=", + "dev": true + }, + "uglify-js": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.0.tgz", + "integrity": "sha1-8CHji6LKdAhg9b1caVwqgXNF8Ow=", + "dev": true, + "requires": { + "async": "0.2.10", + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "uglify-save-license": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/uglify-save-license/-/uglify-save-license-0.4.1.tgz", + "integrity": "sha1-lXJsF8xv0XHDYX479NjYKqjEzOE=", + "dev": true + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "undefsafe": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-0.0.3.tgz", + "integrity": "sha1-7Mo6A+VrmvFzhbqsgSrIO5lKli8=", + "dev": true + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "unique-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", + "dev": true + }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "dev": true, + "requires": { + "crypto-random-string": "1.0.0" + } + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, + "update-notifier": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", + "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", + "dev": true, + "requires": { + "boxen": "1.2.2", + "chalk": "2.3.0", + "configstore": "3.1.1", + "import-lazy": "2.1.0", + "is-installed-globally": "0.1.0", + "is-npm": "1.0.0", + "latest-version": "3.1.0", + "semver-diff": "2.1.0", + "xdg-basedir": "3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url-join": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz", + "integrity": "sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg=", + "dev": true + }, + "url-parse": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.2.0.tgz", + "integrity": "sha512-DT1XbYAfmQP65M/mE6OALxmXzZ/z1+e5zk2TcSKe/KiYbNGZxgtttzC0mR/sjopbpOXcbniq7eIKmocJnUWlEw==", + "dev": true, + "requires": { + "querystringify": "1.0.0", + "requires-port": "1.0.0" + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "1.0.4" + } + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "dev": true + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "1.1.1" + } + }, + "vali-date": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", + "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", + "dev": true, + "requires": { + "defaults": "1.0.3", + "glob-stream": "3.1.18", + "glob-watcher": "0.0.6", + "graceful-fs": "3.0.11", + "mkdirp": "0.5.1", + "strip-bom": "1.0.0", + "through2": "0.6.5", + "vinyl": "0.4.6" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "0.2.0", + "clone-stats": "0.0.1" + } + } + } + }, + "vinyl-source-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-source-stream/-/vinyl-source-stream-1.1.0.tgz", + "integrity": "sha1-RMvlEIIFJ53rDFZTwJSiiHk4sas=", + "dev": true, + "requires": { + "through2": "0.6.5", + "vinyl": "0.4.6" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "0.2.0", + "clone-stats": "0.0.1" + } + } + } + }, + "vinyl-sourcemaps-apply": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", + "dev": true, + "requires": { + "source-map": "0.5.7" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "vsce": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.32.0.tgz", + "integrity": "sha1-EN+pIyGCwg6r5r8xJdMzpLIG/j0=", + "dev": true, + "requires": { + "cheerio": "1.0.0-rc.2", + "commander": "2.11.0", + "denodeify": "1.2.1", + "glob": "7.1.2", + "lodash": "4.17.4", + "markdown-it": "8.4.0", + "mime": "1.4.1", + "minimatch": "3.0.4", + "osenv": "0.1.4", + "read": "1.0.7", + "semver": "5.4.1", + "tmp": "0.0.29", + "url-join": "1.1.0", + "vso-node-api": "6.1.2-preview", + "yauzl": "2.9.1", + "yazl": "2.4.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + } + } + }, + "vscode": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.6.tgz", + "integrity": "sha1-Ru0a+iwbnWifY5TI8WvR1xkPdfs=", + "dev": true, + "requires": { + "glob": "7.1.2", + "gulp-chmod": "2.0.0", + "gulp-filter": "5.0.1", + "gulp-gunzip": "1.0.0", + "gulp-remote-src": "0.4.3", + "gulp-symdest": "1.1.0", + "gulp-untar": "0.0.6", + "gulp-vinyl-zip": "2.1.0", + "mocha": "4.0.1", + "request": "2.83.0", + "semver": "5.4.1", + "source-map-support": "0.5.0", + "url-parse": "1.2.0", + "vinyl-source-stream": "1.1.0" + }, + "dependencies": { + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + } + } + }, + "vscode-debugadapter": { + "version": "1.25.0-pre.0", + "resolved": "https://registry.npmjs.org/vscode-debugadapter/-/vscode-debugadapter-1.25.0-pre.0.tgz", + "integrity": "sha1-0pDsVH5h5Pvss2P/9ojSAyMZQmQ=", + "requires": { + "vscode-debugprotocol": "1.25.0-pre.0" + }, + "dependencies": { + "vscode-debugprotocol": { + "version": "1.25.0-pre.0", + "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.25.0-pre.0.tgz", + "integrity": "sha1-rYPnvZWxmseV31D6Di/pA0YqcrY=" + } + } + }, + "vscode-debugadapter-testsupport": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/vscode-debugadapter-testsupport/-/vscode-debugadapter-testsupport-1.24.0.tgz", + "integrity": "sha1-rDZ1scU/wW+1JMvSt+znEhtiXng=", + "dev": true, + "requires": { + "vscode-debugprotocol": "1.24.0" + } + }, + "vscode-debugprotocol": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.24.0.tgz", + "integrity": "sha1-28EOjX2VsQJyehmvPw/O9+JSsI4=", + "dev": true + }, + "vscode-nls": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz", + "integrity": "sha1-gIUiOAhEuK0VNJmvXDsDkhrqAto=" + }, + "vscode-nls-dev": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/vscode-nls-dev/-/vscode-nls-dev-2.1.5.tgz", + "integrity": "sha1-GfqjsYp/MCIBA5pMlnu9IvoShE0=", + "dev": true, + "requires": { + "clone": "1.0.3", + "event-stream": "3.3.4", + "glob": "6.0.4", + "gulp-util": "3.0.8", + "iconv-lite": "0.4.19", + "is": "3.2.1", + "source-map": "0.5.7", + "typescript": "2.6.1", + "vinyl": "1.2.0", + "xml2js": "0.4.19", + "yargs": "3.32.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "dev": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", + "dev": true + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "dev": true, + "requires": { + "camelcase": "2.1.1", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "string-width": "1.0.2", + "window-size": "0.1.4", + "y18n": "3.2.1" + } + } + } + }, + "vso-node-api": { + "version": "6.1.2-preview", + "resolved": "https://registry.npmjs.org/vso-node-api/-/vso-node-api-6.1.2-preview.tgz", + "integrity": "sha1-qrNUbfJFHs2JTgcbuZtd8Zxfp48=", + "dev": true, + "requires": { + "q": "1.5.1", + "tunnel": "0.0.4", + "typed-rest-client": "0.9.0", + "underscore": "1.8.3" + } + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "widest-line": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", + "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", + "dev": true, + "requires": { + "string-width": "1.0.2" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dev": true, + "requires": { + "sax": "1.2.4", + "xmlbuilder": "9.0.4" + } + }, + "xmlbuilder": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz", + "integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + }, + "yauzl": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.9.1.tgz", + "integrity": "sha1-qBmB6nCleUYTOIPwKcWCGok1mn8=", + "dev": true, + "requires": { + "buffer-crc32": "0.2.13", + "fd-slicer": "1.0.1" + } + }, + "yazl": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.4.3.tgz", + "integrity": "sha1-7CblzIfVYBud+EMtvdPNLlFzoHE=", + "dev": true, + "requires": { + "buffer-crc32": "0.2.13" + } + } + } +} diff --git a/extensions/ms-vscode.node-debug2/OSSREADME.json b/extensions/ms-vscode.node-debug2/OSSREADME.json index e2b9268eb40..83ffc0884d2 100644 --- a/extensions/ms-vscode.node-debug2/OSSREADME.json +++ b/extensions/ms-vscode.node-debug2/OSSREADME.json @@ -1,150 +1,23 @@ -// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: -[ -{ - "name": "agent-base", - "repositoryURL": "https://github.com/TooTallNate/node-agent-base", - "version": "1.0.2", +[{ + "isLicense": true, + "name": "noice-json-rpc", + "repositoryURL": "https://github.com/nojvek/noice-json-rpc", "license": "MIT", - "isProd": true -}, -{ - "name": "balanced-match", - "repositoryURL": "https://github.com/juliangruber/balanced-match", - "version": "0.4.2", - "license": "MIT", - "isProd": true -}, -{ - "name": "brace-expansion", - "repositoryURL": "https://github.com/juliangruber/brace-expansion", - "version": "1.1.6", - "license": "MIT", - "isProd": true -}, -{ - "name": "concat-map", - "repositoryURL": "https://github.com/substack/node-concat-map", - "version": "0.0.1", - "license": "MIT", - "isProd": true -}, -{ - "name": "debug", - "repositoryURL": "https://github.com/visionmedia/debug", - "version": "2.2.0", - "license": "MIT", - "isProd": true -}, -{ - "name": "extend", - "repositoryURL": "https://github.com/justmoon/node-extend", - "version": "3.0.0", - "license": "MIT", - "isProd": true -}, -{ - "name": "fs.realpath", - "repositoryURL": "https://github.com/isaacs/fs.realpath", - "version": "1.0.0", - "license": "ISC", - "isProd": true -}, -{ - "name": "glob", - "repositoryURL": "https://github.com/isaacs/node-glob", - "version": "7.1.0", - "license": "ISC", - "isProd": true -}, -{ - "name": "http-proxy-agent", - "repositoryURL": "https://github.com/TooTallNate/node-http-proxy-agent", - "version": "0.2.7", - "license": "MIT", - "isProd": true -}, -{ - "name": "https-proxy-agent", - "repositoryURL": "https://github.com/TooTallNate/node-https-proxy-agent", - "version": "0.3.6", - "license": "MIT", - "isProd": true -}, -{ - "name": "inflight", - "repositoryURL": "https://github.com/npm/inflight", - "version": "1.0.5", - "license": "ISC", - "isProd": true -}, -{ - "name": "inherits", - "repositoryURL": "https://github.com/isaacs/inherits", - "version": "2.0.3", - "license": "ISC", - "isProd": true -}, -{ - "name": "minimatch", - "repositoryURL": "https://github.com/isaacs/minimatch", - "version": "3.0.3", - "license": "ISC", - "isProd": true -}, -{ - "name": "ms", - "repositoryURL": "https://github.com/rauchg/ms.js", - "version": "0.7.1", - "license": "MIT", - "isProd": true -}, -{ - "name": "once", - "repositoryURL": "https://github.com/isaacs/once", - "version": "1.4.0", - "license": "ISC", - "isProd": true -}, -{ - "name": "options", - "repositoryURL": "https://github.com/einaros/options.js", - "version": "0.0.6", - "license": "MIT", - "isProd": true -}, -{ - "name": "ultron", - "repositoryURL": "https://github.com/unshiftio/ultron", - "version": "1.0.2", - "license": "MIT", - "isProd": true -}, -{ - "name": "path-is-absolute", - "repositoryURL": "https://github.com/sindresorhus/path-is-absolute", - "version": "1.0.0", - "license": "MIT", - "isProd": true -}, -{ - "name": "source-map", - "repositoryURL": "https://github.com/mozilla/source-map", - "version": "0.5.6", - "license": "BSD-3-Clause", - "isProd": true -}, -{ - "name": "wrappy", - "repositoryURL": "https://github.com/npm/wrappy", - "version": "1.0.2", - "license": "ISC", - "isProd": true -}, -{ - "name": "ws", - "repositoryURL": "https://github.com/websockets/ws", - "version": "1.1.1", - "license": "MIT", - "isProd": true -} -] \ No newline at end of file + "licenseDetail": [ + "Copyright (c) Manoj Patel", + "", + "MIT License", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation", + "files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy,", + "modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software", + "is furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES", + "OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS", + "BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT", + "OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + ] +}] diff --git a/extensions/ms-vscode.node-debug2/package-lock.json b/extensions/ms-vscode.node-debug2/package-lock.json new file mode 100644 index 00000000000..7f8ba502cc4 --- /dev/null +++ b/extensions/ms-vscode.node-debug2/package-lock.json @@ -0,0 +1,5106 @@ +{ + "name": "node-debug2", + "version": "1.19.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@gulp-sourcemaps/identity-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.1.tgz", + "integrity": "sha1-z6I7xYQPkQTOMqZedNt+epdLvuE=", + "dev": true, + "requires": { + "acorn": "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz", + "css": "2.2.1", + "normalize-path": "2.1.1", + "source-map": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "through2": "2.0.3" + }, + "dependencies": { + "acorn": { + "version": "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz", + "integrity": "sha1-MXrHghgmwixwLWYYmrg1lnXxNdc=", + "dev": true + } + } + }, + "@gulp-sourcemaps/map-sources": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", + "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=", + "dev": true, + "requires": { + "normalize-path": "2.1.1", + "through2": "2.0.3" + } + }, + "@types/mocha": { + "version": "2.2.44", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.44.tgz", + "integrity": "sha512-k2tWTQU8G4+iSMvqKi0Q9IIsWAp/n8xzdZS4Q4YVIltApoMA00wFBFdlJnmoaK1/z7B0Cy0yPe6GgXteSmdUNw==", + "dev": true + }, + "@types/node": { + "version": "6.0.92", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.92.tgz", + "integrity": "sha512-awEYSSTn7dauwVCYSx2CJaPTu0Z1Ht2oR1b2AD3CYao6ZRb+opb6EL43fzmD7eMFgMHzTBWSUzlWSD+S8xN0Nw==", + "dev": true + }, + "@types/source-map": { + "version": "https://registry.npmjs.org/@types/source-map/-/source-map-0.1.29.tgz", + "integrity": "sha1-1wSKYBgLCfiqbVO9oxHGtRy9cBg=" + }, + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + }, + "agent-base": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-1.0.2.tgz", + "integrity": "sha1-aJDT+yFwBLYrcPiSjg+uX4lSpwY=" + }, + "ajv": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.0.tgz", + "integrity": "sha1-6yhAdG6dxIvV4GOjbj/UAMXqtak=", + "dev": true, + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "dev": true, + "requires": { + "sprintf-js": "1.0.3" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz" + } + }, + "arr-flatten": { + "version": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-slice": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz", + "integrity": "sha1-5zA08A3MH0CHYAj9IP6ud71LfC8=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "1.0.3" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/atob/-/atob-1.1.3.tgz", + "integrity": "sha1-lfE2KbEsOlGl0hWr3OKqnzL4B3M=", + "dev": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "balanced-match": { + "version": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "dev": true, + "requires": { + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "concat-map": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "cheerio": { + "version": "1.0.0-rc.2", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", + "integrity": "sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=", + "dev": true, + "requires": { + "css-select": "1.2.0", + "dom-serializer": "0.1.0", + "entities": "1.1.1", + "htmlparser2": "3.9.2", + "lodash": "4.17.4", + "parse5": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz" + }, + "dependencies": { + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + } + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "clone": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", + "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "cloneable-readable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.0.0.tgz", + "integrity": "sha1-pikNQT8hemEjL5XkWP84QYz7ARc=", + "dev": true, + "requires": { + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "process-nextick-args": "1.0.7", + "through2": "2.0.3" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dev": true, + "requires": { + "graceful-readlink": "1.0.1" + } + }, + "concat-map": { + "version": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "css": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.1.tgz", + "integrity": "sha1-c6TIHehdtmTU7mdPfUcIXjstVdw=", + "dev": true, + "requires": { + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "source-map": "0.1.43", + "source-map-resolve": "0.3.1", + "urix": "0.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "1.0.0", + "css-what": "2.1.0", + "domutils": "1.5.1", + "nth-check": "1.0.1" + } + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", + "dev": true + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "0.10.37" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "dateformat": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", + "dev": true + }, + "debug": { + "version": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "requires": { + "ms": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" + } + }, + "debug-fabulous": { + "version": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-0.2.1.tgz", + "integrity": "sha1-V+EWS6DprW2aZfIAdf88K9a94Nw=", + "dev": true, + "requires": { + "debug": "3.1.0", + "memoizee": "0.4.11", + "object-assign": "4.1.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" + } + } + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-assign": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz", + "integrity": "sha1-sJJ0O+hCfcYh6gBnzex+cN0Z83s=", + "dev": true, + "requires": { + "is-obj": "1.0.1" + } + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "1.0.3" + } + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "denodeify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", + "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=", + "dev": true + }, + "deprecated": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", + "dev": true + }, + "detect-file": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz", + "integrity": "sha1-STXe39lIhkjgBrASlWbpOGcR6mM=", + "dev": true, + "requires": { + "fs-exists-sync": "0.1.0" + } + }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true + }, + "diff": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", + "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", + "dev": true + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "dev": true, + "requires": { + "domelementtype": "1.1.3", + "entities": "1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", + "dev": true + }, + "domhandler": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", + "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", + "dev": true, + "requires": { + "domelementtype": "1.3.0" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true, + "requires": { + "readable-stream": "1.1.14" + } + }, + "duplexify": { + "version": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", + "integrity": "sha1-ThUWvmiDi8kKSZlPCzmm5ZYL780=", + "dev": true, + "requires": { + "end-of-stream": "1.4.0", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "stream-shift": "1.0.0" + }, + "dependencies": { + "end-of-stream": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", + "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", + "dev": true, + "requires": { + "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "dev": true, + "requires": { + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + } + } + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "end-of-stream": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "dev": true, + "requires": { + "once": "1.3.3" + }, + "dependencies": { + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "dev": true, + "requires": { + "wrappy": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + } + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", + "dev": true + }, + "es5-ext": { + "version": "0.10.37", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.37.tgz", + "integrity": "sha1-DudB0Ui4AGm6J9AgOTdWryV978M=", + "dev": true, + "requires": { + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.37", + "es6-symbol": "3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.37" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.37", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.37" + } + }, + "event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "dev": true, + "requires": { + "duplexer": "0.1.1", + "from": "0.1.7", + "map-stream": "0.1.0", + "pause-stream": "0.0.11", + "split": "0.3.3", + "stream-combiner": "0.0.4", + "through": "2.3.8" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "2.2.3" + } + }, + "expand-tilde": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", + "dev": true, + "requires": { + "os-homedir": "1.0.2" + } + }, + "extend": { + "version": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fancy-log": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", + "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "time-stamp": "1.1.0" + } + }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fd-slicer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", + "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "dev": true, + "requires": { + "pend": "1.2.0" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", + "dev": true + }, + "findup-sync": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz", + "integrity": "sha1-QAQ5Kee8YK3wt/SCfExudaDeyhI=", + "dev": true, + "requires": { + "detect-file": "0.1.0", + "is-glob": "2.0.1", + "micromatch": "2.3.11", + "resolve-dir": "0.1.1" + } + }, + "fined": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", + "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", + "dev": true, + "requires": { + "expand-tilde": "2.0.2", + "is-plain-object": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "object.defaults": "1.1.0", + "object.pick": "1.3.0", + "parse-filepath": "1.0.1" + }, + "dependencies": { + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "1.0.1" + } + } + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", + "dev": true + }, + "flagged-respawn": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz", + "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "fs-exists-sync": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=", + "dev": true + }, + "fs.realpath": { + "version": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "mkdirp": "0.5.1", + "rimraf": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "gaze": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "dev": true, + "requires": { + "globule": "0.1.0" + } + }, + "generate-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", + "dev": true + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "dev": true, + "requires": { + "is-property": "1.0.2" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "glob": { + "version": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "requires": { + "fs.realpath": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "inflight": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "glob-stream": { + "version": "3.1.18", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "dev": true, + "requires": { + "glob": "4.5.3", + "glob2base": "0.0.12", + "minimatch": "2.0.10", + "ordered-read-streams": "0.1.0", + "through2": "0.6.5", + "unique-stream": "1.0.0" + }, + "dependencies": { + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "dev": true, + "requires": { + "inflight": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "minimatch": "2.0.10", + "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + } + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "dev": true, + "requires": { + "brace-expansion": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "dev": true, + "requires": { + "gaze": "0.5.2" + } + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "dev": true, + "requires": { + "find-index": "0.1.1" + } + }, + "global-modules": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", + "dev": true, + "requires": { + "global-prefix": "0.1.5", + "is-windows": "0.2.0" + } + }, + "global-prefix": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", + "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", + "dev": true, + "requires": { + "homedir-polyfill": "1.0.1", + "ini": "1.3.5", + "is-windows": "0.2.0", + "which": "https://registry.npmjs.org/which/-/which-1.3.0.tgz" + } + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "globule": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "dev": true, + "requires": { + "glob": "3.1.21", + "lodash": "1.0.2", + "minimatch": "0.2.14" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, + "requires": { + "graceful-fs": "1.2.3", + "inherits": "1.0.2", + "minimatch": "0.2.14" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + } + } + }, + "glogg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", + "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", + "dev": true, + "requires": { + "sparkles": "1.0.0" + } + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "dev": true, + "requires": { + "natives": "1.1.0" + } + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true + }, + "growl": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", + "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", + "dev": true + }, + "gulp": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "dev": true, + "requires": { + "archy": "1.0.0", + "chalk": "1.1.3", + "deprecated": "0.0.1", + "gulp-util": "3.0.8", + "interpret": "1.0.4", + "liftoff": "2.3.0", + "minimist": "1.2.0", + "orchestrator": "0.3.8", + "pretty-hrtime": "1.0.3", + "semver": "4.3.6", + "tildify": "1.2.0", + "v8flags": "2.1.1", + "vinyl-fs": "0.3.14" + } + }, + "gulp-chmod": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/gulp-chmod/-/gulp-chmod-2.0.0.tgz", + "integrity": "sha1-AMOQuSigeZslGsz2MaoJ4BzGKZw=", + "dev": true, + "requires": { + "deep-assign": "1.0.0", + "stat-mode": "0.2.2", + "through2": "2.0.3" + } + }, + "gulp-filter": { + "version": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.0.1.tgz", + "integrity": "sha1-XYf2YuMX5YOe92UOYg5skAj/ktA=", + "dev": true, + "requires": { + "gulp-util": "3.0.8", + "multimatch": "2.1.0", + "streamfilter": "1.0.5" + } + }, + "gulp-gunzip": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulp-gunzip/-/gulp-gunzip-1.0.0.tgz", + "integrity": "sha1-FbdBFF6Dqcb1CIYkG1fMWHHxUak=", + "dev": true, + "requires": { + "through2": "0.6.5", + "vinyl": "0.4.6" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "0.2.0", + "clone-stats": "0.0.1" + } + } + } + }, + "gulp-remote-src": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/gulp-remote-src/-/gulp-remote-src-0.4.3.tgz", + "integrity": "sha1-VyjP1kNDPdSEXd7wlp8PlxoqtKE=", + "dev": true, + "requires": { + "event-stream": "3.3.4", + "node.extend": "1.1.6", + "request": "2.79.0", + "through2": "2.0.3", + "vinyl": "2.0.2" + }, + "dependencies": { + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "request": { + "version": "2.79.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", + "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", + "dev": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.11.0", + "combined-stream": "1.0.5", + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "2.0.6", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "qs": "6.3.2", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.4.3", + "uuid": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz" + } + }, + "vinyl": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.0.2.tgz", + "integrity": "sha1-CjcT2NTpIhxY8QyhbAEWyeJe2nw=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-buffer": "1.0.0", + "clone-stats": "1.0.0", + "cloneable-readable": "1.0.0", + "is-stream": "1.1.0", + "remove-trailing-separator": "1.1.0", + "replace-ext": "1.0.0" + } + } + } + }, + "gulp-sourcemaps": { + "version": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-2.6.1.tgz", + "integrity": "sha1-gzpOKPC49GYQdQMs14JBf3zY+ws=", + "dev": true, + "requires": { + "@gulp-sourcemaps/identity-map": "1.0.1", + "@gulp-sourcemaps/map-sources": "1.0.0", + "acorn": "4.0.13", + "convert-source-map": "1.5.1", + "css": "2.2.1", + "debug-fabulous": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-0.2.1.tgz", + "detect-newline": "2.1.0", + "graceful-fs": "4.1.11", + "source-map": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "strip-bom-string": "1.0.0", + "through2": "2.0.3", + "vinyl": "1.2.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "gulp-symdest": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/gulp-symdest/-/gulp-symdest-1.1.0.tgz", + "integrity": "sha1-wWUyBzLRks5W/ZQnH/oSMjS/KuA=", + "dev": true, + "requires": { + "event-stream": "3.3.4", + "mkdirp": "0.5.1", + "queue": "3.1.0", + "vinyl-fs": "2.4.4" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + } + }, + "glob-stream": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", + "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "dev": true, + "requires": { + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "glob": "5.0.15", + "glob-parent": "3.1.0", + "micromatch": "2.3.11", + "ordered-read-streams": "0.3.0", + "through2": "0.6.5", + "to-absolute-glob": "0.1.1", + "unique-stream": "2.2.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "gulp-sourcemaps": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", + "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", + "dev": true, + "requires": { + "convert-source-map": "1.5.1", + "graceful-fs": "4.1.11", + "strip-bom": "2.0.0", + "through2": "2.0.3", + "vinyl": "1.2.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "ordered-read-streams": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", + "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", + "dev": true, + "requires": { + "is-stream": "1.1.0", + "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" + } + }, + "readable-stream": { + "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "dev": true, + "requires": { + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "unique-stream": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", + "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", + "dev": true, + "requires": { + "json-stable-stringify": "1.0.1", + "through2-filter": "2.0.0" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", + "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", + "dev": true, + "requires": { + "duplexify": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", + "glob-stream": "5.3.5", + "graceful-fs": "4.1.11", + "gulp-sourcemaps": "1.6.0", + "is-valid-glob": "0.3.0", + "lazystream": "1.0.0", + "lodash.isequal": "4.5.0", + "merge-stream": "1.0.1", + "mkdirp": "0.5.1", + "object-assign": "4.1.1", + "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "strip-bom": "2.0.0", + "strip-bom-stream": "1.0.0", + "through2": "2.0.3", + "through2-filter": "2.0.0", + "vali-date": "1.0.0", + "vinyl": "1.2.0" + } + } + } + }, + "gulp-tslint": { + "version": "https://registry.npmjs.org/gulp-tslint/-/gulp-tslint-8.1.2.tgz", + "integrity": "sha1-4PQxlLRz1+drtFpY/oxg59/jvrI=", + "dev": true, + "requires": { + "gulp-util": "3.0.8", + "map-stream": "0.0.7", + "through": "2.3.8" + }, + "dependencies": { + "map-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", + "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=", + "dev": true + } + } + }, + "gulp-typescript": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/gulp-typescript/-/gulp-typescript-3.2.3.tgz", + "integrity": "sha512-Np2sJXgtDUwIAoMtlJ9uXsVmpu1FWXlKZw164hLuo56uJa7qo5W2KZ0yAYiYH/HUsaz5L0O2toMOcLIokpFCPg==", + "dev": true, + "requires": { + "gulp-util": "3.0.8", + "source-map": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "through2": "2.0.3", + "vinyl-fs": "2.4.4" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + } + }, + "glob-stream": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", + "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "dev": true, + "requires": { + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "glob": "5.0.15", + "glob-parent": "3.1.0", + "micromatch": "2.3.11", + "ordered-read-streams": "0.3.0", + "through2": "0.6.5", + "to-absolute-glob": "0.1.1", + "unique-stream": "2.2.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "gulp-sourcemaps": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", + "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", + "dev": true, + "requires": { + "convert-source-map": "1.5.1", + "graceful-fs": "4.1.11", + "strip-bom": "2.0.0", + "through2": "2.0.3", + "vinyl": "1.2.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "ordered-read-streams": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", + "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", + "dev": true, + "requires": { + "is-stream": "1.1.0", + "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" + } + }, + "readable-stream": { + "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "dev": true, + "requires": { + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "unique-stream": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", + "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", + "dev": true, + "requires": { + "json-stable-stringify": "1.0.1", + "through2-filter": "2.0.0" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", + "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", + "dev": true, + "requires": { + "duplexify": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", + "glob-stream": "5.3.5", + "graceful-fs": "4.1.11", + "gulp-sourcemaps": "1.6.0", + "is-valid-glob": "0.3.0", + "lazystream": "1.0.0", + "lodash.isequal": "4.5.0", + "merge-stream": "1.0.1", + "mkdirp": "0.5.1", + "object-assign": "4.1.1", + "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "strip-bom": "2.0.0", + "strip-bom-stream": "1.0.0", + "through2": "2.0.3", + "through2-filter": "2.0.0", + "vali-date": "1.0.0", + "vinyl": "1.2.0" + } + } + } + }, + "gulp-untar": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/gulp-untar/-/gulp-untar-0.0.6.tgz", + "integrity": "sha1-1r3v3n6ajgVMnxYjhaB4LEvnQAA=", + "dev": true, + "requires": { + "event-stream": "3.3.4", + "gulp-util": "3.0.8", + "streamifier": "0.1.1", + "tar": "2.2.1", + "through2": "2.0.3" + } + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "dev": true, + "requires": { + "array-differ": "1.0.0", + "array-uniq": "1.0.3", + "beeper": "1.1.1", + "chalk": "1.1.3", + "dateformat": "2.2.0", + "fancy-log": "1.3.0", + "gulplog": "1.0.0", + "has-gulplog": "0.1.0", + "lodash._reescape": "3.0.0", + "lodash._reevaluate": "3.0.0", + "lodash._reinterpolate": "3.0.0", + "lodash.template": "3.6.2", + "minimist": "1.2.0", + "multipipe": "0.1.2", + "object-assign": "3.0.0", + "replace-ext": "0.0.1", + "through2": "2.0.3", + "vinyl": "0.5.3" + }, + "dependencies": { + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + } + } + }, + "gulp-vinyl-zip": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.0.tgz", + "integrity": "sha1-JOQGhdwFtxSZlSRQmeBZAmO+ja0=", + "dev": true, + "requires": { + "event-stream": "3.3.4", + "queue": "4.4.2", + "through2": "2.0.3", + "vinyl": "2.1.0", + "vinyl-fs": "2.4.4", + "yauzl": "2.9.1", + "yazl": "2.4.3" + }, + "dependencies": { + "clone": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", + "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + } + }, + "glob-stream": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", + "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "dev": true, + "requires": { + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "glob": "5.0.15", + "glob-parent": "3.1.0", + "micromatch": "2.3.11", + "ordered-read-streams": "0.3.0", + "through2": "0.6.5", + "to-absolute-glob": "0.1.1", + "unique-stream": "2.2.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "gulp-sourcemaps": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", + "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", + "dev": true, + "requires": { + "convert-source-map": "1.5.1", + "graceful-fs": "4.1.11", + "strip-bom": "2.0.0", + "through2": "2.0.3", + "vinyl": "1.2.0" + }, + "dependencies": { + "clone": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", + "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "ordered-read-streams": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", + "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", + "dev": true, + "requires": { + "is-stream": "1.1.0", + "readable-stream": "2.3.3" + } + }, + "queue": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/queue/-/queue-4.4.2.tgz", + "integrity": "sha512-fSMRXbwhMwipcDZ08enW2vl+YDmAmhcNcr43sCJL8DIg+CFOsoRLG23ctxA+fwNk1w55SePSiS7oqQQSgQoVJQ==", + "dev": true, + "requires": { + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "unique-stream": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", + "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", + "dev": true, + "requires": { + "json-stable-stringify": "1.0.1", + "through2-filter": "2.0.0" + } + }, + "vinyl": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", + "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", + "dev": true, + "requires": { + "clone": "2.1.1", + "clone-buffer": "1.0.0", + "clone-stats": "1.0.0", + "cloneable-readable": "1.0.0", + "remove-trailing-separator": "1.1.0", + "replace-ext": "1.0.0" + } + }, + "vinyl-fs": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", + "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", + "dev": true, + "requires": { + "duplexify": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", + "glob-stream": "5.3.5", + "graceful-fs": "4.1.11", + "gulp-sourcemaps": "1.6.0", + "is-valid-glob": "0.3.0", + "lazystream": "1.0.0", + "lodash.isequal": "4.5.0", + "merge-stream": "1.0.1", + "mkdirp": "0.5.1", + "object-assign": "4.1.1", + "readable-stream": "2.3.3", + "strip-bom": "2.0.0", + "strip-bom-stream": "1.0.0", + "through2": "2.0.3", + "through2-filter": "2.0.0", + "vali-date": "1.0.0", + "vinyl": "1.2.0" + }, + "dependencies": { + "clone": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", + "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + } + } + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "commander": "2.9.0", + "is-my-json-valid": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", + "pinkie-promise": "2.0.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true, + "requires": { + "sparkles": "1.0.0" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "dev": true, + "requires": { + "parse-passwd": "1.0.0" + } + }, + "htmlparser2": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", + "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", + "dev": true, + "requires": { + "domelementtype": "1.3.0", + "domhandler": "2.4.1", + "domutils": "1.5.1", + "entities": "1.1.1", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "dev": true, + "requires": { + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + } + } + } + }, + "http-proxy-agent": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-0.2.7.tgz", + "integrity": "sha1-4X/aZfCQLZUs55IeYsf/iGJlWl4=", + "requires": { + "agent-base": "1.0.2", + "debug": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz" + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "https-proxy-agent": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-0.3.6.tgz", + "integrity": "sha1-cT+jjl01P1DrFKNC/r4pAz7RYZs=", + "requires": { + "agent-base": "1.0.2", + "debug": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz" + } + }, + "iconv-lite": { + "version": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha1-90aPYBNfXl2tM5nAqBvpoWA6CCs=", + "dev": true + }, + "inflight": { + "version": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "wrappy": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + }, + "inherits": { + "version": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "interpret": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.4.tgz", + "integrity": "sha1-ggzdWIuGj/sZGoCVBtbJyPISsbA=", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", + "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=", + "dev": true + }, + "is-absolute": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "dev": true, + "requires": { + "is-relative": "0.2.1", + "is-windows": "0.2.0" + } + }, + "is-buffer": { + "version": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", + "dev": true + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-my-json-valid": { + "version": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", + "integrity": "sha1-WoRnd+LCYg0eaRBOXToDsfYIjxE=", + "dev": true, + "requires": { + "generate-function": "2.0.0", + "generate-object-property": "1.2.0", + "jsonpointer": "4.0.1", + "xtend": "4.0.1" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true, + "requires": { + "is-path-inside": "1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-plain-object": { + "version": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", + "dev": true + }, + "is-relative": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "dev": true, + "requires": { + "is-unc-path": "0.1.2" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-unc-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "dev": true, + "requires": { + "unc-path-regex": "0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", + "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=", + "dev": true + }, + "is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", + "dev": true + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "dev": true, + "requires": { + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + } + } + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, + "liftoff": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", + "integrity": "sha1-qY8v9nGD2Lp8+soQVIvX/wVQs4U=", + "dev": true, + "requires": { + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "findup-sync": "0.4.3", + "fined": "1.1.0", + "flagged-respawn": "0.3.2", + "lodash.isplainobject": "4.0.6", + "lodash.isstring": "4.0.1", + "lodash.mapvalues": "4.6.0", + "rechoir": "0.6.2", + "resolve": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz" + } + }, + "linkify-it": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.0.3.tgz", + "integrity": "sha1-2UpGSPmxwXnWT6lykSaL22zpQ08=", + "dev": true, + "requires": { + "uc.micro": "1.0.3" + } + }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", + "dev": true + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "dev": true, + "requires": { + "lodash._basecopy": "3.0.1", + "lodash.keys": "3.1.2" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basecreate": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz", + "integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE=", + "dev": true + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", + "dev": true + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", + "dev": true + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, + "lodash.create": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz", + "integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=", + "dev": true, + "requires": { + "lodash._baseassign": "3.2.0", + "lodash._basecreate": "3.0.3", + "lodash._isiterateecall": "3.0.9" + } + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dev": true, + "requires": { + "lodash._root": "3.0.1" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "lodash.mapvalues": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", + "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", + "dev": true + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "dev": true, + "requires": { + "lodash._basecopy": "3.0.1", + "lodash._basetostring": "3.0.1", + "lodash._basevalues": "3.0.0", + "lodash._isiterateecall": "3.0.9", + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0", + "lodash.keys": "3.1.2", + "lodash.restparam": "3.6.1", + "lodash.templatesettings": "3.1.1" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "dev": true, + "requires": { + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0" + } + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true + }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "dev": true, + "requires": { + "es5-ext": "0.10.37" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", + "dev": true + }, + "markdown-it": { + "version": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.0.tgz", + "integrity": "sha1-4kAIgb8XH3AY7RvZ2kQdrIr2MG0=", + "dev": true, + "requires": { + "argparse": "1.0.9", + "entities": "1.1.1", + "linkify-it": "2.0.3", + "mdurl": "1.0.1", + "uc.micro": "1.0.3" + } + }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, + "memoizee": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.11.tgz", + "integrity": "sha1-vemBdmPJ5A/bKk6hw2cpYIeujI8=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.37", + "es6-weak-map": "2.0.2", + "event-emitter": "0.3.5", + "is-promise": "2.1.0", + "lru-queue": "0.1.0", + "next-tick": "1.0.0", + "timers-ext": "0.1.2" + } + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "dev": true, + "requires": { + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + } + } + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=", + "dev": true + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "dev": true, + "requires": { + "mime-db": "1.30.0" + } + }, + "minimatch": { + "version": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "requires": { + "brace-expansion": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "mocha": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.3.tgz", + "integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.9.0", + "debug": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "diff": "3.2.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.1", + "growl": "1.9.2", + "he": "1.1.1", + "json3": "3.3.2", + "lodash.create": "3.1.1", + "mkdirp": "0.5.1", + "supports-color": "3.1.2" + }, + "dependencies": { + "glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", + "dev": true, + "requires": { + "fs.realpath": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "inflight": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + } + }, + "supports-color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", + "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "ms": { + "version": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "1.0.0", + "array-union": "1.0.2", + "arrify": "1.0.1", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" + } + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dev": true, + "requires": { + "duplexer2": "0.0.2" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natives": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", + "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "node.extend": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-1.1.6.tgz", + "integrity": "sha1-p7iCyC1sk6SGOlUEvV3o7IYli5Y=", + "dev": true, + "requires": { + "is": "3.2.1" + } + }, + "noice-json-rpc": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/noice-json-rpc/-/noice-json-rpc-1.0.1.tgz", + "integrity": "sha1-XnKJpgocIIgEicsVEBVSusOSJm4=" + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "dev": true, + "requires": { + "boolbase": "1.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "1.0.1", + "array-slice": "1.0.0", + "for-own": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "once": { + "version": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + }, + "options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=" + }, + "orchestrator": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "dev": true, + "requires": { + "end-of-stream": "0.1.5", + "sequencify": "0.0.7", + "stream-consume": "0.1.0" + } + }, + "ordered-read-streams": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "dev": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "parse-filepath": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz", + "integrity": "sha1-FZ1hVdQ5BNFsEO9piRHaHpGWm3M=", + "dev": true, + "requires": { + "is-absolute": "0.2.6", + "map-cache": "0.2.2", + "path-root": "0.1.1" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "parse-semver": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", + "integrity": "sha1-mkr9bfBj3Egm+T+6SpnPIj9mbLg=", + "dev": true, + "requires": { + "semver": "5.4.1" + }, + "dependencies": { + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + } + } + }, + "parse5": { + "version": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", + "integrity": "sha1-BC95L/3TaFFVHPTp4Gazh0q0W1w=", + "dev": true, + "requires": { + "@types/node": "6.0.92" + } + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-is-absolute": { + "version": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "0.1.2" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true, + "requires": { + "through": "2.3.8" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", + "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", + "dev": true + }, + "querystringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz", + "integrity": "sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs=", + "dev": true + }, + "queue": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/queue/-/queue-3.1.0.tgz", + "integrity": "sha1-bEnQHwCeIlZ4h4nyv/rGuLmZBYU=", + "dev": true, + "requires": { + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + }, + "randomatic": { + "version": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha1-x6vpzIuHwLqodrGf3oP9RkeX44w=", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" + } + } + } + }, + "read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", + "dev": true, + "requires": { + "mute-stream": "0.0.7" + } + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz" + } + }, + "regex-cache": { + "version": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha1-db3FiioUls7EihKDW8VMjVYjNt0=", + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "request": { + "version": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha1-ygtl2gLtYpNYh4COb1EDgQNOM1Y=", + "dev": true, + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "forever-agent": "0.6.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "dev": true, + "requires": { + "hoek": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "dev": true, + "requires": { + "boom": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz" + }, + "dependencies": { + "boom": { + "version": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha1-XdnabuOl8wIHdDYpDLcX0/SlTgI=", + "dev": true, + "requires": { + "hoek": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz" + } + } + } + }, + "form-data": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "dev": true, + "requires": { + "ajv": "5.5.0", + "har-schema": "2.0.0" + } + }, + "hawk": { + "version": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha1-r02RTrBl+bXOTZ0RwcshJu7MMDg=", + "dev": true, + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "sntp": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz" + } + }, + "hoek": { + "version": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha1-ctnQdU9/4lyi0BrY+PmpRJqJUm0=", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "qs": { + "version": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha1-NJzfbu+J7EXBLX1es/wMhwNDptg=", + "dev": true + }, + "sntp": { + "version": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha1-LGzsFP7cIiJznK+bXD2F0cxaLMg=", + "dev": true, + "requires": { + "hoek": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + } + } + } + }, + "request-light": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.1.0.tgz", + "integrity": "sha1-/mXd/7suh5RPDMr9hcuDnpE4U0U=", + "requires": { + "http-proxy-agent": "0.2.7", + "https-proxy-agent": "0.3.6", + "vscode-nls": "1.0.7" + }, + "dependencies": { + "vscode-nls": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-1.0.7.tgz", + "integrity": "sha1-KYwB/Oh4AsZEwKFe9SajPGLA1Y4=" + } + } + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve": { + "version": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha1-HwmsznlsmnYlefMbLBzEw83fnzY=", + "dev": true, + "requires": { + "path-parse": "1.0.5" + } + }, + "resolve-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", + "dev": true, + "requires": { + "expand-tilde": "1.2.2", + "global-modules": "0.2.3" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "rimraf": { + "version": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", + "dev": true, + "requires": { + "glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz" + } + }, + "run-sequence": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/run-sequence/-/run-sequence-1.2.2.tgz", + "integrity": "sha1-UJWgvr6YczsBQL0I3YDsAw3azes=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "gulp-util": "3.0.8" + } + }, + "safe-buffer": { + "version": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=", + "dev": true + }, + "sax": { + "version": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", + "dev": true + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + }, + "sequencify": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", + "dev": true + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "source-map": { + "version": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" + }, + "source-map-resolve": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.3.1.tgz", + "integrity": "sha1-YQ9hIqRFuN1RU1oqcbeD38Ekh2E=", + "dev": true, + "requires": { + "atob": "1.1.3", + "resolve-url": "0.2.1", + "source-map-url": "0.3.0", + "urix": "0.1.0" + } + }, + "source-map-support": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.0.tgz", + "integrity": "sha512-vUoN3I7fHQe0R/SJLKRdKYuEdRGogsviXFkHHo17AWaTGv17VLnxw+CFXvqy+y4ORZ3doWLQcxRYfwKrsd/H7Q==", + "dev": true, + "requires": { + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.3.0.tgz", + "integrity": "sha1-fsrxO1e80J2opAxdJp2zN5nUqvk=", + "dev": true + }, + "sparkles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", + "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=", + "dev": true + }, + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "dev": true, + "requires": { + "through": "2.3.8" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "dev": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "stat-mode": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-0.2.2.tgz", + "integrity": "sha1-5sgLYjEj19gM8TLOU480YokHJQI=", + "dev": true + }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "dev": true, + "requires": { + "duplexer": "0.1.1" + } + }, + "stream-consume": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", + "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=", + "dev": true + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "streamfilter": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.5.tgz", + "integrity": "sha1-h1BxEb644phFFxe1Ec/tjwAqv1M=", + "dev": true, + "requires": { + "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "dev": true, + "requires": { + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + } + } + } + }, + "streamifier": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz", + "integrity": "sha1-l+mNj6TRBdYqJpHR3AfoINuN/E8=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "dev": true, + "requires": { + "first-chunk-stream": "1.0.0", + "is-utf8": "0.2.1" + } + }, + "strip-bom-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", + "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", + "dev": true, + "requires": { + "first-chunk-stream": "1.0.0", + "strip-bom": "2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } + } + }, + "strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "xtend": "4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "dev": true, + "requires": { + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + } + } + } + }, + "through2-filter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", + "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", + "dev": true, + "requires": { + "through2": "2.0.3", + "xtend": "4.0.1" + } + }, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "dev": true, + "requires": { + "os-homedir": "1.0.2" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "timers-ext": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.2.tgz", + "integrity": "sha1-YcxHp2wavTGV8UUn+XjViulMUgQ=", + "dev": true, + "requires": { + "es5-ext": "0.10.37", + "next-tick": "1.0.0" + } + }, + "tmp": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", + "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", + "dev": true, + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "to-absolute-glob": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz", + "integrity": "sha1-HN+kcqnvUMI57maZm2YsoOs5k38=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1" + } + }, + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "dev": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tslib": { + "version": "https://registry.npmjs.org/tslib/-/tslib-1.8.0.tgz", + "integrity": "sha1-3GBOutZLy/aW1hPabJVKoOfqHrY=", + "dev": true + }, + "tslint": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.8.0.tgz", + "integrity": "sha1-H0mtWy53x2w69N3K5VKuTjYS6xM=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "builtin-modules": "1.1.1", + "chalk": "2.3.0", + "commander": "2.9.0", + "diff": "3.2.0", + "glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "resolve": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "semver": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "tslib": "https://registry.npmjs.org/tslib/-/tslib-1.8.0.tgz", + "tsutils": "2.12.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "semver": { + "version": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha1-4FnAnYVx8FQII3M0M1BdOi8AsY4=", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "tsutils": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.12.2.tgz", + "integrity": "sha1-rVikhl0X7D3bZjG2ylO+FKVlb/M=", + "dev": true, + "requires": { + "tslib": "https://registry.npmjs.org/tslib/-/tslib-1.8.0.tgz" + } + }, + "tunnel": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", + "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=", + "dev": true + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "dev": true + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "typed-rest-client": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-0.9.0.tgz", + "integrity": "sha1-92jMDcP06VDwbgSCXDaz54NKofI=", + "dev": true, + "requires": { + "tunnel": "0.0.4", + "underscore": "1.8.3" + } + }, + "typescript": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.1.tgz", + "integrity": "sha1-7znN6ierrAtQAkLWcmq5DgyEZjE=", + "dev": true + }, + "uc.micro": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.3.tgz", + "integrity": "sha1-ftUNXg+an7ClczeSWfKndFjVAZI=", + "dev": true + }, + "ultron": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", + "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=" + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "unique-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", + "dev": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url-join": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz", + "integrity": "sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg=", + "dev": true + }, + "url-parse": { + "version": "https://registry.npmjs.org/url-parse/-/url-parse-1.2.0.tgz", + "integrity": "sha1-OhnoqqbQI93SfcxEy0/I9/7COYY=", + "dev": true, + "requires": { + "querystringify": "1.0.0", + "requires-port": "1.0.0" + } + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha1-PdPT55Crwk17DToDT/q6vijrvAQ=", + "dev": true + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "1.1.1" + } + }, + "vali-date": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", + "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", + "dev": true, + "requires": { + "defaults": "1.0.3", + "glob-stream": "3.1.18", + "glob-watcher": "0.0.6", + "graceful-fs": "3.0.11", + "mkdirp": "0.5.1", + "strip-bom": "1.0.0", + "through2": "0.6.5", + "vinyl": "0.4.6" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "0.2.0", + "clone-stats": "0.0.1" + } + } + } + }, + "vinyl-source-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-source-stream/-/vinyl-source-stream-1.1.0.tgz", + "integrity": "sha1-RMvlEIIFJ53rDFZTwJSiiHk4sas=", + "dev": true, + "requires": { + "through2": "0.6.5", + "vinyl": "0.4.6" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "0.2.0", + "clone-stats": "0.0.1" + } + } + } + }, + "vsce": { + "version": "1.33.2", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.33.2.tgz", + "integrity": "sha1-NkX2mq+YTiL3TqSdNfON0Y1m/18=", + "dev": true, + "requires": { + "cheerio": "1.0.0-rc.2", + "commander": "2.9.0", + "denodeify": "1.2.1", + "glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "lodash": "4.17.4", + "markdown-it": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.0.tgz", + "mime": "1.6.0", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "osenv": "0.1.4", + "parse-semver": "1.1.1", + "read": "1.0.7", + "semver": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "tmp": "0.0.29", + "url-join": "1.1.0", + "vso-node-api": "6.1.2-preview", + "yauzl": "2.9.1", + "yazl": "2.4.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + }, + "semver": { + "version": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha1-4FnAnYVx8FQII3M0M1BdOi8AsY4=", + "dev": true + } + } + }, + "vscode": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.8.tgz", + "integrity": "sha512-kT6sIA1AEKR5M+us2fXk5dxwV9SR/IEdLHNmVW4/dl1wNBHoEvgIo1qMQwHNxPVTQmw70KTGZ9UVeVb8FbpNFA==", + "dev": true, + "requires": { + "glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "gulp-chmod": "2.0.0", + "gulp-filter": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.0.1.tgz", + "gulp-gunzip": "1.0.0", + "gulp-remote-src": "0.4.3", + "gulp-symdest": "1.1.0", + "gulp-untar": "0.0.6", + "gulp-vinyl-zip": "2.1.0", + "mocha": "4.0.1", + "request": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "semver": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "source-map-support": "0.5.0", + "url-parse": "https://registry.npmjs.org/url-parse/-/url-parse-1.2.0.tgz", + "vinyl-source-stream": "1.1.0" + }, + "dependencies": { + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" + } + }, + "diff": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", + "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", + "dev": true + }, + "growl": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "dev": true + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "mocha": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.0.1.tgz", + "integrity": "sha512-evDmhkoA+cBNiQQQdSKZa2b9+W2mpLoj50367lhy+Klnx9OV8XlCIhigUnn1gaTFLQCa0kdNhEGDr0hCXOQFDw==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.3.1", + "escape-string-regexp": "1.0.5", + "glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "growl": "1.10.3", + "he": "1.1.1", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + } + }, + "semver": { + "version": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha1-4FnAnYVx8FQII3M0M1BdOi8AsY4=", + "dev": true + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "vscode-chrome-debug-core": { + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/vscode-chrome-debug-core/-/vscode-chrome-debug-core-3.19.0.tgz", + "integrity": "sha1-70aLFweJqQhC+2wsQVS7OsZXvvc=", + "requires": { + "@types/source-map": "https://registry.npmjs.org/@types/source-map/-/source-map-0.1.29.tgz", + "glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "noice-json-rpc": "1.0.1", + "request-light": "0.1.0", + "source-map": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "vscode-debugadapter": "https://registry.npmjs.org/vscode-debugadapter/-/vscode-debugadapter-1.24.0.tgz", + "vscode-debugprotocol": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.24.0.tgz", + "vscode-nls": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz", + "ws": "1.1.5" + } + }, + "vscode-chrome-debug-core-testsupport": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/vscode-chrome-debug-core-testsupport/-/vscode-chrome-debug-core-testsupport-3.17.1.tgz", + "integrity": "sha1-DUazMXWZooWLSkz+QgzDUuQZiBw=", + "dev": true, + "requires": { + "vscode-debugadapter-testsupport": "1.24.0" + }, + "dependencies": { + "vscode-debugadapter-testsupport": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/vscode-debugadapter-testsupport/-/vscode-debugadapter-testsupport-1.24.0.tgz", + "integrity": "sha1-rDZ1scU/wW+1JMvSt+znEhtiXng=", + "dev": true, + "requires": { + "vscode-debugprotocol": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.24.0.tgz" + } + } + } + }, + "vscode-debugadapter": { + "version": "https://registry.npmjs.org/vscode-debugadapter/-/vscode-debugadapter-1.24.0.tgz", + "integrity": "sha1-KAY7AcyorB5fehPRGOMgem6If/0=", + "requires": { + "vscode-debugprotocol": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.24.0.tgz" + } + }, + "vscode-debugadapter-testsupport": { + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/vscode-debugadapter-testsupport/-/vscode-debugadapter-testsupport-1.23.0.tgz", + "integrity": "sha1-pItd5CrYChckDZxRHDeGA41pbRs=", + "dev": true, + "requires": { + "vscode-debugprotocol": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.24.0.tgz" + } + }, + "vscode-debugprotocol": { + "version": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.24.0.tgz", + "integrity": "sha1-28EOjX2VsQJyehmvPw/O9+JSsI4=" + }, + "vscode-nls": { + "version": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz", + "integrity": "sha1-gIUiOAhEuK0VNJmvXDsDkhrqAto=" + }, + "vscode-nls-dev": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/vscode-nls-dev/-/vscode-nls-dev-2.1.6.tgz", + "integrity": "sha512-1IylC/ekENYqz1vEItfrzrMXS8LW9aZQnNTU6BfdwT0Jddzed+l+nvU8amgVKFFmC1/GoiMFk5wtC20zWBbEbw==", + "dev": true, + "requires": { + "clone": "1.0.3", + "event-stream": "3.3.4", + "glob": "6.0.4", + "gulp-util": "3.0.8", + "iconv-lite": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "is": "3.2.1", + "source-map": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "typescript": "2.6.1", + "vinyl": "1.2.0", + "xml2js": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "yargs": "3.32.0" + }, + "dependencies": { + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "dev": true, + "requires": { + "inflight": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "vso-node-api": { + "version": "6.1.2-preview", + "resolved": "https://registry.npmjs.org/vso-node-api/-/vso-node-api-6.1.2-preview.tgz", + "integrity": "sha1-qrNUbfJFHs2JTgcbuZtd8Zxfp48=", + "dev": true, + "requires": { + "q": "1.5.1", + "tunnel": "0.0.4", + "typed-rest-client": "0.9.0", + "underscore": "1.8.3" + } + }, + "which": { + "version": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha1-/wS9/AEO5UfXgL7DjhrBwnd9JTo=", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, + "wrappy": { + "version": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "ws": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", + "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", + "requires": { + "options": "0.0.6", + "ultron": "1.0.2" + } + }, + "xml2js": { + "version": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha1-aGwg8hMgnpSr8NG88e+qKRx4J6c=", + "dev": true, + "requires": { + "sax": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "xmlbuilder": "9.0.4" + } + }, + "xmlbuilder": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz", + "integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "dev": true, + "requires": { + "camelcase": "2.1.1", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "string-width": "1.0.2", + "window-size": "0.1.4", + "y18n": "3.2.1" + } + }, + "yauzl": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.9.1.tgz", + "integrity": "sha1-qBmB6nCleUYTOIPwKcWCGok1mn8=", + "dev": true, + "requires": { + "buffer-crc32": "0.2.13", + "fd-slicer": "1.0.1" + } + }, + "yazl": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.4.3.tgz", + "integrity": "sha1-7CblzIfVYBud+EMtvdPNLlFzoHE=", + "dev": true, + "requires": { + "buffer-crc32": "0.2.13" + } + } + } +} \ No newline at end of file diff --git a/extensions/package.json b/extensions/package.json index ce3a1287ac2..339d071066a 100644 --- a/extensions/package.json +++ b/extensions/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "Dependencies shared by all extensions", "dependencies": { - "typescript": "2.6.2-insiders.20171120" + "typescript": "2.6.2" }, "scripts": { "postinstall": "node ./postinstall" diff --git a/extensions/php/package.json b/extensions/php/package.json index 7d4eb5204e3..6954ae5c661 100644 --- a/extensions/php/package.json +++ b/extensions/php/package.json @@ -53,7 +53,7 @@ "snippets": [ { "language": "php", - "path": "./snippets/php.json" + "path": "./snippets/php.snippets.json" } ], "configuration": { diff --git a/extensions/php/snippets/php.json b/extensions/php/snippets/php.snippets.json similarity index 95% rename from extensions/php/snippets/php.json rename to extensions/php/snippets/php.snippets.json index 24a4426a54a..4ae37b3a6e0 100644 --- a/extensions/php/snippets/php.json +++ b/extensions/php/snippets/php.snippets.json @@ -234,5 +234,19 @@ "$0" ], "description": "Throw exception" + }, + "Region Start": { + "prefix": "#region", + "body": [ + "#region" + ], + "description": "Folding Region Start" + }, + "Region End": { + "prefix": "#endregion", + "body": [ + "#endregion" + ], + "description": "Folding Region End" } } \ No newline at end of file diff --git a/extensions/php/src/features/completionItemProvider.ts b/extensions/php/src/features/completionItemProvider.ts index c948c8357ad..601944f277c 100644 --- a/extensions/php/src/features/completionItemProvider.ts +++ b/extensions/php/src/features/completionItemProvider.ts @@ -5,12 +5,12 @@ 'use strict'; -import { CompletionItemProvider, CompletionItem, CompletionItemKind, CancellationToken, TextDocument, Position, Range, TextEdit, workspace } from 'vscode'; +import { CompletionItemProvider, CompletionItem, CompletionItemKind, CancellationToken, TextDocument, Position, Range, TextEdit, workspace, CompletionContext } from 'vscode'; import phpGlobals = require('./phpGlobals'); export default class PHPCompletionItemProvider implements CompletionItemProvider { - public provideCompletionItems(document: TextDocument, position: Position, _token: CancellationToken): Promise { + public provideCompletionItems(document: TextDocument, position: Position, _token: CancellationToken, context: CompletionContext): Promise { let result: CompletionItem[] = []; let shouldProvideCompletionItems = workspace.getConfiguration('php').get('suggest.basic', true); @@ -24,6 +24,14 @@ export default class PHPCompletionItemProvider implements CompletionItemProvider range = new Range(position, position); } + if (context.triggerCharacter === '>') { + const twoBeforeCursor = new Position(position.line, Math.max(0, position.character - 2)); + const previousTwoChars = document.getText(new Range(twoBeforeCursor, position)); + if (previousTwoChars !== '->') { + return Promise.resolve(result); + } + } + var added: any = {}; var createNewProposal = function (kind: CompletionItemKind, name: string, entry: phpGlobals.IEntry | null): CompletionItem { var proposal: CompletionItem = new CompletionItem(name); diff --git a/extensions/php/src/phpMain.ts b/extensions/php/src/phpMain.ts index 320f9da2c52..64eda6c7809 100644 --- a/extensions/php/src/phpMain.ts +++ b/extensions/php/src/phpMain.ts @@ -23,7 +23,6 @@ export function activate(context: vscode.ExtensionContext): any { context.subscriptions.push(vscode.languages.registerHoverProvider('php', new PHPHoverProvider())); context.subscriptions.push(vscode.languages.registerSignatureHelpProvider('php', new PHPSignatureHelpProvider(), '(', ',')); - // need to set in the extension host as well as the completion provider uses it. vscode.languages.setLanguageConfiguration('php', { wordPattern: /(-?\d*\.\d\w*)|([^\-\`\~\!\@\#\%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, diff --git a/extensions/python/language-configuration.json b/extensions/python/language-configuration.json index 14ad98220b4..736124425d7 100644 --- a/extensions/python/language-configuration.json +++ b/extensions/python/language-configuration.json @@ -13,7 +13,23 @@ { "open": "[", "close": "]" }, { "open": "(", "close": ")" }, { "open": "\"", "close": "\"", "notIn": ["string"] }, - { "open": "'", "close": "'", "notIn": ["string", "comment"] } + { "open": "r\"", "close": "\"", "notIn": ["string", "comment"] }, + { "open": "R\"", "close": "\"", "notIn": ["string", "comment"] }, + { "open": "u\"", "close": "\"", "notIn": ["string", "comment"] }, + { "open": "U\"", "close": "\"", "notIn": ["string", "comment"] }, + { "open": "f\"", "close": "\"", "notIn": ["string", "comment"] }, + { "open": "F\"", "close": "\"", "notIn": ["string", "comment"] }, + { "open": "b\"", "close": "\"", "notIn": ["string", "comment"] }, + { "open": "B\"", "close": "\"", "notIn": ["string", "comment"] }, + { "open": "'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "r'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "R'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "u'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "U'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "f'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "F'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "b'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "B'", "close": "'", "notIn": ["string", "comment"] } ], "surroundingPairs": [ ["{", "}"], diff --git a/extensions/ruby/language-configuration.json b/extensions/ruby/language-configuration.json index fc4125f0691..04a0fae6e09 100644 --- a/extensions/ruby/language-configuration.json +++ b/extensions/ruby/language-configuration.json @@ -23,7 +23,7 @@ ["'", "'"] ], "indentationRules": { - "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while)|(.*\\sdo\\b))\\b[^\\{;]*$", - "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif)\\b)" + "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|(.*\\sdo\\b)|(.*=\\s*(case|if|unless)))\\b[^\\{;]*$", + "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)" } } diff --git a/extensions/scss/language-configuration.json b/extensions/scss/language-configuration.json index 36a9cccd688..bdf0984ec18 100644 --- a/extensions/scss/language-configuration.json +++ b/extensions/scss/language-configuration.json @@ -21,5 +21,11 @@ ["(", ")"], ["\"", "\""], ["'", "'"] - ] + ], + "folding": { + "markers": { + "start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/", + "end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/" + } + } } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/dark_plus.json b/extensions/theme-defaults/themes/dark_plus.json index 6fdfb2263ce..fe868c9a375 100644 --- a/extensions/theme-defaults/themes/dark_plus.json +++ b/extensions/theme-defaults/themes/dark_plus.json @@ -80,8 +80,7 @@ { "name": "Object keys, TS grammar specific", "scope": [ - "meta.object-literal.key", - "meta.object-literal.key entity.name.function" + "meta.object-literal.key" ], "settings": { "foreground": "#9CDCFE" diff --git a/extensions/theme-defaults/themes/hc_black.json b/extensions/theme-defaults/themes/hc_black.json index 5cadf6c65cf..c34b0981fd6 100644 --- a/extensions/theme-defaults/themes/hc_black.json +++ b/extensions/theme-defaults/themes/hc_black.json @@ -84,8 +84,7 @@ { "name": "Object keys, TS grammar specific", "scope": [ - "meta.object-literal.key", - "meta.object-literal.key entity.name.function" + "meta.object-literal.key" ], "settings": { "foreground": "#9CDCFE" diff --git a/extensions/theme-defaults/themes/light_plus.json b/extensions/theme-defaults/themes/light_plus.json index 3d5775ecec5..0ab71013c2f 100644 --- a/extensions/theme-defaults/themes/light_plus.json +++ b/extensions/theme-defaults/themes/light_plus.json @@ -80,8 +80,7 @@ { "name": "Object keys, TS grammar specific", "scope": [ - "meta.object-literal.key", - "meta.object-literal.key entity.name.function" + "meta.object-literal.key" ], "settings": { "foreground": "#001080" diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index fc9e8f7db2c..0e0bcae413e 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -245,7 +245,7 @@ ], "settings": { "fontStyle": "italic", - "foreground": "#91B3E0" + "foreground": "#8190A0" } }, { @@ -460,7 +460,25 @@ "background": "#DDFFDD", "foreground": "#434343" } - } + }, + { + "name": "JSX: Tags", + "scope": [ + "punctuation.definition.tag.js", + "punctuation.definition.tag.begin.js", + "punctuation.definition.tag.end.js" + ], + "settings": { + "foreground": "#91B3E0" + } + }, + { + "name": "JSX: InnerText", + "scope": "meta.jsx.children.js", + "settings": { + "foreground": "#333333ff" + } + } ], "colors": { "focusBorder": "#A6B39B", @@ -511,4 +529,4 @@ "badge.background": "#705697AA", "progressBar.background": "#705697" } -} \ No newline at end of file +} diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index 6d2e4f19230..1997b63f7f7 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -38,7 +38,7 @@ "onCommand:typescript.openTsServerLog", "onCommand:workbench.action.tasks.runTask" ], - "main": "./out/typescriptMain", + "main": "./out/extension", "contributes": { "languages": [ { @@ -483,23 +483,23 @@ "commandPalette": [ { "command": "typescript.reloadProjects", - "when": "editorLangId == 'typescript'" + "when": "editorLangId == typescript && typescript.isManagedFile" }, { "command": "typescript.reloadProjects", - "when": "editorLangId == typescriptreact" + "when": "editorLangId == typescriptreact && typescript.isManagedFile" }, { "command": "javascript.reloadProjects", - "when": "editorLangId == 'javascript'" + "when": "editorLangId == javascript && typescript.isManagedFile" }, { "command": "javascript.reloadProjects", - "when": "editorLangId == javascriptreact" + "when": "editorLangId == javascriptreact && typescript.isManagedFile" }, { "command": "typescript.goToProjectConfig", - "when": "editorLangId == 'typescript'" + "when": "editorLangId == typescript && typescript.isManagedFile" }, { "command": "typescript.goToProjectConfig", @@ -507,11 +507,23 @@ }, { "command": "javascript.goToProjectConfig", - "when": "editorLangId == 'javascript'" + "when": "editorLangId == javascript && typescript.isManagedFile" }, { "command": "javascript.goToProjectConfig", - "when": "editorLangId == javascriptreact" + "when": "editorLangId == javascriptreact && typescript.isManagedFile" + }, + { + "command": "typescript.selectTypeScriptVersion", + "when": "typescript.isManagedFile" + }, + { + "command": "typescript.openTsServerLog", + "when": "typescript.isManagedFile" + }, + { + "command": "typescript.restartTsServer", + "when": "typescript.isManagedFile" } ] }, diff --git a/extensions/typescript/src/commands.ts b/extensions/typescript/src/commands.ts new file mode 100644 index 00000000000..357f063b20e --- /dev/null +++ b/extensions/typescript/src/commands.ts @@ -0,0 +1,100 @@ +/*--------------------------------------------------------------------------------------------- + * 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 { TypeScriptServiceClientHost } from './typescriptMain'; +import { Command } from './utils/commandManager'; +import { Lazy } from './utils/lazy'; + +export class ReloadTypeScriptProjectsCommand implements Command { + public readonly id = 'typescript.reloadProjects'; + + public constructor( + private readonly lazyClientHost: Lazy + ) { } + + public execute() { + this.lazyClientHost.value.reloadProjects(); + } +} + +export class ReloadJavaScriptProjectsCommand implements Command { + public readonly id = 'javascript.reloadProjects'; + + public constructor( + private readonly lazyClientHost: Lazy + ) { } + + public execute() { + this.lazyClientHost.value.reloadProjects(); + } +} + +export class SelectTypeScriptVersionCommand implements Command { + public readonly id = 'typescript.selectTypeScriptVersion'; + + public constructor( + private readonly lazyClientHost: Lazy + ) { } + + public execute() { + this.lazyClientHost.value.serviceClient.onVersionStatusClicked(); + } +} + +export class OpenTsServerLogCommand implements Command { + public readonly id = 'typescript.openTsServerLog'; + + public constructor( + private readonly lazyClientHost: Lazy + ) { } + + public execute() { + this.lazyClientHost.value.serviceClient.openTsServerLogFile(); + } +} + +export class RestartTsServerCommand implements Command { + public readonly id = 'typescript.restartTsServer'; + + public constructor( + private readonly lazyClientHost: Lazy + ) { } + + public execute() { + this.lazyClientHost.value.serviceClient.restartTsServer(); + } +} + +export class TypeScriptGoToProjectConfigCommand implements Command { + public readonly id = 'typescript.goToProjectConfig'; + + public constructor( + private readonly lazyClientHost: Lazy, + ) { } + + public execute() { + const editor = vscode.window.activeTextEditor; + if (editor) { + this.lazyClientHost.value.goToProjectConfig(true, editor.document.uri); + } + } +} + +export class JavaScriptGoToProjectConfigCommand implements Command { + public readonly id = 'javascript.goToProjectConfig'; + + public constructor( + private readonly lazyClientHost: Lazy, + ) { } + + public execute() { + const editor = vscode.window.activeTextEditor; + if (editor) { + this.lazyClientHost.value.goToProjectConfig(false, editor.document.uri); + } + } +} \ No newline at end of file diff --git a/extensions/typescript/src/extension.ts b/extensions/typescript/src/extension.ts new file mode 100644 index 00000000000..a6e1673b2cc --- /dev/null +++ b/extensions/typescript/src/extension.ts @@ -0,0 +1,97 @@ +/*--------------------------------------------------------------------------------------------- + * 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 { CommandManager } from './utils/commandManager'; +import { TypeScriptServiceClientHost } from './typescriptMain'; +import * as commands from './commands'; + +import TypeScriptTaskProviderManager from './features/taskProvider'; +import { getContributedTypeScriptServerPlugins, TypeScriptServerPlugin } from './utils/plugins'; +import * as ProjectStatus from './utils/projectStatus'; +import * as languageModeIds from './utils/languageModeIds'; +import * as languageConfigurations from './utils/languageConfigurations'; +import { standardLanguageDescriptions } from './utils/languageDescription'; +import ManagedFileContextManager from './utils/managedFileContext'; +import { lazy, Lazy } from './utils/lazy'; +import * as fileSchemes from './utils/fileSchemes'; + +export function activate( + context: vscode.ExtensionContext +): void { + const plugins = getContributedTypeScriptServerPlugins(); + + const commandManager = new CommandManager(); + context.subscriptions.push(commandManager); + + const lazyClientHost = createLazyClientHost(context, plugins, commandManager); + + registerCommands(commandManager, lazyClientHost); + context.subscriptions.push(new TypeScriptTaskProviderManager(lazyClientHost.map(x => x.serviceClient))); + context.subscriptions.push(vscode.languages.setLanguageConfiguration(languageModeIds.jsxTags, languageConfigurations.jsxTags)); + + const supportedLanguage = [].concat.apply([], standardLanguageDescriptions.map(x => x.modeIds).concat(plugins.map(x => x.languages))); + function didOpenTextDocument(textDocument: vscode.TextDocument): boolean { + if (isSupportedDocument(supportedLanguage, textDocument)) { + openListener.dispose(); + // Force activation + // tslint:disable-next-line:no-unused-expression + void lazyClientHost.value; + + context.subscriptions.push(new ManagedFileContextManager(resource => { + return lazyClientHost.value.serviceClient.normalizePath(resource); + })); + return true; + } + return false; + } + const openListener = vscode.workspace.onDidOpenTextDocument(didOpenTextDocument, undefined, context.subscriptions); + for (const textDocument of vscode.workspace.textDocuments) { + if (didOpenTextDocument(textDocument)) { + break; + } + } +} + +function createLazyClientHost( + context: vscode.ExtensionContext, + plugins: TypeScriptServerPlugin[], + commandManager: CommandManager +): Lazy { + return lazy(() => { + const clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.workspaceState, plugins, commandManager); + context.subscriptions.push(clientHost); + const host = clientHost; + clientHost.serviceClient.onReady().then(() => { + context.subscriptions.push(ProjectStatus.create(host.serviceClient, host.serviceClient.telemetryReporter, path => new Promise(resolve => setTimeout(() => resolve(host.handles(path)), 750)), context.workspaceState)); + }, () => { + // Nothing to do here. The client did show a message; + }); + return clientHost; + }); +} + +function registerCommands( + commandManager: CommandManager, + lazyClientHost: Lazy +) { + commandManager.register(new commands.ReloadTypeScriptProjectsCommand(lazyClientHost)); + commandManager.register(new commands.ReloadJavaScriptProjectsCommand(lazyClientHost)); + commandManager.register(new commands.SelectTypeScriptVersionCommand(lazyClientHost)); + commandManager.register(new commands.OpenTsServerLogCommand(lazyClientHost)); + commandManager.register(new commands.RestartTsServerCommand(lazyClientHost)); + commandManager.register(new commands.TypeScriptGoToProjectConfigCommand(lazyClientHost)); + commandManager.register(new commands.JavaScriptGoToProjectConfigCommand(lazyClientHost)); +} + +function isSupportedDocument( + supportedLanguage: string[], + document: vscode.TextDocument +): boolean { + if (supportedLanguage.indexOf(document.languageId) < 0) { + return false; + } + return fileSchemes.isSupportedScheme(document.uri.scheme); +} \ No newline at end of file diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index 35823bbca73..f3800d5cd10 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -328,21 +328,27 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP const detail = details[0]; item.detail = Previewer.plain(detail.displayParts); const documentation = new MarkdownString(); - if (item.source) { - let importPath = `'${item.source}'`; - // Try to resolve the real import name that will be added - if (detail.codeActions && detail.codeActions[0]) { - const action = detail.codeActions[0]; - if (action.changes[0] && action.changes[0].textChanges[0]) { - const textChange = action.changes[0].textChanges[0]; - const matchedImport = textChange.newText.match(/(['"])(.+?)\1/); - if (matchedImport) { - importPath = matchedImport[0]; - item.detail += ` — from ${matchedImport[0]}`; + if (detail.source) { + let importPath = `'${Previewer.plain(detail.source)}'`; + + if (this.client.apiVersion.has260Features() && !this.client.apiVersion.has262Features()) { + // Try to resolve the real import name that will be added + if (detail.codeActions && detail.codeActions[0]) { + const action = detail.codeActions[0]; + if (action.changes[0] && action.changes[0].textChanges[0]) { + const textChange = action.changes[0].textChanges[0]; + const matchedImport = textChange.newText.match(/(['"])(.+?)\1/); + if (matchedImport) { + importPath = matchedImport[0]; + item.detail += ` — from ${matchedImport[0]}`; + } } } + documentation.appendMarkdown(localize('autoImportLabel', 'Auto import from {0}', importPath)); + } else { + const autoImportLabel = localize('autoImportLabel', 'Auto import from {0}', importPath); + item.detail = `${autoImportLabel}\n${item.detail}`; } - documentation.appendMarkdown(localize('autoImportLabel', 'Auto import from {0}', importPath)); documentation.appendMarkdown('\n\n'); } @@ -372,13 +378,13 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP }); } - private isValidFunctionCompletionContext(filepath: string, position: Position): Promise { - const args = vsPositionToTsFileLocation(filepath, position); + private async isValidFunctionCompletionContext(filepath: string, position: Position): Promise { // Workaround for https://github.com/Microsoft/TypeScript/issues/12677 // Don't complete function calls inside of destructive assigments or imports - return this.client.execute('quickinfo', args).then(infoResponse => { + try { + const infoResponse = await this.client.execute('quickinfo', vsPositionToTsFileLocation(filepath, position)); const info = infoResponse.body; - switch (info && info.kind as string) { + switch (info && info.kind) { case 'var': case 'let': case 'const': @@ -387,35 +393,40 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP default: return true; } - }, () => { + } catch (e) { return true; - }); + } } private snippetForFunctionCall(detail: CompletionEntryDetails): SnippetString { const suggestionArgumentNames: string[] = []; + let hasOptionalParemeters = false; let parenCount = 0; - for (let i = 0; i < detail.displayParts.length; ++i) { + let i = 0; + for (; i < detail.displayParts.length; ++i) { const part = detail.displayParts[i]; // Only take top level paren names if (part.kind === 'parameterName' && parenCount === 1) { - suggestionArgumentNames.push(`\${${i + 1}:${part.text}}`); + const next = detail.displayParts[i + 1]; + // Skip optional parameters + const nameIsFollowedByOptionalIndicator = next && next.text === '?'; + if (!nameIsFollowedByOptionalIndicator) { + suggestionArgumentNames.push(`\${${i + 1}:${part.text}}`); + } + hasOptionalParemeters = hasOptionalParemeters || nameIsFollowedByOptionalIndicator; } else if (part.kind === 'punctuation') { if (part.text === '(') { ++parenCount; } else if (part.text === ')') { --parenCount; + } else if (part.text === '...' && parenCount === 1) { + // Found rest parmeter. Do not fill in any further arguments + hasOptionalParemeters = true; + break; } } } - - let codeSnippet = detail.name; - if (suggestionArgumentNames.length > 0) { - codeSnippet += '(' + suggestionArgumentNames.join(', ') + ')$0'; - } else { - codeSnippet += '()'; - } - + const codeSnippet = `${detail.name}(${suggestionArgumentNames.join(', ')}${hasOptionalParemeters ? '${' + i + '}' : ''})$0`; return new SnippetString(codeSnippet); } diff --git a/extensions/typescript/src/features/formattingProvider.ts b/extensions/typescript/src/features/formattingProvider.ts index 6a149b96f75..390ae6dc91b 100644 --- a/extensions/typescript/src/features/formattingProvider.ts +++ b/extensions/typescript/src/features/formattingProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, FormattingOptions, TextDocument, Position, Range, CancellationToken, TextEdit, WorkspaceConfiguration, Disposable, languages, workspace } from 'vscode'; +import { DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, FormattingOptions, TextDocument, Position, Range, CancellationToken, TextEdit, WorkspaceConfiguration, Disposable, languages, workspace, DocumentSelector } from 'vscode'; import * as Proto from '../protocol'; import { ITypeScriptServiceClient } from '../typescriptService'; @@ -75,7 +75,7 @@ export class TypeScriptFormattingProvider implements DocumentRangeFormattingEdit if (!filepath) { return []; } - let args: Proto.FormatOnKeyRequestArgs = { + const args: Proto.FormatOnKeyRequestArgs = { file: filepath, line: position.line + 1, offset: position.character + 1, @@ -123,7 +123,7 @@ export class FormattingProviderManager { constructor( private readonly modeId: string, private readonly formattingProvider: TypeScriptFormattingProvider, - private readonly selector: string[] + private readonly selector: DocumentSelector ) { } public dispose() { diff --git a/extensions/typescript/src/features/quickFixProvider.ts b/extensions/typescript/src/features/quickFixProvider.ts index 5a8c74f6b2f..9293818f1b0 100644 --- a/extensions/typescript/src/features/quickFixProvider.ts +++ b/extensions/typescript/src/features/quickFixProvider.ts @@ -9,19 +9,38 @@ import * as Proto from '../protocol'; import { ITypeScriptServiceClient } from '../typescriptService'; import { vsRangeToTsFileRange } from '../utils/convert'; import FormattingConfigurationManager from './formattingConfigurationManager'; -import { getEditForCodeAction } from '../utils/codeAction'; +import { getEditForCodeAction, applyCodeActionCommands } from '../utils/codeAction'; +import { Command, CommandManager } from '../utils/commandManager'; interface NumberSet { [key: number]: boolean; } +class ApplyCodeActionCommand implements Command { + public static readonly ID = '_typescript.applyCodeActionCommand'; + public readonly id = ApplyCodeActionCommand.ID; + + constructor( + private readonly client: ITypeScriptServiceClient + ) { } + + public async execute( + actions: Proto.CodeAction + ): Promise { + return applyCodeActionCommands(this.client, actions); + } +} + export default class TypeScriptQuickFixProvider implements vscode.CodeActionProvider { private _supportedCodeActions?: Thenable; constructor( private readonly client: ITypeScriptServiceClient, - private readonly formattingConfigurationManager: FormattingConfigurationManager - ) { } + private readonly formattingConfigurationManager: FormattingConfigurationManager, + commandManager: CommandManager + ) { + commandManager.register(new ApplyCodeActionCommand(client)); + } public provideCodeActions( _document: vscode.TextDocument, @@ -88,6 +107,11 @@ export default class TypeScriptQuickFixProvider implements vscode.CodeActionProv return { title: action.description, edits: getEditForCodeAction(this.client, action), + command: action.commands ? { + command: ApplyCodeActionCommand.ID, + arguments: [action], + title: action.description + } : undefined, diagnostics: [] }; } diff --git a/extensions/typescript/src/features/refactorProvider.ts b/extensions/typescript/src/features/refactorProvider.ts index 312ac3ed0b8..e2a6da69e7c 100644 --- a/extensions/typescript/src/features/refactorProvider.ts +++ b/extensions/typescript/src/features/refactorProvider.ts @@ -49,7 +49,7 @@ class ApplyRefactoringCommand implements Command { const renameLocation = response.body.renameLocation; if (renameLocation) { - if (vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.uri.fsPath === file) { + if (vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.uri.fsPath === document.uri.fsPath) { const pos = tsLocationToVsPosition(renameLocation); vscode.window.activeTextEditor.selection = new vscode.Selection(pos, pos); await vscode.commands.executeCommand('editor.action.rename'); diff --git a/extensions/typescript/src/features/taskProvider.ts b/extensions/typescript/src/features/taskProvider.ts index 6582ad68e82..12244de22f2 100644 --- a/extensions/typescript/src/features/taskProvider.ts +++ b/extensions/typescript/src/features/taskProvider.ts @@ -15,6 +15,7 @@ import TsConfigProvider, { TSConfig } from '../utils/tsconfigProvider'; import { isImplicitProjectConfigFile } from '../utils/tsconfig'; import * as nls from 'vscode-nls'; +import { Lazy } from '../utils/lazy'; const localize = nls.loadMessageBundle(); type AutoDetect = 'on' | 'off' | 'build' | 'watch'; @@ -42,7 +43,7 @@ class TscTaskProvider implements vscode.TaskProvider { private readonly disposables: vscode.Disposable[] = []; public constructor( - private readonly lazyClient: () => ITypeScriptServiceClient + private readonly client: Lazy ) { this.tsconfigProvider = new TsConfigProvider(); @@ -104,7 +105,7 @@ class TscTaskProvider implements vscode.TaskProvider { } try { - const res: Proto.ProjectInfoResponse = await this.lazyClient().execute( + const res: Proto.ProjectInfoResponse = await this.client.value.execute( 'projectInfo', { file, needFileNameList: false }, token); @@ -123,8 +124,7 @@ class TscTaskProvider implements vscode.TaskProvider { workspaceFolder: folder }]; } - } - catch (e) { + } catch (e) { // noop } return []; @@ -134,32 +134,47 @@ class TscTaskProvider implements vscode.TaskProvider { return Array.from(await this.tsconfigProvider.getConfigsForWorkspace()); } - private async getCommand(project: TSConfig): Promise { + private static async getCommand(project: TSConfig): Promise { if (project.workspaceFolder) { - const platform = process.platform; - const bin = path.join(project.workspaceFolder.uri.fsPath, 'node_modules', '.bin'); - if (platform === 'win32' && await exists(path.join(bin, 'tsc.cmd'))) { - return path.join(bin, 'tsc.cmd'); - } else if ((platform === 'linux' || platform === 'darwin') && await exists(path.join(bin, 'tsc'))) { - return path.join(bin, 'tsc'); + const localTsc = await TscTaskProvider.getLocalTscAtPath(path.dirname(project.path)); + if (localTsc) { + return localTsc; + } + + const workspaceTsc = await TscTaskProvider.getLocalTscAtPath(project.workspaceFolder.uri.fsPath); + if (workspaceTsc) { + return workspaceTsc; } } + + // Use global tsc version return 'tsc'; } + private static async getLocalTscAtPath(folderPath: string): Promise { + const platform = process.platform; + const bin = path.join(folderPath, 'node_modules', '.bin'); + if (platform === 'win32' && await exists(path.join(bin, 'tsc.cmd'))) { + return path.join(bin, 'tsc.cmd'); + } else if ((platform === 'linux' || platform === 'darwin') && await exists(path.join(bin, 'tsc'))) { + return path.join(bin, 'tsc'); + } + return undefined; + } + private getActiveTypeScriptFile(): string | null { const editor = vscode.window.activeTextEditor; if (editor) { const document = editor.document; if (document && (document.languageId === 'typescript' || document.languageId === 'typescriptreact')) { - return this.lazyClient().normalizePath(document.uri); + return this.client.value.normalizePath(document.uri); } } return null; } private async getTasksForProject(project: TSConfig): Promise { - const command = await this.getCommand(project); + const command = await TscTaskProvider.getCommand(project); const label = this.getLabelForTasks(project); const tasks: vscode.Task[] = []; @@ -221,14 +236,14 @@ class TscTaskProvider implements vscode.TaskProvider { } /** - * Manages registrations of TypeScript task provides with VScode. + * Manages registrations of TypeScript task providers with VS Code. */ export default class TypeScriptTaskProviderManager { private taskProviderSub: vscode.Disposable | undefined = undefined; private readonly disposables: vscode.Disposable[] = []; constructor( - private readonly lazyClient: () => ITypeScriptServiceClient + private readonly client: Lazy ) { vscode.workspace.onDidChangeConfiguration(this.onConfigurationChanged, this, this.disposables); this.onConfigurationChanged(); @@ -248,7 +263,7 @@ export default class TypeScriptTaskProviderManager { this.taskProviderSub.dispose(); this.taskProviderSub = undefined; } else if (!this.taskProviderSub && autoDetect !== 'off') { - this.taskProviderSub = vscode.workspace.registerTaskProvider('typescript', new TscTaskProvider(this.lazyClient)); + this.taskProviderSub = vscode.workspace.registerTaskProvider('typescript', new TscTaskProvider(this.client)); } } } \ No newline at end of file diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 3c620dc95cf..82dd3b9326d 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -8,7 +8,7 @@ * https://github.com/Microsoft/TypeScript-Sublime-Plugin/blob/master/TypeScript%20Indent.tmPreferences * ------------------------------------------------------------------------------------------ */ -import { env, languages, commands, workspace, window, ExtensionContext, Memento, Diagnostic, Range, Disposable, Uri, MessageItem, DiagnosticSeverity, TextDocument } from 'vscode'; +import { env, languages, commands, workspace, window, Memento, Diagnostic, Range, Disposable, Uri, MessageItem, DiagnosticSeverity, TextDocument, DocumentFilter } from 'vscode'; // This must be the first statement otherwise modules might got loaded with // the wrong locale. @@ -25,188 +25,18 @@ import TypeScriptServiceClient from './typescriptServiceClient'; import { ITypeScriptServiceClientHost } from './typescriptService'; import BufferSyncSupport from './features/bufferSyncSupport'; -import TypeScriptTaskProviderManager from './features/taskProvider'; -import * as ProjectStatus from './utils/projectStatus'; import TypingsStatus, { AtaProgressReporter } from './utils/typingsStatus'; import VersionStatus from './utils/versionStatus'; -import { getContributedTypeScriptServerPlugins, TypeScriptServerPlugin } from './utils/plugins'; +import { TypeScriptServerPlugin } from './utils/plugins'; import { openOrCreateConfigFile, isImplicitProjectConfigFile } from './utils/tsconfig'; import { tsLocationToVsPosition } from './utils/convert'; import FormattingConfigurationManager from './features/formattingConfigurationManager'; -import * as languageModeIds from './utils/languageModeIds'; import * as languageConfigurations from './utils/languageConfigurations'; -import { CommandManager, Command } from './utils/commandManager'; +import { CommandManager } from './utils/commandManager'; import DiagnosticsManager from './features/diagnostics'; - -interface LanguageDescription { - id: string; - diagnosticSource: string; - modeIds: string[]; - configFile?: string; - isExternal?: boolean; -} - -const standardLanguageDescriptions: LanguageDescription[] = [ - { - id: 'typescript', - diagnosticSource: 'ts', - modeIds: [languageModeIds.typescript, languageModeIds.typescriptreact], - configFile: 'tsconfig.json' - }, { - id: 'javascript', - diagnosticSource: 'js', - modeIds: [languageModeIds.javascript, languageModeIds.javascriptreact], - configFile: 'jsconfig.json' - } -]; - -class ReloadTypeScriptProjectsCommand implements Command { - public readonly id = 'typescript.reloadProjects'; - - public constructor( - private readonly lazyClientHost: () => TypeScriptServiceClientHost - ) { } - - public execute() { - this.lazyClientHost().reloadProjects(); - } -} - -class ReloadJavaScriptProjectsCommand implements Command { - public readonly id = 'javascript.reloadProjects'; - - public constructor( - private readonly lazyClientHost: () => TypeScriptServiceClientHost - ) { } - - public execute() { - this.lazyClientHost().reloadProjects(); - } -} - -class SelectTypeScriptVersionCommand implements Command { - public readonly id = 'typescript.selectTypeScriptVersion'; - - public constructor( - private readonly lazyClientHost: () => TypeScriptServiceClientHost - ) { } - - public execute() { - this.lazyClientHost().serviceClient.onVersionStatusClicked(); - } -} - -class OpenTsServerLogCommand implements Command { - public readonly id = 'typescript.openTsServerLog'; - - public constructor( - private readonly lazyClientHost: () => TypeScriptServiceClientHost - ) { } - - public execute() { - this.lazyClientHost().serviceClient.openTsServerLogFile(); - } -} - -class RestartTsServerCommand implements Command { - public readonly id = 'typescript.restartTsServer'; - - public constructor( - private readonly lazyClientHost: () => TypeScriptServiceClientHost - ) { } - - public execute() { - this.lazyClientHost().serviceClient.restartTsServer(); - } -} - -class TypeScriptGoToProjectConfigCommand implements Command { - public readonly id = 'typescript.goToProjectConfig'; - - public constructor( - private readonly lazyClientHost: () => TypeScriptServiceClientHost, - ) { } - - public execute() { - const editor = window.activeTextEditor; - if (editor) { - this.lazyClientHost().goToProjectConfig(true, editor.document.uri); - } - } -} - -class JavaScriptGoToProjectConfigCommand implements Command { - public readonly id = 'javascript.goToProjectConfig'; - - public constructor( - private readonly lazyClientHost: () => TypeScriptServiceClientHost, - ) { } - - public execute() { - const editor = window.activeTextEditor; - if (editor) { - this.lazyClientHost().goToProjectConfig(false, editor.document.uri); - } - } -} - -export function activate(context: ExtensionContext): void { - const plugins = getContributedTypeScriptServerPlugins(); - - const commandManager = new CommandManager(); - context.subscriptions.push(commandManager); - - const lazyClientHost = (() => { - let clientHost: TypeScriptServiceClientHost | undefined; - return () => { - if (!clientHost) { - clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.workspaceState, plugins, commandManager); - context.subscriptions.push(clientHost); - - const host = clientHost; - clientHost.serviceClient.onReady().then(() => { - context.subscriptions.push(ProjectStatus.create(host.serviceClient, host.serviceClient.telemetryReporter, - path => new Promise(resolve => setTimeout(() => resolve(host.handles(path)), 750)), - context.workspaceState)); - }, () => { - // Nothing to do here. The client did show a message; - }); - } - return clientHost; - }; - })(); - - commandManager.register(new ReloadTypeScriptProjectsCommand(lazyClientHost)); - commandManager.register(new ReloadJavaScriptProjectsCommand(lazyClientHost)); - commandManager.register(new SelectTypeScriptVersionCommand(lazyClientHost)); - commandManager.register(new OpenTsServerLogCommand(lazyClientHost)); - commandManager.register(new RestartTsServerCommand(lazyClientHost)); - commandManager.register(new TypeScriptGoToProjectConfigCommand(lazyClientHost)); - commandManager.register(new JavaScriptGoToProjectConfigCommand(lazyClientHost)); - - context.subscriptions.push(new TypeScriptTaskProviderManager(() => lazyClientHost().serviceClient)); - - context.subscriptions.push(languages.setLanguageConfiguration(languageModeIds.jsxTags, languageConfigurations.jsxTags)); - - const supportedLanguage = [].concat.apply([], standardLanguageDescriptions.map(x => x.modeIds).concat(plugins.map(x => x.languages))); - function didOpenTextDocument(textDocument: TextDocument): boolean { - if (supportedLanguage.indexOf(textDocument.languageId) >= 0) { - openListener.dispose(); - // Force activation - void lazyClientHost(); - return true; - } - return false; - } - const openListener = workspace.onDidOpenTextDocument(didOpenTextDocument); - for (let textDocument of workspace.textDocuments) { - if (didOpenTextDocument(textDocument)) { - break; - } - } -} - +import { LanguageDescription } from './utils/languageDescription'; +import * as fileSchemes from './utils/fileSchemes'; const validateSetting = 'validate.enable'; @@ -219,6 +49,8 @@ class LanguageProvider { private _validate: boolean = true; + private _documentSelector: DocumentFilter[]; + private readonly disposables: Disposable[] = []; private readonly versionDependentDisposables: Disposable[] = []; @@ -268,12 +100,24 @@ class LanguageProvider { this.formattingOptionsManager.dispose(); } + private get documentSelector(): DocumentFilter[] { + if (!this._documentSelector) { + this._documentSelector = []; + for (const language of this.description.modeIds) { + for (const scheme of fileSchemes.supportedSchemes) { + this._documentSelector.push({ language, scheme }); + } + } + } + return this._documentSelector; + } + private async registerProviders( client: TypeScriptServiceClient, commandManager: CommandManager, typingsStatus: TypingsStatus ): Promise { - const selector = this.description.modeIds; + const selector = this.documentSelector; const config = workspace.getConfiguration(this.id); this.disposables.push(languages.registerCompletionItemProvider(selector, @@ -300,7 +144,7 @@ class LanguageProvider { this.disposables.push(languages.registerDocumentSymbolProvider(selector, new (await import('./features/documentSymbolProvider')).default(client))); this.disposables.push(languages.registerSignatureHelpProvider(selector, new (await import('./features/signatureHelpProvider')).default(client), '(', ',')); this.disposables.push(languages.registerRenameProvider(selector, new (await import('./features/renameProvider')).default(client))); - this.disposables.push(languages.registerCodeActionsProvider(selector, new (await import('./features/quickFixProvider')).default(client, this.formattingOptionsManager))); + this.disposables.push(languages.registerCodeActionsProvider(selector, new (await import('./features/quickFixProvider')).default(client, this.formattingOptionsManager, commandManager))); this.disposables.push(languages.registerCodeActionsProvider(selector, new (await import('./features/refactorProvider')).default(client, this.formattingOptionsManager, commandManager))); this.registerVersionDependentProviders(); @@ -385,7 +229,7 @@ class LanguageProvider { return; } - const selector = this.description.modeIds; + const selector = this.documentSelector; if (this.client.apiVersion.has220Features()) { this.versionDependentDisposables.push(languages.registerImplementationProvider(selector, new (await import('./features/implementationProvider')).default(this.client))); } @@ -422,7 +266,7 @@ const styleCheckDiagnostics = [ 7030 // not all code paths return a value ]; -class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost { +export class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost { private readonly ataProgressReporter: AtaProgressReporter; private readonly typingsStatus: TypingsStatus; private readonly client: TypeScriptServiceClient; @@ -430,6 +274,7 @@ class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost { private readonly languagePerId = new Map(); private readonly disposables: Disposable[] = []; private readonly versionStatus: VersionStatus; + private reportStyleCheckAsWarnings: boolean = true; constructor( descriptions: LanguageDescription[], @@ -452,12 +297,12 @@ class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost { configFileWatcher.onDidDelete(handleProjectCreateOrDelete, this, this.disposables); configFileWatcher.onDidChange(handleProjectChange, this, this.disposables); - this.versionStatus = new VersionStatus(); - this.disposables.push(this.versionStatus); - - this.client = new TypeScriptServiceClient(this, workspaceState, this.versionStatus, plugins); + this.client = new TypeScriptServiceClient(this, workspaceState, version => this.versionStatus.onDidChangeTypeScriptVersion(version), plugins); this.disposables.push(this.client); + this.versionStatus = new VersionStatus(resource => this.client.normalizePath(resource)); + this.disposables.push(this.versionStatus); + this.typingsStatus = new TypingsStatus(this.client); this.ataProgressReporter = new AtaProgressReporter(this.client); @@ -468,6 +313,7 @@ class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost { this.languagePerId.set(description.id, manager); } + this.client.startService(); this.client.onReady().then(() => { if (!this.client.apiVersion.has230Features()) { return; @@ -496,6 +342,9 @@ class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost { this.client.onTsServerStarted(() => { this.triggerAllDiagnostics(); }); + + workspace.onDidChangeConfiguration(this.configurationChanged, this, this.disposables); + this.configurationChanged(); } public dispose(): void { @@ -603,6 +452,11 @@ class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost { } } + private configurationChanged(): void { + const config = workspace.getConfiguration('typescript'); + this.reportStyleCheckAsWarnings = config.get('reportStyleChecksAsWarnings', true); + } + private async findLanguage(file: string): Promise { try { const doc = await workspace.openTextDocument(this.client.asUrl(file)); @@ -717,8 +571,7 @@ class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost { } private getDiagnosticSeverity(diagnostic: Proto.Diagnostic): DiagnosticSeverity { - - if (this.reportStyleCheckAsWarnings() && this.isStyleCheckDiagnostic(diagnostic.code)) { + if (this.reportStyleCheckAsWarnings && this.isStyleCheckDiagnostic(diagnostic.code)) { return DiagnosticSeverity.Warning; } @@ -737,9 +590,4 @@ class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost { private isStyleCheckDiagnostic(code: number | undefined): boolean { return code ? styleCheckDiagnostics.indexOf(code) !== -1 : false; } - - private reportStyleCheckAsWarnings() { - const config = workspace.getConfiguration('typescript'); - return config.get('reportStyleChecksAsWarnings', true); - } } \ No newline at end of file diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index fb4f732e7ce..89964180240 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -17,7 +17,6 @@ import { ITypeScriptServiceClient, ITypeScriptServiceClientHost } from './typesc import { TypeScriptServerPlugin } from './utils/plugins'; import Logger from './utils/logger'; -import VersionStatus from './utils/versionStatus'; import * as is from './utils/is'; import TelemetryReporter from './utils/telemetry'; import Tracer from './utils/tracer'; @@ -27,6 +26,8 @@ import * as nls from 'vscode-nls'; import { TypeScriptServiceConfiguration, TsServerLogLevel } from './utils/configuration'; import { TypeScriptVersionProvider, TypeScriptVersion } from './utils/versionProvider'; import { TypeScriptVersionPicker } from './utils/versionPicker'; +import * as fileSchemes from './utils/fileSchemes'; + const localize = nls.loadMessageBundle(); interface CallbackItem { @@ -108,8 +109,7 @@ class RequestQueue { } export default class TypeScriptServiceClient implements ITypeScriptServiceClient { - private static readonly WALK_THROUGH_SNIPPET_SCHEME = 'walkThroughSnippet'; - private static readonly WALK_THROUGH_SNIPPET_SCHEME_COLON = `${TypeScriptServiceClient.WALK_THROUGH_SNIPPET_SCHEME}:`; + private static readonly WALK_THROUGH_SNIPPET_SCHEME_COLON = `${fileSchemes.walkThroughSnippet}:`; private pathSeparator: string; @@ -153,7 +153,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient constructor( private readonly host: ITypeScriptServiceClientHost, private readonly workspaceState: Memento, - private readonly versionStatus: VersionStatus, + private readonly onDidChangeTypeScriptVersion: (version: TypeScriptVersion) => void, public readonly plugins: TypeScriptServerPlugin[] ) { this.pathSeparator = path.sep; @@ -199,7 +199,6 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient }, this, this.disposables); this.telemetryReporter = new TelemetryReporter(() => this._tsserverVersion || this._apiVersion.versionString); this.disposables.push(this.telemetryReporter); - this.startService(); } public get configuration() { @@ -301,7 +300,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient return Promise.reject(new Error('Could not create TS service')); } - private startService(resendModels: boolean = false): Thenable { + public startService(resendModels: boolean = false): Thenable { let currentVersion = this.versionPicker.currentVersion; return this.servicePromise = new Promise((resolve, reject) => { @@ -314,7 +313,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient } this._apiVersion = this.versionPicker.currentVersion.version || API.defaultVersion; - this.versionStatus.onDidChangeTypeScriptVersion(currentVersion); + this.onDidChangeTypeScriptVersion(currentVersion); this.requestQueue = new RequestQueue(); this.callbacks = new CallbackMap(); @@ -557,15 +556,15 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient } public normalizePath(resource: Uri): string | null { - if (resource.scheme === TypeScriptServiceClient.WALK_THROUGH_SNIPPET_SCHEME) { + if (resource.scheme === fileSchemes.walkThroughSnippet) { return resource.toString(); } - if (resource.scheme === 'untitled' && this._apiVersion.has213Features()) { + if (resource.scheme === fileSchemes.untitled && this._apiVersion.has213Features()) { return resource.toString(); } - if (resource.scheme !== 'file') { + if (resource.scheme !== fileSchemes.file) { return null; } const result = resource.fsPath; @@ -578,7 +577,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient public asUrl(filepath: string): Uri { if (filepath.startsWith(TypeScriptServiceClient.WALK_THROUGH_SNIPPET_SCHEME_COLON) - || (filepath.startsWith('untitled:') && this._apiVersion.has213Features()) + || (filepath.startsWith(fileSchemes.untitled + ':') && this._apiVersion.has213Features()) ) { return Uri.parse(filepath); } @@ -591,7 +590,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient return undefined; } - if (resource.scheme === 'file' || resource.scheme === 'untitled') { + if (resource.scheme === fileSchemes.file || resource.scheme === fileSchemes.untitled) { for (const root of roots.sort((a, b) => a.uri.fsPath.length - b.uri.fsPath.length)) { if (resource.fsPath.startsWith(root.uri.fsPath + path.sep)) { return root.uri.fsPath; diff --git a/extensions/typescript/src/utils/api.ts b/extensions/typescript/src/utils/api.ts index 51a630b83a0..6e13c01a574 100644 --- a/extensions/typescript/src/utils/api.ts +++ b/extensions/typescript/src/utils/api.ts @@ -72,4 +72,8 @@ export default class API { public has260Features(): boolean { return semver.gte(this.version, '2.6.0'); } + + public has262Features(): boolean { + return semver.gte(this.version, '2.6.2'); + } } \ No newline at end of file diff --git a/extensions/typescript/src/utils/fileSchemes.ts b/extensions/typescript/src/utils/fileSchemes.ts new file mode 100644 index 00000000000..285ea43f331 --- /dev/null +++ b/extensions/typescript/src/utils/fileSchemes.ts @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +export const file = 'file'; + +export const untitled = 'untitled'; + +export const walkThroughSnippet = 'walkThroughSnippet'; + +export const supportedSchemes = [ + file, + untitled, + walkThroughSnippet +]; + +export function isSupportedScheme(scheme: string): boolean { + return supportedSchemes.indexOf(scheme) >= 0; +} \ No newline at end of file diff --git a/extensions/typescript/src/utils/languageDescription.ts b/extensions/typescript/src/utils/languageDescription.ts new file mode 100644 index 00000000000..5ac2f55483f --- /dev/null +++ b/extensions/typescript/src/utils/languageDescription.ts @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as languageModeIds from './languageModeIds'; + +export interface LanguageDescription { + id: string; + diagnosticSource: string; + modeIds: string[]; + configFile?: string; + isExternal?: boolean; +} + +export const standardLanguageDescriptions: LanguageDescription[] = [ + { + id: 'typescript', + diagnosticSource: 'ts', + modeIds: [languageModeIds.typescript, languageModeIds.typescriptreact], + configFile: 'tsconfig.json' + }, { + id: 'javascript', + diagnosticSource: 'js', + modeIds: [languageModeIds.javascript, languageModeIds.javascriptreact], + configFile: 'jsconfig.json' + } +]; diff --git a/extensions/typescript/src/utils/lazy.ts b/extensions/typescript/src/utils/lazy.ts new file mode 100644 index 00000000000..de62fd580ee --- /dev/null +++ b/extensions/typescript/src/utils/lazy.ts @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +export interface Lazy { + value: T; + hasValue: boolean; + map(f: (x: T) => R): Lazy; +} + +class LazyValue implements Lazy { + private _hasValue: boolean = false; + private _value: T; + + constructor( + private readonly _getValue: () => T + ) { } + + get value(): T { + if (!this._hasValue) { + this._hasValue = true; + this._value = this._getValue(); + } + return this._value; + } + + get hasValue(): boolean { + return this._hasValue; + } + + public map(f: (x: T) => R): Lazy { + return new LazyValue(() => f(this.value)); + } +} + +export function lazy(getValue: () => T): Lazy { + return new LazyValue(getValue); +} \ No newline at end of file diff --git a/extensions/typescript/src/utils/managedFileContext.ts b/extensions/typescript/src/utils/managedFileContext.ts new file mode 100644 index 00000000000..baf4fd704e6 --- /dev/null +++ b/extensions/typescript/src/utils/managedFileContext.ts @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * 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 * as languageModeIds from './languageModeIds'; + +/** + * When clause context set when the current file is managed by vscode's built-in typescript extension. + */ +const isManagedFile_contextName = 'typescript.isManagedFile'; + +export default class ManagedFileContextManager { + + private isInManagedFileContext: boolean = false; + + private readonly onDidChangeActiveTextEditorSub: vscode.Disposable; + + public constructor( + private readonly normalizePath: (resource: vscode.Uri) => string | null + ) { + this.onDidChangeActiveTextEditorSub = vscode.window.onDidChangeActiveTextEditor(this.onDidChangeActiveTextEditor, this); + + this.onDidChangeActiveTextEditor(vscode.window.activeTextEditor); + } + + public dispose() { + this.onDidChangeActiveTextEditorSub.dispose(); + } + + private onDidChangeActiveTextEditor(editor?: vscode.TextEditor): any { + if (editor) { + const isManagedFile = isSupportedLanguageMode(editor.document) && this.normalizePath(editor.document.uri) !== null; + this.updateContext(isManagedFile); + } + } + + private updateContext(newValue: boolean) { + if (newValue === this.isInManagedFileContext) { + return; + } + + vscode.commands.executeCommand('setContext', isManagedFile_contextName, newValue); + this.isInManagedFileContext = newValue; + } +} + +function isSupportedLanguageMode(doc: vscode.TextDocument) { + return vscode.languages.match([languageModeIds.typescript, languageModeIds.typescriptreact, languageModeIds.javascript, languageModeIds.javascriptreact], doc) > 0; +} diff --git a/extensions/typescript/src/utils/previewer.ts b/extensions/typescript/src/utils/previewer.ts index 0a21260f337..4625a18a0a2 100644 --- a/extensions/typescript/src/utils/previewer.ts +++ b/extensions/typescript/src/utils/previewer.ts @@ -13,6 +13,7 @@ function getTagText(tag: Proto.JSDocTagInfo): string | undefined { switch (tag.name) { case 'example': + case 'default': // Convert to markdown code block if (tag.text.match(/^\s*[~`]{3}/g)) { return tag.text; diff --git a/extensions/typescript/src/utils/tsconfig.ts b/extensions/typescript/src/utils/tsconfig.ts index a495afc5590..fd65741cf5b 100644 --- a/extensions/typescript/src/utils/tsconfig.ts +++ b/extensions/typescript/src/utils/tsconfig.ts @@ -17,7 +17,8 @@ function getEmptyConfig( ) { const compilerOptions = [ '"target": "ES6"', - '"module": "commonjs"' + '"module": "commonjs"', + '"jsx": "preserve"', ]; if (!isTypeScriptProject && config.checkJs) { compilerOptions.push('"checkJs": true'); diff --git a/extensions/typescript/src/utils/versionStatus.ts b/extensions/typescript/src/utils/versionStatus.ts index 78b5d0167c0..3ed92289670 100644 --- a/extensions/typescript/src/utils/versionStatus.ts +++ b/extensions/typescript/src/utils/versionStatus.ts @@ -8,10 +8,12 @@ import { TypeScriptVersion } from './versionProvider'; import * as languageModeIds from './languageModeIds'; export default class VersionStatus { - private onChangeEditorSub: vscode.Disposable; - private versionBarEntry: vscode.StatusBarItem; + private readonly onChangeEditorSub: vscode.Disposable; + private readonly versionBarEntry: vscode.StatusBarItem; - constructor() { + constructor( + private readonly normalizePath: (resource: vscode.Uri) => string | null + ) { this.versionBarEntry = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, Number.MIN_VALUE); this.onChangeEditorSub = vscode.window.onDidChangeActiveTextEditor(this.showHideStatus, this); } @@ -29,9 +31,6 @@ export default class VersionStatus { } private showHideStatus() { - if (!this.versionBarEntry) { - return; - } if (!vscode.window.activeTextEditor) { this.versionBarEntry.hide(); return; @@ -39,13 +38,15 @@ export default class VersionStatus { const doc = vscode.window.activeTextEditor.document; if (vscode.languages.match([languageModeIds.typescript, languageModeIds.typescriptreact], doc)) { - this.versionBarEntry.show(); - return; + if (this.normalizePath(doc.uri)) { + this.versionBarEntry.show(); + return; + } } if (!vscode.window.activeTextEditor.viewColumn) { // viewColumn is undefined for the debug/output panel, but we still want - // to show the version info + // to show the version info in the existing editor return; } diff --git a/extensions/typescript/syntaxes/TypeScript.tmLanguage.json b/extensions/typescript/syntaxes/TypeScript.tmLanguage.json index 70717a1ef04..e37e885a6b5 100644 --- a/extensions/typescript/syntaxes/TypeScript.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScript.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8361b1a232501c67911c81a4664a9460d7922c6b", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/06831946d0a23cb56be0c1ead7cab10be01306cd", "name": "TypeScript", "scopeName": "source.ts", "fileTypes": [ @@ -272,7 +272,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.ts", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.ts entity.name.function.ts" @@ -506,7 +506,7 @@ } }, { - "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", "captures": { "1": { "name": "storage.modifier.ts" @@ -733,7 +733,7 @@ }, { "name": "meta.definition.property.ts entity.name.function.ts", - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))" + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))" }, { "name": "meta.definition.property.ts variable.object.property.ts", @@ -996,7 +996,7 @@ }, { "name": "meta.arrow.ts", - "begin": "(?x) (?:\n (? is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" @@ -1940,7 +1940,7 @@ }, { "name": "meta.object.member.ts", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.ts" @@ -2033,13 +2033,13 @@ ] }, "function-call": { - "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`]([^<>]|\\<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`][^<>]+\\>)+>\\s*)?\\()", - "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`]([^<>]|\\<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`][^<>]+\\>)+>\\s*)?\\()", + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()", + "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()", "patterns": [ { "name": "meta.function-call.ts", "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))", - "end": "(?=\\s*(<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`]([^<>]|\\<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`][^<>]+\\>)+>\\s*)?\\()", + "end": "(?=\\s*(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()", "patterns": [ { "include": "#literal" @@ -2141,7 +2141,7 @@ "patterns": [ { "name": "cast.expr.ts", - "begin": "(?:(?<=return|throw|yield|await|default|[=(,:>*?]|[^+]\\+))\\s*(<)(?!*?\\&\\|\\^]|[^_$[:alnum:]](?:\\+\\+|\\-\\-)|[^\\+]\\+|[^\\-]\\-))\\s*(<)(?!=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)?\\()", + "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\\()", "captures": { "1": { "name": "punctuation.accessor.ts" @@ -2603,7 +2603,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.ts" diff --git a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json index 477576d4814..58ece2fd762 100644 --- a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8361b1a232501c67911c81a4664a9460d7922c6b", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/06831946d0a23cb56be0c1ead7cab10be01306cd", "name": "TypeScriptReact", "scopeName": "source.tsx", "fileTypes": [ @@ -275,7 +275,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.tsx", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.tsx entity.name.function.tsx" @@ -509,7 +509,7 @@ } }, { - "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))", "captures": { "1": { "name": "storage.modifier.tsx" @@ -736,7 +736,7 @@ }, { "name": "meta.definition.property.tsx entity.name.function.tsx", - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))" + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))" }, { "name": "meta.definition.property.tsx variable.object.property.tsx", @@ -999,7 +999,7 @@ }, { "name": "meta.arrow.tsx", - "begin": "(?x) (?:\n (? is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" @@ -1943,7 +1943,7 @@ }, { "name": "meta.object.member.tsx", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.tsx" @@ -2036,13 +2036,13 @@ ] }, "function-call": { - "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`]([^<>]|\\<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`][^<>]+\\>)+>\\s*)?\\()", - "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`]([^<>]|\\<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`][^<>]+\\>)+>\\s*)?\\()", + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()", + "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()", "patterns": [ { "name": "meta.function-call.tsx", "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))", - "end": "(?=\\s*(<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`]([^<>]|\\<\\s*[_$[:alpha:]\\{\\(\\[\\\"\\'\\`][^<>]+\\>)+>\\s*)?\\()", + "end": "(?=\\s*(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()", "patterns": [ { "include": "#literal" @@ -2489,7 +2489,7 @@ } }, { - "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)?\\()", + "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\\()", "captures": { "1": { "name": "punctuation.accessor.tsx" @@ -2569,7 +2569,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*[_$[:alpha:]\\{\\(\\[]([^<>=]|=[^<]|\\<\\s*[_$[:alpha:]\\{\\(\\[]([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.tsx" diff --git a/extensions/yarn.lock b/extensions/yarn.lock index 9851e68940c..43a297415a9 100644 --- a/extensions/yarn.lock +++ b/extensions/yarn.lock @@ -2,6 +2,6 @@ # yarn lockfile v1 -typescript@2.6.2-insiders.20171120: - version "2.6.2-insiders.20171120" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2-insiders.20171120.tgz#d2f4c36831fa663639624799a62814cbdca9aaae" +typescript@2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4" diff --git a/i18n/chs/extensions/css/client/out/cssMain.i18n.json b/i18n/chs/extensions/css/client/out/cssMain.i18n.json index a61dc149b35..e64cca9eac1 100644 --- a/i18n/chs/extensions/css/client/out/cssMain.i18n.json +++ b/i18n/chs/extensions/css/client/out/cssMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "cssserver.name": "CSS 语言æœåС噍" + "cssserver.name": "CSS 语言æœåС噍", + "folding.start": "折å åŒºåŸŸå¼€å§‹", + "folding.end": "折å åŒºåŸŸç»“æŸ" } \ No newline at end of file diff --git a/i18n/chs/extensions/css/package.i18n.json b/i18n/chs/extensions/css/package.i18n.json index 6b34f395c3d..c9f83c62022 100644 --- a/i18n/chs/extensions/css/package.i18n.json +++ b/i18n/chs/extensions/css/package.i18n.json @@ -18,7 +18,7 @@ "css.lint.important.desc": "é¿å…使用 !important。它表明整个 CSS 的特异性已ç»å¤±åŽ»æŽ§åˆ¶ä¸”éœ€è¦é‡æž„。", "css.lint.importStatement.desc": "Import 语å¥ä¸ä¼šå¹¶è¡ŒåŠ è½½", "css.lint.propertyIgnoredDueToDisplay.desc": "因显示而忽略属性。例如,使用 \"display: inline\"时,宽度ã€é«˜åº¦ã€ä¸Šè¾¹è·ã€ä¸‹è¾¹è·å’Œ float 属性将ä¸èµ·ä½œç”¨", - "css.lint.universalSelector.desc": "已知通é…选择符 (*) æ…¢", + "css.lint.universalSelector.desc": "通é…选择符 (*) è¿è¡Œæ•ˆçŽ‡ä½Ž", "css.lint.unknownProperties.desc": "未知的属性。", "css.lint.unknownVendorSpecificProperties.desc": "未知的供应商特定属性。", "css.lint.vendorPrefix.desc": "使用供应商特定å‰ç¼€æ—¶ï¼Œè¿˜åº”包括标准属性", diff --git a/i18n/chs/extensions/git/out/autofetch.i18n.json b/i18n/chs/extensions/git/out/autofetch.i18n.json new file mode 100644 index 00000000000..6df74592845 --- /dev/null +++ b/i18n/chs/extensions/git/out/autofetch.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yes": "是", + "no": "å¦", + "not now": "䏿˜¯çŽ°åœ¨", + "suggest auto fetch": "是å¦å¯ç”¨è‡ªåŠ¨æŠ“å– Git 存储库?" +} \ No newline at end of file diff --git a/i18n/chs/extensions/git/out/commands.i18n.json b/i18n/chs/extensions/git/out/commands.i18n.json index 020ac1e3589..2b05a1b187d 100644 --- a/i18n/chs/extensions/git/out/commands.i18n.json +++ b/i18n/chs/extensions/git/out/commands.i18n.json @@ -9,9 +9,12 @@ "create branch": "$(plus) 创建新分支", "repourl": "存储库 URL", "parent": "父目录", + "cancel": "$(sync~spin) 正在克隆存储库... ç‚¹å‡»å–æ¶ˆ", + "cancel tooltip": "å–æ¶ˆå…‹éš†", "cloning": "正在克隆 GIT 存储库...", "openrepo": "打开存储库", "proposeopen": "是å¦è¦æ‰“开已克隆存储库?", + "init": "选择用于åˆå§‹åŒ– Git 储存库的工作区文件夹", "init repo": "åˆå§‹åŒ–存储库", "create repo": "åˆå§‹åŒ–存储库", "are you sure": "将在“{0}â€ä¸­åˆ›å»º Git 存储库。确定è¦ç»§ç»­å—?", @@ -49,12 +52,15 @@ "select branch to delete": "选择è¦åˆ é™¤çš„分支", "confirm force delete branch": "“{0}â€åˆ†æ”¯æœªè¢«å®Œå…¨åˆå¹¶ã€‚是å¦ä»è¦åˆ é™¤ï¼Ÿ", "delete branch": "删除分支", + "invalid branch name": "分支å称无效", + "branch already exists": "已存在å为“{0}â€çš„分支", "select a branch to merge from": "选择è¦ä»Žå…¶åˆå¹¶çš„分支", "merge conflicts": "存在åˆå¹¶å†²çªã€‚请在æäº¤ä¹‹å‰è§£å†³è¿™äº›å†²çªã€‚", "tag name": "标签åç§°", "provide tag name": "请æä¾›æ ‡ç­¾åç§°", "tag message": "消æ¯", "provide tag message": "请æä¾›æ¶ˆæ¯ä»¥å¯¹æ ‡ç­¾è¿›è¡Œæ³¨é‡Š", + "no remotes to fetch": "此存储库未é…ç½®å¯ä»¥ä»Žä¸­æŠ“å–的远程存储库。", "no remotes to pull": "存储库未é…置任何从其中进行拉å–的远程存储库。", "pick remote pull repo": "选择è¦ä»Žå…¶æ‹‰å–分支的远程ä½ç½®", "no remotes to push": "存储库未é…ç½®ä»»ä½•è¦æŽ¨é€åˆ°çš„远程存储库。", @@ -71,7 +77,7 @@ "no stashes": "没有å¯ä»¥æ¢å¤çš„储è—。", "pick stash to pop": "选择è¦å¼¹å‡ºçš„储è—", "clean repo": "在签出å‰ï¼Œè¯·æ¸…ç†å­˜å‚¨åº“工作树。", - "cant push": "æ— æ³•æŽ¨é€ refs 到远端。请先è¿è¡Œâ€œæ‹‰å–â€åŠŸèƒ½ä»¥æ•´åˆä½ çš„æ›´æ”¹ã€‚", + "cant push": "æ— æ³•æŽ¨é€ refs 到远端。您å¯ä»¥è¯•ç€è¿è¡Œâ€œæ‹‰å–â€åŠŸèƒ½ï¼Œæ•´åˆæ‚¨çš„æ›´æ”¹ã€‚", "git error details": "Git:{0}", "git error": "Git 错误", "open git log": "打开 GIT 日志" diff --git a/i18n/chs/extensions/git/out/main.i18n.json b/i18n/chs/extensions/git/out/main.i18n.json index 7b6c6f37d1f..19364485e2e 100644 --- a/i18n/chs/extensions/git/out/main.i18n.json +++ b/i18n/chs/extensions/git/out/main.i18n.json @@ -4,8 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "looking": "在 {0} 查找 Git 中", "using git": "使用 {1} 中的 GIT {0}", - "updateGit": "æ›´æ–° GIT", + "downloadgit": "下载 Git", "neverShowAgain": "ä¸å†æ˜¾ç¤º", + "notfound": "未找到 Git。请安装 Git,或在 \"git.path\" 设置中é…置。", + "updateGit": "æ›´æ–° GIT", "git20": "你似乎已安装 Git {0}。Code å’Œ Git 版本 >=2 一起工作最佳" } \ No newline at end of file diff --git a/i18n/chs/extensions/git/out/repository.i18n.json b/i18n/chs/extensions/git/out/repository.i18n.json index 8b700b3abe3..1e99b7312ed 100644 --- a/i18n/chs/extensions/git/out/repository.i18n.json +++ b/i18n/chs/extensions/git/out/repository.i18n.json @@ -21,6 +21,7 @@ "deleted by us": "已被我们删除", "both added": "两者å‡å·²æ·»åŠ ", "both modified": "二者å‡å·²ä¿®æ”¹", + "commitMessage": "消æ¯(按 {0} æäº¤)", "commit": "æäº¤", "merge changes": "åˆå¹¶æ›´æ”¹", "staged changes": "暂存的更改", diff --git a/i18n/chs/extensions/git/package.i18n.json b/i18n/chs/extensions/git/package.i18n.json index 657920b4ae9..3f973cac673 100644 --- a/i18n/chs/extensions/git/package.i18n.json +++ b/i18n/chs/extensions/git/package.i18n.json @@ -33,8 +33,10 @@ "command.checkout": "签出到...", "command.branch": "创建分支...", "command.deleteBranch": "删除分支...", + "command.renameBranch": "é‡å‘½å分支...", "command.merge": "åˆå¹¶åˆ†æ”¯...", "command.createTag": "创建标签", + "command.fetch": "抓å–", "command.pull": "拉å–", "command.pullRebase": "拉å–(å˜åŸº)", "command.pullFrom": "拉å–自...", @@ -42,21 +44,24 @@ "command.pushTo": "推é€åˆ°...", "command.pushWithTags": "带标签推é€", "command.sync": "åŒæ­¥", + "command.syncRebase": "åŒæ­¥(å˜åŸº)", "command.publish": "å‘布分支", "command.showOutput": "显示 GIT 输出", "command.ignore": "将文件添加到 .gitignore", + "command.stashIncludeUntracked": "储è—(åŒ…å«æœªè·Ÿè¸ª)", "command.stash": "储è—", "command.stashPop": "弹出储è—...", "command.stashPopLatest": "弹出最新储è—", - "config.enabled": "是å¦å·²å¯ç”¨ GIT", + "config.enabled": "是å¦å¯ç”¨ Git", "config.path": "Git 坿‰§è¡Œæ–‡ä»¶è·¯å¾„", - "config.autorefresh": "是å¦å·²å¯ç”¨è‡ªåŠ¨åˆ·æ–°", - "config.autofetch": "是å¦å¯ç”¨äº†è‡ªåЍæå–", + "config.autorefresh": "是å¦å¯ç”¨è‡ªåŠ¨åˆ·æ–°", + "config.autofetch": "是å¦å¯ç”¨è‡ªåŠ¨æ‹‰å–", "config.enableLongCommitWarning": "是å¦é’ˆå¯¹é•¿æ®µæäº¤æ¶ˆæ¯è¿›è¡Œè­¦å‘Š", "config.confirmSync": "åŒæ­¥ Git 存储库å‰è¿›è¡Œç¡®è®¤", "config.countBadge": "控制 Git 徽章计数器。“allâ€è®¡ç®—所有更改。“trackedâ€åªè®¡ç®—跟踪的更改。“offâ€å…³é—­æ­¤åŠŸèƒ½ã€‚", "config.checkoutType": "控制è¿è¡Œâ€œç­¾å‡ºåˆ°...â€å‘½ä»¤æ—¶åˆ—出的分支的类型。\"all\" 显示所有 refs,\"local\" åªæ˜¾ç¤ºæœ¬åœ°åˆ†æ”¯ï¼Œ\"tags\" åªæ˜¾ç¤ºæ ‡è®°ï¼Œ\"remote\" åªæ˜¾ç¤ºè¿œç¨‹åˆ†æ”¯ã€‚", "config.ignoreLegacyWarning": "忽略旧版 Git 警告", + "config.ignoreMissingGitWarning": "忽略“缺失 Gitâ€è­¦å‘Š", "config.ignoreLimitWarning": "å¿½ç•¥â€œå­˜å‚¨åº“ä¸­å­˜åœ¨å¤§é‡æ›´æ”¹â€çš„警告", "config.defaultCloneDirectory": "克隆 Git 存储库的默认ä½ç½®", "config.enableSmartCommit": "在没有暂存的更改时æäº¤æ‰€æœ‰æ›´æ”¹ã€‚", diff --git a/i18n/chs/extensions/html/client/out/htmlMain.i18n.json b/i18n/chs/extensions/html/client/out/htmlMain.i18n.json index 67c68ad50f5..ff2b693ae94 100644 --- a/i18n/chs/extensions/html/client/out/htmlMain.i18n.json +++ b/i18n/chs/extensions/html/client/out/htmlMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "htmlserver.name": "HTML 语言æœåС噍" + "htmlserver.name": "HTML 语言æœåС噍", + "folding.start": "折å åŒºåŸŸå¼€å§‹", + "folding.end": "折å åŒºåŸŸç»“æŸ" } \ No newline at end of file diff --git a/i18n/chs/extensions/markdown/out/commands.i18n.json b/i18n/chs/extensions/markdown/out/commands.i18n.json new file mode 100644 index 00000000000..d598feff8a0 --- /dev/null +++ b/i18n/chs/extensions/markdown/out/commands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previewTitle": "预览 {0}", + "onPreviewStyleLoadError": "无法加载“markdown.stylesâ€ï¼š{0}" +} \ No newline at end of file diff --git a/i18n/chs/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/chs/extensions/markdown/out/features/previewContentProvider.i18n.json new file mode 100644 index 00000000000..4ff7c59a498 --- /dev/null +++ b/i18n/chs/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "å·²ç¦ç”¨æ­¤æ–‡æ¡£ä¸­çš„部分内容", + "preview.securityMessage.title": "å·²ç¦ç”¨æ­¤ Markdown 预览中的å¯èƒ½ä¸å®‰å…¨çš„内容。更改 Markdown 预览安全设置以å…许ä¸å®‰å…¨å†…容或å¯ç”¨è„šæœ¬ã€‚", + "preview.securityMessage.label": "å·²ç¦ç”¨å†…容安全警告" +} \ No newline at end of file diff --git a/i18n/chs/extensions/markdown/out/security.i18n.json b/i18n/chs/extensions/markdown/out/security.i18n.json index dbe6ce5383f..c1daf87e291 100644 --- a/i18n/chs/extensions/markdown/out/security.i18n.json +++ b/i18n/chs/extensions/markdown/out/security.i18n.json @@ -11,5 +11,8 @@ "disable.title": "ç¦ç”¨", "disable.description": "å…è®¸æ‰€æœ‰å†…å®¹ï¼Œæ‰§è¡Œæ‰€æœ‰è„šæœ¬ã€‚ä¸æŽ¨è", "moreInfo.title": "详细信æ¯", + "enableSecurityWarning.title": "在此工作区中å¯ç”¨é¢„览安全警告", + "disableSecurityWarning.title": "åœ¨æ­¤å·¥ä½œåŒºä¸­å–æ¶ˆé¢„览安全警告", + "toggleSecurityWarning.description": "ä¸å½±å“内容安全等级", "preview.showPreviewSecuritySelector.title": "选择此工作区中 Markdown 预览的安全设置" } \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/package.i18n.json b/i18n/chs/extensions/merge-conflict/package.i18n.json index ae0c9b41704..2b8572cb7f1 100644 --- a/i18n/chs/extensions/merge-conflict/package.i18n.json +++ b/i18n/chs/extensions/merge-conflict/package.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "åˆå¹¶å†²çª", + "command.accept.all-current": "全部采用当å‰å†…容", "command.accept.all-incoming": "全部采用传入版本", "command.accept.all-both": "全部ä¿ç•™ä¸¤è€…", "command.accept.current": "采用当å‰å†…容", diff --git a/i18n/chs/extensions/php/package.i18n.json b/i18n/chs/extensions/php/package.i18n.json index 79f8c7d511d..2d5bee8dc94 100644 --- a/i18n/chs/extensions/php/package.i18n.json +++ b/i18n/chs/extensions/php/package.i18n.json @@ -7,7 +7,7 @@ "configuration.suggest.basic": "如果已å¯ç”¨å†…ç½® PHP 语言建议,则进行é…置。此支æŒå»ºè®® PHP 全局å˜é‡å’Œå˜é‡ã€‚", "configuration.validate.enable": "å¯ç”¨/ç¦ç”¨å†…置的 PHP 验è¯ã€‚", "configuration.validate.executablePath": "æŒ‡å‘ PHP 坿‰§è¡Œæ–‡ä»¶ã€‚", - "configuration.validate.run": "ä¸ç®¡ linter 是在 save 还是在 type 上è¿è¡Œã€‚", + "configuration.validate.run": "决定 linter 是在ä¿å­˜æ—¶è¿˜æ˜¯è¾“入时è¿è¡Œã€‚", "configuration.title": "PHP", "commands.categroy.php": "PHP", "command.untrustValidationExecutable": "ç¦æ­¢ PHP 验è¯ç¨‹åº(定义为工作区设置)" diff --git a/i18n/chs/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/chs/extensions/typescript/out/features/completionItemProvider.i18n.json index b1b7365e6c0..2d01e9a7476 100644 --- a/i18n/chs/extensions/typescript/out/features/completionItemProvider.i18n.json +++ b/i18n/chs/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "selectCodeAction": "选择è¦åº”ç”¨çš„ä»£ç æ“作", "acquiringTypingsLabel": "æ­£åœ¨èŽ·å– typings...", "acquiringTypingsDetail": "èŽ·å– IntelliSense çš„ typings 定义。", "autoImportLabel": "从 {0} 自动导入" diff --git a/i18n/chs/extensions/typescript/package.i18n.json b/i18n/chs/extensions/typescript/package.i18n.json index 2c538284454..0283416a000 100644 --- a/i18n/chs/extensions/typescript/package.i18n.json +++ b/i18n/chs/extensions/typescript/package.i18n.json @@ -39,6 +39,7 @@ "typescript.openTsServerLog.title": "打开 TS æœåŠ¡å™¨æ—¥å¿—", "typescript.restartTsServer": "é‡å¯ TS æœåС噍", "typescript.selectTypeScriptVersion.title": "选择 TypeScript 版本", + "typescript.reportStyleChecksAsWarnings": "将风格检查问题报告为警告", "jsDocCompletion.enabled": "å¯ç”¨/ç¦ç”¨è‡ªåЍ JSDoc 注释", "javascript.implicitProjectConfig.checkJs": "å¯ç”¨/ç¦ç”¨ JavaScript 文件的语义检查。现有的 jsconfig.json 或\n tsconfig.json æ–‡ä»¶ä¼šè¦†ç›–æ­¤è®¾ç½®ã€‚è¦æ±‚ TypeScript >=2.3.1。", "typescript.npm": "指定用于自动获å–类型的 NPM 坿‰§è¡Œæ–‡ä»¶çš„è·¯å¾„ã€‚è¦æ±‚ TypeScript >= 2.3.4。", diff --git a/i18n/chs/src/vs/base/common/errorMessage.i18n.json b/i18n/chs/src/vs/base/common/errorMessage.i18n.json index 01836ff5465..d2672e3915e 100644 --- a/i18n/chs/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/chs/src/vs/base/common/errorMessage.i18n.json @@ -4,13 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "message": "{0}。错误代ç : {1}", - "error.permission.verbose": "æƒé™è¢«æ‹’ç»(HTTP {0})", - "error.permission": "æƒé™è¢«æ‹’ç»", - "error.http.verbose": "{0} (HTTP {1}: {2})", - "error.http": "{0} (HTTP {1})", - "error.connection.unknown.verbose": "未知连接错误 ({0})", - "error.connection.unknown": "出现未知连接错误。您的 Internet 连接已断开,或者您连接的æœåŠ¡å™¨å·²è„±æœºã€‚", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "出现未知错误。有关详细信æ¯ï¼Œè¯·å‚阅日志。", "nodeExceptionMessage": "å‘生了系统错误 ({0})", diff --git a/i18n/chs/src/vs/code/electron-main/main.i18n.json b/i18n/chs/src/vs/code/electron-main/main.i18n.json new file mode 100644 index 00000000000..9649647c78d --- /dev/null +++ b/i18n/chs/src/vs/code/electron-main/main.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "secondInstanceNoResponse": "{0} çš„å¦ä¸€å®žä¾‹æ­£åœ¨è¿è¡Œä½†æ²¡æœ‰å“应", + "secondInstanceNoResponseDetail": "请先关闭其他所有实例,然åŽé‡è¯•。", + "secondInstanceAdmin": "{0} 的第二个实例已ç»ä»¥ç®¡ç†å‘˜èº«ä»½è¿è¡Œã€‚", + "secondInstanceAdminDetail": "请先关闭å¦ä¸€ä¸ªå®žä¾‹ï¼Œç„¶åŽé‡è¯•。", + "close": "关闭(&&C)" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/code/electron-main/menus.i18n.json b/i18n/chs/src/vs/code/electron-main/menus.i18n.json index 4b3a4e43c6e..5b6467ead38 100644 --- a/i18n/chs/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/chs/src/vs/code/electron-main/menus.i18n.json @@ -22,12 +22,12 @@ "miQuit": "退出 {0}", "miNewFile": "新建文件(&&N)", "miOpen": "打开(&&O)...", - "miOpenWorkspace": "打开工作区(&&O)...", + "miOpenWorkspace": "打开工作区(&&K)...", "miOpenFolder": "打开文件夹(&&F)...", "miOpenFile": "打开文件(&&O)...", "miOpenRecent": "打开最近的文件(&&R)", - "miSaveWorkspaceAs": "将工作区å¦å­˜ä¸º(&&S)...", - "miAddFolderToWorkspace": "将文件夹添加到工作区(&&A)...", + "miSaveWorkspaceAs": "将工作区å¦å­˜ä¸º...", + "miAddFolderToWorkspace": "将文件夹添加到工作区(&&D)...", "miSave": "ä¿å­˜(&&S)", "miSaveAs": "å¦å­˜ä¸º(&&A)...", "miSaveAll": "全部ä¿å­˜(&&L)", @@ -157,7 +157,7 @@ "mMergeAllWindows": "åˆå¹¶æ‰€æœ‰çª—å£", "miToggleDevTools": "切æ¢å¼€å‘人员工具(&&T)", "miAccessibilityOptions": "辅助功能选项(&&O)", - "miReportIssues": "报告问题(&&I)", + "miReportIssue": "使用英文报告问题(&&I)", "miWelcome": "欢迎使用(&&W)", "miInteractivePlayground": "äº¤äº’å¼æ¼”练场(&&I)", "miDocumentation": "文档(&&D)", @@ -184,6 +184,7 @@ "miDownloadingUpdate": "正在下载更新...", "miInstallingUpdate": "正在安装更新...", "miCheckForUpdates": "检查更新...", - "aboutDetail": "\n版本 {0}\næäº¤ {1}\n日期 {2}\nShell {3}\n渲染器 {4}\nNode {5}\næž¶æž„ {6}", - "okButton": "确定" + "aboutDetail": "版本 {0}\næäº¤ {1}\n日期 {2}\nShell {3}\n渲染器 {4}\nNode {5}\næž¶æž„ {6}", + "okButton": "确定", + "copy": "å¤åˆ¶(&&C)" } \ No newline at end of file diff --git a/i18n/chs/src/vs/code/node/cliProcessMain.i18n.json b/i18n/chs/src/vs/code/node/cliProcessMain.i18n.json index 7c34830a537..39c71863011 100644 --- a/i18n/chs/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/chs/src/vs/code/node/cliProcessMain.i18n.json @@ -9,7 +9,7 @@ "useId": "ç¡®ä¿ä½¿ç”¨å®Œæ•´æ‰©å±• ID,包括å‘布æœåŠ¡å™¨ï¼Œå¦‚: {0}", "successVsixInstall": "å·²æˆåŠŸå®‰è£…æ‰©å±•â€œ{0}â€!", "alreadyInstalled": "已安装扩展“{0}â€ã€‚", - "foundExtension": "在应用商店中找到了“{0}â€ã€‚", + "foundExtension": "在商店中找到了“{0}â€ã€‚", "installing": "正在安装...", "successInstall": "å·²æˆåŠŸå®‰è£…æ‰©å±•â€œ{0}†v{1}!", "uninstalling": "正在å¸è½½ {0}...", diff --git a/i18n/chs/src/vs/editor/browser/services/bulkEdit.i18n.json b/i18n/chs/src/vs/editor/browser/services/bulkEdit.i18n.json new file mode 100644 index 00000000000..2b957467d14 --- /dev/null +++ b/i18n/chs/src/vs/editor/browser/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "è¿™äº›æ–‡ä»¶ä¹Ÿå·²åŒæ—¶æ›´æ”¹: {0}", + "summary.0": "未åšç¼–辑", + "summary.nm": "在 {1} 个文件中进行了 {0} 次编辑", + "summary.n0": "在 1 个文件中进行了 {0} 次编辑" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json index fc23def6012..3aa5c1a68d4 100644 --- a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,12 +10,16 @@ "fontSize": "以åƒç´ ä¸ºå•ä½æŽ§åˆ¶å­—å·ã€‚", "lineHeight": "控制行高。使用 0 通过字å·è®¡ç®—行高。", "letterSpacing": "以åƒç´ ä¸ºå•ä½æŽ§åˆ¶å­—ç¬¦é—´è·ã€‚", - "lineNumbers": "控制行å·çš„æ˜¾ç¤ºã€‚å¯èƒ½çš„值为“开â€ã€â€œå…³â€å’Œâ€œç›¸å¯¹â€ã€‚“相对â€å°†æ˜¾ç¤ºä»Žå½“å‰å…‰æ ‡ä½ç½®å¼€å§‹è®¡æ•°çš„行数。", + "lineNumbers.off": "䏿˜¾ç¤ºè¡Œå·ã€‚", + "lineNumbers.on": "å°†è¡Œå·æ˜¾ç¤ºä¸ºç»å¯¹è¡Œæ•°ã€‚", + "lineNumbers.relative": "å°†è¡Œå·æ˜¾ç¤ºä¸ºä¸Žå…‰æ ‡ç›¸éš”的行数。", + "lineNumbers.interval": "æ¯ 10 行显示一次行å·ã€‚", + "lineNumbers": "控制行å·çš„æ˜¾ç¤ºã€‚å¯é€‰å€¼ä¸º \"on\"ã€\"off\" å’Œ \"relative\"。", "rulers": "在一定数é‡çš„ç­‰å®½å­—ç¬¦åŽæ˜¾ç¤ºåž‚直标尺。输入多个值,显示多个标尺。若数组为空,则ä¸ç»˜åˆ¶æ ‡å°ºã€‚", "wordSeparators": "执行文字相关的导航或æ“作时将用作文字分隔符的字符", - "tabSize": "一个制表符等于的空格数。该设置在 `editor.detectIndentation` å¯ç”¨æ—¶æ ¹æ®æ–‡ä»¶å†…容进行é‡å†™ã€‚", + "tabSize": "一个制表符等于的空格数。该设置在 \"editor.detectIndentation\" å¯ç”¨æ—¶æ ¹æ®æ–‡ä»¶å†…容å¯èƒ½ä¼šè¢«è¦†ç›–。", "tabSize.errorMessage": "应为“numberâ€ã€‚注æ„,值“autoâ€å·²ç”±â€œeditor.detectIndentationâ€è®¾ç½®æ›¿æ¢ã€‚", - "insertSpaces": "按 \"Tab\" æ—¶æ’入空格。该设置在 `editor.detectIndentation` å¯ç”¨æ—¶æ ¹æ®æ–‡ä»¶å†…容进行é‡å†™ã€‚", + "insertSpaces": "按 Tab 键时æ’入空格。该设置在 \"editor.detectIndentation\" å¯ç”¨æ—¶æ ¹æ®æ–‡ä»¶å†…容å¯èƒ½ä¼šè¢«è¦†ç›–。", "insertSpaces.errorMessage": "应为 \"boolean\"。注æ„,值 \"auto\" 已由 \"editor.detectIndentation\" 设置替æ¢ã€‚", "detectIndentation": "当打开文件时,将基于文件内容检测 \"editor.tabSize\" å’Œ \"editor.insertSpaces\"。", "roundedSelection": "控制选å–èŒƒå›´æ˜¯å¦æœ‰åœ†è§’", @@ -37,7 +41,7 @@ "mouseWheelScrollSensitivity": "è¦å¯¹é¼ æ ‡æ»šè½®æ»šåŠ¨äº‹ä»¶çš„ \"deltaX\" å’Œ \"deltaY\" 使用的乘数 ", "multiCursorModifier.ctrlCmd": "映射到“Controlâ€ï¼ˆWindows å’Œ Linux)或“Commandâ€ï¼ˆOSX)。", "multiCursorModifier.alt": "映射到“Altâ€ï¼ˆWindows å’Œ Linux)或“Optionâ€ï¼ˆOSX)。", - "multiCursorModifier": "用鼠标添加多个光标时使用的修改键。“ctrlCmdâ€æ˜ å°„为“Controlâ€ï¼ˆWindows å’Œ Linux)或“Commandâ€ï¼ˆOSX)。“转到定义â€å’Œâ€œæ‰“开链接â€åŠŸèƒ½çš„é¼ æ ‡æ‰‹åŠ¿å°†ä¼šç›¸åº”è°ƒæ•´ï¼Œä¸ä¸Žå¤šå…‰æ ‡ä¿®æ”¹é”®å†²çªã€‚", + "multiCursorModifier": "用鼠标添加多个光标时使用的修改键。\"ctrlCmd\" 会映射为 \"Ctrl\" (Windows å’Œ Linux) 或 \"Command\" (OSX)。“转到定义â€å’Œâ€œæ‰“开链接â€åŠŸèƒ½æ‰€éœ€çš„åŠ¨ä½œå°†ä¼šç›¸åº”è°ƒæ•´ï¼Œä¸ä¸Žå¤šå…‰æ ‡ä¿®æ”¹é”®å†²çªã€‚", "quickSuggestions.strings": "在字符串内å¯ç”¨å¿«é€Ÿå»ºè®®ã€‚", "quickSuggestions.comments": "在注释内å¯ç”¨å¿«é€Ÿå»ºè®®ã€‚", "quickSuggestions.other": "在字符串和注释外å¯ç”¨å¿«é€Ÿå»ºè®®ã€‚", @@ -57,7 +61,7 @@ "snippetSuggestions.none": "䏿˜¾ç¤ºä»£ç ç‰‡æ®µå»ºè®®ã€‚", "snippetSuggestions": "控制是å¦å°†ä»£ç æ®µä¸Žå…¶ä»–建议一起显示以åŠå®ƒä»¬çš„æŽ’åºæ–¹å¼ã€‚", "emptySelectionClipboard": "控制没有选择内容的å¤åˆ¶æ˜¯å¦å¤åˆ¶å½“å‰è¡Œã€‚", - "wordBasedSuggestions": "控制是å¦åº”æ ¹æ®æ–‡æ¡£ä¸­çš„字数计算完æˆã€‚", + "wordBasedSuggestions": "æŽ§åˆ¶æ˜¯å¦æ ¹æ®æ–‡æ¡£ä¸­çš„æ–‡å­—计算自动完æˆåˆ—表。", "suggestFontSize": "建议å°ç»„件的字å·", "suggestLineHeight": "建议å°ç»„件的行高", "selectionHighlight": "控制编辑器是å¦åº”çªå‡ºæ˜¾ç¤ºé€‰é¡¹çš„近似匹é…", @@ -89,8 +93,8 @@ "links": "控制编辑器是å¦åº”检测链接并使它们å¯è¢«ç‚¹å‡»", "colorDecorators": "æŽ§åˆ¶ç¼–è¾‘å™¨æ˜¯å¦æ˜¾ç¤ºå†…è”颜色修饰器和颜色选å–器。", "codeActions": "å¯ç”¨ä»£ç æ“作å°ç¯æ³¡æç¤º", + "selectionClipboard": "æŽ§åˆ¶æ˜¯å¦æ”¯æŒ Linux 主剪贴æ¿ã€‚", "sideBySide": "控制 Diff 编辑器以并排或内è”形弿˜¾ç¤ºå·®å¼‚", "ignoreTrimWhitespace": "控制差异编辑器是å¦å°†å¯¹å‰å¯¼ç©ºæ ¼æˆ–å°¾éšç©ºæ ¼çš„æ›´æ”¹æ˜¾ç¤ºä¸ºå·®å¼‚", - "renderIndicators": "控制差异编辑器是å¦ä¸ºå·²æ·»åŠ /删除的更改显示 +/- 指示符å·", - "selectionClipboard": "æŽ§åˆ¶æ˜¯å¦æ”¯æŒ Linux 主剪贴æ¿ã€‚" + "renderIndicators": "控制差异编辑器是å¦ä¸ºå·²æ·»åŠ /删除的更改显示 +/- 指示符å·" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/chs/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json new file mode 100644 index 00000000000..e6089cc95a1 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "转到括å·" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json b/i18n/chs/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json new file mode 100644 index 00000000000..3e762317766 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "å°†æ’入点左移", + "caret.moveRight": "å°†æ’入点å³ç§»" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/caretOperations/transpose.i18n.json b/i18n/chs/src/vs/editor/contrib/caretOperations/transpose.i18n.json new file mode 100644 index 00000000000..93fd558794e --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/caretOperations/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "转置字æ¯" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/clipboard/clipboard.i18n.json b/i18n/chs/src/vs/editor/contrib/clipboard/clipboard.i18n.json new file mode 100644 index 00000000000..08e6a1cc3ec --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/clipboard/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "剪切", + "actions.clipboard.copyLabel": "å¤åˆ¶", + "actions.clipboard.pasteLabel": "粘贴", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "å¤åˆ¶å¹¶çªå‡ºæ˜¾ç¤ºè¯­æ³•" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/comment/comment.i18n.json b/i18n/chs/src/vs/editor/contrib/comment/comment.i18n.json new file mode 100644 index 00000000000..34ee8916cd6 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/comment/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "切æ¢è¡Œæ³¨é‡Š", + "comment.line.add": "添加行注释", + "comment.line.remove": "删除行注释", + "comment.block": "切æ¢å—注释" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json b/i18n/chs/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json new file mode 100644 index 00000000000..73baa574779 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "显示编辑器上下文èœå•" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/find/findController.i18n.json b/i18n/chs/src/vs/editor/contrib/find/findController.i18n.json new file mode 100644 index 00000000000..385ba32bfeb --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/find/findController.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "查找", + "findNextMatchAction": "查找下一个", + "findPreviousMatchAction": "查找上一个", + "nextSelectionMatchFindAction": "查找下一个选择", + "previousSelectionMatchFindAction": "查找上一个选择", + "startReplace": "替æ¢", + "showNextFindTermAction": "显示下一个æœç´¢ç»“æžœ", + "showPreviousFindTermAction": "显示上一个æœç´¢ç»“æžœ" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/find/findWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/find/findWidget.i18n.json new file mode 100644 index 00000000000..9f9c20bbce2 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/find/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "查找", + "placeholder.find": "查找", + "label.previousMatchButton": "上一个匹é…", + "label.nextMatchButton": "下一个匹é…", + "label.toggleSelectionFind": "在选定内容中查找", + "label.closeButton": "关闭", + "label.replace": "替æ¢", + "placeholder.replace": "替æ¢", + "label.replaceButton": "替æ¢", + "label.replaceAllButton": "全部替æ¢", + "label.toggleReplaceButton": "åˆ‡æ¢æ›¿æ¢æ¨¡å¼", + "title.matchesCountLimit": "ä»…é«˜äº®äº†å‰ {0} 个结果,但所有查找æ“作å‡é’ˆå¯¹å…¨æ–‡ã€‚", + "label.matchesLocation": "第 {0} 个(å…± {1} 个)", + "label.noResults": "无结果" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/find/simpleFindWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/find/simpleFindWidget.i18n.json new file mode 100644 index 00000000000..d650d2c5ce6 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/find/simpleFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "查找", + "placeholder.find": "查找", + "label.previousMatchButton": "上一个匹é…", + "label.nextMatchButton": "下一个匹é…", + "label.closeButton": "关闭" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/chs/src/vs/editor/contrib/folding/folding.i18n.json new file mode 100644 index 00000000000..90d90c3c8ff --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/folding/folding.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "展开", + "unFoldRecursivelyAction.label": "以递归方å¼å±•å¼€", + "foldAction.label": "折å ", + "foldRecursivelyAction.label": "ä»¥é€’å½’æ–¹å¼æŠ˜å ", + "foldAllBlockComments.label": "æŠ˜å æ‰€æœ‰å—注释", + "foldAllAction.label": "全部折å ", + "unfoldAllAction.label": "全部展开", + "foldLevelAction.label": "折å çº§åˆ« {0}" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/format/formatActions.i18n.json b/i18n/chs/src/vs/editor/contrib/format/formatActions.i18n.json new file mode 100644 index 00000000000..628b8cc784e --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/format/formatActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "在第 {0} 行进行了 1 次格å¼ç¼–辑", + "hintn1": "在第 {1} 行进行了 {0} 次格å¼ç¼–辑", + "hint1n": "第 {0} 行到第 {1} 行间进行了 1 次格å¼ç¼–辑", + "hintnn": "第 {1} 行到第 {2} 行间进行了 {0} 次格å¼ç¼–辑", + "no.provider": "æŠ±æ­‰ï¼Œå½“å‰æ²¡æœ‰å®‰è£…“{0}â€æ–‡ä»¶çš„æ ¼å¼åŒ–程åºã€‚", + "formatDocument.label": "æ ¼å¼åŒ–文件", + "formatSelection.label": "æ ¼å¼åŒ–选定代ç " +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json b/i18n/chs/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json new file mode 100644 index 00000000000..2f90179af6b --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "未找到“{0}â€çš„任何定义", + "generic.noResults": "找ä¸åˆ°å®šä¹‰", + "meta.title": " – {0} 定义", + "actions.goToDecl.label": "转到定义", + "actions.goToDeclToSide.label": "打开侧边的定义", + "actions.previewDecl.label": "速览定义", + "goToImplementation.noResultWord": "未找到“{0}â€çš„实现", + "goToImplementation.generic.noResults": "未找到实现", + "meta.implementations.title": "– {0} 个实现", + "actions.goToImplementation.label": "转到实现", + "actions.peekImplementation.label": "速览实现", + "goToTypeDefinition.noResultWord": "未找到“{0}â€çš„类型定义", + "goToTypeDefinition.generic.noResults": "未找到类型定义", + "meta.typeDefinitions.title": " – {0} 个类型定义", + "actions.goToTypeDefinition.label": "转到类型定义", + "actions.peekTypeDefinition.label": "速览类型定义" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json b/i18n/chs/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json new file mode 100644 index 00000000000..ab0b4761cf9 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "å•击显示 {0} 个定义。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/gotoError/gotoError.i18n.json b/i18n/chs/src/vs/editor/contrib/gotoError/gotoError.i18n.json new file mode 100644 index 00000000000..8dc6ee58760 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/gotoError/gotoError.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "转到下一个错误或警告", + "markerAction.previous.label": "转到上一个错误或警告", + "editorMarkerNavigationError": "编辑器标记导航å°ç»„件错误颜色。", + "editorMarkerNavigationWarning": "编辑器标记导航å°ç»„件警告颜色。", + "editorMarkerNavigationInfo": "编辑器标记导航å°ç»„ä»¶ä¿¡æ¯é¢œè‰²ã€‚", + "editorMarkerNavigationBackground": "编辑器标记导航å°ç»„件背景色。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/hover/hover.i18n.json b/i18n/chs/src/vs/editor/contrib/hover/hover.i18n.json new file mode 100644 index 00000000000..65910844481 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/hover/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "显示悬åœ" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/hover/modesContentHover.i18n.json b/i18n/chs/src/vs/editor/contrib/hover/modesContentHover.i18n.json new file mode 100644 index 00000000000..f37c4060b5b --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/hover/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "正在加载..." +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json b/i18n/chs/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json new file mode 100644 index 00000000000..8017b862c10 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "替æ¢ä¸ºä¸Šä¸€ä¸ªå€¼", + "InPlaceReplaceAction.next.label": "替æ¢ä¸ºä¸‹ä¸€ä¸ªå€¼" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/indentation/indentation.i18n.json b/i18n/chs/src/vs/editor/contrib/indentation/indentation.i18n.json new file mode 100644 index 00000000000..5bd5906da32 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/indentation/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "将缩进转æ¢ä¸ºç©ºæ ¼", + "indentationToTabs": "将缩进转æ¢ä¸ºåˆ¶è¡¨ç¬¦", + "configuredTabSize": "å·²é…置制表符大å°", + "selectTabWidth": "é€‰æ‹©å½“å‰æ–‡ä»¶çš„制表符大å°", + "indentUsingTabs": "使用“Tabâ€ç¼©è¿›", + "indentUsingSpaces": "使用空格缩进", + "detectIndentation": "检查内容中的缩进", + "editor.reindentlines": "釿–°ç¼©è¿›è¡Œ" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json b/i18n/chs/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json new file mode 100644 index 00000000000..346d11b6706 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "å‘上å¤åˆ¶è¡Œ", + "lines.copyDown": "å‘下å¤åˆ¶è¡Œ", + "lines.moveUp": "å‘上移动行", + "lines.moveDown": "å‘下移动行", + "lines.sortAscending": "按å‡åºæŽ’列行", + "lines.sortDescending": "按é™åºæŽ’列行", + "lines.trimTrailingWhitespace": "è£å‰ªå°¾éšç©ºæ ¼", + "lines.delete": "删除行", + "lines.indent": "行缩进", + "lines.outdent": "行å‡å°‘缩进", + "lines.insertBefore": "åœ¨ä¸Šé¢æ’入行", + "lines.insertAfter": "åœ¨ä¸‹é¢æ’入行", + "lines.deleteAllLeft": "删除左侧所有内容", + "lines.deleteAllRight": "删除å³ä¾§æ‰€æœ‰å†…容", + "lines.joinLines": "åˆå¹¶è¡Œ", + "editor.transpose": "转置游标处的字符", + "editor.transformToUppercase": "转æ¢ä¸ºå¤§å†™", + "editor.transformToLowercase": "转æ¢ä¸ºå°å†™" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/links/links.i18n.json b/i18n/chs/src/vs/editor/contrib/links/links.i18n.json new file mode 100644 index 00000000000..51e2dbb5554 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/links/links.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Cmd + å•击以跟踪链接", + "links.navigate": "æŒ‰ä½ Ctrl å¹¶å•击å¯è®¿é—®é“¾æŽ¥", + "links.command.mac": "Cmd + å•击以执行命令", + "links.command": "Ctrl + å•击以执行命令", + "links.navigate.al": "æŒ‰ä½ Alt å¹¶å•击å¯è®¿é—®é“¾æŽ¥", + "links.command.al": "Alt + å•击以执行命令", + "invalid.url": "抱歉,无法打开此链接,因为其格å¼ä¸æ­£ç¡®: {0}", + "missing.url": "抱歉,无法打开此链接,因为其目标丢失。", + "label": "打开链接" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/multicursor/multicursor.i18n.json b/i18n/chs/src/vs/editor/contrib/multicursor/multicursor.i18n.json new file mode 100644 index 00000000000..3c402b850dd --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/multicursor/multicursor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "åœ¨ä¸Šé¢æ·»åŠ å…‰æ ‡", + "mutlicursor.insertBelow": "åœ¨ä¸‹é¢æ·»åŠ å…‰æ ‡", + "mutlicursor.insertAtEndOfEachLineSelected": "在行尾添加光标", + "addSelectionToNextFindMatch": "将选择添加到下一个查找匹é…项", + "addSelectionToPreviousFindMatch": "将选择内容添加到上一查找匹é…项", + "moveSelectionToNextFindMatch": "将上次选择移动到下一个查找匹é…项", + "moveSelectionToPreviousFindMatch": "将上个选择内容移动到上一查找匹é…项", + "selectAllOccurrencesOfFindMatch": "选择所有找到的查找匹é…项", + "changeAll.label": "更改所有匹é…项" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json b/i18n/chs/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json new file mode 100644 index 00000000000..af6d0f3a465 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "触å‘傿•°æç¤º" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json new file mode 100644 index 00000000000..d56310c9916 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0},æç¤º" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/chs/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json new file mode 100644 index 00000000000..57cec414a18 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "显示修补程åº({0})", + "quickFix": "显示修补程åº", + "quickfix.trigger.label": "快速修å¤" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json new file mode 100644 index 00000000000..3ebf52a28ce --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "关闭" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json b/i18n/chs/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json new file mode 100644 index 00000000000..6feb8c65167 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": " – {0} 个引用", + "references.action.label": "查找所有引用" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json b/i18n/chs/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json new file mode 100644 index 00000000000..ee8d3370d1d --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "正在加载..." +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json b/i18n/chs/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json new file mode 100644 index 00000000000..710eeeefcfc --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "在文件 {0} çš„ {1} 行 {2} 列的符å·", + "aria.fileReferences.1": "{0} 中有 1 个符å·ï¼Œå®Œæ•´è·¯å¾„:{1}", + "aria.fileReferences.N": "{1} 中有 {0} 个符å·ï¼Œå®Œæ•´è·¯å¾„:{2}", + "aria.result.0": "未找到结果", + "aria.result.1": "在 {0} 中找到 1 个符å·", + "aria.result.n1": "在 {1} 中找到 {0} 个符å·", + "aria.result.nm": "在 {1} 个文件中找到 {0} 个符å·" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json new file mode 100644 index 00000000000..70e89645ee3 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "è§£æžæ–‡ä»¶å¤±è´¥ã€‚", + "referencesCount": "{0} 个引用", + "referenceCount": "{0} 个引用", + "missingPreviewMessage": "æ— å¯ç”¨é¢„览", + "treeAriaLabel": "引用", + "noResults": "无结果", + "peekView.alternateTitle": "引用", + "peekViewTitleBackground": "速览视图标题区域背景颜色。", + "peekViewTitleForeground": "速览视图标题颜色。", + "peekViewTitleInfoForeground": "速览视图标题信æ¯é¢œè‰²ã€‚", + "peekViewBorder": "速览视图边框和箭头颜色。", + "peekViewResultsBackground": "速览视图结果列表背景颜色。", + "peekViewResultsMatchForeground": "é€Ÿè§ˆè§†å›¾ç»“æžœåˆ—è¡¨ä¸­è¡ŒèŠ‚ç‚¹çš„å‰æ™¯è‰²ã€‚", + "peekViewResultsFileForeground": "é€Ÿè§ˆè§†å›¾ç»“æžœåˆ—è¡¨ä¸­æ–‡ä»¶èŠ‚ç‚¹çš„å‰æ™¯è‰²ã€‚", + "peekViewResultsSelectionBackground": "速览视图结果列表中所选æ¡ç›®çš„背景颜色。", + "peekViewResultsSelectionForeground": "速览视图结果列表中所选æ¡ç›®çš„剿™¯è‰²ã€‚", + "peekViewEditorBackground": "速览视图编辑器背景颜色。", + "peekViewEditorGutterBackground": "速览视图编辑器中导航线的背景颜色。", + "peekViewResultsMatchHighlight": "在速览视图结果列表中匹é…çªå‡ºæ˜¾ç¤ºé¢œè‰²ã€‚", + "peekViewEditorMatchHighlight": "在速览视图编辑器中匹é…çªå‡ºæ˜¾ç¤ºé¢œè‰²ã€‚" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/rename/rename.i18n.json b/i18n/chs/src/vs/editor/contrib/rename/rename.i18n.json new file mode 100644 index 00000000000..1f33c3d33d2 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/rename/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "无结果。", + "aria": "æˆåŠŸå°†â€œ{0}â€é‡å‘½å为“{1}â€ã€‚摘è¦ï¼š{2}", + "rename.failed": "抱歉,é‡å‘½å无法执行。", + "rename.label": "é‡å‘½å符å·" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/rename/renameInputField.i18n.json b/i18n/chs/src/vs/editor/contrib/rename/renameInputField.i18n.json new file mode 100644 index 00000000000..e4a7636ddc1 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/rename/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "é‡å‘½å输入。键入新å称并按 \"Enter\" æäº¤ã€‚" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json b/i18n/chs/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json new file mode 100644 index 00000000000..6109b7602b0 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "扩大选择", + "smartSelect.shrink": "缩å°é€‰æ‹©" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/suggest/suggestController.i18n.json b/i18n/chs/src/vs/editor/contrib/suggest/suggestController.i18n.json new file mode 100644 index 00000000000..ef3fe110728 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/suggest/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "确认“{0}â€æ’入以下文本:{1}", + "suggest.trigger.label": "触å‘建议" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/suggest/suggestWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/suggest/suggestWidget.i18n.json new file mode 100644 index 00000000000..ec34ba659f1 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/suggest/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "建议å°ç»„件的背景颜色", + "editorSuggestWidgetBorder": "建议å°ç»„件的边框颜色", + "editorSuggestWidgetForeground": "建议å°ç»„ä»¶çš„å‰æ™¯é¢œè‰²ã€‚", + "editorSuggestWidgetSelectedBackground": "建议å°ç»„件中被选择æ¡ç›®çš„背景颜色。", + "editorSuggestWidgetHighlightForeground": "建议å°ç»„件中匹é…内容的高亮颜色。", + "readMore": "阅读详细信æ¯...{0}", + "suggestionWithDetailsAriaLabel": "{0}(建议)具有详细信æ¯", + "suggestionAriaLabel": "{0},建议", + "readLess": "阅读简略信æ¯...{0}", + "suggestWidget.loading": "正在加载...", + "suggestWidget.noSuggestions": "无建议。", + "suggestionAriaAccepted": "{0},已接å—", + "ariaCurrentSuggestionWithDetails": "{0}(建议)具有详细信æ¯", + "ariaCurrentSuggestion": "{0},建议" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json b/i18n/chs/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json new file mode 100644 index 00000000000..897e74dff44 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "åˆ‡æ¢ Tab 键是å¦ç§»åŠ¨ç„¦ç‚¹" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json b/i18n/chs/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json new file mode 100644 index 00000000000..7926047995c --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "读å–访问时符å·çš„背景颜色,例如读å–å˜é‡æ—¶ã€‚", + "wordHighlightStrong": "写入访问时符å·çš„背景颜色,例如写入å˜é‡æ—¶ã€‚", + "overviewRulerWordHighlightForeground": "概述符å·çªå‡ºæ˜¾ç¤ºçš„æ ‡å°ºæ ‡è®°é¢œè‰²ã€‚", + "overviewRulerWordHighlightStrongForeground": "概述写访问符å·çªå‡ºæ˜¾ç¤ºçš„æ ‡å°ºæ ‡è®°é¢œè‰²ã€‚", + "wordHighlight.next.label": "转到下一个çªå‡ºæ˜¾ç¤ºçš„符å·", + "wordHighlight.previous.label": "转到上一个çªå‡ºæ˜¾ç¤ºçš„符å·" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index d9700a739f9..21c4685e274 100644 --- a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -39,7 +39,7 @@ "dup": "命令“{0}â€å¤šæ¬¡å‡ºçŽ°åœ¨â€œå‘½ä»¤â€éƒ¨åˆ†ã€‚", "menuId.invalid": "“{0}â€ä¸ºæ— æ•ˆèœå•标识符", "missing.command": "èœå•项引用未在“命令â€éƒ¨åˆ†è¿›è¡Œå®šä¹‰çš„命令“{0}â€ã€‚", - "missing.altCommand": "èœå•项引用未在“命令â€éƒ¨åˆ†è¿›è¡Œå®šä¹‰çš„ alt 命令“{0}â€ã€‚", - "dupe.command": "èœå•项引用与默认和 alt 命令相åŒçš„命令", + "missing.altCommand": "èœå•项引用了未在 \"commands\" 部分定义的替代命令“{0}â€ã€‚", + "dupe.command": "èœå•项引用的命令中默认和替代命令相åŒ", "nosupport.altCommand": "抱歉,目å‰ä»…有 \"editor/title\" èœå•çš„ \"navigation\" ç»„æ”¯æŒæ›¿ä»£å‘½ä»¤" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/environment/node/argv.i18n.json b/i18n/chs/src/vs/platform/environment/node/argv.i18n.json index 9fc0d95c7bd..77d5d77fd7b 100644 --- a/i18n/chs/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/chs/src/vs/platform/environment/node/argv.i18n.json @@ -12,9 +12,11 @@ "newWindow": "强制创建一个新的 Code 实例。", "performance": "通过å¯ç”¨ \"Developer: Startup Performance\" 命令开始。", "prof-startup": "å¯åŠ¨æœŸé—´è¿è¡Œ CPU 探查器", + "inspect-extensions": "å…许进行扩展的调试与分æžã€‚检查开å‘人员工具å¯èŽ·å–连接 URI。", + "inspect-brk-extensions": "å…许在扩展主机在å¯åŠ¨åŽæš‚åœæ—¶è¿›è¡Œæ‰©å±•的调试与分æžã€‚检查开å‘人员工具å¯èŽ·å–连接 URI。", "reuseWindow": "在上一活动窗å£ä¸­å¼ºåˆ¶æ‰“开文件或文件夹。", - "userDataDir": "指定存放用户数æ®çš„目录,此目录在作为根è¿è¡Œæ—¶å分有用。", - "verbose": "打å°è¯¦ç»†è¾“出(表示 - 等待)。", + "userDataDir": "指定存放用户数æ®çš„目录。此目录在以 root 身份è¿è¡Œæ—¶å分有用。", + "verbose": "打å°è¯¦ç»†è¾“出(éšå« --wait 傿•°)。", "wait": "等文件关闭åŽå†è¿”回。", "extensionHomePath": "设置扩展的根路径。", "listExtensions": "列出已安装的扩展。", @@ -24,6 +26,7 @@ "experimentalApis": "å¯ç”¨æ‰©å±•程åºå®žéªŒæ€§ api 功能。", "disableExtensions": "ç¦ç”¨æ‰€æœ‰å·²å®‰è£…的扩展。", "disableGPU": "ç¦ç”¨ GPU 硬件加速。", + "status": "打å°è¿›ç¨‹ä½¿ç”¨æƒ…况和诊断信æ¯ã€‚", "version": "打å°ç‰ˆæœ¬ã€‚", "help": "打å°ä½¿ç”¨æƒ…况。", "usage": "使用情况", diff --git a/i18n/chs/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/chs/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index e17a499e47f..5b77e214eaa 100644 --- a/i18n/chs/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/chs/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "notFound": "未找到扩展å", - "noCompatible": "找ä¸åˆ°å¯ä¸Žæ­¤ä»£ç ç‰ˆæœ¬å…¼å®¹çš„ {0} 版本。" + "notCompatibleDownload": "无法下载。找ä¸åˆ°ä¸Ž VS Code 当å‰ç‰ˆæœ¬ ({0}) 兼容的扩展。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/chs/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index 123f6947cde..a6e3a8ea7bc 100644 --- a/i18n/chs/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/chs/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,11 +6,16 @@ { "invalidManifest": "扩展无效: package.json 䏿˜¯ JSON 文件。", "restartCodeLocal": "请先é‡å¯ Code å†é‡æ–°å®‰è£… {0}。", - "restartCodeGallery": "请先é‡å¯ Code å†é‡æ–°å®‰è£…。", + "installingOutdatedExtension": "您已安装此扩展的新版程åºã€‚是å¦è¦ä½¿ç”¨æ—§ç‰ˆè¦†ç›–?", + "override": "覆盖", + "cancel": "å–æ¶ˆ", + "notFoundCompatible": "无法安装。找ä¸åˆ°ä¸Ž VS Code 当å‰ç‰ˆæœ¬ ({1}) 兼容的扩展“{0}â€ã€‚", + "quitCode": "无法安装,因为此扩展的一个过时实例ä»åœ¨è¿è¡Œã€‚请先完全é‡å¯ VS Code,å†é‡æ–°å®‰è£…。", + "exitCode": "无法安装,因为此扩展的一个过时实例ä»åœ¨è¿è¡Œã€‚请先完全é‡å¯ VS Code,å†é‡æ–°å®‰è£…。", + "notFoundCompatibleDependency": "无法安装。找ä¸åˆ°ä¸Ž VS Code 当å‰ç‰ˆæœ¬ ({1}) 兼容的ä¾èµ–扩展“{0}â€ã€‚", "uninstallDependeciesConfirmation": "è¦ä»…å¸è½½â€œ{0}â€æˆ–者其ä¾èµ–项也一起å¸è½½?", "uninstallOnly": "ä»…", "uninstallAll": "全部", - "cancel": "å–æ¶ˆ", "uninstallConfirmation": "是å¦ç¡®å®šè¦å¸è½½â€œ{0}â€?", "ok": "确定", "singleDependentError": "无法å¸è½½æ‰©å±•程åºâ€œ{0}â€ã€‚扩展程åºâ€œ{1}â€ä¾èµ–于此。", diff --git a/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 4ae3c02e3c1..66040db95cc 100644 --- a/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -5,22 +5,24 @@ // Do not edit this file. It is machine generated. { "vscode.extension.engines.vscode": "对于 VS Code 扩展程åºï¼ŒæŒ‡å®šè¯¥æ‰©å±•程åºä¸Žä¹‹å…¼å®¹çš„ VS Code 版本。ä¸èƒ½ä¸º *. 例如: ^0.10.5 表示最低兼容 VS Code 版本 0.10.5。", - "vscode.extension.publisher": "VS Code 扩展的å‘布æœåŠ¡å™¨ã€‚", + "vscode.extension.publisher": "VS Code 扩展的å‘布者。", "vscode.extension.displayName": "VS Code 库中使用的扩展的显示å称。", "vscode.extension.categories": "VS Code 库用于对扩展进行分类的类别。", - "vscode.extension.galleryBanner": "VS Code 商城使用的横幅。", + "vscode.extension.galleryBanner": "在 VS Code 商店中使用的横幅。", "vscode.extension.galleryBanner.color": "VS Code 商城页标题上的横幅颜色。", - "vscode.extension.galleryBanner.theme": "横幅中使用的字体颜色主题。", + "vscode.extension.galleryBanner.theme": "横幅文字的颜色主题。", "vscode.extension.contributes": "由此包表示的 VS Code 扩展的所有贡献。", - "vscode.extension.preview": "在 Marketplace 中设置扩展,将其标记为“预览â€ã€‚", + "vscode.extension.preview": "在商店中将扩展标记为“预览版â€", "vscode.extension.activationEvents": "VS Code 扩展的激活事件。", "vscode.extension.activationEvents.onLanguage": "在打开被解æžä¸ºæŒ‡å®šè¯­è¨€çš„æ–‡ä»¶æ—¶å‘出的激活事件。", "vscode.extension.activationEvents.onCommand": "在调用指定命令时å‘出的激活事件。", "vscode.extension.activationEvents.onDebug": "在用户准备调试或准备设置调试é…置时å‘出的激活事件。", + "vscode.extension.activationEvents.onDebugInitialConfigurations": "在需è¦åˆ›å»º \"launch.json\" 文件 (且需è¦è°ƒç”¨ provideDebugConfigurations 的所有方法) æ—¶å‘出的激活事件。", + "vscode.extension.activationEvents.onDebugResolve": "在将è¦å¯åŠ¨å…·æœ‰ç‰¹å®šç±»åž‹çš„è°ƒè¯•ä¼šè¯ (且需è¦è°ƒç”¨ç›¸åº”çš„ resolveDebugConfiguration 方法) æ—¶å‘出的激活事件。", "vscode.extension.activationEvents.workspaceContains": "在打开至少包å«ä¸€ä¸ªåŒ¹é…指定 glob 模å¼çš„æ–‡ä»¶çš„æ–‡ä»¶å¤¹æ—¶å‘出的激活事件。", "vscode.extension.activationEvents.onView": "在指定视图被展开时å‘出的激活事件。", "vscode.extension.activationEvents.star": "在 VS Code å¯åŠ¨æ—¶å‘出的激活事件。为确ä¿è‰¯å¥½çš„æœ€ç»ˆç”¨æˆ·ä½“验,请仅在其他激活事件组åˆä¸é€‚用于你的情况时,æ‰åœ¨æ‰©å±•中使用此事件。", - "vscode.extension.badges": "在 Marketplace 的扩展页边æ ä¸­æ˜¾ç¤ºçš„徽章数组。", + "vscode.extension.badges": "在商店扩展页é¢ä¾§è¾¹æ ä¸­æ˜¾ç¤ºçš„徽章的数组。", "vscode.extension.badges.url": "å¾½ç« å›¾åƒ URL。", "vscode.extension.badges.href": "徽章链接。", "vscode.extension.badges.description": "徽章说明。", diff --git a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json index 5827e2f251e..7c3d96dd488 100644 --- a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -25,11 +25,11 @@ "inputBoxBorder": "输入框边框。", "inputBoxActiveOptionBorder": "输入字段中已激活选项的边框颜色。", "inputPlaceholderForeground": "输入框中å ä½ç¬¦çš„剿™¯è‰²ã€‚", - "inputValidationInfoBackground": "䏥釿€§ä¸ºä¿¡æ¯æ—¶è¾“入验è¯çš„背景颜色。", + "inputValidationInfoBackground": "输入验è¯ç»“果为信æ¯çº§åˆ«æ—¶çš„背景色。", "inputValidationInfoBorder": "䏥釿€§ä¸ºä¿¡æ¯æ—¶è¾“入验è¯çš„边框颜色。", - "inputValidationWarningBackground": "䏥釿€§ä¸ºè­¦å‘Šæ—¶è¾“入验è¯çš„背景颜色。", + "inputValidationWarningBackground": "输入验è¯ç»“果为警告级别时的背景色。", "inputValidationWarningBorder": "䏥釿€§ä¸ºè­¦å‘Šæ—¶è¾“入验è¯çš„边框颜色。", - "inputValidationErrorBackground": "䏥釿€§ä¸ºé”™è¯¯æ—¶è¾“入验è¯çš„背景颜色。", + "inputValidationErrorBackground": "输入验è¯ç»“果为错误级别时的背景色。", "inputValidationErrorBorder": "䏥釿€§ä¸ºé”™è¯¯æ—¶è¾“入验è¯çš„边框颜色。", "dropdownBackground": "下拉列表背景色。", "dropdownForeground": "ä¸‹æ‹‰åˆ—è¡¨å‰æ™¯è‰²ã€‚", diff --git a/i18n/chs/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/chs/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json new file mode 100644 index 00000000000..d9e09ebdfd0 --- /dev/null +++ b/i18n/chs/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleTabs": "åˆ‡æ¢æ ‡ç­¾é¡µå¯è§æ€§", + "view": "查看" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json index c6251151901..01a52479aba 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "largeNumberBadge": "1万+", "badgeTitle": "{0} - {1}", "additionalViews": "其他视图", "numberBadge": "{0} ({1})", diff --git a/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 1e469098294..dd3e01e846c 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -33,6 +33,7 @@ "openPreviousEditor": "打开上一个编辑器", "nextEditorInGroup": "打开组中的下一个编辑器", "openPreviousEditorInGroup": "打开组中上一个编辑器", + "lastEditorInGroup": "打开组中上一个编辑器", "navigateNext": "å‰è¿›", "navigatePrevious": "åŽé€€", "navigateLast": "转到最åŽ", diff --git a/i18n/chs/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index 086f25858e1..9c9da616c68 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,7 +6,7 @@ { "editorCommand.activeEditorMove.description": "按标签或按组移动活动编辑器", "editorCommand.activeEditorMove.arg.name": "æ´»åŠ¨ç¼–è¾‘å™¨ç§»åŠ¨å‚æ•°", - "editorCommand.activeEditorMove.arg.description": "傿•°å±žæ€§:\n\t\t\t\t\t\t* 'to': æä¾›å‘何处移动的字符串值。\n\t\t\t\t\t\t* 'by': æä¾›è¦ç§»åŠ¨çš„å•元的字符串值。按标签或按组。\n\t\t\t\t\t\t* 'value': æä¾›è¦ç§»åŠ¨çš„ä½ç½®æˆ–ç»å¯¹ä½ç½®æ•°é‡çš„æ•°å­—值。\n\t\t\t\t\t", + "editorCommand.activeEditorMove.arg.description": "傿•°å±žæ€§:\n\t* \"to\": æä¾›å‘何处移动的字符串值。\n\t* \"by\": æä¾›ç§»åŠ¨çš„å•ä½çš„å­—ç¬¦ä¸²å€¼ã€‚æŒ‰é€‰é¡¹å¡æˆ–按组。\n\t* \"value\": æä¾›ç§»åŠ¨çš„ä½ç½®æ•°é‡æˆ–移动到的ç»å¯¹ä½ç½®çš„æ•°å­—型值。", "commandDeprecated": "已删除命令 **{0}**。你å¯ä»¥æ”¹ç”¨ **{1}**", "openKeybindings": "é…ç½®é”®ç›˜å¿«æ·æ–¹å¼" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 67671aeb85c..65d7dab6d61 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -53,5 +53,5 @@ "screenReaderDetectedExplanation.answerYes": "是", "screenReaderDetectedExplanation.answerNo": "å¦", "screenReaderDetectedExplanation.body1": "VS Code 已为å±å¹•阅读器的使用进行优化。", - "screenReaderDetectedExplanation.body2": "一些编辑器功能将有ä¸åŒçš„行为: 例如,文字æ¢è¡Œï¼ŒæŠ˜å ï¼Œè‡ªåŠ¨å…³é—­æ‹¬å·ç­‰ã€‚" + "screenReaderDetectedExplanation.body2": "æŸäº›ç¼–辑器功能å¯èƒ½ä¼šæœ‰ä¸åŒçš„行为,例如自动æ¢è¡Œã€æŠ˜å ç­‰ã€‚" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/quickopen.i18n.json b/i18n/chs/src/vs/workbench/browser/quickopen.i18n.json index 949f6468fc2..a6af2a3c874 100644 --- a/i18n/chs/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/quickopen.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "noResultsMatching": "没有匹é…的结果", - "noResultsFound2": "未找到结果", - "entryAriaLabel": "{0},命令" + "noResultsFound2": "未找到结果" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json index 47bc050edeb..8b65741ef0b 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json @@ -30,7 +30,7 @@ "openRecent": "打开最近的文件…", "quickOpenRecent": "快速打开最近的文件…", "closeMessages": "关闭通知消æ¯", - "reportIssues": "报告问题", + "reportIssueInEnglish": "使用英文报告问题", "reportPerformanceIssue": "报告性能问题", "keybindingsReference": "é”®ç›˜å¿«æ·æ–¹å¼å‚考", "openDocumentationUrl": "文档", @@ -47,5 +47,25 @@ "showNextWindowTab": "显示下一个窗å£é€‰é¡¹å¡", "moveWindowTabToNewWindow": "将窗å£é€‰é¡¹å¡ç§»åŠ¨åˆ°æ–°çª—å£", "mergeAllWindowTabs": "åˆå¹¶æ‰€æœ‰çª—å£", - "toggleWindowTabsBar": "切æ¢çª—å£é€‰é¡¹å¡æ " + "toggleWindowTabsBar": "切æ¢çª—å£é€‰é¡¹å¡æ ", + "configureLocale": "é…置语言", + "displayLanguage": "定义 VSCode 的显示语言。", + "doc": "请å‚阅 {0},了解支æŒçš„语言列表。", + "restart": "更改此值需è¦é‡å¯ VSCode。", + "fail.createSettings": "无法创建“{0}â€({1})。", + "openLogsFolder": "打开日志文件夹", + "showLogs": "显示日志...", + "mainProcess": "主进程", + "sharedProcess": "共享进程", + "rendererProcess": "渲染器进程", + "extensionHost": "扩展主机", + "selectProcess": "选择进程", + "setLogLevel": "设置日志级别", + "trace": "跟踪", + "debug": "调试", + "info": "ä¿¡æ¯", + "warn": "警告", + "err": "错误", + "critical": "关键", + "off": "关闭" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json index 91dacb2a81d..e93318a00b8 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,8 +7,8 @@ "view": "查看", "help": "帮助", "file": "文件", - "workspaces": "工作区", "developer": "å¼€å‘者", + "workspaces": "工作区", "showEditorTabs": "æŽ§åˆ¶æ‰“å¼€çš„ç¼–è¾‘å™¨æ˜¯å¦æ˜¾ç¤ºåœ¨é€‰é¡¹å¡ä¸­ã€‚", "workbench.editor.labelFormat.default": "显示文件å。当å¯ç”¨é€‰é¡¹å¡ä¸”在åŒä¸€ç»„内有两个相åŒå称的文件时,将添加æ¯ä¸ªæ–‡ä»¶è·¯å¾„中å¯ä»¥ç”¨äºŽåŒºåˆ†çš„部分。在选项å¡è¢«ç¦ç”¨ä¸”编辑器活动时,将显示相对于工作区文件夹的路径。", "workbench.editor.labelFormat.short": "在文件的目录åä¹‹åŽæ˜¾ç¤ºæ–‡ä»¶å。", @@ -16,6 +16,7 @@ "workbench.editor.labelFormat.long": "在文件的ç»å¯¹è·¯å¾„ä¹‹åŽæ˜¾ç¤ºæ–‡ä»¶å。", "tabDescription": "控制编辑器标签的格å¼ã€‚修改这项设置会让文件的路径更容易ç†è§£ï¼š\n- short: \"parent\"\n- medium: \"workspace/src/parent\"\n- long: \"/home/user/workspace/src/parent\"\n- default: 当与å¦ä¸€é€‰é¡¹å¡æ ‡é¢˜ç›¸åŒæ—¶ä¸º \".../parent\"。选项å¡è¢«ç¦ç”¨æ—¶åˆ™ä¸ºç›¸å¯¹å·¥ä½œåŒºè·¯å¾„", "editorTabCloseButton": "控制编辑器的选项å¡å…³é—­æŒ‰é’®çš„ä½ç½®ï¼Œæˆ–当设置为 \"off\" æ—¶ç¦ç”¨å…³é—­å®ƒä»¬ã€‚", + "tabSizing": "控制编辑器选项å¡çš„大å°ã€‚若设置为 \"fit\",选项å¡å°†æ€»æ˜¯è¶³å¤Ÿå¤§ï¼Œèƒ½å¤Ÿå®Œå…¨æ˜¾ç¤ºç¼–辑器标签。若设置为 \"shrink\",将在ä¸èƒ½ä¸€æ¬¡å…¨éƒ¨æ˜¾ç¤ºæ‰€æœ‰é€‰é¡¹å¡æ—¶ï¼Œå…许选项å¡ç¼©å°ã€‚", "showIcons": "控制打开的编辑器是å¦éšå›¾æ ‡ä¸€èµ·æ˜¾ç¤ºã€‚这还需å¯ç”¨å›¾æ ‡ä¸»é¢˜ã€‚", "enablePreview": "控制是å¦å°†æ‰“开的编辑器显示为预览。预览编辑器将会é‡ç”¨è‡³å…¶è¢«ä¿ç•™(例如,通过åŒå‡»æˆ–编辑),且其字体样å¼å°†ä¸ºæ–œä½“。", "enablePreviewFromQuickOpen": "控制 Quick Open ä¸­æ‰“å¼€çš„ç¼–è¾‘å™¨æ˜¯å¦æ˜¾ç¤ºä¸ºé¢„览。预览编辑器å¯ä»¥é‡æ–°ä½¿ç”¨ï¼Œç›´åˆ°å°†å…¶ä¿ç•™(例如,通过åŒå‡»æˆ–编辑)。", @@ -26,18 +27,17 @@ "closeOnFocusLost": "控制 Quick Open 是å¦åº”在失去焦点时自动关闭。", "openDefaultSettings": "æŽ§åˆ¶æ‰“å¼€è®¾ç½®æ—¶æ˜¯å¦æ‰“开显示所有默认设置的编辑器。", "sideBarLocation": "控制边æ çš„ä½ç½®ã€‚å®ƒå¯æ˜¾ç¤ºåœ¨å·¥ä½œå°çš„左侧或å³ä¾§ã€‚", - "panelLocation": "æŽ§åˆ¶é¢æ¿çš„ä½ç½®ã€‚å®ƒå¯æ˜¾ç¤ºåœ¨å·¥ä½œå°çš„底部或å³ä¾§ã€‚", "statusBarVisibility": "控制工作å°åº•éƒ¨çŠ¶æ€æ çš„å¯è§æ€§ã€‚", "activityBarVisibility": "控制工作å°ä¸­æ´»åЍæ çš„å¯è§æ€§ã€‚", "closeOnFileDelete": "控制文件被其他æŸäº›è¿›ç¨‹åˆ é™¤æˆ–é‡å‘½å时是å¦åº”该自动关闭显示文件的编辑器。ç¦ç”¨æ­¤é¡¹ä¼šä¿æŒç¼–è¾‘å™¨ä½œä¸ºæ­¤ç±»äº‹ä»¶çš„è„æ–‡ä»¶æ‰“开。请注æ„,从应用程åºå†…部进行删除æ“ä½œä¼šå§‹ç»ˆå…³é—­ç¼–è¾‘å™¨ï¼Œå¹¶ä¸”è„æ–‡ä»¶å§‹ç»ˆä¸ä¼šå…³é—­ä»¥ä¿å­˜æ•°æ®ã€‚", - "experimentalFuzzySearchEndpoint": "表示用于实验性设置æœç´¢çš„端点。", - "experimentalFuzzySearchKey": "表示用于实验性设置æœç´¢çš„密钥。", + "enableNaturalLanguageSettingsSearch": "控制是å¦åœ¨è®¾ç½®ä¸­å¯ç”¨è‡ªç„¶è¯­è¨€æœç´¢æ¨¡å¼ã€‚", "fontAliasing": "控制工作å°ä¸­å­—体的渲染方å¼\n- default: 次åƒç´ å¹³æ»‘å­—ä½“ã€‚å°†åœ¨å¤§å¤šæ•°éž retina 显示器上显示最清晰的文字\n- antialiased: 进行åƒç´ è€Œä¸æ˜¯æ¬¡åƒç´ çº§åˆ«çš„字体平滑。å¯èƒ½ä¼šå¯¼è‡´å­—体整体显示得更细\n- none: ç¦ç”¨å­—ä½“å¹³æ»‘ã€‚å°†æ˜¾ç¤ºè¾¹ç¼˜ç²—ç³™ã€æœ‰é”¯é½¿çš„æ–‡å­—", "workbench.fontAliasing.default": "次åƒç´ å¹³æ»‘å­—ä½“ã€‚å°†åœ¨å¤§å¤šæ•°éž retina 显示器上显示最清晰的文字。", "workbench.fontAliasing.antialiased": "进行åƒç´ è€Œä¸æ˜¯æ¬¡åƒç´ çº§åˆ«çš„字体平滑。å¯èƒ½ä¼šå¯¼è‡´å­—体整体显示得更细。", "workbench.fontAliasing.none": "ç¦ç”¨å­—ä½“å¹³æ»‘ã€‚å°†æ˜¾ç¤ºè¾¹ç¼˜ç²—ç³™ã€æœ‰é”¯é½¿çš„æ–‡å­—。", "swipeToNavigate": "使用三指横扫在打开的文件之间导航", "workbenchConfigurationTitle": "工作å°", + "windowConfigurationTitle": "窗å£", "window.openFilesInNewWindow.on": "文件将在新窗å£ä¸­æ‰“å¼€", "window.openFilesInNewWindow.off": "文件将在该文件的文件夹打开的窗å£ä¸­æ‰“开,或在上一个活动窗å£ä¸­æ‰“å¼€", "window.openFilesInNewWindow.default": "文件将在该文件的文件夹打开的窗å£ä¸­æ‰“开,或在上一个活动窗å£ä¸­æ‰“开,除éžé€šè¿‡å¹³å°æˆ–从查找程åº(ä»…é™ macOS)打开", @@ -69,11 +69,11 @@ "autoDetectHighContrast": "如果已å¯ç”¨ï¼Œå°†è‡ªåŠ¨æ›´æ”¹ä¸ºé«˜å¯¹æ¯”åº¦ä¸»é¢˜ï¼›å¦‚æžœ Windows 正在使用高对比度主题,则当离开 Windows 高对比度主题时会更改为深色主题。", "titleBarStyle": "è°ƒæ•´çª—å£æ ‡é¢˜æ çš„外观。更改需è¦åœ¨å®Œå…¨é‡å¯åŽæ‰èƒ½åº”用。", "window.nativeTabs": "\nå¯ç”¨macOS Sierra窗å£é€‰é¡¹å¡ã€‚请注æ„,更改需è¦å®Œå…¨é‡æ–°å¯åŠ¨ç¨‹åºæ‰èƒ½ç”Ÿæ•ˆã€‚如果é…置此选项,本机选项å¡å°†ç¦ç”¨è‡ªå®šä¹‰æ ‡é¢˜æ æ ·å¼ã€‚", - "windowConfigurationTitle": "窗å£", "zenModeConfigurationTitle": "Zen 模å¼", "zenMode.fullScreen": "控制打开 Zen Mode 是å¦ä¹Ÿä¼šå°†å·¥ä½œå°ç½®äºŽå…¨å±æ¨¡å¼ã€‚", "zenMode.hideTabs": "控制打开 Zen æ¨¡å¼æ˜¯å¦ä¹Ÿä¼šéšè—工作å°é€‰é¡¹å¡ã€‚", "zenMode.hideStatusBar": "控制打开 Zen æ¨¡å¼æ˜¯å¦ä¹Ÿä¼šéšè—工作å°åº•éƒ¨çš„çŠ¶æ€æ ã€‚", "zenMode.hideActivityBar": "控制打开 Zen æ¨¡å¼æ˜¯å¦ä¹Ÿä¼šéšè—工作å°å·¦ä¾§çš„æ´»åЍæ ã€‚", - "zenMode.restore": "控制如果æŸçª—å£å·²é€€å‡º zen 模å¼ï¼Œæ˜¯å¦åº”还原到 zen 模å¼ã€‚" + "zenMode.restore": "控制如果æŸçª—å£å·²é€€å‡º zen 模å¼ï¼Œæ˜¯å¦åº”还原到 zen 模å¼ã€‚", + "JsonSchema.locale": "è¦ä½¿ç”¨çš„ UI 语言。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 258e88045a6..e6a086dba29 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -30,7 +30,6 @@ "deactivateBreakpoints": "åœç”¨æ–­ç‚¹", "reapplyAllBreakpoints": "釿–°åº”用所有断点", "addFunctionBreakpoint": "添加函数断点", - "renameFunctionBreakpoint": "é‡å‘½å函数断点", "addConditionalBreakpoint": "添加æ¡ä»¶æ–­ç‚¹...", "editConditionalBreakpoint": "编辑断点...", "setValue": "设置值", diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json new file mode 100644 index 00000000000..ba253c8fba5 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editConditionalBreakpoint": "编辑断点...", + "functionBreakpointsNotSupported": "æ­¤è°ƒè¯•ç±»åž‹ä¸æ”¯æŒå‡½æ•°æ–­ç‚¹", + "functionBreakpointPlaceholder": "è¦æ–­å¼€çš„函数", + "functionBreakPointInputAriaLabel": "键入函数断点" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json new file mode 100644 index 00000000000..da826ee92a9 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "callstackSection": "调用堆栈部分", + "debugStopped": "å›  {0} 已暂åœ", + "callStackAriaLabel": "调试调用堆栈", + "process": "进程", + "paused": "已暂åœ", + "running": "正在è¿è¡Œ", + "thread": "线程", + "pausedOn": "å›  {0} 已暂åœ", + "loadMoreStackFrames": "加载多个堆栈帧", + "threadAriaLabel": "线程 {0},调用堆栈,调试", + "stackFrameAriaLabel": "堆栈帧 {0} 行 {1} {2},调用堆栈,调试" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index e96dadb14ac..96b79d61f2a 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,5 +20,10 @@ "openExplorerOnEnd": "调试会è¯ç»“æŸæ—¶è‡ªåŠ¨æ‰“å¼€èµ„æºç®¡ç†å™¨è§†å›¾", "inlineValues": "调试时,在编辑器中显示å˜é‡å€¼å†…è”", "hideActionBar": "控制是å¦åº”该éšè—浮点调试æ“作æ ", + "never": "åœ¨çŠ¶æ€æ ä¸­ä¸å†æ˜¾ç¤ºè°ƒè¯•", + "always": "å§‹ç»ˆåœ¨çŠ¶æ€æ ä¸­æ˜¾ç¤ºè°ƒè¯•", + "onFirstSessionStart": "仅于第一次å¯åŠ¨è°ƒè¯•åŽåœ¨çŠ¶æ€æ ä¸­æ˜¾ç¤ºè°ƒè¯•", + "showInStatusBar": "æŽ§åˆ¶ä½•æ—¶æ˜¾ç¤ºè°ƒè¯•çŠ¶æ€æ ", + "openDebug": "控制是å¦åœ¨è°ƒè¯•会è¯å¼€å§‹æ—¶æ‰“开调试侧边æ é¢æ¿ã€‚", "launch": "全局的调试å¯åЍé…置。应用作跨工作区共享的 \"launch.json\" 的替代。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index c3b4b359105..0623903445b 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,6 @@ "breakpointAdded": "已添加断点,行 {0}, 文件 {1}", "breakpointRemoved": "已删除断点,行 {0},文件 {1}", "compoundMustHaveConfigurations": "å¤åˆé¡¹å¿…须拥有 \"configurations\" 属性集,æ‰èƒ½å¯åŠ¨å¤šä¸ªé…置。", - "configMissing": "\"launch.json\" 中缺少é…置“{0}â€ã€‚", "debugRequestNotSupported": "所选调试é…置的属性“{0}â€çš„值“{1}â€ä¸å—支æŒã€‚", "debugRequesMissing": "所选的调试é…置缺少属性“{0}â€ã€‚", "debugTypeNotSupported": "é…置的类型“{0}â€ä¸å—支æŒã€‚", @@ -23,5 +22,5 @@ "noFolderWorkspaceDebugError": "无法调试活动文件。请确ä¿å®ƒä¿å­˜åœ¨ç£ç›˜ä¸Šï¼Œå¹¶ç¡®ä¿å·²ä¸ºè¯¥æ–‡ä»¶ç±»åž‹å®‰è£…了调试扩展。", "NewLaunchConfig": "请设置应用程åºçš„å¯åЍé…置文件。{0}", "DebugTaskNotFound": "找ä¸åˆ° preLaunchTask“{0}â€ã€‚", - "taskNotTracked": "无法跟踪预å¯åŠ¨ä»»åŠ¡â€œ{0}â€ã€‚" + "taskNotTracked": "无法跟踪 preLaunchTask “{0}â€ã€‚" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json new file mode 100644 index 00000000000..48a10073c86 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "å˜é‡éƒ¨åˆ†", + "variablesAriaTreeLabel": "调试å˜é‡", + "variableValueAriaLabel": "键入新的å˜é‡å€¼", + "variableScopeAriaLabel": "范围 {0},å˜é‡ï¼Œè°ƒè¯•", + "variableAriaLabel": "{0} 值 {1},å˜é‡ï¼Œè°ƒè¯•" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json new file mode 100644 index 00000000000..dd591fbee67 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expressionsSection": "表达å¼éƒ¨åˆ†", + "watchAriaTreeLabel": "调试监视表达å¼", + "watchExpressionPlaceholder": "è¦ç›‘视的表达å¼", + "watchExpressionInputAriaLabel": "键入监视表达å¼", + "watchExpressionAriaLabel": "{0} 值 {1},监视,调试", + "watchVariableAriaLabel": "{0} 值 {1},监视,调试" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index adb3d890c40..3f110c4b49d 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,9 +6,11 @@ { "name": "扩展å", "extension id": "扩展标识符", + "preview": "预览", "publisher": "å‘布æœåС噍åç§°", "install count": "安装计数", "rating": "评级", + "repository": "存储库", "license": "许å¯è¯", "details": "详细信æ¯", "contributions": "å‘布内容", diff --git a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index aa1f57a84b5..460dc8dbb51 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -10,16 +10,12 @@ "Uninstalling": "正在å¸è½½", "updateAction": "æ›´æ–°", "updateTo": "更新到 {0}", - "enableForWorkspaceAction.label": "å¯ç”¨(工作区)", - "enableAlwaysAction.label": "å¯ç”¨(始终)", - "disableForWorkspaceAction.label": "ç¦ç”¨(工作区)", - "disableAlwaysAction.label": "ç¦ç”¨(始终)", "ManageExtensionAction.uninstallingTooltip": "正在å¸è½½", - "enableForWorkspaceAction": "工作区", - "enableGloballyAction": "始终", + "enableForWorkspaceAction": "å¯ç”¨(工作区)", + "enableGloballyAction": "å¯ç”¨", "enableAction": "å¯ç”¨", - "disableForWorkspaceAction": "工作区", - "disableGloballyAction": "始终", + "disableForWorkspaceAction": "ç¦ç”¨(工作区)", + "disableGloballyAction": "ç¦ç”¨", "disableAction": "ç¦ç”¨", "checkForUpdates": "检查更新", "enableAutoUpdate": "å¯ç”¨è‡ªåŠ¨æ›´æ–°æ‰©å±•", @@ -47,11 +43,8 @@ "allExtensionsInstalled": "已安装根æ®å·¥ä½œåŒºæŽ¨è的所有扩展", "installRecommendedExtension": "安装推è的扩展", "extensionInstalled": "您已ç»å®‰è£…è¿‡æ­¤æŽ¨èæ‰©å±•", - "showRecommendedKeymapExtensions": "显示推è键映射", "showRecommendedKeymapExtensionsShort": "键映射", - "showLanguageExtensions": "显示语言扩展", "showLanguageExtensionsShort": "语言扩展", - "showAzureExtensions": "显示 Azure 扩展", "showAzureExtensionsShort": "Azure 扩展", "OpenExtensionsFile.failed": "无法在 \".vscode\" 文件夹({0})内创建 \"extensions.json\" 文件。", "configureWorkspaceRecommendedExtensions": "é…置建议的扩展(工作区)", diff --git a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json index 6f09a313cda..1792f02cce4 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json @@ -7,6 +7,6 @@ "manage": "按 Enter 管ç†ä½ çš„æ‰©å±•。", "notfound": "没有在商店中找到扩展“{0}â€ã€‚", "install": "按 Enter 键在商店中安装“{0}â€ã€‚", - "searchFor": "按 Enter 以在应用商店中æœç´¢â€œ{0}â€ã€‚", + "searchFor": "按 Enter 键在商店中æœç´¢â€œ{0}â€ã€‚", "noExtensionsToInstall": "键入扩展åç§°" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json new file mode 100644 index 00000000000..e4ad4894419 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ratedByUsers": "评价æ¥è‡ª {0} ä½ç”¨æˆ·" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json new file mode 100644 index 00000000000..750cf2f5401 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectAndStartDebug": "å•å‡»åœæ­¢åˆ†æžã€‚" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 1320378fc4d..8bff3c904df 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -7,9 +7,11 @@ "extensionsCommands": "ç®¡ç†æ‰©å±•", "galleryExtensionsCommands": "安装库扩展", "extension": "扩展", + "runtimeExtension": "正在è¿è¡Œçš„æ‰©å±•", "extensions": "扩展", "view": "查看", + "developer": "å¼€å‘者", "extensionsConfigurationTitle": "扩展", "extensionsAutoUpdate": "自动更新扩展", - "extensionsIgnoreRecommendations": "忽略推è的扩展" + "extensionsIgnoreRecommendations": "如果设置为 \"true\",将ä¸å†æ˜¾ç¤ºæ‰©å±•建议的通知。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index b797d01df97..83c6c0f0855 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -10,7 +10,7 @@ "recommendedExtensions": "推è", "otherRecommendedExtensions": "其他推è", "workspaceRecommendedExtensions": "工作区推è", - "searchExtensions": "在应用商店中æœç´¢æ‰©å±•", + "searchExtensions": "在商店中æœç´¢æ‰©å±•", "sort by installs": "排åºä¾æ®: 安装计数", "sort by rating": "排åºä¾æ®: 分级", "sort by name": "排åºä¾æ®: åç§°", diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json new file mode 100644 index 00000000000..4ae4f87f67c --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "starActivation": "已于å¯åŠ¨æ—¶æ¿€æ´»", + "workspaceContainsGlobActivation": "已激活,因为工作区中存在与 {0} 匹é…的文件", + "workspaceContainsFileActivation": "已激活,因为工作区中存在文件 {0}", + "languageActivation": "已激活,因为您打开了 {0} 文件", + "workspaceGenericActivation": "已于 {0} 时激活", + "errors": "{0} 个未æ•获的错误", + "extensionsInputName": "正在è¿è¡Œçš„æ‰©å±•", + "showRuntimeExtensions": "显示正在è¿è¡Œçš„æ‰©å±•", + "reportExtensionIssue": "报告问题", + "extensionHostProfileStart": "å¼€å§‹åˆ†æžæ‰©å±•主机", + "extensionHostProfileStop": "åœæ­¢åˆ†æžæ‰©å±•主机", + "saveExtensionHostProfile": "ä¿å­˜æ‰©å±•ä¸»æœºåˆ†æžæ–‡ä»¶" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/fileActions.i18n.json index 6a30564b398..f9208415003 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/fileActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -69,5 +69,7 @@ "invalidFileNameError": "åç§° **{0}** ä½œä¸ºæ–‡ä»¶æˆ–æ–‡ä»¶å¤¹åæ— æ•ˆã€‚请选择其他å称。", "filePathTooLongError": "åç§° **{0}** 导致路径太长。请选择更短的å称。", "compareWithSaved": "比较活动与已ä¿å­˜çš„æ–‡ä»¶", - "modifiedLabel": "{0} (ç£ç›˜ä¸Š) ↔ {1}" + "modifiedLabel": "{0} (ç£ç›˜ä¸Š) ↔ {1}", + "compareWithClipboard": "比较活动文件与剪贴æ¿", + "clipboardComparisonLabel": "å‰ªè´´æ¿ â†” {0}" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json b/i18n/chs/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json new file mode 100644 index 00000000000..c1ad2f1b1e0 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "folders": "文件夹" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json new file mode 100644 index 00000000000..30c68b4c7ad --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "文件", + "revealInSideBar": "在侧边æ ä¸­æ˜¾ç¤º", + "acceptLocalChanges": "使用你的更改并覆盖ç£ç›˜ä¸Šçš„内容。", + "revertLocalChanges": "放弃你的更改并还原为ç£ç›˜ä¸Šçš„内容" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/chs/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json new file mode 100644 index 00000000000..f9208415003 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "é‡è¯•", + "rename": "é‡å‘½å", + "newFile": "新建文件", + "newFolder": "新建文件夹", + "openFolderFirst": "先打开一个文件夹,以在其中创建文件或文件夹。", + "newUntitledFile": "新的无标题文件", + "createNewFile": "新建文件", + "createNewFolder": "新建文件夹", + "deleteButtonLabelRecycleBin": "移动到回收站(&&M)", + "deleteButtonLabelTrash": "移动到回收站(&&M)", + "deleteButtonLabel": "删除(&&D)", + "dirtyMessageFolderOneDelete": "你正在删除的文件夹有 1 个文件具有未ä¿å­˜çš„æ›´æ”¹ã€‚是å¦ç»§ç»­?", + "dirtyMessageFolderDelete": "你正在删除的文件夹有 {0} 个文件具有未ä¿å­˜çš„æ›´æ”¹ã€‚是å¦ç»§ç»­?", + "dirtyMessageFileDelete": "你正在删除的文件具有未ä¿å­˜çš„æ›´æ”¹ã€‚是å¦ç»§ç»­?", + "dirtyWarning": "如果ä¸ä¿å­˜ï¼Œæ›´æ”¹å°†ä¸¢å¤±ã€‚", + "confirmMoveTrashMessageFolder": "是å¦ç¡®å®žè¦åˆ é™¤â€œ{0}â€åŠå…¶å†…容?", + "confirmMoveTrashMessageFile": "是å¦ç¡®å®žè¦åˆ é™¤â€œ{0}â€?", + "undoBin": "å¯ä»¥ä»Žå›žæ”¶ç«™è¿˜åŽŸã€‚", + "undoTrash": "å¯ä»¥ä»Žå›žæ”¶ç«™è¿˜åŽŸã€‚", + "doNotAskAgain": "ä¸å†è¯¢é—®", + "confirmDeleteMessageFolder": "是å¦ç¡®å®šè¦æ°¸ä¹…删除“{0}â€åŠå…¶å†…容?", + "confirmDeleteMessageFile": "是å¦ç¡®å®šè¦æ°¸ä¹…删除“{0}â€?", + "irreversible": "æ­¤æ“作ä¸å¯é€†!", + "permDelete": "永久删除", + "delete": "删除", + "importFiles": "导入文件", + "confirmOverwrite": "目标文件夹中已存在具有相åŒå称的文件或文件夹。是å¦è¦æ›¿æ¢å®ƒ?", + "replaceButtonLabel": "替æ¢(&&R)", + "copyFile": "å¤åˆ¶", + "pasteFile": "粘贴", + "duplicateFile": "é‡å¤", + "openToSide": "打开到侧边", + "compareSource": "选择以进行比较", + "globalCompareFile": "比较活动文件与...", + "openFileToCompare": "首先打开文件以将其与å¦å¤–一个文件比较。", + "compareWith": "将“{0}â€ä¸Žâ€œ{1}â€æ¯”较", + "compareFiles": "比较文件", + "refresh": "刷新", + "save": "ä¿å­˜", + "saveAs": "å¦å­˜ä¸º...", + "saveAll": "全部ä¿å­˜", + "saveAllInGroup": "ä¿å­˜ç»„中的全部内容", + "saveFiles": "ä¿å­˜æ‰€æœ‰æ–‡ä»¶", + "revert": "还原文件", + "focusOpenEditors": "专注于“打开的编辑器â€è§†å›¾", + "focusFilesExplorer": "å…³æ³¨æ–‡ä»¶èµ„æºæµè§ˆå™¨", + "showInExplorer": "在侧边æ ä¸­æ˜¾ç¤ºæ´»åŠ¨æ–‡ä»¶", + "openFileToShow": "请先打开è¦åœ¨æµè§ˆå™¨ä¸­æ˜¾ç¤ºçš„æ–‡ä»¶", + "collapseExplorerFolders": "在资æºç®¡ç†å™¨ä¸­æŠ˜å æ–‡ä»¶å¤¹", + "refreshExplorer": "刷新资æºç®¡ç†å™¨", + "openFileInNewWindow": "在新窗å£ä¸­æ‰“开活动文件", + "openFileToShowInNewWindow": "请先打开è¦åœ¨æ–°çª—å£ä¸­æ‰“开的文件", + "revealInWindows": "在资æºç®¡ç†å™¨ä¸­æ˜¾ç¤º", + "revealInMac": "在 Finder 中显示", + "openContainer": "打开所在的文件夹", + "revealActiveFileInWindows": "Windows 资æºç®¡ç†å™¨ä¸­æ˜¾ç¤ºæ´»åŠ¨æ–‡ä»¶", + "revealActiveFileInMac": "在 Finder 中显示活动文件", + "openActiveFileContainer": "打开活动文件所在的文件夹", + "copyPath": "å¤åˆ¶è·¯å¾„", + "copyPathOfActive": "å¤åˆ¶æ´»åŠ¨æ–‡ä»¶çš„è·¯å¾„", + "emptyFileNameError": "å¿…é¡»æä¾›æ–‡ä»¶æˆ–文件夹å。", + "fileNameExistsError": "æ­¤ä½ç½®å·²å­˜åœ¨æ–‡ä»¶æˆ–文件夹 **{0}**。请选择其他å称。", + "invalidFileNameError": "åç§° **{0}** ä½œä¸ºæ–‡ä»¶æˆ–æ–‡ä»¶å¤¹åæ— æ•ˆã€‚请选择其他å称。", + "filePathTooLongError": "åç§° **{0}** 导致路径太长。请选择更短的å称。", + "compareWithSaved": "比较活动与已ä¿å­˜çš„æ–‡ä»¶", + "modifiedLabel": "{0} (ç£ç›˜ä¸Š) ↔ {1}", + "compareWithClipboard": "比较活动文件与剪贴æ¿", + "clipboardComparisonLabel": "å‰ªè´´æ¿ â†” {0}" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/chs/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json new file mode 100644 index 00000000000..702c021c5f3 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "首先打开文件以å¤åˆ¶å…¶è·¯å¾„", + "openFileToReveal": "首先打开文件以展现" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json new file mode 100644 index 00000000000..63427668f5f --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "显示资æºç®¡ç†å™¨", + "explore": "资æºç®¡ç†å™¨", + "view": "查看", + "textFileEditor": "文本文件编辑器", + "binaryFileEditor": "二进制文件编辑器", + "filesConfigurationTitle": "文件", + "exclude": "é…ç½® glob 模å¼ä»¥åœ¨æœç´¢ä¸­æŽ’除文件和文件夹。例如,文件资æºç®¡ç†å™¨æ ¹æ®æ­¤è®¾ç½®å†³å®šæ–‡ä»¶æˆ–文件夹的显示和éšè—。", + "files.exclude.boolean": "åŒ¹é…æ–‡ä»¶è·¯å¾„æ‰€ä¾æ®çš„ glob 模å¼ã€‚设置为 true 或 false å¯å¯ç”¨æˆ–ç¦ç”¨è¯¥æ¨¡å¼ã€‚", + "files.exclude.when": "å¯¹åŒ¹é…æ–‡ä»¶çš„åŒçº§æ–‡ä»¶çš„其他检查。使用 $(basename) ä½œä¸ºåŒ¹é…æ–‡ä»¶åçš„å˜é‡ã€‚", + "associations": "é…置语言的文件关è”(如: \"*.extension\": \"html\")。这些关è”的优先级高于已安装语言的默认关è”。", + "encoding": "读å–和编写文件时使用的默认字符集编ç ã€‚也å¯ä»¥æ ¹æ®è¯­è¨€é…置此设置。", + "autoGuessEncoding": "如果å¯ç”¨ï¼Œä¼šåœ¨æ‰“开文件时å°è¯•猜测字符集编ç ã€‚也å¯ä»¥æ ¹æ®è¯­è¨€é…置此设置。", + "eol": "默认行尾字符。使用 \\n 表示 LF,\\r\\n 表示 CRLF。", + "trimTrailingWhitespace": "å¯ç”¨åŽï¼Œå°†åœ¨ä¿å­˜æ–‡ä»¶æ—¶å‰ªè£å°¾éšç©ºæ ¼ã€‚", + "insertFinalNewline": "å¯ç”¨åŽï¼Œä¿å­˜æ–‡ä»¶æ—¶åœ¨æ–‡ä»¶æœ«å°¾æ’入一个最终新行。", + "trimFinalNewlines": "å¯ç”¨åŽï¼Œä¿å­˜æ–‡ä»¶æ—¶å°†åˆ é™¤åœ¨æœ€ç»ˆæ–°è¡ŒåŽçš„æ‰€æœ‰æ–°è¡Œã€‚", + "files.autoSave.off": "æ°¸ä¸è‡ªåЍä¿å­˜æ›´æ–°åŽçš„æ–‡ä»¶ã€‚", + "files.autoSave.afterDelay": "é…ç½® \"files.autoSaveDelay\" åŽè‡ªåЍä¿å­˜æ›´æ–°åŽçš„æ–‡ä»¶ã€‚", + "files.autoSave.onFocusChange": "编辑器失去焦点时自动ä¿å­˜æ›´æ–°åŽçš„æ–‡ä»¶ã€‚", + "files.autoSave.onWindowChange": "窗å£å¤±åŽ»ç„¦ç‚¹æ—¶è‡ªåŠ¨ä¿å­˜æ›´æ–°åŽçš„æ–‡ä»¶ã€‚", + "autoSave": "控制已更新文件的自动ä¿å­˜ã€‚接å—的值:“{0}â€ã€\"{1}â€ã€â€œ{2}â€(编辑器失去焦点)ã€â€œ{3}â€(窗å£å¤±åŽ»ç„¦ç‚¹)。如果设置为“{4}â€ï¼Œåˆ™å¯åœ¨ \"files.autoSaveDelay\" 中é…置延迟。", + "autoSaveDelay": "控制在多少毫秒åŽè‡ªåЍä¿å­˜æ›´æ”¹è¿‡çš„æ–‡ä»¶ã€‚仅在“files.autoSaveâ€è®¾ç½®ä¸ºâ€œ{0}â€æ—¶é€‚用。", + "watcherExclude": "é…置文件路径的 glob 模å¼ä»¥ä»Žæ–‡ä»¶ç›‘视排除。模å¼å¿…须在ç»å¯¹è·¯å¾„上匹é…(例如 ** å‰ç¼€æˆ–完整路径需正确匹é…)。更改此设置需è¦é‡å¯ã€‚如果在å¯åŠ¨æ—¶é‡åˆ° Code æ¶ˆè€—å¤§é‡ CPU 时间,则å¯ä»¥æŽ’除大型文件夹以å‡å°‘åˆå§‹åŠ è½½ã€‚", + "hotExit.off": "ç¦ç”¨çƒ­é€€å‡ºã€‚", + "hotExit.onExit": "应用程åºå…³é—­æ—¶å°†è§¦å‘热退出。在 Windows/Linux 上关闭最åŽä¸€ä¸ªçª—壿ˆ–è§¦å‘ workbench.action.quit 命令(命令托盘ã€é”®ç»‘定ã€èœå•)会引起应用程åºå…³é—­ã€‚下次å¯åŠ¨æ—¶å°†è¿˜åŽŸæ‰€æœ‰å·²å¤‡ä»½çš„çª—å£ã€‚", + "hotExit.onExitAndWindowClose": "应用程åºå…³é—­æ—¶å°†è§¦å‘热退出。在 Windows/Linux 上关闭最åŽä¸€ä¸ªçª—å£ã€è§¦å‘ workbench.action.quit 命令(命令托盘ã€é”®ç»‘定ã€èœå•)会引起应用程åºå…³é—­ã€‚对于任何有文件夹打开的窗å£ï¼Œåˆ™ä¸è®ºè¯¥çª—壿˜¯å¦æ˜¯æœ€åŽä¸€ä¸ªçª—å£ã€‚下次å¯åŠ¨æ—¶å°†è¿˜åŽŸæ‰€æœ‰æœªæ‰“å¼€æ–‡ä»¶å¤¹çš„çª—å£ã€‚è‹¥è¦è¿˜åŽŸæ‰“å¼€æœ‰æ–‡ä»¶å¤¹çš„çª—å£ï¼Œè¯·å°†â€œwindow.restoreWindowsâ€è®¾ç½®ä¸ºâ€œallâ€ã€‚", + "hotExit": "控制是å¦åœ¨ä¼šè¯é—´è®°ä½æœªä¿å­˜çš„æ–‡ä»¶ï¼Œä»¥å…许在退出编辑器时跳过ä¿å­˜æç¤ºã€‚", + "useExperimentalFileWatcher": "使用新的试验文件观察程åºã€‚", + "defaultLanguage": "分é…给新文件的默认语言模å¼ã€‚", + "editorConfigurationTitle": "编辑器", + "formatOnSave": "ä¿å­˜æ—¶è®¾ç½®æ–‡ä»¶çš„æ ¼å¼ã€‚æ ¼å¼åŒ–程åºå¿…é¡»å¯ç”¨ï¼Œä¸èƒ½è‡ªåЍä¿å­˜æ–‡ä»¶ï¼Œå¹¶ä¸”ä¸èƒ½å…³é—­ç¼–辑器。", + "explorerConfigurationTitle": "文件资æºç®¡ç†å™¨", + "openEditorsVisible": "在“打开的编辑器â€çª—格中显示的编辑器数é‡ã€‚将其设置为 0 å¯éšè—窗格。", + "dynamicHeight": "控制打开的编辑器部分的高度是å¦åº”动æ€é€‚应元素数é‡ã€‚", + "autoReveal": "控制资æºç®¡ç†å™¨æ˜¯å¦åº”在打开文件时自动显示并选择它们。", + "enableDragAndDrop": "控制资æºç®¡ç†å™¨æ˜¯å¦åº”该å…许通过拖放移动文件和文件夹。", + "confirmDragAndDrop": "控制在资æºç®¡ç†å™¨å†…拖放移动文件或文件夹时是å¦è¿›è¡Œç¡®è®¤ã€‚", + "confirmDelete": "控制资æºç®¡ç†å™¨æ˜¯å¦åº”在删除文件到回收站时进行确认。", + "sortOrder.default": "按å称的字æ¯é¡ºåºæŽ’列文件和文件夹。文件夹显示在文件å‰ã€‚", + "sortOrder.mixed": "按å称的字æ¯é¡ºåºæŽ’åˆ—æ–‡ä»¶å’Œæ–‡ä»¶å¤¹ã€‚ä¸¤è€…ç©¿æ’æ˜¾ç¤ºã€‚", + "sortOrder.filesFirst": "按å称的字æ¯é¡ºåºæŽ’列文件和文件夹。文件显示在文件夹å‰ã€‚", + "sortOrder.type": "按扩展å的字æ¯é¡ºåºæŽ’列文件和文件夹。文件夹显示在文件å‰ã€‚", + "sortOrder.modified": "按最åŽä¿®æ”¹æ—¥æœŸé™åºæŽ’列文件和文件夹。文件夹显示在文件å‰ã€‚", + "sortOrder": "控制资æºç®¡ç†å™¨æ–‡ä»¶å’Œæ–‡ä»¶å¤¹çš„æŽ’列顺åºã€‚除了默认排列顺åºï¼Œä½ ä¹Ÿå¯ä»¥è®¾ç½®ä¸º \"mixed\" (文件和文件夹一起排åº)ã€\"type\" (按文件类型排)ã€\"modified\" (按最åŽä¿®æ”¹æ—¥æœŸæŽ’)或是 \"filesFirst\" (将文件排在文件夹å‰)。", + "explorer.decorations.colors": "控制文件修饰是å¦ç”¨é¢œè‰²ã€‚", + "explorer.decorations.badges": "控制文件修饰是å¦ç”¨å¾½ç« ã€‚" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/chs/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json new file mode 100644 index 00000000000..8ebee88ce98 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "userGuide": "使用å³ä¾§ç¼–辑器工具æ çš„æ“ä½œæ¥**撤消**你的更改或用你的更改æ¥**覆盖**ç£ç›˜ä¸Šçš„内容", + "discard": "放弃", + "overwrite": "覆盖", + "retry": "é‡è¯•", + "readonlySaveError": "无法ä¿å­˜â€œ{0}â€: æ–‡ä»¶å†™ä¿æŠ¤ã€‚é€‰æ‹©â€œè¦†ç›–â€ä»¥åˆ é™¤ä¿æŠ¤ã€‚ ", + "genericSaveError": "未能ä¿å­˜â€œ{0}â€: {1}", + "staleSaveError": "无法ä¿å­˜â€œ{0}â€: ç£ç›˜ä¸Šçš„内容较新。å•击 **比较** 以比较你的版本和ç£ç›˜ä¸Šçš„版本。", + "compareChanges": "比较", + "saveConflictDiffLabel": "{0} (on disk) ↔ {1} (in {2}) - 解决ä¿å­˜çš„冲çª" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json new file mode 100644 index 00000000000..5939052419b --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "无打开的文件夹", + "explorerSection": "文件资æºç®¡ç†å™¨éƒ¨åˆ†", + "noWorkspaceHelp": "你还没有在工作区中添加文件夹。", + "addFolder": "添加文件夹", + "noFolderHelp": "尚未打开文件夹。", + "openFolder": "打开文件夹" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json new file mode 100644 index 00000000000..e301fea30f0 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label": "资æºç®¡ç†å™¨", + "canNotResolve": "无法解æžå·¥ä½œåŒºæ–‡ä»¶å¤¹" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json b/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json new file mode 100644 index 00000000000..7193836bd08 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "文件资æºç®¡ç†å™¨éƒ¨åˆ†", + "treeAriaLabel": "文件资æºç®¡ç†å™¨" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json new file mode 100644 index 00000000000..d97098d02f7 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "键入文件å。按 Enter 以确认或按 Esc 以喿¶ˆã€‚", + "filesExplorerViewerAriaLabel": "{0},文件资æºç®¡ç†å™¨", + "dropFolders": "你是å¦è¦å°†æ–‡ä»¶å¤¹æ·»åŠ åˆ°å·¥ä½œåŒº?", + "dropFolder": "你是å¦è¦å°†æ–‡ä»¶å¤¹æ·»åŠ åˆ°å·¥ä½œåŒº?", + "addFolders": "添加文件夹(&&A)", + "addFolder": "添加文件夹(&&A)", + "confirmMove": "是å¦ç¡®å®žè¦ç§»åŠ¨â€œ{0}â€?", + "doNotAskAgain": "ä¸å†è¯¢é—®", + "moveButtonLabel": "移动(&&M)", + "confirmOverwriteMessage": "目标文件夹中已存在“{0}â€ã€‚是å¦è¦å°†å…¶æ›¿æ¢?", + "irreversible": "æ­¤æ“作ä¸å¯é€†!", + "replaceButtonLabel": "替æ¢(&&R)" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json b/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json new file mode 100644 index 00000000000..0c93f41d44d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "打开的编辑器", + "openEditosrSection": "打开的编辑器部分", + "dirtyCounter": "{0} 个未ä¿å­˜", + "saveAll": "全部ä¿å­˜", + "closeAllUnmodified": "关闭未更改", + "closeAll": "全部关闭", + "compareWithSaved": "与已ä¿å­˜æ–‡ä»¶æ¯”较", + "close": "关闭", + "closeOthers": "关闭其他" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json b/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json new file mode 100644 index 00000000000..5b583f97926 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, 编辑器组", + "openEditorAriaLabel": "{0}, 打开编辑器", + "saveAll": "全部ä¿å­˜", + "closeAllUnmodified": "关闭未更改", + "closeAll": "全部关闭", + "compareWithSaved": "与已ä¿å­˜æ–‡ä»¶æ¯”较", + "close": "关闭", + "closeOthers": "关闭其他" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/chs/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json new file mode 100644 index 00000000000..c5e7b7ca89e --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "totalProblems": "总计 {0} 个问题", + "filteredProblems": "显示 {0} 个 (å…± {1} 个) 问题" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/chs/src/vs/workbench/parts/markers/common/messages.i18n.json index b6d59b5586c..3e34c78c26a 100644 --- a/i18n/chs/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,8 +6,7 @@ { "viewCategory": "查看", "problems.view.toggle.label": "åˆ‡æ¢æ˜¾ç¤ºé—®é¢˜è§†å›¾", - "problems.view.show.label": "显示问题", - "problems.view.hide.label": "éšè—问题视图", + "problems.view.focus.label": "èšç„¦äºŽé—®é¢˜è§†å›¾", "problems.panel.configuration.title": "问题预览", "problems.panel.configuration.autoreveal": "控制问题预览是å¦åº”在打开文件时自动显示它们。", "markers.panel.title.problems": "问题", diff --git a/i18n/chs/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json b/i18n/chs/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json new file mode 100644 index 00000000000..9b26b94472e --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "prof.message": "å·²æˆåŠŸåˆ›å»ºæè¿°æ–‡ä»¶ã€‚", + "prof.detail": "请创建问题并手动附加以下文件:\n{0}", + "prof.restartAndFileIssue": "创建问题并é‡å¯", + "prof.restart": "é‡å¯", + "prof.thanks": "感谢您的帮助。", + "prof.detail.restart": "需è¦é‡æ–°å¯åЍæ‰èƒ½ç»§ç»­ä½¿ç”¨â€œ{0}â€ã€‚冿¬¡æ„Ÿè°¢æ‚¨çš„贡献。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 1c5aca86231..2f3fae8940f 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defineKeybinding.initial": "按所需的键组åˆï¼Œç„¶åŽæŒ‰ Enter。按 Esc å¯å–消。", + "defineKeybinding.initial": "先按所需的组åˆé”®ï¼Œå†æŒ‰ Enter 键。", "defineKeybinding.chordsTo": "加上" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index a191f56abf9..34f4d8ea701 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -26,6 +26,7 @@ "editKeybindingLabel": "更改键绑定", "addKeybindingLabelWithKey": "添加键绑定", "addKeybindingLabel": "添加键绑定", + "title": "{0} ({1})", "commandAriaLabel": "命令为 {0}。", "keybindingAriaLabel": "键绑定为 {0}。", "noKeybinding": "未分é…键绑定。", diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index a6386fe575c..40d1801085b 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "openRawDefaultSettings": "打开默认设置原始文档", "openGlobalSettings": "打开用户设置", "openGlobalKeybindings": "æ‰“å¼€é”®ç›˜å¿«æ·æ–¹å¼", "openGlobalKeybindingsFile": "æ‰“å¼€é”®ç›˜å¿«æ·æ–¹å¼æ–‡ä»¶", diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index f3133e2e59b..c40e2e7cf77 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -7,12 +7,12 @@ "settingsEditorName": "默认设置", "SearchSettingsWidget.AriaLabel": "æœç´¢è®¾ç½®", "SearchSettingsWidget.Placeholder": "æœç´¢è®¾ç½®", - "totalSettingsMessage": "总计 {0} 个设置", "noSettingsFound": "无结果", "oneSettingFound": "1 个设置匹é…", "settingsFound": "{0} 个设置匹é…", - "fileEditorWithInputAriaLabel": "{0}。文本文件编辑器。", - "fileEditorAriaLabel": "文本文件编辑器。", + "totalSettingsMessage": "总计 {0} 个设置", + "defaultSettings": "默认设置", + "defaultFolderSettings": "默认文件夹设置", "defaultEditorReadonly": "在å³ä¾§ç¼–辑器中编辑以覆盖默认值。", "preferencesAriaLabel": "默认首选项。åªè¯»æ–‡æœ¬ç¼–辑器。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 94247b7df63..8bfc213abea 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -7,8 +7,6 @@ "emptyUserSettingsHeader": "将设置放入此处以覆盖\"默认设置\"。", "emptyWorkspaceSettingsHeader": "将设置放入此处以覆盖\"用户设置\"。", "emptyFolderSettingsHeader": "将文件夹设置放入此处以覆盖\"工作区设置\"。", - "defaultFolderSettingsTitle": "默认文件夹设置", - "defaultSettingsTitle": "默认设置", "editTtile": "编辑", "replaceDefaultValue": "在设置中替æ¢", "copyDefaultValue": "å¤åˆ¶åˆ°è®¾ç½®", diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index 51978e63faa..5c28c560886 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultSettingsFuzzyPrompt": "试试模糊æœç´¢!", + "defaultSettingsFuzzyPrompt": "试试自然语言æœç´¢!", "defaultSettings": "将您的设置放入å³ä¾§ç¼–辑器以覆盖。", "noSettingsFound": "未找到设置。", - "folderSettingsDetails": "文件夹设置", - "enableFuzzySearch": "å¯ç”¨å®žéªŒæ€§çš„æ¨¡ç³Šæœç´¢" + "settingsSwitcherBarAriaLabel": "设置转æ¢å™¨", + "userSettings": "用户设置", + "workspaceSettings": "工作区设置", + "folderSettings": "文件夹设置", + "enableFuzzySearch": "å¯ç”¨è‡ªç„¶è¯­è¨€æœç´¢" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json new file mode 100644 index 00000000000..87559f85c85 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "默认首选项编辑器", + "keybindingsEditor": "键绑定编辑器", + "preferences": "首选项" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json index a742f18f4d5..eb08e1a3030 100644 --- a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -6,7 +6,6 @@ { "scm providers": "æºä»£ç ç®¡ç†æä¾›ç¨‹åº", "hideRepository": "éšè—", - "commitMessage": "消æ¯(按 {0} æäº¤)", "installAdditionalSCMProviders": "安装其他æºä»£ç ç®¡ç†æä¾›ç¨‹åº...", "no open repo": "没有活动的æºä»£ç ç®¡ç†æä¾›ç¨‹åºã€‚", "source control": "æºä»£ç ç®¡ç†", diff --git a/i18n/chs/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/chs/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index 71b40c10a1b..463428de5f5 100644 --- a/i18n/chs/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defaultLabel": "输入", - "useIgnoreFilesDescription": "使用忽略文件", - "useExcludeSettingsDescription": "使用排除设置" + "useExcludesAndIgnoreFilesDescription": "使用“排除设置â€ä¸Žâ€œå¿½ç•¥æ–‡ä»¶â€" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/search/browser/search.contribution.i18n.json index 342e7b239c1..971f3dddcce 100644 --- a/i18n/chs/src/vs/workbench/parts/search/browser/search.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -16,7 +16,6 @@ "exclude.boolean": "åŒ¹é…æ–‡ä»¶è·¯å¾„æ‰€ä¾æ®çš„ glob 模å¼ã€‚设置为 true 或 false å¯å¯ç”¨æˆ–ç¦ç”¨è¯¥æ¨¡å¼ã€‚", "exclude.when": "å¯¹åŒ¹é…æ–‡ä»¶çš„åŒçº§æ–‡ä»¶çš„其他检查。使用 $(basename) ä½œä¸ºåŒ¹é…æ–‡ä»¶åçš„å˜é‡ã€‚", "useRipgrep": "控制是å¦åœ¨æ–‡æœ¬å’Œæ–‡ä»¶æœç´¢ä¸­ä½¿ç”¨ ripgrep", - "useIgnoreFilesByDefault": "控制在新工作区中æœç´¢æ–‡æœ¬æ—¶æ˜¯å¦é»˜è®¤ä½¿ç”¨ .gitignore å’Œ .ignore 文件。", "useIgnoreFiles": "控制æœç´¢æ–‡ä»¶æ—¶æ˜¯å¦ä½¿ç”¨ .gitignore å’Œ .ignore 文件。", "search.quickOpen.includeSymbols": "é…置为在 Quick Open æ–‡ä»¶ç»“æžœä¸­åŒ…æ‹¬å…¨å±€ç¬¦å·æœç´¢çš„结果。", "search.followSymlinks": "控制是å¦åœ¨æœç´¢ä¸­è·Ÿè¸ªç¬¦å·é“¾æŽ¥ã€‚" diff --git a/i18n/chs/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/chs/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 02641d5492f..ebf392aa07d 100644 --- a/i18n/chs/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -10,17 +10,14 @@ "previousSearchExcludePattern": "显示上一个æœç´¢æŽ’除模å¼", "nextSearchTerm": "显示下一个æœç´¢è¯", "previousSearchTerm": "显示上一个æœç´¢è¯", - "focusNextInputBox": "èšç„¦ä¸‹ä¸€ä¸ªè¾“入框", - "focusPreviousInputBox": "èšç„¦ä¸Šä¸€ä¸ªè¾“入框", "showSearchViewlet": "显示æœç´¢", "findInFiles": "在文件中查找", "findInFilesWithSelectedText": "在文件中查找所选文本", "replaceInFiles": "在文件中替æ¢", "replaceInFilesWithSelectedText": "åœ¨æ–‡ä»¶ä¸­æ›¿æ¢æ‰€é€‰æ–‡æœ¬", - "findInWorkspace": "在工作区中查找...", - "findInFolder": "在文件夹中查找...", "RefreshAction.label": "刷新", - "ClearSearchResultsAction.label": "清除æœç´¢ç»“æžœ", + "CollapseDeepestExpandedLevelAction.label": "全部折å ", + "ClearSearchResultsAction.label": "清除", "FocusNextSearchResult.label": "èšç„¦ä¸‹ä¸€æœç´¢ç»“æžœ", "FocusPreviousSearchResult.label": "èšç„¦ä¸Šä¸€æœç´¢ç»“æžœ", "RemoveAction.label": "消除", diff --git a/i18n/chs/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json new file mode 100644 index 00000000000..971f3dddcce --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "转到工作区中的符å·...", + "name": "æœç´¢", + "search": "æœç´¢", + "view": "查看", + "openAnythingHandlerDescription": "转到文件", + "openSymbolDescriptionNormal": "转到工作区中的符å·", + "searchOutputChannelTitle": "æœç´¢", + "searchConfigurationTitle": "æœç´¢", + "exclude": "é…ç½® glob 模å¼ä»¥åœ¨æœç´¢ä¸­æŽ’除文件和文件夹。从 files.exclude 设置中继承所有 glob 模å¼ã€‚", + "exclude.boolean": "åŒ¹é…æ–‡ä»¶è·¯å¾„æ‰€ä¾æ®çš„ glob 模å¼ã€‚设置为 true 或 false å¯å¯ç”¨æˆ–ç¦ç”¨è¯¥æ¨¡å¼ã€‚", + "exclude.when": "å¯¹åŒ¹é…æ–‡ä»¶çš„åŒçº§æ–‡ä»¶çš„其他检查。使用 $(basename) ä½œä¸ºåŒ¹é…æ–‡ä»¶åçš„å˜é‡ã€‚", + "useRipgrep": "控制是å¦åœ¨æ–‡æœ¬å’Œæ–‡ä»¶æœç´¢ä¸­ä½¿ç”¨ ripgrep", + "useIgnoreFiles": "控制æœç´¢æ–‡ä»¶æ—¶æ˜¯å¦ä½¿ç”¨ .gitignore å’Œ .ignore 文件。", + "search.quickOpen.includeSymbols": "é…置为在 Quick Open æ–‡ä»¶ç»“æžœä¸­åŒ…æ‹¬å…¨å±€ç¬¦å·æœç´¢çš„结果。", + "search.followSymlinks": "控制是å¦åœ¨æœç´¢ä¸­è·Ÿè¸ªç¬¦å·é“¾æŽ¥ã€‚" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/chs/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json new file mode 100644 index 00000000000..1821ff81617 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "findInFolder": "在文件夹中查找...", + "findInWorkspace": "在工作区中查找..." +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 9e55d0c22e6..f93e5155df3 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -6,10 +6,9 @@ { "tasksCategory": "任务", "ConfigureTaskRunnerAction.label": "é…置任务", - "ConfigureBuildTaskAction.label": "é…置生æˆä»»åŠ¡", "CloseMessageAction.label": "关闭", - "ShowTerminalAction.label": "查看终端", "problems": "问题", + "building": "正在生æˆ...", "manyMarkers": "99+", "runningTasks": "显示è¿è¡Œä¸­çš„任务", "tasks": "任务", @@ -31,7 +30,7 @@ "TaskSystem.activeSame.noBackground": "任务 \"{0}\" 已处于活动状æ€ã€‚è‹¥è¦ç»ˆæ­¢ä»»åŠ¡ï¼Œè¯·é€‰æ‹©â€œä»»åŠ¡â€èœå•中的“终止任务...â€ã€‚", "TaskSystem.active": "当å‰å·²æœ‰ä»»åŠ¡æ­£åœ¨è¿è¡Œã€‚请先终止它,然åŽå†æ‰§è¡Œå¦ä¸€é¡¹ä»»åŠ¡ã€‚", "TaskSystem.restartFailed": "未能终止并é‡å¯ä»»åŠ¡ {0}", - "TaskService.noConfiguration": "错误: {0} 任务检测没有æä¾›æ‹¥æœ‰ä¸‹åˆ—é…置的任务:\n{1}\n将忽略此任务。", + "TaskService.noConfiguration": "错误: {0} 任务检测没有æä¾›æ‹¥æœ‰ä¸‹åˆ—é…置的任务:\n{1}\n将忽略此任务。\n", "TaskSystem.configurationErrors": "错误: æä¾›çš„任务é…置具有验è¯é”™è¯¯ï¼Œæ— æ³•使用。请首先改正错误。", "taskService.ignoreingFolder": "将忽略工作区文件夹 {0} 的任务é…置。多文件夹工作区任务支æŒè¦æ±‚所有文件夹使用任务版本 2.0.0\n", "TaskSystem.invalidTaskJson": "错误: tasks.json 文件的内容具有语法错误。请先更正错误然åŽå†æ‰§è¡Œä»»åŠ¡ã€‚\n", @@ -52,7 +51,7 @@ "TaslService.noEntryToRun": "没有找到è¦è¿è¡Œçš„任务。é…置任务...", "TaskService.fetchingBuildTasks": "正在获å–生æˆä»»åŠ¡...", "TaskService.pickBuildTask": "选择è¦è¿è¡Œçš„生æˆä»»åŠ¡", - "TaskService.noBuildTask": "没有找到è¦è¿è¡Œçš„生æˆä»»åŠ¡ã€‚é…置任务...", + "TaskService.noBuildTask": "没有找到è¦è¿è¡Œçš„生æˆä»»åŠ¡ã€‚é…置生æˆä»»åŠ¡...", "TaskService.fetchingTestTasks": "æ­£åœ¨èŽ·å–æµ‹è¯•任务...", "TaskService.pickTestTask": "选择è¦è¿è¡Œçš„æµ‹è¯•任务", "TaskService.noTestTaskTerminal": "没有找到è¦è¿è¡Œçš„æµ‹è¯•任务。é…置任务...", diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index c557a30ebe4..7f5fd4d5b23 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -7,6 +7,7 @@ "TerminalTaskSystem.unknownError": "在执行任务时å‘生未知错误。请å‚è§ä»»åŠ¡è¾“å‡ºæ—¥å¿—äº†è§£è¯¦ç»†ä¿¡æ¯ã€‚", "dependencyFailed": "无法解æžåœ¨å·¥ä½œåŒºæ–‡ä»¶å¤¹â€œ{1}â€ä¸­çš„ä¾èµ–任务“{0}â€", "TerminalTaskSystem.terminalName": "任务 - {0}", + "closeTerminal": "按任æ„键关闭终端。", "reuseTerminal": "终端将被任务é‡ç”¨ï¼ŒæŒ‰ä»»æ„键关闭。", "TerminalTaskSystem": "无法对 UNC 驱动器执行 shell 命令。", "unkownProblemMatcher": "无法解æžé—®é¢˜åŒ¹é…ç¨‹åº {0}。此匹é…程åºå°†è¢«å¿½ç•¥" diff --git a/i18n/chs/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index 07d51f5b85c..17ed7e2c519 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,8 +14,8 @@ "ConfigurationParser.noTypeDefinition": "错误: 没有注册任务类型“{0}â€ã€‚ä½ æ˜¯ä¸æ˜¯å¿˜è®°å®‰è£…嫿œ‰ç›¸åº”任务æä¾›å™¨çš„æ‰©å±•?", "ConfigurationParser.missingRequiredProperty": "错误: 任务é…置“{0}â€ç¼ºå¤±å¿…è¦å±žæ€§â€œ{1}â€ã€‚将忽略该任务。", "ConfigurationParser.notCustom": "错误: 任务未声明为自定义任务。将忽略é…置。\n{0}\n", - "ConfigurationParser.noTaskName": "错误: 任务必须æä¾› taskName 属性。将忽略该任务。\n{0}\n", - "taskConfiguration.shellArgs": "警告: 任务“{0}â€æ˜¯ shell 命令,该命令的åç§°æˆ–å…¶ä¸­ä¸€ä¸ªå‚æ•°å…·æœ‰éžè½¬ä¹‰ç©ºæ ¼ã€‚è‹¥è¦ç¡®ä¿å‘½ä»¤è¡Œå¼•ç”¨æ­£ç¡®ï¼Œè¯·å°†å‚æ•°åˆå¹¶åˆ°è¯¥å‘½ä»¤ã€‚", + "ConfigurationParser.noTaskName": "错误: 任务必须æä¾› label 属性。将忽略该任务。\n{0}\n", + "taskConfiguration.shellArgs": "警告: 任务“{0}â€æ˜¯ shell å‘½ä»¤ï¼Œè€Œä¸”å…¶ä¸­ä¸€ä¸ªå‚æ•°å¯èƒ½å«æœ‰æœªè½¬ä¹‰çš„空格。若è¦ç¡®ä¿å‘½ä»¤è¡Œå¼•ç”¨æ­£ç¡®ï¼Œè¯·å°†å‚æ•°åˆå¹¶åˆ°è¯¥å‘½ä»¤ã€‚", "taskConfiguration.noCommandOrDependsOn": "错误:任务“{0}â€æ—¢ä¸æŒ‡å®šå‘½ä»¤ï¼Œä¹Ÿä¸æŒ‡å®š dependsOn 属性。将忽略该任务。其定义为:\n{1}", "taskConfiguration.noCommand": "错误: 任务“{0}â€æœªå®šä¹‰å‘½ä»¤ã€‚将忽略该任务。其定义为:\n{1}", "TaskParse.noOsSpecificGlobalTasks": "任务版本 2.0.0 䏿”¯æŒå…¨å±€æ“作系统特定任务。请将他们转æ¢ä¸ºå«æœ‰æ“作系统特定命令的任务。å—å½±å“的任务有:\n{0}" diff --git a/i18n/chs/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index b7523fc74cd..6348749fb54 100644 --- a/i18n/chs/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,7 +6,7 @@ { "termEntryAriaLabel": "{0},终端选å–器", "termCreateEntryAriaLabel": "{0},新建终端", - "'workbench.action.terminal.newplus": "$(plus) 新建集æˆç»ˆç«¯", + "workbench.action.terminal.newplus": "$(plus) 新建集æˆç»ˆç«¯", "noTerminalsMatching": "没有匹é…的终端", "noTerminalsFound": "没有打开终端" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 892b51d9473..75d151b4bb5 100644 --- a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,7 +16,7 @@ "terminal.integrated.rightClickCopyPaste": "设置åŽï¼Œåœ¨ç»ˆç«¯å†…å³é”®å•击时,这将阻止显示上下文èœå•,相å,它将在有选项时进行å¤åˆ¶ï¼Œå¹¶ä¸”在没有选项时进行粘贴。", "terminal.integrated.fontFamily": "控制终端的字体系列,这在编辑器中是默认的。fontFamily 的值。", "terminal.integrated.fontSize": "控制终端的字å·(以åƒç´ ä¸ºå•ä½)。", - "terminal.integrated.lineHeight": "控制终端的行高,此数字乘以终端字å·å¾—到实际行高(以åƒç´ è¡¨ç¤º)。", + "terminal.integrated.lineHeight": "控制终端的行高,此数字乘上终端字å·å¾—到实际行高(以åƒç´ ä¸ºå•ä½)。", "terminal.integrated.enableBold": "是å¦åœ¨ç»ˆç«¯å†…å¯ç”¨ç²—体文本,注æ„这需è¦ç»ˆç«¯å‘½ä»¤è¡Œçš„æ”¯æŒã€‚", "terminal.integrated.cursorBlinking": "控制终端光标是å¦é—ªçƒã€‚", "terminal.integrated.cursorStyle": "控制终端游标的样å¼ã€‚", diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json index 6b431f37d7f..25d612371f7 100644 --- a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json @@ -7,7 +7,7 @@ "terminal.integrated.chooseWindowsShellInfo": "å¯é€šè¿‡é€‰æ‹©â€œè‡ªå®šä¹‰â€æŒ‰é’®æ¥æ›´æ”¹é»˜è®¤çš„终端 shell。", "customize": "自定义", "cancel": "å–æ¶ˆ", - "never again": "好,永ä¸å†æ˜¾ç¤º", + "never again": "我已了解,ä¸å†æç¤º", "terminal.integrated.chooseWindowsShell": "选择首选的终端 shell,你å¯ç¨åŽåœ¨è®¾ç½®ä¸­è¿›è¡Œæ›´æ”¹", "terminalService.terminalCloseConfirmationSingular": "存在一个活动的终端会è¯ï¼Œæ˜¯å¦è¦ç»ˆæ­¢æ­¤ä¼šè¯?", "terminalService.terminalCloseConfirmationPlural": "存在 {0} 个活动的终端会è¯ï¼Œæ˜¯å¦è¦ç»ˆæ­¢è¿™äº›ä¼šè¯?" diff --git a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 7a4782c7762..6a87d4658cd 100644 --- a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,13 +5,15 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "颜色主题", + "themes.category.light": "浅色主题", + "themes.category.dark": "深色主题", + "themes.category.hc": "高对比度主题", "installColorThemes": "安装其他颜色主题...", "themes.selectTheme": "选择颜色主题(按上下箭头键预览)", "selectIconTheme.label": "文件图标主题", - "installIconThemes": "安装其他文件图标主题...", "noIconThemeLabel": "æ— ", "noIconThemeDesc": "ç¦ç”¨æ–‡ä»¶å›¾æ ‡", - "problemChangingIconTheme": "设置图标主题时出现问题: {0}", + "installIconThemes": "安装其他文件图标主题...", "themes.selectIconTheme": "选择文件图标主题", "generateColorTheme.label": "使用当å‰è®¾ç½®ç”Ÿæˆé¢œè‰²ä¸»é¢˜", "preferences": "首选项", diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 634ceb97cb3..dde9f25287d 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -14,7 +14,7 @@ "welcomePage.moreRecent": "更多...", "welcomePage.noRecentFolders": "无最近使用文件夹", "welcomePage.help": "帮助", - "welcomePage.keybindingsCheatsheet": "坿‰“å°çš„键盘速查表", + "welcomePage.keybindingsCheatsheet": "å¿«æ·é”®é€ŸæŸ¥è¡¨(坿‰“å°)", "welcomePage.introductoryVideos": "入门视频", "welcomePage.tipsAndTricks": "æç¤ºä¸ŽæŠ€å·§", "welcomePage.productDocumentation": "äº§å“æ–‡æ¡£", diff --git a/i18n/chs/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/chs/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 2eb80022de4..efa72e262b0 100644 --- a/i18n/chs/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/chs/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -9,9 +9,9 @@ "scope.window.description": "特定于窗å£çš„é…置,å¯åœ¨â€œç”¨æˆ·â€æˆ–“工作区â€è®¾ç½®ä¸­é…置。", "scope.resource.description": "特定于资æºçš„é…置,å¯åœ¨â€œç”¨æˆ·â€ã€â€œå·¥ä½œåŒºâ€æˆ–“文件夹â€è®¾ç½®ä¸­é…置。", "scope.description": "é…置适用的范围。å¯ç”¨èŒƒå›´æœ‰â€œçª—å£â€å’Œâ€œèµ„æºâ€ã€‚", + "vscode.extension.contributes.defaultConfiguration": "按语言æä¾›é»˜è®¤ç¼–辑器é…置设置。", "vscode.extension.contributes.configuration": "用于é…置字符串。", "invalid.title": "configuration.title 必须是字符串", - "vscode.extension.contributes.defaultConfiguration": "按语言æä¾›é»˜è®¤ç¼–辑器é…置设置。", "invalid.properties": "configuration.properties 必须是对象", "invalid.allOf": "\"configuration.allOf\" 已被弃用且ä¸åº”被使用。你å¯ä»¥å°†å¤šä¸ªé…ç½®å•元作为数组传递给 \"configuration\" å‚与点。", "workspaceConfig.folders.description": "将载入到工作区的文件夹列表。", diff --git a/i18n/chs/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json b/i18n/chs/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json new file mode 100644 index 00000000000..0581515bc92 --- /dev/null +++ b/i18n/chs/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "饿µ‹", + "telemetry.enableCrashReporting": "å¯ç”¨è¦å‘é€ç»™ Microsoft 的故障报表。\n此选项需é‡å¯æ‰å¯ç”Ÿæ•ˆã€‚" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/chs/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json new file mode 100644 index 00000000000..4ec26228924 --- /dev/null +++ b/i18n/chs/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "message": "$(zap) æ­£åœ¨åˆ†æžæ‰©å±•主机..." +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/chs/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index c6b9abd9ce6..09cdc54ab6e 100644 --- a/i18n/chs/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -9,5 +9,6 @@ "extensionHostProcess.crash": "扩展宿主æ„外终止。", "extensionHostProcess.unresponsiveCrash": "扩展宿主因没有å“应而被终止。", "overwritingExtension": "ä½¿ç”¨æ‰©å±•ç¨‹åº {1} è¦†ç›–æ‰©å±•ç¨‹åº {0}。", - "extensionUnderDevelopment": "正在 {0} å¤„åŠ è½½å¼€å‘æ‰©å±•程åº" + "extensionUnderDevelopment": "正在 {0} å¤„åŠ è½½å¼€å‘æ‰©å±•程åº", + "extensionCache.invalid": "扩展在ç£ç›˜ä¸Šå·²è¢«ä¿®æ”¹ã€‚è¯·é‡æ–°åŠ è½½çª—å£ã€‚" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/chs/src/vs/workbench/services/files/node/fileService.i18n.json index dfb188fa179..b385a7a0f15 100644 --- a/i18n/chs/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/files/node/fileService.i18n.json @@ -8,8 +8,8 @@ "fileIsDirectoryError": "文件是目录", "fileNotModifiedError": "自以下时间未修改的文件:", "fileTooLargeError": "文件太大,无法打开", - "fileBinaryError": "文件似乎是二进制文件,无法作为文档打开", "fileNotFoundError": "找ä¸åˆ°æ–‡ä»¶({0})", + "fileBinaryError": "文件似乎是二进制文件,无法作为文档打开", "fileExists": "已存在è¦åˆ›å»ºçš„æ–‡ä»¶ ({0})", "fileMoveConflict": "无法移动/å¤åˆ¶ã€‚文件已存在于目标ä½ç½®ã€‚", "unableToMoveCopyError": "无法移动/å¤åˆ¶ã€‚文件将替æ¢å…¶æ‰€åœ¨çš„æ–‡ä»¶å¤¹ã€‚", diff --git a/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 57fb7d30808..af87ffb3672 100644 --- a/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -22,5 +22,5 @@ "keybindings.json.when": "é”®å¤„äºŽæ´»åŠ¨çŠ¶æ€æ—¶çš„æ¡ä»¶ã€‚", "keybindings.json.args": "è¦ä¼ é€’ç»™å‘½ä»¤ä»¥æ‰§è¡Œçš„å‚æ•°ã€‚", "keyboardConfigurationTitle": "键盘", - "dispatch": "控制按键的调度逻辑以使用“keydown.codeâ€(推è) 或“keydown.keyCodeâ€ã€‚" + "dispatch": "控制按键的分派逻辑以使用 \"code\" (推è) 或 \"keyCode\"。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/chs/src/vs/workbench/services/textfile/common/textFileService.i18n.json index af00fba3ec3..804c0e84c9f 100644 --- a/i18n/chs/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "files.backup.failSave": "无法备份文件(错误: {0}),å°è¯•ä¿å­˜æ–‡ä»¶ä»¥é€€å‡ºã€‚" + "files.backup.failSave": "无法将更改的文件写入备份ä½ç½® (错误: {0})。请先ä¿å­˜ä½ çš„æ–‡ä»¶ï¼Œç„¶åŽé€€å‡ºã€‚" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index ebff4844aaf..af35cdf722b 100644 --- a/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "migration.completed": "å·²å‘用户设置添加了新的主题设置。{0} 中å¯å¤‡ä»½ã€‚", "error.cannotloadtheme": "无法加载 {0}: {1}", - "error.cannotloadicontheme": "Unable to load {0}", "colorTheme": "指定工作å°ä¸­ä½¿ç”¨çš„颜色主题。", "colorThemeError": "主题未知或未安装。", "iconTheme": "指定在工作å°ä¸­ä½¿ç”¨çš„图标主题,或指定 \"null\" 以䏿˜¾ç¤ºä»»ä½•文件图标。", diff --git a/i18n/cht/extensions/git/out/autofetch.i18n.json b/i18n/cht/extensions/git/out/autofetch.i18n.json new file mode 100644 index 00000000000..bd190303079 --- /dev/null +++ b/i18n/cht/extensions/git/out/autofetch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yes": "是", + "no": "å¦" +} \ No newline at end of file diff --git a/i18n/cht/extensions/git/out/commands.i18n.json b/i18n/cht/extensions/git/out/commands.i18n.json index d7d2cf33969..24b380b69e3 100644 --- a/i18n/cht/extensions/git/out/commands.i18n.json +++ b/i18n/cht/extensions/git/out/commands.i18n.json @@ -9,6 +9,7 @@ "create branch": "$(plus) 建立新的分支", "repourl": "儲存庫 URL", "parent": "父目錄", + "cancel tooltip": "å–æ¶ˆè¤‡è£½", "cloning": "正在複製 Git 儲存庫...", "openrepo": "開啟儲存庫", "proposeopen": "è¦é–‹å•Ÿè¤‡è£½çš„儲存庫嗎?", @@ -49,6 +50,8 @@ "select branch to delete": "鏿“‡åˆ†æ”¯é€²è¡Œåˆªé™¤", "confirm force delete branch": "分支 '{0}' 尚未完整åˆä½µ. 確定刪除嗎?", "delete branch": "刪除分支", + "invalid branch name": "分支å稱無效", + "branch already exists": "分支å稱 '{0}' 已經存在", "select a branch to merge from": "鏿“‡è¦åˆä½µçš„分支。", "merge conflicts": "åˆä½µè¡çªã€‚æäº¤å‰è«‹è§£æ±ºè¡çªã€‚", "tag name": "標籤å稱", @@ -71,7 +74,6 @@ "no stashes": "沒有è¦éš±è—å¯ä¾›é‚„原。", "pick stash to pop": "請挑é¸è¦å¿«é¡¯çš„éš±è—", "clean repo": "請先清除您的本地儲存庫工作å€å†ç°½å‡ºã€‚", - "cant push": "無法將åƒè€ƒæŽ¨é€åˆ°é ç«¯ã€‚請先執行 [æå–] ä»¥æ•´åˆæ‚¨çš„變更。", "git error details": "Git: {0}", "git error": "Git 錯誤", "open git log": "開啟 Git 記錄" diff --git a/i18n/cht/extensions/git/out/main.i18n.json b/i18n/cht/extensions/git/out/main.i18n.json index 1a5f7ab3b83..1705b21123c 100644 --- a/i18n/cht/extensions/git/out/main.i18n.json +++ b/i18n/cht/extensions/git/out/main.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "using git": "正在使用來自 {1} çš„ git {0}", - "updateGit": "æ›´æ–° Git", "neverShowAgain": "ä¸è¦å†é¡¯ç¤º", + "updateGit": "æ›´æ–° Git", "git20": "æ‚¨ä¼¼ä¹Žå·²å®‰è£ Git {0}。Code æ­é… Git >= 2 的執行效果最佳" } \ No newline at end of file diff --git a/i18n/cht/extensions/git/out/repository.i18n.json b/i18n/cht/extensions/git/out/repository.i18n.json index c07485bdb63..11f473d6e80 100644 --- a/i18n/cht/extensions/git/out/repository.i18n.json +++ b/i18n/cht/extensions/git/out/repository.i18n.json @@ -21,6 +21,7 @@ "deleted by us": "å·²å—到我們刪除", "both added": "皆已新增", "both modified": "皆已修改", + "commitMessage": "è¨Šæ¯ (按 {0} 以èªå¯)", "commit": "èªå¯", "merge changes": "åˆä½µè®Šæ›´", "staged changes": "已分段的變更", diff --git a/i18n/cht/extensions/git/package.i18n.json b/i18n/cht/extensions/git/package.i18n.json index 1b15b9673ea..c21ef005686 100644 --- a/i18n/cht/extensions/git/package.i18n.json +++ b/i18n/cht/extensions/git/package.i18n.json @@ -33,6 +33,7 @@ "command.checkout": "簽出至...", "command.branch": "建立分支...", "command.deleteBranch": "刪除分支...", + "command.renameBranch": "釿–°å‘½å分支...", "command.merge": "åˆä½µåˆ†æ”¯...", "command.createTag": "建立標籤", "command.pull": "æå–", @@ -42,9 +43,11 @@ "command.pushTo": "推é€è‡³...", "command.pushWithTags": "使用標籤推é€", "command.sync": "åŒæ­¥è™•ç†", + "command.syncRebase": "åŒæ­¥ (é‡å®šåŸºåº•)", "command.publish": "發行分支", "command.showOutput": "顯示 Git 輸出", "command.ignore": "將檔案新增到 .gitignore", + "command.stashIncludeUntracked": "éš±è— (åŒ…å«æœªè¢«è¿½è¹¤çš„æª”案)", "command.stash": "éš±è—", "command.stashPop": "快顯隱è—...", "command.stashPopLatest": "快顯上一次的隱è—", diff --git a/i18n/cht/extensions/markdown/out/commands.i18n.json b/i18n/cht/extensions/markdown/out/commands.i18n.json new file mode 100644 index 00000000000..d6573953062 --- /dev/null +++ b/i18n/cht/extensions/markdown/out/commands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previewTitle": "é è¦½ [0]", + "onPreviewStyleLoadError": "無法載入 ‘markdown.style' 樣å¼:{0}" +} \ No newline at end of file diff --git a/i18n/cht/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/cht/extensions/markdown/out/features/previewContentProvider.i18n.json new file mode 100644 index 00000000000..66d00227018 --- /dev/null +++ b/i18n/cht/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "此文件中的部分內容已åœç”¨", + "preview.securityMessage.title": "Markdown é è¦½ä¸­å·²åœç”¨å¯èƒ½ä¸å®‰å…¨æˆ–ä¸å®‰å…¨çš„內容。請將 Markdown é è¦½çš„安全性設定變更為å…許ä¸å®‰å…¨å…§å®¹ï¼Œæˆ–啟用指令碼", + "preview.securityMessage.label": "內容已åœç”¨å®‰å…¨æ€§è­¦å‘Š" +} \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/package.i18n.json b/i18n/cht/extensions/typescript/package.i18n.json index 5d211fb0200..c6af56454e9 100644 --- a/i18n/cht/extensions/typescript/package.i18n.json +++ b/i18n/cht/extensions/typescript/package.i18n.json @@ -39,6 +39,7 @@ "typescript.openTsServerLog.title": "開啟 TS 伺æœå™¨è¨˜éŒ„", "typescript.restartTsServer": "釿–°å•Ÿå‹•TS伺æœå™¨", "typescript.selectTypeScriptVersion.title": "é¸å– TypeScript 版本", + "typescript.reportStyleChecksAsWarnings": "ä½¿ç”¨è­¦å‘Šé¡¯ç¤ºæ¨£å¼æª¢æŸ¥", "jsDocCompletion.enabled": "啟用/åœç”¨è‡ªå‹• JSDoc 註解", "javascript.implicitProjectConfig.checkJs": "啟用/åœç”¨ JavaScript æª”æ¡ˆçš„èªžæ„æª¢æŸ¥ã€‚ç¾æœ‰çš„ jsconfig.json 或 tsconfig.json æª”æ¡ˆæœƒè¦†å¯«æ­¤è¨­å®šã€‚éœ€è¦ TypeScript >=2.3.1。", "typescript.npm": "指定用於自動類型å–å¾—çš„ NPM å¯åŸ·è¡Œæª”路徑。TypeScript å¿…é ˆ >= 2.3.4.", diff --git a/i18n/cht/src/vs/base/common/errorMessage.i18n.json b/i18n/cht/src/vs/base/common/errorMessage.i18n.json index 0ff1888b74e..53620e90dc9 100644 --- a/i18n/cht/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/cht/src/vs/base/common/errorMessage.i18n.json @@ -4,13 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "message": "{0}。錯誤碼: {1}", - "error.permission.verbose": "使用權é™é­æ‹’ (HTTP {0})", - "error.permission": "使用權é™é­æ‹’", - "error.http.verbose": "{0} (HTTP {1}: {2})", - "error.http": "{0} (HTTP {1})", - "error.connection.unknown.verbose": "未知的連線錯誤 ({0})", - "error.connection.unknown": "發生未知的連接錯誤。å¯èƒ½æ˜¯æ‚¨å·²ç¶“沒有連線到網際網路,或是您連接的伺æœå™¨å·²é›¢ç·šã€‚", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "發生未知的錯誤。如需詳細資訊,請åƒé–±è¨˜éŒ„檔。", "nodeExceptionMessage": "發生系統錯誤 ({0})", diff --git a/i18n/cht/src/vs/code/electron-main/main.i18n.json b/i18n/cht/src/vs/code/electron-main/main.i18n.json new file mode 100644 index 00000000000..0311ac8ba64 --- /dev/null +++ b/i18n/cht/src/vs/code/electron-main/main.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "secondInstanceNoResponse": "å¦ä¸€å€‹ {0} 執行個體正在執行,但沒有回應", + "secondInstanceNoResponseDetail": "請關閉其他所有執行個體,然後å†è©¦ä¸€æ¬¡ã€‚", + "secondInstanceAdminDetail": "請關閉其他執行個體,然後å†è©¦ä¸€æ¬¡ã€‚", + "close": "關閉(&&C)" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/code/electron-main/menus.i18n.json b/i18n/cht/src/vs/code/electron-main/menus.i18n.json index 080129a4e8a..4aad58bdfe6 100644 --- a/i18n/cht/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/menus.i18n.json @@ -22,12 +22,10 @@ "miQuit": "çµæŸ {0}", "miNewFile": "新增檔案(&&N)", "miOpen": "開啟(&&O)...", - "miOpenWorkspace": "開啟工作å€(&&O)...", "miOpenFolder": "開啟資料夾(&&F)...", "miOpenFile": "開啟檔案(&&O)...", "miOpenRecent": "開啟最近的檔案(&&R)", - "miSaveWorkspaceAs": "將工作å€å¦å­˜ç‚º(&&S)...", - "miAddFolderToWorkspace": "將資料夾新增到工作å€(&&A)", + "miSaveWorkspaceAs": "å¦å­˜å·¥ä½œå€ç‚º...", "miSave": "儲存(&&S)", "miSaveAs": "å¦å­˜æ–°æª”(&&A)...", "miSaveAll": "全部儲存(&&L)", @@ -157,7 +155,6 @@ "mMergeAllWindows": "åˆä½µæ‰€æœ‰è¦–窗", "miToggleDevTools": "切æ›é–‹ç™¼äººå“¡å·¥å…·(&&T)", "miAccessibilityOptions": "å”助工具é¸é …(&&O)", - "miReportIssues": "回報å•題(&&I)", "miWelcome": "歡迎使用(&&W)", "miInteractivePlayground": "Interactive Playground(&&I)", "miDocumentation": "文件(&&D)", @@ -184,6 +181,6 @@ "miDownloadingUpdate": "正在下載更新...", "miInstallingUpdate": "æ­£åœ¨å®‰è£æ›´æ–°...", "miCheckForUpdates": "æŸ¥çœ‹æ˜¯å¦æœ‰æ›´æ–°", - "aboutDetail": "\n版本 {0}\nèªå¯ {1}\n日期 {2}\nShell {3}\n轉譯器 {4}\n節點 {5}\næž¶æ§‹ {6}", - "okButton": "確定" + "okButton": "確定", + "copy": "複製(&&C)" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/browser/services/bulkEdit.i18n.json b/i18n/cht/src/vs/editor/browser/services/bulkEdit.i18n.json new file mode 100644 index 00000000000..cf3f3771d6a --- /dev/null +++ b/i18n/cht/src/vs/editor/browser/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "é€™äº›æª”æ¡ˆå·²åŒæ™‚變更: {0}", + "summary.0": "未進行任何編輯", + "summary.nm": "在 {1} 個檔案中進行了 {0} 項文字編輯", + "summary.n0": "在一個檔案中進行了 {0} 項文字編輯" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json index 042d523ea96..dd7847676ef 100644 --- a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,12 +10,16 @@ "fontSize": "æŽ§åˆ¶å­—åž‹å¤§å° (以åƒç´ ç‚ºå–®ä½)。", "lineHeight": "控制行高。使用 0 會從 fontSize 計算 lineHeight。", "letterSpacing": "æŽ§åˆ¶å­—å…ƒé–“è· (以åƒç´ ç‚ºå–®ä½)", - "lineNumbers": "控制行號顯示。å¯èƒ½çš„值有 'on'ã€'off' åŠ 'relative'。'relative' 會從目å‰çš„資料指標ä½ç½®é¡¯ç¤ºè¡Œæ•¸ã€‚", + "lineNumbers.off": "ä¸é¡¯ç¤ºè¡Œè™Ÿã€‚", + "lineNumbers.on": "行號以絕å°å€¼é¡¯ç¤ºã€‚", + "lineNumbers.relative": "è¡Œè™Ÿä»¥ç›®å‰æ¸¸æ¨™çš„相å°å€¼é¡¯ç¤ºã€‚", + "lineNumbers.interval": "æ¯ 10 行顯示行號。", + "lineNumbers": "控制行號顯示方å¼ã€‚å…è¨±è¨­å®šå€¼åŒ…å« 'on'ã€'off' åŠ 'relative'。", "rulers": "在特定的等寬字元數之後轉譯垂直尺è¦ã€‚有多個尺è¦å°±ä½¿ç”¨å¤šå€‹å€¼ã€‚若陣列為空,則ä¸ç¹ªè£½ä»»ä½•å°ºè¦ã€‚", "wordSeparators": "執行文字相關導覽或作業時將作為文字分隔符號的字元", "tabSize": "與 Tab 相等的空格數é‡ã€‚ç•¶ `editor.detectIndentation` 已開啟時,會根據檔案內容覆寫此設定。", "tabSize.errorMessage": "必須是 'number'。請注æ„,值 \"auto\" 已由 `editor.detectIndentation` 設定å–代。", - "insertSpaces": "在按 Tab 時æ’入空格。當 `editor.detectIndentation` 已開啟時,會根據檔案內容覆寫此設定。", + "insertSpaces": "與 Tab 相等的空格數é‡ã€‚ç•¶ `editor.detectIndentation` 已開啟時,會根據檔案內容覆寫此設定。", "insertSpaces.errorMessage": "必須是 'boolean'。請注æ„,值 \"auto\" 已由 `editor.detect Indentation` 設定å–代。", "detectIndentation": "é–‹å•Ÿæª”æ¡ˆæ™‚ï¼Œæœƒä¾æ“šæª”æ¡ˆå…§å®¹ä¾†åµæ¸¬ `editor.tabSize` åŠ `editor.insertSpaces`。", "roundedSelection": "控制é¸å–ç¯„åœæ˜¯å¦æœ‰åœ“è§’", @@ -89,8 +93,8 @@ "links": "æŽ§åˆ¶ç·¨è¼¯å™¨æ˜¯å¦æ‡‰åµæ¸¬é€£çµä¸”讓它å¯é»žæ“Š", "colorDecorators": "æŽ§åˆ¶ç·¨è¼¯å™¨æ˜¯å¦æ‡‰è½‰è­¯å…§åµŒè‰²å½©è£é£¾é …ç›®èˆ‡è‰²å½©é¸æ“‡å™¨ã€‚", "codeActions": "啟用程å¼å‹•作燈泡æç¤º", + "selectionClipboard": "æŽ§åˆ¶æ˜¯å¦æ‡‰æ”¯æ´ Linux 主è¦å‰ªè²¼ç°¿ã€‚", "sideBySide": "控制 Diff 編輯器è¦ä¸¦æŽ’或內嵌顯示差異", "ignoreTrimWhitespace": "控制 Diff 編輯器是å¦å°‡é–‹é ­æˆ–尾端空白字元的變更顯示為差異", - "renderIndicators": "控制 Diff 編輯器是å¦è¦ç‚ºæ–°å¢žçš„/移除的變更顯示 +/- 標記", - "selectionClipboard": "æŽ§åˆ¶æ˜¯å¦æ‡‰æ”¯æ´ Linux 主è¦å‰ªè²¼ç°¿ã€‚" + "renderIndicators": "控制 Diff 編輯器是å¦è¦ç‚ºæ–°å¢žçš„/移除的變更顯示 +/- 標記" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/cht/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json new file mode 100644 index 00000000000..1f0f5396a7c --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "移至方括弧" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json b/i18n/cht/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json new file mode 100644 index 00000000000..c91537d9f09 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "å°‡æ’入點左移", + "caret.moveRight": "å°‡æ’入點å³ç§»" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/caretOperations/transpose.i18n.json b/i18n/cht/src/vs/editor/contrib/caretOperations/transpose.i18n.json new file mode 100644 index 00000000000..0fdec24164c --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/caretOperations/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "調æ›å­—æ¯" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/clipboard/clipboard.i18n.json b/i18n/cht/src/vs/editor/contrib/clipboard/clipboard.i18n.json new file mode 100644 index 00000000000..ed1d999b907 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/clipboard/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "剪下", + "actions.clipboard.copyLabel": "複製", + "actions.clipboard.pasteLabel": "貼上", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "隨語法醒目æç¤ºè¤‡è£½" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/comment/comment.i18n.json b/i18n/cht/src/vs/editor/contrib/comment/comment.i18n.json new file mode 100644 index 00000000000..1179814825d --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/comment/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "切æ›è¡Œè¨»è§£", + "comment.line.add": "加入行註解", + "comment.line.remove": "移除行註解", + "comment.block": "切æ›å€å¡Šè¨»è§£" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json b/i18n/cht/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json new file mode 100644 index 00000000000..90809e4802b --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "顯示編輯器內容功能表" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/find/findController.i18n.json b/i18n/cht/src/vs/editor/contrib/find/findController.i18n.json new file mode 100644 index 00000000000..cbbf89b710f --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/find/findController.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "尋找", + "findNextMatchAction": "尋找下一個", + "findPreviousMatchAction": "尋找上一個", + "nextSelectionMatchFindAction": "尋找下一個é¸å–é …ç›®", + "previousSelectionMatchFindAction": "尋找上一個é¸å–é …ç›®", + "startReplace": "å–代", + "showNextFindTermAction": "顯示下一個尋找字詞", + "showPreviousFindTermAction": "顯示上一個尋找字詞" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/find/findWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/find/findWidget.i18n.json new file mode 100644 index 00000000000..7b79c72e500 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/find/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "尋找", + "placeholder.find": "尋找", + "label.previousMatchButton": "上一個符åˆé …", + "label.nextMatchButton": "下一個相符項", + "label.toggleSelectionFind": "在é¸å–範åœä¸­å°‹æ‰¾", + "label.closeButton": "關閉", + "label.replace": "å–代", + "placeholder.replace": "å–代", + "label.replaceButton": "å–代", + "label.replaceAllButton": "全部å–代", + "label.toggleReplaceButton": "切æ›å–代模å¼", + "title.matchesCountLimit": "僅åç™½é¡¯ç¤ºå‰ {0} ç­†çµæžœï¼Œä½†æ‰€æœ‰å°‹æ‰¾ä½œæ¥­æœƒåœ¨å®Œæ•´æ–‡å­—上執行。", + "label.matchesLocation": "{0} / {1}", + "label.noResults": "æ²’æœ‰çµæžœ" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/find/simpleFindWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/find/simpleFindWidget.i18n.json new file mode 100644 index 00000000000..f2ff92bce07 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/find/simpleFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "尋找", + "placeholder.find": "尋找", + "label.previousMatchButton": "上一個符åˆé …", + "label.nextMatchButton": "下一個相符項", + "label.closeButton": "關閉" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/cht/src/vs/editor/contrib/folding/folding.i18n.json new file mode 100644 index 00000000000..0a6abe06965 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/folding/folding.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "展開", + "unFoldRecursivelyAction.label": "以éžè¿´æ–¹å¼å±•é–‹", + "foldAction.label": "摺疊", + "foldRecursivelyAction.label": "以éžè¿´æ–¹å¼æ‘ºç–Š", + "foldAllBlockComments.label": "摺疊全部å€å¡Šè¨»è§£", + "foldAllAction.label": "全部摺疊", + "unfoldAllAction.label": "全部展開", + "foldLevelAction.label": "摺疊層級 {0}" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/format/formatActions.i18n.json b/i18n/cht/src/vs/editor/contrib/format/formatActions.i18n.json new file mode 100644 index 00000000000..84321c58d5f --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/format/formatActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "在行 {0} 編輯了 1 é …æ ¼å¼", + "hintn1": "在行 {1} 編輯了 {0} é …æ ¼å¼", + "hint1n": "在行 {0} 與行 {1} 之間編輯了 1 é …æ ¼å¼", + "hintnn": "在行 {1} 與行 {2} 之間編輯了 {0} é …æ ¼å¼", + "no.provider": "抱歉,尚無安è£é©ç”¨æ–¼ '{0}' 檔案的格å¼å™¨", + "formatDocument.label": "將文件格å¼åŒ–", + "formatSelection.label": "å°‡é¸å–項目格å¼åŒ–" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json b/i18n/cht/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json new file mode 100644 index 00000000000..26ea0a1761c --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "找ä¸åˆ° '{0}' 的定義", + "generic.noResults": "找ä¸åˆ°ä»»ä½•定義", + "meta.title": " - {0} 個定義", + "actions.goToDecl.label": "移至定義", + "actions.goToDeclToSide.label": "在一å´é–‹å•Ÿå®šç¾©", + "actions.previewDecl.label": "é è¦½å®šç¾©", + "goToImplementation.noResultWord": "找ä¸åˆ° '{0}' 的任何實作", + "goToImplementation.generic.noResults": "找ä¸åˆ°ä»»ä½•實作", + "meta.implementations.title": " – {0} 個實作", + "actions.goToImplementation.label": "å‰å¾€å¯¦ä½œ", + "actions.peekImplementation.label": "é è¦½å¯¦ä½œ", + "goToTypeDefinition.noResultWord": "找ä¸åˆ° '{0}' 的任何類型定義", + "goToTypeDefinition.generic.noResults": "找ä¸åˆ°ä»»ä½•類型定義", + "meta.typeDefinitions.title": " – {0} 個定義", + "actions.goToTypeDefinition.label": "移至類型定義", + "actions.peekTypeDefinition.label": "é è¦½é¡žåž‹å®šç¾©" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json b/i18n/cht/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json new file mode 100644 index 00000000000..24cf4f7503f --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "按一下以顯示 {0} 項定義。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/gotoError/gotoError.i18n.json b/i18n/cht/src/vs/editor/contrib/gotoError/gotoError.i18n.json new file mode 100644 index 00000000000..9fbf329131b --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/gotoError/gotoError.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "移至下一個錯誤或警告", + "markerAction.previous.label": "移至上一個錯誤或警告", + "editorMarkerNavigationError": "編輯器標記導覽å°å·¥å…·éŒ¯èª¤çš„色彩。", + "editorMarkerNavigationWarning": "編輯器標記導覽å°å·¥å…·è­¦å‘Šçš„色彩。", + "editorMarkerNavigationInfo": "編輯器標記導覽å°å·¥å…·è³‡è¨Šçš„色彩", + "editorMarkerNavigationBackground": "編輯器標記導覽å°å·¥å…·çš„背景。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/hover/hover.i18n.json b/i18n/cht/src/vs/editor/contrib/hover/hover.i18n.json new file mode 100644 index 00000000000..7895cc33c1f --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/hover/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "動態顯示" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/hover/modesContentHover.i18n.json b/i18n/cht/src/vs/editor/contrib/hover/modesContentHover.i18n.json new file mode 100644 index 00000000000..08e865d8b15 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/hover/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "正在載入..." +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json b/i18n/cht/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json new file mode 100644 index 00000000000..48be4f65048 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "以上一個值å–代", + "InPlaceReplaceAction.next.label": "以下一個值å–代" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/indentation/indentation.i18n.json b/i18n/cht/src/vs/editor/contrib/indentation/indentation.i18n.json new file mode 100644 index 00000000000..174b6d1af3f --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/indentation/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "å°‡ç¸®æŽ’è½‰æ›æˆç©ºæ ¼", + "indentationToTabs": "å°‡ç¸®æŽ’è½‰æ›æˆå®šä½é»ž", + "configuredTabSize": "已設定的定ä½é»žå¤§å°", + "selectTabWidth": "é¸å–ç›®å‰æª”案的定ä½é»žå¤§å°", + "indentUsingTabs": "使用 Tab 進行縮排", + "indentUsingSpaces": "使用空格éµé€²è¡Œç¸®æŽ’", + "detectIndentation": "嵿¸¬å…§å®¹ä¸­çš„縮排", + "editor.reindentlines": "釿–°å°‡è¡Œç¸®æŽ’" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json b/i18n/cht/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json new file mode 100644 index 00000000000..80873b659f2 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "將行å‘上複製", + "lines.copyDown": "將行å‘下複製", + "lines.moveUp": "上移一行", + "lines.moveDown": "下移一行", + "lines.sortAscending": "éžå¢žæŽ’åºè¡Œ", + "lines.sortDescending": "éžæ¸›æŽ’åºè¡Œ", + "lines.trimTrailingWhitespace": "修剪尾端空白", + "lines.delete": "刪除行", + "lines.indent": "縮排行", + "lines.outdent": "凸排行", + "lines.insertBefore": "在上方æ’入行", + "lines.insertAfter": "在下方æ’入行", + "lines.deleteAllLeft": "左邊全部刪除", + "lines.deleteAllRight": "åˆªé™¤æ‰€æœ‰å³æ–¹é …ç›®", + "lines.joinLines": "連接線", + "editor.transpose": "轉置游標周åœçš„字元數", + "editor.transformToUppercase": "轉æ›åˆ°å¤§å¯«", + "editor.transformToLowercase": "轉æ›åˆ°å°å¯«" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/links/links.i18n.json b/i18n/cht/src/vs/editor/contrib/links/links.i18n.json new file mode 100644 index 00000000000..6a528bd35b6 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/links/links.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "æŒ‰ä½ Cmd 並按一下滑鼠按鈕å¯é€£å…¥é€£çµ", + "links.navigate": "æŒ‰ä½ Ctrl 並按一下滑鼠按鈕å¯é€£å…¥é€£çµ", + "links.command.mac": "æŒ‰ä½ Cmd 並按一下滑鼠以執行命令", + "links.command": "æŒ‰ä½ Ctrl 並按一下滑鼠以執行命令", + "links.navigate.al": "按ä½Alt並點擊以追蹤連çµ", + "links.command.al": "æŒ‰ä½ Alt 並按一下滑鼠以執行命令", + "invalid.url": "抱歉,因為此連çµçš„語å¼ä¸æ­£ç¢ºï¼Œæ‰€ä»¥ç„¡æ³•加以開啟: {0}", + "missing.url": "抱歉,因為此連çµéºå¤±ç›®æ¨™ï¼Œæ‰€ä»¥ç„¡æ³•加以開啟。", + "label": "開啟連çµ" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/multicursor/multicursor.i18n.json b/i18n/cht/src/vs/editor/contrib/multicursor/multicursor.i18n.json new file mode 100644 index 00000000000..381e4cfcb4c --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/multicursor/multicursor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "在上方加入游標", + "mutlicursor.insertBelow": "在下方加入游標", + "mutlicursor.insertAtEndOfEachLineSelected": "在行尾新增游標", + "addSelectionToNextFindMatch": "å°‡é¸å–項目加入下一個找到的相符項", + "addSelectionToPreviousFindMatch": "å°‡é¸å–項目加入å‰ä¸€å€‹æ‰¾åˆ°çš„相符項中", + "moveSelectionToNextFindMatch": "å°‡æœ€å¾Œä¸€å€‹é¸æ“‡é …目移至下一個找到的相符項", + "moveSelectionToPreviousFindMatch": "å°‡æœ€å¾Œä¸€å€‹é¸æ“‡é …目移至å‰ä¸€å€‹æ‰¾åˆ°çš„相符項", + "selectAllOccurrencesOfFindMatch": "é¸å–所有找到的相符項目", + "changeAll.label": "變更所有發生次數" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json b/i18n/cht/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json new file mode 100644 index 00000000000..be94bfc3770 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "è§¸ç™¼åƒæ•¸æç¤º" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json new file mode 100644 index 00000000000..d56310c9916 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0},æç¤º" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/cht/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json new file mode 100644 index 00000000000..faa980e9cbd --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "顯示修正 ({0})", + "quickFix": "顯示修正", + "quickfix.trigger.label": "Quick Fix" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json new file mode 100644 index 00000000000..8b7662c4c93 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "關閉" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json new file mode 100644 index 00000000000..6818cd5b159 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": " - {0} 個åƒè€ƒ", + "references.action.label": "尋找所有åƒè€ƒ" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json new file mode 100644 index 00000000000..49f8938476d --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "正在載入..." +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json new file mode 100644 index 00000000000..e42c2aa0966 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "å€‹ç¬¦è™Ÿä½æ–¼ {0} 中的第 {1} 行第 {2} 欄", + "aria.fileReferences.1": "1 å€‹ç¬¦è™Ÿä½æ–¼ {0}, 完整路徑 {1}", + "aria.fileReferences.N": "{0} å€‹ç¬¦è™Ÿä½æ–¼ {1}, 完整路徑 {2}", + "aria.result.0": "找ä¸åˆ°çµæžœ", + "aria.result.1": "在 {0} 中找到 1 個符號", + "aria.result.n1": "在 {1} 中找到 {0} 個符號", + "aria.result.nm": "在 {1} 個檔案中找到 {0} 個符號" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json new file mode 100644 index 00000000000..3dca8b60ce1 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "ç„¡æ³•è§£æžæª”案。", + "referencesCount": "{0} 個åƒè€ƒ", + "referenceCount": "{0} 個åƒè€ƒ", + "missingPreviewMessage": "無法é è¦½", + "treeAriaLabel": "åƒè€ƒ", + "noResults": "æ²’æœ‰çµæžœ", + "peekView.alternateTitle": "åƒè€ƒ", + "peekViewTitleBackground": "é è¦½æª¢è¦–標題å€åŸŸçš„背景色彩。", + "peekViewTitleForeground": "é è¦½æª¢è¦–標題的色彩。", + "peekViewTitleInfoForeground": "é è¦½æª¢è¦–標題資訊的色彩。", + "peekViewBorder": "é è¦½æª¢è¦–之框線與箭頭的色彩。", + "peekViewResultsBackground": "é è¦½æª¢è¦–ä¸­çµæžœæ¸…單的背景色彩。", + "peekViewResultsMatchForeground": "é è¦½æª¢è¦–çµæžœåˆ—è¡¨ä¸­è¡Œç¯€é»žçš„å‰æ™¯è‰²å½©", + "peekViewResultsFileForeground": "é è¦½æª¢è¦–çµæžœåˆ—è¡¨ä¸­æª”æ¡ˆç¯€é»žçš„å‰æ™¯è‰²å½©", + "peekViewResultsSelectionBackground": "在é è¦½æª¢è¦–ä¹‹çµæžœæ¸…單中é¸å–項目時的背景色彩。", + "peekViewResultsSelectionForeground": "在é è¦½æª¢è¦–ä¹‹çµæžœæ¸…單中é¸å–é …ç›®æ™‚çš„å‰æ™¯è‰²å½©ã€‚", + "peekViewEditorBackground": "é è¦½æª¢è¦–編輯器的背景色彩。", + "peekViewEditorGutterBackground": "é è¦½æª¢è¦–編輯器邊框(å«è¡Œè™Ÿæˆ–字形圖示)的背景色彩。", + "peekViewResultsMatchHighlight": "在é è¦½æª¢è¦–ç·¨è¼¯å™¨ä¸­æ¯”å°æ™‚çš„å白顯示色彩。", + "peekViewEditorMatchHighlight": "é è¦½æª¢è¦–ç·¨è¼¯å™¨ä¸­æ¯”å°æ™‚çš„å白顯示色彩。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/rename/rename.i18n.json b/i18n/cht/src/vs/editor/contrib/rename/rename.i18n.json new file mode 100644 index 00000000000..e1b559cf2ec --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/rename/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "æ²’æœ‰çµæžœã€‚", + "aria": "å·²æˆåŠŸå°‡ '{0}' 釿–°å‘½å為 '{1}'。摘è¦: {2}", + "rename.failed": "æŠ±æ­‰ï¼Œç„¡æ³•åŸ·è¡Œé‡æ–°å‘½å。", + "rename.label": "釿–°å‘½å符號" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/rename/renameInputField.i18n.json b/i18n/cht/src/vs/editor/contrib/rename/renameInputField.i18n.json new file mode 100644 index 00000000000..75bf62bd612 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/rename/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "ç‚ºè¼¸å…¥é‡æ–°å‘½å。請éµå…¥æ–°å稱,然後按 Enter 以èªå¯ã€‚" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json b/i18n/cht/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json new file mode 100644 index 00000000000..a72697babba --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "展開é¸å–", + "smartSelect.shrink": "縮å°é¸å–" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/suggest/suggestController.i18n.json b/i18n/cht/src/vs/editor/contrib/suggest/suggestController.i18n.json new file mode 100644 index 00000000000..87e19ea32a1 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/suggest/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "æŽ¥å— '{0}' 時接å—了æ’入下列文字: {1}", + "suggest.trigger.label": "觸發建議" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/suggest/suggestWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/suggest/suggestWidget.i18n.json new file mode 100644 index 00000000000..beb2f4690fc --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/suggest/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "建議å°å·¥å…·çš„背景色彩。", + "editorSuggestWidgetBorder": "建議å°å·¥å…·çš„邊界色彩。", + "editorSuggestWidgetForeground": "建議å°å·¥å…·çš„剿™¯è‰²å½©ã€‚", + "editorSuggestWidgetSelectedBackground": "建議å°å·¥å…·ä¸­æ‰€é¸é …目的背景色彩。", + "editorSuggestWidgetHighlightForeground": "建議å°å·¥å…·ä¸­ç›¸ç¬¦é†’ç›®æç¤ºçš„色彩。", + "readMore": "進一步了解...{0}", + "suggestionWithDetailsAriaLabel": "{0},建議,有詳細資料", + "suggestionAriaLabel": "{0},建議", + "readLess": "簡易說明...{0}", + "suggestWidget.loading": "正在載入...", + "suggestWidget.noSuggestions": "無建議。", + "suggestionAriaAccepted": "{0},接å—", + "ariaCurrentSuggestionWithDetails": "{0},建議,有詳細資料", + "ariaCurrentSuggestion": "{0},建議" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json b/i18n/cht/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json new file mode 100644 index 00000000000..d60c7e9a6f3 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "åˆ‡æ› TAB éµç§»å‹•焦點" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json b/i18n/cht/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json new file mode 100644 index 00000000000..97c113d82f0 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "讀å–å­˜å–æœŸé–“ (例如讀å–變數時) 符號的背景色彩。", + "wordHighlightStrong": "å¯«å…¥å­˜å–æœŸé–“ (例如寫入變數時) 符號的背景色彩。", + "overviewRulerWordHighlightForeground": "符號醒目æç¤ºçš„æ¦‚è§€å°ºè¦æ¨™è¨˜è‰²å½©ã€‚", + "overviewRulerWordHighlightStrongForeground": "寫入權é™ç¬¦è™Ÿé†’ç›®æç¤ºçš„æ¦‚è§€å°ºè¦æ¨™è¨˜è‰²å½©ã€‚", + "wordHighlight.next.label": "移至下一個å白符號", + "wordHighlight.previous.label": "移至上一個å白符號" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/platform/environment/node/argv.i18n.json b/i18n/cht/src/vs/platform/environment/node/argv.i18n.json index 3b2c99dd58b..09f8c0cfeaf 100644 --- a/i18n/cht/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/cht/src/vs/platform/environment/node/argv.i18n.json @@ -12,6 +12,8 @@ "newWindow": "強制執行 Code 的新執行個體。", "performance": "在已啟用 'Developer: Startup Performance' 命令的情æ³ä¸‹é–‹å§‹ã€‚", "prof-startup": "啟動時執行 CPU 分æžå·¥å…·", + "inspect-extensions": "å…è¨±å°æ“´å……功能進行除錯和分æžã€‚檢查開發工具的連接 uri。", + "inspect-brk-extensions": "å…è¨±å°æ“´å±•ä¸»æ©Ÿåœ¨å•Ÿå‹•å¾Œæš«åœæ“´å……功能進行除錯和分æžã€‚檢查開發工具中的連接 uri。", "reuseWindow": "強制在最近使用的視窗中開啟檔案或資料夾。", "userDataDir": "指定ä¿ç•™ä½¿ç”¨è€…資料的目錄,這在以根目錄身分執行時有用。", "verbose": "列å°è©³ç´°è³‡è¨Šè¼¸å‡º (表示 --wait)。", @@ -24,6 +26,7 @@ "experimentalApis": "為延伸模組啟用建議的 API 功能。", "disableExtensions": "åœç”¨æ‰€æœ‰å·²å®‰è£çš„æ“´å……功能。", "disableGPU": "åœç”¨ GPU 硬體加速。", + "status": "列å°é€²ç¨‹ä½¿ç”¨æ–¹å¼å’Œè¨ºæ–·è³‡è¨Šã€‚", "version": "列å°ç‰ˆæœ¬ã€‚", "help": "列å°ä½¿ç”¨æ–¹å¼ã€‚", "usage": "使用方å¼", diff --git a/i18n/cht/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/cht/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index e6b158de084..385d3c73e6b 100644 --- a/i18n/cht/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/cht/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "notFound": "找ä¸åˆ°æ“´å……功能", - "noCompatible": "找ä¸åˆ°èˆ‡æ­¤ Code 版本相容的 {0} 版本。" + "notCompatibleDownload": "無法安è£ï¼Œå› ç‚ºæ‰¾ä¸åˆ°ç›¸å®¹æ–¼ VS Code ç›®å‰ç‰ˆæœ¬ '{0}' 的擴充功能。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/cht/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index 91ed221b018..bdd6cf53312 100644 --- a/i18n/cht/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/cht/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,11 +6,16 @@ { "invalidManifest": "擴充功能無效: package.json 䏿˜¯ JSON 檔案。", "restartCodeLocal": "è«‹å…ˆé‡æ–°å•Ÿå‹• Code,å†é‡æ–°å®‰è£ {0}。", - "restartCodeGallery": "釿–°å®‰è£ä¹‹å‰ï¼Œè«‹å…ˆé‡æ–°å•Ÿå‹• Code。", + "installingOutdatedExtension": "å·²å®‰è£æ­¤æ“´å……功能的較新版本。是å¦è¦ä½¿ç”¨èˆŠç‰ˆæœ¬è¦†è“‹æ­¤é …?", + "override": "覆寫", + "cancel": "å–æ¶ˆ", + "notFoundCompatible": "無法安è£ï¼Œå› ç‚ºæ‰¾ä¸åˆ°ç›¸å®¹æ–¼ VS Code ç›®å‰ç‰ˆæœ¬ '{1}' 的擴充功能 '{0}'。", + "quitCode": "無法安è£å› ç‚ºæœ‰éŽæ™‚的擴充功能ä»åœ¨é‹è¡Œã€‚è«‹åœ¨é‡æ–°å®‰è£å‰é€€å‡ºä¸¦å•Ÿå‹• VS Code。", + "exitCode": "無法安è£å› ç‚ºæœ‰éŽæ™‚的擴充功能ä»åœ¨é‹è¡Œã€‚è«‹åœ¨é‡æ–°å®‰è£å‰é€€å‡ºä¸¦å•Ÿå‹• VS Code。", + "notFoundCompatibleDependency": "無法安è£ï¼Œå› ç‚ºæ‰¾ä¸åˆ°ç›¸å®¹æ–¼ VS Code ç›®å‰ç‰ˆæœ¬ '{1}' çš„ç›¸ä¾æ“´å……功能 '{0}'。", "uninstallDependeciesConfirmation": "åªè¦å°‡ '{0}' 解除安è£ï¼Œæˆ–è¦åŒ…å«å…¶ç›¸ä¾æ€§?", "uninstallOnly": "åªæœ‰", "uninstallAll": "全部", - "cancel": "å–æ¶ˆ", "uninstallConfirmation": "確定è¦å°‡ '{0}' 解除安è£å—Ž?", "ok": "確定", "singleDependentError": "無法將延伸模組 '{0}' 解除安è£ã€‚其為延伸模組 '{1}' 的相ä¾å°è±¡ã€‚", diff --git a/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 50abb35f281..36f7fd1af50 100644 --- a/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -17,6 +17,7 @@ "vscode.extension.activationEvents.onLanguage": "當指定語言檔案開啟時激發該事件", "vscode.extension.activationEvents.onCommand": "當指定的命令被調用時激發該事件", "vscode.extension.activationEvents.onDebug": "當使用者正è¦é–‹å§‹åµéŒ¯æˆ–是設定åµéŒ¯çµ„態時激發該事件", + "vscode.extension.activationEvents.onDebugInitialConfigurations": "需è¦å»ºç«‹ \"launch.json\" 來觸發啟動事件 (並且需è¦å‘¼å«æ‰€æœ‰ provideDebugConfigurations 方法)。", "vscode.extension.activationEvents.workspaceContains": "當開啟指定的文件夾包å«glob模å¼åŒ¹é…的文件時激發該事件", "vscode.extension.activationEvents.onView": "當指定的檢視被擴展時激發該事件", "vscode.extension.activationEvents.star": "ç•¶VS Code啟動時激發該事件,ç‚ºäº†ç¢ºä¿æœ€å¥½çš„使用者體驗,當您的擴充功能沒有其他組åˆä½œæ¥­æ™‚,請激活此事件.", diff --git a/i18n/cht/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/cht/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json new file mode 100644 index 00000000000..fd863ceb4b0 --- /dev/null +++ b/i18n/cht/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleTabs": "åˆ‡æ›æ¨™ç±¤å¯è¦‹åº¦", + "view": "檢視" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index ee6864d5c65..6f4e3589f00 100644 --- a/i18n/cht/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -33,6 +33,7 @@ "openPreviousEditor": "開啟上一個編輯器", "nextEditorInGroup": "開啟群組中下一個編輯器", "openPreviousEditorInGroup": "開啟群組中上一個編輯器", + "lastEditorInGroup": "開啟群組中最後一個編輯器", "navigateNext": "å‘å‰", "navigatePrevious": "å‘後", "navigateLast": "移至最後", diff --git a/i18n/cht/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index 96aebe90db2..f93bcde4036 100644 --- a/i18n/cht/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,7 +6,7 @@ { "editorCommand.activeEditorMove.description": "以 tab 或群組為單ä½ç§»å‹•使用中的編輯器", "editorCommand.activeEditorMove.arg.name": "使用中編輯器的移動引數", - "editorCommand.activeEditorMove.arg.description": "引數屬性:\n\t\t\t\t\t\t* 'to': æä¾›ç§»å‹•目標ä½ç½®çš„字串值。\n\t\t\t\t\t\t* 'by': æä¾›ç§»å‹•å–®ä½çš„字串值。\n\t\t\t\t\t\t* 'value': æä¾›ç§»å‹•å–®ä½çš„字串值。å¯ä¾ç´¢å¼•標籤或群組作為單ä½ã€‚\n\t\t\t\t\t", + "editorCommand.activeEditorMove.arg.description": "引數屬性:\n\t* 'to': æä¾›ç§»å‹•目標ä½ç½®çš„字串值。\n\t* 'by': æä¾›ç§»å‹•å–®ä½çš„字串值。\n\t* 'value': æä¾›ç§»å‹•å–®ä½çš„字串值。å¯ä¾ç´¢å¼•標籤或群組作為單ä½ã€‚", "commandDeprecated": "已移除命令 **{0}**。您å¯ä»¥æ”¹ç”¨ **{1}**", "openKeybindings": "設定éµç›¤å¿«é€Ÿéµ" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index e8b2ace0bcf..b57df7a1574 100644 --- a/i18n/cht/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -53,5 +53,5 @@ "screenReaderDetectedExplanation.answerYes": "是", "screenReaderDetectedExplanation.answerNo": "å¦", "screenReaderDetectedExplanation.body1": "已將 VS Code 最佳化,ç¾åœ¨å¯æ­é…螢幕助讀程å¼ä½¿ç”¨ã€‚", - "screenReaderDetectedExplanation.body2": "æŸäº›ç·¨è¼¯å™¨åŠŸèƒ½æœƒå…·æœ‰ä¸åŒçš„行為: 例如文字æ›è¡Œã€æŠ˜ç–Šã€è‡ªå‹•括上括號等。" + "screenReaderDetectedExplanation.body2": "æŸäº›ç·¨è¼¯å™¨åŠŸèƒ½æœƒå…·æœ‰ä¸åŒçš„行為: 例如文字æ›è¡Œã€æŠ˜ç–Šç­‰ã€‚" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/quickopen.i18n.json b/i18n/cht/src/vs/workbench/browser/quickopen.i18n.json index cab0a05a7b4..b0dd46b8c62 100644 --- a/i18n/cht/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/quickopen.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "noResultsMatching": "æ²’æœ‰ç›¸ç¬¦çš„çµæžœ", - "noResultsFound2": "找ä¸åˆ°çµæžœ", - "entryAriaLabel": "{0},命令" + "noResultsFound2": "找ä¸åˆ°çµæžœ" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json index c44f42dbd5d..b7ccbfd6338 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json @@ -30,7 +30,7 @@ "openRecent": "開啟最近使用的檔案...", "quickOpenRecent": "快速開啟最近使用的檔案...", "closeMessages": "關閉通知訊æ¯", - "reportIssues": "回報å•題", + "reportIssueInEnglish": "回報å•題", "reportPerformanceIssue": "回報效能å•題", "keybindingsReference": "éµç›¤å¿«é€Ÿéµåƒè€ƒ", "openDocumentationUrl": "文件", @@ -47,5 +47,14 @@ "showNextWindowTab": "顯示下一個視窗索引標籤", "moveWindowTabToNewWindow": "將視窗索引標籤移至新的視窗", "mergeAllWindowTabs": "åˆä½µæ‰€æœ‰è¦–窗", - "toggleWindowTabsBar": "切æ›è¦–窗索引標籤列" + "toggleWindowTabsBar": "切æ›è¦–窗索引標籤列", + "configureLocale": "設定語言", + "displayLanguage": "定義 VSCode 的顯示語言。", + "doc": "如需支æ´çš„語言清單,請åƒé–± {0}。", + "restart": "改變設定值後需è¦é‡æ–°å•Ÿå‹• VSCode.", + "fail.createSettings": "無法建立 '{0}' ({1})。", + "debug": "åµéŒ¯", + "info": "資訊", + "warn": "警告", + "err": "錯誤" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json index ecd8e3a4ce4..26b36bafb2e 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,8 +7,8 @@ "view": "檢視", "help": "說明", "file": "檔案", - "workspaces": "工作å€", "developer": "開發人員", + "workspaces": "工作å€", "showEditorTabs": "æŽ§åˆ¶å·²é–‹å•Ÿçš„ç·¨è¼¯å™¨æ˜¯å¦æ‡‰é¡¯ç¤ºåœ¨ç´¢å¼•標籤中。", "workbench.editor.labelFormat.default": "顯示檔案å稱。當啟用索引標籤,且åŒä¸€å€‹ç¾¤çµ„中有兩個檔案åŒå時,就會新增å„å€‹æª”æ¡ˆè·¯å¾‘å…·æœ‰è­˜åˆ¥åº¦çš„çš„å€æ®µã€‚ç•¶åœç”¨ç´¢å¼•標籤時,若編輯器在使用中,就會顯示與工作å€è³‡æ–™å¤¾ç›¸é—œçš„路徑。", "workbench.editor.labelFormat.short": "顯示檔案的å稱,並在å稱後接著該檔案的目錄å稱。", @@ -26,18 +26,16 @@ "closeOnFocusLost": "控制是å¦åœ¨ Quick Open 失去焦點時自動關閉。", "openDefaultSettings": "控制開啟設定時是å¦ä¹Ÿæœƒé–‹å•Ÿé¡¯ç¤ºæ‰€æœ‰é è¨­è¨­å®šçš„編輯器。", "sideBarLocation": "控制項資訊看æ¿çš„ä½ç½®ã€‚å¯é¡¯ç¤ºæ–¼ Workbench çš„å·¦æ–¹æˆ–å³æ–¹ã€‚", - "panelLocation": "æŽ§åˆ¶é¢æ¿çš„ä½ç½®ã€‚å…¶å¯é¡¯ç¤ºæ–¼å·¥ä½œå°åº•部或工作å°å³æ–¹ã€‚", "statusBarVisibility": "控制 Workbench 底端狀態列的å¯è¦–性。", "activityBarVisibility": "控制活動列在 workbench 中的å¯è¦‹åº¦ã€‚", "closeOnFileDelete": "æŽ§åˆ¶é¡¯ç¤ºæª”æ¡ˆçš„ç·¨è¼¯å™¨æ˜¯å¦æ‡‰åœ¨å…¶ä»–處ç†åºåˆªé™¤æˆ–釿–°å‘½å該檔案時自動關閉。若åœç”¨æ­¤é¸é …,當發生å‰è¿°ç‹€æ³æ™‚ï¼Œç·¨è¼¯å™¨æœƒä¿æŒé–‹å•Ÿï¼Œä¸¦å‘ˆç¾å·²è®Šæ›´çš„狀態。請注æ„,從應用程å¼å…§åˆªé™¤ä¸€å¾‹æœƒé—œé–‰ç·¨è¼¯å™¨ï¼Œä½†å·²è®Šæ›´çš„æª”案在資料未儲存å‰ä¸€å¾‹ä¸æœƒé—œé–‰ã€‚", - "experimentalFuzzySearchEndpoint": "表示è¦ç”¨æ–¼å¯¦é©—性設定æœå°‹çš„端點。", - "experimentalFuzzySearchKey": "表示è¦ç”¨æ–¼å¯¦é©—性設定æœå°‹çš„索引碼。", "fontAliasing": "在 Workbench 中控制字型鋸齒化的方法。- é è¨­: å­åƒç´ å­—型平滑處ç†ã€‚åœ¨å¤§éƒ¨åˆ†éž Retina 顯示器上會顯示出最銳利的文字- 已消除鋸齒: ç›¸å°æ–¼å­åƒç´ ï¼Œæ ¹æ“šåƒç´ å±¤ç´šå¹³æ»‘字型。å¯è®“字型整體顯得較細- ç„¡: åœç”¨å­—型平滑處ç†ã€‚文字會以鋸齒狀的銳邊顯示 ", "workbench.fontAliasing.default": "å­åƒç´ å­—型平滑處ç†ã€‚åœ¨å¤§éƒ¨åˆ†éž Retina 顯示器上會顯示出最銳利的文字。", "workbench.fontAliasing.antialiased": "ç›¸å°æ–¼å­åƒç´ ï¼Œæ ¹æ“šåƒç´ å±¤ç´šå¹³æ»‘字型。å¯ä»¥è®“字型整體顯得較細。", "workbench.fontAliasing.none": "ç¦ç”¨å­—體平滑.文字將會顯示鋸齒狀與鋒利的邊緣.", "swipeToNavigate": "利用三指水平撥動在開啟的檔案間ç€è¦½ã€‚", "workbenchConfigurationTitle": "工作å°", + "windowConfigurationTitle": "視窗", "window.openFilesInNewWindow.on": "檔案會在新視窗中開啟", "window.openFilesInNewWindow.off": "檔案會在開啟了檔案資料夾的視窗,或在上一個使用中的視窗中開啟", "window.openFilesInNewWindow.default": "除éžå¾žæ“´å……座或 Finder 中開啟,å¦å‰‡æª”案會在開啟了檔案資料夾的視窗,或在上一個使用中的視窗中開啟 (åƒ…é™ macOS)", @@ -69,11 +67,11 @@ "autoDetectHighContrast": "若啟用,如果 Windows ä½¿ç”¨é«˜å°æ¯”ä½ˆæ™¯ä¸»é¡Œï¼Œå°±æœƒè‡ªå‹•è®Šæ›´ç‚ºé«˜å°æ¯”ä½ˆæ™¯ä¸»é¡Œï¼Œåˆ‡æ›æŽ‰ Windows é«˜å°æ¯”佈景主題時則變更為深色佈景主題。", "titleBarStyle": "調整視窗標題列的外觀。變更需è¦å®Œæ•´é‡æ–°å•Ÿå‹•æ‰æœƒå¥—用。", "window.nativeTabs": "啟用 macOS Sierra 視窗索引標籤。請注æ„需è¦å®Œå…¨é‡æ–°å•Ÿå‹•æ‰èƒ½å¥—用變更,並且完æˆè¨­å®šå¾ŒåŽŸå§‹ç´¢å¼•æ¨™ç±¤å°‡æœƒåœç”¨è‡ªè¨‚標題列樣å¼ã€‚", - "windowConfigurationTitle": "視窗", "zenModeConfigurationTitle": "Zen Mode", "zenMode.fullScreen": "控制開啟 Zen Mode 是å¦ä¹Ÿæœƒå°‡ Workbench 轉æ›ç‚ºå…¨èž¢å¹•模å¼ã€‚", "zenMode.hideTabs": "控制開啟 Zen Mode 是å¦ä¹Ÿæœƒéš±è— Workbench 索引標籤。", "zenMode.hideStatusBar": "控制開啟 Zen Mode 是å¦ä¹Ÿæœƒéš±è— Workbench 底部的狀態列。", "zenMode.hideActivityBar": "控制開啟 Zen Mode 是å¦ä¹Ÿæœƒéš±è— Workbench 左方的活動列。", - "zenMode.restore": "控制視窗如果在 Zen Mode ä¸‹çµæŸï¼Œæ˜¯å¦æ‡‰é‚„原為 Zen Mode。" + "zenMode.restore": "控制視窗如果在 Zen Mode ä¸‹çµæŸï¼Œæ˜¯å¦æ‡‰é‚„原為 Zen Mode。", + "JsonSchema.locale": "è¦ä½¿ç”¨çš„ UI 語言。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index b1e2ccbfec4..df56cbd6f90 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -30,7 +30,6 @@ "deactivateBreakpoints": "åœç”¨ä¸­æ–·é»ž", "reapplyAllBreakpoints": "釿–°å¥—用所有中斷點", "addFunctionBreakpoint": "加入函å¼ä¸­æ–·é»ž", - "renameFunctionBreakpoint": "釿–°å‘½å函å¼ä¸­æ–·é»ž", "addConditionalBreakpoint": "新增æ¢ä»¶ä¸­æ–·é»ž...", "editConditionalBreakpoint": "編輯中斷點...", "setValue": "設定值", diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json new file mode 100644 index 00000000000..1c2b31ade44 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editConditionalBreakpoint": "編輯中斷點...", + "functionBreakpointsNotSupported": "æ­¤åµéŒ¯é¡žåž‹ä¸æ”¯æ´å‡½å¼ä¸­æ–·é»ž", + "functionBreakpointPlaceholder": "è¦ä¸­æ–·çš„函å¼", + "functionBreakPointInputAriaLabel": "輸入函å¼ä¸­æ–·é»ž" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json new file mode 100644 index 00000000000..7f2bceb1df6 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "callstackSection": "呼å«å †ç–Šå€æ®µ", + "debugStopped": "æ–¼ {0} æš«åœ", + "callStackAriaLabel": "åµéŒ¯å‘¼å«å †ç–Š", + "process": "處ç†åº", + "paused": "已暫åœ", + "running": "正在執行", + "thread": "執行緒", + "pausedOn": "æ–¼ {0} æš«åœ", + "loadMoreStackFrames": "載入更多堆疊框架", + "threadAriaLabel": "執行緒 {0},呼å«å †ç–Šï¼ŒåµéŒ¯", + "stackFrameAriaLabel": "堆疊框架 {0} 第 {1} {2} 行,呼å«å †ç–Šï¼ŒåµéŒ¯" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index cdb820233a1..ff4a8ed693f 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,5 +20,6 @@ "openExplorerOnEnd": "自動於åµéŒ¯å·¥ä½œéšŽæ®µçµæŸæ™‚開啟總管檢視", "inlineValues": "在åµéŒ¯æ™‚於編輯器以內嵌方å¼é¡¯ç¤ºè®Šæ•¸å€¼", "hideActionBar": "æŽ§åˆ¶æ˜¯å¦æ‡‰éš±è—浮點åµéŒ¯å‹•作列", + "showInStatusBar": "控制何時應該顯示åµéŒ¯ç‹€æ…‹åˆ—", "launch": "全域åµéŒ¯å•Ÿå‹•組態。應當åšåœ¨å·¥ä½œå€ä¹‹é–“共用的 'launch.json' 替代方案使用" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index c0721bb661f..4a1b22f7293 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,6 @@ "breakpointAdded": "已新增中斷點,行 {0},檔案 {1}", "breakpointRemoved": "已移除中斷點,行 {0},檔案 {1}", "compoundMustHaveConfigurations": "複åˆå¿…須設有 \"configurations\" 屬性,æ‰èƒ½å•Ÿå‹•多個組態。", - "configMissing": "'launch.json' ä¸­éºæ¼çµ„æ…‹ '{0}'。", "debugRequestNotSupported": "在é¸å–çš„åµéŒ¯çµ„態中,屬性 `{0}` å…·æœ‰ä¸æ”¯æ´çš„值 '{1}'。", "debugRequesMissing": "所é¸çš„åµéŒ¯çµ„æ…‹éºæ¼å±¬æ€§ '{0}'。", "debugTypeNotSupported": "䏿”¯æ´è¨­å®šçš„åµéŒ¯é¡žåž‹ '{0}'。", diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json new file mode 100644 index 00000000000..f122e5bf3ba --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "è®Šæ•¸å€æ®µ", + "variablesAriaTreeLabel": "åµéŒ¯è®Šæ•¸", + "variableValueAriaLabel": "輸入新的變數值", + "variableScopeAriaLabel": "ç¯„åœ {0},變數,åµéŒ¯", + "variableAriaLabel": "{0} 值 {1},變數,åµéŒ¯" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json new file mode 100644 index 00000000000..1a7c7ce2534 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expressionsSection": "é‹ç®—å¼å€æ®µ", + "watchAriaTreeLabel": "å°ç›£çœ‹é‹ç®—å¼åŸ·è¡ŒåµéŒ¯", + "watchExpressionPlaceholder": "è¦ç›£çœ‹çš„é‹ç®—å¼", + "watchExpressionInputAriaLabel": "輸入監看é‹ç®—å¼", + "watchExpressionAriaLabel": "{0} 值 {1},監看å¼ï¼ŒåµéŒ¯", + "watchVariableAriaLabel": "{0} 值 {1},監看å¼ï¼ŒåµéŒ¯" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 9d0f768770d..82e9231c633 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,9 +6,11 @@ { "name": "延伸模組å稱", "extension id": "延伸模組識別碼", + "preview": "é è¦½", "publisher": "發行者å稱", "install count": "安è£è¨ˆæ•¸", "rating": "è©•ç­‰", + "repository": "儲存庫", "license": "授權", "details": "詳細資料", "contributions": "è²¢ç»", diff --git a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 237dad58880..c246b7bb253 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -10,16 +10,12 @@ "Uninstalling": "正在解除安è£", "updateAction": "æ›´æ–°", "updateTo": "更新至 {0}", - "enableForWorkspaceAction.label": "啟用 (工作å€)", - "enableAlwaysAction.label": "啟用 (æ°¸é )", - "disableForWorkspaceAction.label": "åœç”¨ (工作å€)", - "disableAlwaysAction.label": "åœç”¨ (æ°¸é )", "ManageExtensionAction.uninstallingTooltip": "正在解除安è£", - "enableForWorkspaceAction": "工作å€", - "enableGloballyAction": "æ°¸é ", + "enableForWorkspaceAction": "啟用 (工作å€)", + "enableGloballyAction": "啟用", "enableAction": "啟用", - "disableForWorkspaceAction": "工作å€", - "disableGloballyAction": "æ°¸é ", + "disableForWorkspaceAction": "åœç”¨ (工作å€)", + "disableGloballyAction": "åœç”¨", "disableAction": "åœç”¨", "checkForUpdates": "æŸ¥çœ‹æ˜¯å¦æœ‰æ›´æ–°", "enableAutoUpdate": "啟用自動更新延伸模組", @@ -47,11 +43,8 @@ "allExtensionsInstalled": "所有建議此工作å€ä½¿ç”¨çš„延伸模組皆已安è£", "installRecommendedExtension": "安è£å»ºè­°çš„æ“´å……功能", "extensionInstalled": "建議的延伸模組已安è£", - "showRecommendedKeymapExtensions": "顯示建議的按éµå°æ‡‰", "showRecommendedKeymapExtensionsShort": "按éµå°æ‡‰", - "showLanguageExtensions": "顯示語言擴充功能", "showLanguageExtensionsShort": "語言擴充功能", - "showAzureExtensions": "顯示 Azure 延伸模組", "showAzureExtensionsShort": "Azure 延伸模組", "OpenExtensionsFile.failed": "無法在 '.vscode' 資料夾 ({0}) 中建立 'extensions.json' 檔案。", "configureWorkspaceRecommendedExtensions": "設定建議的延伸模組 (工作å€)", diff --git a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index c0f0b827558..67a25ef1452 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -9,7 +9,7 @@ "extension": "擴充功能", "extensions": "擴充功能", "view": "檢視", + "developer": "開發人員", "extensionsConfigurationTitle": "擴充功能", - "extensionsAutoUpdate": "自動更新擴充功能", - "extensionsIgnoreRecommendations": "忽略延伸模組建議" + "extensionsAutoUpdate": "自動更新擴充功能" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json new file mode 100644 index 00000000000..8ab5d602c3a --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reportExtensionIssue": "回報å•題" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/fileActions.i18n.json index 61b98653e60..c32641ccebc 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/fileActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -69,5 +69,7 @@ "invalidFileNameError": "å稱 **{0}** ä¸èƒ½ä½œç‚ºæª”案或資料夾åç¨±ã€‚è«‹é¸æ“‡ä¸åŒçš„å稱。", "filePathTooLongError": "å稱 **{0}** å°Žè‡´è·¯å¾‘å¤ªé•·ã€‚è«‹é¸æ“‡è¼ƒçŸ­çš„å稱。", "compareWithSaved": "比較使用中的檔案和已儲存的檔案", - "modifiedLabel": "{0} (在ç£ç¢Ÿä¸Š) ↔ {1}" + "modifiedLabel": "{0} (在ç£ç¢Ÿä¸Š) ↔ {1}", + "compareWithClipboard": "比較使用中的檔案和剪貼簿的檔案", + "clipboardComparisonLabel": "剪貼簿 ↔ {0}" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json b/i18n/cht/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json new file mode 100644 index 00000000000..6b1bbe9a3d6 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "folders": "資料夾" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json new file mode 100644 index 00000000000..8edf8023225 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "檔案", + "revealInSideBar": "在æè¦æ¬„ä½ä¸­é¡¯ç¤º", + "acceptLocalChanges": "使用您的變更並覆寫ç£ç¢Ÿå…§å®¹ ", + "revertLocalChanges": "æ¨æ£„您的變更並還原æˆç£ç¢Ÿä¸Šçš„內容" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/cht/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json new file mode 100644 index 00000000000..c32641ccebc --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "é‡è©¦", + "rename": "釿–°å‘½å", + "newFile": "新增檔案", + "newFolder": "新增資料夾", + "openFolderFirst": "先開啟資料夾,以在其中建立檔案或資料夾。", + "newUntitledFile": "æ–°å¢žæœªå‘½åæª”案", + "createNewFile": "新增檔案", + "createNewFolder": "新增資料夾", + "deleteButtonLabelRecycleBin": "移至資æºå›žæ”¶ç­’(&&M)", + "deleteButtonLabelTrash": "移至垃圾筒(&&M)", + "deleteButtonLabel": "刪除(&&D)", + "dirtyMessageFolderOneDelete": "您è¦åˆªé™¤çš„資料夾中 1 個檔案有未儲存的變更。è¦ç¹¼çºŒå—Ž?", + "dirtyMessageFolderDelete": "您è¦åˆªé™¤çš„資料夾中 {0} 個檔案有未儲存的變更。è¦ç¹¼çºŒå—Ž?", + "dirtyMessageFileDelete": "您è¦åˆªé™¤çš„æª”案有未儲存的變更。è¦ç¹¼çºŒå—Ž?", + "dirtyWarning": "如果您ä¸å„²å­˜è®Šæ›´ï¼Œé€™äº›è®Šæ›´å°‡æœƒéºå¤±ã€‚", + "confirmMoveTrashMessageFolder": "您確定è¦åˆªé™¤ '{0}' åŠå…¶å…§å®¹å—Ž?", + "confirmMoveTrashMessageFile": "您確定è¦åˆªé™¤ '{0}' å—Ž?", + "undoBin": "您å¯ä»¥å¾žè³‡æºå›žæ”¶ç­’還原。", + "undoTrash": "您å¯ä»¥å¾žåžƒåœ¾ç­’還原。", + "doNotAskAgain": "ä¸è¦å†è©¢å•我", + "confirmDeleteMessageFolder": "æ‚¨ç¢ºå®šè¦æ°¸ä¹…刪除 '{0}' 和其中的內容嗎?", + "confirmDeleteMessageFile": "æ‚¨ç¢ºå®šè¦æ°¸ä¹…刪除 '{0}' å—Ž?", + "irreversible": "此動作無法回復!", + "permDelete": "永久刪除", + "delete": "刪除", + "importFiles": "匯入檔案", + "confirmOverwrite": "目的資料夾中已有åŒå的檔案或資料夾。è¦å–代它嗎?", + "replaceButtonLabel": "å–代(&&R)", + "copyFile": "複製", + "pasteFile": "貼上", + "duplicateFile": "複製", + "openToSide": "開至å´é‚Š", + "compareSource": "é¸å–用以比較", + "globalCompareFile": "使用中檔案的比較å°è±¡...", + "openFileToCompare": "先開啟檔案以與其他檔案進行比較", + "compareWith": "比較 '{0}' 與 '{1}'", + "compareFiles": "比較檔案", + "refresh": "釿–°æ•´ç†", + "save": "儲存", + "saveAs": "å¦å­˜æ–°æª”...", + "saveAll": "全部儲存", + "saveAllInGroup": "全部儲存在群組中", + "saveFiles": "儲存所有檔案", + "revert": "還原檔案", + "focusOpenEditors": "èšç„¦åœ¨ [開放å¼ç·¨è¼¯å™¨] 檢視", + "focusFilesExplorer": "將焦點設在檔案總管上", + "showInExplorer": "在æè¦æ¬„ä½ä¸­é¡¯ç¤ºä½¿ç”¨ä¸­çš„æª”案", + "openFileToShow": "先開啟檔案,以在總管中加以顯示", + "collapseExplorerFolders": "摺疊 Explorer 中的資料夾", + "refreshExplorer": "釿–°æ•´ç† Explorer", + "openFileInNewWindow": "在新視窗中開啟使用中的檔案", + "openFileToShowInNewWindow": "先開啟檔案以在新視窗中開啟", + "revealInWindows": "在檔案總管中顯示", + "revealInMac": "在 Finder 中顯示", + "openContainer": "開啟收ç´è³‡æ–™å¤¾", + "revealActiveFileInWindows": "在 Windows 檔案總管中顯示使用中的檔案", + "revealActiveFileInMac": "在 Finder 中顯示使用中的檔案", + "openActiveFileContainer": "開啟使用中檔案的收ç´è³‡æ–™å¤¾", + "copyPath": "複製路徑", + "copyPathOfActive": "複製使用中檔案的路徑", + "emptyFileNameError": "å¿…é ˆæä¾›æª”案或資料夾å稱。", + "fileNameExistsError": "這個ä½ç½®å·²å­˜åœ¨æª”案或資料夾 **{0}**ã€‚è«‹é¸æ“‡ä¸åŒçš„å稱。", + "invalidFileNameError": "å稱 **{0}** ä¸èƒ½ä½œç‚ºæª”案或資料夾åç¨±ã€‚è«‹é¸æ“‡ä¸åŒçš„å稱。", + "filePathTooLongError": "å稱 **{0}** å°Žè‡´è·¯å¾‘å¤ªé•·ã€‚è«‹é¸æ“‡è¼ƒçŸ­çš„å稱。", + "compareWithSaved": "比較使用中的檔案和已儲存的檔案", + "modifiedLabel": "{0} (在ç£ç¢Ÿä¸Š) ↔ {1}", + "compareWithClipboard": "比較使用中的檔案和剪貼簿的檔案", + "clipboardComparisonLabel": "剪貼簿 ↔ {0}" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/cht/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json new file mode 100644 index 00000000000..75bdd951541 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "先開啟檔案以複製其路徑", + "openFileToReveal": "先開啟檔案以顯示" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json new file mode 100644 index 00000000000..867d603ca56 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "顯示檔案總管", + "explore": "檔案總管", + "view": "檢視", + "textFileEditor": "文字檔編輯器", + "binaryFileEditor": "äºŒé€²ä½æª”案編輯器", + "filesConfigurationTitle": "檔案", + "exclude": "設定 Glob 模å¼ï¼Œä»¥æŽ’除檔案åŠè³‡æ–™å¤¾ã€‚例如,檔案總管會根據此項設定,判斷何種檔案和資料夾該顯示或隱è—。", + "files.exclude.boolean": "è¦ç¬¦åˆæª”案路徑的 Glob 模å¼ã€‚設為 True 或 False å¯å•Ÿç”¨æˆ–åœç”¨æ¨¡å¼ã€‚", + "files.exclude.when": "在相符檔案åŒå±¤ç´šä¸Šé¡å¤–的檢查。請使用 $(basename) 作為相符檔案å稱的變數。", + "associations": "將檔案關è¯è¨­å®šç‚ºèªžè¨€ (例如 \"*.extension\": \"html\")。這些語言優先於已安è£èªžè¨€çš„é è¨­é—œè¯ã€‚", + "encoding": "在讀å–和寫入檔案時è¦ä½¿ç”¨çš„é è¨­å­—å…ƒé›†ç·¨ç¢¼ã€‚æ­¤é …è¨­å®šä¹Ÿå¯æ ¹æ“šæ¯å€‹èªžè¨€åŠ ä»¥è¨­å®šã€‚", + "autoGuessEncoding": "ç•¶å•Ÿç”¨æ­¤åŠŸèƒ½æ™‚ï¼Œæœƒå˜—è©¦åœ¨é–‹å•Ÿæª”æ¡ˆæ™‚æŽ¨æ¸¬å­—å…ƒé›†ç·¨ç¢¼ã€‚æ­¤é …è¨­å®šä¹Ÿå¯æ ¹æ“šæ¯å€‹èªžè¨€åŠ ä»¥è¨­å®šã€‚", + "eol": "é è¨­çµå°¾æ–·è¡Œå­—å…ƒ.LF使用 \\n , CRLF使用\\r\\n ", + "trimTrailingWhitespace": "若啟用,將在儲存檔案時修剪尾端空白。", + "insertFinalNewline": "啟用時,請在儲存檔案時在其çµå°¾æ’入最後一個新行。", + "trimFinalNewlines": "若啟用,則會在儲存檔案時,修剪檔案末新行尾的所有新行。", + "files.autoSave.off": "å·²è®Šæ›´çš„æª”æ¡ˆä¸€å¾‹ä¸æœƒè‡ªå‹•儲存。", + "files.autoSave.afterDelay": "已變更的檔案會在設定的 'files.autoSaveDelay' 之後自動儲存。", + "files.autoSave.onFocusChange": "已變更的檔案會在編輯器失去焦點時自動儲存。", + "files.autoSave.onWindowChange": "已變更的檔案會在視窗失去焦點時自動儲存。", + "autoSave": "控制已變更之檔案的自動儲存。接å—的值: '{0}'ã€'{1}ã€'{2}' (編輯器失去焦點)ã€'{3}' (視窗失去焦點)。若設為 '{4}',å¯ä»¥åœ¨ \"files.autoSaveDelay\" 中設定延é²ã€‚", + "autoSaveDelay": "控制è¦è‡ªå‹•儲存已變更之檔案å‰å¿…須經éŽçš„延鲿™‚é–“ (毫秒)。僅當 'files.autoSave' 設為 \"{0}\" 時æ‰é©ç”¨ã€‚", + "watcherExclude": "設定檔案路徑的 Glob 模å¼å·²å°‡å…¶è‡ªæª”案監看排除。模å¼å¿…須符åˆçµ•å°è·¯å¾‘ (例如使用 ** 或完整路徑å‰ç½®è©žä»¥æ­£ç¢ºç›¸ç¬¦)ã€‚å¿…é ˆå…ˆé‡æ–°é–‹æ©Ÿæ‰èƒ½è®Šæ›´é€™é …設定。若是發生 Code 在啟動時å–ç”¨å¤§é‡ CPU 時間的情æ³ï¼Œå¯ä»¥æŽ’除較大的資料夾以é™ä½Žèµ·å§‹è² è¼‰ã€‚", + "hotExit.off": "åœç”¨ Hot Exit。", + "hotExit.onExit": "Hot Exit å°‡æœƒåœ¨é—œé–‰æ‡‰ç”¨ç¨‹å¼æ™‚觸發,也就是在 Windows/Linux 上關閉上一個視窗,或是觸發 workbench.action.quit 命令 (命令鏿“‡å€ã€æŒ‰éµç¹«çµé—œä¿‚ã€åŠŸèƒ½è¡¨) 時觸發。具有備份的所有視窗都會在下次啟動時還原。", + "hotExit.onExitAndWindowClose": "當應用程å¼é—œé–‰æ™‚會觸發 Hot Exit,也就是說,當在 Windows/Linux 上關閉最後一個視窗,或是觸發 workbench.action.quit 命令 (命令鏿“‡å€ã€æŒ‰éµç¹«çµé—œä¿‚åŠåŠŸèƒ½è¡¨) æ™‚æœƒè§¸ç™¼ï¼ŒåŒæ™‚也é‡å°æ‰€æœ‰é–‹å•Ÿè³‡æ–™å¤¾çš„視窗,ä¸è«–其是å¦ç‚ºæœ€å¾Œä¸€å€‹è¦–窗也會觸發。下次啟動時會還原所有未開啟資料夾的視窗。若è¦å°‡è³‡æ–™å¤¾è¦–窗還原到關機å‰çš„狀態,請將 \"window.restoreWindows\" 設定為 \"all\"。", + "hotExit": "控制是å¦è®“ä¸åŒå·¥ä½œéšŽæ®µè¨˜ä½æœªå„²å­˜çš„æª”案,並å…è¨±åœ¨çµæŸç·¨è¼¯å™¨æ™‚è·³éŽå„²å­˜æç¤ºã€‚", + "useExperimentalFileWatcher": "使用新的實驗性檔案監看員。", + "defaultLanguage": "指派給新檔案的é è¨­èªžè¨€æ¨¡å¼ã€‚", + "editorConfigurationTitle": "編輯器", + "formatOnSave": "在儲存時設定檔案格å¼ã€‚æ ¼å¼å™¨å¿…須處於å¯ç”¨ç‹€æ…‹ã€æª”案ä¸å¾—自動儲存,且編輯器ä¸å¾—關機。", + "explorerConfigurationTitle": "檔案總管", + "openEditorsVisible": "[開放å¼ç·¨è¼¯å™¨] 窗格中顯示的編輯器數目。將其設定為 0 以隱è—窗格。", + "dynamicHeight": "控制 [開放å¼ç·¨è¼¯å™¨] 倿®µçš„é«˜åº¦æ˜¯å¦æ‡‰ä¾å…ƒç´ æ•¸ç›®å‹•態調整。", + "autoReveal": "控制總管是å¦åœ¨é–‹å•Ÿæª”案時自動加以顯示åŠé¸å–。", + "enableDragAndDrop": "æŽ§åˆ¶ç¸½ç®¡æ˜¯å¦æ‡‰è©²å…許é€éŽæ‹–放功能移動檔案和資料夾。", + "confirmDragAndDrop": "控制總管是å¦é ˆè¦æ±‚確èªï¼Œä»¥é€éŽæ‹–放來移動檔案和資料夾。", + "confirmDelete": "控制總管是å¦é ˆåœ¨é€éŽåžƒåœ¾æ¡¶åˆªé™¤æª”æ¡ˆæ™‚è¦æ±‚確èªã€‚", + "sortOrder.default": "檔案與資料夾會ä¾ç…§å稱以字æ¯é †åºæŽ’åºã€‚資料夾會顯示在檔案å‰ã€‚", + "sortOrder.mixed": "檔案與資料夾會ä¾ç…§å稱以字æ¯é †åºæŽ’åºã€‚檔案與資料夾會交錯排列。", + "sortOrder.filesFirst": "檔案與資料夾會ä¾ç…§å稱以字æ¯é †åºæŽ’åºã€‚檔案會顯示在資料夾å‰ã€‚", + "sortOrder.type": "檔案與資料夾會ä¾ç…§å»¶ä¼¸æ¨¡çµ„以字æ¯é †åºæŽ’åºã€‚資料夾會顯示在檔案å‰ã€‚", + "sortOrder.modified": "檔案與資料夾會ä¾ç…§æœ€å¾Œä¿®æ”¹æ—¥æœŸä»¥å­—æ¯é †åºæŽ’åºã€‚資料夾會顯示在檔案å‰ã€‚", + "sortOrder": "控制檔案與資料夾在總管中的排列順åºã€‚除了é è¨­æŽ’åºå¤–,您也å¯ä»¥å°‡é †åºè¨­å®šç‚º 'mixed' (檔案與資料夾)ã€'type' (便ª”案類型)ã€'modified' (便œ€å¾Œä¿®æ”¹æ—¥æœŸ) 或 'filesFirst' (將檔案排åºåœ¨è³‡æ–™å¤¾å‰)。", + "explorer.decorations.colors": "控制檔案è£é£¾æ˜¯å¦é ˆä½¿ç”¨è‰²å½©ã€‚", + "explorer.decorations.badges": "控制檔案è£é£¾æ˜¯å¦é ˆä½¿ç”¨å¾½ç« ã€‚" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/cht/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json new file mode 100644 index 00000000000..7a6f0b075f7 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "userGuide": "åœ¨å³æ–¹ä½¿ç”¨ç·¨è¼¯å™¨å·¥å…·åˆ—中的動作來 **復原** 您的變更,或以您的變更 **覆寫** ç£ç¢Ÿä¸Šçš„內容", + "discard": "æ¨æ£„", + "overwrite": "覆寫", + "retry": "é‡è©¦", + "readonlySaveError": "無法儲存 '{0}': 檔案有防寫ä¿è­·ã€‚è«‹é¸å– [覆寫] 以移除ä¿è­·ã€‚", + "genericSaveError": "無法儲存 '{0}': {1}", + "staleSaveError": "無法儲存 '{0}': ç£ç¢Ÿä¸Šçš„內容較新。請按一下 [比較],比較您的版本與ç£ç¢Ÿä¸Šçš„版本。", + "compareChanges": "比較", + "saveConflictDiffLabel": "{0} (使–¼ç£ç¢Ÿ) ↔ {1} (在 {2} 中) - 解決儲存è¡çª" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json new file mode 100644 index 00000000000..39ac1f09ad1 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "沒有開啟的資料夾", + "explorerSection": "æª”æ¡ˆç¸½ç®¡å€æ®µ", + "noWorkspaceHelp": "您尚未將資料夾新增至工作å€ã€‚", + "addFolder": "新增資料夾", + "noFolderHelp": "您尚未開啟資料夾。", + "openFolder": "開啟資料夾" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json new file mode 100644 index 00000000000..a90bd78ed07 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label": "檔案總管", + "canNotResolve": "無法解æžå·¥ä½œå€è³‡æ–™å¤¾" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json b/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json new file mode 100644 index 00000000000..9b7a2b36138 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "æª”æ¡ˆç¸½ç®¡å€æ®µ", + "treeAriaLabel": "檔案總管" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json new file mode 100644 index 00000000000..bc42ca6193f --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "輸入檔案å稱。請按 Enter éµç¢ºèªæˆ–按 Esc éµå–消。", + "filesExplorerViewerAriaLabel": "{0},檔案總管", + "dropFolders": "è¦åœ¨å·¥ä½œå€æ–°å¢žè³‡æ–™å¤¾å—Ž?", + "dropFolder": "è¦åœ¨å·¥ä½œå€æ–°å¢žè³‡æ–™å¤¾å—Ž?", + "addFolders": "新增資料夾(&A)", + "addFolder": "新增資料夾(&A)", + "confirmMove": "確定è¦ç§»å‹• '{0}' å—Ž?", + "doNotAskAgain": "ä¸è¦å†è©¢å•我", + "moveButtonLabel": "移動(&&M)", + "confirmOverwriteMessage": "目的資料夾中已存在 '{0}'。è¦å–代它嗎?", + "irreversible": "此動作無法回復!", + "replaceButtonLabel": "å–代(&&R)" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json b/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json new file mode 100644 index 00000000000..b48ed12d518 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "已開啟的編輯器", + "openEditosrSection": "開放å¼ç·¨è¼¯å™¨å€æ®µ", + "dirtyCounter": "{0} 未儲存", + "saveAll": "全部儲存", + "closeAllUnmodified": "關閉未變更的檔案", + "closeAll": "全部關閉", + "compareWithSaved": "與已儲存的檔案比較", + "close": "關閉", + "closeOthers": "關閉其他" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json b/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json new file mode 100644 index 00000000000..f93f9a1f277 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0},編輯器群組", + "openEditorAriaLabel": "{0},開啟編輯器", + "saveAll": "全部儲存", + "closeAllUnmodified": "關閉未變更的檔案", + "closeAll": "全部關閉", + "compareWithSaved": "與已儲存的檔案比較", + "close": "關閉", + "closeOthers": "關閉其他" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/cht/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/cht/src/vs/workbench/parts/markers/common/messages.i18n.json index 2871ecef610..af077309e72 100644 --- a/i18n/cht/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,8 +6,6 @@ { "viewCategory": "檢視", "problems.view.toggle.label": "切æ›å•題", - "problems.view.show.label": "顯示å•題", - "problems.view.hide.label": "éš±è—å•題", "problems.panel.configuration.title": "[å•題] 檢視", "problems.panel.configuration.autoreveal": "控制 [å•題] æª¢è¦–æ˜¯å¦æ‡‰è‡ªå‹•在開啟檔案時加以顯示", "markers.panel.title.problems": "å•題", diff --git a/i18n/cht/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json b/i18n/cht/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json new file mode 100644 index 00000000000..7f9c895661a --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "prof.message": "å·²æˆåŠŸå»ºç«‹è¨­å®šæª”ã€‚", + "prof.detail": "請建立å•題,並手動附加下列檔案:\n{0}", + "prof.restartAndFileIssue": "建立å•é¡Œä¸¦é‡æ–°å•Ÿå‹•", + "prof.restart": "釿–°å•Ÿå‹•", + "prof.thanks": "æ„Ÿè¬æ‚¨çš„å”助", + "prof.detail.restart": "需è¦é‡æ–°å•Ÿå‹•æ‰èƒ½å¤ ç¹¼çºŒä½¿ç”¨'{0}‘.冿¬¡æ„Ÿè¬æ‚¨çš„回饋." +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index c37842d3718..1d840c42cf9 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defineKeybinding.initial": "按下所需按éµçµ„åˆåŠ ENTER。ESCAPE å¯å–消。", "defineKeybinding.chordsTo": "åŒæ­¥åˆ°" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index 45b8b75fa83..0db1b09d33b 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -26,6 +26,7 @@ "editKeybindingLabel": "變更按éµç¹«çµé—œä¿‚", "addKeybindingLabelWithKey": "新增按éµç¹«çµé—œä¿‚ {0}", "addKeybindingLabel": "新增按éµç¹«çµé—œä¿‚", + "title": "{0} ({1})", "commandAriaLabel": "命令為 {0}。", "keybindingAriaLabel": "按éµç¹«çµé—œä¿‚為 {0}。", "noKeybinding": "未指派任何按éµç¹«çµé—œä¿‚。", diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 175a2c3161c..1b98a0d9db9 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -7,12 +7,12 @@ "settingsEditorName": "é è¨­è¨­å®š", "SearchSettingsWidget.AriaLabel": "æœå°‹è¨­å®š", "SearchSettingsWidget.Placeholder": "æœå°‹è¨­å®š", - "totalSettingsMessage": "å…± {0} 項設定", "noSettingsFound": "æ²’æœ‰çµæžœ", "oneSettingFound": "1 項相符設定", "settingsFound": "{0} 項相符設定", - "fileEditorWithInputAriaLabel": "{0}。文字檔編輯器。", - "fileEditorAriaLabel": "文字檔編輯器。", + "totalSettingsMessage": "å…± {0} 項設定", + "defaultSettings": "é è¨­è¨­å®š", + "defaultFolderSettings": "é è¨­è³‡æ–™å¤¾è¨­å®š", "defaultEditorReadonly": "åœ¨å³æ–¹ç·¨è¼¯å™¨ä¸­ç·¨è¼¯ä»¥è¦†å¯«é è¨­ã€‚", "preferencesAriaLabel": "é è¨­å–œå¥½è¨­å®šã€‚唯讀文字編輯器。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 194d1e8d514..d1713dc3e87 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -7,8 +7,6 @@ "emptyUserSettingsHeader": "將您的設定放置在此以覆寫é è¨­è¨­å®šã€‚", "emptyWorkspaceSettingsHeader": "將您的設定放置在此以覆寫使用者設定。", "emptyFolderSettingsHeader": "將您的資料夾設定放置在此以覆寫工作å€è¨­å®šçš„資料夾設定。", - "defaultFolderSettingsTitle": "é è¨­è³‡æ–™å¤¾è¨­å®š", - "defaultSettingsTitle": "é è¨­è¨­å®š", "editTtile": "編輯", "replaceDefaultValue": "在設定中å–代", "copyDefaultValue": "複製到設定", diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index 6fc789518cb..5c3acf7c7d6 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultSettingsFuzzyPrompt": "嘗試模糊æœå°‹!", "defaultSettings": "å°‡æ‚¨çš„è¨­å®šæ”¾ç½®æ–¼å³æ–¹ç·¨è¼¯å™¨ä¸­ä»¥è¦†å¯«ã€‚", "noSettingsFound": "找ä¸åˆ°ä»»ä½•設定。", - "folderSettingsDetails": "資料夾設定", - "enableFuzzySearch": "啟用實驗性模糊æœå°‹" + "settingsSwitcherBarAriaLabel": "設定切æ›å™¨", + "userSettings": "使用者設定", + "workspaceSettings": "工作å€è¨­å®š", + "folderSettings": "資料夾設定" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json new file mode 100644 index 00000000000..978ee42a36c --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "é è¨­å–œå¥½è¨­å®šç·¨è¼¯å™¨", + "keybindingsEditor": "按éµç¹«çµé—œä¿‚編輯器", + "preferences": "喜好設定" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json index e0a612882ae..72f9807aa29 100644 --- a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -6,7 +6,6 @@ { "scm providers": "原始檔控制æä¾›è€…", "hideRepository": "éš±è—", - "commitMessage": "Message (press {0} to commit)", "installAdditionalSCMProviders": "安è£é¡å¤–SCMæä¾›è€…...", "no open repo": "沒有使用中的原始檔控制æä¾›è€…。", "source control": "原始檔控制", diff --git a/i18n/cht/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/cht/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index 0fef2dc733f..d463f62a841 100644 --- a/i18n/cht/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defaultLabel": "輸入", - "useIgnoreFilesDescription": "使用忽略檔案", - "useExcludeSettingsDescription": "使用排除設定" + "useExcludesAndIgnoreFilesDescription": "使用排除設定與忽略檔案" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/search/browser/search.contribution.i18n.json index 2192cc5b3fe..2737e83ab4e 100644 --- a/i18n/cht/src/vs/workbench/parts/search/browser/search.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -16,7 +16,6 @@ "exclude.boolean": "è¦ç¬¦åˆæª”案路徑的 Glob 模å¼ã€‚設為 True 或 False å¯å•Ÿç”¨æˆ–åœç”¨æ¨¡å¼ã€‚", "exclude.when": "在相符檔案åŒå±¤ç´šä¸Šé¡å¤–的檢查。請使用 $(basename) 作為相符檔案å稱的變數。", "useRipgrep": "控制是å¦è¦åœ¨æ–‡å­—和檔案æœå°‹ä¸­ä½¿ç”¨ ripgrep", - "useIgnoreFilesByDefault": "控制在新的工作å€ä¸­æœå°‹æ–‡å­—時,是å¦è¦æ ¹æ“šé è¨­ä½¿ç”¨ .gitignore åŠ .ignore 檔案。 ", "useIgnoreFiles": "控制在æœå°‹æª”案時,是å¦è¦ä½¿ç”¨ .gitignore åŠ .ignore 檔案。 ", "search.quickOpen.includeSymbols": "設定以將全域符號æœå°‹çš„çµæžœç´å…¥ Quick Open çš„æª”æ¡ˆçµæžœä¸­ã€‚", "search.followSymlinks": "控制是å¦è¦åœ¨æœå°‹æ™‚éµå¾ª symlink。" diff --git a/i18n/cht/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/cht/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 010379cf8d2..551008efc78 100644 --- a/i18n/cht/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -10,17 +10,14 @@ "previousSearchExcludePattern": "顯示上一個æœå°‹æŽ’除模å¼", "nextSearchTerm": "顯示下一個æœå°‹å­—詞", "previousSearchTerm": "顯示上一個æœå°‹å­—詞", - "focusNextInputBox": "èšç„¦æ–¼ä¸‹ä¸€å€‹è¼¸å…¥æ–¹å¡Š", - "focusPreviousInputBox": "èšç„¦æ–¼ä¸Šä¸€å€‹è¼¸å…¥æ–¹å¡Š", "showSearchViewlet": "顯示æœå°‹", "findInFiles": "在檔案中尋找", "findInFilesWithSelectedText": "在檔案中尋找é¸å–的文字 ", "replaceInFiles": "檔案中å–代", "replaceInFilesWithSelectedText": "在檔案中å–代為é¸å–的文字", - "findInWorkspace": "在工作å€ä¸­å°‹æ‰¾...", - "findInFolder": "在資料夾中尋找...", "RefreshAction.label": "釿–°æ•´ç†", - "ClearSearchResultsAction.label": "清除æœå°‹çµæžœ", + "CollapseDeepestExpandedLevelAction.label": "全部摺疊", + "ClearSearchResultsAction.label": "清除", "FocusNextSearchResult.label": "èšç„¦æ–¼ä¸‹ä¸€å€‹æœå°‹çµæžœ", "FocusPreviousSearchResult.label": "èšç„¦æ–¼ä¸Šä¸€å€‹æœå°‹çµæžœ", "RemoveAction.label": "關閉", diff --git a/i18n/cht/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json new file mode 100644 index 00000000000..2737e83ab4e --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "å‰å¾€å·¥ä½œå€ä¸­çš„符號...", + "name": "æœå°‹", + "search": "æœå°‹", + "view": "檢視", + "openAnythingHandlerDescription": "å‰å¾€æª”案", + "openSymbolDescriptionNormal": "å‰å¾€å·¥ä½œå€ä¸­çš„符號", + "searchOutputChannelTitle": "æœå°‹", + "searchConfigurationTitle": "æœå°‹", + "exclude": "設定 Glob 模å¼ï¼Œä»¥æŽ’除ä¸è¦æœå°‹çš„æª”案åŠè³‡æ–™å¤¾ã€‚請從 file.exclude 設定繼承所有的 Glob 模å¼ã€‚", + "exclude.boolean": "è¦ç¬¦åˆæª”案路徑的 Glob 模å¼ã€‚設為 True 或 False å¯å•Ÿç”¨æˆ–åœç”¨æ¨¡å¼ã€‚", + "exclude.when": "在相符檔案åŒå±¤ç´šä¸Šé¡å¤–的檢查。請使用 $(basename) 作為相符檔案å稱的變數。", + "useRipgrep": "控制是å¦è¦åœ¨æ–‡å­—和檔案æœå°‹ä¸­ä½¿ç”¨ ripgrep", + "useIgnoreFiles": "控制在æœå°‹æª”案時,是å¦è¦ä½¿ç”¨ .gitignore åŠ .ignore 檔案。 ", + "search.quickOpen.includeSymbols": "設定以將全域符號æœå°‹çš„çµæžœç´å…¥ Quick Open çš„æª”æ¡ˆçµæžœä¸­ã€‚", + "search.followSymlinks": "控制是å¦è¦åœ¨æœå°‹æ™‚éµå¾ª symlink。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/cht/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json new file mode 100644 index 00000000000..9ad25ceb576 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "findInFolder": "在資料夾中尋找...", + "findInWorkspace": "在工作å€ä¸­å°‹æ‰¾..." +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 0e7261b9d39..9ec03d55932 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -6,10 +6,9 @@ { "tasksCategory": "工作", "ConfigureTaskRunnerAction.label": "設定工作", - "ConfigureBuildTaskAction.label": "設定建置工作", "CloseMessageAction.label": "關閉", - "ShowTerminalAction.label": "檢視終端機", "problems": "å•題", + "building": "建置中...", "manyMarkers": "99+", "runningTasks": "顯示執行中的工作", "tasks": "工作", @@ -52,7 +51,6 @@ "TaslService.noEntryToRun": "找ä¸åˆ°ä»»ä½•è¦åŸ·è¡Œçš„工作。請設定工作...", "TaskService.fetchingBuildTasks": "正在擷å–組建工作...", "TaskService.pickBuildTask": "è«‹é¸å–è¦åŸ·è¡Œçš„組建工作", - "TaskService.noBuildTask": "找ä¸åˆ°ä»»ä½•è¦åŸ·è¡Œçš„組建工作。請設定工作...", "TaskService.fetchingTestTasks": "æ­£åœ¨æ“·å–æ¸¬è©¦å·¥ä½œ...", "TaskService.pickTestTask": "è«‹é¸å–è¦åŸ·è¡Œçš„æ¸¬è©¦å·¥ä½œ", "TaskService.noTestTaskTerminal": "找ä¸åˆ°ä»»ä½•è¦åŸ·è¡Œçš„æ¸¬è©¦å·¥ä½œã€‚請設定工作...", diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index a45b9045bdb..f21865638d9 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -7,6 +7,7 @@ "TerminalTaskSystem.unknownError": "åŸ·è¡Œå·¥ä½œæ™‚ç™¼ç”Ÿä¸æ˜ŽéŒ¯èª¤ã€‚如需詳細資訊,請åƒé–±å·¥ä½œè¼¸å‡ºè¨˜éŒ„檔。", "dependencyFailed": "無法解決在工作å€è³‡æ–™å¤¾ '{1}' 中的相ä¾å·¥ä½œ '{0}'", "TerminalTaskSystem.terminalName": "工作 - {0}", + "closeTerminal": "按任æ„éµé—œé–‰çµ‚端機。", "reuseTerminal": "å·¥ä½œå°‡è¢«é‡æ–°å•Ÿç”¨.按任æ„éµé—œé–‰.", "TerminalTaskSystem": "無法在 UNC ç£ç¢Ÿæ©Ÿä¸ŠåŸ·è¡Œæ®¼å±¤å‘½ä»¤ã€‚", "unkownProblemMatcher": "å•題比å°å™¨ {0} 無法解æžï¼Œæ¯”å°å™¨å°‡äºˆå¿½ç•¥ã€‚" diff --git a/i18n/cht/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index 61b47eff6f8..381d6bbb407 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,8 +14,6 @@ "ConfigurationParser.noTypeDefinition": "錯誤: 沒有已註冊工作類型 '{0}'。您是å¦å¿˜è¨˜å®‰è£æä¾›ç›¸æ‡‰å·¥ä½œæä¾›è€…的延伸模組?", "ConfigurationParser.missingRequiredProperty": "錯誤: 工作組態 '{0}' ç¼ºå°‘è¦æ±‚的屬性 '{1}'。會略éŽå·¥ä½œçµ„態。", "ConfigurationParser.notCustom": "錯誤: 未將工作宣告為自訂工作。將會忽略該組態。\n{0}\n", - "ConfigurationParser.noTaskName": "錯誤: 工作必須æä¾› taskName 屬性。å³å°‡å¿½ç•¥æ­¤å·¥ä½œã€‚\n{0}\n", - "taskConfiguration.shellArgs": "警告: 工作 '{0}' 是殼層命令,但命令å稱或其中一個引數有的未逸出的空格。若è¦ç¢ºä¿å‘½ä»¤åˆ—正確引述,請將引數åˆä½µåˆ°å‘½ä»¤ä¸­ã€‚", "taskConfiguration.noCommandOrDependsOn": "錯誤: 工作 '{0}' 未指定命令與 dependsOn 屬性。將會略éŽè©²å·¥ä½œã€‚其定義為: \n{1}", "taskConfiguration.noCommand": "錯誤: 工作 '{0}' 未定義命令。å³å°‡ç•¥éŽè©²å·¥ä½œã€‚其定義為:\n{1}", "TaskParse.noOsSpecificGlobalTasks": "工作版本 2.0.0 䏿”¯æ´å…¨åŸŸ OS 特定工作。請使用 OS 特定命令來轉æ›é€™äº›å·¥ä½œã€‚å—影響的工作為:\n{0}" diff --git a/i18n/cht/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index a83e0f14425..a843e172541 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,7 +6,7 @@ { "termEntryAriaLabel": "{0} , çµ‚ç«¯æ©Ÿé¸æ“‡å™¨", "termCreateEntryAriaLabel": "{0},建立新的終端機", - "'workbench.action.terminal.newplus": "$(plus) 建立新的整åˆå¼çµ‚端機", + "workbench.action.terminal.newplus": "$(plus) 建立新的整åˆå¼çµ‚端機", "noTerminalsMatching": "無相符的終端機", "noTerminalsFound": "無開啟的終端機" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 80abe8bb59c..a6aa09a9aa9 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,7 +16,6 @@ "terminal.integrated.rightClickCopyPaste": "如有設定,這會防止在終端機內按滑鼠å³éµæ™‚顯示æ“作功能表,而是在有é¸å–é …ç›®æ™‚è¤‡è£½ã€æ²’有é¸å–項目時貼上。", "terminal.integrated.fontFamily": "控制終端機的字型家æ—,é è¨­ç‚º editor.fontFamily 的值。", "terminal.integrated.fontSize": "æŽ§åˆ¶çµ‚ç«¯æ©Ÿçš„å­—åž‹å¤§å° (以åƒç´ ç‚ºå–®ä½)。", - "terminal.integrated.lineHeight": "控制終端機的行高,此數字會乘上終端機字型大å°ï¼Œä»¥å–得以åƒç´ ç‚ºå–®ä½çš„實際行高。", "terminal.integrated.enableBold": "是å¦è¦åœ¨çµ‚端機中啟用粗體文字,請注æ„,此動作須有終端機殼層的支æ´ã€‚", "terminal.integrated.cursorBlinking": "控制終端機資料指標是å¦é–ƒçˆã€‚", "terminal.integrated.cursorStyle": "控制終端機資料指標的樣å¼ã€‚", diff --git a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index ae636e70679..c2b6d2e3885 100644 --- a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,13 +5,14 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "色彩佈景主題", + "themes.category.light": "淺色主題", + "themes.category.dark": "深色主題", "installColorThemes": "安è£å…¶ä»–的色彩佈景主題...", "themes.selectTheme": "é¸å–色彩主題(上/下éµé è¦½)", "selectIconTheme.label": "檔案圖示佈景主題", - "installIconThemes": "安è£å…¶ä»–的檔案圖示主題...", "noIconThemeLabel": "ç„¡", "noIconThemeDesc": "åœç”¨æª”案圖示", - "problemChangingIconTheme": "設定圖示佈景主題時發生å•題: {0}", + "installIconThemes": "安è£å…¶ä»–的檔案圖示主題...", "themes.selectIconTheme": "é¸å–檔案圖示佈景主題", "generateColorTheme.label": "ä¾ç›®å‰çš„設定產生色彩佈景主題", "preferences": "喜好設定", diff --git a/i18n/cht/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/cht/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 2bc73e75628..d287934dae8 100644 --- a/i18n/cht/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/cht/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -9,9 +9,9 @@ "scope.window.description": "視窗特定組態,å¯åœ¨ä½¿ç”¨è€…或工作å€è¨­å®šä¸­äºˆä»¥è¨­å®šã€‚", "scope.resource.description": "資æºç‰¹å®šè¨­å®šï¼Œå¯åœ¨ä½¿ç”¨è€…ã€å·¥ä½œå€æˆ–資料夾設定中予以設定。", "scope.description": "組態é©ç”¨çš„範åœã€‚å¯ç”¨çš„範åœç‚ºã€Œè¦–窗ã€å’Œã€Œè³‡æºã€ã€‚", + "vscode.extension.contributes.defaultConfiguration": "ä¾èªžè¨€è²¢ç»é è¨­ç·¨è¼¯å™¨çµ„態設定。", "vscode.extension.contributes.configuration": "æä¾›çµ„態設定。", "invalid.title": "'configuration.title' 必須是字串", - "vscode.extension.contributes.defaultConfiguration": "ä¾èªžè¨€è²¢ç»é è¨­ç·¨è¼¯å™¨çµ„態設定。", "invalid.properties": "'configuration.properties' 必須是物件", "invalid.allOf": "'configuration.allOf' å·²å–ä»£è€Œä¸æ‡‰å†ä½¿ç”¨ã€‚è«‹æ”¹ç‚ºå°‡å¤šå€‹çµ„æ…‹å€æ®µä½œç‚ºé™£åˆ—,傳éžè‡³ã€Œçµ„æ…‹ã€è²¢ç»é»žã€‚", "workspaceConfig.folders.description": "è¦è¼‰å…¥å·¥ä½œå€ä¹‹è³‡æ–™å¤¾çš„æ¸…單。", diff --git a/i18n/cht/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json b/i18n/cht/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json new file mode 100644 index 00000000000..e3e021a4254 --- /dev/null +++ b/i18n/cht/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "陿¸¬", + "telemetry.enableCrashReporting": "å…è¨±å°‡ææ¯€å ±å‘Šå‚³é€çµ¦ Microsoft。\næ­¤é¸é …需è¦é‡æ–°å•Ÿå‹•æ‰æœƒç”Ÿæ•ˆã€‚" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/cht/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index 40b81b62803..8b6ad71cd4e 100644 --- a/i18n/cht/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "bubbleTitle": "包å«å¼·èª¿é …ç›®" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/cht/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/cht/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/cht/src/vs/workbench/services/files/node/fileService.i18n.json index 745c027703e..de69c42ba6c 100644 --- a/i18n/cht/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/files/node/fileService.i18n.json @@ -8,8 +8,8 @@ "fileIsDirectoryError": "檔案是目錄", "fileNotModifiedError": "未修改檔案的時間", "fileTooLargeError": "檔案太大無法開啟", - "fileBinaryError": "æª”æ¡ˆä¼¼ä¹Žæ˜¯äºŒé€²ä½æª”ï¼Œå› æ­¤ç„¡æ³•ç•¶åšæ–‡å­—開啟", "fileNotFoundError": "找ä¸åˆ°æª”案 ({0})", + "fileBinaryError": "æª”æ¡ˆä¼¼ä¹Žæ˜¯äºŒé€²ä½æª”ï¼Œå› æ­¤ç„¡æ³•ç•¶åšæ–‡å­—開啟", "fileExists": "è¦å»ºç«‹çš„æª”案已存在 ({0})", "fileMoveConflict": "無法移動/複製。目的地已存在檔案。", "unableToMoveCopyError": "無法移動/複製。檔案會å–代其所在的資料夾。", diff --git a/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index f0043c73b6a..6cf70a55716 100644 --- a/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -21,6 +21,5 @@ "keybindings.json.command": "所è¦åŸ·è¡Œå‘½ä»¤çš„å稱", "keybindings.json.when": "按éµç‚ºä½¿ç”¨ä¸­æ™‚çš„æ¢ä»¶ã€‚", "keybindings.json.args": "è¦å‚³éžè‡³å‘½ä»¤åŠ ä»¥åŸ·è¡Œçš„å¼•æ•¸ã€‚", - "keyboardConfigurationTitle": "éµç›¤", - "dispatch": "æŽ§åˆ¶æŒ‰ä¸‹æŒ‰éµæ™‚的分派é‚輯 (使用 'keydown.code' (建議使用) 或 'keydown.keyCode')。" + "keyboardConfigurationTitle": "éµç›¤" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/cht/src/vs/workbench/services/textfile/common/textFileService.i18n.json index 3f50386cb27..8b6ad71cd4e 100644 --- a/i18n/cht/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "files.backup.failSave": "無法備份檔案 (錯誤: {0}),請嘗試儲存您的檔案å†çµæŸã€‚" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 5ab16a62ce2..939ead9df9c 100644 --- a/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "migration.completed": "å·²å°‡æ–°çš„ä½ˆæ™¯ä¸»é¡Œè¨­å®šæ–°å¢žåˆ°ä½¿ç”¨è€…è¨­å®šã€‚å‚™ä»½ä½æ–¼ {0}。", "error.cannotloadtheme": "Unable to load {0}: {1}", - "error.cannotloadicontheme": "Unable to load {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "指定在工作å°ä¸­ä½¿ç”¨çš„圖示主題,或設定為 'null' ä¸é¡¯ç¤ºä»»ä½•檔案圖示。", diff --git a/i18n/deu/extensions/git/out/autofetch.i18n.json b/i18n/deu/extensions/git/out/autofetch.i18n.json new file mode 100644 index 00000000000..304f70941e2 --- /dev/null +++ b/i18n/deu/extensions/git/out/autofetch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yes": "Ja", + "no": "Nein" +} \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/commands.i18n.json b/i18n/deu/extensions/git/out/commands.i18n.json index 3f2fcad2989..9f89fe2f662 100644 --- a/i18n/deu/extensions/git/out/commands.i18n.json +++ b/i18n/deu/extensions/git/out/commands.i18n.json @@ -9,6 +9,8 @@ "create branch": "$(plus) Neuen Branch erstellen", "repourl": "Repository-URL", "parent": "Übergeordnetes Verzeichnis", + "cancel": "$(sync~spin) Repository wird geklont... Klicken Sie zum Abbrechen", + "cancel tooltip": "Klonen abbrechen", "cloning": "Git-Repository wird geklont...", "openrepo": "Repository öffnen", "proposeopen": "Möchten Sie das geklonte Repository öffnen?", @@ -49,6 +51,8 @@ "select branch to delete": "Wählen Sie einen Branch zum Löschen aus", "confirm force delete branch": "Der Branch '{0}' ist noch nicht vollständig zusammengeführt. Trotzdem löschen?", "delete branch": "Branch löschen", + "invalid branch name": "Ungültiger Branchname", + "branch already exists": "Ein Branch namens \"{0}\" bereits vorhanden.", "select a branch to merge from": "Branch für die Zusammenführung auswählen", "merge conflicts": "Es liegen Zusammenführungskonflikte vor. Beheben Sie die Konflikte vor dem Committen.", "tag name": "Tag-Name", @@ -71,7 +75,6 @@ "no stashes": "Es ist kein Stash zum Wiederherstellen vorhanden.", "pick stash to pop": "Wählen Sie einen Stash aus, für den ein Pop ausgeführt werden soll.", "clean repo": "Bereinigen Sie Ihre Repository-Arbeitsstruktur vor Auftragsabschluss.", - "cant push": "Verweise können nicht per Push an einen Remotespeicherort übertragen werden. Führen Sie zuerst \"Pull\" aus, um Ihre Änderungen zu integrieren.", "git error details": "Git: {0}", "git error": "Git-Fehler", "open git log": "Git-Protokoll öffnen" diff --git a/i18n/deu/extensions/git/out/main.i18n.json b/i18n/deu/extensions/git/out/main.i18n.json index 58ab0b365d0..17a3a6ed127 100644 --- a/i18n/deu/extensions/git/out/main.i18n.json +++ b/i18n/deu/extensions/git/out/main.i18n.json @@ -4,8 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "looking": "Suchen nach Git in: {0}", "using git": "Verwenden von Git {0} von {1}", - "updateGit": "Git aktualisieren", "neverShowAgain": "Nicht mehr anzeigen", + "updateGit": "Git aktualisieren", "git20": "Sie haben anscheinend Git {0} installiert. Code funktioniert am besten mit Git 2 oder neuer" } \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/repository.i18n.json b/i18n/deu/extensions/git/out/repository.i18n.json index eeff60b713c..9c6af561332 100644 --- a/i18n/deu/extensions/git/out/repository.i18n.json +++ b/i18n/deu/extensions/git/out/repository.i18n.json @@ -21,6 +21,7 @@ "deleted by us": "Gelöscht von uns", "both added": "Beide hinzugefügt", "both modified": "Beide geändert", + "commitMessage": "Message (press {0} to commit)", "commit": "Commit", "merge changes": "Änderungen zusammenführen", "staged changes": "Bereitgestellte Änderungen", diff --git a/i18n/deu/extensions/git/package.i18n.json b/i18n/deu/extensions/git/package.i18n.json index c692dbace32..88964f86644 100644 --- a/i18n/deu/extensions/git/package.i18n.json +++ b/i18n/deu/extensions/git/package.i18n.json @@ -33,6 +33,7 @@ "command.checkout": "Auschecken an...", "command.branch": "Branch erstellen...", "command.deleteBranch": "Branch löschen...", + "command.renameBranch": "Branch umbenennen...", "command.merge": "Branch zusammenführen...", "command.createTag": "Tag erstellen", "command.pull": "Pull", @@ -42,6 +43,7 @@ "command.pushTo": "Push zu...", "command.pushWithTags": "Push mit Tags ausführen", "command.sync": "Synchronisierung", + "command.syncRebase": "Sync (Rebase)", "command.publish": "Branch veröffentlichen", "command.showOutput": "Git-Ausgabe anzeigen", "command.ignore": "Datei zu .gitignore hinzufügen", diff --git a/i18n/deu/extensions/markdown/out/commands.i18n.json b/i18n/deu/extensions/markdown/out/commands.i18n.json new file mode 100644 index 00000000000..a4208705fd4 --- /dev/null +++ b/i18n/deu/extensions/markdown/out/commands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previewTitle": "Vorschau von {0}", + "onPreviewStyleLoadError": "'markdown.styles' konnte nicht geladen werden: {0}" +} \ No newline at end of file diff --git a/i18n/deu/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/deu/extensions/markdown/out/features/previewContentProvider.i18n.json new file mode 100644 index 00000000000..5a04ed5447d --- /dev/null +++ b/i18n/deu/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "In diesem Dokument wurden einige Inhalte deaktiviert.", + "preview.securityMessage.title": "Potenziell unsichere Inhalte wurden in der Markdown-Vorschau deaktiviert. Ändern Sie die Sicherheitseinstellung der Markdown-Vorschau, um unsichere Inhalte zuzulassen oder Skripts zu aktivieren.", + "preview.securityMessage.label": "Sicherheitswarnung – Inhalt deaktiviert" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/base/common/errorMessage.i18n.json b/i18n/deu/src/vs/base/common/errorMessage.i18n.json index 4bda5bf72a2..c952791d048 100644 --- a/i18n/deu/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/deu/src/vs/base/common/errorMessage.i18n.json @@ -4,13 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "message": "{0}. Fehlercode: {1}", - "error.permission.verbose": "Berechtigung verweigert (HTTP {0})", - "error.permission": "Berechtigung verweigert", - "error.http.verbose": "{0} (HTTP {1}: {2})", - "error.http": "{0} (HTTP {1})", - "error.connection.unknown.verbose": "Unbekannter Verbindungsfehler ({0})", - "error.connection.unknown": "Es ist ein unbekannter Verbindungsfehler aufgetreten. Entweder besteht keine Internetverbindung mehr, oder der verbundene Server ist offline.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "Ein unbekannter Fehler ist aufgetreten. Weitere Details dazu finden Sie im Protokoll.", "nodeExceptionMessage": "Systemfehler ({0})", diff --git a/i18n/deu/src/vs/code/electron-main/main.i18n.json b/i18n/deu/src/vs/code/electron-main/main.i18n.json new file mode 100644 index 00000000000..b88bee0ef1d --- /dev/null +++ b/i18n/deu/src/vs/code/electron-main/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "&&Schließen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/code/electron-main/menus.i18n.json b/i18n/deu/src/vs/code/electron-main/menus.i18n.json index 26bf3d1e020..8dcc363ec8e 100644 --- a/i18n/deu/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/menus.i18n.json @@ -22,12 +22,10 @@ "miQuit": "{0} beenden", "miNewFile": "&&Neue Datei", "miOpen": "&&Öffnen...", - "miOpenWorkspace": "&&Arbeitsbereich öffnen...", "miOpenFolder": "&&Ordner öffnen...", "miOpenFile": "Datei &&öffnen...", "miOpenRecent": "&&Zuletzt verwendete öffnen", - "miSaveWorkspaceAs": "Arbeitsbereich &&speichern unter...", - "miAddFolderToWorkspace": "&&Ordner zum Arbeitsbereich hinzufügen...", + "miSaveWorkspaceAs": "Arbeitsbereich speichern unter...", "miSave": "&&Speichern", "miSaveAs": "Speichern &&unter...", "miSaveAll": "A&&lles speichern", @@ -109,7 +107,7 @@ "miZoomOut": "Ver&&kleinern", "miZoomReset": "&&Zoom zurücksetzen", "miBack": "&&Zurück", - "miForward": "&&Weiterleiten", + "miForward": "&&Vorwärts", "miNextEditor": "&&Nächster Editor", "miPreviousEditor": "&&Vorheriger Editor", "miNextEditorInGroup": "&&Nächster verwendeter Editor in der Gruppe", @@ -157,7 +155,6 @@ "mMergeAllWindows": "Alle Fenster zusammenführen", "miToggleDevTools": "&&Entwicklertools umschalten", "miAccessibilityOptions": "&&Optionen für erleichterte Bedienung", - "miReportIssues": "&&Probleme melden", "miWelcome": "&&Willkommen", "miInteractivePlayground": "&&Interactive Spielwiese", "miDocumentation": "&&Dokumentation", @@ -184,6 +181,6 @@ "miDownloadingUpdate": "Das Update wird heruntergeladen...", "miInstallingUpdate": "Update wird installiert...", "miCheckForUpdates": "Nach Aktualisierungen suchen...", - "aboutDetail": "\nVersion {0}\nCommit {1}\nDatum {2}\nShell {3}\nRenderer {4}\nNode {5}\nArchitektur {6}", - "okButton": "OK" + "okButton": "OK", + "copy": "&&Kopieren" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/browser/services/bulkEdit.i18n.json b/i18n/deu/src/vs/editor/browser/services/bulkEdit.i18n.json new file mode 100644 index 00000000000..d7541e30bc7 --- /dev/null +++ b/i18n/deu/src/vs/editor/browser/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "Die folgenden Dateien wurden in der Zwischenzeit geändert: {0}", + "summary.0": "Keine Änderungen vorgenommen", + "summary.nm": "{0} Änderungen am Text in {1} Dateien vorgenommen", + "summary.n0": "{0} Änderungen am Text in einer Datei vorgenommen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json index 692a3d343b4..791032db29a 100644 --- a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,12 +10,14 @@ "fontSize": "Steuert den Schriftgrad in Pixeln.", "lineHeight": "Steuert die Zeilenhöhe. Verwenden Sie 0, um LineHeight aus der FontSize-Angabe zu berechnen.", "letterSpacing": "Steuert den Zeichenabstand in Pixeln.", - "lineNumbers": "Steuert die Anzeige von Zeilennummern. Mögliche Werte sind \"Ein\", \"Aus\" und \"Relativ\". \"Relativ\" zeigt die Zeilenanzahl ab der aktuellen Cursorposition.", + "lineNumbers.off": "Zeilennummern werden nicht dargestellt.", + "lineNumbers.on": "Zeilennummern werden als absolute Zahl dargestellt.", + "lineNumbers.relative": "Zeilennummern werden als Abstand in Zeilen an Cursorposition dargestellt.", + "lineNumbers.interval": "Zeilennummern werden alle 10 Zeilen dargestellt.", + "lineNumbers": "Steuert die Anzeige von Zeilennummern. Mögliche Werte sind \"Ein\", \"Aus\" und \"Relativ\".", "rulers": "Vertikale Linien nach einer bestimmten Anzahl von Monospace Zeichen zeichnen. Verwenden Sie mehrere Werte für mehrere Linien. Keine Linie wird gezeichnet, wenn das Array leer ist.", "wordSeparators": "Zeichen, die als Worttrennzeichen verwendet werden, wenn wortbezogene Navigationen oder Vorgänge ausgeführt werden.", - "tabSize": "Die Anzahl der Leerzeichen, denen ein Tabstopp entspricht. Diese Einstellung wird basierend auf dem Inhalt der Datei überschrieben, wenn \"editor.detectIndentation\" aktiviert ist.", "tabSize.errorMessage": "\"number\" wurde erwartet. Beachten Sie, dass der Wert \"auto\" durch die Einstellung \"editor.detectIndentation\" ersetzt wurde.", - "insertSpaces": "Fügt beim Drücken der TAB-TASTE Leerzeichen ein. Diese Einstellung wird basierend auf dem Inhalt der Datei überschrieben, wenn \"editor.detectIndentation\" aktiviert ist.", "insertSpaces.errorMessage": "\"boolean\" wurde erwartet. Beachten Sie, dass der Wert \"auto\" durch die Einstellung \"editor.detectIndentation\" ersetzt wurde.", "detectIndentation": "Beim Öffnen einer Datei werden \"editor.tabSize\" und \"editor.insertSpaces\" basierend auf den Dateiinhalten erkannt.", "roundedSelection": "Steuert, ob die Auswahl runde Ecken aufweist.", @@ -89,8 +91,8 @@ "links": "Steuert, ob der Editor Links erkennen und anklickbar machen soll", "colorDecorators": "Steuert, ob der Editor die Inline-Farbdecorators und die Farbauswahl rendern soll.", "codeActions": "Ermöglicht die Code-Aktion \"lightbulb\"", + "selectionClipboard": "Steuert, ob die primäre Linux-Zwischenablage unterstützt werden soll.", "sideBySide": "Steuert, ob der Diff-Editor das Diff nebeneinander oder inline anzeigt.", "ignoreTrimWhitespace": "Steuert, ob der Diff-Editor Änderungen in führenden oder nachgestellten Leerzeichen als Diffs anzeigt.", - "renderIndicators": "Steuert, ob der Diff-Editor die Indikatoren \"+\" und \"-\" für hinzugefügte/entfernte Änderungen anzeigt.", - "selectionClipboard": "Steuert, ob die primäre Linux-Zwischenablage unterstützt werden soll." + "renderIndicators": "Steuert, ob der Diff-Editor die Indikatoren \"+\" und \"-\" für hinzugefügte/entfernte Änderungen anzeigt." } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/deu/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json new file mode 100644 index 00000000000..d357fb74a7c --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Gehe zu Klammer" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json b/i18n/deu/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json new file mode 100644 index 00000000000..e7167388d84 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "Caretzeichen nach links verschieben", + "caret.moveRight": "Caretzeichen nach rechts verschieben" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/caretOperations/transpose.i18n.json b/i18n/deu/src/vs/editor/contrib/caretOperations/transpose.i18n.json new file mode 100644 index 00000000000..45360f52384 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/caretOperations/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Buchstaben austauschen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/clipboard/clipboard.i18n.json b/i18n/deu/src/vs/editor/contrib/clipboard/clipboard.i18n.json new file mode 100644 index 00000000000..922dc8181a6 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/clipboard/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Ausschneiden", + "actions.clipboard.copyLabel": "Kopieren", + "actions.clipboard.pasteLabel": "Einfügen", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Mit Syntaxhervorhebung kopieren" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/comment/comment.i18n.json b/i18n/deu/src/vs/editor/contrib/comment/comment.i18n.json new file mode 100644 index 00000000000..70898acfa34 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/comment/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Zeilenkommentar umschalten", + "comment.line.add": "Zeilenkommentar hinzufügen", + "comment.line.remove": "Zeilenkommentar entfernen", + "comment.block": "Blockkommentar umschalten" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json b/i18n/deu/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json new file mode 100644 index 00000000000..2b06743ac4a --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Editor-Kontextmenü anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/find/findController.i18n.json b/i18n/deu/src/vs/editor/contrib/find/findController.i18n.json new file mode 100644 index 00000000000..966c9eafe93 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/find/findController.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Suchen", + "findNextMatchAction": "Nächstes Element suchen", + "findPreviousMatchAction": "Vorheriges Element suchen", + "nextSelectionMatchFindAction": "Nächste Auswahl suchen", + "previousSelectionMatchFindAction": "Vorherige Auswahl suchen", + "startReplace": "Ersetzen", + "showNextFindTermAction": "Nächsten Suchbegriff anzeigen", + "showPreviousFindTermAction": "Vorherigen Suchbegriff anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/find/findWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/find/findWidget.i18n.json new file mode 100644 index 00000000000..62d72aaf355 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/find/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Suchen", + "placeholder.find": "Suchen", + "label.previousMatchButton": "Vorherige Übereinstimmung", + "label.nextMatchButton": "Nächste Übereinstimmung", + "label.toggleSelectionFind": "In Auswahl suchen", + "label.closeButton": "Schließen", + "label.replace": "Ersetzen", + "placeholder.replace": "Ersetzen", + "label.replaceButton": "Ersetzen", + "label.replaceAllButton": "Alle ersetzen", + "label.toggleReplaceButton": "Ersetzen-Modus wechseln", + "title.matchesCountLimit": "Nur die ersten {0} Ergebnisse wurden hervorgehoben, aber alle Suchoperationen werden auf dem gesamten Text durchgeführt.", + "label.matchesLocation": "{0} von {1}", + "label.noResults": "Keine Ergebnisse" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/find/simpleFindWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/find/simpleFindWidget.i18n.json new file mode 100644 index 00000000000..32db8ee0bd6 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/find/simpleFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Suchen", + "placeholder.find": "Suchen", + "label.previousMatchButton": "Vorherige Übereinstimmung", + "label.nextMatchButton": "Nächste Übereinstimmung", + "label.closeButton": "Schließen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/deu/src/vs/editor/contrib/folding/folding.i18n.json new file mode 100644 index 00000000000..113379281fd --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/folding/folding.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Auffalten", + "unFoldRecursivelyAction.label": "Faltung rekursiv aufheben", + "foldAction.label": "Falten", + "foldRecursivelyAction.label": "Rekursiv falten", + "foldAllBlockComments.label": "Alle Blockkommentare falten", + "foldAllAction.label": "Alle falten", + "unfoldAllAction.label": "Alle auffalten", + "foldLevelAction.label": "Faltebene {0}" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/format/formatActions.i18n.json b/i18n/deu/src/vs/editor/contrib/format/formatActions.i18n.json new file mode 100644 index 00000000000..7156de16ac5 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/format/formatActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "1 Formatierung in Zeile {0} vorgenommen", + "hintn1": "{0} Formatierungen in Zeile {1} vorgenommen", + "hint1n": "1 Formatierung zwischen Zeilen {0} und {1} vorgenommen", + "hintnn": "{0} Formatierungen zwischen Zeilen {1} und {2} vorgenommen", + "no.provider": "Es ist leider kein Formatierer für \"{0}\"-Dateien installiert. ", + "formatDocument.label": "Dokument formatieren", + "formatSelection.label": "Auswahl formatieren" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json b/i18n/deu/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json new file mode 100644 index 00000000000..ffee2c2fa36 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Keine Definition gefunden für \"{0}\".", + "generic.noResults": "Keine Definition gefunden", + "meta.title": " – {0} Definitionen", + "actions.goToDecl.label": "Gehe zu Definition", + "actions.goToDeclToSide.label": "Definition an der Seite öffnen", + "actions.previewDecl.label": "Peek-Definition", + "goToImplementation.noResultWord": "Keine Implementierung gefunden für \"{0}\"", + "goToImplementation.generic.noResults": "Keine Implementierung gefunden", + "meta.implementations.title": "{0} Implementierungen", + "actions.goToImplementation.label": "Zur Implementierung wechseln", + "actions.peekImplementation.label": "Vorschau der Implementierung anzeigen", + "goToTypeDefinition.noResultWord": "Keine Typendefinition gefunden für \"{0}\"", + "goToTypeDefinition.generic.noResults": "Keine Typendefinition gefunden", + "meta.typeDefinitions.title": "{0} Typdefinitionen", + "actions.goToTypeDefinition.label": "Zur Typdefinition wechseln", + "actions.peekTypeDefinition.label": "Vorschau der Typdefinition anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json b/i18n/deu/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json new file mode 100644 index 00000000000..2d5f00609a8 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Klicken Sie, um {0} Definitionen anzuzeigen." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/gotoError/gotoError.i18n.json b/i18n/deu/src/vs/editor/contrib/gotoError/gotoError.i18n.json new file mode 100644 index 00000000000..02553773e89 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/gotoError/gotoError.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Gehe zum nächsten Fehler oder zur nächsten Warnung", + "markerAction.previous.label": "Gehe zum vorherigen Fehler oder zur vorherigen Warnung", + "editorMarkerNavigationError": "Editormarkierung: Farbe bei Fehler des Navigationswidgets.", + "editorMarkerNavigationWarning": "Editormarkierung: Farbe bei Warnung des Navigationswidgets.", + "editorMarkerNavigationInfo": "Editormarkierung: Farbe bei Warnung des Navigationswidgets.", + "editorMarkerNavigationBackground": "Editormarkierung: Hintergrund des Navigationswidgets." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/hover/hover.i18n.json b/i18n/deu/src/vs/editor/contrib/hover/hover.i18n.json new file mode 100644 index 00000000000..44bcefc0805 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/hover/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Hovern anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/hover/modesContentHover.i18n.json b/i18n/deu/src/vs/editor/contrib/hover/modesContentHover.i18n.json new file mode 100644 index 00000000000..f77f3adae72 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/hover/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Wird geladen..." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json b/i18n/deu/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json new file mode 100644 index 00000000000..d29adae9acc --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Durch vorherigen Wert ersetzen", + "InPlaceReplaceAction.next.label": "Durch nächsten Wert ersetzen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/indentation/indentation.i18n.json b/i18n/deu/src/vs/editor/contrib/indentation/indentation.i18n.json new file mode 100644 index 00000000000..e7136cd509f --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/indentation/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Einzug in Leerzeichen konvertieren", + "indentationToTabs": "Einzug in Tabstopps konvertieren", + "configuredTabSize": "Konfigurierte Tabulatorgröße", + "selectTabWidth": "Tabulatorgröße für aktuelle Datei auswählen", + "indentUsingTabs": "Einzug mithilfe von Tabstopps", + "indentUsingSpaces": "Einzug mithilfe von Leerzeichen", + "detectIndentation": "Einzug aus Inhalt erkennen", + "editor.reindentlines": "Neuen Einzug für Zeilen festlegen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json b/i18n/deu/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json new file mode 100644 index 00000000000..53bb9f3fd90 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Zeile nach oben kopieren", + "lines.copyDown": "Zeile nach unten kopieren", + "lines.moveUp": "Zeile nach oben verschieben", + "lines.moveDown": "Zeile nach unten verschieben", + "lines.sortAscending": "Zeilen aufsteigend sortieren", + "lines.sortDescending": "Zeilen absteigend sortieren", + "lines.trimTrailingWhitespace": "Nachgestelltes Leerzeichen kürzen", + "lines.delete": "Zeile löschen", + "lines.indent": "Zeileneinzug", + "lines.outdent": "Zeile ausrücken", + "lines.insertBefore": "Zeile oben einfügen", + "lines.insertAfter": "Zeile unten einfügen", + "lines.deleteAllLeft": "Alle übrigen löschen", + "lines.deleteAllRight": "Alle rechts löschen", + "lines.joinLines": "Zeilen verknüpfen", + "editor.transpose": "Zeichen um den Cursor herum transponieren", + "editor.transformToUppercase": "In Großbuchstaben umwandeln", + "editor.transformToLowercase": "In Kleinbuchstaben umwandeln" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/links/links.i18n.json b/i18n/deu/src/vs/editor/contrib/links/links.i18n.json new file mode 100644 index 00000000000..e9f6f2ae5ad --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/links/links.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "BEFEHLSTASTE + Mausklick zum Aufrufen des Links", + "links.navigate": "STRG + Mausklick zum Aufrufen des Links", + "links.command.mac": "Cmd + Klick um Befehl auszuführen", + "links.command": "Ctrl + Klick um Befehl auszuführen.", + "links.navigate.al": "ALT + Mausklick zum Aufrufen des Links", + "links.command.al": "Alt + Klick um Befehl auszuführen.", + "invalid.url": "Fehler beim Öffnen dieses Links, weil er nicht wohlgeformt ist: {0}", + "missing.url": "Fehler beim Öffnen dieses Links, weil das Ziel fehlt.", + "label": "Link öffnen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/multicursor/multicursor.i18n.json b/i18n/deu/src/vs/editor/contrib/multicursor/multicursor.i18n.json new file mode 100644 index 00000000000..66385866668 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/multicursor/multicursor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Cursor oberhalb hinzufügen", + "mutlicursor.insertBelow": "Cursor unterhalb hinzufügen", + "mutlicursor.insertAtEndOfEachLineSelected": "Cursor an Zeilenenden hinzufügen", + "addSelectionToNextFindMatch": "Auswahl zur nächsten Übereinstimmungssuche hinzufügen", + "addSelectionToPreviousFindMatch": "Letzte Auswahl zu vorheriger Übereinstimmungssuche hinzufügen", + "moveSelectionToNextFindMatch": "Letzte Auswahl in nächste Übereinstimmungssuche verschieben", + "moveSelectionToPreviousFindMatch": "Letzte Auswahl in vorherige Übereinstimmungssuche verschieben", + "selectAllOccurrencesOfFindMatch": "Alle Vorkommen auswählen und Übereinstimmung suchen", + "changeAll.label": "Alle Vorkommen ändern" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json b/i18n/deu/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json new file mode 100644 index 00000000000..1ac221c353c --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Parameterhinweise auslösen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json new file mode 100644 index 00000000000..7979e4c0834 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, Hinweis" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/deu/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json new file mode 100644 index 00000000000..f55e5785517 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Korrekturen anzeigen ({0})", + "quickFix": "Korrekturen anzeigen", + "quickfix.trigger.label": "Schnelle Problembehebung" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json new file mode 100644 index 00000000000..d057bbcc407 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Schließen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json new file mode 100644 index 00000000000..479f89ba296 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": " – {0} Verweise", + "references.action.label": "Alle Verweise suchen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json new file mode 100644 index 00000000000..fab6f765b34 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Wird geladen..." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json new file mode 100644 index 00000000000..76ca2b446f4 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "Symbol in {0} in Zeile {1}, Spalte {2}", + "aria.fileReferences.1": "1 Symbol in {0}, vollständiger Pfad {1}", + "aria.fileReferences.N": "{0} Symbole in {1}, vollständiger Pfad {2}", + "aria.result.0": "Es wurden keine Ergebnisse gefunden.", + "aria.result.1": "1 Symbol in {0} gefunden", + "aria.result.n1": "{0} Symbole in {1} gefunden", + "aria.result.nm": "{0} Symbole in {1} Dateien gefunden" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json new file mode 100644 index 00000000000..358b448e65f --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Fehler beim Auflösen der Datei.", + "referencesCount": "{0} Verweise", + "referenceCount": "{0} Verweis", + "missingPreviewMessage": "Keine Vorschau verfügbar.", + "treeAriaLabel": "Verweise", + "noResults": "Keine Ergebnisse", + "peekView.alternateTitle": "Verweise", + "peekViewTitleBackground": "Hintergrundfarbe des Titelbereichs der Peek-Ansicht.", + "peekViewTitleForeground": "Farbe des Titels in der Peek-Ansicht.", + "peekViewTitleInfoForeground": "Farbe der Titelinformationen in der Peek-Ansicht.", + "peekViewBorder": "Farbe der Peek-Ansichtsränder und des Pfeils.", + "peekViewResultsBackground": "Hintergrundfarbe der Ergebnisliste in der Peek-Ansicht.", + "peekViewResultsMatchForeground": "Vordergrundfarbe für Zeilenknoten in der Ergebnisliste der Peek-Ansicht.", + "peekViewResultsFileForeground": "Vordergrundfarbe für Dateiknoten in der Ergebnisliste der Peek-Ansicht.", + "peekViewResultsSelectionBackground": "Hintergrundfarbe des ausgewählten Eintrags in der Ergebnisliste der Peek-Ansicht.", + "peekViewResultsSelectionForeground": "Vordergrundfarbe des ausgewählten Eintrags in der Ergebnisliste der Peek-Ansicht.", + "peekViewEditorBackground": "Hintergrundfarbe des Peek-Editors.", + "peekViewEditorGutterBackground": "Hintergrundfarbe der Leiste im Peek-Editor.", + "peekViewResultsMatchHighlight": "Farbe für Übereinstimmungsmarkierungen in der Ergebnisliste der Peek-Ansicht.", + "peekViewEditorMatchHighlight": "Farbe für Übereinstimmungsmarkierungen im Peek-Editor." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/rename/rename.i18n.json b/i18n/deu/src/vs/editor/contrib/rename/rename.i18n.json new file mode 100644 index 00000000000..0a095a2aa5e --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/rename/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Kein Ergebnis.", + "aria": "\"{0}\" erfolgreich in \"{1}\" umbenannt. Zusammenfassung: {2}", + "rename.failed": "Fehler bei der Ausführung der Umbenennung.", + "rename.label": "Symbol umbenennen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/rename/renameInputField.i18n.json b/i18n/deu/src/vs/editor/contrib/rename/renameInputField.i18n.json new file mode 100644 index 00000000000..0c2f7ec3617 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/rename/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Benennen Sie die Eingabe um. Geben Sie einen neuen Namen ein, und drücken Sie die EINGABETASTE, um den Commit auszuführen." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json b/i18n/deu/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json new file mode 100644 index 00000000000..cfef202b040 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Auswahl erweitern", + "smartSelect.shrink": "Auswahl verkleinern" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/suggest/suggestController.i18n.json b/i18n/deu/src/vs/editor/contrib/suggest/suggestController.i18n.json new file mode 100644 index 00000000000..634627ef2a5 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/suggest/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "Durch Annahme von \"{0}\" wurde folgender Text eingefügt: {1}", + "suggest.trigger.label": "Vorschlag auslösen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/suggest/suggestWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/suggest/suggestWidget.i18n.json new file mode 100644 index 00000000000..df507c729f9 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/suggest/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "Hintergrundfarbe des Vorschlagswidgets.", + "editorSuggestWidgetBorder": "Rahmenfarbe des Vorschlagswidgets.", + "editorSuggestWidgetForeground": "Vordergrundfarbe des Vorschlagswidgets.", + "editorSuggestWidgetSelectedBackground": "Hintergrundfarbe des ausgewählten Eintrags im Vorschlagswidget.", + "editorSuggestWidgetHighlightForeground": "Farbe der Trefferhervorhebung im Vorschlagswidget.", + "readMore": "Mehr anzeigen...{0}", + "suggestionWithDetailsAriaLabel": "{0}, Vorschlag, hat Details", + "suggestionAriaLabel": "{0}, Vorschlag", + "readLess": "Weniger anzeigen...{0}", + "suggestWidget.loading": "Wird geladen...", + "suggestWidget.noSuggestions": "Keine Vorschläge.", + "suggestionAriaAccepted": "{0}, angenommen", + "ariaCurrentSuggestionWithDetails": "{0}, Vorschlag, hat Details", + "ariaCurrentSuggestion": "{0}, Vorschlag" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json b/i18n/deu/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json new file mode 100644 index 00000000000..8dfd4e19548 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "TAB-Umschalttaste verschiebt Fokus" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json b/i18n/deu/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json new file mode 100644 index 00000000000..d706ff2e9b2 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Hintergrundfarbe eines Symbols beim Lesezugriff (beispielsweise beim Lesen einer Variablen).", + "wordHighlightStrong": "Hintergrundfarbe eines Symbols beim Schreibzugriff (beispielsweise beim Schreiben in eine Variable).", + "overviewRulerWordHighlightForeground": "Übersichtslineal-Markierungsfarbe für Symbolhervorhebungen.", + "overviewRulerWordHighlightStrongForeground": "Übersichtslineal-Markierungsfarbe für Schreibzugriffs-Symbolhervorhebungen.", + "wordHighlight.next.label": "Gehe zur nächsten Symbolhervorhebungen", + "wordHighlight.previous.label": "Gehe zur vorherigen Symbolhervorhebungen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/deu/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index cca30e42130..84248e64732 100644 --- a/i18n/deu/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/deu/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "notFound": "Die Extension wurde nicht gefunden.", - "noCompatible": "Eine kompatible Version von {0} mit dieser Version des Codes wurde nicht gefunden." + "notCompatibleDownload": "Kann nicht heruntergeladen werden, da die Erweiterung, die mit der aktuellen VS Code Version '{0}' kompatibel ist, nicht gefunden werden kann. " } \ No newline at end of file diff --git a/i18n/deu/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/deu/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index 521e20ed207..185a438a129 100644 --- a/i18n/deu/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/deu/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,11 +6,12 @@ { "invalidManifest": "Die Erweiterung ist ungültig: \"package.json\" ist keine JSON-Datei.", "restartCodeLocal": "Bitte starten Sie Code vor der Neuinstallation von {0} neu.", - "restartCodeGallery": "Bitte vor der Neuinstallation VSCode neu starten.", + "override": "Überschreiben", + "cancel": "Abbrechen", + "notFoundCompatibleDependency": "Kann nicht installiert werden, da die abhängige Erweiterung '{0}', die mit der aktuellen VS Code Version '{1}' kompatibel ist, nicht gefunden werden kann. ", "uninstallDependeciesConfirmation": "Möchten Sie nur \"{0}\" oder auch die zugehörigen Abhängigkeiten deinstallieren?", "uninstallOnly": "Nur", "uninstallAll": "Alle", - "cancel": "Abbrechen", "uninstallConfirmation": "Möchten Sie \"{0}\" deinstallieren?", "ok": "OK", "singleDependentError": "Die Erweiterung \"{0}\" kann nicht deinstalliert werden. Die Erweiterung \"{1}\" hängt von dieser Erweiterung ab.", diff --git a/i18n/deu/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/deu/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json new file mode 100644 index 00000000000..c0039e0b445 --- /dev/null +++ b/i18n/deu/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "view": "Anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 842738eb092..eea7eefe298 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -33,6 +33,7 @@ "openPreviousEditor": "Vorherigen Editor öffnen", "nextEditorInGroup": "Nächsten Editor in der Gruppe öffnen", "openPreviousEditorInGroup": "Vorherigen Editor in der Gruppe öffnen", + "lastEditorInGroup": "Letzten Editor in der Gruppe öffnen", "navigateNext": "Weiter", "navigatePrevious": "Zurück", "navigateLast": "Zum Ende gehen", diff --git a/i18n/deu/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index 4660e615d21..963d490097f 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,7 +6,6 @@ { "editorCommand.activeEditorMove.description": "Aktiven Editor nach Tabstopps oder Gruppen verschieben", "editorCommand.activeEditorMove.arg.name": "Argument zum Verschieben des aktiven Editors", - "editorCommand.activeEditorMove.arg.description": "Argumenteigenschaften:\n\t\t\t\t\t\t* \"to\": Ein Zeichenfolgenwert, der das Ziel des Verschiebungsvorgangs angibt.\n\t\t\t\t\t\t* \"by\": Ein Zeichenfolgenwert, der die Einheit für die Verschiebung angibt (nach Registerkarte oder nach Gruppe).\n\t\t\t\t\t\t* \"value\": Ein Zahlenwert, der angibt, um wie viele Positionen verschoben wird. Es kann auch die absolute Position für die Verschiebung angegeben werden.\n\t\t\t\t\t", "commandDeprecated": "Der Befehl **{0}** wurde entfernt. Sie können stattdessen **{1}** verwenden.", "openKeybindings": "Tastenkombinationen konfigurieren" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index fb5b37b0028..56317ca59e3 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -52,6 +52,5 @@ "screenReaderDetectedExplanation.question": "Verwenden Sie eine Sprachausgabe zum Bedienen von VS Code?", "screenReaderDetectedExplanation.answerYes": "Ja", "screenReaderDetectedExplanation.answerNo": "Nein", - "screenReaderDetectedExplanation.body1": "VS Code ist jetzt für die Verwendung mit einer Sprachausgabe optimiert. ", - "screenReaderDetectedExplanation.body2": "Einige Editorfunktionen weisen ein anderes Verhalten auf, z. B. in Bezug auf den Zeilenumbruch, Faltung, automatisches Schließen von Klammern usw." + "screenReaderDetectedExplanation.body1": "VS Code ist jetzt für die Verwendung mit einer Sprachausgabe optimiert. " } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/quickopen.i18n.json b/i18n/deu/src/vs/workbench/browser/quickopen.i18n.json index 89a7706d482..ac7dedc6bd7 100644 --- a/i18n/deu/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/quickopen.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "noResultsMatching": "Keine übereinstimmenden Ergebnisse.", - "noResultsFound2": "Es wurden keine Ergebnisse gefunden.", - "entryAriaLabel": "{0}, Befehl" + "noResultsFound2": "Es wurden keine Ergebnisse gefunden." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json index bff17f6154d..9c274f7fb04 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json @@ -30,7 +30,7 @@ "openRecent": "Zuletzt benutzt...", "quickOpenRecent": "Zuletzt benutzte schnell öffnen...", "closeMessages": "Benachrichtigungs-E-Mail schließen", - "reportIssues": "Probleme melden", + "reportIssueInEnglish": "Problem melden", "reportPerformanceIssue": "Leistungsproblem melden", "keybindingsReference": "Referenz für Tastenkombinationen", "openDocumentationUrl": "Dokumentation", @@ -47,5 +47,14 @@ "showNextWindowTab": "Nächste Fensterregisterkarte anzeigen", "moveWindowTabToNewWindow": "Fensterregisterkarte in neues Fenster verschieben", "mergeAllWindowTabs": "Alle Fenster zusammenführen", - "toggleWindowTabsBar": "Fensterregisterkarten-Leiste umschalten" + "toggleWindowTabsBar": "Fensterregisterkarten-Leiste umschalten", + "configureLocale": "Sprache konfigurieren", + "displayLanguage": "Definiert die Anzeigesprache von VSCode.", + "doc": "Unter {0} finden Sie eine Liste der unterstützten Sprachen.", + "restart": "Das Ändern dieses Wertes erfordert einen Neustart von VSCode.", + "fail.createSettings": "{0} ({1}) kann nicht erstellt werden.", + "debug": "Debuggen", + "info": "Info", + "warn": "Warnung", + "err": "Fehler" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json index 2b8cdcfb021..f90e322ae5f 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,8 +7,8 @@ "view": "Anzeigen", "help": "Hilfe", "file": "Datei", - "workspaces": "Arbeitsbereiche", "developer": "Entwickler", + "workspaces": "Arbeitsbereiche", "showEditorTabs": "Steuert, ob geöffnete Editoren auf Registerkarten angezeigt werden sollen.", "workbench.editor.labelFormat.default": "Zeigt den Namen der Datei. Wenn Registerkarten aktiviert sind und zwei Dateien in einer Gruppe den gleichen Namen haben, werden die unterscheidenden Abschnitte der Pfade jeder Datei hinzugefügt. Wenn die Registerkarten deaktiviert sind, wird der Pfad relativ zum Arbeitsbereich-Ordner angezeigt, wenn der Editor aktiv ist. ", "workbench.editor.labelFormat.short": "Den Namen der Datei anzeigen, gefolgt von dessen Verzeichnisnamen.", @@ -26,18 +26,16 @@ "closeOnFocusLost": "Steuert, ob Quick Open automatisch geschlossen werden soll, sobald das Feature den Fokus verliert.", "openDefaultSettings": "Steuert, ob beim Öffnen der Einstellungen auch ein Editor geöffnet wird, der alle Standardeinstellungen anzeigt.", "sideBarLocation": "Steuert die Position der Seitenleiste. Diese kann entweder links oder rechts von der Workbench angezeigt werden.", - "panelLocation": "Steuert die Position des Panels. Dieses kann entweder unter oder rechts der Workbench angezeigt werden.", "statusBarVisibility": "Steuert die Sichtbarkeit der Statusleiste im unteren Bereich der Workbench.", "activityBarVisibility": "Steuert die Sichtbarkeit der Aktivitätsleiste in der Workbench.", "closeOnFileDelete": "Steuert, ob Editoren, die eine Datei anzeigen, automatisch geschlossen werden sollen, wenn die Datei von einem anderen Prozess umbenannt oder gelöscht wird. Wenn Sie diese Option deaktivieren, bleibt der Editor bei einem solchen Ereignis als geändert offen. Bei Löschvorgängen innerhalb der Anwendung wird der Editor immer geschlossen, und geänderte Dateien werden nie geschlossen, damit Ihre Daten nicht verloren gehen.", - "experimentalFuzzySearchEndpoint": "Gibt den Endpunkt an, der für die experimentelle Einstellungssuche verwendet wird.", - "experimentalFuzzySearchKey": "Gibt den Schlüssel an, der für die experimentelle Einstellungssuche verwendet wird.", "fontAliasing": "Steuert die Schriftartaliasingmethode in der Workbench.\n- default: Subpixel-Schriftartglättung. Auf den meisten Nicht-Retina-Displays wird Text bei dieser Einstellung am schärfsten dargestellt.\n- antialiased: Glättet die Schriftart auf der Pixelebene (im Gegensatz zur Subpixelebene). Bei dieser Einstellung kann die Schriftart insgesamt heller wirken.\n- none: Deaktiviert die Schriftartglättung. Text wird mit gezackten scharfen Kanten dargestellt.\n", "workbench.fontAliasing.default": "Subpixel-Schriftartglättung. Auf den meisten Nicht-Retina-Displays wird Text bei dieser Einstellung am schärfsten dargestellt.", "workbench.fontAliasing.antialiased": "Glättet die Schriftart auf der Pixelebene (im Gegensatz zur Subpixelebene). Bei dieser Einstellung kann die Schriftart insgesamt heller wirken.", "workbench.fontAliasing.none": "Deaktiviert die Schriftartglättung. Text wird mit gezackten scharfen Kanten dargestellt.", "swipeToNavigate": "Hiermit navigieren Sie per waagrechtem Wischen mit drei Fingen zwischen geöffneten Dateien.", "workbenchConfigurationTitle": "Workbench", + "windowConfigurationTitle": "Fenster", "window.openFilesInNewWindow.on": "Dateien werden in einem neuen Fenster geöffnet.", "window.openFilesInNewWindow.off": "Dateien werden im Fenster mit dem geöffneten Dateiordner oder im letzten aktiven Fenster geöffnet.", "window.openFilesInNewWindow.default": "Dateien werden im Fenster mit dem geöffneten Dateiordner oder im letzten aktiven Fenster geöffnet, sofern sie nicht über das Dock oder den Finder geöffnet werden (nur MacOS).", @@ -69,11 +67,11 @@ "autoDetectHighContrast": "Ist diese Option aktiviert, erfolgt automatisch ein Wechsel zu einem Design mit hohem Kontrast, wenn Windows ein Design mit hohem Kontrast verwendet, und zu einem dunklen Design, wenn Sie für Windows kein Design mit hohem Kontrast mehr verwenden.", "titleBarStyle": "Passt das Aussehen der Titelleiste des Fensters an. Zum Anwenden der Änderungen ist ein vollständiger Neustart erforderlich.", "window.nativeTabs": "Aktiviert MacOS Sierra-Fensterregisterkarten. Beachten Sie, dass zum Übernehmen von Änderungen ein vollständiger Neustart erforderlich ist und durch ggf. konfigurierte native Registerkarten ein benutzerdefinierter Titelleistenstil deaktiviert wird.", - "windowConfigurationTitle": "Fenster", "zenModeConfigurationTitle": "Zen-Modus", "zenMode.fullScreen": "Steuert, ob die Workbench durch das Aktivieren des Zen-Modus in den Vollbildmodus wechselt.", "zenMode.hideTabs": "Steuert, ob die Workbench-Registerkarten durch Aktivieren des Zen-Modus ebenfalls ausgeblendet werden.", "zenMode.hideStatusBar": "Steuert, ob die Statusleiste im unteren Bereich der Workbench durch Aktivieren des Zen-Modus ebenfalls ausgeblendet wird.", "zenMode.hideActivityBar": "Steuert, ob die Aktivitätsleiste im linken Bereich der Workbench durch Aktivieren des Zen-Modus ebenfalls ausgeblendet wird.", - "zenMode.restore": "Steuert, ob ein Fenster im Zen-Modus wiederhergestellt werden soll, wenn es im Zen-Modus beendet wurde." + "zenMode.restore": "Steuert, ob ein Fenster im Zen-Modus wiederhergestellt werden soll, wenn es im Zen-Modus beendet wurde.", + "JsonSchema.locale": "Die zu verwendende Sprache der Benutzeroberfläche." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index a294a18039b..465478c98bc 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -30,7 +30,6 @@ "deactivateBreakpoints": "Haltepunkte deaktivieren", "reapplyAllBreakpoints": "Alle Haltepunkte erneut anwenden", "addFunctionBreakpoint": "Funktionshaltepunkt hinzufügen", - "renameFunctionBreakpoint": "Funktionshaltepunkt umbenennen", "addConditionalBreakpoint": "Bedingten Haltepunkt hinzufügen...", "editConditionalBreakpoint": "Haltepunkt bearbeiten...", "setValue": "Wert festlegen", diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json new file mode 100644 index 00000000000..0d1413f84f9 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editConditionalBreakpoint": "Haltepunkt bearbeiten...", + "functionBreakpointsNotSupported": "Funktionshaltepunkte werden von diesem Debugtyp nicht unterstützt.", + "functionBreakpointPlaceholder": "Funktion mit Haltepunkt", + "functionBreakPointInputAriaLabel": "Geben Sie den Funktionshaltepunkt ein." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json new file mode 100644 index 00000000000..41bf2194e2d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "callstackSection": "Aufruflistenabschnitt", + "debugStopped": "Angehalten bei {0}", + "callStackAriaLabel": "Aufrufliste debuggen", + "process": "Prozess", + "paused": "Angehalten", + "running": "Wird ausgeführt", + "thread": "Thread", + "pausedOn": "Angehalten bei {0}", + "loadMoreStackFrames": "Weitere Stapelrahmen laden", + "threadAriaLabel": "Thread {0}, Aufrufliste, Debuggen", + "stackFrameAriaLabel": "Stapelrahmen {0} Zeile {1} {2}, Aufrufliste, Debuggen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 823e29f8a00..374a6cc5550 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,6 @@ "breakpointAdded": "Der Haltepunkt wurde hinzugefügt. Zeile {0}, Datei \"{1}\".", "breakpointRemoved": "Der Haltepunkt wurde entfernt. Zeile {0}, Datei \"{1}\".", "compoundMustHaveConfigurations": "Für den Verbund muss das Attribut \"configurations\" festgelegt werden, damit mehrere Konfigurationen gestartet werden können.", - "configMissing": "Konfiguration \"{0}\" fehlt in \"launch.json\".", "debugRequestNotSupported": "Das Attribut \"{0}\" hat in der ausgewählten Debugkonfiguration den nicht unterstützten Wert \"{1}\".", "debugRequesMissing": "Das Attribut \"{0}\" fehlt in der ausgewählten Debugkonfiguration.", "debugTypeNotSupported": "Der konfigurierte Debugtyp \"{0}\" wird nicht unterstützt.", diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json new file mode 100644 index 00000000000..c0d45dcc55f --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Variablenabschnitt", + "variablesAriaTreeLabel": "Variablen debuggen", + "variableValueAriaLabel": "Geben Sie einen neuen Variablenwert ein.", + "variableScopeAriaLabel": "Bereich {0}, Variablen, Debuggen", + "variableAriaLabel": "{0} Wert {1}, Variablen, Debuggen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json new file mode 100644 index 00000000000..7ee449cec7d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expressionsSection": "Ausdrucksabschnitt", + "watchAriaTreeLabel": "Überwachungsausdrücke debuggen", + "watchExpressionPlaceholder": "Zu überwachender Ausdruck", + "watchExpressionInputAriaLabel": "Geben Sie den Überwachungsausdruck ein.", + "watchExpressionAriaLabel": "{0} Wert {1}, Überwachen, Debuggen", + "watchVariableAriaLabel": "{0} Wert {1}, Überwachen, Debuggen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 625d2c1f1ce..0d5b18753ba 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -10,16 +10,12 @@ "Uninstalling": "Wird deinstalliert", "updateAction": "Aktualisieren", "updateTo": "Auf \"{0}\" aktualisieren", - "enableForWorkspaceAction.label": "Aktivieren (Arbeitsbereich)", - "enableAlwaysAction.label": "Aktivieren (immer)", - "disableForWorkspaceAction.label": "Deaktivieren (Arbeitsbereich)", - "disableAlwaysAction.label": "Deaktivieren (immer)", "ManageExtensionAction.uninstallingTooltip": "Wird deinstalliert", - "enableForWorkspaceAction": "Arbeitsbereich", - "enableGloballyAction": "Immer", + "enableForWorkspaceAction": "Aktivieren (Arbeitsbereich)", + "enableGloballyAction": "Aktivieren", "enableAction": "Aktivieren", - "disableForWorkspaceAction": "Arbeitsbereich", - "disableGloballyAction": "Immer", + "disableForWorkspaceAction": "Deaktivieren (Arbeitsbereich)", + "disableGloballyAction": "Deaktivieren", "disableAction": "Deaktivieren", "checkForUpdates": "Nach Updates suchen", "enableAutoUpdate": "Aktivere die automatische Aktualisierung von Erweiterungen", @@ -47,11 +43,8 @@ "allExtensionsInstalled": "Alle für diesen Arbeitsbereich empfohlenen Erweiterungen wurden bereits installiert.", "installRecommendedExtension": "Empfohlene Erweiterung installieren", "extensionInstalled": "Die empfohlene Erweiterung wurde bereits installiert.", - "showRecommendedKeymapExtensions": "Empfohlene Tastenzuordnungen anzeigen", "showRecommendedKeymapExtensionsShort": "Tastenzuordnungen", - "showLanguageExtensions": "Spracherweiterungen anzeigen", "showLanguageExtensionsShort": "Spracherweiterungen", - "showAzureExtensions": "Azure-Erweiterungen anzeigen", "showAzureExtensionsShort": "Azure-Erweiterungen", "OpenExtensionsFile.failed": "Die Datei \"extensions.json\" kann nicht im Ordner \".vscode\" erstellt werden ({0}).", "configureWorkspaceRecommendedExtensions": "Empfohlene Erweiterungen konfigurieren (Arbeitsbereich)", diff --git a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 18b47398935..576288a75d3 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -9,7 +9,7 @@ "extension": "Erweiterung", "extensions": "Erweiterungen", "view": "Anzeigen", + "developer": "Entwickler", "extensionsConfigurationTitle": "Erweiterungen", - "extensionsAutoUpdate": "Erweiterungen automatisch aktualisieren", - "extensionsIgnoreRecommendations": "Erweiterungsempfehlungen ignorieren" + "extensionsAutoUpdate": "Erweiterungen automatisch aktualisieren" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json new file mode 100644 index 00000000000..af3cf450594 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reportExtensionIssue": "Problem melden" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json new file mode 100644 index 00000000000..77d792d6a70 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "folders": "Ordner" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json new file mode 100644 index 00000000000..46de1e8541a --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Datei", + "revealInSideBar": "In Seitenleiste anzeigen", + "acceptLocalChanges": "Änderungen verwenden und Datenträgerinhalte überschreiben", + "revertLocalChanges": "Änderungen verwerfen und Datenträgerinhalte wiederherstellen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json new file mode 100644 index 00000000000..146bfaf2e06 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Wiederholen", + "rename": "Umbenennen", + "newFile": "Neue Datei", + "newFolder": "Neuer Ordner", + "openFolderFirst": "Öffnet zuerst einen Ordner, in dem Dateien oder Ordner erstellt werden.", + "newUntitledFile": "Neue unbenannte Datei", + "createNewFile": "Neue Datei", + "createNewFolder": "Neuer Ordner", + "deleteButtonLabelRecycleBin": "&&In Papierkorb verschieben", + "deleteButtonLabelTrash": "&&In Papierkorb verschieben", + "deleteButtonLabel": "&&Löschen", + "dirtyMessageFolderOneDelete": "Sie löschen einen Ordner mit nicht gespeicherten Änderungen in einer Datei. Möchten Sie den Vorgang fortsetzen?", + "dirtyMessageFolderDelete": "Sie löschen einen Ordner mit nicht gespeicherten Änderungen in {0} Dateien. Möchten Sie den Vorgang fortsetzen?", + "dirtyMessageFileDelete": "Sie löschen eine Datei mit nicht gespeicherten Änderungen. Möchten Sie den Vorgang fortsetzen?", + "dirtyWarning": "Ihre Änderungen gehen verloren, wenn Sie diese nicht speichern.", + "confirmMoveTrashMessageFolder": "Möchten Sie \"{0}\" samt Inhalt wirklich löschen?", + "confirmMoveTrashMessageFile": "Möchten Sie \"{0}\" wirklich löschen?", + "undoBin": "Die Wiederherstellung kann aus dem Papierkorb erfolgen.", + "undoTrash": "Die Wiederherstellung kann aus dem Papierkorb erfolgen.", + "doNotAskAgain": "Nicht erneut fragen", + "confirmDeleteMessageFolder": "Möchten Sie \"{0}\" samt Inhalt wirklich endgültig löschen?", + "confirmDeleteMessageFile": "Möchten Sie \"{0}\" wirklich endgültig löschen?", + "irreversible": "Diese Aktion kann nicht rückgängig gemacht werden.", + "permDelete": "Endgültig löschen", + "delete": "Löschen", + "importFiles": "Dateien importieren", + "confirmOverwrite": "Im Zielordner ist bereits eine Datei oder ein Ordner mit dem gleichen Namen vorhanden. Möchten Sie sie bzw. ihn ersetzen?", + "replaceButtonLabel": "&&Ersetzen", + "copyFile": "Kopieren", + "pasteFile": "Einfügen", + "duplicateFile": "Duplikat", + "openToSide": "Zur Seite öffnen", + "compareSource": "Für Vergleich auswählen", + "globalCompareFile": "Aktive Datei vergleichen mit...", + "openFileToCompare": "Zuerst eine Datei öffnen, um diese mit einer anderen Datei zu vergleichen", + "compareWith": "'{0}' mit '{1}' vergleichen", + "compareFiles": "Dateien vergleichen", + "refresh": "Aktualisieren", + "save": "Speichern", + "saveAs": "Speichern unter...", + "saveAll": "Alle speichern", + "saveAllInGroup": "Alle in der Gruppe speichern", + "saveFiles": "Alle Dateien speichern", + "revert": "Datei wiederherstellen", + "focusOpenEditors": "Fokus auf Ansicht \"Geöffnete Editoren\"", + "focusFilesExplorer": "Fokus auf Datei-Explorer", + "showInExplorer": "Aktive Datei in Seitenleiste anzeigen", + "openFileToShow": "Öffnet zuerst eine Datei, um sie im Explorer anzuzeigen.", + "collapseExplorerFolders": "Ordner im Explorer zuklappen", + "refreshExplorer": "Explorer aktualisieren", + "openFileInNewWindow": "Aktive Datei in neuem Fenster öffnen", + "openFileToShowInNewWindow": "Datei zuerst öffnen, um sie in einem neuen Fenster zu öffnen", + "revealInWindows": "Im Explorer anzeigen", + "revealInMac": "Im Finder anzeigen", + "openContainer": "Enthaltenden Ordner öffnen", + "revealActiveFileInWindows": "Aktive Datei im Windows-Explorer anzeigen", + "revealActiveFileInMac": "Aktive Datei im Finder anzeigen", + "openActiveFileContainer": "Enthaltenden Ordner der aktiven Datei öffnen", + "copyPath": "Pfad kopieren", + "copyPathOfActive": "Pfad der aktiven Datei kopieren", + "emptyFileNameError": "Es muss ein Datei- oder Ordnername angegeben werden.", + "fileNameExistsError": "Eine Datei oder ein Ordner **{0}** ist an diesem Ort bereits vorhanden. Wählen Sie einen anderen Namen.", + "invalidFileNameError": "Der Name **{0}** ist als Datei- oder Ordnername ungültig. Bitte wählen Sie einen anderen Namen aus.", + "filePathTooLongError": "Der Name **{0}** führt zu einem Pfad, der zu lang ist. Wählen Sie einen kürzeren Namen.", + "compareWithSaved": "Aktive Datei mit gespeicherter Datei vergleichen", + "modifiedLabel": "{0} (auf Datenträger) ↔ {1}" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json new file mode 100644 index 00000000000..c248ffc5682 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Datei zuerst öffnen, um ihren Pfad zu kopieren", + "openFileToReveal": "Datei zuerst öffnen, um sie anzuzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json new file mode 100644 index 00000000000..00a2164ceaa --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Explorer anzeigen", + "explore": "Explorer", + "view": "Anzeigen", + "textFileEditor": "Textdatei-Editor", + "binaryFileEditor": "Binärdatei-Editor", + "filesConfigurationTitle": "Dateien", + "exclude": "Konfigurieren Sie Globmuster zum Ausschließen von Dateien und Ordnern. Zum Beispiel entscheidet Explorer welche Dateien und Ordner gezeigt oder ausgeblendet werden anhand dieser Einstellung.", + "files.exclude.boolean": "Das Globmuster, mit dem Dateipfade verglichen werden sollen. Legen Sie diesen Wert auf \"true\" oder \"false\" fest, um das Muster zu aktivieren bzw. zu deaktivieren.", + "files.exclude.when": "Zusätzliche Überprüfung der gleichgeordneten Elemente einer entsprechenden Datei. Verwenden Sie \"$(basename)\" als Variable für den entsprechenden Dateinamen.", + "associations": "Konfigurieren Sie Dateizuordnungen zu Sprachen (beispielsweise \"*.extension\": \"html\"). Diese besitzen Vorrang vor den Standardzuordnungen der installierten Sprachen.", + "encoding": "Die Standardzeichensatz-Codierung, die beim Lesen und Schreiben von Dateien verwendet werden soll. Diese Einstellung kann auch pro Sprache konfiguriert werden.", + "autoGuessEncoding": "Wenn diese Option aktiviert ist, wird beim Öffnen von Dateien versucht, die Zeichensatzcodierung automatisch zu ermitteln. Diese Einstellung kann auch pro Sprache konfiguriert werden.", + "eol": "Das Zeilenende-Standardzeichen. Verwenden Sie \\n für LF und \\r\\n für CRLF.", + "trimTrailingWhitespace": "Bei Aktivierung werden nachgestellte Leerzeichen beim Speichern einer Datei gekürzt.", + "insertFinalNewline": "Bei Aktivierung wird beim Speichern einer Datei eine abschließende neue Zeile am Dateiende eingefügt.", + "trimFinalNewlines": "Wenn diese Option aktiviert ist, werden beim Speichern alle neuen Zeilen nach der abschließenden neuen Zeile am Dateiende gekürzt.", + "files.autoSave.off": "Eine geänderte Datei wird nie automatisch gespeichert.", + "files.autoSave.afterDelay": "Eine geänderte Datei wird automatisch nach der konfigurierten \"files.autoSaveDelay\" gespeichert.", + "files.autoSave.onFocusChange": "Eine geänderte Datei wird automatisch gespeichert, wenn der Editor den Fokus verliert.", + "files.autoSave.onWindowChange": "Eine geänderte Datei wird automatisch gespeichert, wenn das Fenster den Fokus verliert.", + "autoSave": "Steuert die automatische Speicherung geänderter Dateien. Zulässige Werte: \"{0}\", \"{1}\", \"{2}\" (Editor verliert den Fokus), \"{3}\" (Fenster verliert den Fokus). Wenn diese Angabe auf \"{4}\" festgelegt ist, können Sie die Verzögerung in \"files.autoSaveDelay\" konfigurieren.", + "autoSaveDelay": "Steuert die Verzögerung in Millisekunden, nach der eine geänderte Datei automatisch gespeichert wird. Nur gültig, wenn \"files.autoSave\" auf \"{0}\" festgelegt ist.", + "watcherExclude": "Konfigurieren Sie Globmuster von Dateipfaden, die von der Dateiüberwachung ausgeschlossen werden sollen. Muster müssen in absoluten Pfaden übereinstimmen (d. h. für eine korrekte Überstimmung muss das Präfix ** oder der vollständige Pfad verwendet werden). Das Ändern dieser Einstellung erfordert einen Neustart. Wenn Ihr Code beim Start viel CPU-Zeit beansprucht, können Sie große Ordner ausschließen, um die anfängliche Last zu verringern.", + "hotExit.off": "Hot Exit deaktivieren.", + "hotExit.onExit": "Hot Exit wird beim Schließen der Anwendung ausgelöst, d. h. wenn unter Windows/Linux das letzte Fenster geschlossen wird oder wenn der Befehl \"workbench.action.quit\" ausgelöst wird (Befehlspalette, Tastenzuordnung, Menü). Alle Fenster mit Sicherungen werden beim nächsten Start wiederhergestellt.", + "hotExit.onExitAndWindowClose": "Hot Exit wird beim Schließen der Anwendung, d. h. wenn unter Windows/Linux das letzte Fenster geschlossen wird, oder beim Auslösen des Befehls \"workbench.action.quit\" (Befehlspalette, Tastenzuordnung, Menü) sowie für jedes Fenster mit einem geöffneten Ordner ausgelöst, unabhängig davon, ob es das letzte Fenster ist. Alle Fenster ohne geöffnete Ordner werden beim nächsten Start wiederhergestellt. Legen Sie window.restoreWindows auf \"all\" fest, um Ordnerfenster im Zustand vor dem Herunterfahren wiederherzustellen. ", + "hotExit": "Steuert, ob nicht gespeicherten Dateien zwischen den Sitzungen beibehlten werden, die Aufforderung zum Speichern wird beim Beenden des Editors übersprungen.", + "useExperimentalFileWatcher": "Verwenden Sie die neue experimentelle Dateiüberwachung.", + "defaultLanguage": "Der Standardsprachmodus, der neuen Dateien zugewiesen wird.", + "editorConfigurationTitle": "Editor", + "formatOnSave": "Hiermit wird eine Datei beim Speichern formatiert. Es muss ein Formatierer vorhanden sein, die Datei darf nicht automatisch gespeichert werden, und der Editor darf nicht geschlossen werden.", + "explorerConfigurationTitle": "Datei-Explorer", + "openEditorsVisible": "Die Anzahl der Editoren, die im Bereich \"Geöffnete Editoren\" angezeigt werden. Legen Sie diesen Wert auf 0 fest, um den Bereich auszublenden.", + "dynamicHeight": "Steuert, ob sich die Höhe des Abschnitts \"Geöffnete Editoren\" dynamisch an die Anzahl der Elemente anpassen soll.", + "autoReveal": "Steuert, ob der Explorer Dateien beim Öffnen automatisch anzeigen und auswählen soll.", + "enableDragAndDrop": "Steuert, ob der Explorer das Verschieben von Dateien und Ordnern mithilfe von Drag Drop zulassen soll.", + "confirmDragAndDrop": "Steuert, ob der Explorer um Bestätigung bittet, um Dateien und Ordner per Drag & Drop zu verschieben.", + "confirmDelete": "Steuert, ob der Explorer um Bestätigung bitten soll, wenn Sie eine Datei über den Papierkorb löschen.", + "sortOrder.default": "Dateien und Ordner werden nach ihren Namen in alphabetischer Reihenfolge sortiert. Ordner werden vor Dateien angezeigt. ", + "sortOrder.mixed": "Dateien und Ordner werden nach ihren Namen in alphabetischer Reihenfolge sortiert. Dateien und Ordner werden vermischt angezeigt.", + "sortOrder.filesFirst": "Dateien und Ordner werden nach ihren Namen in alphabetischer Reihenfolge sortiert. Dateien werden vor Ordnern angezeigt.", + "sortOrder.type": "Dateien und Ordner werden nach ihren Erweiterungen in alphabetischer Reihenfolge sortiert. Ordner werden vor Dateien angezeigt.", + "sortOrder.modified": "Dateien und Ordner werden nach dem letzten Änderungsdatum in absteigender Reihenfolge sortiert. Ordner werden vor Dateien angezeigt.", + "sortOrder": "Steuert die Sortierreihenfolge von Dateien und Ordnern im Explorer. Zusätzlich zur Standardsortierreihenfolge können Sie die Reihenfolge auf \"mixed\" (kombinierte Sortierung von Dateien und Ordnern), \"type\" (nach Dateityp), \"modified\" (nach letztem Änderungsdatum) oder \"filesFirst\" (Dateien vor Ordnern anzeigen) festlegen.", + "explorer.decorations.colors": "Steuert, ob Dateidekorationen Farben verwenden.", + "explorer.decorations.badges": "Steuert, ob Dateidekorationen Badges verwenden." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json new file mode 100644 index 00000000000..55ed6344bee --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "userGuide": "Verwenden Sie die Aktionen auf der Editor-Symbolleiste auf der rechten Seite, um Ihre Änderungen **rückgängig zu machen** oder den Inhalt auf dem Datenträger mit Ihren Änderungen zu **überschreiben**.", + "discard": "Verwerfen", + "overwrite": "Überschreiben", + "retry": "Wiederholen", + "readonlySaveError": "Fehler beim Speichern von \"{0}\": Die Datei ist schreibgeschützt. Wählen Sie 'Überschreiben' aus, um den Schutz aufzuheben.", + "genericSaveError": "Fehler beim Speichern von \"{0}\": {1}.", + "staleSaveError": "Fehler beim Speichern von \"{0}\": Der Inhalt auf dem Datenträger ist neuer. Klicken Sie auf **Vergleichen**, um Ihre Version mit der Version auf dem Datenträger zu vergleichen.", + "compareChanges": "Vergleichen", + "saveConflictDiffLabel": "{0} (auf Datenträger) ↔ {1} (in {2}): Speicherkonflikt lösen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json new file mode 100644 index 00000000000..47a84100588 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Es ist kein Ordner geöffnet.", + "explorerSection": "Datei-Explorer-Abschnitt", + "noWorkspaceHelp": "Sie haben noch keinen Ordner zum Arbeitsbereich hinzugefügt.", + "noFolderHelp": "Sie haben noch keinen Ordner geöffnet.", + "openFolder": "Ordner öffnen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json new file mode 100644 index 00000000000..e516583e880 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label": "Explorer", + "canNotResolve": "Arbeitsbereichsordner kann nicht aufgelöst werden." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json new file mode 100644 index 00000000000..7846976127c --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Datei-Explorer-Abschnitt", + "treeAriaLabel": "Datei-Explorer" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json new file mode 100644 index 00000000000..9ec12051af9 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Geben Sie den Dateinamen ein. Drücken Sie zur Bestätigung die EINGABETASTE oder ESC, um den Vorgang abzubrechen.", + "filesExplorerViewerAriaLabel": "{0}, Datei-Explorer", + "dropFolders": "Möchten Sie die Ordner zum Arbeitsbereich hinzufügen?", + "dropFolder": "Möchten Sie den Ordner zum Arbeitsbereich hinzufügen?", + "addFolders": "&&Ordner hinzufügen", + "addFolder": "&&Ordner hinzufügen", + "doNotAskAgain": "Nicht erneut fragen", + "moveButtonLabel": "&&Verschieben", + "confirmOverwriteMessage": "{0} ist im Zielordner bereits vorhanden. Möchten Sie das Element ersetzen?", + "irreversible": "Diese Aktion kann nicht rückgängig gemacht werden.", + "replaceButtonLabel": "&&Ersetzen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json new file mode 100644 index 00000000000..a5003c84539 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Geöffnete Editoren", + "openEditosrSection": "Abschnitt \"Geöffnete Editoren\"", + "dirtyCounter": "{0} nicht gespeichert", + "saveAll": "Alle speichern", + "closeAllUnmodified": "Nicht geänderte schließen", + "closeAll": "Alle schließen", + "compareWithSaved": "Mit gespeicherter Datei vergleichen", + "close": "Schließen", + "closeOthers": "Andere schließen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json new file mode 100644 index 00000000000..aebc7895072 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, Editor-Gruppe", + "openEditorAriaLabel": "{0}, geöffnete Editoren", + "saveAll": "Alle speichern", + "closeAllUnmodified": "Nicht geänderte schließen", + "closeAll": "Alle schließen", + "compareWithSaved": "Mit gespeicherter Datei vergleichen", + "close": "Schließen", + "closeOthers": "Andere schließen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/deu/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/deu/src/vs/workbench/parts/markers/common/messages.i18n.json index d2105c83afe..162edd8cdb4 100644 --- a/i18n/deu/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,8 +6,6 @@ { "viewCategory": "Anzeigen", "problems.view.toggle.label": "Probleme umschalten", - "problems.view.show.label": "Probleme anzeigen", - "problems.view.hide.label": "Probleme ausblenden", "problems.panel.configuration.title": "Ansicht \"Probleme\"", "problems.panel.configuration.autoreveal": "Steuert, ob die Ansicht \"Probleme\" automatisch Dateien anzeigen sollte, wenn diese geöffnet werden.", "markers.panel.title.problems": "Probleme", diff --git a/i18n/deu/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json b/i18n/deu/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json new file mode 100644 index 00000000000..4aa1862f5cc --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "prof.message": "Profile wurden erfolgreich erstellt.", + "prof.detail": "Erstellen Sie ein Problem, und fügen Sie die folgenden Dateien manuell an:\n{0}", + "prof.restartAndFileIssue": "Problem erstellen und neu starten", + "prof.restart": "Neu starten", + "prof.thanks": "Danke für Ihre Hilfe.", + "prof.detail.restart": "Ein abschließender Neustart ist erforderlich um '{0}' nutzen zu können. Danke für Ihre Hilfe." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 911b6e02548..80ed5ad6589 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defineKeybinding.initial": "Betätigen Sie die gewünschte Tastenkombination und die Eingabetaste. Drücken Sie zum Abbrechen auf ESC.", "defineKeybinding.chordsTo": "Tastenkombination zu" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index b5dc5a9cd69..330233e4725 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -26,6 +26,7 @@ "editKeybindingLabel": "Tastenzuordnung ändern", "addKeybindingLabelWithKey": "Tastenbindung hinzufügen {0}", "addKeybindingLabel": "Tastenzuordnung hinzufügen", + "title": "{0} ({1})", "commandAriaLabel": "Befehl: {0}.", "keybindingAriaLabel": "Tastenzuordnung: {0}.", "noKeybinding": "Keine Tastenzuordnung zugewiesen.", diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 4a6cbbeb787..87d9424b74d 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -7,12 +7,12 @@ "settingsEditorName": "Standardeinstellungen", "SearchSettingsWidget.AriaLabel": "Einstellungen suchen", "SearchSettingsWidget.Placeholder": "Einstellungen suchen", - "totalSettingsMessage": "Insgesamt {0} Einstellungen", "noSettingsFound": "Keine Ergebnisse", "oneSettingFound": "1 Einstellung zugeordnet", "settingsFound": "{0} Einstellungen zugeordnet", - "fileEditorWithInputAriaLabel": "{0}. Textdatei-Editor.", - "fileEditorAriaLabel": "Textdatei-Editor", + "totalSettingsMessage": "Insgesamt {0} Einstellungen", + "defaultSettings": "Standardeinstellungen", + "defaultFolderSettings": "Standardordnereinstellungen", "defaultEditorReadonly": "Nehmen Sie im Editor auf der rechten Seite Änderungen vor, um Standardwerte zu überschreiben.", "preferencesAriaLabel": "Standardeinstellungen. Schreibgeschützter Text-Editor." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index e45478f5abf..cbf70edcf6a 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -7,8 +7,6 @@ "emptyUserSettingsHeader": "Platzieren Sie Ihre Einstellungen hier, um die Standardeinstellungen zu überschreiben.", "emptyWorkspaceSettingsHeader": "Platzieren Sie Ihre Einstellungen hier, um die Benutzereinstellungen zu überschreiben.", "emptyFolderSettingsHeader": "Platzieren Sie Ihre Ordnereinstellungen hier, um die Einstellungen in den Arbeitsbereichseinstellungen zu überschreiben.", - "defaultFolderSettingsTitle": "Standardordnereinstellungen", - "defaultSettingsTitle": "Standardeinstellungen", "editTtile": "Bearbeiten", "replaceDefaultValue": "In Einstellungen ersetzen", "copyDefaultValue": "In Einstellungen kopieren", diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index 9358ff2d211..bd64052e34b 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultSettingsFuzzyPrompt": "Testen Sie die Fuzzysuche!", "defaultSettings": "Platzieren Sie Ihre Einstellungen zum Überschreiben im Editor auf der rechten Seite.", "noSettingsFound": "Keine Einstellungen gefunden.", - "folderSettingsDetails": "Ordnereinstellungen", - "enableFuzzySearch": "Experimentelle Fuzzysuche aktivieren" + "settingsSwitcherBarAriaLabel": "Einstellungsumschaltung", + "userSettings": "Benutzereinstellungen", + "workspaceSettings": "Arbeitsbereichseinstellungen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json new file mode 100644 index 00000000000..e0f0a6f36c4 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Standardeditor für Einstellungen", + "keybindingsEditor": "Editor für Tastenzuordnungen", + "preferences": "Einstellungen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json index c5c0985f4fc..6119d2359c6 100644 --- a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -6,7 +6,6 @@ { "scm providers": "Quellcodeanbieter", "hideRepository": "Ausblenden", - "commitMessage": "Message (press {0} to commit)", "installAdditionalSCMProviders": "Installiere weiter SCM Provider...", "no open repo": "Es gibt keine aktiven Quellcodeanbieter.", "source control": "Quellcodeverwaltung", diff --git a/i18n/deu/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/deu/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index 04a624657a6..103e50639f4 100644 --- a/i18n/deu/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultLabel": "Eingabe", - "useIgnoreFilesDescription": "Ignorieren von Dateien verwenden", - "useExcludeSettingsDescription": "Ausschlusseinstellungen verwenden" + "defaultLabel": "Eingabe" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/search/browser/search.contribution.i18n.json index 577d7a656eb..a765a1ac06f 100644 --- a/i18n/deu/src/vs/workbench/parts/search/browser/search.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -16,7 +16,6 @@ "exclude.boolean": "Das Globmuster, mit dem Dateipfade verglichen werden sollen. Legen Sie diesen Wert auf \"true\" oder \"false\" fest, um das Muster zu aktivieren bzw. zu deaktivieren.", "exclude.when": "Zusätzliche Überprüfung der gleichgeordneten Elemente einer entsprechenden Datei. Verwenden Sie \"$(basename)\" als Variable für den entsprechenden Dateinamen.", "useRipgrep": "Steuert, ob \"ripgrep\" in der Text- und Dateisuche verwendet wird.", - "useIgnoreFilesByDefault": "Steuert, ob bei der Suche nach Text in einem neuen Arbeitsbereich standardmäßig GITIGNORE- und IGNORE-Dateien verwendet werden.", "useIgnoreFiles": "Steuert, ob bei der Suche nach Dateien GITIGNORE- und IGNORE-Dateien verwendet werden.", "search.quickOpen.includeSymbols": "Konfigurieren Sie diese Option, um Ergebnisse aus einer globalen Symbolsuche in die Dateiergebnisse für Quick Open einzuschließen.", "search.followSymlinks": "Steuert, ob Symlinks während der Suche gefolgt werden." diff --git a/i18n/deu/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/deu/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 5a178e2f2fa..f4671bfc3a8 100644 --- a/i18n/deu/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -10,17 +10,14 @@ "previousSearchExcludePattern": "Vorheriges Suchausschlussmuster anzeigen", "nextSearchTerm": "Nächsten Suchbegriff anzeigen", "previousSearchTerm": "Vorherigen Suchbegriff anzeigen", - "focusNextInputBox": "Fokus im nächsten Eingabefeld", - "focusPreviousInputBox": "Fokus im vorherigen Eingabefeld", "showSearchViewlet": "Suche anzeigen", "findInFiles": "In Dateien suchen", "findInFilesWithSelectedText": "In Dateien mit ausgewähltem Text suchen", "replaceInFiles": "In Dateien ersetzen", "replaceInFilesWithSelectedText": "In Dateien mit ausgewähltem Text ersetzen", - "findInWorkspace": "In Arbeitsbereich suchen...", - "findInFolder": "In Ordner suchen...", "RefreshAction.label": "Aktualisieren", - "ClearSearchResultsAction.label": "Suchergebnisse löschen", + "CollapseDeepestExpandedLevelAction.label": "Alle zuklappen", + "ClearSearchResultsAction.label": "Löschen", "FocusNextSearchResult.label": "Fokus auf nächstes Suchergebnis", "FocusPreviousSearchResult.label": "Fokus auf vorheriges Suchergebnis", "RemoveAction.label": "Schließen", diff --git a/i18n/deu/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json new file mode 100644 index 00000000000..a765a1ac06f --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Zu Symbol im Arbeitsbereich wechseln...", + "name": "Suchen", + "search": "Suchen", + "view": "Anzeigen", + "openAnythingHandlerDescription": "Zu Datei wechseln", + "openSymbolDescriptionNormal": "Zu Symbol im Arbeitsbereich wechseln", + "searchOutputChannelTitle": "Suchen", + "searchConfigurationTitle": "Suchen", + "exclude": "Konfigurieren Sie Globmuster zum Ausschließen von Dateien und Ordnern in Suchvorgängen. Alle Globmuster werden von der files.exclude-Einstellung geerbt.", + "exclude.boolean": "Das Globmuster, mit dem Dateipfade verglichen werden sollen. Legen Sie diesen Wert auf \"true\" oder \"false\" fest, um das Muster zu aktivieren bzw. zu deaktivieren.", + "exclude.when": "Zusätzliche Überprüfung der gleichgeordneten Elemente einer entsprechenden Datei. Verwenden Sie \"$(basename)\" als Variable für den entsprechenden Dateinamen.", + "useRipgrep": "Steuert, ob \"ripgrep\" in der Text- und Dateisuche verwendet wird.", + "useIgnoreFiles": "Steuert, ob bei der Suche nach Dateien GITIGNORE- und IGNORE-Dateien verwendet werden.", + "search.quickOpen.includeSymbols": "Konfigurieren Sie diese Option, um Ergebnisse aus einer globalen Symbolsuche in die Dateiergebnisse für Quick Open einzuschließen.", + "search.followSymlinks": "Steuert, ob Symlinks während der Suche gefolgt werden." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/deu/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json new file mode 100644 index 00000000000..b9ef9877508 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "findInFolder": "In Ordner suchen...", + "findInWorkspace": "In Arbeitsbereich suchen..." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index b4b3f22afbb..00be7fe56b6 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -6,9 +6,7 @@ { "tasksCategory": "Aufgaben", "ConfigureTaskRunnerAction.label": "Aufgabe konfigurieren", - "ConfigureBuildTaskAction.label": "Buildtask konfigurieren", "CloseMessageAction.label": "Schließen", - "ShowTerminalAction.label": "Terminal anzeigen", "problems": "Probleme", "manyMarkers": "mehr als 99", "runningTasks": "Aktive Aufgaben anzeigen", @@ -52,7 +50,6 @@ "TaslService.noEntryToRun": "Es wurde keine auszuführende Aufgabe gefunden. Aufgaben konfigurieren...", "TaskService.fetchingBuildTasks": "Buildaufgaben werden abgerufen...", "TaskService.pickBuildTask": "Auszuführende Buildaufgabe auswählen", - "TaskService.noBuildTask": "Es wurde keine auszuführende Buildaufgabe gefunden. Aufgaben konfigurieren...", "TaskService.fetchingTestTasks": "Testaufgaben werden abgerufen...", "TaskService.pickTestTask": "Auszuführende Testaufgabe auswählen", "TaskService.noTestTaskTerminal": "Es wurde keine auszuführende Testaufgabe gefunden. Aufgaben konfigurieren...", diff --git a/i18n/deu/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index 89dde23b864..5b756d8c221 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,8 +14,6 @@ "ConfigurationParser.noTypeDefinition": "Fehler: Der registrierte Aufgabentyp \"{0}\" ist nicht vorhanden. Wurde möglicherweise eine Erweiterung nicht installiert, die den entsprechenden Aufgabenanbieter bereitstellt?", "ConfigurationParser.missingRequiredProperty": "Fehler: Die Aufgabenkonfiguration \"{0}\" enthält die erforderlich Eigenschaft \"{1}\" nicht. Die Aufgabenkonfiguration wird ignoriert.", "ConfigurationParser.notCustom": "Fehler: Die Aufgabe ist nicht als benutzerdefinierte Aufgabe deklariert. Die Konfiguration wird ignoriert.\n{0}\n", - "ConfigurationParser.noTaskName": "Fehler: Tasks müssen eine Eigenschaft \"TaskName\" angeben. Der Task wird ignoriert.\n{0}\n", - "taskConfiguration.shellArgs": "Warnung: Die Aufgabe \"{0}\" ist ein Shellbefehl, und der Befehlsname oder eines seiner Argumente enthält Leerzeichen ohne Escapezeichen. Führen Sie Argumente im Befehl zusammen, um eine korrekte Angabe der Befehlszeile sicherzustellen.", "taskConfiguration.noCommandOrDependsOn": "Fehler: Aufgabe \"{0}\" definiert keinen Befehl bzw. keine depondsOn-Eigenschaft. Die Aufgabe wird ignoriert. Die Definition lautet:\n{1}", "taskConfiguration.noCommand": "Fehler: Aufgabe \"{0}\" definiert keinen Befehl. Die Aufgabe wird ignoriert. Die Definition lautet:\n{1}", "TaskParse.noOsSpecificGlobalTasks": "Die Aufgabenversion 2.0.0 unterstützt globale betriebssystemspezifische Aufgaben nicht. Konvertieren Sie sie in eine Aufgabe mit einem betriebssystemspezifischen Befehl. Folgende Aufgaben sind hiervon betroffen:\n{0}" diff --git a/i18n/deu/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index 331fd59e24c..8e202f7f450 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,7 +6,7 @@ { "termEntryAriaLabel": "{0}, Terminalauswahl", "termCreateEntryAriaLabel": "{0}, neues Terminal erstellen", - "'workbench.action.terminal.newplus": "$(plus) Neues integriertes Terminal erstellen", + "workbench.action.terminal.newplus": "$(plus) Neues integriertes Terminal erstellen", "noTerminalsMatching": "Keine übereinstimmenden Terminals", "noTerminalsFound": "Keine geöffneten Terminals" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index bc6dee18ad0..aa687c62c7d 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,7 +16,6 @@ "terminal.integrated.rightClickCopyPaste": "Wenn dies festgelegt ist, erscheint das Kontextmenü bei einem Rechtsklick im Terminal nicht mehr. Stattdessen erfolgen die Vorgänge Kopieren, wenn eine Auswahl vorgenommen wurde, sowie Einfügen, wenn keine Auswahl vorgenommen wurde.", "terminal.integrated.fontFamily": "Steuert die Schriftartfamilie des Terminals. Der Standardwert ist \"editor.fontFamily\".", "terminal.integrated.fontSize": "Steuert den Schriftgrad des Terminals in Pixeln.", - "terminal.integrated.lineHeight": "Steuert die Zeilenhöhe für das Terminal. Dieser Wert wird mit dem Schriftgrad des Terminals multipliziert, um die tatsächliche Zeilenhöhe in Pixeln zu erhalten.", "terminal.integrated.enableBold": "Gibt an, ob Fettdruck im Terminal aktiviert wird. Dies muss durch die Terminalshell unterstützt werden.", "terminal.integrated.cursorBlinking": "Steuert, ob der Terminalcursor blinkt.", "terminal.integrated.cursorStyle": "Steuert den Stil des Terminalcursors.", diff --git a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 5b38193cdec..ec4d01388da 100644 --- a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -8,10 +8,9 @@ "installColorThemes": "Zusätzliche Farbschemas installieren...", "themes.selectTheme": "Farbdesign auswählen (eine Vorschau wird mit den Tasten NACH OBEN/NACH UNTEN angezeigt)", "selectIconTheme.label": "Dateisymboldesign", - "installIconThemes": "Zusätzliche Dateisymbolschemas installieren...", "noIconThemeLabel": "Keine", "noIconThemeDesc": "Dateisymbole deaktivieren", - "problemChangingIconTheme": "Problem beim Festlegen des Symboldesigns: {0}", + "installIconThemes": "Zusätzliche Dateisymbolschemas installieren...", "themes.selectIconTheme": "Dateisymboldesign auswählen", "generateColorTheme.label": "Farbdesign aus aktuellen Einstellungen erstellen", "preferences": "Einstellungen", diff --git a/i18n/deu/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/deu/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index d6a37d8334e..cdafc1add68 100644 --- a/i18n/deu/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/deu/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -9,9 +9,9 @@ "scope.window.description": "Fensterspezifische Konfiguration, die in den Benutzer- oder Arbeitsbereichseinstellungen konfiguriert werden kann.", "scope.resource.description": "Ressourcenspezifische Konfiguration, die in den Benutzer-, Arbeitsbereichs- oder Ordnereinstellungen konfiguriert werden kann.", "scope.description": "Bereich, in dem die Konfiguration gültig ist. Verfügbare Gültigkeitsbereiche sind \"window\" und \"resource\".", + "vscode.extension.contributes.defaultConfiguration": "Trägt zu Konfigurationeinstellungen des Standard-Editors für die jeweilige Sprache bei.", "vscode.extension.contributes.configuration": "Trägt Konfigurationseigenschaften bei.", "invalid.title": "configuration.title muss eine Zeichenfolge sein.", - "vscode.extension.contributes.defaultConfiguration": "Trägt zu Konfigurationeinstellungen des Standard-Editors für die jeweilige Sprache bei.", "invalid.properties": "\"configuration.properties\" muss ein Objekt sein.", "invalid.allOf": "\"configuration.allOf\" ist veraltet und sollte nicht mehr verwendet werden. Übergeben Sie stattdessen mehrere Konfigurationsabschnitte als Array an den Beitragspunkt \"configuration\".", "workspaceConfig.folders.description": "Liste von Ordnern, die in den Arbeitsbereich geladen werden.", diff --git a/i18n/deu/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json b/i18n/deu/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json new file mode 100644 index 00000000000..f7a2d1f0c3f --- /dev/null +++ b/i18n/deu/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetrie", + "telemetry.enableCrashReporting": "Aktiviert Absturzberichte, die an Microsoft gesendet werden.\nDiese Option erfordert einen Neustart, damit sie wirksam wird." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/deu/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index 336dc274f39..8b6ad71cd4e 100644 --- a/i18n/deu/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "bubbleTitle": "enthält hervorgehobene Elemente" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/deu/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/deu/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/deu/src/vs/workbench/services/files/node/fileService.i18n.json index 82912560d86..c16b29bce92 100644 --- a/i18n/deu/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/files/node/fileService.i18n.json @@ -8,8 +8,8 @@ "fileIsDirectoryError": "Die Datei ist ein Verzeichnis", "fileNotModifiedError": "Datei nicht geändert seit", "fileTooLargeError": "Die Datei ist zu groß, um sie zu öffnen.", - "fileBinaryError": "Die Datei scheint eine Binärdatei zu sein und kann nicht als Text geöffnet werden.", "fileNotFoundError": "Die Datei wurde nicht gefunden ({0}).", + "fileBinaryError": "Die Datei scheint eine Binärdatei zu sein und kann nicht als Text geöffnet werden.", "fileExists": "Die zu erstellende Datei ist bereits vorhanden ({0}). ", "fileMoveConflict": "Verschieben/Kopieren kann nicht ausgeführt werden. Die Datei ist am Ziel bereits vorhanden.", "unableToMoveCopyError": "Der Verschiebe-/Kopiervorgang kann nicht ausgeführt werden. Die Datei würde den Ordner ersetzen, in dem sie enthalten ist.", diff --git a/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 2bf19b5b050..9e3cbe8e7cb 100644 --- a/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -21,6 +21,5 @@ "keybindings.json.command": "Der Name des auszuführenden Befehls.", "keybindings.json.when": "Die Bedingung, wann der Schlüssel aktiv ist.", "keybindings.json.args": "Argumente, die an den auszuführenden Befehl übergeben werden sollen.", - "keyboardConfigurationTitle": "Tastatur", - "dispatch": "Steuert die Abgangslogik, sodass bei einem Tastendruck entweder \"keydown.code\" (empfohlen) oder \"keydown.keyCode\" verwendet wird." + "keyboardConfigurationTitle": "Tastatur" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/deu/src/vs/workbench/services/textfile/common/textFileService.i18n.json index eb134927712..8b6ad71cd4e 100644 --- a/i18n/deu/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "files.backup.failSave": "Die Dateien konnten nicht gesichert werden (Fehler: {0}). Versuchen Sie, Ihre Dateien zu speichern, um den Vorgang zu beenden." -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index d551e506d69..7d1b7fccbe0 100644 --- a/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "migration.completed": "Den Benutzereinstellungen wurden neue Designeinstellungen hinzugefügt. Sicherung verfügbar unter {0}.", "error.cannotloadtheme": "Unable to load {0}: {1}", - "error.cannotloadicontheme": "Unable to load {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Gibt das in der Workbench verwendete Symboldesign oder \"null\", um keine Dateisymbole anzuzeigen, an.", diff --git a/i18n/esn/extensions/css/client/out/cssMain.i18n.json b/i18n/esn/extensions/css/client/out/cssMain.i18n.json index 876a9439272..649760d7cc9 100644 --- a/i18n/esn/extensions/css/client/out/cssMain.i18n.json +++ b/i18n/esn/extensions/css/client/out/cssMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "cssserver.name": "Servidor de lenguaje CSS" + "cssserver.name": "Servidor de lenguaje CSS", + "folding.start": "Inicio de la región plegable", + "folding.end": "Fin de la región plegable" } \ No newline at end of file diff --git a/i18n/esn/extensions/git/out/autofetch.i18n.json b/i18n/esn/extensions/git/out/autofetch.i18n.json new file mode 100644 index 00000000000..270030fe345 --- /dev/null +++ b/i18n/esn/extensions/git/out/autofetch.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yes": "Sí", + "no": "No", + "not now": "Ahora No", + "suggest auto fetch": "¿Desea habilitar la búsqueda automática de repositorios de Git?" +} \ No newline at end of file diff --git a/i18n/esn/extensions/git/out/commands.i18n.json b/i18n/esn/extensions/git/out/commands.i18n.json index 69862736c9d..2258e175547 100644 --- a/i18n/esn/extensions/git/out/commands.i18n.json +++ b/i18n/esn/extensions/git/out/commands.i18n.json @@ -9,9 +9,12 @@ "create branch": "$(plus) crear nueva rama", "repourl": "URL del repositorio", "parent": "Directorio principal", + "cancel": "$(sync~spin) Clonando repositorio... Haga clic para cancelar", + "cancel tooltip": "Cancelar clonación", "cloning": "Clonando el repositorio GIT...", "openrepo": "Abrir repositorio", "proposeopen": "¿Desea abrir el repositorio clonado?", + "init": "Seleccione una carpeta de área de trabajo en la que inicializar el repositorio de git", "init repo": "Inicializar el repositorio", "create repo": "Inicializar el repositorio", "are you sure": "Esto creará un repositorio Git en '{0}'. ¿Está seguro de que desea continuar?", @@ -49,12 +52,15 @@ "select branch to delete": "Seleccione una rama para borrar", "confirm force delete branch": "La rama '{0}' no está completamente fusionada. ¿Borrarla de todas formas?", "delete branch": "Borrar rama...", + "invalid branch name": "Nombre de rama no válido", + "branch already exists": "Ya existe una rama como '{0}'", "select a branch to merge from": "Seleccione una rama desde la que fusionar", "merge conflicts": "Hay conflictos de fusión. Resuelvalos antes de confirmar.", "tag name": "Nombre de la etiqueta", "provide tag name": "Por favor proporcione un nombre de etiqueta", "tag message": "Mensaje", "provide tag message": "Por favor, especifique un mensaje para anotar la etiqueta", + "no remotes to fetch": "El repositorio no tiene remotos configurados de los que extraer.", "no remotes to pull": "El repositorio no tiene remotos configurados de los que extraer.", "pick remote pull repo": "Seleccione un origen remoto desde el que extraer la rama", "no remotes to push": "El repositorio no tiene remotos configurados en los que insertar.", @@ -71,7 +77,7 @@ "no stashes": "No hay cambios guardados provisionalmente para restaurar.", "pick stash to pop": "Elija un cambio guardado provisionalmente para aplicarlo y quitarlo", "clean repo": "Limpie el árbol de trabajo del repositorio antes de la desprotección.", - "cant push": " No puede ejecutar la solicitud de inserción remotamente. Solicite un Pull para integrar los cambios.", + "cant push": "No se pueden enviar referencias al remoto. Intenta ejecutar 'Pull' primero para integrar tus cambios.", "git error details": "GIT: {0}", "git error": "Error de GIT", "open git log": "Abrir registro de GIT" diff --git a/i18n/esn/extensions/git/out/main.i18n.json b/i18n/esn/extensions/git/out/main.i18n.json index 83a9874c3d6..cc3a1763339 100644 --- a/i18n/esn/extensions/git/out/main.i18n.json +++ b/i18n/esn/extensions/git/out/main.i18n.json @@ -4,8 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "looking": "Buscando git en: {0}", "using git": "Usando GIT {0} desde {1}", - "updateGit": "Actualizar GIT", + "downloadgit": "Descargar Git", "neverShowAgain": "No volver a mostrar", + "notfound": "Git no encontrado. Instálalo o configúralo usando la configuración 'git.path'.", + "updateGit": "Actualizar GIT", "git20": "Parece que tiene instalado GIT {0}. El código funciona mejor con GIT >= 2" } \ No newline at end of file diff --git a/i18n/esn/extensions/git/out/repository.i18n.json b/i18n/esn/extensions/git/out/repository.i18n.json index fc557b451ea..46723c0d880 100644 --- a/i18n/esn/extensions/git/out/repository.i18n.json +++ b/i18n/esn/extensions/git/out/repository.i18n.json @@ -21,6 +21,7 @@ "deleted by us": "Borrado por nosotros", "both added": "Ambos añadidos", "both modified": "Ambos modificados", + "commitMessage": "Message (press {0} to commit)", "commit": "Confirmar", "merge changes": "Fusionar cambios mediante combinación", "staged changes": "Cambios almacenados provisionalmente", diff --git a/i18n/esn/extensions/git/package.i18n.json b/i18n/esn/extensions/git/package.i18n.json index a2502269e64..c0bb492d13e 100644 --- a/i18n/esn/extensions/git/package.i18n.json +++ b/i18n/esn/extensions/git/package.i18n.json @@ -33,8 +33,10 @@ "command.checkout": "Desproteger en...", "command.branch": "Crear rama...", "command.deleteBranch": "Borrar rama...", + "command.renameBranch": "Renombrar Rama...", "command.merge": "Fusionar rama...", "command.createTag": "Crear etiqueta", + "command.fetch": "Buscar", "command.pull": "Incorporación de cambios", "command.pullRebase": "Incorporación de cambios (fusionar mediante cambio de base)", "command.pullFrom": "Extraer de...", @@ -42,9 +44,11 @@ "command.pushTo": "Insertar en...", "command.pushWithTags": "Insertar con etiquetas", "command.sync": "Sincronizar", + "command.syncRebase": "Sincronizar (Rebase)", "command.publish": "Publicar rama", "command.showOutput": "Mostrar salida de GIT", "command.ignore": "Agregar archivo a .gitignore", + "command.stashIncludeUntracked": "Guardar provisionalmente (Incluir sin seguimiento)", "command.stash": "Guardar provisionalmente", "command.stashPop": "Aplicar y quitar cambios guardados provisionalmente...", "command.stashPopLatest": "Aplicar y quitar últimos cambios guardados provisionalmente...", @@ -57,6 +61,7 @@ "config.countBadge": "Controla el contador de insignia de Git. \"Todo\" cuenta todos los cambios. \"Seguimiento\" solamente cuenta los cambios realizados. \"Desactivado\" lo desconecta.", "config.checkoutType": "Controla el tipo de ramas listadas cuando ejecuta \"Desproteger\". \"Todo\" muetra todas las referencias, \"local\" solamente las ramas locales y \"remoto\" las ramas remotas.", "config.ignoreLegacyWarning": "Ignora las advertencias hereradas de Git", + "config.ignoreMissingGitWarning": "Ignora la advertencia cuando falta Git", "config.ignoreLimitWarning": "\nIgnora advertencias cuando se encuentran muchos cambios en un repositorio.", "config.defaultCloneDirectory": "La ubicación predeterminada en la que se clona un repositorio git", "config.enableSmartCommit": "Confirmar todos los cambios cuando no hay elementos almacenados provisionalmente.", diff --git a/i18n/esn/extensions/html/client/out/htmlMain.i18n.json b/i18n/esn/extensions/html/client/out/htmlMain.i18n.json index f7404453907..d2fd055fb74 100644 --- a/i18n/esn/extensions/html/client/out/htmlMain.i18n.json +++ b/i18n/esn/extensions/html/client/out/htmlMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "htmlserver.name": "Servidor de lenguaje HTML" + "htmlserver.name": "Servidor de lenguaje HTML", + "folding.start": "Inicio de la región plegable", + "folding.end": "Fin de la región plegable" } \ No newline at end of file diff --git a/i18n/esn/extensions/markdown/out/commands.i18n.json b/i18n/esn/extensions/markdown/out/commands.i18n.json new file mode 100644 index 00000000000..98e4bfb36f8 --- /dev/null +++ b/i18n/esn/extensions/markdown/out/commands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previewTitle": "Vista Previa {0}", + "onPreviewStyleLoadError": "No se pudo cargar 'markdown.styles': {0}" +} \ No newline at end of file diff --git a/i18n/esn/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/esn/extensions/markdown/out/features/previewContentProvider.i18n.json new file mode 100644 index 00000000000..dc058764af6 --- /dev/null +++ b/i18n/esn/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "Se ha deshabilitado parte del contenido de este documento", + "preview.securityMessage.title": "Se ha deshabilitado el contenido potencialmente inseguro en la previsualización de Markdown. Para permitir el contenido inseguro o habilitar scripts cambie la configuración de la previsualización de Markdown", + "preview.securityMessage.label": "Alerta de seguridad de contenido deshabilitado" +} \ No newline at end of file diff --git a/i18n/esn/extensions/markdown/out/security.i18n.json b/i18n/esn/extensions/markdown/out/security.i18n.json index ec5482bbbf2..c4fee815196 100644 --- a/i18n/esn/extensions/markdown/out/security.i18n.json +++ b/i18n/esn/extensions/markdown/out/security.i18n.json @@ -11,5 +11,8 @@ "disable.title": "Deshabilitar", "disable.description": "Permitir todo el contenido y la ejecución de scripts. No se recomienda.", "moreInfo.title": "Más información", + "enableSecurityWarning.title": "Habilitar advertencias de seguridad de vista previa en este espacio de trabajo", + "disableSecurityWarning.title": "Deshabilitar advertencias de seguridad de vista previa en este espacio de trabajo", + "toggleSecurityWarning.description": "No afecta el nivel de seguridad del contenido", "preview.showPreviewSecuritySelector.title": "Seleccione configuración de seguridad para las previsualizaciones de Markdown en esta área de trabajo" } \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/package.i18n.json b/i18n/esn/extensions/merge-conflict/package.i18n.json index b72c99c527d..b4a0d10e998 100644 --- a/i18n/esn/extensions/merge-conflict/package.i18n.json +++ b/i18n/esn/extensions/merge-conflict/package.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "Fusionar conflicto", + "command.accept.all-current": "Aceptar todo actual", "command.accept.all-incoming": "Aceptar todos los entrantes", "command.accept.all-both": "Aceptar ambos", "command.accept.current": "Aceptar actuales", diff --git a/i18n/esn/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/esn/extensions/typescript/out/features/completionItemProvider.i18n.json index 0f96519f3fa..0e9c911e841 100644 --- a/i18n/esn/extensions/typescript/out/features/completionItemProvider.i18n.json +++ b/i18n/esn/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "selectCodeAction": "Seleccione acción de código para aplicar", "acquiringTypingsLabel": "Adquiriendo typings...", "acquiringTypingsDetail": "Adquiriendo definiciones de typings para IntelliSense.", "autoImportLabel": "Importar automáticamente desde {0}" diff --git a/i18n/esn/extensions/typescript/package.i18n.json b/i18n/esn/extensions/typescript/package.i18n.json index b5f0de6515d..c662623ffcc 100644 --- a/i18n/esn/extensions/typescript/package.i18n.json +++ b/i18n/esn/extensions/typescript/package.i18n.json @@ -39,6 +39,7 @@ "typescript.openTsServerLog.title": "Abrir registro del servidor de TS", "typescript.restartTsServer": "Reiniciar servidor TS", "typescript.selectTypeScriptVersion.title": "Seleccionar versión de TypeScript", + "typescript.reportStyleChecksAsWarnings": "Notificar comprobaciones de estilo como advertencias", "jsDocCompletion.enabled": "Habilita o deshabilita comentarios automaticos de JSDoc", "javascript.implicitProjectConfig.checkJs": "Habilita/deshabilita la comprobación semántica de los archivos JavaScript. Los archivos jsconfig.json o tsconfig.json reemplazan esta configuración. Se requiere TypeScript >=2.3.1.", "typescript.npm": "Especifica la ruta de acceso al archivo ejecutable de NPM usada para la adquisición automática de tipos. Requiere TypeScript >= 2.3.4.", diff --git a/i18n/esn/src/vs/base/common/errorMessage.i18n.json b/i18n/esn/src/vs/base/common/errorMessage.i18n.json index ccfa6a32d0b..f7b3549ebd5 100644 --- a/i18n/esn/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/esn/src/vs/base/common/errorMessage.i18n.json @@ -4,13 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "message": "{0}. Código de error: {1}", - "error.permission.verbose": "Permiso denegado (HTTP {0})", - "error.permission": "Permiso denegado", - "error.http.verbose": "{0} (HTTP {1}: {2})", - "error.http": "{0} (HTTP {1})", - "error.connection.unknown.verbose": "Error de conexión desconocido ({0})", - "error.connection.unknown": "Error de conexión desconocido. Es posible que ya no esté conectado a Internet o que el servidor al que se había conectado esté sin conexión.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "Se ha producido un error desconocido. Consulte el registro para obtener más detalles.", "nodeExceptionMessage": "Error del sistema ({0})", diff --git a/i18n/esn/src/vs/code/electron-main/main.i18n.json b/i18n/esn/src/vs/code/electron-main/main.i18n.json new file mode 100644 index 00000000000..f4596c96fad --- /dev/null +++ b/i18n/esn/src/vs/code/electron-main/main.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "secondInstanceNoResponse": "Se está ejecutando otra instancia de {0} pero no responde", + "secondInstanceNoResponseDetail": "Cierre todas las demás instancias y vuelva a intentarlo.", + "secondInstanceAdmin": "Ya se está ejecutando una segunda instancia de {0} como administrador.", + "secondInstanceAdminDetail": "Cierre la otra instancia y vuelva a intentarlo.", + "close": "&&Cerrar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/code/electron-main/menus.i18n.json b/i18n/esn/src/vs/code/electron-main/menus.i18n.json index 484face7717..2078d3df9fe 100644 --- a/i18n/esn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/esn/src/vs/code/electron-main/menus.i18n.json @@ -22,12 +22,12 @@ "miQuit": "Salir de {0}", "miNewFile": "&&Nuevo archivo", "miOpen": "Abrir...", - "miOpenWorkspace": "&& Abrir el espacio de trabajo...", + "miOpenWorkspace": "Abrir área de trabajo...", "miOpenFolder": "Abrir &&carpeta...", "miOpenFile": "&&Abrir archivo...", "miOpenRecent": "Abrir &&reciente", - "miSaveWorkspaceAs": "&& Guardar espacio de trabajo como...", - "miAddFolderToWorkspace": "&&Agregar carpeta al área de trabajo...", + "miSaveWorkspaceAs": "Guardar área de trabajo como...", + "miAddFolderToWorkspace": "Agregar carpeta al área de trabajo...", "miSave": "&&Guardar", "miSaveAs": "Guardar &&como...", "miSaveAll": "Guardar t&&odo", @@ -157,7 +157,7 @@ "mMergeAllWindows": "Fusionar todas las ventanas", "miToggleDevTools": "&&Alternar herramientas de desarrollo", "miAccessibilityOptions": "&&Opciones de accesibilidad", - "miReportIssues": "&&Notificar problemas", + "miReportIssue": "&&Notificar problema", "miWelcome": "&&Bienvenido", "miInteractivePlayground": "Ãrea de juegos &&interactiva", "miDocumentation": "&&Documentación", @@ -184,6 +184,7 @@ "miDownloadingUpdate": "Descargando actualización...", "miInstallingUpdate": "Instalando actualización...", "miCheckForUpdates": "Buscar actualizaciones...", - "aboutDetail": "\nVersión: {0}\nConfirmación: {1}\nFecha: {2}\nShell: {3}\nRepresentador: {4}\nNodo {5}\nArquitectura {6}", - "okButton": "Aceptar" + "aboutDetail": "Versión: {0}\nConfirmación: {1}\nFecha: {2}\nShell: {3}\nRepresentador: {4}\nNodo {5}\nArquitectura {6}", + "okButton": "Aceptar", + "copy": "&&Copiar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/browser/services/bulkEdit.i18n.json b/i18n/esn/src/vs/editor/browser/services/bulkEdit.i18n.json new file mode 100644 index 00000000000..73e3dfa4ecd --- /dev/null +++ b/i18n/esn/src/vs/editor/browser/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "Estos archivos han cambiado durante el proceso: {0}", + "summary.0": "No se realizaron ediciones", + "summary.nm": "{0} ediciones de texto en {1} archivos", + "summary.n0": "{0} ediciones de texto en un archivo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json index 67e2a10947c..97f2cfda15a 100644 --- a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,7 +10,11 @@ "fontSize": "Controla el tamaño de fuente en píxeles.", "lineHeight": "Controla la altura de línea. Utilice 0 para calcular el valor de lineHeight a partir de fontSize.", "letterSpacing": "Controla el espacio entre letras en pixels.", - "lineNumbers": "Controla la presentación de los números de línea. Los valores posibles son \"on\", \"off\" y \"relative\". \"relative\" muestra el número de líneas desde la posición actual del cursor.", + "lineNumbers.off": "Los números de línea no se muestran.", + "lineNumbers.on": "Los números de línea se muestran como un número absoluto.", + "lineNumbers.relative": "Los números de línea se muestran como distancia en líneas a la posición del cursor.", + "lineNumbers.interval": "Los números de línea se muestran cada 10 líneas.", + "lineNumbers": "Controla la visualización de números de línea. Los valores posibles son 'on', 'off' y 'relative'.", "rulers": "Representar reglas verticales después de un cierto número de caracteres monoespacio. Usar multiples valores para multiples reglas. No se dibuja ninguna regla si la matriz esta vacía.", "wordSeparators": "Caracteres que se usarán como separadores de palabras al realizar operaciones o navegaciones relacionadas con palabras.", "tabSize": "El número de espacios a los que equivale una tabulación. Este valor se invalida según el contenido del archivo cuando `editor.detectIndentation` está activado.", @@ -89,8 +93,8 @@ "links": "Controla si el editor debe detectar enlaces y hacerlos cliqueables", "colorDecorators": "Controla si el editor debe representar el Selector de colores y los elementos Decorator de color en línea.", "codeActions": "Permite que el foco de acción del código", + "selectionClipboard": "Controla si el portapapeles principal de Linux debe admitirse.", "sideBySide": "Controla si el editor de diferencias muestra las diferencias en paralelo o alineadas.", "ignoreTrimWhitespace": "Controla si el editor de diferencias muestra los cambios de espacio inicial o espacio final como diferencias.", - "renderIndicators": "Controla si el editor de diff muestra indicadores +/- para cambios agregados/quitados", - "selectionClipboard": "Controla si el portapapeles principal de Linux debe admitirse." + "renderIndicators": "Controla si el editor de diff muestra indicadores +/- para cambios agregados/quitados" } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/esn/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json new file mode 100644 index 00000000000..8c194fd8751 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Ir al corchete" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json b/i18n/esn/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json new file mode 100644 index 00000000000..ab2cb66648b --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "Mover símbolo de inserción a la izquierda", + "caret.moveRight": "Mover símbolo de inserción a la derecha" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/caretOperations/transpose.i18n.json b/i18n/esn/src/vs/editor/contrib/caretOperations/transpose.i18n.json new file mode 100644 index 00000000000..ccd3a5c6ff4 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/caretOperations/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Transponer letras" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/clipboard/clipboard.i18n.json b/i18n/esn/src/vs/editor/contrib/clipboard/clipboard.i18n.json new file mode 100644 index 00000000000..3e8a4d5d783 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/clipboard/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Cortar", + "actions.clipboard.copyLabel": "Copiar", + "actions.clipboard.pasteLabel": "Pegar", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Copiar con resaltado de sintaxis" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/comment/comment.i18n.json b/i18n/esn/src/vs/editor/contrib/comment/comment.i18n.json new file mode 100644 index 00000000000..39d1b07ecab --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/comment/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Alternar comentario de línea", + "comment.line.add": "Agregar comentario de línea", + "comment.line.remove": "Quitar comentario de línea", + "comment.block": "Alternar comentario de bloque" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json b/i18n/esn/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json new file mode 100644 index 00000000000..7dee35d6d96 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Mostrar menú contextual del editor" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/find/findController.i18n.json b/i18n/esn/src/vs/editor/contrib/find/findController.i18n.json new file mode 100644 index 00000000000..686f3ab592d --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/find/findController.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Buscar", + "findNextMatchAction": "Buscar siguiente", + "findPreviousMatchAction": "Buscar anterior", + "nextSelectionMatchFindAction": "Buscar selección siguiente", + "previousSelectionMatchFindAction": "Buscar selección anterior", + "startReplace": "Reemplazar", + "showNextFindTermAction": "Mostrar siguiente término de búsqueda", + "showPreviousFindTermAction": "Mostrar término de búsqueda anterior" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/find/findWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/find/findWidget.i18n.json new file mode 100644 index 00000000000..a2385b5b922 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/find/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Buscar", + "placeholder.find": "Buscar", + "label.previousMatchButton": "Coincidencia anterior", + "label.nextMatchButton": "Coincidencia siguiente", + "label.toggleSelectionFind": "Buscar en selección", + "label.closeButton": "Cerrar", + "label.replace": "Reemplazar", + "placeholder.replace": "Reemplazar", + "label.replaceButton": "Reemplazar", + "label.replaceAllButton": "Reemplazar todo", + "label.toggleReplaceButton": "Alternar modo de reemplazar", + "title.matchesCountLimit": "Sólo los primeros {0} resultados son resaltados, pero todas las operaciones de búsqueda trabajan en todo el texto.", + "label.matchesLocation": "{0} de {1}", + "label.noResults": "Sin resultados" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/find/simpleFindWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/find/simpleFindWidget.i18n.json new file mode 100644 index 00000000000..213a60a3c4f --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/find/simpleFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Buscar", + "placeholder.find": "Buscar", + "label.previousMatchButton": "Coincidencia anterior", + "label.nextMatchButton": "Coincidencia siguiente", + "label.closeButton": "Cerrar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/esn/src/vs/editor/contrib/folding/folding.i18n.json new file mode 100644 index 00000000000..69ac193ad0d --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/folding/folding.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Desplegar", + "unFoldRecursivelyAction.label": "Desplegar de forma recursiva", + "foldAction.label": "Plegar", + "foldRecursivelyAction.label": "Plegar de forma recursiva", + "foldAllBlockComments.label": "Cerrar todos los comentarios de bloqueo", + "foldAllAction.label": "Plegar todo", + "unfoldAllAction.label": "Desplegar todo", + "foldLevelAction.label": "Nivel de plegamiento {0}" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/format/formatActions.i18n.json b/i18n/esn/src/vs/editor/contrib/format/formatActions.i18n.json new file mode 100644 index 00000000000..6260d665365 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/format/formatActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "1 edición de formato en la línea {0}", + "hintn1": "{0} ediciones de formato en la línea {1}", + "hint1n": "1 edición de formato entre las líneas {0} y {1}", + "hintnn": "{0} ediciones de formato entre las líneas {1} y {2}", + "no.provider": "Lo sentimos, pero no hay ningún formateador para los '{0}' archivos instalados.", + "formatDocument.label": "Dar formato al documento", + "formatSelection.label": "Dar formato a la selección" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json b/i18n/esn/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json new file mode 100644 index 00000000000..d9243b76135 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "No se encontró ninguna definición para \"{0}\"", + "generic.noResults": "No se encontró ninguna definición", + "meta.title": " – {0} definiciones", + "actions.goToDecl.label": "Ir a definición", + "actions.goToDeclToSide.label": "Abrir definición en el lateral", + "actions.previewDecl.label": "Ver la definición", + "goToImplementation.noResultWord": "No se encontró ninguna implementación para \"{0}\"", + "goToImplementation.generic.noResults": "No se encontró ninguna implementación", + "meta.implementations.title": "{0} implementaciones", + "actions.goToImplementation.label": "Ir a implementación", + "actions.peekImplementation.label": "Inspeccionar implementación", + "goToTypeDefinition.noResultWord": "No se encontró ninguna definición de tipo para \"{0}\"", + "goToTypeDefinition.generic.noResults": "No se encontró ninguna definición de tipo", + "meta.typeDefinitions.title": " – {0} definiciones de tipo", + "actions.goToTypeDefinition.label": "Ir a la definición de tipo", + "actions.peekTypeDefinition.label": "Inspeccionar definición de tipo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json b/i18n/esn/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json new file mode 100644 index 00000000000..d35f93e7fae --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Haga clic para mostrar {0} definiciones." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/gotoError/gotoError.i18n.json b/i18n/esn/src/vs/editor/contrib/gotoError/gotoError.i18n.json new file mode 100644 index 00000000000..a46ce2aad76 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/gotoError/gotoError.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Ir al error o la advertencia siguiente", + "markerAction.previous.label": "Ir al error o la advertencia anterior", + "editorMarkerNavigationError": "Color de los errores del widget de navegación de marcadores del editor.", + "editorMarkerNavigationWarning": "Color de las advertencias del widget de navegación de marcadores del editor.", + "editorMarkerNavigationInfo": "Color del widget informativo marcador de navegación en el editor.", + "editorMarkerNavigationBackground": "Fondo del widget de navegación de marcadores del editor." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/hover/hover.i18n.json b/i18n/esn/src/vs/editor/contrib/hover/hover.i18n.json new file mode 100644 index 00000000000..c190af1321d --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/hover/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Mostrar al mantener el puntero" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/hover/modesContentHover.i18n.json b/i18n/esn/src/vs/editor/contrib/hover/modesContentHover.i18n.json new file mode 100644 index 00000000000..cee5631f417 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/hover/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Cargando..." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json b/i18n/esn/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json new file mode 100644 index 00000000000..c249b2caf4f --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Reemplazar con el valor anterior", + "InPlaceReplaceAction.next.label": "Reemplazar con el valor siguiente" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/indentation/indentation.i18n.json b/i18n/esn/src/vs/editor/contrib/indentation/indentation.i18n.json new file mode 100644 index 00000000000..e4b2111a110 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/indentation/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Convertir sangría en espacios", + "indentationToTabs": "Convertir sangría en tabulaciones", + "configuredTabSize": "Tamaño de tabulación configurado", + "selectTabWidth": "Seleccionar tamaño de tabulación para el archivo actual", + "indentUsingTabs": "Aplicar sangría con tabulaciones", + "indentUsingSpaces": "Aplicar sangría con espacios", + "detectIndentation": "Detectar sangría del contenido", + "editor.reindentlines": "Volver a aplicar sangría a líneas" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json b/i18n/esn/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json new file mode 100644 index 00000000000..904c8cba9ed --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Copiar línea arriba", + "lines.copyDown": "Copiar línea abajo", + "lines.moveUp": "Mover línea hacia arriba", + "lines.moveDown": "Mover línea hacia abajo", + "lines.sortAscending": "Ordenar líneas en orden ascendente", + "lines.sortDescending": "Ordenar líneas en orden descendente", + "lines.trimTrailingWhitespace": "Recortar espacio final", + "lines.delete": "Eliminar línea", + "lines.indent": "Sangría de línea", + "lines.outdent": "Anular sangría de línea", + "lines.insertBefore": "Insertar línea arriba", + "lines.insertAfter": "Insertar línea debajo", + "lines.deleteAllLeft": "Eliminar todo a la izquierda", + "lines.deleteAllRight": "Eliminar todo lo que está a la derecha", + "lines.joinLines": "Unir líneas", + "editor.transpose": "Transponer caracteres alrededor del cursor", + "editor.transformToUppercase": "Transformar a mayúsculas", + "editor.transformToLowercase": "Transformar a minúsculas" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/links/links.i18n.json b/i18n/esn/src/vs/editor/contrib/links/links.i18n.json new file mode 100644 index 00000000000..200b81a535c --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/links/links.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Cmd + clic para abrir el vínculo", + "links.navigate": "Ctrl + clic para abrir el vínculo", + "links.command.mac": "Cmd + click para ejecutar el comando", + "links.command": "Ctrl + click para ejecutar el comando", + "links.navigate.al": "Alt + clic para seguir el vínculo", + "links.command.al": "Alt + clic para ejecutar el comando", + "invalid.url": "No se pudo abrir este vínculo porque no tiene un formato correcto: {0}", + "missing.url": "No se pudo abrir este vínculo porque falta el destino.", + "label": "Abrir vínculo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/multicursor/multicursor.i18n.json b/i18n/esn/src/vs/editor/contrib/multicursor/multicursor.i18n.json new file mode 100644 index 00000000000..d5994146753 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/multicursor/multicursor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Agregar cursor arriba", + "mutlicursor.insertBelow": "Agregar cursor debajo", + "mutlicursor.insertAtEndOfEachLineSelected": "Añadir cursores a finales de línea", + "addSelectionToNextFindMatch": "Agregar selección hasta la siguiente coincidencia de búsqueda", + "addSelectionToPreviousFindMatch": "Agregar selección hasta la anterior coincidencia de búsqueda", + "moveSelectionToNextFindMatch": "Mover última selección hasta la siguiente coincidencia de búsqueda", + "moveSelectionToPreviousFindMatch": "Mover última selección hasta la anterior coincidencia de búsqueda", + "selectAllOccurrencesOfFindMatch": "Seleccionar todas las repeticiones de coincidencia de búsqueda", + "changeAll.label": "Cambiar todas las ocurrencias" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json b/i18n/esn/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json new file mode 100644 index 00000000000..4cd04b2e243 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Sugerencias para parámetros Trigger" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json new file mode 100644 index 00000000000..bd2e55282cd --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, sugerencia" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/esn/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json new file mode 100644 index 00000000000..6b4f1302755 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Mostrar correcciones ({0})", + "quickFix": "Mostrar correcciones", + "quickfix.trigger.label": "Corrección rápida" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json new file mode 100644 index 00000000000..067249df5b1 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Cerrar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json b/i18n/esn/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json new file mode 100644 index 00000000000..c2ee1b57887 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": " – {0} referencias", + "references.action.label": "Buscar todas las referencias" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json b/i18n/esn/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json new file mode 100644 index 00000000000..06859105445 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Cargando..." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json b/i18n/esn/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json new file mode 100644 index 00000000000..63882c346cc --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "símbolo en {0} linea {1} en la columna {2}", + "aria.fileReferences.1": "1 símbolo en {0}, ruta de acceso completa {1}", + "aria.fileReferences.N": "{0} símbolos en {1}, ruta de acceso completa {2}", + "aria.result.0": "No se encontraron resultados", + "aria.result.1": "Encontró 1 símbolo en {0}", + "aria.result.n1": "Encontró {0} símbolos en {1}", + "aria.result.nm": "Encontró {0} símbolos en {1} archivos" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json new file mode 100644 index 00000000000..1e3309b1cf6 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Error al resolver el archivo.", + "referencesCount": "{0} referencias", + "referenceCount": "{0} referencia", + "missingPreviewMessage": "vista previa no disponible", + "treeAriaLabel": "Referencias", + "noResults": "No hay resultados.", + "peekView.alternateTitle": "Referencias", + "peekViewTitleBackground": "Color de fondo del área de título de la vista de inspección.", + "peekViewTitleForeground": "Color del título de la vista de inpección.", + "peekViewTitleInfoForeground": "Color de la información del título de la vista de inspección.", + "peekViewBorder": "Color de los bordes y la flecha de la vista de inspección.", + "peekViewResultsBackground": "Color de fondo de la lista de resultados de vista de inspección.", + "peekViewResultsMatchForeground": "Color de primer plano de los nodos de inspección en la lista de resultados.", + "peekViewResultsFileForeground": "Color de primer plano de los archivos de inspección en la lista de resultados.", + "peekViewResultsSelectionBackground": "Color de fondo de la entrada seleccionada en la lista de resultados de vista de inspección.", + "peekViewResultsSelectionForeground": "Color de primer plano de la entrada seleccionada en la lista de resultados de vista de inspección.", + "peekViewEditorBackground": "Color de fondo del editor de vista de inspección.", + "peekViewEditorGutterBackground": "Color de fondo del margen en el editor de vista de inspección.", + "peekViewResultsMatchHighlight": "Buscar coincidencia con el color de resaltado de la lista de resultados de vista de inspección.", + "peekViewEditorMatchHighlight": "Buscar coincidencia del color de resultado del editor de vista de inspección." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/rename/rename.i18n.json b/i18n/esn/src/vs/editor/contrib/rename/rename.i18n.json new file mode 100644 index 00000000000..00a7dc4990e --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/rename/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "No hay ningún resultado.", + "aria": "Nombre cambiado correctamente de '{0}' a '{1}'. Resumen: {2}", + "rename.failed": "No se pudo cambiar el nombre.", + "rename.label": "Cambiar el nombre del símbolo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/rename/renameInputField.i18n.json b/i18n/esn/src/vs/editor/contrib/rename/renameInputField.i18n.json new file mode 100644 index 00000000000..86b4308b9d3 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/rename/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Cambie el nombre de la entrada. Escriba el nuevo nombre y presione Entrar para confirmar." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json b/i18n/esn/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json new file mode 100644 index 00000000000..e5a3dca5e22 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Expandir selección", + "smartSelect.shrink": "Reducir selección" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/suggest/suggestController.i18n.json b/i18n/esn/src/vs/editor/contrib/suggest/suggestController.i18n.json new file mode 100644 index 00000000000..e651f27c586 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/suggest/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "Aceptando '{0}' Insertó el siguente texto : {1}", + "suggest.trigger.label": "Sugerencias para Trigger" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/suggest/suggestWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/suggest/suggestWidget.i18n.json new file mode 100644 index 00000000000..bf3d8015426 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/suggest/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "Color de fondo del widget sugerido.", + "editorSuggestWidgetBorder": "Color de borde del widget sugerido.", + "editorSuggestWidgetForeground": "Color de primer plano del widget sugerido.", + "editorSuggestWidgetSelectedBackground": "Color de fondo de la entrada seleccionada del widget sugerido.", + "editorSuggestWidgetHighlightForeground": "Color del resaltado coincidido en el widget sugerido.", + "readMore": "Leer más...{0}", + "suggestionWithDetailsAriaLabel": "{0}, sugerencia, con detalles", + "suggestionAriaLabel": "{0}, sugerencia", + "readLess": "Leer menos...{0}", + "suggestWidget.loading": "Cargando...", + "suggestWidget.noSuggestions": "No hay sugerencias.", + "suggestionAriaAccepted": "{0}, aceptada", + "ariaCurrentSuggestionWithDetails": "{0}, sugerencia, con detalles", + "ariaCurrentSuggestion": "{0}, sugerencia" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json b/i18n/esn/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json new file mode 100644 index 00000000000..2349a0a8514 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Alternar tecla de tabulación para mover el punto de atención" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json b/i18n/esn/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json new file mode 100644 index 00000000000..ce1db0c57f2 --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Color de fondo de un símbolo durante el acceso de lectura; por ejemplo, cuando se lee una variable.", + "wordHighlightStrong": "Color de fondo de un símbolo durante el acceso de escritura; por ejemplo, cuando se escribe una variable.", + "overviewRulerWordHighlightForeground": "Color de marcador de regla de información general para símbolos resaltados.", + "overviewRulerWordHighlightStrongForeground": "Color de marcador de regla de información general para símbolos de acceso de escritura resaltados. ", + "wordHighlight.next.label": "Ir al siguiente símbolo destacado", + "wordHighlight.previous.label": "Ir al símbolo destacado anterior" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/platform/environment/node/argv.i18n.json b/i18n/esn/src/vs/platform/environment/node/argv.i18n.json index 26e8b791489..e7d97465a8c 100644 --- a/i18n/esn/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/esn/src/vs/platform/environment/node/argv.i18n.json @@ -12,6 +12,8 @@ "newWindow": "Fuerce una nueva instancia de Code.", "performance": "Comience con el comando 'Developer: Startup Performance' habilitado.", "prof-startup": "Ejecutar generador de perfiles de CPU durante el inicio", + "inspect-extensions": "Permitir la depuración y el perfil de las extensiones. Revisar las herramientas de desarrollador para la conexión uri.", + "inspect-brk-extensions": "Permitir la depuración y el perfil de las extensiones con el host de la extensión pausado después del inicio. Revisar las herramientas de desarrollador para la conexión uri.", "reuseWindow": "Fuerce la apertura de un archivo o carpeta en la última ventana activa.", "userDataDir": "Especifica el directorio en que se conservan los datos de usuario; es útil cuando se ejecuta como raíz.", "verbose": "Imprima salidas detalladas (implica --wait).", @@ -24,6 +26,7 @@ "experimentalApis": "Habilita características de API propuestas para una extensión.", "disableExtensions": "Deshabilite todas las extensiones instaladas.", "disableGPU": "Deshabilita la aceleración de hardware de GPU.", + "status": "Imprimir el uso del proceso y la información de diagnóstico.", "version": "Versión de impresión.", "help": "Imprima el uso.", "usage": "Uso", diff --git a/i18n/esn/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/esn/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index 03e8971b558..dedafdbe5bf 100644 --- a/i18n/esn/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/esn/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "notFound": "Extensión no encontrada", - "noCompatible": "No se encontró una versión de {0} compatible con esta versión de Code." + "notCompatibleDownload": "No se puede descargar porque no se encuentra la extensión compatible con la versión actual '{0}' de VS Code." } \ No newline at end of file diff --git a/i18n/esn/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/esn/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index d12f2822486..645d8566a96 100644 --- a/i18n/esn/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/esn/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,11 +6,16 @@ { "invalidManifest": "Extensión no válida: package.json no es un archivo JSON.", "restartCodeLocal": "Reinicie Code antes de volver a instalar {0}.", - "restartCodeGallery": "Por favor reinicie Code antes de reinstalar.", + "installingOutdatedExtension": "Una versión más nueva de esta extensión ya está instalada. ¿Desea anular esto con la versión anterior?", + "override": "Anular", + "cancel": "Cancelar", + "notFoundCompatible": "No se puede instalar porque no se encuentra la extensión '{0}' compatible con la versión actual '{1}' del VS Code.", + "quitCode": "No se puede instalar porque todavía se está ejecutando una instancia obsoleta de la extensión. Por favor, salga e inicie el VS Code antes de volver a instalarlo.\n", + "exitCode": "No se puede instalar porque todavía se está ejecutando una instancia obsoleta de la extensión. Por favor, salga e inicie VS Code antes de volver a instalarlo.", + "notFoundCompatibleDependency": "No se puede instalar porque no se encuentra la extensión dependiente '{0}' compatible con la versión actual '{1}' del VS Code.", "uninstallDependeciesConfirmation": "¿Quiere desinstalar solo '{0}' o también sus dependencias?", "uninstallOnly": "Solo", "uninstallAll": "Todo", - "cancel": "Cancelar", "uninstallConfirmation": "¿Seguro que quiere desinstalar '{0}'?", "ok": "Aceptar", "singleDependentError": "No se puede desinstalar la extensión '{0}'. La extensión '{1}' depende de esta.", diff --git a/i18n/esn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/esn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 5568bf78176..693071735c2 100644 --- a/i18n/esn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -17,6 +17,8 @@ "vscode.extension.activationEvents.onLanguage": "Un evento de activación emitido cada vez que se abre un archivo que se resuelve en el idioma especificado.", "vscode.extension.activationEvents.onCommand": "Un evento de activación emitido cada vez que se invoca el comando especificado.", "vscode.extension.activationEvents.onDebug": "Un evento de activación emitido cada vez que un usuario está a punto de iniciar la depuración o cada vez que está a punto de configurar las opciones de depuración.", + "vscode.extension.activationEvents.onDebugInitialConfigurations": "Un evento de activación emitido cada vez que se necesite crear un \"launch.json\" (y se necesite llamar a todos los métodos provideDebugConfigurations).", + "vscode.extension.activationEvents.onDebugResolve": "Un evento de activación emitido cada vez que esté a punto de ser iniciada una sesión de depuración con el tipo específico (y se necesite llamar al método resolveDebugConfiguration correspondiente).", "vscode.extension.activationEvents.workspaceContains": "Un evento de activación emitido cada vez que se abre una carpeta que contiene al menos un archivo que coincide con el patrón global especificado.", "vscode.extension.activationEvents.onView": "Un evento de activación emitido cada vez que se expande la vista especificada.", "vscode.extension.activationEvents.star": "Un evento de activación emitido al inicio de VS Code. Para garantizar una buena experiencia para el usuario final, use este evento de activación en su extensión solo cuando no le sirva ninguna otra combinación de eventos de activación en su caso.", diff --git a/i18n/esn/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/esn/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json new file mode 100644 index 00000000000..77a690db833 --- /dev/null +++ b/i18n/esn/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleTabs": "Alternar visibilidad de la pestaña", + "view": "Ver" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json index 5cf2aa986a5..23135259cde 100644 --- a/i18n/esn/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "largeNumberBadge": "10k+", "badgeTitle": "{0} - {1} ", "additionalViews": "Vistas adicionales", "numberBadge": "{0} ({1})", diff --git a/i18n/esn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 5f8d21bad14..f88c82cd9df 100644 --- a/i18n/esn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -33,6 +33,7 @@ "openPreviousEditor": "Abrir el editor anterior", "nextEditorInGroup": "Abrir el siguiente editor del grupo", "openPreviousEditorInGroup": "Abrir el editor anterior en el grupo", + "lastEditorInGroup": "Abrir el último editor del grupo", "navigateNext": "Hacia delante", "navigatePrevious": "Hacia atrás", "navigateLast": "Vaya al último", diff --git a/i18n/esn/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index 2992be9bea8..a44acd1dea7 100644 --- a/i18n/esn/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,7 +6,7 @@ { "editorCommand.activeEditorMove.description": "Mover el editor activo por tabulaciones o grupos", "editorCommand.activeEditorMove.arg.name": "Argumento para mover el editor activo", - "editorCommand.activeEditorMove.arg.description": "Propiedades del argumento:\n\t\t\t\t\t\t* 'to': valor de cadena que indica el lugar al que mover.\n\t\t\t\t\t\t* 'by': valor de cadena que proporciona la unidad para mover. Por pestaña o por grupo.\n\t\t\t\t\t\t* 'value': valor numérico que indica el número de posiciones o una posición absoluta para mover.\n\t\t\t\t\t", + "editorCommand.activeEditorMove.arg.description": "Propiedades del argumento:\n * 'to': cadena de valor que proporciona dónde moverse.\n\t* 'by': cadena de valor que proporciona la unidad de medida para moverse. Por pestaña o por grupo.\n\t* 'value': valor numérico que proporciona cuantas posiciones o una posición absoluta para mover.", "commandDeprecated": "El comando **{0}** se ha quitado. Puede usar en su lugar **{1}**", "openKeybindings": "Configurar métodos abreviados de teclado" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index d3bb899fc07..f7bccf7369d 100644 --- a/i18n/esn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -53,5 +53,5 @@ "screenReaderDetectedExplanation.answerYes": "Sí", "screenReaderDetectedExplanation.answerNo": "No", "screenReaderDetectedExplanation.body1": "VS Code se ha optimizado para ser utilizado con un lector de pantalla", - "screenReaderDetectedExplanation.body2": "Algunas características del editor tendrán comportamientos diferentes: por ejemplo, los ajustes de línea, plegamiento, cierre automático de llaves, etc." + "screenReaderDetectedExplanation.body2": "Algunas características del editor tendrán comportamientos diferentes: p. ej. ajuste de línea, plegado, etc." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/quickopen.i18n.json b/i18n/esn/src/vs/workbench/browser/quickopen.i18n.json index 6677960aba0..5951cd82b00 100644 --- a/i18n/esn/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/quickopen.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "noResultsMatching": "No hay resultados coincidentes", - "noResultsFound2": "No se encontraron resultados", - "entryAriaLabel": "{0}, comando" + "noResultsFound2": "No se encontraron resultados" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json index a404f8a1152..69c31d25805 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json @@ -30,7 +30,7 @@ "openRecent": "Abrir Reciente...", "quickOpenRecent": "Abrir Reciente Rapidamente...", "closeMessages": "Cerrar mensajes de notificación", - "reportIssues": "Notificar problemas", + "reportIssueInEnglish": "Notificar problema", "reportPerformanceIssue": "Notificar problema de rendimiento", "keybindingsReference": "Referencia de métodos abreviados de teclado", "openDocumentationUrl": "Documentación", @@ -47,5 +47,25 @@ "showNextWindowTab": "Mostrar siguiente pestaña de ventana", "moveWindowTabToNewWindow": "Mover pestaña de ventana a una nueva ventana", "mergeAllWindowTabs": "Fusionar todas las ventanas", - "toggleWindowTabsBar": "Alternar barra de pestañas de ventana" + "toggleWindowTabsBar": "Alternar barra de pestañas de ventana", + "configureLocale": "Configurar idioma", + "displayLanguage": "Define el lenguaje para mostrar de VSCode.", + "doc": "Consulte {0} para obtener una lista de idiomas compatibles.", + "restart": "Al cambiar el valor se requiere reiniciar VSCode.", + "fail.createSettings": "No se puede crear '{0}' ({1}).", + "openLogsFolder": "Abrir carpeta de registros", + "showLogs": "Mostrar registros...", + "mainProcess": "Principal", + "sharedProcess": "Compartido", + "rendererProcess": "Renderizador", + "extensionHost": "Host de extensión", + "selectProcess": "Seleccionar proceso", + "setLogLevel": "Establecer nivel de registro", + "trace": "Seguimiento", + "debug": "Depurar", + "info": "Información", + "warn": "Advertencia", + "err": "Error", + "critical": "Crítico", + "off": "Apagado" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json index 33913ddd2b5..f2abdd8deaf 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,8 +7,8 @@ "view": "Ver", "help": "Ayuda", "file": "Archivo", - "workspaces": "Ãreas de trabajo", "developer": "Desarrollador", + "workspaces": "Ãreas de trabajo", "showEditorTabs": "Controla si los editores abiertos se deben mostrar o no en pestañas.", "workbench.editor.labelFormat.default": "Mostrar el nombre del archivo. Cuando están habilitadas las pestañas y dos archivos tienen el mismo nombre en un grupo se agregan las secciones de distinguinshing de ruta de cada archivo. Cuando se desactivan las pestañas, se muestra la ruta de acceso relativa a la carpeta de trabajo si el editor está activo.", "workbench.editor.labelFormat.short": "Mostrar el nombre del archivo seguido de su nombre de directorio.", @@ -16,6 +16,7 @@ "workbench.editor.labelFormat.long": "Mostrar el nombre del archivo seguido de la ruta de acceso absoluta.", "tabDescription": "Controla el formato de la etiqueta para un editor. Modificar este ajuste puede hacer, por ejemplo, que sea más fácil entender la ubicación de un archivo: - corta: 'parent' - media: 'workspace/src/parent' - larga: '/home/user/workspace/src/parect' - por defecto: '.../parent', cuando otra pestaña comparte el mismo título, o la ruta de acceso relativa del espacio de trabajo si las pestañas están deshabilitadas", "editorTabCloseButton": "Controla la posición de los botones de cierre de pestañas del editor o los deshabilita si se establece en \"off\".", + "tabSizing": "Controla el tamaño de las pestañas del editor. Configurado para 'fit' para mantener las pestañas siempre lo suficientemente grandes para mostrar la etiqueta completa del editor. Establezca 'shrink' para permitir que las pestañas se vuelvan más pequeñas cuando el espacio disponible no sea suficiente para mostrar todas las pestañas juntas.", "showIcons": "Controla si los editores abiertos deben mostrarse o no con un icono. Requiere que también se habilite un tema de icono.", "enablePreview": "Controla si los editores abiertos se muestran en vista previa. Los editores en vista previa se reutilizan hasta que se guardan (por ejemplo, mediante doble clic o editándolos) y se muestran en cursiva.", "enablePreviewFromQuickOpen": "Controla si los editores abiertos mediante Quick Open se muestran en modo de vista previa. Los editores en modo de vista previa se reutilizan hasta que se conservan (por ejemplo, mediante doble clic o editándolos).", @@ -26,18 +27,17 @@ "closeOnFocusLost": "Controla si Quick Open debe cerrarse automáticamente cuando pierde el foco.", "openDefaultSettings": "Controla si la configuración de apertura también abre un editor que muestra todos los valores predeterminados.", "sideBarLocation": "Controla la ubicación de la barra lateral. Puede mostrarse a la izquierda o a la derecha del área de trabajo.", - "panelLocation": "Controla la ubicación de la barra lateral. Puede mostrarse a la izquierda o a la derecha del área de trabajo.", "statusBarVisibility": "Controla la visibilidad de la barra de estado en la parte inferior del área de trabajo.", "activityBarVisibility": "Controla la visibilidad de la barra de actividades en el área de trabajo.", "closeOnFileDelete": "Controla si los editores que muestran un archivo deben cerrarse automáticamente cuando otro proceso elimina el archivo o le cambia el nombre. Si se deshabilita esta opción y se da alguna de estas circunstancias, se mantiene el editor abierto con modificaciones. Tenga en cuenta que, cuando se eliminan archivos desde la aplicación, siempre se cierra el editor y que los archivos con modificaciones no se cierran nunca para preservar los datos.", - "experimentalFuzzySearchEndpoint": "Indica el punto final para la búsqueda de configuraciones experimentales.", - "experimentalFuzzySearchKey": "Indica la clave a utilizar para la búsqueda de configuraciones experimentales.", + "enableNaturalLanguageSettingsSearch": "Controla si habilita el modo de búsqueda de lenguaje natural para la configuración.", "fontAliasing": "Controla el método de suavizado de fuentes en el área de trabajo.\n- default: suavizado de fuentes en subpíxeles. En la mayoría de las pantallas que no son Retina, esta opción muestra el texto más nítido.\n- antialiased: suaviza las fuentes en píxeles, en lugar de subpíxeles. Puede hacer que las fuentes se vean más claras en general\n- none: deshabilita el suavizado de fuentes. El texto se muestra con bordes nítidos irregulares.", "workbench.fontAliasing.default": "Suavizado de fuentes en subpíxeles. En la mayoría de las pantallas que no son Retina, esta opción muestra el texto más nítido.", "workbench.fontAliasing.antialiased": "Suaviza las fuentes en píxeles, en lugar de subpíxeles. Puede hacer que las fuentes se vean más claras en general.", "workbench.fontAliasing.none": "Deshabilita el suavizado de fuentes. El texto se muestra con bordes nítidos irregulares.", "swipeToNavigate": "Navegar entre achivos abiertos utlizando la pulsación de tres dedos para deslizar horizontalmante.", "workbenchConfigurationTitle": "Ãrea de trabajo", + "windowConfigurationTitle": "Ventana", "window.openFilesInNewWindow.on": "Los archivos se abrirán en una nueva ventana", "window.openFilesInNewWindow.off": "Los archivos se abrirán en la ventana con la carpeta de archivos abierta o en la última ventana activa", "window.openFilesInNewWindow.default": "Los archivos se abrirán en la ventana con la carpeta de los archivos abierta o en la última ventana activa a menos que se abran mediante el Dock o el Finder (solo macOS)", @@ -69,11 +69,11 @@ "autoDetectHighContrast": "Si está habilitado, se cambiará automáticamente al tema de contraste alto si Windows utiliza un tema de contraste alto, y al tema oscuro si cambia desde un tema de contraste alto de Windows.", "titleBarStyle": "Ajuste la apariencia de la barra de título de la ventana. Se debe realizar un reinicio completo para aplicar los cambios.", "window.nativeTabs": "Habilita las fichas de ventana en macOS Sierra. Note que los cambios requieren que reinicie el equipo y las fichas nativas deshabilitan cualquier estilo personalizado que haya configurado.", - "windowConfigurationTitle": "Ventana", "zenModeConfigurationTitle": "Modo zen", "zenMode.fullScreen": "Controla si activar el modo Zen pone también el trabajo en modo de pantalla completa.", "zenMode.hideTabs": "Controla si la activación del modo zen también oculta las pestañas del área de trabajo.", "zenMode.hideStatusBar": "Controla si la activación del modo zen oculta también la barra de estado en la parte inferior del área de trabajo.", "zenMode.hideActivityBar": "Controla si la activación del modo zen oculta también la barra de estado en la parte izquierda del área de trabajo.", - "zenMode.restore": "Controla si una ventana debe restaurarse a modo zen si se cerró en modo zen." + "zenMode.restore": "Controla si una ventana debe restaurarse a modo zen si se cerró en modo zen.", + "JsonSchema.locale": "Idioma de la interfaz de usuario que debe usarse." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index f03e5fb4d1c..1da81a4fd68 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -30,7 +30,6 @@ "deactivateBreakpoints": "Desactivar puntos de interrupción", "reapplyAllBreakpoints": "Volver a aplicar todos los puntos de interrupción", "addFunctionBreakpoint": "Agregar punto de interrupción de función", - "renameFunctionBreakpoint": "Cambiar nombre de punto de interrupción de función", "addConditionalBreakpoint": "Agregar punto de interrupción condicional...", "editConditionalBreakpoint": "Editar punto de interrupción...", "setValue": "Establecer valor", diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json new file mode 100644 index 00000000000..dcc90fa2dbd --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editConditionalBreakpoint": "Editar punto de interrupción...", + "functionBreakpointsNotSupported": "Este tipo de depuración no admite puntos de interrupción en funciones", + "functionBreakpointPlaceholder": "Función donde interrumpir", + "functionBreakPointInputAriaLabel": "Escribir punto de interrupción de función" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json new file mode 100644 index 00000000000..980bb00142f --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "callstackSection": "Sección de la pila de llamadas", + "debugStopped": "En pausa en {0}", + "callStackAriaLabel": "Pila de llamadas de la depuración", + "process": "Proceso", + "paused": "En pausa", + "running": "En ejecución", + "thread": "Subproceso", + "pausedOn": "En pausa en {0}", + "loadMoreStackFrames": "Cargar más marcos de pila", + "threadAriaLabel": "Subproceso {0}, pila de llamadas, depuración", + "stackFrameAriaLabel": "Marco de pila {0} línea {1} {2}, pila de llamadas, depuración" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index 57eb3ab2dd2..f491c842a05 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,5 +20,10 @@ "openExplorerOnEnd": "Abrir automáticamente la vista del explorador al final de una sesión de depuración", "inlineValues": "Mostrar valores de variable en línea en el editor durante la depuración", "hideActionBar": "Controla si debe ocultarse la barra flotante de acciones de depuración", + "never": "Nunca mostrar debug en la barra de estado", + "always": "Siempre mostrar debug en la barra de estado", + "onFirstSessionStart": "Mostrar debug en la barra de estado solamente después del primero uso de debug", + "showInStatusBar": "Controla cuando se debe mostrar la barra de estado de depuración", + "openDebug": "Controla si el viewlet de depuración debería abrirse al inicio de la sesión de depuración.", "launch": "Configuración de lanzamiento para depuración global. Debe utilizarse como una alternativa a “launch.json†en espacios de trabajo compartidos." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index b9b659ba536..b7bc040a66a 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,6 @@ "breakpointAdded": "Punto de interrupción agregado, línea {0}, archivo {1}", "breakpointRemoved": "Punto de interrupción quitado, línea {0}, archivo {1}", "compoundMustHaveConfigurations": "El compuesto debe tener configurado el atributo \"configurations\" a fin de iniciar varias configuraciones.", - "configMissing": "La configuración \"{0}\" falta en \"launch.json\".", "debugRequestNotSupported": "El atributo '{0}' tiene un valor no admitido '{1}' en la configuración de depuración seleccionada.", "debugRequesMissing": "El atributo '{0}' está ausente en la configuración de depuración elegida. ", "debugTypeNotSupported": "El tipo de depuración '{0}' configurado no es compatible.", diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json new file mode 100644 index 00000000000..9efd007c7a7 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Sección de variables", + "variablesAriaTreeLabel": "Variables de depuración", + "variableValueAriaLabel": "Escribir un nuevo valor de variable", + "variableScopeAriaLabel": "Ãmbito {0}, variables, depuración", + "variableAriaLabel": "{0} valor {1}, variables, depuración" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json new file mode 100644 index 00000000000..342df49060c --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expressionsSection": "Sección de expresiones", + "watchAriaTreeLabel": "Expresiones de inspección de la depuración", + "watchExpressionPlaceholder": "Expresión para inspeccionar", + "watchExpressionInputAriaLabel": "Escribir expresión de inspección", + "watchExpressionAriaLabel": "{0} valor {1}, inspección, depuración", + "watchVariableAriaLabel": "{0} valor {1}, inspección, depuración" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 9c360797a3c..1a8dfad3303 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,9 +6,11 @@ { "name": "Nombre de la extensión", "extension id": "Identificador de la extensión", + "preview": "Vista Previa", "publisher": "Nombre del editor", "install count": "Número de instalaciones", "rating": "Clasificación", + "repository": "Repositorio", "license": "Licencia", "details": "Detalles", "contributions": "Contribuciones", diff --git a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 148988a3afc..21da8d1a0ee 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -10,16 +10,12 @@ "Uninstalling": "Desinstalando", "updateAction": "Actualizar", "updateTo": "Actualizar a {0}", - "enableForWorkspaceAction.label": "Habilitar (área de trabajo)", - "enableAlwaysAction.label": "Habilitar (siempre)", - "disableForWorkspaceAction.label": "Deshabilitar (área de trabajo)", - "disableAlwaysAction.label": "Deshabilitar (siempre)", "ManageExtensionAction.uninstallingTooltip": "Desinstalando", - "enableForWorkspaceAction": "Ãrea de trabajo", - "enableGloballyAction": "Siempre", + "enableForWorkspaceAction": "Habilitar (área de trabajo)", + "enableGloballyAction": "Habilitar", "enableAction": "Habilitar", - "disableForWorkspaceAction": "Ãrea de trabajo", - "disableGloballyAction": "Siempre", + "disableForWorkspaceAction": "Deshabilitar (área de trabajo)", + "disableGloballyAction": "Deshabilitar", "disableAction": "Deshabilitar", "checkForUpdates": "Buscar actualizaciones", "enableAutoUpdate": "Habilitar extensiones de actualización automática", @@ -47,11 +43,8 @@ "allExtensionsInstalled": "Ya se han instalado todas las extensiones recomendadas para esta área de trabajo", "installRecommendedExtension": "Instalar extensión recomendada", "extensionInstalled": "La extensión recomendada ya ha sido instalada", - "showRecommendedKeymapExtensions": "Mostrar asignaciones de teclado recomendadas", "showRecommendedKeymapExtensionsShort": "Asignaciones de teclado", - "showLanguageExtensions": "Mostrar extensiones del lenguaje", "showLanguageExtensionsShort": "Extensiones del lenguaje", - "showAzureExtensions": "Mostrar extensiones de Azure", "showAzureExtensionsShort": "Extensiones de Azure", "OpenExtensionsFile.failed": "No se puede crear el archivo \"extensions.json\" dentro de la carpeta \".vscode\" ({0}).", "configureWorkspaceRecommendedExtensions": "Configurar extensiones recomendadas (área de trabajo)", diff --git a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json new file mode 100644 index 00000000000..9671e111767 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ratedByUsers": "Calificado por {0} usuarios" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json new file mode 100644 index 00000000000..b1592505d83 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectAndStartDebug": "Haga clic aquí para detener la generación de perfiles." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 3c9b787331d..3335907cc3e 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -7,7 +7,7 @@ "fileBasedRecommendation": "Esta extensión se recomienda basado en los archivos que abrió recientemente.", "workspaceRecommendation": "Esta extensión es recomendada por los usuarios del espacio de trabajo actual.", "exeBasedRecommendation": "Se recomienda esta extensión porque tiene instalado {0} . ", - "reallyRecommended2": "Para este tipo de archivo, se recomineda la extensión '{0}'.", + "reallyRecommended2": "La extension recomendada para este tipo de archivo es {0}", "reallyRecommendedExtensionPack": "Para este tipo de fichero, se recomienda el paquete de extensión '{0}'.", "showRecommendations": "Mostrar recomendaciones", "install": "Instalar", diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index cfbe38f24db..5e401d2ea7a 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -7,9 +7,11 @@ "extensionsCommands": "Administrar extensiones", "galleryExtensionsCommands": "Instalar extensiones de la galería", "extension": "Extensión", + "runtimeExtension": "Extensiones en ejecución", "extensions": "Extensiones", "view": "Ver", + "developer": "Desarrollador", "extensionsConfigurationTitle": "Extensiones", "extensionsAutoUpdate": "Actualizar extensiones automáticamente", - "extensionsIgnoreRecommendations": "No tener en cuenta las recomendaciones de extensión." + "extensionsIgnoreRecommendations": "Si se pone en true, las notificaciones para las recomendaciones de la extensión dejarán de aparecer." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json new file mode 100644 index 00000000000..41e790c6435 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "starActivation": "Activado al inicio", + "workspaceContainsGlobActivation": "Activado porque un archivo que coincide con {0} existe en su área de trabajo", + "workspaceContainsFileActivation": "Activado porque el archivo {0} existe en su área de trabajo", + "languageActivation": "Activado porque abrió un archivo {0}", + "workspaceGenericActivation": "Activado en {0}", + "errors": "{0} errores no detectados", + "extensionsInputName": "Extensiones en ejecución", + "showRuntimeExtensions": "Mostrar extensiones en ejecución", + "reportExtensionIssue": "Notificar problema", + "extensionHostProfileStart": "Iniciar perfil del host de extensiones", + "extensionHostProfileStop": "Detener perfil del host de extensiones", + "saveExtensionHostProfile": "Guardar perfil del host de extensiones" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/fileActions.i18n.json index 5c6f151c353..6ceeb1cae46 100644 --- a/i18n/esn/src/vs/workbench/parts/files/browser/fileActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -69,5 +69,7 @@ "invalidFileNameError": "El nombre **{0}** no es válido para el archivo o la carpeta. Elija un nombre diferente.", "filePathTooLongError": "El nombre **{0}** da como resultado una ruta de acceso demasiado larga. Elija un nombre más corto.", "compareWithSaved": "Comparar el archivo activo con el guardado", - "modifiedLabel": "{0} (en disco) ↔ {1}" + "modifiedLabel": "{0} (en disco) ↔ {1}", + "compareWithClipboard": "Comparar archivo activo con portapapeles", + "clipboardComparisonLabel": "Portapapeles ↔ {0}" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json b/i18n/esn/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json new file mode 100644 index 00000000000..79a138bf53b --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "folders": "Carpetas" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json new file mode 100644 index 00000000000..5b4f1d9a867 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Archivo", + "revealInSideBar": "Mostrar en barra lateral", + "acceptLocalChanges": "Usar los cambios y sobrescribir el contenido del disco", + "revertLocalChanges": "Descartar los cambios y volver al contenido del disco" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/esn/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json new file mode 100644 index 00000000000..849c94fa0c7 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Reintentar", + "rename": "Cambiar nombre", + "newFile": "Nuevo archivo", + "newFolder": "Nueva carpeta", + "openFolderFirst": "Abra primero una carpeta para crear archivos o carpetas en ella.", + "newUntitledFile": "Nuevo archivo sin título", + "createNewFile": "Nuevo archivo", + "createNewFolder": "Nueva carpeta", + "deleteButtonLabelRecycleBin": "&&Mover a la papelera de reciclaje", + "deleteButtonLabelTrash": "&&Mover a la papelera", + "deleteButtonLabel": "&&Eliminar", + "dirtyMessageFolderOneDelete": "Va a eliminar una carpeta con cambios sin guardar en 1 archivo. ¿Desea continuar?", + "dirtyMessageFolderDelete": "Va a eliminar una carpeta con cambios sin guardar en {0} archivos. ¿Desea continuar?", + "dirtyMessageFileDelete": "Va a eliminar un archivo con cambios sin guardar. ¿Desea continuar?", + "dirtyWarning": "Los cambios se perderán si no se guardan.", + "confirmMoveTrashMessageFolder": "¿Está seguro de que desea eliminar '{0}' y su contenido?", + "confirmMoveTrashMessageFile": "¿Está seguro de que desea eliminar '{0}'?", + "undoBin": "Puede restaurar desde la papelera de reciclaje.", + "undoTrash": "Puede restaurar desde la papelera.", + "doNotAskAgain": "No volver a preguntarme", + "confirmDeleteMessageFolder": "¿Está seguro de que desea eliminar '{0}' y su contenido de forma permanente?", + "confirmDeleteMessageFile": "¿Está seguro de que desea eliminar '{0}' de forma permanente?", + "irreversible": "Esta acción es irreversible.", + "permDelete": "Eliminar permanentemente", + "delete": "Eliminar", + "importFiles": "Importar archivos", + "confirmOverwrite": "Ya existe un archivo o carpeta con el mismo nombre en la carpeta de destino. ¿Quiere reemplazarlo?", + "replaceButtonLabel": "&&Reemplazar", + "copyFile": "Copiar", + "pasteFile": "Pegar", + "duplicateFile": "Duplicado", + "openToSide": "Abrir en el lateral", + "compareSource": "Seleccionar para comparar", + "globalCompareFile": "Comparar archivo activo con...", + "openFileToCompare": "Abrir un archivo antes para compararlo con otro archivo.", + "compareWith": "Comparar \"{0}\" con \"{1}\"", + "compareFiles": "Comparar archivos", + "refresh": "Actualizar", + "save": "Guardar", + "saveAs": "Guardar como...", + "saveAll": "Guardar todos", + "saveAllInGroup": "Guardar todo en el grupo", + "saveFiles": "Guardar todos los archivos", + "revert": "Revertir archivo", + "focusOpenEditors": "Foco sobre la vista de editores abiertos", + "focusFilesExplorer": "Enfocar Explorador de archivos", + "showInExplorer": "Mostrar el archivo activo en la barra lateral", + "openFileToShow": "Abra primero un archivo para mostrarlo en el explorador.", + "collapseExplorerFolders": "Contraer carpetas en el Explorador", + "refreshExplorer": "Actualizar Explorador", + "openFileInNewWindow": "Abrir archivo activo en nueva ventana", + "openFileToShowInNewWindow": "Abrir un archivo antes para abrirlo en una nueva ventana", + "revealInWindows": "Mostrar en el Explorador", + "revealInMac": "Mostrar en Finder", + "openContainer": "Abrir carpeta contenedora", + "revealActiveFileInWindows": "Mostrar archivo activo en el Explorador de Windows", + "revealActiveFileInMac": "Mostrar archivo activo en Finder", + "openActiveFileContainer": "Abrir carpeta contenedora del archivo activo", + "copyPath": "Copiar ruta de acceso", + "copyPathOfActive": "Copiar ruta del archivo activo", + "emptyFileNameError": "Debe especificarse un nombre de archivo o carpeta.", + "fileNameExistsError": "Ya existe el archivo o carpeta **{0}** en esta ubicación. Elija un nombre diferente.", + "invalidFileNameError": "El nombre **{0}** no es válido para el archivo o la carpeta. Elija un nombre diferente.", + "filePathTooLongError": "El nombre **{0}** da como resultado una ruta de acceso demasiado larga. Elija un nombre más corto.", + "compareWithSaved": "Comparar el archivo activo con el guardado", + "modifiedLabel": "{0} (en el disco) ↔ {1}", + "compareWithClipboard": "Comparar archivo activo con portapapeles", + "clipboardComparisonLabel": "Clipboard ↔ {0}" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/esn/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json new file mode 100644 index 00000000000..f417c4b11aa --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Abrir un archivo antes para copiar su ruta de acceso", + "openFileToReveal": "Abrir un archivo antes para mostrarlo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json new file mode 100644 index 00000000000..6b7926d2bf7 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Mostrar explorador", + "explore": "Explorador", + "view": "Ver", + "textFileEditor": "Editor de archivos de texto", + "binaryFileEditor": "Editor de archivos binarios", + "filesConfigurationTitle": "Archivos", + "exclude": "Configurar los patrones globales para excluir archivos y carpetas. Por ejemplo, el explorador de archivos decide que archivos y carpetas mostrar u ocultar según esta configuración.", + "files.exclude.boolean": "El patrón global con el que se harán coincidir las rutas de acceso de los archivos. Establézcalo en true o false para habilitarlo o deshabilitarlo.", + "files.exclude.when": "Comprobación adicional de los elementos del mismo nivel de un archivo coincidente. Use $(nombreBase) como variable para el nombre de archivo que coincide.", + "associations": "Configure asociaciones de archivo para los lenguajes (por ejemplo, \"*.extension\": \"html\"). Estas asociaciones tienen prioridad sobre las asociaciones predeterminadas de los lenguajes instalados.", + "encoding": "La codificación del juego de caracteres predeterminada que debe utilizarse al leer y escribir archivos. Este ajuste puede configurarse también por idioma.", + "autoGuessEncoding": "Cuando está activada, intentará adivinar la codificación del juego de caracteres al abrir archivos. Este ajuste puede configurarse también por idioma.", + "eol": "Carácter predeterminado de final de línea. Utilice \\n para LF y \\r\\n para CRLF.", + "trimTrailingWhitespace": "Si se habilita, se recortará el espacio final cuando se guarde un archivo.", + "insertFinalNewline": "Si se habilita, inserte una nueva línea final al final del archivo cuando lo guarde.", + "trimFinalNewlines": "Cuando se habilita, recorta todas las nuevas líneas después de la última nueva línea al final del archivo al guardarlo", + "files.autoSave.off": "Un archivo con modificaciones no se guarda nunca automáticamente.", + "files.autoSave.afterDelay": "Un archivo con modificaciones se guarda automáticamente tras la propiedad \"files.autoSaveDelay\" configurada.", + "files.autoSave.onFocusChange": "Un archivo con modificaciones se guarda automáticamente cuando el editor deja de fijarse en él.", + "files.autoSave.onWindowChange": "Un archivo con modificaciones se guarda automáticamente cuando la ventana deja de fijarse en él.", + "autoSave": "Controla el guardado automático de los archivos modificados. Valores aceptados: \"{0}\", \"{1}\", \"{2}\" (el editor pierde el foco), \"{3}\" (la ventana pierde el foco) . Si se establece en \"{4}\", puede configurar el retraso en \"files.autoSaveDelay\".", + "autoSaveDelay": "Controla el retraso en MS tras el cual un archivo con modificaciones se guarda automáticamente. Solo se aplica si \"files.autoSave\" está establecido en \"{0}\"", + "watcherExclude": "Configure patrones globales de las rutas de acceso de archivo que se van a excluir de la inspección de archivos. Los patrones deben coincidir con rutas de acceso absolutas (por ejemplo, prefijo ** o la ruta de acceso completa para que la coincidencia sea correcta). Al cambiar esta configuración, es necesario reiniciar. Si observa que Code consume mucho tiempo de CPU al iniciarse, puede excluir las carpetas grandes para reducir la carga inicial. ", + "hotExit.off": "Deshabilita la salida rápida.", + "hotExit.onExit": "hotExit se desencadena al cerrar la aplicación, es decir, al cerrarse la última ventana en Windows/Linux o cuando se desencadena el comando workbench.action.quit (paleta de comandos, enlace de teclado, menú). Todas las ventanas con copias de seguridad se restaurarán la próxima vez que se inicie.", + "hotExit.onExitAndWindowClose": "La salida rápida se desencadena al cerrar la aplicación, es decir, al cerrarse la última ventana en Windows/Linux o cuando se desencadena el comando workbench.action.quit (paleta de comandos, enlace de teclado, menú), y también para cualquier ventana que tenga una carpeta abierta, independientemente de que sea o no la última ventana. Todas las ventanas sin carpetas abiertas se restaurarán la próxima vez que se inicie. Para restaurar las ventanas con carpetas tal cual estaban antes de cerrarse, establezca \"window.restoreWindows\" a \"all\".", + "hotExit": "Controla si los archivos no guardados se recuerdan entre las sesiones, lo que permite omitir el mensaje para guardar al salir del editor.", + "useExperimentalFileWatcher": "Utilice el nuevo monitor de archivo experimental.", + "defaultLanguage": "El modo de lenguaje predeterminado que se asigna a nuevos archivos.", + "editorConfigurationTitle": "Editor", + "formatOnSave": "Formatea un archivo al guardarlo. Debe haber un formateador disponible, el archivo no debe guardarse automáticamente y el editor no debe estar cerrándose.", + "explorerConfigurationTitle": "Explorador de archivos", + "openEditorsVisible": "Número de editores mostrados en el panel Editores abiertos. Establezca este valor en 0 para ocultar el panel.", + "dynamicHeight": "Controla si la altura de la sección de editores abiertos debería adaptarse o no de forma dinámica al número de elementos.", + "autoReveal": "Controla si el explorador debe mostrar y seleccionar automáticamente los archivos al abrirlos.", + "enableDragAndDrop": "Controla si el explorador debe permitir mover archivos y carpetas mediante la función arrastrar y colocar.", + "confirmDragAndDrop": "Controla si el explorador debe pedir la confirmación al reubicar archivos o carpetas a través de arrastrar y soltar.", + "confirmDelete": "Controla si el explorador debe pedir la confirmación al borrar un archivo utilizando la papelera.", + "sortOrder.default": "Los archivos y las carpetas se ordenan por nombre alfabéticamente. Las carpetas se muestran antes que los archivos.", + "sortOrder.mixed": "Los archivos y las carpetas se ordenan por nombre alfabéticamente. Los archivos se entrelazan con las carpetas.", + "sortOrder.filesFirst": "Los archivos y las carpetas se ordenan por nombre alfabéticamente. Los archivos se muestran antes que las carpetas.", + "sortOrder.type": "Los archivos y las carpetas se ordenan por extensión. Las carpetas se muestran antes que los archivos.", + "sortOrder.modified": "Los archivos y las carpetas se ordenan por fecha de última modificación. Las carpetas se muestran antes que los archivos.", + "sortOrder": "Controla el criterio de ordenación de los archivos y las carpetas en el explorador. Además del orden \"default\", puede establecer el orden en \"mixed\" (los archivos y las carpetas se ordenan combinados), \"type\" (por tipo de archivo), \"modified\" (por fecha de última modificación) o \"filesFirst\" (los archivos se colocan antes que las carpetas).", + "explorer.decorations.colors": "Controla si las decoraciones de archivo deben utilizar colores. ", + "explorer.decorations.badges": "Controla si las decoraciones de archivo deben utilizar insignias" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/esn/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json new file mode 100644 index 00000000000..186f5cdaa42 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "userGuide": "Use las acciones de la barra de herramientas del editor situada a la derecha para **deshacer** los cambios o **sobrescribir** el contenido del disco con sus cambios", + "discard": "Descartar", + "overwrite": "Sobrescribir", + "retry": "Reintentar", + "readonlySaveError": "No se pudo guardar '{0}': El archivo está protegido contra escritura. Seleccione \"Sobrescribir\" para quitar la protección.", + "genericSaveError": "No se pudo guardar '{0}': {1}", + "staleSaveError": "No se pudo guardar '{0}': El contenido del disco es más reciente. Haga clic en **Comparar** para comparar su versión con la que hay en el disco.", + "compareChanges": "Comparar", + "saveConflictDiffLabel": "0} (on disk) ↔ {1} (in {2}) - Resolver conflicto guardado" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json new file mode 100644 index 00000000000..bed30ddc028 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "No hay ninguna carpeta abierta", + "explorerSection": "Sección del Explorador de archivos", + "noWorkspaceHelp": "Todavía no ha agregado una carpeta al espacio de trabajo.", + "addFolder": "Agregar Carpeta", + "noFolderHelp": "Todavía no ha abierto ninguna carpeta.", + "openFolder": "Abrir carpeta" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json new file mode 100644 index 00000000000..e05ecb0ff0e --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label": "Explorador", + "canNotResolve": "No se puede resolver la carpeta de trabajo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json b/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json new file mode 100644 index 00000000000..3c7ee5abd0c --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Sección del Explorador de archivos", + "treeAriaLabel": "Explorador de archivos" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json new file mode 100644 index 00000000000..695039c3919 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Escriba el nombre de archivo. Presione ENTRAR para confirmar o Esc para cancelar", + "filesExplorerViewerAriaLabel": "{0}, Explorador de archivos", + "dropFolders": "¿Quiere agregar las carpetas al área de trabajo?", + "dropFolder": "¿Quiere agregar la carpeta al área de trabajo?", + "addFolders": "&&Agregar carpetas", + "addFolder": "&&Agregar carpeta", + "confirmMove": "¿Está seguro de que desea mover '{0}'?", + "doNotAskAgain": "No volver a preguntarme", + "moveButtonLabel": "&&Mover", + "confirmOverwriteMessage": "'{0}' ya existe en la carpeta de destino. ¿Desea reemplazarlo?", + "irreversible": "Esta acción es irreversible.", + "replaceButtonLabel": "&&Reemplazar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json b/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json new file mode 100644 index 00000000000..b4bad361098 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Editores abiertos", + "openEditosrSection": "Sección Editores abiertos", + "dirtyCounter": "{0} sin guardar", + "saveAll": "Guardar todos", + "closeAllUnmodified": "Cerrar los que no se han modificado", + "closeAll": "Cerrar todo", + "compareWithSaved": "Comparar con el guardado", + "close": "Cerrar", + "closeOthers": "Cerrar otros" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json b/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json new file mode 100644 index 00000000000..f43443fbdd0 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, grupo de editores", + "openEditorAriaLabel": "{0}, abrir editor", + "saveAll": "Guardar todos", + "closeAllUnmodified": "Cerrar los que no se han modificado", + "closeAll": "Cerrar todo", + "compareWithSaved": "Comparar con el guardado", + "close": "Cerrar", + "closeOthers": "Cerrar otros" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/esn/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json new file mode 100644 index 00000000000..98e543b7975 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "totalProblems": "Total {0} Problemas", + "filteredProblems": "Mostrando {0} de {1} problemas" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/esn/src/vs/workbench/parts/markers/common/messages.i18n.json index 967a2c1221b..a028050eafb 100644 --- a/i18n/esn/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,8 +6,7 @@ { "viewCategory": "Ver", "problems.view.toggle.label": "Alternar Problemas ", - "problems.view.show.label": "Mostrar problemas", - "problems.view.hide.label": "Ocultar problemas", + "problems.view.focus.label": "Problemas de enfoque", "problems.panel.configuration.title": "Vista Problemas", "problems.panel.configuration.autoreveal": "Controla si la vista Problemas debe revelar automáticamente los archivos cuando los abre", "markers.panel.title.problems": "Problemas", diff --git a/i18n/esn/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json b/i18n/esn/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json new file mode 100644 index 00000000000..8aa6eb775be --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "prof.message": "Los perfiles se crearon correctamente.", + "prof.detail": "Cree un problema y asóciele manualmente los siguientes archivos: {0}", + "prof.restartAndFileIssue": "Crear problema y reiniciar", + "prof.restart": "Reiniciar", + "prof.thanks": "Gracias por ayudarnos.", + "prof.detail.restart": "Se necesita un reinicio final para continuar utilizando '{0}'. De nuevo, gracias por su aportación." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index ebc1493ef92..e52d04db2ea 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defineKeybinding.initial": "Presione la combinación de teclas que desee y después ENTRAR. Presione ESCAPE para cancelar.", + "defineKeybinding.initial": "Presione la combinación de teclas deseada y ENTRAR", "defineKeybinding.chordsTo": "chord to" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index 4d507416fe8..a8c228e2136 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -26,6 +26,7 @@ "editKeybindingLabel": "Cambiar enlace de teclado", "addKeybindingLabelWithKey": "Agregar enlace de teclado {0}", "addKeybindingLabel": "Agregar enlace de teclado", + "title": "{0} ({1})", "commandAriaLabel": "El comando es {0}.", "keybindingAriaLabel": "El enlace de teclado es {0}.", "noKeybinding": "No se ha asignado ningún enlace de teclado.", diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 402cc5d581e..bfc605b3a91 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "openRawDefaultSettings": "Abrir Configuración Predeterminada Raw", "openGlobalSettings": "Abrir configuración de usuario", "openGlobalKeybindings": "Abrir métodos abreviados de teclado", "openGlobalKeybindingsFile": "Abrir el archivo de métodos abreviados de teclado", diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 35264ae0434..d4ccc7af05b 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -7,12 +7,12 @@ "settingsEditorName": "Configuración predeterminada", "SearchSettingsWidget.AriaLabel": "Buscar configuración", "SearchSettingsWidget.Placeholder": "Buscar configuración", - "totalSettingsMessage": "{0} configuraciones en total", "noSettingsFound": "Sin resultados", "oneSettingFound": "Coincide 1 configuración", "settingsFound": "{0} configuraciones coincidentes", - "fileEditorWithInputAriaLabel": "{0}. Editor de archivos de texto.", - "fileEditorAriaLabel": "Editor de archivos de texto.", + "totalSettingsMessage": "{0} configuraciones en total", + "defaultSettings": "Configuración predeterminada", + "defaultFolderSettings": "Configuración de carpeta predeterminada", "defaultEditorReadonly": "Editar en el editor de lado de mano derecha para reemplazar valores predeterminados.", "preferencesAriaLabel": "Preferencias predeterminadas. Editor de texto de solo lectura." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index c1606c5e1a9..7ed7ff16024 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -7,8 +7,6 @@ "emptyUserSettingsHeader": "Coloque aquí su configuración para sobrescribir la configuración predeterminada.", "emptyWorkspaceSettingsHeader": "Coloque aquí su configuración para sobrescribir la configuración de usuario.", "emptyFolderSettingsHeader": "Coloque aquí su configuración de carpeta para sobrescribir la que se especifica en la configuración de área de trabajo.", - "defaultFolderSettingsTitle": "Configuración de carpeta predeterminada", - "defaultSettingsTitle": "Configuración predeterminada", "editTtile": "Editar", "replaceDefaultValue": "Reemplazar en Configuración", "copyDefaultValue": "Copiar en Configuración", diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index 41053cf2b5e..b720c2b8a57 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultSettingsFuzzyPrompt": "Pruebe la búsqueda parcial", + "defaultSettingsFuzzyPrompt": "¡Intentar la búsqueda del lenguaje natural!", "defaultSettings": "Colocar la configuración en el editor de lado de mano derecha para anular.", "noSettingsFound": "No se encontró ninguna configuración.", - "folderSettingsDetails": "Configuración de carpeta", - "enableFuzzySearch": "Habilitar búsqueda parcial experimental" + "settingsSwitcherBarAriaLabel": "Conmutador de configuración", + "userSettings": "Configuración de usuario", + "workspaceSettings": "Configuración de área de trabajo", + "folderSettings": "Configuración de Carpeta", + "enableFuzzySearch": "Habilitar búsqueda en lenguaje natural" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json new file mode 100644 index 00000000000..dd7480cb534 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Editor de preferencias predeterminado", + "keybindingsEditor": "Editor de enlaces de teclado", + "preferences": "Preferencias" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json index 6b08e43a291..7f679305c9e 100644 --- a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -6,7 +6,6 @@ { "scm providers": "Proveedores de Control de Código fuente", "hideRepository": "Ocultar", - "commitMessage": "Message (press {0} to commit)", "installAdditionalSCMProviders": "Instalar proveedores adicionales de SCM...", "no open repo": "No hay proveedores de control de código fuente activos.", "source control": "Control de código fuente", diff --git a/i18n/esn/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/esn/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index 38a5525c74a..906114aeb5e 100644 --- a/i18n/esn/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defaultLabel": "entrada", - "useIgnoreFilesDescription": "Usar archivos ignore", - "useExcludeSettingsDescription": "Usar Excluir configuración" + "useExcludesAndIgnoreFilesDescription": "Usar la Configuración de Exclusión e Ignorar Archivos" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/search/browser/search.contribution.i18n.json index 1a0bd6edd0f..ffd95f2732d 100644 --- a/i18n/esn/src/vs/workbench/parts/search/browser/search.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -16,7 +16,6 @@ "exclude.boolean": "El patrón global con el que se harán coincidir las rutas de acceso de los archivos. Establézcalo en true o false para habilitarlo o deshabilitarlo.", "exclude.when": "Comprobación adicional de los elementos del mismo nivel de un archivo coincidente. Use $(nombreBase) como variable para el nombre de archivo que coincide.", "useRipgrep": "Controla si se utiliza ripgrep en la búsqueda de texto y ficheros", - "useIgnoreFilesByDefault": "Controla si se utilizan los archivos .gitignore e .ignore de forma predeterminada al buscar en una nueva área de trabajo.", "useIgnoreFiles": "Controla si se utilizan los archivos .gitignore e .ignore al buscar archivos.", "search.quickOpen.includeSymbols": "Configurar para incluir los resultados de una búsqueda global de símbolos en los resultados de archivos de Quick Open.", "search.followSymlinks": "Controla si va a seguir enlaces simbólicos durante la búsqueda." diff --git a/i18n/esn/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/esn/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 7d28af93190..bcfc62d1906 100644 --- a/i18n/esn/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -10,17 +10,14 @@ "previousSearchExcludePattern": "Mostrar búsqueda anterior de patrón exclude ", "nextSearchTerm": "Mostrar siguiente término de búsqueda", "previousSearchTerm": "Mostrar anterior término de búsqueda", - "focusNextInputBox": "Centrarse en el siguiente cuadro de entrada", - "focusPreviousInputBox": "Centrarse en el anterior cuadro de entrada", "showSearchViewlet": "Mostrar búsqueda", "findInFiles": "Buscar en archivos", "findInFilesWithSelectedText": "Buscar en ficheros de texto seleccionado", "replaceInFiles": "Reemplazar en archivos", "replaceInFilesWithSelectedText": "Reemplazar en archivos con el texto seleccionado", - "findInWorkspace": "Buscar en área de trabajo...", - "findInFolder": "Buscar en carpeta...", "RefreshAction.label": "Actualizar", - "ClearSearchResultsAction.label": "Borrar resultados de la búsqueda", + "CollapseDeepestExpandedLevelAction.label": "Contraer todo", + "ClearSearchResultsAction.label": "Borrar", "FocusNextSearchResult.label": "Centrarse en el siguiente resultado de la búsqueda", "FocusPreviousSearchResult.label": "Centrarse en el anterior resultado de la búsqueda", "RemoveAction.label": "Despedir", diff --git a/i18n/esn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json new file mode 100644 index 00000000000..fe7e74dbe33 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Ir al símbolo en el área de trabajo...", + "name": "Buscar", + "search": "Buscar", + "view": "Ver", + "openAnythingHandlerDescription": "Ir al archivo", + "openSymbolDescriptionNormal": "Ir al símbolo en el área de trabajo", + "searchOutputChannelTitle": "Buscar", + "searchConfigurationTitle": "Buscar", + "exclude": "Configure patrones globales para excluir archivos y carpetas de las búsquedas. Hereda todos los patrones globales de la configuración files.exclude.", + "exclude.boolean": "El patrón global con el que se harán coincidir las rutas de acceso de los archivos. Establézcalo en true o false para habilitarlo o deshabilitarlo.", + "exclude.when": "Comprobación adicional de los elementos del mismo nivel de un archivo coincidente. Use $(nombreBase) como variable para el nombre de archivo que coincide.", + "useRipgrep": "Controla si se utiliza ripgrep en la búsqueda de texto y ficheros", + "useIgnoreFiles": "Controla si se utilizan los archivos .gitignore e .ignore al buscar archivos.", + "search.quickOpen.includeSymbols": "Configurar para incluir los resultados de una búsqueda global de símbolos en los resultados de archivos de Quick Open.", + "search.followSymlinks": "Controla si debe seguir enlaces simbólicos durante la búsqueda." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/esn/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json new file mode 100644 index 00000000000..824168d9089 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "findInFolder": "Buscar en carpeta...", + "findInWorkspace": "Buscar en área de trabajo..." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 26d019052c5..aeb9febd9fc 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -6,10 +6,9 @@ { "tasksCategory": "Tareas", "ConfigureTaskRunnerAction.label": "Configurar tarea", - "ConfigureBuildTaskAction.label": "Configurar tarea de compilación", "CloseMessageAction.label": "Cerrar", - "ShowTerminalAction.label": "Ver terminal", "problems": "Problemas", + "building": "Compilando...", "manyMarkers": "Más de 99", "runningTasks": "Mostrar tareas en ejecución", "tasks": "Tareas", @@ -52,7 +51,7 @@ "TaslService.noEntryToRun": "No se encontraron tareas para ejecutar. Configurar tareas...", "TaskService.fetchingBuildTasks": "Obteniendo tareas de compilación...", "TaskService.pickBuildTask": "Seleccione la tarea de compilación para ejecutar", - "TaskService.noBuildTask": "No se encontraron tareas de compilación para ejecutar. Configurar tareas...", + "TaskService.noBuildTask": "No se encontraron tareas de compilación para ejecutar. Configurar tareas de compilación...", "TaskService.fetchingTestTasks": "Capturando tareas de prueba...", "TaskService.pickTestTask": "Seleccione la tarea de prueba para ejecutar", "TaskService.noTestTaskTerminal": "No se encontraron tareas de prueba para ejecutar. Configurar tareas...", diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index a3bf48c132e..46ceb4b7231 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -7,6 +7,7 @@ "TerminalTaskSystem.unknownError": "Error desconocido durante la ejecución de una tarea. Vea el registro de resultados de la tarea para obtener más detalles.", "dependencyFailed": "No se pudo resolver la tarea dependiente '{0}' en la carpeta del área de trabajo '{1}'", "TerminalTaskSystem.terminalName": "Tarea - {0}", + "closeTerminal": "Pulse cualquier tecla para cerrar el terminal", "reuseTerminal": "Las tareas reutilizarán el terminal, presione cualquier tecla para cerrarlo.", "TerminalTaskSystem": "No se puede ejecutar un comando shell en una unidad UNC.", "unkownProblemMatcher": "No puede resolver el comprobador de problemas {0}. Será omitido." diff --git a/i18n/esn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index f6279ef6605..abc8b42466a 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,8 +14,8 @@ "ConfigurationParser.noTypeDefinition": "Error: No hay ningún tipo de tarea \"{0}\" registrado. ¿Omitió la instalación de una extensión que proporciona un proveedor de tareas correspondiente?", "ConfigurationParser.missingRequiredProperty": "Error: la configuración de la tarea '{0}' no contiene la propiedad requerida '{1}'. Se omitirá la configuración de la tarea.", "ConfigurationParser.notCustom": "Error: Las tareas no se declaran como una tarea personalizada. La configuración se omitirá.\n{0}\n", - "ConfigurationParser.noTaskName": "Error: Las tareas deben proporcionar una propiedad taskName. La tarea se ignorará. {0}", - "taskConfiguration.shellArgs": "Advertencia: La tarea \"{0}\" es un comando de shell y su nombre de comando o uno de sus argumentos tiene espacios sin escape. Para asegurarse de que la línea de comandos se cite correctamente, combine mediante fusión los argumentos en el comando.", + "ConfigurationParser.noTaskName": "Error: Las tareas deben proporcionar una propiedad label. La tarea se ignorará.\n{0}\n", + "taskConfiguration.shellArgs": "Advertencia: La tarea '{0}' es un comando de shell y uno de sus argumentos podría tener espacios sin escape. Para asegurarse de que la línea de comandos se cite correctamente, fusione mediante combinación los argumentos en el comando.", "taskConfiguration.noCommandOrDependsOn": "Error: La tarea \"{0}\" no especifica un comando ni una propiedad dependsOn. La tarea se ignorará. Su definición es: \n{1}", "taskConfiguration.noCommand": "Error: La tarea \"{0}\" no define un comando. La tarea se ignorará. Su definición es: {1}", "TaskParse.noOsSpecificGlobalTasks": "La versión de tarea 2.0.0 no admite tareas específicas de SO globales. Conviértalas en una tarea con un comando específico de SO. Estas son las tareas afectadas:\n{0}" diff --git a/i18n/esn/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index 34f865d0af2..e86ad1697c1 100644 --- a/i18n/esn/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,7 +6,6 @@ { "termEntryAriaLabel": "{0}, selector de terminal", "termCreateEntryAriaLabel": "{0}, crear nueva terminal", - "'workbench.action.terminal.newplus": "$(plus) crear nueva Terminal integrada", "noTerminalsMatching": "No hay terminales coincidentes", "noTerminalsFound": "No hay terminales abiertos" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 107a0eecf8a..dad0465be35 100644 --- a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,13 +5,14 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "Tema de color", + "themes.category.light": "temas claros", + "themes.category.dark": "temas oscuros", "installColorThemes": "Instalar temas de color adicionales...", "themes.selectTheme": "Seleccione el tema de color (flecha arriba/abajo para vista previa)", "selectIconTheme.label": "Tema de icono de archivo", - "installIconThemes": "Instalar temas de icono de archivo adicionles...", "noIconThemeLabel": "Ninguno", "noIconThemeDesc": "Deshabilitar iconos de archivo", - "problemChangingIconTheme": "Problema al configurar el tema de icono: {0}", + "installIconThemes": "Instalar temas de icono de archivo adicionles...", "themes.selectIconTheme": "Seleccionar tema de icono de archivo", "generateColorTheme.label": "General el tema de color desde la configuración actual", "preferences": "Preferencias", diff --git a/i18n/esn/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/esn/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 9461c69f688..caa5ba37413 100644 --- a/i18n/esn/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/esn/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -9,9 +9,9 @@ "scope.window.description": "Configuración específica para ventanas, que se puede definir en la configuración de usuario o de área de trabajo.", "scope.resource.description": "Configuración específica para recursos, que se puede definir en la configuración de usuario, de área de trabajo o de carpeta.", "scope.description": "Ãmbito donde es aplicable la configuración. Los ámbitos disponibles son \"window\" y \"resource\".", + "vscode.extension.contributes.defaultConfiguration": "Contribuye a la configuración de los parámetros del editor predeterminados por lenguaje.", "vscode.extension.contributes.configuration": "Aporta opciones de configuración.", "invalid.title": "configuration.title debe ser una cadena", - "vscode.extension.contributes.defaultConfiguration": "Contribuye a la configuración de los parámetros del editor predeterminados por lenguaje.", "invalid.properties": "configuration.properties debe ser un objeto", "invalid.allOf": "'configuration.allOf' está en desuso y ya no debe ser utilizado. En cambio, pase varias secciones de configuración como un arreglo al punto de contribución 'configuration'.", "workspaceConfig.folders.description": "Lista de carpetas para cargar en el área de trabajo. ", diff --git a/i18n/esn/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json b/i18n/esn/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json new file mode 100644 index 00000000000..fb3b052d7b4 --- /dev/null +++ b/i18n/esn/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetría", + "telemetry.enableCrashReporting": "Habilite los informes de bloqueo para enviarlos a Microsoft. Esta opción requiere reiniciar para que tenga efecto." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/esn/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index 74a0358730f..134d1d48628 100644 --- a/i18n/esn/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "bubbleTitle": "contiene elementos resaltados" + "bubbleTitle": "Contiene elementos resaltados" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/esn/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/esn/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/esn/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index 0e9ec06b1bf..1e7e9507ab3 100644 --- a/i18n/esn/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -9,5 +9,6 @@ "extensionHostProcess.crash": "El host de extensiones finalizó inesperadamente.", "extensionHostProcess.unresponsiveCrash": "Se terminó el host de extensiones porque no respondía.", "overwritingExtension": "Sobrescribiendo la extensión {0} con {1}.", - "extensionUnderDevelopment": "Cargando la extensión de desarrollo en {0}" + "extensionUnderDevelopment": "Cargando la extensión de desarrollo en {0}", + "extensionCache.invalid": "Las extensiones han sido modificadas en disco. Por favor, vuelva a cargar la ventana." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/esn/src/vs/workbench/services/files/node/fileService.i18n.json index 32802572ad8..35eecc94183 100644 --- a/i18n/esn/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/files/node/fileService.i18n.json @@ -8,8 +8,8 @@ "fileIsDirectoryError": "Archivo es el directorio", "fileNotModifiedError": "Archivo no modificado desde", "fileTooLargeError": "Archivo demasiado grande para abrirlo", - "fileBinaryError": "El archivo parece ser binario y no se puede abrir como texto", "fileNotFoundError": "Archivo no encontrado ({0})", + "fileBinaryError": "El archivo parece ser binario y no se puede abrir como texto", "fileExists": "El archivo a crear ya existe ({0})", "fileMoveConflict": "No se puede mover o copiar. El archivo ya existe en la ubicación de destino. ", "unableToMoveCopyError": "No se puede mover o copiar. El archivo reemplazaría a la carpeta que lo contiene.", diff --git a/i18n/esn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/esn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 3c4bba8db16..c94ca02c933 100644 --- a/i18n/esn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -22,5 +22,5 @@ "keybindings.json.when": "Condición cuando la tecla está activa.", "keybindings.json.args": "Argumentos que se pasan al comando para ejecutar.", "keyboardConfigurationTitle": "Teclado", - "dispatch": "Controla la lógica de distribución de las pulsaciones de teclas para usar `keydown.code` (recomendado) o `keydown.keyCode`." + "dispatch": "Controla la lógica de distribución de las pulsaciones de teclas para usar `code` (recomendado) o `keyCode`." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/esn/src/vs/workbench/services/textfile/common/textFileService.i18n.json index ab812aaa098..671c3c1b060 100644 --- a/i18n/esn/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "files.backup.failSave": "No se pudo hacer una copia de seguridad de los archivos (Error: {0}). Intente guardar los archivos para salir." + "files.backup.failSave": "No se pudo hacer una copia de seguridad de los archivos con modificaciones pendientes (Error: {0}). Intente guardar los archivos antes de salir." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index cb85af9d3cd..302c7ed170b 100644 --- a/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "migration.completed": "Se han agregado nuevos valores de tema a la configuración de usuario. Hay una copia de seguridad disponible en {0}.", "error.cannotloadtheme": "Unable to load {0}: {1}", - "error.cannotloadicontheme": "Unable to load {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Especifica el tema de icono utilizado en el área de trabajo o \"null\" para no mostrar ningún icono de archivo.", diff --git a/i18n/fra/extensions/css/client/out/cssMain.i18n.json b/i18n/fra/extensions/css/client/out/cssMain.i18n.json index b21ec04c253..d82cbdd1b34 100644 --- a/i18n/fra/extensions/css/client/out/cssMain.i18n.json +++ b/i18n/fra/extensions/css/client/out/cssMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "cssserver.name": "Serveur de langage CSS" + "cssserver.name": "Serveur de langage CSS", + "folding.start": "Début de la région repliable", + "folding.end": "Fin de la région repliable" } \ No newline at end of file diff --git a/i18n/fra/extensions/git/out/autofetch.i18n.json b/i18n/fra/extensions/git/out/autofetch.i18n.json new file mode 100644 index 00000000000..c7e1b61f3ec --- /dev/null +++ b/i18n/fra/extensions/git/out/autofetch.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yes": "Oui", + "no": "Non", + "not now": "Pas maintenant", + "suggest auto fetch": "Voulez-vous activer la rappatriement automatique des dépôts Git ?" +} \ No newline at end of file diff --git a/i18n/fra/extensions/git/out/commands.i18n.json b/i18n/fra/extensions/git/out/commands.i18n.json index e0dab3e5a12..ec8efb3f0d7 100644 --- a/i18n/fra/extensions/git/out/commands.i18n.json +++ b/i18n/fra/extensions/git/out/commands.i18n.json @@ -9,9 +9,12 @@ "create branch": "$(plus) Créer nouvelle branche", "repourl": "URL du dépôt", "parent": "Répertoire parent", + "cancel": "$(sync~spin) Clonage du dépôt... Cliquer pour annuler", + "cancel tooltip": "Annuler le clonage", "cloning": "Clonage du dépôt git...", "openrepo": "Ouvrir le dépôt", "proposeopen": "Voulez-vous ouvrir le dépôt cloné ?", + "init": "Choisir le dossier d’espace de travail dans lequel initialiser le dépôt git", "init repo": "Initialiser le dépôt", "create repo": "Initialiser le dépôt", "are you sure": "Ceci va créer un dépôt Git dans '{0}'. Êtes-vous sûr de vouloir continuer ?", @@ -49,12 +52,15 @@ "select branch to delete": "Sélectionner une branche à supprimer", "confirm force delete branch": "La branche '{0}' n'est pas complètement fusionnée. Supprimer quand même ?", "delete branch": "Supprimer la branche", + "invalid branch name": "Nom de la branche non valide", + "branch already exists": "Une branche nommée '0}' existe déjà", "select a branch to merge from": "Sélectionner une branche à fusionner", "merge conflicts": "Il existe des conflits de fusion. Corrigez-les avant la validation.", "tag name": "Nom de la balise", "provide tag name": "Spécifiez un nom de balise", "tag message": "Message", "provide tag message": "Spécifiez un message pour annoter la balise", + "no remotes to fetch": "Ce dépôt n'a aucun dépôt distant configuré pour rappatrier.", "no remotes to pull": "Votre dépôt n'a aucun dépôt distant configuré pour un Pull.", "pick remote pull repo": "Choisir un dépôt distant duquel extraire la branche", "no remotes to push": "Votre dépôt n'a aucun dépôt distant configuré pour un Push.", @@ -71,7 +77,7 @@ "no stashes": "Aucune remise (stash) à restaurer.", "pick stash to pop": "Choisir une remise (stash) à appliquer et supprimer", "clean repo": "Nettoyez l'arborescence de travail de votre dépôt avant l'extraction.", - "cant push": "Push impossible des références vers la branche distante. Exécutez d'abord 'Extraire' pour intégrer vos modifications.", + "cant push": "impossible de pousser les références vers la branche distante. Exécutez d'abord 'Récupérer' pour intégrer vos modifications.", "git error details": "Git : {0}", "git error": "Erreur Git", "open git log": "Ouvrir le journal Git" diff --git a/i18n/fra/extensions/git/out/main.i18n.json b/i18n/fra/extensions/git/out/main.i18n.json index 7ce7bde078c..87c8761c8f5 100644 --- a/i18n/fra/extensions/git/out/main.i18n.json +++ b/i18n/fra/extensions/git/out/main.i18n.json @@ -4,8 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "looking": "Recherche de git dans : {0}", "using git": "Utilisation de git {0} à partir de {1}", - "updateGit": "Mettre à jour Git", + "downloadgit": "Télécharger Git", "neverShowAgain": "Ne plus afficher", + "notfound": "Git non trouvé. Installez-le et configurez-le en utilisant le paramètre 'git.path'.", + "updateGit": "Mettre à jour Git", "git20": "Git {0} semble installé. Le code fonctionne mieux avec git >= 2" } \ No newline at end of file diff --git a/i18n/fra/extensions/git/out/repository.i18n.json b/i18n/fra/extensions/git/out/repository.i18n.json index 75b81935d06..e53c292db10 100644 --- a/i18n/fra/extensions/git/out/repository.i18n.json +++ b/i18n/fra/extensions/git/out/repository.i18n.json @@ -21,6 +21,7 @@ "deleted by us": "Supprimé par nos soins", "both added": "Tous deux ajoutés", "both modified": "Tous deux modifiés", + "commitMessage": "Message (press {0} to commit)", "commit": "Commit", "merge changes": "Fusionner les modifications", "staged changes": "Modifications en zone de transit", diff --git a/i18n/fra/extensions/git/package.i18n.json b/i18n/fra/extensions/git/package.i18n.json index f21d3ba66f7..188e2b5ba4a 100644 --- a/i18n/fra/extensions/git/package.i18n.json +++ b/i18n/fra/extensions/git/package.i18n.json @@ -33,18 +33,22 @@ "command.checkout": "Extraire vers...", "command.branch": "Créer une branche...", "command.deleteBranch": "Supprimer la branche...", + "command.renameBranch": "Renommer la branche...", "command.merge": "Fusionner la branche...", "command.createTag": "Créer une étiquette", + "command.fetch": "Rappatrier", "command.pull": "Pull", "command.pullRebase": "Pull (rebaser)", "command.pullFrom": "Extraire de...", "command.push": "Push", "command.pushTo": "Transfert (Push) vers...", - "command.pushWithTags": "Transférer (Push) avec les étiquettes", + "command.pushWithTags": "Envoyer avec les Tags", "command.sync": "Synchroniser", + "command.syncRebase": "Synchroniser (Rebase)", "command.publish": "Publier la branche", "command.showOutput": "Afficher la sortie Git", "command.ignore": "Ajouter un fichier à .gitignore", + "command.stashIncludeUntracked": "Remiser (Inclure les non-tracés)", "command.stash": "Remiser (stash)", "command.stashPop": "Appliquer et supprimer la remise...", "command.stashPopLatest": "Appliquer et supprimer la dernière remise", @@ -57,6 +61,7 @@ "config.countBadge": "Contrôle le compteur de badges Git. La valeur 'toutes' compte toutes les modifications. La valeur 'suivies' compte uniquement les modifications suivies. La valeur 'désactivé' désactive le compteur.", "config.checkoutType": "Contrôle le type des branches répertoriées pendant l'exécution de 'Extraire vers...'. La valeur 'toutes' montre toutes les références, la valeur 'locales' montre uniquement les branches locales, la valeur 'balises' montre uniquement les balises et la valeur 'distantes' montre uniquement les branches distantes.", "config.ignoreLegacyWarning": "Ignore l'avertissement Git hérité", + "config.ignoreMissingGitWarning": "Ignore l'avertissement quand Git est manquant", "config.ignoreLimitWarning": "Ignore l'avertissement quand il y a trop de modifications dans un dépôt", "config.defaultCloneDirectory": "Emplacement par défaut où cloner un dépôt git", "config.enableSmartCommit": "Validez toutes les modifications en l'absence de modifications en attente.", diff --git a/i18n/fra/extensions/html/client/out/htmlMain.i18n.json b/i18n/fra/extensions/html/client/out/htmlMain.i18n.json index 22aacfce94f..5db379fe3be 100644 --- a/i18n/fra/extensions/html/client/out/htmlMain.i18n.json +++ b/i18n/fra/extensions/html/client/out/htmlMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "htmlserver.name": "Serveur de langage HTML" + "htmlserver.name": "Serveur de langage HTML", + "folding.start": "Début de la région repliable", + "folding.end": "Fin de la région repliable" } \ No newline at end of file diff --git a/i18n/fra/extensions/markdown/out/commands.i18n.json b/i18n/fra/extensions/markdown/out/commands.i18n.json new file mode 100644 index 00000000000..10a62fe5396 --- /dev/null +++ b/i18n/fra/extensions/markdown/out/commands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previewTitle": "Prévisualiser {0}", + "onPreviewStyleLoadError": "Impossible de charger 'markdown.styles' : {0}" +} \ No newline at end of file diff --git a/i18n/fra/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/fra/extensions/markdown/out/features/previewContentProvider.i18n.json new file mode 100644 index 00000000000..2eb7c81389d --- /dev/null +++ b/i18n/fra/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "Du contenu a été désactivé dans ce document", + "preview.securityMessage.title": "Le contenu potentiellement dangereux ou précaire a été désactivé dans l’aperçu du format markdown. Modifier le paramètre de sécurité Aperçu Markdown afin d’autoriser les contenus non sécurisés ou activer les scripts", + "preview.securityMessage.label": "Avertissement de sécurité de contenu désactivé" +} \ No newline at end of file diff --git a/i18n/fra/extensions/markdown/out/security.i18n.json b/i18n/fra/extensions/markdown/out/security.i18n.json index 3dbb7ee43fd..6c5b965cc1a 100644 --- a/i18n/fra/extensions/markdown/out/security.i18n.json +++ b/i18n/fra/extensions/markdown/out/security.i18n.json @@ -11,5 +11,8 @@ "disable.title": "Désactiver", "disable.description": "Autorisez tout le contenu et l’exécution des scripts. Non recommandé", "moreInfo.title": "Informations", + "enableSecurityWarning.title": "Activer l'aperçu d'avertissements de sécurité pour cet espace de travail", + "disableSecurityWarning.title": "Désactiver l'aperçu d'avertissements de sécurité pour cet espace de travail", + "toggleSecurityWarning.description": "N'affecte pas le niveau de sécurité du contenu", "preview.showPreviewSecuritySelector.title": "Sélectionner les paramètres de sécurité pour les aperçus Markdown dans cet espace de travail" } \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/package.i18n.json b/i18n/fra/extensions/merge-conflict/package.i18n.json index 6f812b18e76..6e17d649390 100644 --- a/i18n/fra/extensions/merge-conflict/package.i18n.json +++ b/i18n/fra/extensions/merge-conflict/package.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "Conflit de fusion", + "command.accept.all-current": "Accepter les modifications actuelles", "command.accept.all-incoming": "Accepter toutes les modifications entrantes", "command.accept.all-both": "Accepter les deux", "command.accept.current": "Accepter les modifications actuelles", diff --git a/i18n/fra/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/fra/extensions/typescript/out/features/completionItemProvider.i18n.json index 91434ab1cb2..c0bfc8799c1 100644 --- a/i18n/fra/extensions/typescript/out/features/completionItemProvider.i18n.json +++ b/i18n/fra/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "selectCodeAction": "Sélectionner l'action de code à appliquer", "acquiringTypingsLabel": "Acquisition des typings...", "acquiringTypingsDetail": "Acquisition des définitions typings pour IntelliSense.", "autoImportLabel": "Importation automatique de {0}" diff --git a/i18n/fra/extensions/typescript/package.i18n.json b/i18n/fra/extensions/typescript/package.i18n.json index 48b0d5d17dc..08f12636ad6 100644 --- a/i18n/fra/extensions/typescript/package.i18n.json +++ b/i18n/fra/extensions/typescript/package.i18n.json @@ -39,6 +39,7 @@ "typescript.openTsServerLog.title": "Ouvrir le journal du serveur TS", "typescript.restartTsServer": "Redémarrer le serveur TS", "typescript.selectTypeScriptVersion.title": "Sélectionner la version de TypeScript", + "typescript.reportStyleChecksAsWarnings": "Rapporter les vérifications de style comme des avertissements", "jsDocCompletion.enabled": "Activer/désactiver les commentaires JSDoc automatiques", "javascript.implicitProjectConfig.checkJs": "Activer/désactiver la vérification sémantique des fichiers JavaScript. Les fichiers jsconfig.json ou tsconfig.json existants remplacent ce paramètre. Nécessite TypeScript >=2.3.1.", "typescript.npm": "Spécifie le chemin de l'exécutable NPM utilisé pour l'acquisition de type automatique. Nécessite TypeScript >= 2.3.4.", diff --git a/i18n/fra/src/vs/base/common/errorMessage.i18n.json b/i18n/fra/src/vs/base/common/errorMessage.i18n.json index 0276e51a4a0..6e282a92f0c 100644 --- a/i18n/fra/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/fra/src/vs/base/common/errorMessage.i18n.json @@ -4,13 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "message": "{0}. Code d'erreur : {1}", - "error.permission.verbose": "Autorisation refusée (HTTP {0})", - "error.permission": "Autorisation refusée", - "error.http.verbose": "{0} (HTTP {1} : {2})", - "error.http": "{0} (HTTP {1})", - "error.connection.unknown.verbose": "Erreur de connexion inconnue ({0})", - "error.connection.unknown": "Une erreur de connexion inconnue s'est produite. Soit vous n'êtes plus connecté à Internet, soit le serveur auquel vous êtes connecté est hors connexion.", "stackTrace.format": "{0} : {1}", "error.defaultMessage": "Une erreur inconnue s’est produite. Veuillez consulter le journal pour plus de détails.", "nodeExceptionMessage": "Une erreur système s'est produite ({0})", diff --git a/i18n/fra/src/vs/code/electron-main/main.i18n.json b/i18n/fra/src/vs/code/electron-main/main.i18n.json new file mode 100644 index 00000000000..ad6ce07850e --- /dev/null +++ b/i18n/fra/src/vs/code/electron-main/main.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "secondInstanceNoResponse": "Une autre instance de {0} est déjà en cours d'exécution mais ne répond pas", + "secondInstanceNoResponseDetail": "Veuillez s'il vous plaît fermer toutes les autres instances et réessayer à nouveau.", + "secondInstanceAdmin": "Une seconde instance de {0} est déjà en cours d'exécution en tant qu'administrateur.", + "secondInstanceAdminDetail": "Veuillez s'il vous plaît fermer l'autre instance et réessayer à nouveau.", + "close": "&&Fermer" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/code/electron-main/menus.i18n.json b/i18n/fra/src/vs/code/electron-main/menus.i18n.json index 58e75c2db36..7fc9b17d5ca 100644 --- a/i18n/fra/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/fra/src/vs/code/electron-main/menus.i18n.json @@ -22,12 +22,12 @@ "miQuit": "Quitter {0}", "miNewFile": "&&Nouveau fichier", "miOpen": "&&Ouvrir...", - "miOpenWorkspace": "&&Ouvrir un espace de travail...", + "miOpenWorkspace": "Ouvrir l'espace de travail...", "miOpenFolder": "Ouvrir le &&dossier", "miOpenFile": "&&Ouvrir un fichier...", "miOpenRecent": "Ouvrir les éléments &&récents", - "miSaveWorkspaceAs": "&&Enregistrer l’espace de travail sous...", - "miAddFolderToWorkspace": "&&Ajouter un dossier à l'espace de travail...", + "miSaveWorkspaceAs": "Enregistrer l’espace de travail sous...", + "miAddFolderToWorkspace": "Ajouter un dossier à l'espace de travail...", "miSave": "&&Enregistrer", "miSaveAs": "Enregistrer &&sous...", "miSaveAll": "Enregistrer to&&ut", @@ -157,7 +157,7 @@ "mMergeAllWindows": "Fusionner toutes les fenêtres", "miToggleDevTools": "Activer/désactiver les ou&&tils de développement", "miAccessibilityOptions": "&&Options d'accessibilité", - "miReportIssues": "S&&ignaler les problèmes", + "miReportIssue": "Signaler un problème", "miWelcome": "&&Bienvenue", "miInteractivePlayground": "Terrain de jeu &&interactif", "miDocumentation": "&&Documentation", @@ -184,6 +184,7 @@ "miDownloadingUpdate": "Téléchargement de la mise à jour...", "miInstallingUpdate": "Installation de la mise à jour...", "miCheckForUpdates": "Rechercher les mises à jour...", - "aboutDetail": "\nVersion {0}\nCommit {1}\nDate {2}\nShell {3}\nRenderer {4}\nNode {5}\nArchitecture {6}", - "okButton": "OK" + "aboutDetail": "Version {0}\nCommit {1}\nDate {2}\nShell {3}\nRenderer {4}\nNode {5}\nArchitecture {6}", + "okButton": "OK", + "copy": "&&Copier" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/browser/services/bulkEdit.i18n.json b/i18n/fra/src/vs/editor/browser/services/bulkEdit.i18n.json new file mode 100644 index 00000000000..9a1e91ba2a5 --- /dev/null +++ b/i18n/fra/src/vs/editor/browser/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "Ces fichiers ont changé pendant ce temps : {0}", + "summary.0": "Aucune modification effectuée", + "summary.nm": "{0} modifications de texte effectuées dans {1} fichiers", + "summary.n0": "{0} modifications de texte effectuées dans un fichier" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json index 27e0dbdef63..f74e6c1fbc0 100644 --- a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,12 +10,16 @@ "fontSize": "Contrôle la taille de police en pixels.", "lineHeight": "Contrôle la hauteur de ligne. Utilisez 0 pour calculer lineHeight à partir de fontSize.", "letterSpacing": "Définit l'espacement des caractères en pixels.", - "lineNumbers": "Contrôle l'affichage des numéros de ligne. Les valeurs possibles sont 'activé', 'désactivé' et 'relatif'. La valeur 'relatif' indique le numéro de ligne à partir de la position actuelle du curseur.", + "lineNumbers.off": "Les numéros de ligne ne sont pas affichés.", + "lineNumbers.on": "Les numéros de ligne sont affichés en nombre absolu.", + "lineNumbers.relative": "Les numéros de ligne sont affichés sous la forme de distance en lignes à la position du curseur.", + "lineNumbers.interval": "Les numéros de ligne sont affichés toutes les 10 lignes.", + "lineNumbers": "Contrôle l’affichage des numéros de ligne. Les valeurs possibles sont 'on', 'off', et 'relative'.", "rulers": "Afficher les règles verticales après un certain nombre de caractères à espacement fixe. Utiliser plusieurs valeurs pour plusieurs règles. Aucune règle n'est dessinée si le tableau est vide", "wordSeparators": "Caractères utilisés comme séparateurs de mots durant la navigation ou les opérations basées sur les mots", - "tabSize": "Nombre d'espaces correspondant à une tabulation. Ce paramètre est remplacé en fonction du contenu du fichier quand 'editor.detectIndentation' est activé.", + "tabSize": "Le nombre d'espaces correspondant à une tabulation. Ce paramètre est remplacé en fonction du contenu du fichier quand 'editor.detectIndentation' est activé.", "tabSize.errorMessage": "'number' attendu. Notez que la valeur \"auto\" a été remplacée par le paramètre 'editor.detectIndentation'.", - "insertSpaces": "Des espaces sont insérés quand vous appuyez sur la touche Tab. Ce paramètre est remplacé en fonction du contenu du fichier quand 'editor.detectIndentation' est activé.", + "insertSpaces": "Espaces insérés quand vous appuyez sur la touche Tab. Ce paramètre est remplacé en fonction du contenu du fichier quand 'editor.detectIndentation' est activé.", "insertSpaces.errorMessage": "'boolean' attendu. Notez que la valeur \"auto\" a été remplacée par le paramètre 'editor.detectIndentation'.", "detectIndentation": "Quand vous ouvrez un fichier, 'editor.tabSize' et 'editor.insertSpaces' sont détectés en fonction du contenu du fichier.", "roundedSelection": "Contrôle si les sélections ont des angles arrondis", @@ -89,8 +93,8 @@ "links": "Contrôle si l'éditeur doit détecter les liens et les rendre cliquables", "colorDecorators": "Contrôle si l'éditeur doit afficher les éléments décoratifs de couleurs inline et le sélecteur de couleurs.", "codeActions": "Active l'ampoule d'action de code", + "selectionClipboard": "Contrôle si le presse-papiers primaire Linux doit être pris en charge.", "sideBySide": "Contrôle si l'éditeur de différences affiche les différences en mode côte à côte ou inline", "ignoreTrimWhitespace": "Contrôle si l'éditeur de différences affiche les changements liés aux espaces blancs de début ou de fin comme des différences", - "renderIndicators": "Contrôle si l'éditeur de différences affiche les indicateurs +/- pour les modifications ajoutées/supprimées", - "selectionClipboard": "Contrôle si le presse-papiers primaire Linux doit être pris en charge." + "renderIndicators": "Contrôle si l'éditeur de différences affiche les indicateurs +/- pour les modifications ajoutées/supprimées" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/fra/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json new file mode 100644 index 00000000000..69adc446797 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Atteindre le crochet" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json b/i18n/fra/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json new file mode 100644 index 00000000000..7bc2bb19f59 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "Déplacer le point d'insertion vers la gauche", + "caret.moveRight": "Déplacer le point d'insertion vers la droite" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/caretOperations/transpose.i18n.json b/i18n/fra/src/vs/editor/contrib/caretOperations/transpose.i18n.json new file mode 100644 index 00000000000..9eefe4333b5 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/caretOperations/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Transposer les lettres" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/clipboard/clipboard.i18n.json b/i18n/fra/src/vs/editor/contrib/clipboard/clipboard.i18n.json new file mode 100644 index 00000000000..80310013902 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/clipboard/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Couper", + "actions.clipboard.copyLabel": "Copier", + "actions.clipboard.pasteLabel": "Coller", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Copier avec la coloration syntaxique" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/comment/comment.i18n.json b/i18n/fra/src/vs/editor/contrib/comment/comment.i18n.json new file mode 100644 index 00000000000..d8e23e4d0d7 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/comment/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Activer/désactiver le commentaire de ligne", + "comment.line.add": "Ajouter le commentaire de ligne", + "comment.line.remove": "Supprimer le commentaire de ligne", + "comment.block": "Activer/désactiver le commentaire de bloc" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json b/i18n/fra/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json new file mode 100644 index 00000000000..305f92b19f7 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Afficher le menu contextuel de l'éditeur" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/find/findController.i18n.json b/i18n/fra/src/vs/editor/contrib/find/findController.i18n.json new file mode 100644 index 00000000000..21889b4123e --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/find/findController.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Rechercher", + "findNextMatchAction": "Rechercher suivant", + "findPreviousMatchAction": "Rechercher précédent", + "nextSelectionMatchFindAction": "Sélection suivante", + "previousSelectionMatchFindAction": "Sélection précédente", + "startReplace": "Remplacer", + "showNextFindTermAction": "Afficher le terme de recherche suivant", + "showPreviousFindTermAction": "Afficher le terme de recherche précédent" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/find/findWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/find/findWidget.i18n.json new file mode 100644 index 00000000000..b38c8823721 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/find/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Rechercher", + "placeholder.find": "Rechercher", + "label.previousMatchButton": "Correspondance précédente", + "label.nextMatchButton": "Correspondance suivante", + "label.toggleSelectionFind": "Rechercher dans la sélection", + "label.closeButton": "Fermer", + "label.replace": "Remplacer", + "placeholder.replace": "Remplacer", + "label.replaceButton": "Remplacer", + "label.replaceAllButton": "Tout remplacer", + "label.toggleReplaceButton": "Changer le mode de remplacement", + "title.matchesCountLimit": "Seuls les {0} premiers résultats sont mis en évidence, mais toutes les opérations de recherche fonctionnent sur l’ensemble du texte.", + "label.matchesLocation": "{0} sur {1}", + "label.noResults": "Aucun résultat" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/find/simpleFindWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/find/simpleFindWidget.i18n.json new file mode 100644 index 00000000000..6183484b59c --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/find/simpleFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Rechercher", + "placeholder.find": "Rechercher", + "label.previousMatchButton": "Correspondance précédente", + "label.nextMatchButton": "Correspondance suivante", + "label.closeButton": "Fermer" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/fra/src/vs/editor/contrib/folding/folding.i18n.json new file mode 100644 index 00000000000..a019089db96 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/folding/folding.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Déplier", + "unFoldRecursivelyAction.label": "Déplier de manière récursive", + "foldAction.label": "Plier", + "foldRecursivelyAction.label": "Plier de manière récursive", + "foldAllBlockComments.label": "Replier tous les commentaires de bloc", + "foldAllAction.label": "Plier tout", + "unfoldAllAction.label": "Déplier tout", + "foldLevelAction.label": "Niveau de pliage {0}" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/format/formatActions.i18n.json b/i18n/fra/src/vs/editor/contrib/format/formatActions.i18n.json new file mode 100644 index 00000000000..5d10d9569e4 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/format/formatActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "1 modification de format effectuée à la ligne {0}", + "hintn1": "{0} modifications de format effectuées à la ligne {1}", + "hint1n": "1 modification de format effectuée entre les lignes {0} et {1}", + "hintnn": "{0} modifications de format effectuées entre les lignes {1} et {2}", + "no.provider": "Désolé, mais il n’y a aucun formateur installé pour les fichiers '{0}'.", + "formatDocument.label": "Mettre en forme le document", + "formatSelection.label": "Mettre en forme la sélection" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json b/i18n/fra/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json new file mode 100644 index 00000000000..bdf5cc7e425 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Définition introuvable pour '{0}'", + "generic.noResults": "Définition introuvable", + "meta.title": " – {0} définitions", + "actions.goToDecl.label": "Atteindre la définition", + "actions.goToDeclToSide.label": "Ouvrir la définition sur le côté", + "actions.previewDecl.label": "Aperçu de définition", + "goToImplementation.noResultWord": "Implémentation introuvable pour '{0}'", + "goToImplementation.generic.noResults": "Implémentation introuvable", + "meta.implementations.title": "– Implémentations {0}", + "actions.goToImplementation.label": "Accéder à l'implémentation", + "actions.peekImplementation.label": "Aperçu de l'implémentation", + "goToTypeDefinition.noResultWord": "Définition de type introuvable pour '{0}'", + "goToTypeDefinition.generic.noResults": "Définition de type introuvable", + "meta.typeDefinitions.title": " – Définitions de type {0}", + "actions.goToTypeDefinition.label": "Atteindre la définition de type", + "actions.peekTypeDefinition.label": "Aperçu de la définition du type" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json b/i18n/fra/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json new file mode 100644 index 00000000000..247bd9d24da --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Cliquez pour afficher {0} définitions." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/gotoError/gotoError.i18n.json b/i18n/fra/src/vs/editor/contrib/gotoError/gotoError.i18n.json new file mode 100644 index 00000000000..2e7dbc5e1ee --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/gotoError/gotoError.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Accéder à l'erreur ou l'avertissement suivant", + "markerAction.previous.label": "Accéder à l'erreur ou l'avertissement précédent", + "editorMarkerNavigationError": "Couleur d'erreur du widget de navigation dans les marqueurs de l'éditeur.", + "editorMarkerNavigationWarning": "Couleur d'avertissement du widget de navigation dans les marqueurs de l'éditeur.", + "editorMarkerNavigationInfo": "Couleur d’information du widget de navigation du marqueur de l'éditeur.", + "editorMarkerNavigationBackground": "Arrière-plan du widget de navigation dans les marqueurs de l'éditeur." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/hover/hover.i18n.json b/i18n/fra/src/vs/editor/contrib/hover/hover.i18n.json new file mode 100644 index 00000000000..f2c7ed17560 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/hover/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Afficher par pointage" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/hover/modesContentHover.i18n.json b/i18n/fra/src/vs/editor/contrib/hover/modesContentHover.i18n.json new file mode 100644 index 00000000000..237cac764d0 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/hover/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Chargement..." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json b/i18n/fra/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json new file mode 100644 index 00000000000..ec882a2ca36 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Remplacer par la valeur précédente", + "InPlaceReplaceAction.next.label": "Remplacer par la valeur suivante" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/indentation/indentation.i18n.json b/i18n/fra/src/vs/editor/contrib/indentation/indentation.i18n.json new file mode 100644 index 00000000000..d9fe670d9f5 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/indentation/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Convertir les retraits en espaces", + "indentationToTabs": "Convertir les retraits en tabulations", + "configuredTabSize": "Taille des tabulations configurée", + "selectTabWidth": "Sélectionner la taille des tabulations pour le fichier actuel", + "indentUsingTabs": "Mettre en retrait avec des tabulations", + "indentUsingSpaces": "Mettre en retrait avec des espaces", + "detectIndentation": "Détecter la mise en retrait à partir du contenu", + "editor.reindentlines": "Remettre en retrait les lignes" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json b/i18n/fra/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json new file mode 100644 index 00000000000..ed7fa212566 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Copier la ligne en haut", + "lines.copyDown": "Copier la ligne en bas", + "lines.moveUp": "Déplacer la ligne vers le haut", + "lines.moveDown": "Déplacer la ligne vers le bas", + "lines.sortAscending": "Trier les lignes dans l'ordre croissant", + "lines.sortDescending": "Trier les lignes dans l'ordre décroissant", + "lines.trimTrailingWhitespace": "Découper l'espace blanc de fin", + "lines.delete": "Supprimer la ligne", + "lines.indent": "Mettre en retrait la ligne", + "lines.outdent": "Ajouter un retrait négatif à la ligne", + "lines.insertBefore": "Insérer une ligne au-dessus", + "lines.insertAfter": "Insérer une ligne sous", + "lines.deleteAllLeft": "Supprimer tout ce qui est à gauche", + "lines.deleteAllRight": "Supprimer tout ce qui est à droite", + "lines.joinLines": "Joindre les lignes", + "editor.transpose": "Transposer les caractères autour du curseur", + "editor.transformToUppercase": "Transformer en majuscule", + "editor.transformToLowercase": "Transformer en minuscule" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/links/links.i18n.json b/i18n/fra/src/vs/editor/contrib/links/links.i18n.json new file mode 100644 index 00000000000..d2926b0f956 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/links/links.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Commande + clic pour suivre le lien", + "links.navigate": "Ctrl + clic pour suivre le lien", + "links.command.mac": "Cmd + clic pour exécuter la commande", + "links.command": "Ctrl + clic pour exécuter la commande", + "links.navigate.al": "Alt + clic pour suivre le lien", + "links.command.al": "Alt + clic pour exécuter la commande", + "invalid.url": "Échec de l'ouverture de ce lien, car il n'est pas bien formé : {0}", + "missing.url": "Échec de l'ouverture de ce lien, car sa cible est manquante.", + "label": "Ouvrir le lien" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/multicursor/multicursor.i18n.json b/i18n/fra/src/vs/editor/contrib/multicursor/multicursor.i18n.json new file mode 100644 index 00000000000..04e943155da --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/multicursor/multicursor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Ajouter un curseur au-dessus", + "mutlicursor.insertBelow": "Ajouter un curseur en dessous", + "mutlicursor.insertAtEndOfEachLineSelected": "Ajouter des curseurs à la fin des lignes", + "addSelectionToNextFindMatch": "Ajouter la sélection à la correspondance de recherche suivante", + "addSelectionToPreviousFindMatch": "Ajouter la sélection à la correspondance de recherche précédente", + "moveSelectionToNextFindMatch": "Déplacer la dernière sélection vers la correspondance de recherche suivante", + "moveSelectionToPreviousFindMatch": "Déplacer la dernière sélection à la correspondance de recherche précédente", + "selectAllOccurrencesOfFindMatch": "Sélectionner toutes les occurrences des correspondances de la recherche", + "changeAll.label": "Modifier toutes les occurrences" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json b/i18n/fra/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json new file mode 100644 index 00000000000..b2cdf5bab5e --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Indicateurs des paramètres Trigger" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json new file mode 100644 index 00000000000..6161b759db1 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, conseil" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/fra/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json new file mode 100644 index 00000000000..d48220f8b63 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Afficher les correctifs ({0})", + "quickFix": "Afficher les correctifs", + "quickfix.trigger.label": "Correctif rapide" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json new file mode 100644 index 00000000000..e7284c958c2 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Fermer" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json new file mode 100644 index 00000000000..e46a38e9ef2 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": " – {0} références", + "references.action.label": "Rechercher toutes les références" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json new file mode 100644 index 00000000000..6aa11838980 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Chargement..." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json new file mode 100644 index 00000000000..90937161254 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "symbole dans {0} sur la ligne {1}, colonne {2}", + "aria.fileReferences.1": "1 symbole dans {0}, chemin complet {1}", + "aria.fileReferences.N": "{0} symboles dans {1}, chemin complet {2}", + "aria.result.0": "Résultats introuvables", + "aria.result.1": "1 symbole dans {0}", + "aria.result.n1": "{0} symboles dans {1}", + "aria.result.nm": "{0} symboles dans {1} fichiers" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json new file mode 100644 index 00000000000..498b3551c28 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Échec de la résolution du fichier.", + "referencesCount": "{0} références", + "referenceCount": "{0} référence", + "missingPreviewMessage": "aperçu non disponible", + "treeAriaLabel": "Références", + "noResults": "Aucun résultat", + "peekView.alternateTitle": "Références", + "peekViewTitleBackground": "Couleur d'arrière-plan de la zone de titre de l'affichage d'aperçu.", + "peekViewTitleForeground": "Couleur du titre de l'affichage d'aperçu.", + "peekViewTitleInfoForeground": "Couleur des informations sur le titre de l'affichage d'aperçu.", + "peekViewBorder": "Couleur des bordures et de la flèche de l'affichage d'aperçu.", + "peekViewResultsBackground": "Couleur d'arrière-plan de la liste des résultats de l'affichage d'aperçu.", + "peekViewResultsMatchForeground": "Couleur de premier plan des noeuds de lignes dans la liste des résultats de l'affichage d'aperçu.", + "peekViewResultsFileForeground": "Couleur de premier plan des noeuds de fichiers dans la liste des résultats de l'affichage d'aperçu.", + "peekViewResultsSelectionBackground": "Couleur d'arrière-plan de l'entrée sélectionnée dans la liste des résultats de l'affichage d'aperçu.", + "peekViewResultsSelectionForeground": "Couleur de premier plan de l'entrée sélectionnée dans la liste des résultats de l'affichage d'aperçu.", + "peekViewEditorBackground": "Couleur d'arrière-plan de l'éditeur d'affichage d'aperçu.", + "peekViewEditorGutterBackground": "Couleur d'arrière-plan de la bordure de l'éditeur d'affichage d'aperçu.", + "peekViewResultsMatchHighlight": "Couleur de mise en surbrillance d'une correspondance dans la liste des résultats de l'affichage d'aperçu.", + "peekViewEditorMatchHighlight": "Couleur de mise en surbrillance d'une correspondance dans l'éditeur de l'affichage d'aperçu." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/rename/rename.i18n.json b/i18n/fra/src/vs/editor/contrib/rename/rename.i18n.json new file mode 100644 index 00000000000..d6f02080b63 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/rename/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Aucun résultat.", + "aria": "'{0}' renommé en '{1}'. Récapitulatif : {2}", + "rename.failed": "Échec de l'exécution du renommage.", + "rename.label": "Renommer le symbole" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/rename/renameInputField.i18n.json b/i18n/fra/src/vs/editor/contrib/rename/renameInputField.i18n.json new file mode 100644 index 00000000000..171924e9bf2 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/rename/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Renommez l'entrée. Tapez le nouveau nom et appuyez sur Entrée pour valider." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json b/i18n/fra/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json new file mode 100644 index 00000000000..d815e36cd81 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Développer la sélection", + "smartSelect.shrink": "Réduire la sélection" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/suggest/suggestController.i18n.json b/i18n/fra/src/vs/editor/contrib/suggest/suggestController.i18n.json new file mode 100644 index 00000000000..6715662ea09 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/suggest/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "L'acceptation de '{0}' a inséré le texte suivant : {1}", + "suggest.trigger.label": "Suggestions pour Trigger" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/suggest/suggestWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/suggest/suggestWidget.i18n.json new file mode 100644 index 00000000000..75285eb257e --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/suggest/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "Couleur d'arrière-plan du widget de suggestion.", + "editorSuggestWidgetBorder": "Couleur de bordure du widget de suggestion.", + "editorSuggestWidgetForeground": "Couleur de premier plan du widget de suggestion.", + "editorSuggestWidgetSelectedBackground": "Couleur d'arrière-plan de l'entrée sélectionnée dans le widget de suggestion.", + "editorSuggestWidgetHighlightForeground": "Couleur de la surbrillance des correspondances dans le widget de suggestion.", + "readMore": "En savoir plus...{0}", + "suggestionWithDetailsAriaLabel": "{0}, suggestion, avec détails", + "suggestionAriaLabel": "{0}, suggestion", + "readLess": "En savoir moins...{0}", + "suggestWidget.loading": "Chargement...", + "suggestWidget.noSuggestions": "Pas de suggestions.", + "suggestionAriaAccepted": "{0}, accepté", + "ariaCurrentSuggestionWithDetails": "{0}, suggestion, avec détails", + "ariaCurrentSuggestion": "{0}, suggestion" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json b/i18n/fra/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json new file mode 100644 index 00000000000..e8ac83f2da8 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Activer/désactiver l'utilisation de la touche Tab pour déplacer le focus" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json b/i18n/fra/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json new file mode 100644 index 00000000000..45974daea0a --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Couleur d'arrière-plan d'un symbole durant l'accès en lecture, par exemple la lecture d'une variable.", + "wordHighlightStrong": "Couleur d'arrière-plan d'un symbole durant l'accès en écriture, par exemple l'écriture dans une variable.", + "overviewRulerWordHighlightForeground": "Couleur du marqueur de la règle d'aperçu pour la mise en évidence de symbole.", + "overviewRulerWordHighlightStrongForeground": "Couleur du marqueur de la règle d'aperçu la mise en évidence de symbole d’accès en écriture.", + "wordHighlight.next.label": "Aller à la prochaine mise en évidence de symbole", + "wordHighlight.previous.label": "Aller à la mise en évidence de symbole précédente" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/platform/environment/node/argv.i18n.json b/i18n/fra/src/vs/platform/environment/node/argv.i18n.json index 2f3ab904009..f1c7f8375eb 100644 --- a/i18n/fra/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/fra/src/vs/platform/environment/node/argv.i18n.json @@ -12,6 +12,8 @@ "newWindow": "Forcez l'utilisation d'une nouvelle instance de Code.", "performance": "Démarrez avec la commande 'Développeur : performance de démarrage' activée.", "prof-startup": "Exécuter le profileur d'UC au démarrage", + "inspect-extensions": "Autorise le débogage et le profilage des extensions. Vérifier les outils de développements pour l'uri de connexion.", + "inspect-brk-extensions": "Autorise le débogage et le profilage des extensions avec l'hôte d'extensions en pause après le démarrage. Vérifier les outils de développement pour l'uri de connexion.", "reuseWindow": "Forcez l'ouverture d'un fichier ou dossier dans la dernière fenêtre active.", "userDataDir": "Spécifie le répertoire où sont conservées les données des utilisateurs. S'avère utile pour une exécution en tant que root.", "verbose": "Affichez la sortie détaillée (implique --wait).", @@ -24,6 +26,7 @@ "experimentalApis": "Active les fonctionnalités d'API proposées pour une extension.", "disableExtensions": "Désactivez toutes les extensions installées.", "disableGPU": "Désactivez l'accélération matérielle du GPU.", + "status": "Imprimer l'utilisation de processus et l'information des diagnostics.", "version": "Affichez la version.", "help": "Affichez le mode d'utilisation.", "usage": "Utilisation", diff --git a/i18n/fra/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/fra/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index 53997396044..928cf0f7885 100644 --- a/i18n/fra/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/fra/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "notFound": "Extension introuvable", - "noCompatible": "Version compatible de {0} introuvable avec cette version de Code." + "notCompatibleDownload": "Téléchargement impossible car l'extension compatible avec la version actuelle '{0}' de VS Code est introuvable." } \ No newline at end of file diff --git a/i18n/fra/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/fra/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index e6693aebb79..620e2694e2a 100644 --- a/i18n/fra/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/fra/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,11 +6,16 @@ { "invalidManifest": "Extension non valide : package.json n'est pas un fichier JSON.", "restartCodeLocal": "Redémarrez Code avant de réinstaller {0}.", - "restartCodeGallery": "Veuillez s’il vous plaît redémarrer Code avant la réinstallation.", + "installingOutdatedExtension": "Une version plus récente de cette extension est déjà installée. Voulez-vous remplacer celle-ci avec l'ancienne version ?", + "override": "Remplacer", + "cancel": "Annuler", + "notFoundCompatible": "Installation impossible car l'extension '{0}' compatible avec la version actuelle '{1}' de VS Code est introuvable.", + "quitCode": "Installation impossible car une instance obsolète de l'extension est en cours d'exécution. Veuillez quitter et redémarrer VS Code avant de réinstaller.", + "exitCode": "Installation impossible car une instance obsolète de l'extension est en cours d'exécution. Veuillez sortir et redémarrer VS Code avant de réinstaller.", + "notFoundCompatibleDependency": "Installation impossible car l'extension dépendante '{0}' compatible avec la version actuelle '{1}' de VS Code est introuvable.", "uninstallDependeciesConfirmation": "Voulez-vous désinstaller uniquement '{0}' ou également ses dépendances ?", "uninstallOnly": "Uniquement", "uninstallAll": "Tout", - "cancel": "Annuler", "uninstallConfirmation": "Voulez-vous vraiment désinstaller '{0}' ?", "ok": "OK", "singleDependentError": "Impossible de désinstaller l'extension '{0}'. L'extension '{1}' en dépend.", diff --git a/i18n/fra/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/fra/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 77c19000246..08ad6cc708d 100644 --- a/i18n/fra/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/fra/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -17,6 +17,8 @@ "vscode.extension.activationEvents.onLanguage": "Événement d'activation envoyé quand un fichier résolu dans le langage spécifié est ouvert.", "vscode.extension.activationEvents.onCommand": "Événement d'activation envoyé quand la commande spécifiée est appelée.", "vscode.extension.activationEvents.onDebug": "Un événement d’activation émis chaque fois qu’un utilisateur est sur le point de démarrer le débogage ou sur le point de la déboguer des configurations.", + "vscode.extension.activationEvents.onDebugInitialConfigurations": "Événement d'activation envoyé chaque fois qu’un \"launch.json\" doit être créé (et toutes les méthodes de provideDebugConfigurations doivent être appelées).", + "vscode.extension.activationEvents.onDebugResolve": "Événement d'activation envoyé quand une session de débogage du type spécifié est sur le point d’être lancée (et une méthode resolveDebugConfiguration correspondante doit être appelée).", "vscode.extension.activationEvents.workspaceContains": "Événement d'activation envoyé quand un dossier ouvert contient au moins un fichier correspondant au modèle glob spécifié.", "vscode.extension.activationEvents.onView": "Événement d'activation envoyé quand la vue spécifiée est développée.", "vscode.extension.activationEvents.star": "Événement d'activation envoyé au démarrage de VS Code. Pour garantir la qualité de l'expérience utilisateur, utilisez cet événement d'activation dans votre extension uniquement quand aucune autre combinaison d'événements d'activation ne fonctionne dans votre cas d'utilisation.", diff --git a/i18n/fra/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/fra/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json new file mode 100644 index 00000000000..7c3c7d79567 --- /dev/null +++ b/i18n/fra/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleTabs": "Activer/désactiver la visibilité de l'onglet", + "view": "Affichage" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json index ee22c640dbd..9bb7cebd0ec 100644 --- a/i18n/fra/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "largeNumberBadge": "10k+", "badgeTitle": "{0} - {1}", "additionalViews": "Vues supplémentaires", "numberBadge": "{0} ({1})", diff --git a/i18n/fra/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index a7e57354829..19586632ac8 100644 --- a/i18n/fra/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -33,6 +33,7 @@ "openPreviousEditor": "Ouvrir l'éditeur précédent", "nextEditorInGroup": "Ouvrir l'éditeur suivant du groupe", "openPreviousEditorInGroup": "Ouvrir l'éditeur précédent du groupe", + "lastEditorInGroup": "Ouvrir le dernier éditeur du groupe", "navigateNext": "Suivant", "navigatePrevious": "Précédent", "navigateLast": "Aller au dernier", diff --git a/i18n/fra/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index 36d4757c43d..be96f08df0d 100644 --- a/i18n/fra/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,7 +6,7 @@ { "editorCommand.activeEditorMove.description": "Déplacer l'éditeur actif par onglets ou par groupes", "editorCommand.activeEditorMove.arg.name": "Argument de déplacement de l'éditeur actif", - "editorCommand.activeEditorMove.arg.description": "Propriétés de l'argument :\n\\t\\t\\t\\t\\t\\t* 'to' : valeur de chaîne indiquant la direction du déplacement.\n\\t\\t\\t\\t\\t\\t* 'by' : valeur de chaîne indiquant l'unité de déplacement. Par onglet ou par groupe.\n\\t\\t\\t\\t\\t\\t* 'value' : valeur numérique indiquant le nombre de positions ou la position absolue du déplacement.\n\\t\\t\\t\\t\\t", + "editorCommand.activeEditorMove.arg.description": "Propriétés d’argument : * 'to' : Valeur de chaîne spécifiant où aller.\n\t* 'by' : Valeur de chaîne spécifiant l'unité à déplacer. Par tabulation ou par groupe.\n\t* 'value' : Valeur numérique spécifiant combien de positions ou une position absolue à déplacer.", "commandDeprecated": "La commande **{0}** a été supprimée. Vous pouvez utiliser **{1}** à la place", "openKeybindings": "Configurer les raccourcis clavier" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index dc585654a46..debaa4e32a9 100644 --- a/i18n/fra/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -53,5 +53,5 @@ "screenReaderDetectedExplanation.answerYes": "Oui", "screenReaderDetectedExplanation.answerNo": "Non", "screenReaderDetectedExplanation.body1": "VS Code est maintenant optimisé pour une utilisation avec un lecteur d’écran.", - "screenReaderDetectedExplanation.body2": "Certaines fonctionnalités de l’éditeur auront des comportements différents : par exemple l'encapsulation, le repliage, l'auto-fermeture des parenthèses, etc..." + "screenReaderDetectedExplanation.body2": "Certaines fonctionnalités de l’éditeur auront des comportements différents : par exemple encapsulation, repliage, etc.." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/quickopen.i18n.json b/i18n/fra/src/vs/workbench/browser/quickopen.i18n.json index 6c5413c9c04..4ddbb419710 100644 --- a/i18n/fra/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/quickopen.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "noResultsMatching": "Aucun résultat correspondant", - "noResultsFound2": "Résultats introuvables", - "entryAriaLabel": "{0}, commande" + "noResultsFound2": "Résultats introuvables" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json index fc7be7db920..0e453c54e87 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json @@ -30,7 +30,7 @@ "openRecent": "Ouvrir les éléments récents...", "quickOpenRecent": "Ouverture rapide des éléments récents...", "closeMessages": "Fermer les messages de notification", - "reportIssues": "Signaler des problèmes", + "reportIssueInEnglish": "Signaler un problème", "reportPerformanceIssue": "Signaler un problème de performance", "keybindingsReference": "Référence des raccourcis clavier", "openDocumentationUrl": "Documentation", @@ -47,5 +47,25 @@ "showNextWindowTab": "Afficher l’onglet de la fenêtre suivante", "moveWindowTabToNewWindow": "Déplacer l’onglet de la fenêtre vers la nouvelle fenêtre", "mergeAllWindowTabs": "Fusionner toutes les fenêtres", - "toggleWindowTabsBar": "Activer/désactiver la barre de fenêtres d’onglets" + "toggleWindowTabsBar": "Activer/désactiver la barre de fenêtres d’onglets", + "configureLocale": "Configurer la langue", + "displayLanguage": "Définit le langage affiché par VSCode.", + "doc": "Consultez {0} pour connaître la liste des langues prises en charge.", + "restart": "Le changement de la valeur nécessite le redémarrage de VS Code.", + "fail.createSettings": "Impossible de créer '{0}' ({1}).", + "openLogsFolder": "Ouvrir le dossier des journaux", + "showLogs": "Afficher les journaux...", + "mainProcess": "Principal", + "sharedProcess": "Partagé", + "rendererProcess": "Renderer", + "extensionHost": "Hôte de l’extension", + "selectProcess": "Sélectionner le processus", + "setLogLevel": "Définir le niveau de journalisation (log)", + "trace": "Trace", + "debug": "Déboguer", + "info": "Informations", + "warn": "Avertissement", + "err": "Erreur", + "critical": "Critique", + "off": "Désactivé" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json index f1f2a6fc8a0..7c7573087ca 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,8 +7,8 @@ "view": "Affichage", "help": "Aide", "file": "Fichier", - "workspaces": "Espaces de travail", "developer": "Développeur", + "workspaces": "Espaces de travail", "showEditorTabs": "Contrôle si les éditeurs ouverts doivent s'afficher ou non sous des onglets.", "workbench.editor.labelFormat.default": "Afficher le nom du fichier. Lorsque les onglets sont activés et que deux fichiers portent le même nom dans un groupe, les sections distinctes du chemin de chaque fichier sont ajoutées. Lorsque les onglets sont désactivées, le chemin d’accès relatif au dossier de l'espace de travail est affiché si l’éditeur est actif.", "workbench.editor.labelFormat.short": "Indiquer le nom du fichier suivi de son nom de répertoire.", @@ -16,6 +16,7 @@ "workbench.editor.labelFormat.long": "Indiquer le nom du fichier suivi de son chemin d’accès absolu.", "tabDescription": "Contrôle le format de l’étiquette d’un éditeur. La modification de ce paramètre peut par exemple rendre plus facile la compréhension de l’emplacement d’un fichier :\n- short: 'parent'\n- medium: 'workspace/src/parent'\n- long: '/home/user/workspace/src/parent'\n- default: '.../parent', quand un autre onglet partage le même titre, ou la chemin d’accès relatif à l'espace de travail si les onglets sont désactivés", "editorTabCloseButton": "Contrôle la position des boutons de fermeture des onglets de l'éditeur, ou les désactive quand le paramètre a la valeur 'off'.", + "tabSizing": "Contrôle la taille des onglets de l'éditeur. Mettre à 'fit' pour garder les onglets toujours assez larges pour afficher le libellé complet de l'éditeur. Mettre à 'shrink' pour autoriser les onglets à être plus peties quand l'espace n'est pas suffisant pur afficher tous les onglets en même temps.", "showIcons": "Contrôle si les éditeurs ouverts doivent s'afficher ou non avec une icône. Cela implique notamment l'activation d'un thème d'icône.", "enablePreview": "Contrôle si les éditeurs ouverts s'affichent en mode aperçu. Les éditeurs en mode aperçu sont réutilisés jusqu'à ce qu'ils soient conservés (par exemple, après un double-clic ou une modification) et apparaissent avec un style de police en italique.", "enablePreviewFromQuickOpen": "Contrôle si les éditeurs de Quick Open s'affichent en mode aperçu. Les éditeurs en mode aperçu sont réutilisés jusqu'à ce qu'ils soient conservés (par exemple, après un double-clic ou une modification).", @@ -26,18 +27,17 @@ "closeOnFocusLost": "Contrôle si Quick Open doit se fermer automatiquement, une fois qu'il a perdu le focus.", "openDefaultSettings": "Contrôle si l'ouverture des paramètres entraîne également l'ouverture d'un éditeur qui affiche tous les paramètres par défaut.", "sideBarLocation": "Contrôle l'emplacement de la barre latérale. Elle peut s'afficher à gauche ou à droite du banc d'essai.", - "panelLocation": "Contrôle l’emplacement du panneau. Il peut soit être affiché en bas ou à droite du banc d'essai.", "statusBarVisibility": "Contrôle la visibilité de la barre d'état au bas du banc d'essai.", "activityBarVisibility": "Contrôle la visibilité de la barre d'activités dans le banc d'essai.", "closeOnFileDelete": "Contrôle si les éditeurs qui affichent un fichier doivent se fermer automatiquement quand ce fichier est supprimé ou renommé par un autre processus. Si vous désactivez cette option, l'éditeur reste ouvert dans un état indiquant une intégrité compromise. Notez que la suppression de fichiers à partir de l'application entraîne toujours la fermeture de l'éditeur, et que les fichiers à l'intégrité compromise ne sont jamais fermés pour permettre la conservation de vos données.", - "experimentalFuzzySearchEndpoint": "Indique le point de terminaison à utiliser pour la recherche des paramètres expérimentaux.", - "experimentalFuzzySearchKey": "Indique la clé à utiliser pour la recherche des paramètres expérimentaux.", + "enableNaturalLanguageSettingsSearch": "Contrôle s’il faut activer le mode de recherche en langage naturel pour les paramètres.", "fontAliasing": "Contrôle la méthode de font aliasing dans le workbench.\n- par défaut : Lissage des polices de sous-pixel. Sur la plupart des affichages non-ratina, cela vous donnera le texte le plus vif\n- crénelées : Lisse les polices au niveau du pixel, plutôt que les sous-pixels. Peut faire en sorte que la police apparaisse plus légère dans l’ensemble \n- none : désactive le lissage des polices. Le texte s'affichera avec des bordures dentelées", "workbench.fontAliasing.default": "Lissage de sous-pixel des polices. Sur la plupart des affichages non-retina, cela vous donnera le texte le plus vif.", "workbench.fontAliasing.antialiased": "Lisser les polices au niveau du pixel, plutôt que les sous-pixels. Peut faire en sorte que la police apparaisse plus légère dans l’ensemble.", "workbench.fontAliasing.none": "Désactive le lissage des polices. Le texte s'affichera avec des bordures dentelées.", "swipeToNavigate": "Parcourez les fichiers ouverts en faisant glisser trois doigts horizontalement. ", "workbenchConfigurationTitle": "Banc d'essai", + "windowConfigurationTitle": "Fenêtre", "window.openFilesInNewWindow.on": "Les fichiers s'ouvrent dans une nouvelle fenêtre", "window.openFilesInNewWindow.off": "Les fichiers s'ouvrent dans la fenêtre du dossier conteneur ouvert ou dans la dernière fenêtre active", "window.openFilesInNewWindow.default": "Les fichiers s'ouvrent dans la fenêtre du dossier conteneur ouvert ou dans la dernière fenêtre active, sauf s'ils sont ouverts via le Dock ou depuis le Finder (macOS uniquement)", @@ -69,11 +69,11 @@ "autoDetectHighContrast": "Si cette option est activée, le thème à contraste élevé est automatiquement choisi quand Windows utilise un thème à contraste élevé. À l'inverse, le thème sombre est automatiquement choisi quand Windows n'utilise plus le thème à contraste élevé.", "titleBarStyle": "Ajustez l'apparence de la barre de titre de la fenêtre. Vous devez effectuer un redémarrage complet pour que les changements soient appliqués.", "window.nativeTabs": "Active les onglets macOS Sierra. Notez que vous devez redémarrer l'ordinateur pour appliquer les modifications et que les onglets natifs désactivent tout style de barre de titre personnalisé configuré, le cas échéant.", - "windowConfigurationTitle": "Fenêtre", "zenModeConfigurationTitle": "Mode Zen", "zenMode.fullScreen": "Contrôle si l'activation de Zen Mode met également le banc d'essai en mode plein écran.", "zenMode.hideTabs": "Contrôle si l'activation du mode Zen masque également les onglets du banc d'essai.", "zenMode.hideStatusBar": "Contrôle si l'activation du mode Zen masque également la barre d'état au bas du banc d'essai.", "zenMode.hideActivityBar": "Contrôle si l'activation du mode Zen masque également la barre d'activités à gauche du banc d'essai.", - "zenMode.restore": "Contrôle si une fenêtre doit être restaurée en mode zen, si elle a été fermée en mode zen." + "zenMode.restore": "Contrôle si une fenêtre doit être restaurée en mode zen, si elle a été fermée en mode zen.", + "JsonSchema.locale": "Langue d'interface utilisateur (IU) à utiliser." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index fd1a330f1c0..e221bc52477 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -30,7 +30,6 @@ "deactivateBreakpoints": "Désactiver les points d'arrêt", "reapplyAllBreakpoints": "Réappliquer tous les points d'arrêt", "addFunctionBreakpoint": "Ajouter un point d'arrêt sur fonction", - "renameFunctionBreakpoint": "Renommer un point d'arrêt sur fonction", "addConditionalBreakpoint": "Ajouter un point d'arrêt conditionnel...", "editConditionalBreakpoint": "Modifier un point d'arrêt...", "setValue": "Définir la valeur", diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json new file mode 100644 index 00000000000..e495538d546 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editConditionalBreakpoint": "Modifier un point d'arrêt...", + "functionBreakpointsNotSupported": "Les points d'arrêt de fonction ne sont pas pris en charge par ce type de débogage", + "functionBreakpointPlaceholder": "Fonction où effectuer un point d'arrêt", + "functionBreakPointInputAriaLabel": "Point d'arrêt sur fonction de type" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json new file mode 100644 index 00000000000..ebffa8d5401 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "callstackSection": "Section de pile des appels", + "debugStopped": "En pause sur {0}", + "callStackAriaLabel": "Déboguer la pile des appels", + "process": "Processus", + "paused": "Suspendu", + "running": "En cours d'exécution", + "thread": "Thread", + "pausedOn": "En pause sur {0}", + "loadMoreStackFrames": "Charger plus de frames de pile", + "threadAriaLabel": "Thread {0}, pile des appels, débogage", + "stackFrameAriaLabel": "Frame de pile {0}, ligne {1} {2}, pile des appels, débogage" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index f2f505f2adf..39634cf91c3 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,5 +20,10 @@ "openExplorerOnEnd": "Ouvrir automatiquement le mode explorateur à la fin d'une session de débogage", "inlineValues": "Afficher les valeurs des variables inline dans l'éditeur pendant le débogage", "hideActionBar": "Contrôle si la barre d'action de débogage flottante doit être masquée", + "never": "Ne jamais afficher debug dans la barre d'état", + "always": "Toujours afficher debug dans la barre d’état", + "onFirstSessionStart": "Afficher debug dans seule la barre d’état après que le débogage a été lancé pour la première fois", + "showInStatusBar": "Contrôle quand la barre d’état de débogage doit être visible", + "openDebug": "Contrôle si les Viewlets de débogage doivent être ouverts au démarrage d’une session de débogage.", "launch": "Configuration du lancement du débogage global. Doit être utilisée comme alternative à 'launch.json' qui est partagé entre les espaces de travail" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 15ea2e4fc11..3aa86189407 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,6 @@ "breakpointAdded": "Point d'arrêt ajouté, ligne {0}, fichier {1}", "breakpointRemoved": "Point d'arrêt supprimé, ligne {0}, fichier {1}", "compoundMustHaveConfigurations": "L'attribut \"configurations\" du composé doit être défini pour permettre le démarrage de plusieurs configurations.", - "configMissing": "Il manque la configuration '{0}' dans 'launch.json'.", "debugRequestNotSupported": "L’attribut '{0}' a une valeur '{1}' non prise en charge dans la configuration de débogage sélectionnée.", "debugRequesMissing": "L’attribut '{0}' est introuvable dans la configuration de débogage choisie.", "debugTypeNotSupported": "Le type de débogage '{0}' configuré n'est pas pris en charge.", diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json new file mode 100644 index 00000000000..81e53e50a6f --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Section des variables", + "variablesAriaTreeLabel": "Déboguer les variables", + "variableValueAriaLabel": "Tapez une nouvelle valeur de variable", + "variableScopeAriaLabel": "Portée {0}, variables, débogage", + "variableAriaLabel": "{0} valeur {1}, variables, débogage" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json new file mode 100644 index 00000000000..0b8adc593c5 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expressionsSection": "Section des expressions", + "watchAriaTreeLabel": "Déboguer les expressions espionnées", + "watchExpressionPlaceholder": "Expression à espionner", + "watchExpressionInputAriaLabel": "Tapez l'expression à espionner", + "watchExpressionAriaLabel": "{0} valeur {1}, espion, débogage", + "watchVariableAriaLabel": "{0} valeur {1}, espion, débogage" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index d2552c4f0ca..65ddc136720 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,9 +6,11 @@ { "name": "Nom de l'extension", "extension id": "Identificateur d'extension", + "preview": "Aperçu", "publisher": "Nom de l'éditeur", "install count": "Nombre d'installations", "rating": "Évaluation", + "repository": "Dépôt", "license": "Licence", "details": "Détails", "contributions": "Contributions", diff --git a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 2320626a88f..3911d6e4075 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -10,16 +10,12 @@ "Uninstalling": "Désinstallation en cours", "updateAction": "Mettre à jour", "updateTo": "Mettre à jour vers {0}", - "enableForWorkspaceAction.label": "Activer (espace de travail)", - "enableAlwaysAction.label": "Activer (toujours)", - "disableForWorkspaceAction.label": "Désactiver (espace de travail)", - "disableAlwaysAction.label": "Désactiver (toujours)", "ManageExtensionAction.uninstallingTooltip": "Désinstallation en cours", - "enableForWorkspaceAction": "Espace de travail", - "enableGloballyAction": "Toujours", + "enableForWorkspaceAction": "Activer (espace de travail)", + "enableGloballyAction": "Activer", "enableAction": "Activer", - "disableForWorkspaceAction": "Espace de travail", - "disableGloballyAction": "Toujours", + "disableForWorkspaceAction": "Désactiver (espace de travail)", + "disableGloballyAction": "Désactiver", "disableAction": "Désactiver", "checkForUpdates": "Rechercher les mises à jour", "enableAutoUpdate": "Activer la mise à jour automatique des extensions", @@ -47,11 +43,8 @@ "allExtensionsInstalled": "Toutes les extensions recommandées pour cet espace de travail ont déjà été installées", "installRecommendedExtension": "Installer l'Extension Recommandée", "extensionInstalled": "L’extension recommandée est déjà installée", - "showRecommendedKeymapExtensions": "Afficher les mappages de touches recommandés", "showRecommendedKeymapExtensionsShort": "Mappages de touches", - "showLanguageExtensions": "Afficher les extensions de langage", "showLanguageExtensionsShort": "Extensions de langage", - "showAzureExtensions": "Afficher les Extensions Azure", "showAzureExtensionsShort": "Extensions Azure", "OpenExtensionsFile.failed": "Impossible de créer le fichier 'extensions.json' dans le dossier '.vscode' ({0}).", "configureWorkspaceRecommendedExtensions": "Configurer les extensions recommandées (espace de travail)", diff --git a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json new file mode 100644 index 00000000000..e686f1aac70 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ratedByUsers": "Évaluée par {0} utilisateurs" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json new file mode 100644 index 00000000000..0974c3fd446 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectAndStartDebug": "Cliquer pour arrêter le profilage" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index be819e14deb..ffe15b6fcfb 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -7,9 +7,11 @@ "extensionsCommands": "Gérer les extensions", "galleryExtensionsCommands": "Installer les extensions de la galerie", "extension": "Extension", + "runtimeExtension": "Extensions en cours d’exécution", "extensions": "Extensions", "view": "Affichage", + "developer": "Développeur", "extensionsConfigurationTitle": "Extensions", "extensionsAutoUpdate": "Mettre à jour automatiquement les extensions", - "extensionsIgnoreRecommendations": "Ignorer les recommandations d'extension" + "extensionsIgnoreRecommendations": "Si la valeur est à true, les notifications de recommandations d'extension cessera d'apparaître." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json new file mode 100644 index 00000000000..d16b6835b89 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "starActivation": "Activées au démarrage", + "workspaceContainsGlobActivation": "Activées parce qu'il existe un fichier correspondant à {0} dans votre espace de travail", + "workspaceContainsFileActivation": "Activées parce que un fichier {0} existe dans votre espace de travail", + "languageActivation": "Activées parce que vous avez ouvert un fichier {0}", + "workspaceGenericActivation": "Activée le {0}", + "errors": " {0} erreurs non détectées", + "extensionsInputName": "Extensions en cours d’exécution", + "showRuntimeExtensions": "Afficher les extensions en cours d'exécution", + "reportExtensionIssue": "Signaler un problème", + "extensionHostProfileStart": "Démarrer le profilage d'hôte d'extension", + "extensionHostProfileStop": "Arrêter le profilage d'hôte d'extension", + "saveExtensionHostProfile": "Enregistrer le profilage d'hôte d'extension" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/fra/src/vs/workbench/parts/files/browser/fileActions.i18n.json index 3aa8d0485de..ca93414c379 100644 --- a/i18n/fra/src/vs/workbench/parts/files/browser/fileActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -69,5 +69,7 @@ "invalidFileNameError": "Le nom **{0}** est non valide en tant que nom de fichier ou de dossier. Choisissez un autre nom.", "filePathTooLongError": "Le nom **{0}** correspond à un chemin d'accès trop long. Choisissez un nom plus court.", "compareWithSaved": "Compare le fichier actif avec celui enregistré", - "modifiedLabel": "{0} (sur le disque) ↔ {1}" + "modifiedLabel": "{0} (sur le disque) ↔ {1}", + "compareWithClipboard": "Comparer le fichier actif avec le presse-papier", + "clipboardComparisonLabel": "Presse-papier ↔ {0}" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json b/i18n/fra/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json new file mode 100644 index 00000000000..0e07c8f0ec8 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "folders": "Dossiers" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json new file mode 100644 index 00000000000..54a25f75ec0 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Fichier", + "revealInSideBar": "Afficher dans la barre latérale", + "acceptLocalChanges": "Utiliser vos modifications et écraser les contenus du disque", + "revertLocalChanges": "Ignorer les modifications locales et restaurer le contenu sur disque" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/fra/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json new file mode 100644 index 00000000000..002c86e7daa --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Réessayer", + "rename": "Renommer", + "newFile": "Nouveau fichier", + "newFolder": "Nouveau dossier", + "openFolderFirst": "Ouvrez d'abord un dossier pour y créer des fichiers ou des dossiers.", + "newUntitledFile": "Nouveau fichier sans titre", + "createNewFile": "Nouveau fichier", + "createNewFolder": "Nouveau dossier", + "deleteButtonLabelRecycleBin": "&&Déplacer vers la Corbeille", + "deleteButtonLabelTrash": "&&Déplacer vers la Poubelle", + "deleteButtonLabel": "S&&upprimer", + "dirtyMessageFolderOneDelete": "Vous supprimez un dossier contenant 1 fichier dont les changements n'ont pas été enregistrés. Voulez-vous continuer ?", + "dirtyMessageFolderDelete": "Vous supprimez un dossier contenant {0} fichiers dont les changements n'ont pas été enregistrés. Voulez-vous continuer ?", + "dirtyMessageFileDelete": "Vous supprimez un fichier dont les changements n'ont pas été enregistrés. Voulez-vous continuer ?", + "dirtyWarning": "Vous perdrez vos modifications, si vous ne les enregistrez pas.", + "confirmMoveTrashMessageFolder": "Voulez-vous vraiment supprimer '{0}' et son contenu ?", + "confirmMoveTrashMessageFile": "Voulez-vous vraiment supprimer '{0}' ?", + "undoBin": "Vous pouvez effectuer une restauration à partir de la Corbeille.", + "undoTrash": "Vous pouvez effectuer une restauration à partir de la Poubelle.", + "doNotAskAgain": "Ne plus me demander", + "confirmDeleteMessageFolder": "Voulez-vous vraiment supprimer définitivement '{0}' et son contenu ?", + "confirmDeleteMessageFile": "Voulez-vous vraiment supprimer définitivement '{0}' ?", + "irreversible": "Cette action est irréversible !", + "permDelete": "Supprimer définitivement", + "delete": "Supprimer", + "importFiles": "Importer des fichiers", + "confirmOverwrite": "Un fichier ou dossier portant le même nom existe déjà dans le dossier de destination. Voulez-vous le remplacer ?", + "replaceButtonLabel": "&&Remplacer", + "copyFile": "Copier", + "pasteFile": "Coller", + "duplicateFile": "Doublon", + "openToSide": "Ouvrir sur le côté", + "compareSource": "Sélectionner pour comparer", + "globalCompareFile": "Comparer le fichier actif à...", + "openFileToCompare": "Ouvrez d'abord un fichier pour le comparer à un autre fichier.", + "compareWith": "Comparer '{0}' à '{1}'", + "compareFiles": "Comparer des fichiers", + "refresh": "Actualiser", + "save": "Enregistrer", + "saveAs": "Enregistrer sous...", + "saveAll": "Enregistrer tout", + "saveAllInGroup": "Enregistrer tout dans le groupe", + "saveFiles": "Enregistrer tous les fichiers", + "revert": "Rétablir le fichier", + "focusOpenEditors": "Mettre le focus sur la vue des éditeurs ouverts", + "focusFilesExplorer": "Focus sur l'Explorateur de fichiers", + "showInExplorer": "Révéler le fichier actif dans la barre latérale", + "openFileToShow": "Ouvrir d'abord un fichier pour l'afficher dans l'Explorateur", + "collapseExplorerFolders": "Réduire les dossiers dans l'explorateur", + "refreshExplorer": "Actualiser l'explorateur", + "openFileInNewWindow": "Ouvrir le fichier actif dans une nouvelle fenêtre", + "openFileToShowInNewWindow": "Ouvrir d'abord un fichier à ouvrir dans une nouvelle fenêtre", + "revealInWindows": "Révéler dans l'Explorateur", + "revealInMac": "Révéler dans le Finder", + "openContainer": "Ouvrir le dossier contenant", + "revealActiveFileInWindows": "Révéler le fichier actif dans l'Explorateur Windows", + "revealActiveFileInMac": "Révéler le fichier actif dans le Finder", + "openActiveFileContainer": "Ouvrir le dossier contenant le fichier actif", + "copyPath": "Copier le chemin", + "copyPathOfActive": "Copier le chemin du fichier actif", + "emptyFileNameError": "Un nom de fichier ou de dossier doit être fourni.", + "fileNameExistsError": "Un fichier ou dossier **{0}** existe déjà à cet emplacement. Choisissez un autre nom.", + "invalidFileNameError": "Le nom **{0}** est non valide en tant que nom de fichier ou de dossier. Choisissez un autre nom.", + "filePathTooLongError": "Le nom **{0}** correspond à un chemin d'accès trop long. Choisissez un nom plus court.", + "compareWithSaved": "Compare le fichier actif avec celui enregistré", + "modifiedLabel": "{0} (sur le disque) ↔ {1}", + "compareWithClipboard": "Compare le fichier actif avec le presse-papiers", + "clipboardComparisonLabel": "Presse-papier ↔ {0}" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/fra/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json new file mode 100644 index 00000000000..ee5d441071a --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Ouvrir d'abord un fichier pour copier son chemin", + "openFileToReveal": "Ouvrir d'abord un fichier à révéler" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json new file mode 100644 index 00000000000..9693ca31c50 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Afficher l'Explorateur", + "explore": "Explorateur", + "view": "Affichage", + "textFileEditor": "Éditeur de fichier texte", + "binaryFileEditor": "Éditeur de fichier binaire", + "filesConfigurationTitle": "Fichiers", + "exclude": "Configurer des modèles glob pour exclure des fichiers et dossiers. Par exemple, l’explorateur de fichiers décide quels fichiers et dossiers afficher ou masquer en fonction de ce paramètre.", + "files.exclude.boolean": "Modèle Glob auquel les chemins de fichiers doivent correspondre. Affectez la valeur true ou false pour activer ou désactiver le modèle.", + "files.exclude.when": "Vérification supplémentaire des frères d'un fichier correspondant. Utilisez $(basename) comme variable pour le nom de fichier correspondant.", + "associations": "Configurez les associations entre les fichiers et les langages (par exemple, \"*.extension\": \"html\"). Celles-ci ont priorité sur les associations par défaut des langages installés.", + "encoding": "L'encodage du jeu de caractères par défaut à utiliser durant la lecture et l'écriture des fichiers. Ce paramètre peut également être configuré par langage.", + "autoGuessEncoding": "Quand cette option est activée, tente de deviner l'encodage du jeu de caractères à l'ouverture des fichiers. Ce paramètre peut également être configuré par langage.", + "eol": "Caractère de fin de ligne par défaut. Utilisez \\n pour LF et \\r\\n pour CRLF.", + "trimTrailingWhitespace": "Si l'option est activée, l'espace blanc de fin est supprimé au moment de l'enregistrement d'un fichier.", + "insertFinalNewline": "Quand l'option est activée, une nouvelle ligne finale est insérée à la fin du fichier au moment de son enregistrement.", + "trimFinalNewlines": "Si l'option est activée, va supprimer toutes les nouvelles lignes après la dernière ligne à la fin du fichier lors de l’enregistrement.", + "files.autoSave.off": "Un fichier dont l'intégrité est compromise n'est jamais enregistré automatiquement.", + "files.autoSave.afterDelay": "Un fichier dont l'intégrité est compromise est automatiquement enregistré après la configuration de 'files.autoSaveDelay'.", + "files.autoSave.onFocusChange": "Un fichier dont l'intégrité est compromise est automatiquement enregistré quand l'éditeur perd le focus.", + "files.autoSave.onWindowChange": "Un fichier dont l'intégrité est compromise est automatiquement enregistré quand la fenêtre perd le focus.", + "autoSave": "Contrôle l'enregistrement automatique des fichiers dont l'intégrité est compromise. Valeurs acceptées : '{0}', '{1}', '{2}' (l'éditeur perd le focus), '{3}' (la fenêtre perd le focus). Si la valeur est '{4}', vous pouvez configurer le délai dans 'files.autoSaveDelay'.", + "autoSaveDelay": "Contrôle le délai en ms au bout duquel un fichier à l'intégrité compromise est enregistré automatiquement. S'applique uniquement quand 'files.autoSave' a la valeur '{0}'", + "watcherExclude": "Configurez les modèles Glob des chemins de fichier à exclure de la surveillance des fichiers. Les modèles doivent correspondre à des chemins absolus (par ex., utilisez le préfixe ** ou le chemin complet pour une correspondance appropriée). Le changement de ce paramètre nécessite un redémarrage. Si vous constatez que le code consomme beaucoup de temps processeur au démarrage, excluez les dossiers volumineux pour réduire la charge initiale.", + "hotExit.off": "Désactivez la sortie à chaud.", + "hotExit.onExit": "La sortie à chaud se déclenche à la fermeture de l'application, c'est-à-dire quand la dernière fenêtre est fermée dans Windows/Linux, ou quand la commande workbench.action.quit est déclenchée (palette de commandes, combinaison de touches, menu). Toutes les fenêtres avec des sauvegardes sont restaurées au prochain lancement.", + "hotExit.onExitAndWindowClose": "La sortie à chaud est déclenchée à la fermeture de l'application, c'est-à-dire quand la dernière fenêtre est fermée sous Windows/Linux ou quand la commande workbench.action.quit est déclenchée (palette de commandes, combinaison de touches, menu), ainsi que pour toute fenêtre avec un dossier ouvert, qu'il s'agisse de la dernière fenêtre ou non. Toutes les fenêtres sans dossier ouvert sont restaurées au prochain lancement. Pour restaurer une fenêtre de dossiers telle qu'elle était avant l'arrêt, définissez \"window.restoreWindows\" sur \"all\".", + "hotExit": "Contrôle si les fichiers non enregistrés sont mémorisés entre les sessions, ce qui permet d'ignorer la demande d'enregistrement à la sortie de l'éditeur.", + "useExperimentalFileWatcher": "Utilisez le nouvel observateur de fichiers expérimental.", + "defaultLanguage": "Mode de langage par défaut affecté aux nouveaux fichiers.", + "editorConfigurationTitle": "Éditeur", + "formatOnSave": "Met en forme un fichier au moment de l'enregistrement. Un formateur doit être disponible, le fichier ne doit pas être enregistré automatiquement, et l'éditeur ne doit pas être en cours d'arrêt.", + "explorerConfigurationTitle": "Explorateur de fichiers", + "openEditorsVisible": "Nombre d'éditeurs affichés dans le volet Éditeurs ouverts. Définissez la valeur 0 pour masquer le volet.", + "dynamicHeight": "Contrôle si la hauteur de la section des éditeurs ouverts doit s'adapter dynamiquement ou non au nombre d'éléments.", + "autoReveal": "Contrôle si l'Explorateur doit automatiquement afficher et sélectionner les fichiers à l'ouverture.", + "enableDragAndDrop": "Contrôle si l'explorateur doit autoriser le déplacement de fichiers et de dossiers par glisser-déplacer.", + "confirmDragAndDrop": "Contrôle si l’Explorateur doit demander confirmation lors du déplacement de fichiers ou de dossiers via glisser-déposer.", + "confirmDelete": "Contrôle si l’explorateur doit demander confirmation lorsque vous supprimez un fichier via la corbeille.", + "sortOrder.default": "Les fichiers et dossiers sont triés par nom, dans l’ordre alphabétique. Les dossiers sont affichés avant les fichiers.", + "sortOrder.mixed": "Les fichiers et dossiers sont triés par nom, dans l’ordre alphabétique. Les fichiers sont imbriqués dans les dossiers.", + "sortOrder.filesFirst": "Les fichiers et dossiers sont triés par nom, dans l’ordre alphabétique. Les fichiers sont affichés avant les dossiers.", + "sortOrder.type": "Les fichiers et dossiers sont triés par extension, dans l’ordre alphabétique. Les dossiers sont affichés avant les fichiers.", + "sortOrder.modified": "Les fichiers et dossiers sont triés par date de dernière modification, dans l’ordre décroissant. Les dossiers sont affichés avant les fichiers.", + "sortOrder": "Contrôle l'ordre de tri des fichiers et dossiers dans l'explorateur. En plus du tri par défaut, vous pouvez définir l'ordre sur 'mixed' (fichiers et dossiers triés combinés), 'type' (par type de fichier), 'modified' (par date de dernière modification) ou 'fileFirst' (trier les fichiers avant les dossiers).", + "explorer.decorations.colors": "Contrôle si les décorations de fichier doivent utiliser des couleurs.", + "explorer.decorations.badges": "Contrôle si les décorations de fichier doivent utiliser des badges." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/fra/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json new file mode 100644 index 00000000000..f944e7fc14f --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "userGuide": "Utiliser les actions dans la barre d’outils de l’éditeur vers la droite pour soit **annuler** vos modifications ou **écraser** le contenu sur le disque avec vos modifications", + "discard": "Abandonner", + "overwrite": "Remplacer", + "retry": "Réessayer", + "readonlySaveError": "Échec de l'enregistrement de '{0}' : le fichier est protégé en écriture. Sélectionnez 'Remplacer' pour supprimer la protection.", + "genericSaveError": "Échec d'enregistrement de '{0}' ({1}).", + "staleSaveError": "Échec de l'enregistrement de '{0}' : le contenu sur disque est plus récent. Cliquez sur **Comparer** pour comparer votre version à celle située sur le disque.", + "compareChanges": "Comparer", + "saveConflictDiffLabel": "{0} (sur le disque) ↔ {1} (dans {2}) - Résoudre le conflit d'enregistrement" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json new file mode 100644 index 00000000000..edae5effece --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Aucun dossier ouvert", + "explorerSection": "Section de l'Explorateur de fichiers", + "noWorkspaceHelp": "Vous n'avez pas encore ajouter un dossier à l'espace de travail.", + "addFolder": "Ajouter un dossier", + "noFolderHelp": "Vous n'avez pas encore ouvert de dossier.", + "openFolder": "Ouvrir le dossier" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json new file mode 100644 index 00000000000..6881d56fd1c --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label": "Explorateur", + "canNotResolve": "Impossible de résoudre le dossier de l'espace de travail" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json b/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json new file mode 100644 index 00000000000..0e3d37245db --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Section de l'Explorateur de fichiers", + "treeAriaLabel": "Explorateur de fichiers" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json new file mode 100644 index 00000000000..631a14a1cef --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Tapez le nom du fichier. Appuyez sur Entrée pour confirmer ou sur Échap pour annuler.", + "filesExplorerViewerAriaLabel": "{0}, Explorateur de fichiers", + "dropFolders": "Voulez-vous ajouter les dossiers à l’espace de travail ?", + "dropFolder": "Voulez-vous ajouter le dossier à l’espace de travail ?", + "addFolders": "&&Ajouter les dossiers", + "addFolder": "&&Ajouter le dossier", + "confirmMove": "Êtes-vous certain de vouloir déplacer '{0}' ?", + "doNotAskAgain": "Ne plus me demander", + "moveButtonLabel": "&&Déplacer", + "confirmOverwriteMessage": "{0}' existe déjà dans le dossier de destination. Voulez-vous le remplacer ?", + "irreversible": "Cette action est irréversible !", + "replaceButtonLabel": "&&Remplacer" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json b/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json new file mode 100644 index 00000000000..c536ea46a5d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Éditeurs ouverts", + "openEditosrSection": "Section des éditeurs ouverts", + "dirtyCounter": "{0} non enregistré(s)", + "saveAll": "Enregistrer tout", + "closeAllUnmodified": "Fermer les éléments non modifiés", + "closeAll": "Tout fermer", + "compareWithSaved": "Comparer avec celui enregistré", + "close": "Fermer", + "closeOthers": "Fermer les autres" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json b/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json new file mode 100644 index 00000000000..22721e1c8bc --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, groupe d'éditeurs", + "openEditorAriaLabel": "{0}, Ouvrir l'éditeur", + "saveAll": "Enregistrer tout", + "closeAllUnmodified": "Fermer les éléments non modifiés", + "closeAll": "Tout fermer", + "compareWithSaved": "Comparer avec celui enregistré", + "close": "Fermer", + "closeOthers": "Fermer les autres" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/fra/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json new file mode 100644 index 00000000000..854836303c0 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "totalProblems": "Total de {0} problèmes", + "filteredProblems": "Affichage de {0} sur {1} problèmes" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/fra/src/vs/workbench/parts/markers/common/messages.i18n.json index 3e60b2ce7d8..de7f944af49 100644 --- a/i18n/fra/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,8 +6,7 @@ { "viewCategory": "Affichage", "problems.view.toggle.label": "Activer/désactiver les problèmes", - "problems.view.show.label": "Afficher les problèmes", - "problems.view.hide.label": "Masquer les problèmes", + "problems.view.focus.label": "Problèmes de focus", "problems.panel.configuration.title": "Affichage des problèmes", "problems.panel.configuration.autoreveal": "Contrôle si l'affichage des problèmes doit automatiquement montrer les fichiers quand il les ouvre", "markers.panel.title.problems": "Problèmes", diff --git a/i18n/fra/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json b/i18n/fra/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json new file mode 100644 index 00000000000..0a6aa85c9e2 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "prof.message": "Création réussie des profils.", + "prof.detail": "Créez un problème et joignez manuellement les fichiers suivants :\n{0}", + "prof.restartAndFileIssue": "Créer le problème et redémarrer", + "prof.restart": "Redémarrer", + "prof.thanks": "Merci de votre aide.", + "prof.detail.restart": "Un redémarrage final est nécessaire pour continuer à utiliser '{0}'. Nous vous remercions une fois de plus pour votre contribution." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 727bb5eea95..720e637a919 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defineKeybinding.initial": "Appuyez sur la combinaison de touches souhaitée, puis sur Entrée. Appuyez sur Échap pour annuler.", + "defineKeybinding.initial": "Appuyez sur la combinaison de touches souhaitée puis appuyez sur Entrée", "defineKeybinding.chordsTo": "pression simultanée avec" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index 7d18aea5f66..6ef622da060 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -26,6 +26,7 @@ "editKeybindingLabel": "Changer de combinaison de touches", "addKeybindingLabelWithKey": "Ajouter une combinaison de touches {0}", "addKeybindingLabel": "Ajouter une combinaison de touches", + "title": "{0} ({1})", "commandAriaLabel": "Commande : {0}.", "keybindingAriaLabel": "Combinaison de touches : {0}.", "noKeybinding": "Aucune combinaison de touches n'est affectée.", diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 740f133866c..01cb125f57c 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "openRawDefaultSettings": "Ouvrir les paramètres bruts par défaut", "openGlobalSettings": "Ouvrir les paramètres utilisateur", "openGlobalKeybindings": "Ouvrir les raccourcis clavier", "openGlobalKeybindingsFile": "Ouvrir le fichier des raccourcis clavier", diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 627070bf270..c7b2dfd5e8a 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -7,12 +7,12 @@ "settingsEditorName": "Paramètres par défaut", "SearchSettingsWidget.AriaLabel": "Paramètres de recherche", "SearchSettingsWidget.Placeholder": "Paramètres de recherche", - "totalSettingsMessage": "Total de {0} paramètres", "noSettingsFound": "Aucun résultat", "oneSettingFound": "1 paramètre correspondant", "settingsFound": "{0} paramètres correspondants", - "fileEditorWithInputAriaLabel": "{0}. Éditeur de fichier texte.", - "fileEditorAriaLabel": "Éditeur de fichier texte.", + "totalSettingsMessage": "Total de {0} paramètres", + "defaultSettings": "Paramètres par défaut", + "defaultFolderSettings": "Paramètres de dossier par défaut", "defaultEditorReadonly": "Modifier dans l’éditeur du côté droit pour substituer les valeurs par défaut.", "preferencesAriaLabel": "Préférences par défaut. Éditeur de texte en lecture seule." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 12d172be7b1..91649fe2d5e 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -7,8 +7,6 @@ "emptyUserSettingsHeader": "Placer vos paramètres ici pour remplacer les paramètres par défaut.", "emptyWorkspaceSettingsHeader": "Placer vos paramètres ici pour remplacer les paramètres utilisateur.", "emptyFolderSettingsHeader": "Placer les paramètres de votre dossier ici pour remplacer ceux des paramètres de l’espace de travail.", - "defaultFolderSettingsTitle": "Paramètres de dossier par défaut", - "defaultSettingsTitle": "Paramètres par défaut", "editTtile": "Modifier", "replaceDefaultValue": "Remplacer dans les paramètres", "copyDefaultValue": "Copier dans Paramètres", diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index b35025c24ae..89aaca94b7b 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultSettingsFuzzyPrompt": "Essayez la recherche vague (fuzzy) !", + "defaultSettingsFuzzyPrompt": "Essayez la recherche en langage naturel !", "defaultSettings": "Placez vos paramètres dans l’éditeur du côté droit pour substituer.", "noSettingsFound": "Aucun paramètre.", - "folderSettingsDetails": "Paramètres de dossier", - "enableFuzzySearch": "Activer la recherche vague (fuzzy) expérimentale" + "settingsSwitcherBarAriaLabel": "Sélecteur de paramètres", + "userSettings": "Paramètres utilisateur", + "workspaceSettings": "Paramètres de l'espace de travail", + "folderSettings": "Paramètres de dossier", + "enableFuzzySearch": "Activer la recherche en langage naturel" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json new file mode 100644 index 00000000000..b2640dffe87 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Éditeur de préférences par défaut", + "keybindingsEditor": "Éditeur de combinaisons de touches", + "preferences": "Préférences" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json index 81a1f808023..4852691d7f0 100644 --- a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -6,7 +6,6 @@ { "scm providers": "Fournisseurs de contrôle de code source", "hideRepository": "Masquer", - "commitMessage": "Message (press {0} to commit)", "installAdditionalSCMProviders": "Installer des fournisseurs SCM supplémentaires...", "no open repo": "Il n’y a aucun fournisseur de contrôle de code source actif.", "source control": "Contrôle de code source", diff --git a/i18n/fra/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/fra/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index d5d4ff5f9b5..0701eeba616 100644 --- a/i18n/fra/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defaultLabel": "entrée", - "useIgnoreFilesDescription": "Utiliser Ignorer les fichiers", - "useExcludeSettingsDescription": "Utiliser Exclure les paramètres" + "useExcludesAndIgnoreFilesDescription": "Utiliser les paramètres d'exclusion et ignorer les fichiers" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/search/browser/search.contribution.i18n.json index 891ac2e5d78..e89ff759730 100644 --- a/i18n/fra/src/vs/workbench/parts/search/browser/search.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -16,7 +16,6 @@ "exclude.boolean": "Modèle Glob auquel les chemins de fichiers doivent correspondre. Affectez la valeur true ou false pour activer ou désactiver le modèle.", "exclude.when": "Vérification supplémentaire des frères d'un fichier correspondant. Utilisez $(basename) comme variable pour le nom de fichier correspondant.", "useRipgrep": "Contrôle si ripgrep doit être utilisé dans la recherche de texte et de fichier", - "useIgnoreFilesByDefault": "Contrôle s'il faut utiliser les fichiers .gitignore et .ignore par défaut en cas de recherche dans un nouvel espace de travail.", "useIgnoreFiles": "Contrôle s'il faut utiliser les fichiers .gitignore et .ignore par défaut pendant la recherche de fichiers.", "search.quickOpen.includeSymbols": "Configurez l'ajout des résultats d'une recherche de symboles globale dans le fichier de résultats pour Quick Open.", "search.followSymlinks": "Détermine s’il faut suivre les liens symboliques lors de la recherche." diff --git a/i18n/fra/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/fra/src/vs/workbench/parts/search/browser/searchActions.i18n.json index e723b18fb05..72ef3e89f83 100644 --- a/i18n/fra/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -10,17 +10,14 @@ "previousSearchExcludePattern": "Afficher le précédent Exclude Pattern de recherche", "nextSearchTerm": "Afficher le terme de recherche suivant", "previousSearchTerm": "Afficher le terme de recherche précédent", - "focusNextInputBox": "Focus sur la zone d'entrée suivante", - "focusPreviousInputBox": "Focus sur la zone d'entrée précédente", "showSearchViewlet": "Afficher la zone de recherche", "findInFiles": "Chercher dans les fichiers", "findInFilesWithSelectedText": "Rechercher dans les fichiers avec le texte sélectionné", "replaceInFiles": "Remplacer dans les fichiers", "replaceInFilesWithSelectedText": "Remplacer dans les fichiers avec le texte sélectionné", - "findInWorkspace": "Trouver dans l’espace de travail...", - "findInFolder": "Trouver dans le dossier...", "RefreshAction.label": "Actualiser", - "ClearSearchResultsAction.label": "Effacer les résultats de la recherche", + "CollapseDeepestExpandedLevelAction.label": "Réduire tout", + "ClearSearchResultsAction.label": "Effacer", "FocusNextSearchResult.label": "Focus sur le résultat de la recherche suivant", "FocusPreviousSearchResult.label": "Focus sur le résultat de la recherche précédent", "RemoveAction.label": "Rejeter", diff --git a/i18n/fra/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json new file mode 100644 index 00000000000..727436ac8ed --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Atteindre le symbole dans l'espace de travail...", + "name": "Rechercher", + "search": "Rechercher", + "view": "Affichage", + "openAnythingHandlerDescription": "Accéder au fichier", + "openSymbolDescriptionNormal": "Atteindre le symbole dans l'espace de travail", + "searchOutputChannelTitle": "Rechercher", + "searchConfigurationTitle": "Rechercher", + "exclude": "Configurez les modèles Glob pour exclure les fichiers et les dossiers des recherches. Hérite de tous les modèles Glob à partir du paramètre files.exclude.", + "exclude.boolean": "Modèle Glob auquel les chemins de fichiers doivent correspondre. Affectez la valeur true ou false pour activer ou désactiver le modèle.", + "exclude.when": "Vérification supplémentaire des frères d'un fichier correspondant. Utilisez $(basename) comme variable pour le nom de fichier correspondant.", + "useRipgrep": "Contrôle si ripgrep doit être utilisé dans la recherche de texte et de fichier", + "useIgnoreFiles": "Contrôle s'il faut utiliser les fichiers .gitignore et .ignore par défaut pendant la recherche de fichiers.", + "search.quickOpen.includeSymbols": "Configurez l'ajout des résultats d'une recherche de symboles globale dans le fichier de résultats pour Quick Open.", + "search.followSymlinks": "Contrôle s'il faut suivre les symlinks pendant la recherche." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/fra/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json new file mode 100644 index 00000000000..d98861f7c9f --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "findInFolder": "Rechercher dans le dossier...", + "findInWorkspace": "Trouver dans l’espace de travail..." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index abe24c7ec4d..bd3914070b3 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -6,10 +6,9 @@ { "tasksCategory": "Tâches", "ConfigureTaskRunnerAction.label": "Configurer une tâche", - "ConfigureBuildTaskAction.label": "Configurer une tâche de build", "CloseMessageAction.label": "Fermer", - "ShowTerminalAction.label": "Afficher le terminal", "problems": "Problèmes", + "building": "Génération...", "manyMarkers": "99", "runningTasks": "Afficher les tâches en cours d'exécution", "tasks": "Tâches", @@ -52,7 +51,7 @@ "TaslService.noEntryToRun": "Aucune tâche à exécuter n'a été trouvée. Configurer les tâches...", "TaskService.fetchingBuildTasks": "Récupération des tâches de génération...", "TaskService.pickBuildTask": "Sélectionner la tâche de génération à exécuter", - "TaskService.noBuildTask": "Aucune tâche de génération à exécuter n'a été trouvée. Configurer les tâches...", + "TaskService.noBuildTask": "Aucune tâche de génération à exécuter n'a été trouvée. Configurer la tâche de génération...", "TaskService.fetchingTestTasks": "Récupération des tâches de test...", "TaskService.pickTestTask": "Sélectionner la tâche de test à exécuter", "TaskService.noTestTaskTerminal": "Aucune tâche de test à exécuter n'a été trouvée. Configurer les tâches...", diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 2265e06f9f3..ae04c4513f3 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -7,6 +7,7 @@ "TerminalTaskSystem.unknownError": "Une erreur inconnue s'est produite durant l'exécution d'une tâche. Pour plus d'informations, consultez le journal de sortie des tâches.", "dependencyFailed": "Impossible de résoudre la tâche dépendante '{0}' dans le dossier de l’espace de travail '{1}'", "TerminalTaskSystem.terminalName": "Tâche - {0}", + "closeTerminal": "Appuyez sur n’importe quelle touche pour fermer le terminal.", "reuseTerminal": "Le terminal sera réutilisé par les tâches, appuyez sur une touche pour le fermer.", "TerminalTaskSystem": "Impossible d'exécuter une commande d'interpréteur de commandes sur un lecteur UNC.", "unkownProblemMatcher": "Impossible de résoudre le détecteur de problèmes {0}. Le détecteur est ignoré" diff --git a/i18n/fra/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index 14d05c09fde..83cc6d42c12 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,8 +14,8 @@ "ConfigurationParser.noTypeDefinition": "Erreur : aucun type de tâche '{0}' enregistré. Avez-vous oublié d'installer une extension incluant le fournisseur de tâches correspondant ?", "ConfigurationParser.missingRequiredProperty": "Erreur : la configuration de la tâche '{0}' a besoin de la propriété '{1}'. La configuration de la tâche sera ignorée.", "ConfigurationParser.notCustom": "Erreur : la tâche n'est pas déclarée comme une tâche personnalisée. La configuration est ignorée.\n{0}\n", - "ConfigurationParser.noTaskName": "Erreur : les tâches doivent fournir une propriété taskName. La tâche va être ignorée.\n{0}\n", - "taskConfiguration.shellArgs": "Avertissement : La tâche '{0}' est une commande d'interpréteur de commandes, et le nom de la commande ou l'un de ses arguments contient des espaces non précédés d'un caractère d'échappement. Pour garantir une ligne de commande correcte, fusionnez les arguments dans la commande.", + "ConfigurationParser.noTaskName": "Erreur : un tâche doit fournir une propriété label. La tâche va être ignorée.\n{0}\n", + "taskConfiguration.shellArgs": "Avertissement : la tâche '{0}' est une commande shell et un de ses arguments peut avoir des espaces non échappés. Afin d’assurer un échappement correct des guillemets dans la ligne de commande, veuillez fusionner les arguments dans la commande.", "taskConfiguration.noCommandOrDependsOn": "Erreur : La tâche '{0}' ne spécifie ni une commande, ni une propriété dependsOn. La tâche est ignorée. Sa définition est :\n{1}", "taskConfiguration.noCommand": "Erreur : La tâche '{0}' ne définit aucune commande. La tâche va être ignorée. Sa définition est :\n{1}", "TaskParse.noOsSpecificGlobalTasks": "Task Version 2.0.0 ne supporte pas les tâches spécifiques globales du système d'exploitation. Convertissez-les en une tâche en une commande spécifique du système d'exploitation. Les tâches concernées sont : {0}" diff --git a/i18n/fra/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index f680d69a958..54e21c2597d 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,7 +6,7 @@ { "termEntryAriaLabel": "{0}, sélecteur de terminaux", "termCreateEntryAriaLabel": "{0}, créer un terminal", - "'workbench.action.terminal.newplus": "$(plus) Créer un terminal intégré", + "workbench.action.terminal.newplus": "$(plus) Créer un terminal intégré", "noTerminalsMatching": "Aucun terminal correspondant", "noTerminalsFound": "Aucun terminal ouvert" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index ae4ba496061..adc1c333779 100644 --- a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,13 +5,15 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "Thème de couleur", + "themes.category.light": "thèmes clairs", + "themes.category.dark": "thèmes sombres", + "themes.category.hc": "thèmes à contraste élevé", "installColorThemes": "Installer des thèmes de couleurs supplémentaires...", "themes.selectTheme": "Sélectionner un thème de couleur (flèches bas/haut pour afficher l'aperçu)", "selectIconTheme.label": "Thème d'icône de fichier", - "installIconThemes": "Installer des thèmes d'icônes de fichiers supplémentaires...", "noIconThemeLabel": "Aucun", "noIconThemeDesc": "Désactiver les icônes de fichiers", - "problemChangingIconTheme": "Problème de définition du thème d'icône : {0}", + "installIconThemes": "Installer des thèmes d'icônes de fichiers supplémentaires...", "themes.selectIconTheme": "Sélectionner un thème d'icône de fichier", "generateColorTheme.label": "Générer le thème de couleur à partir des paramètres actuels", "preferences": "Préférences", diff --git a/i18n/fra/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/fra/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 10bbc7a9e96..215683ddac1 100644 --- a/i18n/fra/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/fra/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -9,9 +9,9 @@ "scope.window.description": "Configuration spécifique de la fenêtre, qui peut être configurée dans les paramètres utilisateur ou de l'espace de travail.", "scope.resource.description": "Configuration spécifique de la ressource, qui peut être configurée dans les paramètres utilisateur, de l'espace de travail ou du dossier.", "scope.description": "Portée dans laquelle la configuration s’applique. Les portées disponibles sont `window` et `resource`.", + "vscode.extension.contributes.defaultConfiguration": "Contribue aux paramètres de configuration d'éditeur par défaut en fonction du langage.", "vscode.extension.contributes.configuration": "Ajoute des paramètres de configuration.", "invalid.title": "'configuration.title' doit être une chaîne", - "vscode.extension.contributes.defaultConfiguration": "Contribue aux paramètres de configuration d'éditeur par défaut en fonction du langage.", "invalid.properties": "'configuration.properties' doit être un objet", "invalid.allOf": "'configuration.allOf' est obsolète et ne doit plus être utilisé. Au lieu de cela, passez plusieurs sections de configuration sous forme de tableau au point de contribution 'configuration'.", "workspaceConfig.folders.description": "Liste des dossiers à être chargés dans l’espace de travail.", diff --git a/i18n/fra/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json b/i18n/fra/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json new file mode 100644 index 00000000000..42bafb09091 --- /dev/null +++ b/i18n/fra/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Télémétrie", + "telemetry.enableCrashReporting": "Activez l'envoi de rapports d'incidents à Microsoft.\nCette option nécessite un redémarrage pour être prise en compte." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/fra/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index 2355522c31c..e23749d0ab9 100644 --- a/i18n/fra/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "bubbleTitle": "contient des éléments soulignés" + "bubbleTitle": "Contient des éléments soulignés" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/fra/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json new file mode 100644 index 00000000000..431845e652c --- /dev/null +++ b/i18n/fra/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "message": "$(zap) Profilage de l'hôte d'extension..." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/fra/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index 2056c501ce0..3d53454a9a7 100644 --- a/i18n/fra/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -9,5 +9,6 @@ "extensionHostProcess.crash": "L'hôte d’extension s'est arrêté de manière inattendue.", "extensionHostProcess.unresponsiveCrash": "L'hôte d'extension s'est arrêté, car il ne répondait pas.", "overwritingExtension": "Remplacement de l'extension {0} par {1}.", - "extensionUnderDevelopment": "Chargement de l'extension de développement sur {0}" + "extensionUnderDevelopment": "Chargement de l'extension de développement sur {0}", + "extensionCache.invalid": "Des extensions ont été modifiées sur le disque. Veuillez recharger la fenêtre." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/fra/src/vs/workbench/services/files/node/fileService.i18n.json index e5bf54a3941..6ba63445dd2 100644 --- a/i18n/fra/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/files/node/fileService.i18n.json @@ -8,8 +8,8 @@ "fileIsDirectoryError": "Le fichier est un répertoire", "fileNotModifiedError": "Fichier non modifié depuis", "fileTooLargeError": "Fichier trop volumineux pour être ouvert", - "fileBinaryError": "Il semble que le fichier soit binaire. Impossible de l'ouvrir en tant que texte", "fileNotFoundError": "Fichier introuvable ({0})", + "fileBinaryError": "Il semble que le fichier soit binaire. Impossible de l'ouvrir en tant que texte", "fileExists": "Le fichier à créer existe déjà ({0})", "fileMoveConflict": "Déplacement/copie impossible. Le fichier existe déjà dans la destination.", "unableToMoveCopyError": "Impossible de déplacer/copier. Le fichier remplace le dossier qui le contient.", diff --git a/i18n/fra/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/fra/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 9d1662c1388..232203467df 100644 --- a/i18n/fra/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -22,5 +22,5 @@ "keybindings.json.when": "Condition quand la touche est active.", "keybindings.json.args": "Arguments à passer à la commande à exécuter.", "keyboardConfigurationTitle": "Clavier", - "dispatch": "Spécifie l'utilisation de `keydown.code` (recommandé) ou de `keydown.keyCode` dans le cadre de la logique de dispatch associée aux appuis sur les touches." + "dispatch": "Contrôle la logique de distribution des appuis sur les touches pour utiliser soit 'code' (recommandé), soit 'keyCode'." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/fra/src/vs/workbench/services/textfile/common/textFileService.i18n.json index 53fb4332f21..2614ff28252 100644 --- a/i18n/fra/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "files.backup.failSave": "Les fichiers n'ont pas pu être sauvegardés (Erreur : {0}), essayez d'enregistrer vos fichiers pour quitter." + "files.backup.failSave": "Les fichiers qui sont modifiés ne peuvent pas être écrits à l’emplacement de sauvegarde (erreur : {0}). Essayez d’enregistrer vos fichiers d’abord, puis sortez." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 234d5fb5a0e..46a345fad2d 100644 --- a/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "migration.completed": "De nouveaux paramètres de thème ont été ajoutés aux paramètres utilisateur. Sauvegarde disponible sur {0}.", "error.cannotloadtheme": "Unable to load {0}: {1}", - "error.cannotloadicontheme": "Unable to load {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Spécifie le thème d'icône utilisé dans le banc d'essai ou 'null' pour n'afficher aucune icône de fichier.", diff --git a/i18n/hun/extensions/git/out/autofetch.i18n.json b/i18n/hun/extensions/git/out/autofetch.i18n.json new file mode 100644 index 00000000000..fe69406ef37 --- /dev/null +++ b/i18n/hun/extensions/git/out/autofetch.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yes": "Igen", + "no": "Nem", + "not now": "Most nem", + "suggest auto fetch": "Szeretné engedélyezni a Git-forráskódtárhelyek automatikus lekérését (fetch)?" +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/commands.i18n.json b/i18n/hun/extensions/git/out/commands.i18n.json index ed82f751b7f..75a82e6ba00 100644 --- a/i18n/hun/extensions/git/out/commands.i18n.json +++ b/i18n/hun/extensions/git/out/commands.i18n.json @@ -9,6 +9,8 @@ "create branch": "$(plus) Új ág létrehozása", "repourl": "Forráskódtár URL-címe", "parent": "SzülÅ‘könyvtár", + "cancel": "$(sync~spin) Forráskódtár klónozása... Kattintson ide a megszakításhoz", + "cancel tooltip": "Klónozás megszakítása", "cloning": "Git-forráskódtár klónozása...", "openrepo": "Forráskódtár megnyitása", "proposeopen": "Szeretné megnyitni a klónozott forráskódtárat?", @@ -49,12 +51,15 @@ "select branch to delete": "Válassza ki a törlendÅ‘ ágat", "confirm force delete branch": "A(z) '{0}' ág nincs teljesen beolvasztva. Mégis törli?", "delete branch": "Ãg törlése", + "invalid branch name": "Az ág neve érvénytelen", + "branch already exists": "Már van '{0}' nevű ág", "select a branch to merge from": "Válassza ki az ágat, amit olvasztani szeretne", "merge conflicts": "Összeolvasztási konfliktusok keletkeztek. Oldja fel Å‘ket a beadás (commit) elÅ‘tt!", "tag name": "Címke neve", "provide tag name": "Adja meg a címke nevét", "tag message": "Üzenet", "provide tag message": "Adja meg a címke leírását tartalmazó üzenetet", + "no remotes to fetch": "A forráskódtárhoz nincsenek távoli szerverek konfigurálva, ahonnan le lehetne kérni.", "no remotes to pull": "A forráskódtárhoz nincsenek távoli szerverek konfigurálva, ahonnan pullozni lehetne.", "pick remote pull repo": "Válassza ki a távoli szervert, ahonnan pullozni szeretné az ágat", "no remotes to push": "A forráskódtárhoz nincsenek távoli szerverek konfigurálva, ahová pusholni lehetne.", @@ -71,7 +76,7 @@ "no stashes": "Nincs visszaállítható stash.", "pick stash to pop": "Válassza ki a visszaállítandó stash-t", "clean repo": "Takarítsa ki a forráskódtár munkafáját, mielÅ‘tt checkoutolna!", - "cant push": "Nem lehet pusholni a távoli szerverre. Futtassa a 'Pull' parancsot a módosításai integrálásához!", + "cant push": "Nem lehet pusholni a távoli szerverre. ElÅ‘ször próbálja meg futtatni a 'Pull' parancsot a módosításai integrálásához!", "git error details": "Git: {0}", "git error": "Git-hiba", "open git log": "Git-napló megnyitása" diff --git a/i18n/hun/extensions/git/out/main.i18n.json b/i18n/hun/extensions/git/out/main.i18n.json index 914f704e3d8..ab59b50cfc7 100644 --- a/i18n/hun/extensions/git/out/main.i18n.json +++ b/i18n/hun/extensions/git/out/main.i18n.json @@ -4,8 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "looking": "Git keresése a következÅ‘ helyen: {0}", "using git": "Git {0} használata a következÅ‘ helyrÅ‘l: {1}", - "updateGit": "Git frissítése", + "downloadgit": "Git letöltése", "neverShowAgain": "Ne jelenjen meg újra", + "notfound": "A Git nem található. Telepítse vagy állítsa be az elérési útját a 'git.path' beállítással.", + "updateGit": "Git frissítése", "git20": "Úgy tűnik, hogy a git {0} van telepítve. A Code a git >= 2 verzióival működik együtt a legjobban." } \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/repository.i18n.json b/i18n/hun/extensions/git/out/repository.i18n.json index 360a4435ac6..234abfc4470 100644 --- a/i18n/hun/extensions/git/out/repository.i18n.json +++ b/i18n/hun/extensions/git/out/repository.i18n.json @@ -21,6 +21,7 @@ "deleted by us": "Ãltalunk törölt", "both added": "MindkettÅ‘ hozzáadta", "both modified": "MindkettÅ‘ módosította", + "commitMessage": "Üzenet (nyomja meg a következÅ‘t a commithoz: {0})", "commit": "Commit", "merge changes": "Módosítások összeolvasztása", "staged changes": "Beadásra elÅ‘jegyzett módosítások", diff --git a/i18n/hun/extensions/git/package.i18n.json b/i18n/hun/extensions/git/package.i18n.json index d0c5339fa18..150ac02318b 100644 --- a/i18n/hun/extensions/git/package.i18n.json +++ b/i18n/hun/extensions/git/package.i18n.json @@ -33,8 +33,10 @@ "command.checkout": "Checkout adott helyre...", "command.branch": "Ãg létrehozása...", "command.deleteBranch": "Új ág létrehozása", + "command.renameBranch": "Ãg átnevezése...", "command.merge": "Ãg beolvasztása...", "command.createTag": "Címke létrehozása", + "command.fetch": "Lekérés (fetch)", "command.pull": "Pull", "command.pullRebase": "Pull (Rebase)", "command.pullFrom": "Pullozás...", @@ -42,9 +44,11 @@ "command.pushTo": "Push adott helyre...", "command.pushWithTags": "Push címkékkel", "command.sync": "Szinkronizálás", + "command.syncRebase": "Szinkronizálás (rebase)", "command.publish": "Ãg publikálása", "command.showOutput": "Git-kimenet megjelenítése", "command.ignore": "Fájl hozzáadása a .gitignore-hoz", + "command.stashIncludeUntracked": "Stash (a nem követett fájlokkal együtt)", "command.stash": "Stash", "command.stashPop": "Stash visszaállítása...", "command.stashPopLatest": "Legutóbbi stash visszaállítása", @@ -57,6 +61,7 @@ "config.countBadge": "Meghatározza a git jelvényen megjelenÅ‘ számláló működését. Az `all` minden módosítást számol, a `tracked` csak a követkett változtatásokat. Az `off` kikapcsolja a jelvényt.", "config.checkoutType": "Meghatározza, hogy milyen típusú ágak jelenjenek meg a `Checkout adott helyrÅ‘l... ` parancs futtatása esetén. Az `all` esetén az összes ref megjelenik, `local` esetén csak a helyi ágak, `tags` esetén csak a címkék, `remote` esetén pedig csak a távoli ágak.", "config.ignoreLegacyWarning": "Régi gittel kapcsolatos figyelmeztetés figyelmen kívül hagyása", + "config.ignoreMissingGitWarning": "Figyelmeztetés figyelmen kívül hagyása, ha a Git hiányzik", "config.ignoreLimitWarning": "Túl sok módosítás esetén megjelenÅ‘ figyelmeztetés figyelmen kívül hagyása", "config.defaultCloneDirectory": "Git-forráskódtárak klónozásának alapértelmezett helye.", "config.enableSmartCommit": "Összes módosítás beadása (commit), ha nincsenek elÅ‘jegyzett módosítások.", diff --git a/i18n/hun/extensions/markdown/out/commands.i18n.json b/i18n/hun/extensions/markdown/out/commands.i18n.json new file mode 100644 index 00000000000..4d7844c4529 --- /dev/null +++ b/i18n/hun/extensions/markdown/out/commands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previewTitle": "{0} elÅ‘nézete", + "onPreviewStyleLoadError": "A 'markdown.styles' nem tölthetÅ‘ be: {0}" +} \ No newline at end of file diff --git a/i18n/hun/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/hun/extensions/markdown/out/features/previewContentProvider.i18n.json new file mode 100644 index 00000000000..a99e0243419 --- /dev/null +++ b/i18n/hun/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "A tartalom egy része le van tiltva az aktuális dokumentumban", + "preview.securityMessage.title": "Potencionálisan veszélyes vagy nem biztonságos tartalom lett letiltva a markdown-elÅ‘nézetben. Módosítsa a markdown-elÅ‘nézet biztonsági beállításait a nem biztonságos tartalmak vagy parancsfájlok engedélyezéséhez!", + "preview.securityMessage.label": "Biztonsági figyelmeztetés: tartalom le van tiltva" +} \ No newline at end of file diff --git a/i18n/hun/extensions/markdown/out/security.i18n.json b/i18n/hun/extensions/markdown/out/security.i18n.json index 17e3cdb8d75..dc2803d3329 100644 --- a/i18n/hun/extensions/markdown/out/security.i18n.json +++ b/i18n/hun/extensions/markdown/out/security.i18n.json @@ -11,5 +11,8 @@ "disable.title": "Letiltás", "disable.description": "Minden tartalom és parancsfájl futtatásának engedélyezése. Nem ajánlott.", "moreInfo.title": "További információ", + "enableSecurityWarning.title": "ElÅ‘nézettel kapcsolatos biztonsági figyelmeztetések engedélyezése ezen a munkaterületen", + "disableSecurityWarning.title": "ElÅ‘nézettel kapcsolatos biztonsági figyelmeztetések letiltása ezen a munkaterületen", + "toggleSecurityWarning.description": "Nem befolyásolja a tartalom biztonsági szintjét", "preview.showPreviewSecuritySelector.title": "Válassza ki a munkaterület Markdown-elÅ‘nézeteinek biztonsági beállítását!" } \ No newline at end of file diff --git a/i18n/hun/extensions/merge-conflict/package.i18n.json b/i18n/hun/extensions/merge-conflict/package.i18n.json index b3814f8d7e6..0fc1ea6b49c 100644 --- a/i18n/hun/extensions/merge-conflict/package.i18n.json +++ b/i18n/hun/extensions/merge-conflict/package.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "Összeolvasztási konfliktus", + "command.accept.all-current": "Összes aktuális elfogadása", "command.accept.all-incoming": "Összes beérkezÅ‘ változás elfogadása", "command.accept.all-both": "Változások elfogadása mindkét oldalról", "command.accept.current": "Helyi változtatás elfogadása", diff --git a/i18n/hun/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/hun/extensions/typescript/out/features/completionItemProvider.i18n.json index 74dcbbe0b6c..09e699cf41e 100644 --- a/i18n/hun/extensions/typescript/out/features/completionItemProvider.i18n.json +++ b/i18n/hun/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "selectCodeAction": "Válasszon végrehajtandó kódműveletet!", "acquiringTypingsLabel": "Típusdefiníciók letöltése...", "acquiringTypingsDetail": "Típusdefiníciók letöltése az IntelliSense-hez.", "autoImportLabel": "Automatikus importálás a következÅ‘ helyrÅ‘l: {0}" diff --git a/i18n/hun/extensions/typescript/package.i18n.json b/i18n/hun/extensions/typescript/package.i18n.json index e6fbadc2798..6c0766a467e 100644 --- a/i18n/hun/extensions/typescript/package.i18n.json +++ b/i18n/hun/extensions/typescript/package.i18n.json @@ -39,6 +39,7 @@ "typescript.openTsServerLog.title": "TS-szervernapló megnyitása", "typescript.restartTsServer": "TS-szerver újraindítása", "typescript.selectTypeScriptVersion.title": "TypeScript-verzió kiválasztása", + "typescript.reportStyleChecksAsWarnings": "StílusellenÅ‘rzés során talált esetek figyelmeztetésként legyenek jelentve", "jsDocCompletion.enabled": "Automatikus JSDoc-megjegyzések engedélyezése vagy letiltása", "javascript.implicitProjectConfig.checkJs": "JavaScript-fájlok szemantikai ellenÅ‘rzésének engedélyezése vagy letiltása. A meglévÅ‘ jsconfig.json vagy tsconfig.json fájlok felülírják ezt a beállítást. TypeScript >= 2.3.1-et igényel.", "typescript.npm": "Az automatikus típusdefiníció-letöltéshez használt NPM végrehajtható fájl elérési útja. TypeScript 2.3.4-et igényel.", diff --git a/i18n/hun/src/vs/base/common/errorMessage.i18n.json b/i18n/hun/src/vs/base/common/errorMessage.i18n.json index adc4bbc9fdd..c664a35d8d2 100644 --- a/i18n/hun/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/hun/src/vs/base/common/errorMessage.i18n.json @@ -4,13 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "message": "{0}: {1}", - "error.permission.verbose": "Engedélyhiány (HTTP {0})", - "error.permission": "Engedélyhiány", - "error.http.verbose": "{0} (HTTP {1}: {2})", - "error.http": "{0} (HTTP {1})", - "error.connection.unknown.verbose": "Ismeretlen csatlakozási hiba ({0})", - "error.connection.unknown": "Ismeretlen csatlakozási hiba történt. Vagy megszakadt az internetkapcsolat, vagy a kiszolgáló vált offline-ná.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "Ismeretlen hiba történt. Részletek a naplóban.", "nodeExceptionMessage": "Rendszerhiba történt ({0})", diff --git a/i18n/hun/src/vs/code/electron-main/main.i18n.json b/i18n/hun/src/vs/code/electron-main/main.i18n.json new file mode 100644 index 00000000000..295fec83c2a --- /dev/null +++ b/i18n/hun/src/vs/code/electron-main/main.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "secondInstanceNoResponse": "Már fut a(z) {0} másik példánya, de nem válaszol.", + "secondInstanceNoResponseDetail": "Zárja be az összes példányt, majd próbálja újra!", + "secondInstanceAdmin": "Már fut a(z) {0} másik példánya adminisztrátorként.", + "secondInstanceAdminDetail": "Zárja be az összes példányt, majd próbálja újra!", + "close": "&&Bezárás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/code/electron-main/menus.i18n.json b/i18n/hun/src/vs/code/electron-main/menus.i18n.json index 62fae0da197..c93d0756a23 100644 --- a/i18n/hun/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/hun/src/vs/code/electron-main/menus.i18n.json @@ -26,8 +26,8 @@ "miOpenFolder": "Ma&&ppa megnyitása", "miOpenFile": "&&Fájl megnyitása", "miOpenRecent": "&&Legutóbbi megnyitása", - "miSaveWorkspaceAs": "Munkaterület menté&&se másként...", - "miAddFolderToWorkspace": "&&Mappa hozzáadása a munkaterülethez...", + "miSaveWorkspaceAs": "Munkaterület mentése másként...", + "miAddFolderToWorkspace": "Mappa hozzáa&&dása a munkaterülethez...", "miSave": "Menté&&s", "miSaveAs": "M&&entés másként", "miSaveAll": "Összes men&&tése", @@ -157,7 +157,7 @@ "mMergeAllWindows": "Összes ablak összeolvasztása", "miToggleDevTools": "&&FejlesztÅ‘i eszközök be- és kikapcsolása", "miAccessibilityOptions": "&&KisegítÅ‘ lehetÅ‘ségek", - "miReportIssues": "&&Problémák jelentése", + "miReportIssue": "H&&iba jelentése", "miWelcome": "ÜdvözlÅ‘&&oldal", "miInteractivePlayground": "&&Interaktív játszótér", "miDocumentation": "&&Dokumentáció", @@ -184,6 +184,7 @@ "miDownloadingUpdate": "Frissítés letöltése...", "miInstallingUpdate": "Frissítés telepítése...", "miCheckForUpdates": "Frissítések keresése...", - "aboutDetail": "\nVerzió: {0}\nCommit: {1}\nDátum: {2}\nShell: {3}\nRendelÅ‘: {4}\nNode: {5}\nArchitektúra: {6}", - "okButton": "OK" + "aboutDetail": "Verzió: {0}\nCommit: {1}\nDátum: {2}\nShell: {3}\nRendelÅ‘: {4}\nNode: {5}\nArchitektúra: {6}", + "okButton": "OK", + "copy": "&&Másolás" } \ No newline at end of file diff --git a/i18n/hun/src/vs/code/node/cliProcessMain.i18n.json b/i18n/hun/src/vs/code/node/cliProcessMain.i18n.json index fe8c039d35f..84a30118cd7 100644 --- a/i18n/hun/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/hun/src/vs/code/node/cliProcessMain.i18n.json @@ -8,6 +8,7 @@ "notInstalled": "A(z) '{0}' kiegészítÅ‘ nincs telepítve.", "useId": "Bizonyosodjon meg róla, hogy a kiegészítÅ‘ teljes azonosítóját használja, beleértve a kiadót, pl.: {0}", "successVsixInstall": "A(z) '{0}' kiegszítÅ‘ sikeresen telepítve lett.", + "cancelVsixInstall": "A(z) '{0}' kiegészítÅ‘ telepítése meg lett szakítva.", "alreadyInstalled": "A(z) '{0}' kiegészítÅ‘ már telepítve van.", "foundExtension": "A(z) '{0}' kiegészítÅ‘ megtalálva a piactéren.", "installing": "Telepítés...", diff --git a/i18n/hun/src/vs/editor/browser/services/bulkEdit.i18n.json b/i18n/hun/src/vs/editor/browser/services/bulkEdit.i18n.json new file mode 100644 index 00000000000..b0bbd29edb0 --- /dev/null +++ b/i18n/hun/src/vs/editor/browser/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "A következÅ‘ fájlok módosultak idÅ‘közben: {0}", + "summary.0": "Nem történtek változtatások", + "summary.nm": "{0} változtatást végzett {0} fájlban", + "summary.n0": "{0} változtatást végzett egy fájlban" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/hun/src/vs/editor/common/config/commonEditorConfig.i18n.json index a441d84a33a..48b15939e90 100644 --- a/i18n/hun/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/hun/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,12 +10,16 @@ "fontSize": "Meghatározza a betű méretét, pixelekben.", "lineHeight": "Meghatározza a sormagasságot. A 0 érték használata esetén a sormagasság a fontSize értékébÅ‘l van számolva.", "letterSpacing": "Meghatározza a betűközt, pixelekben.", - "lineNumbers": "Meghatározza, hogy megjelenjenek-e a sorszámok. A lehetséges értékek 'on', 'off' és 'relative'. A 'relative' érték használata esetén a kurzor aktuális pozíciójához képest számított sorszám jelenik meg.", + "lineNumbers.off": "A sorszámok nem jelennek meg.", + "lineNumbers.on": "A sorszámok abszolút értékként jelennek meg.", + "lineNumbers.relative": "A sorszámok a kurzortól való távolságuk alapján jelennek meg.", + "lineNumbers.interval": "A sorszámok minden 10. sorban jelennek meg.", + "lineNumbers": "Meghatározza a sorszámok megjelenését. A lehetséges értékek: 'on', 'off' és 'relative'.", "rulers": "FüggÅ‘leges vonalzók kirajzolása bizonyos számú fix szélességű karakter után. Több vonalzó használatához adjon meg több értéket. Nincs kirajzolva semmi, ha a tömb üres.", "wordSeparators": "Azon karakterek listája, amelyek szóelválasztónak vannak tekintve szavakkal kapcsolatos navigáció vagy műveletek során.", - "tabSize": "Egy tabulátor hány szóköznek felel meg. Ez a beállítás felülírásra kerül a fájl tartalma alapján, ha az 'editor.detectIndentation' beállítás aktív.", + "tabSize": "Egy tabulátor hány szóköznek felel meg. Ez a beállítás felülírásra kerül a fájl tartalma alapján, ha az `editor.detectIndentation` beállítás aktív.", "tabSize.errorMessage": "A várt érték 'number' típusú. Megjegyzés: az \"auto\" értéket az 'editor.detectIndentation' beállítás helyettesíti.", - "insertSpaces": "Tabulátor billentyű lenyomásánál szóközök legyenek-e beszúrva. Ez a beállítás felülírásra kerül a fájl tartalma alapján, ha az 'editor.detectIndentation' beállítás aktív.", + "insertSpaces": "Szóközök beszúrása a tabulátor billentyű lenyomása esetén. Ez a beállítás felülíródik a fájl tartalma alapján, ha az `editor.detectIndentation` beállítás aktív.", "insertSpaces.errorMessage": "A várt érték 'boolean' típusú. Megjegyzés: az \"auto\" értéket az 'editor.detectIndentation' beállítás helyettesíti.", "detectIndentation": "Fájl megnyitásakor az `editor.tabSize` és az `editor.insertSpaces` értéke a fájl tartalma alapján lesz meghatározva.", "roundedSelection": "Itt adható meg, hogy a kijelölt elemek sarkai lekerekítettek legyenek-e", @@ -27,6 +31,7 @@ "minimap.maxColumn": "Meghatározza, hogy a kódtérképen legfeljebb hány oszlop legyen kirajzolva.", "find.seedSearchStringFromSelection": "Meghatározza, hogy a keresés modulba automatikusan bekerüljön-e a szerkesztÅ‘ablakban kiválasztott szöveg.", "find.autoFindInSelection": "Meghatározza, hogy a keresés a kijelölésben beállítás be van-e kapcsolva, ha több karakternyi vagy sornyi szöveg ki van jelölve a szerkesztÅ‘ablakban.", + "find.globalFindClipboard": "Meghatározza, hogy a keresÅ‘modul olvassa és módosítsa-e a megosztott keresési vágólapot macOS-en.", "wordWrap.off": "A sorok soha nem lesznek tördelve.", "wordWrap.on": "A sorok tördelve lesznek a nézetablak szélességénél.", "wordWrap.wordWrapColumn": "A sorok tördelve lesznek az `editor.wordWrapColumn` oszlopnál.", @@ -89,8 +94,8 @@ "links": "Meghatározza, hogy a szerkesztÅ‘ablak érzékelje-e a hivatkozásokat, és kattinthatóvá tegye-e Å‘ket.", "colorDecorators": "Meghatározza, hogy a szerkesztÅ‘ablakban ki legyenek-e rajzolva a színdekorátorok és színválasztók.", "codeActions": "Engedélyezi a kódműveletek végrehajtásához használható villanykörtét", + "selectionClipboard": "Meghatározza-e, hogy támogatva van-e az elsÅ‘dleges vágólap Linux alatt", "sideBySide": "Meghatározza, hogy a differenciaszerkesztÅ‘ ablakban egymás mellett vagy a sorban jelenjenek meg az eltérések", "ignoreTrimWhitespace": "Meghatározza, hogy a differenciaszerkesztÅ‘ ablakban megjelenjenek-e a sor elején vagy végén a szóközökben talált különbségek", - "renderIndicators": "Meghatározza, hogy a differenciaszerkesztÅ‘ ablakban megjelenjenek-e a +/- jelzÅ‘k az hozzáadott/eltávolított változásoknál", - "selectionClipboard": "Meghatározza-e, hogy támogatva van-e az elsÅ‘dleges vágólap Linux alatt" + "renderIndicators": "Meghatározza, hogy a differenciaszerkesztÅ‘ ablakban megjelenjenek-e a +/- jelzÅ‘k az hozzáadott/eltávolított változásoknál" } \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/hun/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json new file mode 100644 index 00000000000..647a263affc --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Ugrás a zárójelre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json b/i18n/hun/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json new file mode 100644 index 00000000000..1fc37d07684 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "Kurzor mozgatása balra", + "caret.moveRight": "Kurzor mozgatása jobbra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/caretOperations/transpose.i18n.json b/i18n/hun/src/vs/editor/contrib/caretOperations/transpose.i18n.json new file mode 100644 index 00000000000..e8cbbca5cf4 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/caretOperations/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Betűk megcserélése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/clipboard/clipboard.i18n.json b/i18n/hun/src/vs/editor/contrib/clipboard/clipboard.i18n.json new file mode 100644 index 00000000000..09439c237cb --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/clipboard/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Kivágás", + "actions.clipboard.copyLabel": "Másolás", + "actions.clipboard.pasteLabel": "Beillesztés", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Másolás szintaktikai kiemeléssel" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/comment/comment.i18n.json b/i18n/hun/src/vs/editor/contrib/comment/comment.i18n.json new file mode 100644 index 00000000000..219553bdc4e --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/comment/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Egysoros megjegyzés ki-/bekapcsolása", + "comment.line.add": "Egysoros megjegyzés hozzáadása", + "comment.line.remove": "Egysoros megjegyzés eltávolítása", + "comment.block": "Megjegyzésblokk ki-/bekapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json b/i18n/hun/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json new file mode 100644 index 00000000000..78d9a20aae1 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "SzerkesztÅ‘ablak helyi menüjének megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/find/findController.i18n.json b/i18n/hun/src/vs/editor/contrib/find/findController.i18n.json new file mode 100644 index 00000000000..6e1f33bceda --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/find/findController.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Keresés", + "findNextMatchAction": "KövetkezÅ‘ találat", + "findPreviousMatchAction": "ElÅ‘zÅ‘ találat", + "nextSelectionMatchFindAction": "KövetkezÅ‘ kijelölés", + "previousSelectionMatchFindAction": "ElÅ‘zÅ‘ kijelölés", + "startReplace": "Csere", + "showNextFindTermAction": "KövetkezÅ‘ keresési kifejezés megjelenítése", + "showPreviousFindTermAction": "ElÅ‘zÅ‘ keresési kifejezés megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/find/findWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/find/findWidget.i18n.json new file mode 100644 index 00000000000..21f944c4263 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/find/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Keresés", + "placeholder.find": "Keresés", + "label.previousMatchButton": "ElÅ‘zÅ‘ találat", + "label.nextMatchButton": "KövetkezÅ‘ találat", + "label.toggleSelectionFind": "Keresés kijelölésben", + "label.closeButton": "Bezárás", + "label.replace": "Csere", + "placeholder.replace": "Csere", + "label.replaceButton": "Csere", + "label.replaceAllButton": "Összes cseréje", + "label.toggleReplaceButton": "Váltás csere módra", + "title.matchesCountLimit": "Csak az elsÅ‘ {0} találat van kiemelve, de minden keresési művelet a teljes szöveggel dolgozik.", + "label.matchesLocation": "{0} (összesen {1})", + "label.noResults": "Nincs eredmény" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/find/simpleFindWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/find/simpleFindWidget.i18n.json new file mode 100644 index 00000000000..2d5b3af7ef7 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/find/simpleFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Keresés", + "placeholder.find": "Keresés", + "label.previousMatchButton": "ElÅ‘zÅ‘ találat", + "label.nextMatchButton": "KövetkezÅ‘ találat", + "label.closeButton": "Bezárás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/hun/src/vs/editor/contrib/folding/folding.i18n.json new file mode 100644 index 00000000000..ffe920fbb79 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/folding/folding.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Kibontás", + "unFoldRecursivelyAction.label": "Kibontás rekurzívan", + "foldAction.label": "Bezárás", + "foldRecursivelyAction.label": "Bezárás rekurzívan", + "foldAllBlockComments.label": "Összes megjegyzésblokk bezárása", + "foldAllMarkerRegions.label": "Összes régió bezárása", + "unfoldAllMarkerRegions.label": "Összes régió kinyitása", + "foldAllAction.label": "Az összes bezárása", + "unfoldAllAction.label": "Az összes kinyitása", + "foldLevelAction.label": "{0} szintű blokkok bezárása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/format/formatActions.i18n.json b/i18n/hun/src/vs/editor/contrib/format/formatActions.i18n.json new file mode 100644 index 00000000000..7b8c9186b0f --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/format/formatActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "Egy formázást végzett a(z) {0}. sorban", + "hintn1": "{0} formázást végzett a(z) {1}. sorban", + "hint1n": "Egy formázást végzett a(z) {0}. és {1}. sorok között", + "hintnn": "{0} formázást végzett a(z) {1}. és {2}. sorok között", + "no.provider": "Sajnáljuk, de nincs formázó telepítve a(z) '{0}' típusú fájlokhoz.", + "formatDocument.label": "Dokumentum formázása", + "formatSelection.label": "Kijelölt tartalom formázása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json b/i18n/hun/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json new file mode 100644 index 00000000000..50e0679aba9 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Nem található a(z) '{0}' definíciója", + "generic.noResults": "Definíció nem található", + "meta.title": " – {0} definíció", + "actions.goToDecl.label": "Ugrás a definícióra", + "actions.goToDeclToSide.label": "Definíció megnyitása oldalt", + "actions.previewDecl.label": "Betekintés a definícióba", + "goToImplementation.noResultWord": "Nem található a(z) '{0}' implementációja", + "goToImplementation.generic.noResults": "Implementáció nem található", + "meta.implementations.title": " – {0} implementáció", + "actions.goToImplementation.label": "Ugrás az implementációra", + "actions.peekImplementation.label": "Betekintés az implementációba", + "goToTypeDefinition.noResultWord": "Nem található a(z) '{0}' típusdefiníciója", + "goToTypeDefinition.generic.noResults": "Típusdefiníció nem található", + "meta.typeDefinitions.title": " – {0} típusdefiníció", + "actions.goToTypeDefinition.label": "Ugrás a típusdefinícióra", + "actions.peekTypeDefinition.label": "Betekintés a típusdefinícióba" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json b/i18n/hun/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json new file mode 100644 index 00000000000..782190fef04 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Kattintson {0} definíció megjelenítéséhez." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/gotoError/gotoError.i18n.json b/i18n/hun/src/vs/editor/contrib/gotoError/gotoError.i18n.json new file mode 100644 index 00000000000..e3ec625549e --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/gotoError/gotoError.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "KövetkezÅ‘ hiba vagy figyelmeztetés", + "markerAction.previous.label": "ElÅ‘zÅ‘ hiba vagy figyelmeztetés", + "editorMarkerNavigationError": "A szerkesztÅ‘ablak jelzÅ‘navigációs moduljának színe hiba esetén.", + "editorMarkerNavigationWarning": "A szerkesztÅ‘ablak jelzÅ‘navigációs moduljának színe figyelmeztetés esetén.", + "editorMarkerNavigationInfo": "A szerkesztÅ‘ablak jelzÅ‘navigációs moduljának színe információ esetén.", + "editorMarkerNavigationBackground": "A szerkesztÅ‘ablak jelzÅ‘navigációs moduljának háttérszíne." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/hover/hover.i18n.json b/i18n/hun/src/vs/editor/contrib/hover/hover.i18n.json new file mode 100644 index 00000000000..e9de48281ee --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/hover/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Súgószöveg megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/hover/modesContentHover.i18n.json b/i18n/hun/src/vs/editor/contrib/hover/modesContentHover.i18n.json new file mode 100644 index 00000000000..a9cab1dd0d5 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/hover/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Betöltés..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json b/i18n/hun/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json new file mode 100644 index 00000000000..0339e509b33 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Csere az elÅ‘zÅ‘ értékre", + "InPlaceReplaceAction.next.label": "Csere a következÅ‘ értékre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/indentation/indentation.i18n.json b/i18n/hun/src/vs/editor/contrib/indentation/indentation.i18n.json new file mode 100644 index 00000000000..4b8870d20ac --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/indentation/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Indentálások átalakítása szóközökké", + "indentationToTabs": "Indentálások átalakítása tabulátorokká", + "configuredTabSize": "Beállított tabulátorméret", + "selectTabWidth": "Tabulátorméret kiválasztása az aktuális fájlhoz", + "indentUsingTabs": "Indentálás tabulátorral", + "indentUsingSpaces": "Indentálás szóközzel", + "detectIndentation": "Indentálás felismerése a tartalom alapján", + "editor.reindentlines": "Sorok újraindentálása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json b/i18n/hun/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json new file mode 100644 index 00000000000..d5c935359b0 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Sor másolása eggyel feljebb", + "lines.copyDown": "Sor másolása eggyel lejjebb", + "lines.moveUp": "Sor feljebb helyezése", + "lines.moveDown": "Sor lejjebb helyezése", + "lines.sortAscending": "Rendezés növekvÅ‘ sorrendben", + "lines.sortDescending": "Rendezés csökkenÅ‘ sorrendben", + "lines.trimTrailingWhitespace": "Sor végén található szóközök levágása", + "lines.delete": "Sor törlése", + "lines.indent": "Sor behúzása", + "lines.outdent": "Sor kihúzása", + "lines.insertBefore": "Sor beszúrása eggyel feljebb", + "lines.insertAfter": "Sor beszúrása eggyel lejjebb", + "lines.deleteAllLeft": "Balra lévÅ‘ tartalom törlése", + "lines.deleteAllRight": "Jobbra lévÅ‘ tartalom törlése", + "lines.joinLines": "Sorok egyesítése", + "editor.transpose": "A kurzor körüli karakterek felcserélése", + "editor.transformToUppercase": "Ãtalakítás nagybetűssé", + "editor.transformToLowercase": "Ãtalakítás kisbetűssé" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/links/links.i18n.json b/i18n/hun/src/vs/editor/contrib/links/links.i18n.json new file mode 100644 index 00000000000..543b55fd2ed --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/links/links.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Hivatkozott oldal megnyitása Cmd + kattintás paranccsal", + "links.navigate": "Hivatkozott oldal megnyitása Ctrl + kattintás paranccsal", + "links.command.mac": "Cmd + kattintás a parancs végrehajtásához", + "links.command": "Ctrl + kattintás a parancs végrehajtásához", + "links.navigate.al": "Hivatkozás megnyitása Alt + kattintás paranccsal", + "links.command.al": "Alt + kattintás a parancs végrehajtásához", + "invalid.url": "A hivatkozást nem sikerült megnyitni, mert nem jól formázott: {0}", + "missing.url": "A hivatkozást nem sikerült megnyitni, hiányzik a célja.", + "label": "Hivatkozás megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/multicursor/multicursor.i18n.json b/i18n/hun/src/vs/editor/contrib/multicursor/multicursor.i18n.json new file mode 100644 index 00000000000..f50dc975843 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/multicursor/multicursor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Kurzor beszúrása egy sorral feljebb", + "mutlicursor.insertBelow": "Kurzor beszúrása egy sorral lejjebb", + "mutlicursor.insertAtEndOfEachLineSelected": "Kurzor beszúrása a sorok végére", + "addSelectionToNextFindMatch": "Kijelölés hozzáadása a következÅ‘ keresési találathoz", + "addSelectionToPreviousFindMatch": "Kijelölés hozzáadása az elÅ‘zÅ‘ keresési találathoz", + "moveSelectionToNextFindMatch": "Utolsó kijelölés áthelyezése a következÅ‘ keresési találatra", + "moveSelectionToPreviousFindMatch": "Utolsó kijelölés áthelyezése az elÅ‘zÅ‘ keresési találatra", + "selectAllOccurrencesOfFindMatch": "Az összes keresési találat kijelölése", + "changeAll.label": "Minden elÅ‘fordulás módosítása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json b/i18n/hun/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json new file mode 100644 index 00000000000..973e6d7ae91 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Paraméterinformációk megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json new file mode 100644 index 00000000000..f05a169d614 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, információ" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/hun/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json new file mode 100644 index 00000000000..1fef02c03eb --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Javítások megjelenítése ({0})", + "quickFix": "Javítások megjelenítése", + "quickfix.trigger.label": "Gyorsjavítás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json new file mode 100644 index 00000000000..a40829f1ae6 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Bezárás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json new file mode 100644 index 00000000000..bc4f4f5abd6 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": " – {0} referencia", + "references.action.label": "Minden hivatkozás megkeresése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json new file mode 100644 index 00000000000..b93a507d5d9 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Betöltés..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json new file mode 100644 index 00000000000..4ab9002859c --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "szimbólum a következÅ‘ helyen: {0}, sor: {1}, oszlop: {2}", + "aria.fileReferences.1": "Egy szimbólum a következÅ‘ helyen: {0}, teljes elérési út: {1}", + "aria.fileReferences.N": "{0} szimbólum a következÅ‘ helyen: {1}, teljes elérési út: {2}", + "aria.result.0": "Nincs találat", + "aria.result.1": "Egy szimbólum a következÅ‘ helyen: {0}", + "aria.result.n1": "{0} szimbólum a következÅ‘ helyen: {1}", + "aria.result.nm": "{0} szimbólum {1} fájlban" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json new file mode 100644 index 00000000000..2701fadac42 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Nem sikerült feloldani a fájlt.", + "referencesCount": "{0} referencia", + "referenceCount": "{0} referencia", + "missingPreviewMessage": "elÅ‘nézet nem érhetÅ‘ el", + "treeAriaLabel": "Referenciák", + "noResults": "Nincs eredmény", + "peekView.alternateTitle": "Referenciák", + "peekViewTitleBackground": "A betekintÅ‘ablak címsorának háttérszíne.", + "peekViewTitleForeground": "A betekintÅ‘ablak címének színe.", + "peekViewTitleInfoForeground": "A betekintÅ‘ablak címsorában található információ színe.", + "peekViewBorder": "A betekintÅ‘ablak keretének és nyilainak színe.", + "peekViewResultsBackground": "A betekintÅ‘ablak eredménylistájának háttérszíne.", + "peekViewResultsMatchForeground": "A betekintÅ‘ablak eredménylistájában található sorhivatkozások elÅ‘térszíne.", + "peekViewResultsFileForeground": "A betekintÅ‘ablak eredménylistájában található fájlhivatkozások elÅ‘térszíne.", + "peekViewResultsSelectionBackground": "A betekintÅ‘ablak eredménylistájában kiválaszott elem háttérszíne.", + "peekViewResultsSelectionForeground": "A betekintÅ‘ablak eredménylistájában kiválaszott elem elÅ‘térszíne.", + "peekViewEditorBackground": "A betekintÅ‘ablak szerkesztÅ‘ablakának háttérszíne.", + "peekViewEditorGutterBackground": "A betekintÅ‘ablak szerkesztÅ‘ablakában található margó háttérszíne.", + "peekViewResultsMatchHighlight": "Kiemelt keresési eredmények színe a betekintÅ‘ablak eredménylistájában.", + "peekViewEditorMatchHighlight": "Kiemelt keresési eredmények színe a betekintÅ‘ablak szerkesztÅ‘ablakában." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/rename/rename.i18n.json b/i18n/hun/src/vs/editor/contrib/rename/rename.i18n.json new file mode 100644 index 00000000000..c6eac10add6 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/rename/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Nincs eredmény.", + "aria": "'{0}' sikeresen át lett nevezve a következÅ‘re: '{1}'. Összefoglaló: {2}", + "rename.failed": "Az átnevezést nem sikerült végrehajtani.", + "rename.label": "Szimbólum átnevezése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/rename/renameInputField.i18n.json b/i18n/hun/src/vs/editor/contrib/rename/renameInputField.i18n.json new file mode 100644 index 00000000000..cd26c078ae0 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/rename/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Ãtnevezésre szolgáló beviteli mezÅ‘. Adja meg az új nevet, majd nyomja meg az Enter gombot a változtatások elvégzéséhez." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json b/i18n/hun/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json new file mode 100644 index 00000000000..463be33cb03 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Kijelölés bÅ‘vítése", + "smartSelect.shrink": "Kijelölés szűkítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/suggest/suggestController.i18n.json b/i18n/hun/src/vs/editor/contrib/suggest/suggestController.i18n.json new file mode 100644 index 00000000000..d7050253ff1 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/suggest/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "A(z) '{0}' elfogadása a következÅ‘ szöveg beszúrását eredményezte: {1}", + "suggest.trigger.label": "Javaslatok megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/suggest/suggestWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/suggest/suggestWidget.i18n.json new file mode 100644 index 00000000000..1ea907a2db0 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/suggest/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "A javaslatokat tartalmazó modul háttérszíne.", + "editorSuggestWidgetBorder": "A javaslatokat tartalmazó modul keretszíne.", + "editorSuggestWidgetForeground": "A javaslatokat tartalmazó modul elÅ‘térszíne.", + "editorSuggestWidgetSelectedBackground": "A javaslatokat tartalmazó modulban kiválasztott elem háttérszíne.", + "editorSuggestWidgetHighlightForeground": "Az illeszkedÅ‘ szövegrészletek kiemelése a javaslatok modulban.", + "readMore": "További információk megjelenítése...{0}", + "suggestionWithDetailsAriaLabel": "{0}, javaslat, részletekkel", + "suggestionAriaLabel": "{0}, javaslat", + "readLess": "Kevesebb információ megjelenítése...{0}", + "suggestWidget.loading": "Betöltés...", + "suggestWidget.noSuggestions": "Nincsenek javaslatok.", + "suggestionAriaAccepted": "{0}, elfogadva", + "ariaCurrentSuggestionWithDetails": "{0}, javaslat, részletekkel", + "ariaCurrentSuggestion": "{0}, javaslat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json b/i18n/hun/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json new file mode 100644 index 00000000000..dc4360652cb --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Tab billentyűvel mozgatott fókusz ki- és bekapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json b/i18n/hun/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json new file mode 100644 index 00000000000..fa7c3359075 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Szimbólumok háttérszíne olvasási hozzáférés, páldául változó olvasása esetén.", + "wordHighlightStrong": "Szimbólumok háttérszíne írási hozzáférés, páldául változó írása esetén.", + "overviewRulerWordHighlightForeground": "A kiemelt szimbólumokat jelölÅ‘ jelzések színe az áttekintÅ‘sávon.", + "overviewRulerWordHighlightStrongForeground": "A kiemelt, írási hozzáférésű szimbólumokat jelölÅ‘ jelzések színe az áttekintÅ‘sávon.", + "wordHighlight.next.label": "Ugrás a következÅ‘ kiemelt szimbólumhoz", + "wordHighlight.previous.label": "Ugrás az elÅ‘zÅ‘ kiemelt szimbólumhoz" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/environment/node/argv.i18n.json b/i18n/hun/src/vs/platform/environment/node/argv.i18n.json index bce6090ca24..0346bdf3589 100644 --- a/i18n/hun/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/hun/src/vs/platform/environment/node/argv.i18n.json @@ -12,8 +12,11 @@ "newWindow": "Mindenképp induljon új példány a Code-ból.", "performance": "Indítás a 'Developer: Startup Performance' parancs engedélyezésével.", "prof-startup": "Processzorhasználat profilozása induláskor", + "inspect-extensions": "Hibakeresés és profilozás engedélyezése a kiegészítÅ‘kben. EllenÅ‘rizze a fejlesztÅ‘i eszközöket a csatlakozási URI-hoz.", + "inspect-brk-extensions": "Hibakeresés és profilozás engedélyezése a kiegészítÅ‘kben, úgy, hogy a kiegészítÅ‘ gazdafolyamata szüneteltetve lesz az indítás után. EllenÅ‘rizze a fejlesztÅ‘i eszközöket a csatlakozási URI-hoz. ", "reuseWindow": "Fájl vagy mappa megnyitása a legutoljára aktív ablakban.", "userDataDir": "Meghatározza a könyvtárat, ahol a felhasználói adatok vannak tárolva. Hasznás, ha rootként van futtatva.", + "log": "A naplózott események szintje. Lehetséges értékek: 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'.", "verbose": "Részletes kimenet kiírása (magába foglalja a --wait kapcsolót)", "wait": "Várjon a fájlok bezárására a visszatérés elÅ‘tt.", "extensionHomePath": "A kiegészítÅ‘k gyökérkönyvtárának beállítása.", @@ -24,6 +27,7 @@ "experimentalApis": "Tervezett API-funkciók engedélyezése egy kiegészítÅ‘ számára.", "disableExtensions": "Összes telepített kiegészítÅ‘ letiltása.", "disableGPU": "Hardveres gyorsítás letiltása.", + "status": "Folyamatok erÅ‘forrás-használati és diagnosztikai adatinak kiíratása.", "version": "Verzió kiírása.", "help": "Használati útmutató kiírása.", "usage": "Használat", diff --git a/i18n/hun/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/hun/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index 62fa385ee04..7ae85dde971 100644 --- a/i18n/hun/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/hun/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "notFound": "KiegészítÅ‘ nem található", - "noCompatible": "A(z) {0} kiegészítÅ‘nek nincs ezzel a Code-verzióval kompatibilis változata." + "notCompatibleDownload": "A letöltés nem sikerült, mert a kiegészítÅ‘ VS Code '{0}' verziójával kompatibilis változata nem található. " } \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index 339d7b60e78..8788d40a469 100644 --- a/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,11 +6,16 @@ { "invalidManifest": "A kiegészítÅ‘ érvénytelen: a package.json nem egy JSON-fájl.", "restartCodeLocal": "Indítsa újra a Code-ot a(z) {0} újratelepítése elÅ‘tt.", - "restartCodeGallery": "Indítsa újra a Code-ot az újratelepítés elÅ‘tt!", + "installingOutdatedExtension": "A kiegészítÅ‘ egy újabb verziója már telepítve van. Szeretné felülírni a régebbi verzióval?", + "override": "Felülírás", + "cancel": "Mégse", + "notFoundCompatible": "A telepítés nem sikerült, mert a(z) '{0}' kiegészítÅ‘ VS Code '{1}' verziójával kompatibilis változata nem található.", + "quitCode": "A telepítés nem sikerült, mert a kiegészítÅ‘ elavult példánya még mindig fut. Lépjen ki a VS Code-ból, és indítsa újra az újratelepítés elÅ‘tt.", + "exitCode": "A telepítés nem sikerült, mert a kiegészítÅ‘ elavult példánya még mindig fut. Lépjen ki a VS Code-ból, és indítsa újra az újratelepítés elÅ‘tt.", + "notFoundCompatibleDependency": "A telepítés nem sikerült, mert a(z) '{0}' kiegészítÅ‘ függÅ‘ség VS Code '{1}' verziójával kompatibilis változata nem található. ", "uninstallDependeciesConfirmation": "Csak a(z) '{0}' kiegészítÅ‘t szeretné eltávolítani vagy annak függÅ‘ségeit is?", "uninstallOnly": "Csak ezt", "uninstallAll": "Mindent", - "cancel": "Mégse", "uninstallConfirmation": "Biztosan szeretné eltávolítani a(z) '{0}' kiegészítÅ‘t?", "ok": "OK", "singleDependentError": "Nem sikerült eltávolítani a(z) '{0}' kiegészítÅ‘t: a(z) '{1}' kiegészítÅ‘ függ tÅ‘le.", diff --git a/i18n/hun/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/hun/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 5b5fef0ea32..a060a2640bb 100644 --- a/i18n/hun/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/hun/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -17,6 +17,8 @@ "vscode.extension.activationEvents.onLanguage": "Aktiváló esemény, ami akkor fut le, ha az adott nyelvhez társított fájl kerül megnyitásra.", "vscode.extension.activationEvents.onCommand": "Aktiváló esemény, ami akkor fut le, amikor a megadott parancsot meghívják.", "vscode.extension.activationEvents.onDebug": "Aktiváló esemény, ami akkor fut le, ha a felhasználó hibakeresést indít el vagy beállítani készül a hibakeresési konfigurációt.", + "vscode.extension.activationEvents.onDebugInitialConfigurations": "Aktivációs esemény, ami minden esetben kiváltódik, ha \"launch.json\"-t kell létrehozni (és az összes provideDebugConfigurations metódusokat meg kell hívni).", + "vscode.extension.activationEvents.onDebugResolve": "Aktiváló esemény, ami akkor fut, ha a megadott típusú hibakeresési munkamenetnek el kell indulnia (és a megfelelÅ‘ resolveDebugConfiguration metódusokat meg kell hívni).", "vscode.extension.activationEvents.workspaceContains": "Aktiváló esemény, ami akkor fut le, ha egy olyan mappa kerül megnyitásra, amiben legalább egy olyan fájl van, amely illeszkedik a megadott globális mintára.", "vscode.extension.activationEvents.onView": "Aktiváló esemény, ami akkor fut le, amikor a megadott nézetet kiterjesztik.", "vscode.extension.activationEvents.star": "Aktiváló esemény, ami a VS Code indításakor fut le. A jó felhasználói élmény érdekében csak akkor használja ezt az eseményt, ha más aktiváló események nem alkalmasak az adott kiegészítÅ‘ esetében.", diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json new file mode 100644 index 00000000000..62b0055aa42 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleTabs": "Fül láthatóságának ki- és bekapcsolása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json index 215e7d12e87..dfc290b2f8b 100644 --- a/i18n/hun/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json +++ b/i18n/hun/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "largeNumberBadge": "10k+", "badgeTitle": "{0} – {1}", "additionalViews": "További nézetek", "numberBadge": "{0} ({1})", diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 505c556c227..c82ab6ff2a2 100644 --- a/i18n/hun/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -33,6 +33,7 @@ "openPreviousEditor": "ElÅ‘zÅ‘ szerkesztÅ‘ablak megnyitása", "nextEditorInGroup": "A csoport következÅ‘ szerkesztÅ‘ablakának megnyitása", "openPreviousEditorInGroup": "A csoport elÅ‘zÅ‘ szerkesztÅ‘ablakának megnyitása", + "lastEditorInGroup": "Csoport utolsó szerkesztÅ‘ablakának megnyitása", "navigateNext": "Ugrás elÅ‘re", "navigatePrevious": "Ugrás vissza", "navigateLast": "Ugrás az utolsóra", diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index 6e6ffe92dbd..b15ee093f22 100644 --- a/i18n/hun/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,7 +6,7 @@ { "editorCommand.activeEditorMove.description": "Aktív szerkesztÅ‘ablak mozgatása fülek vagy csoportok között", "editorCommand.activeEditorMove.arg.name": "Aktív szerkesztÅ‘ablak mozgatási argumentum", - "editorCommand.activeEditorMove.arg.description": "Argumentumtulajdonságok:\n\t\t\t\t\t\t* 'to': karakterlánc, a mozgatás célpontja.\n\t\t\t\t\t\t* 'by': karakterlánc, a mozgatás egysége. Fülek (tab) vagy csoportok (group) alapján.\n\t\t\t\t\t\t* 'value': szám, ami meghatározza, hogy hány pozíciót kell mozgatni, vagy egy abszolút pozíciót, ahová mozgatni kell.\n\t\t\t\t\t", + "editorCommand.activeEditorMove.arg.description": "Argumentumtulajdonságok:\n\t* 'to': karakterlánc, a mozgatás célpontja.\n\t* 'by': karakterlánc, a mozgatás egysége. Fülek (tab) vagy csoportok (group) alapján.\n\t* 'value': szám, ami meghatározza, hogy hány pozíciót kell mozgatni, vagy egy abszolút pozíciót, ahová mozgatni kell.", "commandDeprecated": "A(z) **{0}** parancs el lett távolítva. A(z) **{1}** használható helyette", "openKeybindings": "Billentyűparancsok beállítása" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 7f3902b99cf..3ae2a89812f 100644 --- a/i18n/hun/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -53,5 +53,5 @@ "screenReaderDetectedExplanation.answerYes": "Igen", "screenReaderDetectedExplanation.answerNo": "Nem", "screenReaderDetectedExplanation.body1": "A VS Code most már optimalizálva van képernyÅ‘olvasóval való használathoz.", - "screenReaderDetectedExplanation.body2": "Néhány funkció másképp működik. Például a sortörés, kódrészletek bezárása, automatikus záró zárójelek beszúrása stb." + "screenReaderDetectedExplanation.body2": "A szerkesztÅ‘ablakban néhány funkció, például a sortörés, kódrészletek bezárása stb. másképp működik." } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/quickopen.i18n.json b/i18n/hun/src/vs/workbench/browser/quickopen.i18n.json index 3f67d6f3e13..37f059a94c4 100644 --- a/i18n/hun/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/hun/src/vs/workbench/browser/quickopen.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "noResultsMatching": "Nincs eredmény", - "noResultsFound2": "Nincs találat", - "entryAriaLabel": "{0}, parancs" + "noResultsFound2": "Nincs találat" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/actions.i18n.json index b81dfc62fd3..8fa88c8859b 100644 --- a/i18n/hun/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/hun/src/vs/workbench/electron-browser/actions.i18n.json @@ -30,7 +30,7 @@ "openRecent": "Legutóbbi megnyitása...", "quickOpenRecent": "Legutóbbi gyors megnyitása...", "closeMessages": "Értesítések törlése", - "reportIssues": "Problémák jelentése", + "reportIssueInEnglish": "Probléma jelentése", "reportPerformanceIssue": "Teljesítményproblémák jelentése", "keybindingsReference": "Billentyűparancs-referencia", "openDocumentationUrl": "Dokumentáció", @@ -47,5 +47,26 @@ "showNextWindowTab": "KövetkezÅ‘ ablakfül megjelenítése", "moveWindowTabToNewWindow": "Ablakfül átmozgatása új ablakba", "mergeAllWindowTabs": "Összes ablak összeolvasztása", - "toggleWindowTabsBar": "Ablakfülsáv be- és kikapcsolása" + "toggleWindowTabsBar": "Ablakfülsáv be- és kikapcsolása", + "configureLocale": "Nyelv beállítása", + "displayLanguage": "Meghatározza a VSCode felületének nyelvét.", + "doc": "Az elérhetÅ‘ nyelvek listája a következÅ‘ címen tekinthetÅ‘ meg: {0}", + "restart": "Az érték módosítása után újra kell indítani a VSCode-ot.", + "fail.createSettings": "Nem sikerült a(z) '{0}' létrehozás ({1}).", + "openLogsFolder": "Naplómappa megnyitása", + "showLogs": "Naplók megjelenítése...", + "mainProcess": "FÅ‘", + "sharedProcess": "Megosztott", + "rendererProcess": "MegjelenítÅ‘", + "extensionHost": "KiegészítÅ‘ gazdafolyamata", + "selectProcess": "Válasszon folyamatot!", + "setLogLevel": "Naplózási szint beállítása", + "trace": "Nyomkövetés", + "debug": "Hibakeresés", + "info": "Információ", + "warn": "Figyelmeztetés", + "err": "Hiba", + "critical": "Kritikus", + "off": "Kikapcsolva", + "selectLogLevel": "Naplózási szint beállítása" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json index 9d611969580..ffdce8089b5 100644 --- a/i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,8 +7,8 @@ "view": "Nézet", "help": "Súgó", "file": "Fájl", - "workspaces": "Munkaterületek", "developer": "FejlesztÅ‘i", + "workspaces": "Munkaterületek", "showEditorTabs": "Meghatározza, hogy a megnyitott szerkesztÅ‘ablakok telején megjelenjenek-e a fülek", "workbench.editor.labelFormat.default": "Fájl nevének megjelenítése. Ha a fülek engedélyezve vannak, és két egyezÅ‘ nevű fájl van egy csoportban, az elérési útjuk eltérÅ‘ része lesz hozzáfűzve a névhez. Ha a fülek le vannak tiltva, a fájl munkaterület könyvtárához képest relatív elérési útja jelenik meg, ha a szerkesztÅ‘ablak aktív.", "workbench.editor.labelFormat.short": "A fájl nevének megjelenítése a könyvtár nevével együtt.", @@ -16,6 +16,7 @@ "workbench.editor.labelFormat.long": "Fájl nevének megjelenítése a fájl abszolút elérési útjával együtt.", "tabDescription": "Meghatározza a szerkesztÅ‘ablakok címkéje formáját. A beállítás módosítása könnyebbé teheti a fájl helyének kiderítését:\n- short: 'parent'\n- medium: 'workspace/src/parent'\n- long: '/home/user/workspace/src/parent'\n- default: '.../parent', ha egy másik fülnek ugyanaz a címe, vagy a relatív elérési út, ha a fülek le vannak tiltva", "editorTabCloseButton": "Meghatározza a szerkesztÅ‘ablakok fülein található bezárógomb pozícióját vagy eltávolítja Å‘ket, ha a beállítás értéke 'off'.", + "tabSizing": "Meghatározza a szerkesztÅ‘ablak-fülek méretezését. Ãllítsa 'fit'-re, hogy mindig elég nagyok legyenek a szerkesztÅ‘ablak teljes címének megjelenítéséhez. Ãllítsa 'shrink'-re, hogy a fülek mérete csökkenhessen abban az esetben, ha a rendelkezésre álló hely nem elég az összes fül megjelenítéséhez.", "showIcons": "Meghatározza, hogy a megnyitott szerkesztÅ‘ablakok ikonnal együtt jelenjenek-e meg. A működéshez szükséges egy ikontéma engedélyezése is.", "enablePreview": "Meghatározza, hogy a megnyitott szerkesztÅ‘ablakok elÅ‘nézetként jelenjenek-e meg. Az elÅ‘nézetként használt szerkesztÅ‘ablakok újra vannak hasznosítva, amíg meg nem tartja Å‘ket a felhasználó (pl. dupla kattintás vagy szerkesztés esetén), és dÅ‘lt betűvel jelenik meg a címsoruk.", "enablePreviewFromQuickOpen": "Meghatározza, hogy a gyors megnyitás során megnyitott szerkesztÅ‘ablakok elÅ‘nézetként jelenjenek-e meg. Az elÅ‘nézetként használt szerkesztÅ‘ablakok újra vannak hasznosítva, amíg meg nem tartja Å‘ket a felhasználó (pl. dupla kattintás vagy szerkesztés esetén).", @@ -26,18 +27,17 @@ "closeOnFocusLost": "Meghatározza, hogy a gyors megnyitás automatikusan bezáródjon-e amint elveszíti a fókuszt.", "openDefaultSettings": "Meghatározza, hogy a beállítások megnyitásakor megnyíljon-e egy szerkesztÅ‘ az összes alapértelmezett beállítással.", "sideBarLocation": "Meghatározza az oldalsáv helyét. Az oldalsáv megjelenhet a munkaterület bal vagy jobb oldalán.", - "panelLocation": "Meghatározza a panel pozícióját. Megjelenhet a munkaterület alján vagy jobb oldalon.", "statusBarVisibility": "Meghatározza, hogy megjelenjen-e az állapotsor a munkaterület alján.", "activityBarVisibility": "Meghatározza, hogy megjelenjen-e a tevékenységsáv a munkaterületen.", "closeOnFileDelete": "Meghatározza, hogy bezáródjanak-e azok a szerkesztÅ‘ablakok, melyekben olyan fájl van megnyitva, amelyet töröl vagy átnevez egy másik folyamat. A beállítás letiltása esetén a szerkesztÅ‘ablak nyitva marad módosított állapotban ilyen esemény után. Megjegyzés: az alkalmazáson belüli törlések esetén mindig bezáródik a szerkesztÅ‘ablakok, a módosított fájlok pedig soha nem záródnak be, hogy az adatok megmaradjanak.", - "experimentalFuzzySearchEndpoint": "Meghatározza a kísérleti beállításkeresÅ‘ben használt végpontot.", - "experimentalFuzzySearchKey": "Meghatározza a kísérleti beállításkeresÅ‘ben használt kulcsot.", + "enableNaturalLanguageSettingsSearch": "Meghatározza, hogy engedélyezve van-e a természetes nyelvi keresési mód a beállításoknál.", "fontAliasing": "Meghatározza a munkaterületen megjelenÅ‘ betűtípusok élsimítási módszerét.\n- default: Szubpixeles betűsimítás. A legtöbb nem-retina típusú kijelzÅ‘n ez adja a legélesebb szöveget.\n- antialiased: A betűket pixelek, és nem szubpixelek szintjén simítja. A betűtípus vékonyabbnak tűnhet összességében.\n- none: Letiltja a betűtípusok élsimítését. A szövegek egyenetlen, éles szélekkel jelennek meg.", "workbench.fontAliasing.default": "Szubpixeles betűsimítás. A legtöbb nem-retina típusú kijelzÅ‘n ez adja a legélesebb szöveget.", "workbench.fontAliasing.antialiased": "A betűket pixelek, és nem szubpixelek szintjén simítja. A betűtípus vékonyabbnak tűnhet összességében.", "workbench.fontAliasing.none": "Letiltja a betűtípusok élsimítését. A szövegek egyenetlen, éles szélekkel jelennek meg.", "swipeToNavigate": "Navigálás a nyitott fájlok között háromujjas, vízszintes húzással.", "workbenchConfigurationTitle": "Munkaterület", + "windowConfigurationTitle": "Ablak", "window.openFilesInNewWindow.on": "A fájlok új ablakban nyílnak meg", "window.openFilesInNewWindow.off": "A fájlok abban az ablakban nyílnak meg, ahol a mappájuk meg van nyitva vagy a legutoljára aktív ablakban", "window.openFilesInNewWindow.default": "A fájlok abban az ablakban nyílnak meg, ahol a mappájuk meg van nyitva vagy a legutoljára aktív ablakban, kivéve, ha a dokkról vagy a FinderbÅ‘l lettek megnyitva (csak macOS-en)", @@ -69,11 +69,11 @@ "autoDetectHighContrast": "Ha engedélyezve van, az alkalmazás automatikusan átvált a nagy kontrasztos témára, ha a WIndows a nagy kontrasztos témát használ, és a sötét témára, ha a Windows átvált a nagy kontrasztos témáról.", "titleBarStyle": "Módosítja az ablak címsorának megjelenését. A változtatás teljes újraindítást igényel.", "window.nativeTabs": "Engedélyezi a macOS Sierra ablakfüleket. Megjegyzés: a változtatás teljes újraindítást igényel, és a natív fülek letiltják az egyedi címsorstílust, ha azok be vannak konfigurálva.", - "windowConfigurationTitle": "Ablak", "zenModeConfigurationTitle": "Zen-mód", "zenMode.fullScreen": "Meghatározza, hogy zen-módban a munakterület teljes képernyÅ‘s módba vált-e.", "zenMode.hideTabs": "Meghatározza, hogy zen-módban el vannak-e rejtve a munkaterület fülei.", "zenMode.hideStatusBar": "Meghatározza, hogy zen-módban el van-e rejtve a munkaterület alján található állapotsor.", "zenMode.hideActivityBar": "Meghatározza, hogy zen-módban el van-e rejtve a munkaterület bal oldalán található tevékenységsáv.", - "zenMode.restore": "Meghatározza, hogy az ablak zen-módban induljon-e, ha kilépéskor zen-módban volt." + "zenMode.restore": "Meghatározza, hogy az ablak zen-módban induljon-e, ha kilépéskor zen-módban volt.", + "JsonSchema.locale": "A felhasználói felületen használt nyelv." } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index e98acd71fa1..f57bf540331 100644 --- a/i18n/hun/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -30,7 +30,6 @@ "deactivateBreakpoints": "Töréspontok deaktiválása", "reapplyAllBreakpoints": "Töréspontok felvétele ismét", "addFunctionBreakpoint": "Függvénytöréspont hozzáadása", - "renameFunctionBreakpoint": "Függvénytöréspont átnevezése", "addConditionalBreakpoint": "Feltételes töréspont hozzáadása...", "editConditionalBreakpoint": "Töréspont szerkesztése...", "setValue": "Érték beállítása", diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json new file mode 100644 index 00000000000..de0485a7202 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editConditionalBreakpoint": "Töréspont szerkesztése...", + "functionBreakpointsNotSupported": "Ez a hibakeresÅ‘ nem támogatja a függvénytöréspontokat", + "functionBreakpointPlaceholder": "A függvény, amin meg kell állni", + "functionBreakPointInputAriaLabel": "Adja meg a függvénytöréspontot" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json new file mode 100644 index 00000000000..2e3c27c4d1b --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "callstackSection": "Hívási verem szakasz", + "debugStopped": "Szüneteltetve a következÅ‘ helyen: {0}", + "callStackAriaLabel": "Hibakeresési hívási verem", + "process": "Folyamat", + "paused": "Szüneteltetve", + "running": "Fut", + "thread": "Szál", + "pausedOn": "Szüneteltetve a következÅ‘ helyen: {0}", + "loadMoreStackFrames": "További veremkeretek betöltése", + "threadAriaLabel": "Szál: {0}, hívási verem, hibakeresés", + "stackFrameAriaLabel": "{0} veremkeret, {0}. sor {1} {2}, hívási verem, hibakeresés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index 564ebdd017f..b95dd7c02f7 100644 --- a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,5 +20,10 @@ "openExplorerOnEnd": "Hibakeresési munkamenet végén automatikusan nyíljon meg a fájlkezelÅ‘ nézet", "inlineValues": "Változók értékének megjelenítése a sorok között hibakeresés közben", "hideActionBar": "Meghatározza, hogy megjelenjen-e a lebegÅ‘ hibakeresési műveletsáv", + "never": "Soha ne jelenjen meg a hibakeresés az állapotsoron", + "always": "Mindig jelenjen meg a hibakeresés az állapotsoron", + "onFirstSessionStart": "A hibakeresés csak akkor jelenjen meg az állapotsoron, miután elÅ‘ször el lett indítva a hibakeresés", + "showInStatusBar": "Meghatározza, hogy megjelenjen-e a hibakeresési állapotsáv", + "openDebug": "Meghatározza, hogy megnyíljon-e a hibakeresési panel a hibakeresési munkamenet indulásakor.", "launch": "Globális hibakeresés indítási konfiguráció. Használható a 'launch.json' alternatívájaként, ami meg van osztva több munkaterület között" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index e3d15de5db5..99cb4104dec 100644 --- a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,7 @@ "breakpointAdded": "Töréspont hozzáadva, {0}. sor, fájl: {1}", "breakpointRemoved": "Töréspont eltávoíltva, {0}. sor, fájl: {1}", "compoundMustHaveConfigurations": "A kombinációk \"configurations\" tulajdonságát be kell állítani több konfiguráció elindításához.", - "configMissing": "A(z) '{0}' konfiguráció hiányzik a 'launch.json'-ból.", + "launchJsonDoesNotExist": "A 'launch.json' nem létezik.", "debugRequestNotSupported": "A(z) `{0}` attribútumnak nem támogatott értéke van ('{1}') a kiválasztott hibakeresési konfigurációban.", "debugRequesMissing": "A(z) '{0}' attribútum hiányzik a kiválasztott hibakeresési konfigurációból.", "debugTypeNotSupported": "A megadott hibakeresési típus ('{0}') nem támogatott.", diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json new file mode 100644 index 00000000000..e152cc64aa8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Változók szakasz", + "variablesAriaTreeLabel": "Hibakeresési változók", + "variableValueAriaLabel": "Adja meg a változó új nevét", + "variableScopeAriaLabel": "{0} hatókör, változók, hibakeresés", + "variableAriaLabel": "{0} értéke {1}, változók, hibakeresés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json new file mode 100644 index 00000000000..8d7086c2802 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expressionsSection": "Kifejezések szaszasz", + "watchAriaTreeLabel": "Hibakeresési figyelÅ‘kifejezések", + "watchExpressionPlaceholder": "FigyelendÅ‘ kifejezés", + "watchExpressionInputAriaLabel": "Adja meg a figyelendÅ‘ kifejezést", + "watchExpressionAriaLabel": "{0} értéke {1}, figyelt, hibakeresés", + "watchVariableAriaLabel": "{0} értéke {1}, figyelt, hibakeresés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 806ae8197d4..767a32daee0 100644 --- a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,9 +6,11 @@ { "name": "KiegészítÅ‘ neve", "extension id": "KiegészítÅ‘ azonosítója", + "preview": "BetekintÅ‘", "publisher": "Kiadó neve", "install count": "Telepítések száma", "rating": "Értékelés", + "repository": "Forráskódtár", "license": "Licenc", "details": "Részletek", "contributions": "Szolgáltatások", diff --git a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 831e0dd3d1d..09888fd024a 100644 --- a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -10,16 +10,12 @@ "Uninstalling": "Eltávolítás...", "updateAction": "Frissítés", "updateTo": "Frissítés ({0})", - "enableForWorkspaceAction.label": "Engedélyezés a munkaterületen", - "enableAlwaysAction.label": "Engedélyezés mindig", - "disableForWorkspaceAction.label": "Letiltás a munkaterületen", - "disableAlwaysAction.label": "Letiltás mindig", "ManageExtensionAction.uninstallingTooltip": "Eltávolítás", - "enableForWorkspaceAction": "Munkaterület", - "enableGloballyAction": "Mindig", + "enableForWorkspaceAction": "Engedélyezés a munkaterületen", + "enableGloballyAction": "Engedélyezés", "enableAction": "Engedélyezés", - "disableForWorkspaceAction": "Munkaterület", - "disableGloballyAction": "Mindig", + "disableForWorkspaceAction": "Letiltás a munkaterületen", + "disableGloballyAction": "Letiltás", "disableAction": "Letiltás", "checkForUpdates": "Frissítések keresése", "enableAutoUpdate": "KiegészítÅ‘k automatikus frissítésének engedélyezése", @@ -47,11 +43,8 @@ "allExtensionsInstalled": "Már az összes, munkaterülethez ajánlott kiegészítÅ‘ telepítve van", "installRecommendedExtension": "Ajánlott kiegészítÅ‘ telepítése", "extensionInstalled": "Ez az ajánlott kiegészítÅ‘ már telepítve van.", - "showRecommendedKeymapExtensions": "Ajánlott billentyűkonfigurációk megjelenítése", "showRecommendedKeymapExtensionsShort": "Billentyűkonfigurációk", - "showLanguageExtensions": "Nyelvi kiegészítÅ‘k megjelenítése", "showLanguageExtensionsShort": "Nyelvi kiegészítÅ‘k", - "showAzureExtensions": "Azure-kiegészítÅ‘k megjelenítése", "showAzureExtensionsShort": "Azure-kiegészítÅ‘k", "OpenExtensionsFile.failed": "Nem sikerült létrehozni az 'extensions.json' fájlt a '.vscode' mappánan ({0}).", "configureWorkspaceRecommendedExtensions": "Ajánlott kiegészítÅ‘k konfigurálása (munkaterületre vonatkozóan)", diff --git a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 45b78dc0d37..a03a32613a6 100644 --- a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -7,8 +7,8 @@ "fileBasedRecommendation": "Ez a kiegészítÅ‘ a közelmúltban megnyitott fájlok alapján ajánlott.", "workspaceRecommendation": "Ez a kiegészítÅ‘ az aktuális munkaterület felhasználói által ajánlott.", "exeBasedRecommendation": "Ez a kiegészítÅ‘ azért ajánlott, mert a következÅ‘ telepítve van: {0}.", - "reallyRecommended2": "Ehhez a fájltípushoz ajánlott a(z) '{0}' kiegészítÅ‘.", - "reallyRecommendedExtensionPack": "Ehhez a fájltípushoz ajánlott a(z) '{0}' kiegészítÅ‘csomag.", + "reallyRecommended2": "Ehhez a fájltípushoz a(z) '{0}' kiegészítÅ‘ ajánlott.", + "reallyRecommendedExtensionPack": "Ehhez a fájltípushoz a(z) '{0}' kiegészítÅ‘csomag ajánlott.", "showRecommendations": "Ajánlatok megjelenítése", "install": "Telepítés", "neverShowAgain": "Ne jelenítse meg újra", diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 61b346af2ed..661261d0b48 100644 --- a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -9,7 +9,7 @@ "extension": "KiegészítÅ‘", "extensions": "KiegészítÅ‘k", "view": "Nézet", + "developer": "FejlesztÅ‘i", "extensionsConfigurationTitle": "KiegészítÅ‘k", - "extensionsAutoUpdate": "KiegészítÅ‘k automatikus frissítése", - "extensionsIgnoreRecommendations": "Ajánlott kiegészítÅ‘k figyelmen kívül hagyása" + "extensionsAutoUpdate": "KiegészítÅ‘k automatikus frissítése" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json new file mode 100644 index 00000000000..89b9332aaf7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reportExtensionIssue": "Probléma jelentése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json b/i18n/hun/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json new file mode 100644 index 00000000000..f5098b1e4b7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "folders": "Mappák" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json new file mode 100644 index 00000000000..d032a29e684 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Fájl", + "revealInSideBar": "Megjelenítés az oldalsávon", + "acceptLocalChanges": "A lemezen lévÅ‘ tartalom felülírása a saját módosításokkal", + "revertLocalChanges": "Saját módosítások elvetése és a lemezen lévÅ‘ tartalom visszaállítása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/hun/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json new file mode 100644 index 00000000000..559fe056a7d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Újrapróbálkozás", + "rename": "Ãtnevezés", + "newFile": "Új fájl", + "newFolder": "Új mappa", + "openFolderFirst": "Mappák vagy fájlok létrehozásához elÅ‘ször nyisson meg egy mappát!", + "newUntitledFile": "Új, névtelen fájl", + "createNewFile": "Új fájl", + "createNewFolder": "Új mappa", + "deleteButtonLabelRecycleBin": "Ãthelyezés a lo&&mtárba", + "deleteButtonLabelTrash": "Ãthelyezés a &&kukába", + "deleteButtonLabel": "&&Törlés", + "dirtyMessageFolderOneDelete": "Törölni készül egy olyan mappát, melyben egy nem mentett változtatásokat tartalmazó fájl van. Folytatja?", + "dirtyMessageFolderDelete": "Törölni készül egy olyan mappát, melyben {0} nem mentett változtatásokat tartalmazó fájl van. Folytatja?", + "dirtyMessageFileDelete": "Törölni készül egy olyan fájlt, amely nem mentett változtatásokat tartalmaz. Folytatja?", + "dirtyWarning": "A módosítások elvesznek, ha nem menti Å‘ket.", + "confirmMoveTrashMessageFolder": "Törli a(z) '{0}' nevű mappát és a teljes tartalmát?", + "confirmMoveTrashMessageFile": "Törli a(z) '{0}' nevű fájlt?", + "undoBin": "Helyreállíthatja a lomtárból.", + "undoTrash": "Helyreállíthatja a kukából.", + "doNotAskAgain": "Ne kérdezze meg újra", + "confirmDeleteMessageFolder": "Törli a(z) {0} mappát és a teljes tartalmát?", + "confirmDeleteMessageFile": "Véglegesen törli a következÅ‘t: {0}?", + "irreversible": "A művelet nem vonható vissza!", + "permDelete": "Végleges törlés", + "delete": "Törlés", + "importFiles": "Fájlok importálása", + "confirmOverwrite": "A célmappában már van ilyen nevű mappa vagy fájl. Le szeretné cserélni?", + "replaceButtonLabel": "&&Csere", + "copyFile": "Másolás", + "pasteFile": "Beillesztés", + "duplicateFile": "Duplikálás", + "openToSide": "Megnyitás oldalt", + "compareSource": "Kijelölés összehasonlításhoz", + "globalCompareFile": "Aktív fájl összehasonlítása...", + "openFileToCompare": "Fájlok összehasonlításához elÅ‘sször nyisson meg egy fájlt.", + "compareWith": "'{0}' összehasonlítása a következÅ‘vel: '{1}'", + "compareFiles": "Fájlok összehasonlítása", + "refresh": "Frissítés", + "save": "Mentés", + "saveAs": "Mentés másként...", + "saveAll": "Összes mentése", + "saveAllInGroup": "Összes mentése a csoportban", + "saveFiles": "Összes fájl mentése", + "revert": "Fájl visszaállítása", + "focusOpenEditors": "Váltás a megnyitott szerkesztÅ‘ablakok nézetre", + "focusFilesExplorer": "Váltás a fájlkezelÅ‘re", + "showInExplorer": "Aktív fájl megjelenítése az oldalsávon", + "openFileToShow": "Fájl fájlkezelÅ‘ben történÅ‘ megjelenítéséhez elÅ‘ször nyisson meg egy fájlt", + "collapseExplorerFolders": "Mappák összecsukása a fájlkezelÅ‘ben", + "refreshExplorer": "FájlkezelÅ‘ frissítése", + "openFileInNewWindow": "Aktív fájl megnyitása új ablakban", + "openFileToShowInNewWindow": "Fájl új ablakban történÅ‘ megnyitásához elÅ‘ször nyisson meg egy fájlt", + "revealInWindows": "Megjelenítés a fájlkezelÅ‘ben", + "revealInMac": "Megjelenítés a Finderben", + "openContainer": "Tartalmazó mappa megnyitása", + "revealActiveFileInWindows": "Aktív fájl megjelenítése a Windows IntézÅ‘ben", + "revealActiveFileInMac": "Aktív fájl megjelenítése a Finderben", + "openActiveFileContainer": "Aktív fájlt tartalmazó mappa megnyitása", + "copyPath": "Elérési út másolása", + "copyPathOfActive": "Aktív fájl elérési útjának másolása", + "emptyFileNameError": "Meg kell adni egy fájl vagy mappa nevét.", + "fileNameExistsError": "Már létezik **{0}** nevű fájl vagy mappa ezen a helyszínen. Adjon meg egy másik nevet!", + "invalidFileNameError": "A(z) **{0}** név nem érvényes fájl- vagy mappanév. Adjon meg egy másik nevet!", + "filePathTooLongError": "A(z) **{0}** név egy olyan elérési utat eredményez, ami túl hosszú. Adjon meg egy másik nevet!", + "compareWithSaved": "Aktív fájl összehasonlítása a mentett változattal", + "modifiedLabel": "{0} (a lemezen) ↔ {1}", + "compareWithClipboard": "Aktív fájl összehasonlítása a vágólap tartalmával", + "clipboardComparisonLabel": "Vágólap ↔ {0}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/hun/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json new file mode 100644 index 00000000000..dd9057b1fa4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Fájlok elérési útjának másolásához elÅ‘sször nyisson meg egy fájlt", + "openFileToReveal": "Fájlok felfedéséhez elÅ‘sször nyisson meg egy fájlt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json new file mode 100644 index 00000000000..22341f239a2 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "FájlkezelÅ‘ megjelenítése", + "explore": "FájlkezelÅ‘", + "view": "Nézet", + "textFileEditor": "SzövegfájlszerkesztÅ‘", + "binaryFileEditor": "Bináris fájlszerkesztÅ‘", + "filesConfigurationTitle": "Fájlok", + "exclude": "Globális minták konfigurálása fájlok és mappák kizárásához. A fájlkezelÅ‘ például ezen beállítás alapján dönti el, hogy mely fájlokat és mappákat jelenítsen meg vagy rejtsen el.", + "files.exclude.boolean": "A globális minta, amire illesztve lesznek a fájlok elérési útjai. A minta engedélyezéséhez vagy letiltásához állítsa igaz vagy hamis értékre.", + "files.exclude.when": "További ellenÅ‘rzés elvégzése az illeszkedÅ‘ fájlok testvérein. Az illeszkedÅ‘ fájl nevéhez használja a $(basename) változót!", + "associations": "Rendeljen nyelveket a fájlokhoz (pl: \"*.kiterjesztés\": \"html\"). Ezek a hozzárendelések elsÅ‘bbséget élveznek a telepített nyelvek által definiált alapértelmezett beállításokkal szemben.", + "encoding": "A fájlok írásánál és olvasásánál használt alapértelmezett karakterkészlet. A beállítás nyelvenként is konfigurálható.", + "autoGuessEncoding": "Ha engedélyezve van, fájlok megnyitásakor megpróbálja kitalálni a karakterkészletüket. A beállítás nyelvenként is konfigurálható.", + "eol": "Az alapértelmezett sorvégjel. LF-hez használjon \\n-t, CRLF-hez pedig \\r\\n-t.", + "trimTrailingWhitespace": "Ha engedélyezve van, a fájl mentésekor levágja a sor végén található szóközöket.", + "insertFinalNewline": "Ha engedélyezve van, mentéskor beszúr egy záró újsort a fájl végére.", + "trimFinalNewlines": "Ha engedélyezve van, mentéskor levágja a fájl végérÅ‘ az összes újsort az utolsó újsor után.", + "files.autoSave.off": "A módosított fájlok soha nincsenek automatikusan mentve.", + "files.autoSave.afterDelay": "A módosított fájlok automatikusan mentésre kerülnek a 'files.autoSaveDelay' beállításban meghatározott idÅ‘közönként.", + "files.autoSave.onFocusChange": "A módosított fájlok automatikusan mentésre kerülnek, ha a szerkesztÅ‘ablak elveszíti a fókuszt.", + "files.autoSave.onWindowChange": "A módosított fájlok automatikusan mentésre kerülnek, ha az ablak elveszíti a fókuszt.", + "autoSave": "Meghatározza a módosított fájlok automatikus mentési stratégiáját. Elfogadott értékek: '{0}', '{1}', '{2}' (a szerkesztÅ‘ablak elveszíti a fókuszt), '{3}' (az ablak elveszíti a fókuszt). Ha az értéke '{4}', megadható a késleltetés a 'files.autoSaveDelay' beállításban.", + "autoSaveDelay": "Meghatározza ezredmásodpercben a késleltetést, ami után a módosított fájlok automatikusan mentésre kerülnek. Csak akkor van hatása, ha a 'files.autoSave' beállítás értéke '{0}'.", + "watcherExclude": "Globális minta, ami meghatározza azoknak a fájloknak a listáját, amelyek ki vannak szűrve a figyelésbÅ‘l. A mintáknak abszolút elérési utakra kell illeszkedniük (azaz elÅ‘tagként adja hozzá a **-t vagy a teljes elérési utat a megfelelÅ‘ illeszkedéshez). A beállítás módosítása újraindítást igényel. Ha úgy észleli, hogy a Code túl sok processzort használ indításnál, ki tudja szűrni a nagy mappákat a kezdeti terhelés csökkentés érdekében.", + "hotExit.off": "Gyors kilépés letiltása.", + "hotExit.onExit": "Gyors kilépésrÅ‘l akkor van szó, ha az utolsó ablakot bezárják Windowson és Linuxon, vagy ha a workbench.action.quit parancs van futtatva (a parancskatalógusból, billentyűkombinációval vagy a menübÅ‘l). Az összes biztonsági mentéssel rendelkezÅ‘ ablak helyre lesz állítva a következÅ‘ indítás során.", + "hotExit.onExitAndWindowClose": "Gyors kilépésrÅ‘l akkor van szó, ha az utolsó ablakot bezárják Windowson és Linuxon, ha a workbench.action.quit parancs van futtatva (a parancskatalógusból, billentyűkombinációval vagy a menübÅ‘l), vagy bármely ablak, amelyben mappa van megnyitva, függetlenül attól, hogy az az utolsó ablak-e. Az összes megnyitott, mappa nélküli ablak helyre lesz állítva a következÅ‘ indítás során. A megnyitott mappát tartalmazó ablakok helyreállításához állítsa a \"window.restoreWindows\" értékét \"all\"-ra.", + "hotExit": "Meghatározza, hogy a nem mentett fájlokra emlékezzen-e az alkalmazás a munkamenetek között, így ki lehet hagyni a mentéssel kapcsolatos felugró ablakokat kilépésnél.", + "useExperimentalFileWatcher": "Új, kísérleti fájlfigyelÅ‘ használata.", + "defaultLanguage": "Az új fájlokhoz alapértelmezetten hozzárendelt nyelv.", + "editorConfigurationTitle": "SzerkesztÅ‘ablak", + "formatOnSave": "Fájlok formázása mentéskor. Az adott nyelvhez rendelkezésre kell állni formázónak, nem lehet beállítva automatikus mentés, és a szerkesztÅ‘ nem állhat éppen lefelé.", + "explorerConfigurationTitle": "FájlkezelÅ‘", + "openEditorsVisible": "A megnyitott szerkesztÅ‘ablakok panelen megjelenített szerkesztÅ‘ablakok száma. Ãllítsa 0-ra, ha el szeretné rejteni a panelt.", + "dynamicHeight": "Meghatározza, hogy a megnyitott szerkesztÅ‘ablakok szakasz magassága automatikusan illeszkedjen a megnyitott elemek számához vagy sem.", + "autoReveal": "Meghatározza, hogy a fájlkezelÅ‘ben automatikusan fel legyenek fedve és ki legyenek jelölve a fájlok, amikor megnyitják Å‘ket.", + "enableDragAndDrop": "Meghatározza, hogy a fájlkezelÅ‘ben áthelyezhetÅ‘k-e a fájlok és mappák húzással.", + "confirmDragAndDrop": "Meghatározza, hogy a fájlkezelÅ‘ kérjen-e megerÅ‘sítést fájlok és mappák húzással történÅ‘ áthelyezése esetén.", + "confirmDelete": "Meghatározza, hogy a fájlkezelÅ‘ kérjen-e megerÅ‘sítést a fájlok lomtárba történÅ‘ helyezése esetén.", + "sortOrder.default": "A fájlok és mappák név szerint vannak rendezve, ABC-sorrendben. A mappák a fájlok elÅ‘tt vannak listázva.", + "sortOrder.mixed": "A fájlok és mappák név szerint vannak rendezve, ABC-sorrendben. A fájlok és a mappák közösen vannak rendezve.", + "sortOrder.filesFirst": "A fájlok és mappák név szerint vannak rendezve, ABC-sorrendben. A fájlok a mappák elÅ‘tt vannak listázva.", + "sortOrder.type": "A fájlok és mappák a kiterjesztésük szerint vannak rendezve, ABC-sorrendben. A mappák a fájlok elÅ‘tt vannak listázva.", + "sortOrder.modified": "A fájlok és mappák a legutolsó módosítás dátuma szerint vannak rendezve, csökkenÅ‘ sorrendben. A mappák a fájlok elÅ‘tt vannak listázva.", + "sortOrder": "Meghatározza a fájlok és mappák rendezési módját a fájlkezelÅ‘ben. Az alapértelmezett rendezésen túl beállítható 'mixed' (a fájlok és mappák közösen vannak rendezve), 'type' (rendezés fájltípus szerint), 'modified' (rendezés utolsó módosítási dátum szerint) vagy 'filesFirst' (fájlok a mappák elé vannak rendezve) is.", + "explorer.decorations.colors": "Meghatározza, hogy a fájldekorációk használjanak-e színeket.", + "explorer.decorations.badges": "Meghatározza, hogy a fájldekorációk használjanak-e jelvényeket." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json new file mode 100644 index 00000000000..0bb33fdc628 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "userGuide": "Használja a jobbra lévÅ‘ szerkesztÅ‘i eszköztáron található műveleteket a saját módosítások **visszavonására** vagy **írja felül** a lemezen lévÅ‘ tartalmat a változtatásokkal", + "discard": "Elvetés", + "overwrite": "Felülírás", + "retry": "Újrapróbálkozás", + "readonlySaveError": "Nem sikerült menteni a(z) '{0}' fájlt: a fájl írásvédett. Válassza a 'Felülírás' lehetÅ‘séget a védelem eltávolításához.", + "genericSaveError": "Hiba a(z) '{0}' mentése közben: {1}", + "staleSaveError": "Nem sikerült menteni a(z) '{0}' fájlt: a lemezen lévÅ‘ tartalom újabb. Kattintson az **Összehasonlítás*** gombra a helyi és a lemezen lévÅ‘ változat összehasonlításához.", + "compareChanges": "Összehasonlítás", + "saveConflictDiffLabel": "{0} (a lemezen) ↔ {1} ({2}) – Mentési konfliktus feloldása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json new file mode 100644 index 00000000000..30d6d309142 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Nincs mappa megnyitva", + "explorerSection": "FájlkezelÅ‘ szakasz", + "noWorkspaceHelp": "Még nem adott mappát a munkaterülethez.", + "addFolder": "Mappa hozzáadása", + "noFolderHelp": "Még nem nyitott meg mappát", + "openFolder": "Mappa megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json new file mode 100644 index 00000000000..e8e887279e8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label": "FájlkezelÅ‘", + "canNotResolve": "Nem sikerült feloldani a munkaterület-mappát" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json b/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json new file mode 100644 index 00000000000..d5015512419 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "FájlkezelÅ‘ szakasz", + "treeAriaLabel": "FájlkezelÅ‘" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json new file mode 100644 index 00000000000..e00a7141ecf --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Adja meg a fájl nevét. Nyomjon 'Enter'-t a megerÅ‘sítéshez vagy 'Escape'-et a megszakításhoz.", + "filesExplorerViewerAriaLabel": "{0}, FájlkezelÅ‘", + "dropFolders": "Szeretné hozzáadni a mappákat a munkaterülethez?", + "dropFolder": "Szeretné hozzáadni a mappát a munkaterülethez?", + "addFolders": "Mappák hozzá&&adása", + "addFolder": "Mappa hozzá&&adása", + "confirmMove": "Biztosan át szeretné helyezni a következÅ‘t: '{0}'?", + "doNotAskAgain": "Ne kérdezze meg újra", + "moveButtonLabel": "&&Ãthelyezés", + "confirmOverwriteMessage": "A célmappában már létezik '{0}' nevű elem. Le szeretné cserélni?", + "irreversible": "A művelet nem vonható vissza!", + "replaceButtonLabel": "&&Csere" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json b/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json new file mode 100644 index 00000000000..99cf9cb13e7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Megnyitott szerkesztÅ‘ablakok", + "openEditosrSection": "Megnyitott szerkesztÅ‘ablakok szakasz", + "dirtyCounter": "{0} nincs mentve", + "saveAll": "Összes mentése", + "closeAllUnmodified": "Nem módosultak bezárása", + "closeAll": "Összes bezárása", + "compareWithSaved": "Összehasonlítás a mentett változattal", + "close": "Bezárás", + "closeOthers": "Többi bezárása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json b/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json new file mode 100644 index 00000000000..41a3029037e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, SzerkesztÅ‘csoport", + "openEditorAriaLabel": "{0}, megnyitott szerkesztÅ‘ablak", + "saveAll": "Összes mentése", + "closeAllUnmodified": "Nem módosultak bezárása", + "closeAll": "Összes bezárása", + "compareWithSaved": "Összehasonlítás a mentett változattal", + "close": "Bezárás", + "closeOthers": "Többi bezárása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/hun/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json new file mode 100644 index 00000000000..44e82c9a64b --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "totalProblems": "Összesen {0} probléma", + "filteredProblems": "{0} probléma megjelenítve (összesen: {1})" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/hun/src/vs/workbench/parts/markers/common/messages.i18n.json index 5600d4626b5..1ecd95e356c 100644 --- a/i18n/hun/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,8 +6,7 @@ { "viewCategory": "Nézet", "problems.view.toggle.label": "Problémák be- és kikapcsolása", - "problems.view.show.label": "Problémák megjelenítése", - "problems.view.hide.label": "Problémák elrejtése", + "problems.view.focus.label": "Váltás a problémákra", "problems.panel.configuration.title": "Problémák-nézet", "problems.panel.configuration.autoreveal": "Meghatározza, hogy a problémák nézet automatikusan felfedje-e a fájlokat, amikor megnyitja Å‘ket.", "markers.panel.title.problems": "Problémák", diff --git a/i18n/hun/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json b/i18n/hun/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json new file mode 100644 index 00000000000..bf91ad5e3b5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "prof.message": "Profil sikeresen elkészítve.", + "prof.detail": "Készítsen egy hibajelentést, és manuálisan csatolja a következÅ‘ fájlokat:\n{0}", + "prof.restartAndFileIssue": "Hibajelentés létrehozása és újraindítás", + "prof.restart": "Újraindítás", + "prof.thanks": "Köszönjük a segítséget!", + "prof.detail.restart": "Egy utolsó újraindítás szükséges a(z) '{0}' használatához. Ismételten köszönjük a közreműködését!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index f660711dc6b..6e07a23b387 100644 --- a/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defineKeybinding.initial": "Üsse le a kívánt billentyűkombinációt, majd nyomjon ENTER-t. ESCAPE a megszakításhoz.", + "defineKeybinding.initial": "Üsse le a kívánt billentyűkombinációt, majd nyomja meg az ENTER-t.", "defineKeybinding.chordsTo": "kombináció a következÅ‘höz:" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index 1e432a80419..5f23e1e85aa 100644 --- a/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -8,7 +8,7 @@ "SearchKeybindings.AriaLabel": "Billentyűparancsok keresése", "SearchKeybindings.Placeholder": "Billentyűparancsok keresése", "sortByPrecedene": "Rendezés precedencia szerint", - "header-message": "Haladó beállításokhoz nyissa meg és szerkessze a következÅ‘t:", + "header-message": "További, haladó testreszabáshoz nyissa meg és szerkessze a következÅ‘ fájlt:", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "Billentyűparancsok", "changeLabel": "Billentyűparancs módosítása", @@ -26,6 +26,7 @@ "editKeybindingLabel": "Billentyűparancs módosítása", "addKeybindingLabelWithKey": "{0} billentyűparancs hozzáadása", "addKeybindingLabel": "Billentyűparancs hozzáadása", + "title": "{0} ({1})", "commandAriaLabel": "Parancs: {0}.", "keybindingAriaLabel": "Billentyűparancs: {0}.", "noKeybinding": "Nincs billentyűparancs hozzárendelve.", diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 4d1cfca9683..daaa3641589 100644 --- a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "openRawDefaultSettings": "Nyers alapértelmezett beállítások megnyitása", "openGlobalSettings": "Felhasználói beállítások megnyitása", "openGlobalKeybindings": "Billentyűparancsok megnyitása", "openGlobalKeybindingsFile": "Billentyűparancsfájl megnyitása", diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index c61dba726c1..9b9670df23c 100644 --- a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -7,12 +7,12 @@ "settingsEditorName": "Alapértelmezett beállítások", "SearchSettingsWidget.AriaLabel": "Beállítások keresése", "SearchSettingsWidget.Placeholder": "Beállítások keresése", - "totalSettingsMessage": "Összesen {0} beállítás", "noSettingsFound": "Nincs eredmény", "oneSettingFound": "1 illeszkedÅ‘ beállítás", "settingsFound": "{0} illeszkedÅ‘ beállítás", - "fileEditorWithInputAriaLabel": "{0}. SzövegfájlszerkesztÅ‘.", - "fileEditorAriaLabel": "SzövegfájlszerkesztÅ‘", + "totalSettingsMessage": "Összesen {0} beállítás", + "defaultSettings": "Alapértelmezett beállítások", + "defaultFolderSettings": "Alapértelmezett mappabeállítások", "defaultEditorReadonly": "A jobb oldalon lévÅ‘ szerkesztÅ‘ablak tartalmának módosításával írhatja felül az alapértelmezett beállításokat.", "preferencesAriaLabel": "Az alapértelmezett beállítások. Ãrásvédett szerkesztÅ‘ablak." } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 856d458a709..cc4a2d305d9 100644 --- a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -7,8 +7,6 @@ "emptyUserSettingsHeader": "Az ebben a fájlban elhelyezett beállítások felülírják az alapértelmezett beállításokat.", "emptyWorkspaceSettingsHeader": "Az ebben a fájlban elhelyezett beállítások felülírják a felhasználói beállításokat.", "emptyFolderSettingsHeader": "Az ebben a fájlban elhelyezett beállítások felülírják a munkaterületre vonatkozó beállításokat.", - "defaultFolderSettingsTitle": "Alapértelmezett mappabeállítások", - "defaultSettingsTitle": "Alapértelmezett beállítások", "editTtile": "Szerkesztés", "replaceDefaultValue": "Csere a beállításokban", "copyDefaultValue": "Másolás a beállításokba", diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index 1da42b0222a..ef9a96afe7b 100644 --- a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultSettingsFuzzyPrompt": "Próbálja ki a fuzzy keresést!", + "defaultSettingsFuzzyPrompt": "Próbálja ki a természetes nyelvi keresést!", "defaultSettings": "A jobb oldalon lévÅ‘ szerkesztÅ‘ablakban elhelyezett beállítások felülírják az alapértelmezett beállításokat.", "noSettingsFound": "Beállítás nem található.", - "folderSettingsDetails": "Mappabeállítások", - "enableFuzzySearch": "Kísérleti fuzzy keresés engedélyezése" + "settingsSwitcherBarAriaLabel": "Beállításkapcsoló", + "userSettings": "Felhasználói beállítások", + "workspaceSettings": "Munkaterület-beállítások", + "folderSettings": "Mappabeálíltások", + "enableFuzzySearch": "Természetes nyelvi keresés engedélyezése" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json new file mode 100644 index 00000000000..b2ceafc3869 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Alapértelmezett beállításszerkesztÅ‘", + "keybindingsEditor": "Billentyűparancs-szerkesztÅ‘", + "preferences": "Beállítások" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 949b0eb4dcf..5792eefef53 100644 --- a/i18n/hun/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showTriggerActions": "Minden parancs megjelenítése", + "showTriggerActions": "Összes parancs megjelenítése", "clearCommandHistory": "ParancselÅ‘zmények törlése", "showCommands.label": "Parancskatalógus...", "entryAriaLabelWithKey": "{0}, {1}, parancsok", diff --git a/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json index 023886324b7..821a91e9b57 100644 --- a/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -6,7 +6,6 @@ { "scm providers": "VerziókezelÅ‘ rendszerek", "hideRepository": "Elrejtés", - "commitMessage": "Üzenet (nyomja meg a következÅ‘t a commithoz: {0})", "installAdditionalSCMProviders": "További verziókezelÅ‘ rendszerek telepítése...", "no open repo": "Nincs aktív verziókezelÅ‘ rendszer.", "source control": "VerziókezelÅ‘ rendszer", diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index 63a2c8a4fe8..37ee1f5cac3 100644 --- a/i18n/hun/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defaultLabel": "bemeneti adat", - "useIgnoreFilesDescription": "Ignore-fájlok használata", - "useExcludeSettingsDescription": "Kizárási beállítások használata" + "useExcludesAndIgnoreFilesDescription": "Kizárási beállítások és ignore-fájlok használata" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/search.contribution.i18n.json index 4d6c563c176..e1fb57e6aa6 100644 --- a/i18n/hun/src/vs/workbench/parts/search/browser/search.contribution.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -16,7 +16,6 @@ "exclude.boolean": "A globális minta, amire illesztve lesznek a fájlok elérési útjai. A minta engedélyezéséhez vagy letiltásához állítsa igaz vagy hamis értékre.", "exclude.when": "További ellenÅ‘rzés elvégzése az illeszkedÅ‘ fájlok testvérein. Az illeszkedÅ‘ fájl nevéhez használja a $(basename) változót!", "useRipgrep": "Meghatározza, hogy a szövegben és fájlokban való kereséshez a ripgrep van-e használva.", - "useIgnoreFilesByDefault": "Meghatározza, hogy a .gitignore és .ignore fájlok alapértelmezés szerint használva legyenek-e egy új munkaterületen a kereséshez.", "useIgnoreFiles": "Meghatározza, hogy a .gitignore és .ignore fájlok használva legyenek-e a kereséshez.", "search.quickOpen.includeSymbols": "Meghatározza, hogy a fájlok gyors megnyitásánál megjelenjenek-e a globális szimbólumkeresÅ‘ találatai.", "search.followSymlinks": "Meghatározza, hogy keresés során követve legyenek-e a szimbolikus linkek." diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json index a98705779e9..9f5f0bf4d8b 100644 --- a/i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -10,17 +10,14 @@ "previousSearchExcludePattern": "ElÅ‘zÅ‘ kizáró keresési minta megjelenítése", "nextSearchTerm": "KövetkezÅ‘ keresÅ‘kifejezés megjelenítése", "previousSearchTerm": "ElÅ‘zÅ‘ keresÅ‘kifejezés megjelenítése", - "focusNextInputBox": "Váltás a következÅ‘ beviteli mezÅ‘re", - "focusPreviousInputBox": "Váltás az elÅ‘zÅ‘ beviteli mezÅ‘re", "showSearchViewlet": "Keresés megjelenítése", "findInFiles": "Keresés a fájlokban", "findInFilesWithSelectedText": "Keresés a fájlokban a kijelölt szöveg alapján", "replaceInFiles": "Csere a fájlokban", "replaceInFilesWithSelectedText": "Csere a fájlokban a kijelölt szöveg alapján", - "findInWorkspace": "Keresés a munkaterületen...", - "findInFolder": "Keresés mappában...", "RefreshAction.label": "Frissítés", - "ClearSearchResultsAction.label": "Keresési eredmények törlése", + "CollapseDeepestExpandedLevelAction.label": "Összes bezárása", + "ClearSearchResultsAction.label": "Törlés", "FocusNextSearchResult.label": "Váltás a következÅ‘ keresési eredményre", "FocusPreviousSearchResult.label": "Váltás az elÅ‘zÅ‘ keresési eredményre", "RemoveAction.label": "Elvetés", diff --git a/i18n/hun/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json new file mode 100644 index 00000000000..e1fb57e6aa6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Szimbólum megkeresése a munkaterületen...", + "name": "Keresés", + "search": "Keresés", + "view": "Nézet", + "openAnythingHandlerDescription": "Fájl megkeresése", + "openSymbolDescriptionNormal": "Szimbólum megkeresése a munkaterületen", + "searchOutputChannelTitle": "Keresés", + "searchConfigurationTitle": "Keresés", + "exclude": "Globális minták konfigurálása fájlok és mappák keresésbÅ‘l való kizárásához. Örökli az összes globális mintát a fliex.exclude beállításból.", + "exclude.boolean": "A globális minta, amire illesztve lesznek a fájlok elérési útjai. A minta engedélyezéséhez vagy letiltásához állítsa igaz vagy hamis értékre.", + "exclude.when": "További ellenÅ‘rzés elvégzése az illeszkedÅ‘ fájlok testvérein. Az illeszkedÅ‘ fájl nevéhez használja a $(basename) változót!", + "useRipgrep": "Meghatározza, hogy a szövegben és fájlokban való kereséshez a ripgrep van-e használva.", + "useIgnoreFiles": "Meghatározza, hogy a .gitignore és .ignore fájlok használva legyenek-e a kereséshez.", + "search.quickOpen.includeSymbols": "Meghatározza, hogy a fájlok gyors megnyitásánál megjelenjenek-e a globális szimbólumkeresÅ‘ találatai.", + "search.followSymlinks": "Meghatározza, hogy keresés során követve legyenek-e a szimbolikus linkek." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/hun/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json new file mode 100644 index 00000000000..3f73a581190 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "findInFolder": "Keresés mappában...", + "findInWorkspace": "Keresés a munkaterületen..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index ad07b544ef3..314fee22b0f 100644 --- a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -6,10 +6,9 @@ { "tasksCategory": "Feladatok", "ConfigureTaskRunnerAction.label": "Feladat beállítása", - "ConfigureBuildTaskAction.label": "Buildelési feladat beállítása", "CloseMessageAction.label": "Bezárás", - "ShowTerminalAction.label": "Terminál megtekintése", "problems": "Problémák", + "building": "Buildelés...", "manyMarkers": "99+", "runningTasks": "Futó feladatok megjelenítése", "tasks": "Feladatok", @@ -52,7 +51,7 @@ "TaslService.noEntryToRun": "Nincs futtatandó feladat. Feladatok konfigurálása...", "TaskService.fetchingBuildTasks": "Buildelési feladatok lekérése...", "TaskService.pickBuildTask": "Válassza ki a futtatandó buildelési feladatot!", - "TaskService.noBuildTask": "Nincs futtatandó buildelési feladat. Feladatok konfigurálása...", + "TaskService.noBuildTask": "Nincs futtatandó buildelési feladat. Buildelési feladatok konfigurálása...", "TaskService.fetchingTestTasks": "Tesztelési feladatok lekérése...", "TaskService.pickTestTask": "Válassza ki a futtatandó tesztelési feladatot", "TaskService.noTestTaskTerminal": "Nincs futtatandó tesztelési feladat. Feladatok konfigurálása...", diff --git a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 496170af36e..24cb8d6017c 100644 --- a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -7,6 +7,7 @@ "TerminalTaskSystem.unknownError": "Ismeretlen hiba történt a feladat végrehajtása közben. Részletek a feladat kimeneti naplójában találhatók.", "dependencyFailed": "Nem sikerült feloldani a(z) '{0}' függÅ‘ feladatot a(z) '{1}' munkaterületi mappában", "TerminalTaskSystem.terminalName": "Feladat – {0}", + "closeTerminal": "A folytatáshoz nyomjon meg egy billentyűt.", "reuseTerminal": "A terminál újra lesz hasznosítva a feladatok által. Nyomjon meg egy billentyűt a bezáráshoz.", "TerminalTaskSystem": "Rendszerparancsok nem hajthatók végre UNC-meghajtókon.", "unkownProblemMatcher": "A(z) {0} problémaillesztÅ‘ nem található. Az illesztÅ‘ figyelmen kívül lesz hagyva." diff --git a/i18n/hun/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index 45e04c9c1fc..2bca27a1d0d 100644 --- a/i18n/hun/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,8 +14,8 @@ "ConfigurationParser.noTypeDefinition": "Hiba: nincs '{0}' azonosítójú feladattípus regisztrálva. Elfelejtett telepíteni egy kiegészítÅ‘t, ami a feladat szolgáltatásáért felelÅ‘s?", "ConfigurationParser.missingRequiredProperty": "Hiba: a(z) '{0}' feladatkonfigurációból hiányzik a kötelezÅ‘ '{1}' tulajdonság. A feladatkonfiguráció figyelmen kívül lesz hagyva.", "ConfigurationParser.notCustom": "Hiba: a feladat nem egyedi feladatként van definiálva. A konfiguráció figyelmen kívül lesz hagyva.\n{0}\n", - "ConfigurationParser.noTaskName": "Hiba: a feladathoz meg kell adni a taskName tulajdonságot. A feladat figyelmen kívül lesz hagyva.\n{0}\n", - "taskConfiguration.shellArgs": "Figyelmeztetés: a(z) '{0}' feladat egy rendszerparancs, és vagy a parancs nevében vagy az argumentumok egyikében escape nélküli szóköz található. A megfelelÅ‘ idézÅ‘jelezés érdekében olvassza bele az argumentumokat a parancsba.", + "ConfigurationParser.noTaskName": "Hiba: a feladatnak rendelkeznie kell adni taskName tulajdonsággal. A feladat figyelmen kívül lesz hagyva.\n{0}\n", + "taskConfiguration.shellArgs": "Figyelmeztetés: a(z) '{0}' feladat egy rendszerparancs, és az argumentumok egyikében escape-elés nélküli szóköz található. A megfelelÅ‘ idézÅ‘jelezés érdekében olvassza bele az argumentumokat a parancsba.", "taskConfiguration.noCommandOrDependsOn": "Hiba: a(z) '{0}' feladat nem ad meg parancsot, és nem definiálja a dependsOn tulajdonságot sem. A feladat figyelmen kívül lesz hagyva. A definíciója:\n{1}", "taskConfiguration.noCommand": "Hiba: a(z) '{0}' feladathoz nincs definiálva a parancs. A feladat figyelmen kívül lesz hagyva. A definíciója:\n{1}", "TaskParse.noOsSpecificGlobalTasks": "A feladatok 2.0.0-s verziója nem támogatja a globális, operációs rendszer-specifikus feladatokat. Alakítsa át Å‘ket operációs rendszer-specifikus parancsot tartalmazó feladattá. Az érintett feladatok:\n{0}" diff --git a/i18n/hun/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index d2b84accaac..851dfd973f4 100644 --- a/i18n/hun/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,7 +6,7 @@ { "termEntryAriaLabel": "{0}, terminálválasztó", "termCreateEntryAriaLabel": "{0}, új terminál létrehozása", - "'workbench.action.terminal.newplus": "$(plus) Új integrált terminál létrehozása", + "workbench.action.terminal.newplus": "$(plus) Új integrált terminál létrehozása", "noTerminalsMatching": "Nincs ilyen terminál", "noTerminalsFound": "Nincs megnyitott terminál" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 9abe5fcaf6f..4d4b7d5d7cf 100644 --- a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,7 +16,7 @@ "terminal.integrated.rightClickCopyPaste": "Ha be van állítva, megakadályozza a helyi menü megjelenését a terminálon történÅ‘ jobb kattintás esetén. Helyette másol, ha van kijelölés, és beilleszt, ha nincs.", "terminal.integrated.fontFamily": "Meghatározza a terminál betűtípusát. Alapértelmezett értéke az editor.fontFamily értéke.", "terminal.integrated.fontSize": "Meghatározza a terminálban használt betű méretét, pixelekben.", - "terminal.integrated.lineHeight": "Meghatározza a sormagasságot a terminálban. A tényleges méret a megadott szám és a terminál betűméretének szorzatából jön ki.", + "terminal.integrated.lineHeight": "Meghatározza a terminál sormagasságát. A tényleges méret a megadott szám és a terminál betűméretének szorzatából jön ki.", "terminal.integrated.enableBold": "Engedélyezve van-e a félkövér szöveg a terminálban. A működéshez szükséges, hogy a terminál shell támogassa a félkövér betűket.", "terminal.integrated.cursorBlinking": "Meghatározza, hogy a terminál kurzora villog-e.", "terminal.integrated.cursorStyle": "Meghatározza a terminál kurzorának stílusát.", diff --git a/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index e8ad512ade1..b4c839776a9 100644 --- a/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,13 +5,14 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "Színtéma", + "themes.category.light": "világos témák", + "themes.category.dark": "sötét témák", "installColorThemes": "További színtémák telepítése...", "themes.selectTheme": "Válasszon színtémát! (ElÅ‘nézet a fel/le billentyűvel.)", "selectIconTheme.label": "Fájlikontéma", - "installIconThemes": "További fájlikontémák telepítése...", "noIconThemeLabel": "Nincs", "noIconThemeDesc": "Fájlikonok letiltása", - "problemChangingIconTheme": "Hiba történt az ikontéma beállítása közben: {0}", + "installIconThemes": "További fájlikontémák telepítése...", "themes.selectIconTheme": "Válasszon fájlikontémát!", "generateColorTheme.label": "Színtéma generálása az aktuális beállítások alapján", "preferences": "Beállítások", diff --git a/i18n/hun/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/hun/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index f6ca0fc9934..96a92bfb530 100644 --- a/i18n/hun/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "watermark.showCommands": "Minden parancs megjelenítése", + "watermark.showCommands": "Összes parancs megjelenítése ", "watermark.quickOpen": "Fájl megkeresése", "watermark.openFile": "Fájl megnyitása", "watermark.openFolder": "Mappa megnyitása", diff --git a/i18n/hun/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/hun/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 209303272b7..02c79dcdff8 100644 --- a/i18n/hun/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/hun/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -9,9 +9,9 @@ "scope.window.description": "Ablakspecifikus beállítás, ami konfigurálható a felhasználói vagy munkaterületi beállításokban.", "scope.resource.description": "ErÅ‘forrásspecifikus beállítás, ami beállítható a felhasználói, munkaterületi és mappaszintű beállításokban.", "scope.description": "A hatókör, amire a beállítás vonatkozik. Az elérhetÅ‘ hatókörök: `window` és `resource`.", + "vscode.extension.contributes.defaultConfiguration": "Adott nyelvre vonatkozóan szerkesztÅ‘beállításokat szolgáltat.", "vscode.extension.contributes.configuration": "Konfigurációs beállításokat szolgáltat.", "invalid.title": "a 'configuration.title' értékét karakterláncként kell megadni", - "vscode.extension.contributes.defaultConfiguration": "Adott nyelvre vonatkozóan szerkesztÅ‘beállításokat szolgáltat.", "invalid.properties": "A 'configuration.properties' értékét egy objektumként kell megadni", "invalid.allOf": "A 'configuration.allOf' elavult, és használata nem javasolt. Helyette több konfigurációs szakaszt kell átadni tömbként a 'configuration' értékeként.", "workspaceConfig.folders.description": "A munkaterületre betöltött mappák listája.", diff --git a/i18n/hun/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json b/i18n/hun/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json new file mode 100644 index 00000000000..afdabd01421 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableCrashReporting": "Összeomlási jelentések küldésének engedélyezése a Microsofthoz.\nA beállítás érvénybe lépéséhez újraindítás szükséges." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/hun/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index 55c4947973b..ccdbb2f20bc 100644 --- a/i18n/hun/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/hun/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "bubbleTitle": "kiemelt elemeket tartalmaz" + "bubbleTitle": "Kiemelt elemeket tartalmaz" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/hun/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/hun/src/vs/workbench/services/files/node/fileService.i18n.json index 5dbccfabb8d..91ce4d8f750 100644 --- a/i18n/hun/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/hun/src/vs/workbench/services/files/node/fileService.i18n.json @@ -8,8 +8,8 @@ "fileIsDirectoryError": "A fájl egy könyvtár", "fileNotModifiedError": "A fájl azóta nem módosult", "fileTooLargeError": "A fájl túl nagy a megnyitáshoz", - "fileBinaryError": "A fájl binárisnak tűnik és nem nyitható meg szövegként", "fileNotFoundError": "Fájl nem található ({0})", + "fileBinaryError": "A fájl binárisnak tűnik és nem nyitható meg szövegként", "fileExists": "A létrehozandó fájl már létezik ({0})", "fileMoveConflict": "Nem lehet áthelyezni vagy másolni. A fájl már létezik a célhelyen.", "unableToMoveCopyError": "Nem lehet áthelyezni vagy másolni. A fájl felülírná a mappát, amiben található.", diff --git a/i18n/hun/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/hun/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index df3dd16f463..6928f2f1935 100644 --- a/i18n/hun/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/hun/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -22,5 +22,5 @@ "keybindings.json.when": "A billentyűparancs aktiválási feltétele.", "keybindings.json.args": "A végrehajtandó parancs számára átadott argumentumok", "keyboardConfigurationTitle": "Billentyűzet", - "dispatch": "Meghatározza, hogy a billentyűleütések észleléséhez a `keydown.code` (ajánlott) vagy `keydown.keyCode` esemény legyen használva." + "dispatch": "Meghatározza, hogy a billentyűleütések észleléséhez a `code` (ajánlott) vagy `keyCode` esemény legyen használva." } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/hun/src/vs/workbench/services/textfile/common/textFileService.i18n.json index 53a5c4f1246..ce232b1ad25 100644 --- a/i18n/hun/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/hun/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "files.backup.failSave": "A fájlokról nem sikerült biztonsági másolatot készíteni (Hiba: {0}). Próbálja meg menteni a fájlokat a kilépéshez." + "files.backup.failSave": "A módosított fájlokat nem sikerült kiírni a biztonsági mentéseket tartalmazó tárhelyre (Hiba: {0}). Próbálja meg menteni a fájlokat, majd lépjen ki!" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/hun/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index f65a2da76bc..d67776bc433 100644 --- a/i18n/hun/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/hun/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "migration.completed": "Új témabeállítások lettek hozzáadva a felhasználói beállításokhoz. Biztonsági mentés a következÅ‘ helyen érhetÅ‘ el: {0}.", "error.cannotloadtheme": "Nem sikerült betölteni a(z) '{0}' témát: {1}.", - "error.cannotloadicontheme": "Nem sikerült megnyitni a(z) '{0}' témát", "colorTheme": "Meghatározza a munkaterületen használt színtémát.", "colorThemeError": "A téma ismeretlen vagy nincs telepítve.", "iconTheme": "Meghatározza a munkaterületen használt ikontémát. 'null' érték esetén nem jelenik meg egyetlen fájlikon sem.", diff --git a/i18n/ita/extensions/git/out/autofetch.i18n.json b/i18n/ita/extensions/git/out/autofetch.i18n.json new file mode 100644 index 00000000000..93fbf7a8a39 --- /dev/null +++ b/i18n/ita/extensions/git/out/autofetch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yes": "Sì", + "no": "No" +} \ No newline at end of file diff --git a/i18n/ita/extensions/git/out/commands.i18n.json b/i18n/ita/extensions/git/out/commands.i18n.json index 09e5850f8cd..3d1d3e71eae 100644 --- a/i18n/ita/extensions/git/out/commands.i18n.json +++ b/i18n/ita/extensions/git/out/commands.i18n.json @@ -9,6 +9,8 @@ "create branch": "$(plus) Crea nuovo branch", "repourl": "URL del repository", "parent": "Directory padre", + "cancel": "$(sync~spin) Clonazione di repository in corso... Clicca per annullare", + "cancel tooltip": "Annulla l'operazione di clonazione", "cloning": "Clonazione del repository GIT...", "openrepo": "Apri repository", "proposeopen": "Aprire il repository clonato?", @@ -49,6 +51,8 @@ "select branch to delete": "Seleziona un ramo da cancellare", "confirm force delete branch": "Il merge del ramo '{0}' non è completo. Elimina comunque?", "delete branch": "Elimina ramo", + "invalid branch name": "Nome di branch non valido", + "branch already exists": "La branch denominata '{0}' esiste già", "select a branch to merge from": "Selezionare un ramo da cui eseguire il merge", "merge conflicts": "Ci sono conflitti di merge. Risolverli prima di eseguire commit.", "tag name": "Nome del tag", @@ -71,7 +75,6 @@ "no stashes": "Non ci sono accantonamenti da ripristinare.", "pick stash to pop": "Scegli un accantonamento da prelevare", "clean repo": "Pulire l'albero di lavoro del repository prima dell'estrazione.", - "cant push": "Impossibile effettuare il push in remoto. Effettua prima un 'pull' per integrare le tue modifiche.", "git error details": "GIT: {0}", "git error": "Errore GIT", "open git log": "Apri log GIT" diff --git a/i18n/ita/extensions/git/out/main.i18n.json b/i18n/ita/extensions/git/out/main.i18n.json index b29ecda1f34..7fc7257ad8e 100644 --- a/i18n/ita/extensions/git/out/main.i18n.json +++ b/i18n/ita/extensions/git/out/main.i18n.json @@ -4,8 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "looking": "Ricerca di git in: {0}", "using git": "Uso di GIT {0} da {1}", - "updateGit": "Aggiorna GIT", "neverShowAgain": "Non visualizzare più questo messaggio", + "updateGit": "Aggiorna GIT", "git20": "La versione installata di GIT è la {0}. Per il corretto funzionamento di Code è consigliabile usare una versione di GIT non inferiore alla 2." } \ No newline at end of file diff --git a/i18n/ita/extensions/git/out/repository.i18n.json b/i18n/ita/extensions/git/out/repository.i18n.json index 0b2210016a0..b6420fa4c98 100644 --- a/i18n/ita/extensions/git/out/repository.i18n.json +++ b/i18n/ita/extensions/git/out/repository.i18n.json @@ -21,6 +21,7 @@ "deleted by us": "Eliminato da noi", "both added": "Entrambi aggiunti", "both modified": "Entrambi modificati", + "commitMessage": "Message (press {0} to commit)", "commit": "Esegui commit", "merge changes": "Esegui merge delle modifiche", "staged changes": "Modifiche preparate per il commit", diff --git a/i18n/ita/extensions/git/package.i18n.json b/i18n/ita/extensions/git/package.i18n.json index 7fe36b9539a..4c23aba5a2e 100644 --- a/i18n/ita/extensions/git/package.i18n.json +++ b/i18n/ita/extensions/git/package.i18n.json @@ -33,6 +33,7 @@ "command.checkout": "Estrai in...", "command.branch": "Crea ramo...", "command.deleteBranch": "Elimina ramo...", + "command.renameBranch": "Rinomina Branch...", "command.merge": "Merge ramo...", "command.createTag": "Crea tag", "command.pull": "Esegui pull", @@ -42,9 +43,11 @@ "command.pushTo": "Esegui push in...", "command.pushWithTags": "Esegui push con tag", "command.sync": "Sincronizza", + "command.syncRebase": "Sincronizza (Rebase)", "command.publish": "Pubblica ramo", "command.showOutput": "Mostra output GIT", "command.ignore": "Aggiungi file a .gitignore", + "command.stashIncludeUntracked": "Stash (includi non tracciate)", "command.stash": "Accantona", "command.stashPop": "Preleva accantonamento...", "command.stashPopLatest": "Preleva accantonamento più recente", diff --git a/i18n/ita/extensions/markdown/out/commands.i18n.json b/i18n/ita/extensions/markdown/out/commands.i18n.json new file mode 100644 index 00000000000..2448cc1f0e0 --- /dev/null +++ b/i18n/ita/extensions/markdown/out/commands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "Impossibile caricare 'markdown.styles': {0}" +} \ No newline at end of file diff --git a/i18n/ita/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/ita/extensions/markdown/out/features/previewContentProvider.i18n.json new file mode 100644 index 00000000000..9207358bc4d --- /dev/null +++ b/i18n/ita/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "Alcuni contenuti sono stati disabilitati in questo documento", + "preview.securityMessage.title": "Contenuti potenzialmente non sicuri sono stati disattivati nell'anteprima del Markdown. Modificare l'impostazione di protezione dell'anteprima del Markdown per consentire la visualizzazione di contenuto insicuro o abilitare gli script", + "preview.securityMessage.label": "Avviso di sicurezza contenuto disabilitato" +} \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/package.i18n.json b/i18n/ita/extensions/typescript/package.i18n.json index 54540ff71f9..6d92cc73532 100644 --- a/i18n/ita/extensions/typescript/package.i18n.json +++ b/i18n/ita/extensions/typescript/package.i18n.json @@ -39,6 +39,7 @@ "typescript.openTsServerLog.title": "Apri il log del server TypeScript", "typescript.restartTsServer": "Riavvia server TS", "typescript.selectTypeScriptVersion.title": "Seleziona la versione di TypeScript", + "typescript.reportStyleChecksAsWarnings": "Evidenzia i controlli di stile come warning", "jsDocCompletion.enabled": "Abilita/Disabilita commenti automatici JSDoc", "javascript.implicitProjectConfig.checkJs": "Abilita/disabilita il controllo semantico di file JavaScript. File jsconfig.json o tsconfig.json esistenti sovrascrivono su questa impostazione. Richiede TypeScript >= 2.3.1.", "typescript.npm": "Specifica il percorso dell'eseguibile NPM utilizzato per l'acquisizione automatica delle definizioni di tipi. Richiede TypeScript >= 2.3.4.", diff --git a/i18n/ita/src/vs/base/common/errorMessage.i18n.json b/i18n/ita/src/vs/base/common/errorMessage.i18n.json index 82051082729..606ed71c6b4 100644 --- a/i18n/ita/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/ita/src/vs/base/common/errorMessage.i18n.json @@ -4,13 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "message": "{0}. Codice errore: {1}", - "error.permission.verbose": "Autorizzazione negata (HTTP {0})", - "error.permission": "Autorizzazione negata", - "error.http.verbose": "{0} (HTTP {1}: {2})", - "error.http": "{0} (HTTP {1})", - "error.connection.unknown.verbose": "Errore di connessione sconosciuto ({0})", - "error.connection.unknown": "Si è verificato un errore di connessione sconosciuto. La connessione a Internet è stata interrotta oppure il server al quale si è connessi è offline.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "Si è verificato un errore sconosciuto. Per altri dettagli, vedere il log.", "nodeExceptionMessage": "Si è verificato un errore di sistema ({0})", diff --git a/i18n/ita/src/vs/code/electron-main/main.i18n.json b/i18n/ita/src/vs/code/electron-main/main.i18n.json new file mode 100644 index 00000000000..90fdc6f7bc0 --- /dev/null +++ b/i18n/ita/src/vs/code/electron-main/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "&&Chiudi" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/code/electron-main/menus.i18n.json b/i18n/ita/src/vs/code/electron-main/menus.i18n.json index 17fd875af6f..d476d47bdc5 100644 --- a/i18n/ita/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/ita/src/vs/code/electron-main/menus.i18n.json @@ -22,12 +22,11 @@ "miQuit": "Chiudi {0}", "miNewFile": "&&Nuovo file", "miOpen": "&&Apri...", - "miOpenWorkspace": "&&Apri area di lavoro...", + "miOpenWorkspace": "Aprire Wor&&kspace...", "miOpenFolder": "Apri &&cartella...", "miOpenFile": "&&Apri file...", "miOpenRecent": "Apri &&recenti", - "miSaveWorkspaceAs": "&&Salva area di lavoro con nome...", - "miAddFolderToWorkspace": "&&Aggiungi cartella all'area di lavoro...", + "miAddFolderToWorkspace": "A&&ggiungere cartella all'area di lavoro...", "miSave": "&&Salva", "miSaveAs": "Salva con nome...", "miSaveAll": "Salva &&tutto", @@ -157,7 +156,6 @@ "mMergeAllWindows": "Unisci tutte le finestre", "miToggleDevTools": "&&Attiva/Disattiva strumenti di sviluppo", "miAccessibilityOptions": "&&Opzioni accessibilità", - "miReportIssues": "&&Segnala problemi", "miWelcome": "&&Benvenuti", "miInteractivePlayground": "Playground &&interattivo", "miDocumentation": "&&Documentazione", @@ -184,6 +182,6 @@ "miDownloadingUpdate": "Download dell'aggiornamento...", "miInstallingUpdate": "Installazione dell'aggiornamento...", "miCheckForUpdates": "Verifica disponibilità aggiornamenti...", - "aboutDetail": "\nVersione {0}\nCommit {1}\nData {2}\nShell {3}\nRenderer {4}\nNodo {5}\nArchitettura {6}", - "okButton": "OK" + "okButton": "OK", + "copy": "&&Copia" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/browser/services/bulkEdit.i18n.json b/i18n/ita/src/vs/editor/browser/services/bulkEdit.i18n.json new file mode 100644 index 00000000000..10ea73bb963 --- /dev/null +++ b/i18n/ita/src/vs/editor/browser/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "Nel frattempo questi file sono stati modificati: {0}", + "summary.0": "Non sono state effettuate modifiche", + "summary.nm": "Effettuate {0} modifiche al testo in {1} file", + "summary.n0": "Effettuate {0} modifiche al testo in un file" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json index 0b12d0bdf2d..1c04d1c06ae 100644 --- a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,12 +10,14 @@ "fontSize": "Controlla le dimensioni del carattere in pixel.", "lineHeight": "Controlla l'altezza della riga. Usare 0 per calcolare l'altezza della riga dalle dimensioni del carattere.", "letterSpacing": "Controlla la spaziatura tra le lettere in pixel.", - "lineNumbers": "Consente di controllare la visualizzazione dei numeri di riga. I valori possibili sono 'on', 'off' e 'relative'. Con 'relative' viene visualizzato il conteggio delle righe a partire dalla posizione corrente del cursore.", + "lineNumbers.off": "I numeri di riga non vengono visualizzati.", + "lineNumbers.on": "I numeri di riga vengono visualizzati come numeri assoluti.", + "lineNumbers.relative": "I numeri di riga vengono visualizzati come distanza in linee alla posizione del cursore.", + "lineNumbers.interval": "I numeri di riga vengono visualizzati ogni 10 righe.", + "lineNumbers": "Controlla la visualizzazione dei numeri di riga. I valori possibili sono 'on', 'off' e 'relativi'.", "rulers": "Mostra righelli verticali dopo un certo numero di caratteri a spaziatura fissa. Utilizza più valori per più righelli. Nessun righello viene disegnati se la matrice è vuota", "wordSeparators": "Caratteri che verranno usati come separatori di parola quando si eseguono operazioni o spostamenti correlati a parole", - "tabSize": "Numero di spazi a cui equivale una tabulazione. Quando `editor.detectIndentation` è attivo, questa impostazione viene sostituita in base al contenuto del file.", "tabSize.errorMessage": "È previsto 'number'. Nota: il valore \"auto\" è stato sostituito dall'impostazione `editor.detectIndentation`.", - "insertSpaces": "Inserisce spazi quando viene premuto TAB. Quando `editor.detectIndentation` è attivo, questa impostazione viene sostituita in base al contenuto del file.", "insertSpaces.errorMessage": "È previsto 'boolean'. Nota: il valore \"auto\" è stato sostituito dall'impostazione `editor.detectIndentation`.", "detectIndentation": "All'apertura di un file, `editor.tabSize` e `editor.insertSpaces` verranno rilevati in base al contenuto del file.", "roundedSelection": "Controlla se gli angoli delle selezioni sono arrotondati", @@ -89,8 +91,8 @@ "links": "Controlla se l'editor deve individuare i collegamenti e renderli cliccabili", "colorDecorators": "Controlla se l'editor deve eseguire il rendering del selettore di colore e degli elementi Decorator di tipo colore inline.", "codeActions": "Abilita il codice azione lightbulb", + "selectionClipboard": "Controlla se gli appunti primari di Linux devono essere supportati.", "sideBySide": "Controlla se l'editor diff mostra le differenze affiancate o incorporate", "ignoreTrimWhitespace": "Controlla se l'editor diff mostra come differenze le modifiche relative a spazi vuoti iniziali e finali", - "renderIndicators": "Consente di controllare se l'editor diff mostra gli indicatori +/- per le modifiche aggiunte/rimosse", - "selectionClipboard": "Controlla se gli appunti primari di Linux devono essere supportati." + "renderIndicators": "Consente di controllare se l'editor diff mostra gli indicatori +/- per le modifiche aggiunte/rimosse" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/ita/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json new file mode 100644 index 00000000000..2e610be7bab --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Vai alla parentesi" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json b/i18n/ita/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json new file mode 100644 index 00000000000..6b90ea0ccd2 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "Sposta il punto di inserimento a sinistra", + "caret.moveRight": "Sposta il punto di inserimento a destra" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/caretOperations/transpose.i18n.json b/i18n/ita/src/vs/editor/contrib/caretOperations/transpose.i18n.json new file mode 100644 index 00000000000..7e7a9ec3525 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/caretOperations/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Trasponi lettere" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/clipboard/clipboard.i18n.json b/i18n/ita/src/vs/editor/contrib/clipboard/clipboard.i18n.json new file mode 100644 index 00000000000..b99c88a4ae1 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/clipboard/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Taglia", + "actions.clipboard.copyLabel": "Copia", + "actions.clipboard.pasteLabel": "Incolla", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Copia con evidenziazione sintassi" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/comment/comment.i18n.json b/i18n/ita/src/vs/editor/contrib/comment/comment.i18n.json new file mode 100644 index 00000000000..846cfb50443 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/comment/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Attiva/Disattiva commento per la riga", + "comment.line.add": "Aggiungi commento per la riga", + "comment.line.remove": "Rimuovi commento per la riga", + "comment.block": "Attiva/Disattiva commento per il blocco" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json b/i18n/ita/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json new file mode 100644 index 00000000000..fc0acd1195a --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Mostra il menu di scelta rapida editor" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/find/findController.i18n.json b/i18n/ita/src/vs/editor/contrib/find/findController.i18n.json new file mode 100644 index 00000000000..753c08a072a --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/find/findController.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Trova", + "findNextMatchAction": "Trova successivo", + "findPreviousMatchAction": "Trova precedente", + "nextSelectionMatchFindAction": "Trova selezione successiva", + "previousSelectionMatchFindAction": "Trova selezione precedente", + "startReplace": "Sostituisci", + "showNextFindTermAction": "Mostra il termine di ricerca successivo", + "showPreviousFindTermAction": "Mostra il termine di ricerca precedente" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/find/findWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/find/findWidget.i18n.json new file mode 100644 index 00000000000..f8b42e27976 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/find/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Trova", + "placeholder.find": "Trova", + "label.previousMatchButton": "Risultato precedente", + "label.nextMatchButton": "Risultato successivo", + "label.toggleSelectionFind": "Trova nella selezione", + "label.closeButton": "Chiudi", + "label.replace": "Sostituisci", + "placeholder.replace": "Sostituisci", + "label.replaceButton": "Sostituisci", + "label.replaceAllButton": "Sostituisci tutto", + "label.toggleReplaceButton": "Attiva/Disattiva modalità sostituzione", + "title.matchesCountLimit": "Solo i primi {0} risultati vengono evidenziati, ma tutte le operazioni di ricerca funzionano su tutto il testo.", + "label.matchesLocation": "{0} di {1}", + "label.noResults": "Nessun risultato" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/find/simpleFindWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/find/simpleFindWidget.i18n.json new file mode 100644 index 00000000000..a930fde7ffb --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/find/simpleFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Trova", + "placeholder.find": "Trova", + "label.previousMatchButton": "Risultato precedente", + "label.nextMatchButton": "Risultato successivo", + "label.closeButton": "Chiudi" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/ita/src/vs/editor/contrib/folding/folding.i18n.json new file mode 100644 index 00000000000..cebd48ad3bd --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/folding/folding.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Espandi", + "unFoldRecursivelyAction.label": "Espandi in modo ricorsivo", + "foldAction.label": "Riduci", + "foldRecursivelyAction.label": "Riduci in modo ricorsivo", + "foldAllAction.label": "Riduci tutto", + "unfoldAllAction.label": "Espandi tutto", + "foldLevelAction.label": "Livello riduzione {0}" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/format/formatActions.i18n.json b/i18n/ita/src/vs/editor/contrib/format/formatActions.i18n.json new file mode 100644 index 00000000000..1232d4a3bb3 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/format/formatActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "È stata apportata 1 modifica di formattazione a riga {0}", + "hintn1": "Sono state apportate {0} modifiche di formattazione a riga {1}", + "hint1n": "È stata apportata 1 modifica di formattazione tra le righe {0} e {1}", + "hintnn": "Sono state apportate {0} modifiche di formattazione tra le righe {1} e {2}", + "no.provider": "Ci dispiace, ma non c'è alcun formattatore per i file '{0}' installati.", + "formatDocument.label": "Formatta documento", + "formatSelection.label": "Formatta selezione" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json b/i18n/ita/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json new file mode 100644 index 00000000000..9df481ec1b5 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Non è stata trovata alcuna definizione per '{0}'", + "generic.noResults": "Non è stata trovata alcuna definizione", + "meta.title": " - Definizioni di {0}", + "actions.goToDecl.label": "Vai alla definizione", + "actions.goToDeclToSide.label": "Apri definizione lateralmente", + "actions.previewDecl.label": "Visualizza la definizione", + "goToImplementation.noResultWord": "Non sono state trovate implementazioni per '{0}'", + "goToImplementation.generic.noResults": "Non sono state trovate implementazioni", + "meta.implementations.title": "- {0} implementazioni", + "actions.goToImplementation.label": "Vai all'implementazione", + "actions.peekImplementation.label": "Anteprima implementazione", + "goToTypeDefinition.noResultWord": "Non sono state trovate definizioni di tipi per '{0}'", + "goToTypeDefinition.generic.noResults": "Non sono state trovate definizioni di tipi", + "meta.typeDefinitions.title": " - {0} definizioni di tipo", + "actions.goToTypeDefinition.label": "Vai alla definizione di tipo", + "actions.peekTypeDefinition.label": "Anteprima definizione di tipo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json b/i18n/ita/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json new file mode 100644 index 00000000000..fa526a1f9e6 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Fare clic per visualizzare {0} definizioni." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/gotoError/gotoError.i18n.json b/i18n/ita/src/vs/editor/contrib/gotoError/gotoError.i18n.json new file mode 100644 index 00000000000..2d24c4f96ea --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/gotoError/gotoError.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Vai a errore o avviso successivo", + "markerAction.previous.label": "Vai a errore o avviso precedente", + "editorMarkerNavigationError": "Colore per gli errori del widget di spostamento tra marcatori dell'editor.", + "editorMarkerNavigationWarning": "Colore per gli avvisi del widget di spostamento tra marcatori dell'editor.", + "editorMarkerNavigationInfo": "Colore delle informazioni del widget di navigazione marcatori dell'editor.", + "editorMarkerNavigationBackground": "Sfondo del widget di spostamento tra marcatori dell'editor." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/hover/hover.i18n.json b/i18n/ita/src/vs/editor/contrib/hover/hover.i18n.json new file mode 100644 index 00000000000..385b42e5290 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/hover/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Visualizza passaggio del mouse" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/hover/modesContentHover.i18n.json b/i18n/ita/src/vs/editor/contrib/hover/modesContentHover.i18n.json new file mode 100644 index 00000000000..607247a8c49 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/hover/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Caricamento..." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json b/i18n/ita/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json new file mode 100644 index 00000000000..ce39cfca313 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Sostituisci con il valore precedente", + "InPlaceReplaceAction.next.label": "Sostituisci con il valore successivo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/indentation/indentation.i18n.json b/i18n/ita/src/vs/editor/contrib/indentation/indentation.i18n.json new file mode 100644 index 00000000000..2617ceedc29 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/indentation/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Converti rientro in spazi", + "indentationToTabs": "Converti rientro in tabulazioni", + "configuredTabSize": "Dimensione tabulazione configurata", + "selectTabWidth": "Seleziona dimensione tabulazione per il file corrente", + "indentUsingTabs": "Imposta rientro con tabulazioni", + "indentUsingSpaces": "Imposta rientro con spazi", + "detectIndentation": "Rileva rientro dal contenuto", + "editor.reindentlines": "Imposta nuovo rientro per righe" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json b/i18n/ita/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json new file mode 100644 index 00000000000..6f27a9a47e0 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Copia la riga in alto", + "lines.copyDown": "Copia la riga in basso", + "lines.moveUp": "Sposta la riga in alto", + "lines.moveDown": "Sposta la riga in basso", + "lines.sortAscending": "Ordinamento righe crescente", + "lines.sortDescending": "Ordinamento righe decrescente", + "lines.trimTrailingWhitespace": "Taglia spazio vuoto finale", + "lines.delete": "Elimina la riga", + "lines.indent": "Imposta un rientro per la riga", + "lines.outdent": "Riduci il rientro per la riga", + "lines.insertBefore": "Inserisci la riga sopra", + "lines.insertAfter": "Inserisci la riga sotto", + "lines.deleteAllLeft": "Elimina tutto a sinistra", + "lines.deleteAllRight": "Elimina tutto a destra", + "lines.joinLines": "Unisci righe", + "editor.transpose": "Trasponi caratteri intorno al cursore", + "editor.transformToUppercase": "Converti in maiuscolo", + "editor.transformToLowercase": "Converti in minuscolo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/links/links.i18n.json b/i18n/ita/src/vs/editor/contrib/links/links.i18n.json new file mode 100644 index 00000000000..bb29675d506 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/links/links.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Cmd + clic per seguire il collegamento", + "links.navigate": "CTRL + clic per seguire il collegamento", + "links.command.mac": "Cmd + click per eseguire il comando", + "links.command": "Ctrl + clic per eseguire il comando", + "links.navigate.al": "Alt + clic per seguire il collegamento", + "links.command.al": "Alt + clic per eseguire il comando", + "invalid.url": "Non è stato possibile aprire questo collegamento perché il formato non è valido: {0}", + "missing.url": "Non è stato possibile aprire questo collegamento perché manca la destinazione.", + "label": "Apri il collegamento" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/multicursor/multicursor.i18n.json b/i18n/ita/src/vs/editor/contrib/multicursor/multicursor.i18n.json new file mode 100644 index 00000000000..af2b081d453 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/multicursor/multicursor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Aggiungi cursore sopra", + "mutlicursor.insertBelow": "Aggiungi cursore sotto", + "mutlicursor.insertAtEndOfEachLineSelected": "Aggiungi cursore alla fine delle righe", + "addSelectionToNextFindMatch": "Aggiungi selezione a risultato ricerca successivo", + "addSelectionToPreviousFindMatch": "Aggiungi selezione a risultato ricerca precedente", + "moveSelectionToNextFindMatch": "Sposta ultima selezione a risultato ricerca successivo", + "moveSelectionToPreviousFindMatch": "Sposta ultima selezione a risultato ricerca precedente", + "selectAllOccurrencesOfFindMatch": "Seleziona tutte le occorrenze del risultato ricerca", + "changeAll.label": "Cambia tutte le occorrenze" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json b/i18n/ita/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json new file mode 100644 index 00000000000..27a96b2c54f --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Attiva i suggerimenti per i parametri" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json new file mode 100644 index 00000000000..f5613ad126f --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, suggerimento" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/ita/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json new file mode 100644 index 00000000000..29a73e519d0 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Mostra correzioni ({0})", + "quickFix": "Mostra correzioni", + "quickfix.trigger.label": "Correzione rapida" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json new file mode 100644 index 00000000000..fe8e7a6d653 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Chiudi" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json new file mode 100644 index 00000000000..a9e04aae3bb --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": " - Riferimenti di {0}", + "references.action.label": "Trova tutti i riferimenti" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json new file mode 100644 index 00000000000..af8f531bdc2 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Caricamento..." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json new file mode 100644 index 00000000000..d9f668ac458 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "simbolo in {0} alla riga {1} colonna {2}", + "aria.fileReferences.1": "1 simbolo in {0}, percorso completo {1}", + "aria.fileReferences.N": "{0} simboli in {1}, percorso completo {2}", + "aria.result.0": "Non sono stati trovati risultati", + "aria.result.1": "Trovato 1 simbolo in {0}", + "aria.result.n1": "Trovati {0} simboli in {1}", + "aria.result.nm": "Trovati {0} simboli in {1} file" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json new file mode 100644 index 00000000000..1b3c14ffa2f --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Non è stato possibile risolvere il file.", + "referencesCount": "{0} riferimenti", + "referenceCount": "{0} riferimento", + "missingPreviewMessage": "anteprima non disponibile", + "treeAriaLabel": "Riferimenti", + "noResults": "Nessun risultato", + "peekView.alternateTitle": "Riferimenti", + "peekViewTitleBackground": "Colore di sfondo dell'area del titolo della visualizzazione rapida.", + "peekViewTitleForeground": "Colore del titolo della visualizzazione rapida.", + "peekViewTitleInfoForeground": "Colore delle informazioni del titolo della visualizzazione rapida.", + "peekViewBorder": "Colore dei bordi e della freccia della visualizzazione rapida.", + "peekViewResultsBackground": "Colore di sfondo dell'elenco risultati della visualizzazione rapida.", + "peekViewResultsMatchForeground": "Colore primo piano dei nodi riga nell'elenco risultati della visualizzazione rapida.", + "peekViewResultsFileForeground": "Colore primo piano dei nodi file nell'elenco risultati della visualizzazione rapida.", + "peekViewResultsSelectionBackground": "Colore di sfondo della voce selezionata nell'elenco risultati della visualizzazione rapida.", + "peekViewResultsSelectionForeground": "Colore primo piano della voce selezionata nell'elenco risultati della visualizzazione rapida.", + "peekViewEditorBackground": "Colore di sfondo dell'editor di visualizzazioni rapide.", + "peekViewEditorGutterBackground": "Colore di sfondo della barra di navigazione nell'editor visualizzazione rapida.", + "peekViewResultsMatchHighlight": "Colore dell'evidenziazione delle corrispondenze nell'elenco risultati della visualizzazione rapida.", + "peekViewEditorMatchHighlight": "Colore dell'evidenziazione delle corrispondenze nell'editor di visualizzazioni rapide." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/rename/rename.i18n.json b/i18n/ita/src/vs/editor/contrib/rename/rename.i18n.json new file mode 100644 index 00000000000..c1a735fcca6 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/rename/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Nessun risultato.", + "aria": "Correttamente rinominato '{0}' in '{1}'. Sommario: {2}", + "rename.failed": "L'esecuzione dell'operazione di ridenominazione non è riuscita.", + "rename.label": "Rinomina simbolo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/rename/renameInputField.i18n.json b/i18n/ita/src/vs/editor/contrib/rename/renameInputField.i18n.json new file mode 100644 index 00000000000..8d3c8a03d06 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/rename/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Consente di rinominare l'input. Digitare il nuovo nome e premere INVIO per eseguire il commit." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json b/i18n/ita/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json new file mode 100644 index 00000000000..e50cd06027c --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Espandi SELECT", + "smartSelect.shrink": "Comprimi SELECT" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/suggest/suggestController.i18n.json b/i18n/ita/src/vs/editor/contrib/suggest/suggestController.i18n.json new file mode 100644 index 00000000000..a68bd5b22df --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/suggest/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "L'accettazione di '{0}' ha inserito il seguente testo: {1}", + "suggest.trigger.label": "Attiva suggerimento" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/suggest/suggestWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/suggest/suggestWidget.i18n.json new file mode 100644 index 00000000000..eb519f2c5dd --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/suggest/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "Colore di sfondo del widget dei suggerimenti.", + "editorSuggestWidgetBorder": "Colore del bordo del widget dei suggerimenti.", + "editorSuggestWidgetForeground": "Colore primo piano del widget dei suggerimenti.", + "editorSuggestWidgetSelectedBackground": "Colore di sfondo della voce selezionata del widget dei suggerimenti.", + "editorSuggestWidgetHighlightForeground": "Colore delle evidenziazioni corrispondenze nel widget dei suggerimenti.", + "readMore": "Altre informazioni...{0}", + "suggestionWithDetailsAriaLabel": "{0}, suggerimento, con dettagli", + "suggestionAriaLabel": "{0}, suggerimento", + "readLess": "Meno informazioni... {0}", + "suggestWidget.loading": "Caricamento...", + "suggestWidget.noSuggestions": "Non ci sono suggerimenti.", + "suggestionAriaAccepted": "{0}, accettato", + "ariaCurrentSuggestionWithDetails": "{0}, suggerimento, con dettagli", + "ariaCurrentSuggestion": "{0}, suggerimento" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json b/i18n/ita/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json new file mode 100644 index 00000000000..3994298789f --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Attiva/Disattiva l'uso di TAB per spostare lo stato attivo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json b/i18n/ita/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json new file mode 100644 index 00000000000..d57627a559a --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Colore di sfondo di un simbolo durante l'accesso in lettura, ad esempio durante la lettura di una variabile.", + "wordHighlightStrong": "Colore di sfondo di un simbolo durante l'accesso in scrittura, ad esempio durante la scrittura in una variabile.", + "overviewRulerWordHighlightForeground": "Colore del marcatore del righello delle annotazioni per le evidenziazioni dei simboli.", + "overviewRulerWordHighlightStrongForeground": "Colore del marcatore del righello delle annotazioni per le evidenziazioni dei simboli di accesso in scrittura.", + "wordHighlight.next.label": "Vai al prossimo simbolo evidenziato", + "wordHighlight.previous.label": "Vai al precedente simbolo evidenziato" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/ita/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index 18fcd600d7a..8b6ad71cd4e 100644 --- a/i18n/ita/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/ita/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -3,7 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "notFound": "L'estensione non è stata trovata", - "noCompatible": "Non è stata trovata una versione di {0} compatibile con questa versione di Visual Studio Code." -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/ita/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index e76a4c1b8b1..39a1c28e54e 100644 --- a/i18n/ita/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/ita/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,11 +6,10 @@ { "invalidManifest": "Estensione non valida: package.json non è un file JSON.", "restartCodeLocal": "Riavviare Code prima di reinstallare {0}.", - "restartCodeGallery": "Si prega di riavviare Code prima di reinstallare.", + "cancel": "Annulla", "uninstallDependeciesConfirmation": "Disinstallare solo '{0}' o anche le relative dipendenze?", "uninstallOnly": "Solo", "uninstallAll": "Tutto", - "cancel": "Annulla", "uninstallConfirmation": "Disinstallare '{0}'?", "ok": "OK", "singleDependentError": "Non è possibile disinstallare l'estensione '{0}'. L'estensione '{1}' dipende da tale estensione.", diff --git a/i18n/ita/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/ita/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json new file mode 100644 index 00000000000..2e88c81fa0d --- /dev/null +++ b/i18n/ita/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleTabs": "Attiva/disattiva visibilità delle schede", + "view": "Visualizza" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 089f3a4202c..00de0aab7d6 100644 --- a/i18n/ita/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -33,6 +33,7 @@ "openPreviousEditor": "Apri editor precedente", "nextEditorInGroup": "Apri editor successivo del gruppo", "openPreviousEditorInGroup": "Apri editor precedente del gruppo", + "lastEditorInGroup": "Apri ultimo editor del gruppo", "navigateNext": "Avanti", "navigatePrevious": "Indietro", "navigateLast": "Vai all'ultima", diff --git a/i18n/ita/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index 6a2e3d36941..29413ba4c6c 100644 --- a/i18n/ita/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,7 +6,6 @@ { "editorCommand.activeEditorMove.description": "Consente di spostare l'editor attivo per schede o gruppi", "editorCommand.activeEditorMove.arg.name": "Argomento per spostamento editor attivo", - "editorCommand.activeEditorMove.arg.description": "Proprietà degli argomenti:\n\t\t\t\t\t\t* 'to': valore stringa che specifica dove eseguire lo spostamento.\n\t\t\t\t\t\t* 'by': valore stringa che specifica l'unità per lo spostamento, ovvero per scheda o per gruppo.\n\t\t\t\t\t\t* 'value': valore numerico che specifica il numero di posizioni o una posizione assoluta per lo spostamento.\n\t\t\t\t\t", "commandDeprecated": "Il comando **{0}** è stato rimosso. In alternativa, usare **{1}**", "openKeybindings": "Configura tasti di scelta rapida" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index c8ef3502070..77162d4939a 100644 --- a/i18n/ita/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -53,5 +53,5 @@ "screenReaderDetectedExplanation.answerYes": "Sì", "screenReaderDetectedExplanation.answerNo": "No", "screenReaderDetectedExplanation.body1": "VS Code è ora ottimizzato per l'utilizzo con un'utilità per la lettura dello schermo.", - "screenReaderDetectedExplanation.body2": "Il comportamento di alcune funzionalità dell'editor sarà diverso, ad esempio a capo automatico, riduzione del codice, chiusura automatica delle parentesi e così via." + "screenReaderDetectedExplanation.body2": "Alcune funzionalità dell'editor avranno un comportamento differente: ad esempio a capo automatico, folding, ecc." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/quickopen.i18n.json b/i18n/ita/src/vs/workbench/browser/quickopen.i18n.json index 4419620dddd..01c4862b44e 100644 --- a/i18n/ita/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/quickopen.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "noResultsMatching": "Non ci sono risultati corrispondenti", - "noResultsFound2": "Non sono stati trovati risultati", - "entryAriaLabel": "{0}, comando" + "noResultsFound2": "Non sono stati trovati risultati" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json index 4a97354ad49..702864ad03a 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json @@ -30,7 +30,7 @@ "openRecent": "Apri recenti...", "quickOpenRecent": "Apertura rapida recenti...", "closeMessages": "Chiudi messaggi di notifica", - "reportIssues": "Segnala problemi", + "reportIssueInEnglish": "Segnala problema", "reportPerformanceIssue": "Segnala problema di prestazioni", "keybindingsReference": "Riferimento per tasti di scelta rapida", "openDocumentationUrl": "Documentazione", @@ -47,5 +47,14 @@ "showNextWindowTab": "Visualizza scheda della finestra successiva", "moveWindowTabToNewWindow": "Sposta scheda della finestra in una nuova finestra", "mergeAllWindowTabs": "Unisci tutte le finestre", - "toggleWindowTabsBar": "Attiva/Disattiva barra delle schede delle finestre" + "toggleWindowTabsBar": "Attiva/Disattiva barra delle schede delle finestre", + "configureLocale": "Configura lingua", + "displayLanguage": "Definisce la lingua visualizzata di VSCode.", + "doc": "Per un elenco delle lingue supportate, vedere {0}.", + "restart": "Se si modifica il valore, è necessario riavviare VSCode.", + "fail.createSettings": "Non è possibile creare '{0}' ({1}).", + "debug": "Debug", + "info": "Informazioni", + "warn": "Avviso", + "err": "Errore" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json index 527e50d39f6..0f9e509d30b 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,8 +7,8 @@ "view": "Visualizza", "help": "Guida", "file": "File", - "workspaces": "Aree di lavoro", "developer": "Sviluppatore", + "workspaces": "Aree di lavoro", "showEditorTabs": "Controlla se visualizzare o meno gli editor aperti in schede.", "workbench.editor.labelFormat.default": "Visualizza il nome del file. Quando le schede sono abilitate e due file hanno lo stesso nome in un unico gruppo, vengono aggiunte le sezioni distintive del percorso di ciascun file. Quando le schede sono disabilitate, se l'editor è attivo, viene visualizzato il percorso relativo alla radice dell'area di lavoro.", "workbench.editor.labelFormat.short": "Visualizza il nome del file seguito dal relativo nome di directory.", @@ -26,18 +26,16 @@ "closeOnFocusLost": "Controlla se Quick Open deve essere chiuso automaticamente quando perde lo stato attivo.", "openDefaultSettings": "Controlla se all'apertura delle impostazioni viene aperto anche un editor che mostra tutte le impostazioni predefinite.", "sideBarLocation": "Controlla la posizione della barra laterale. Può essere visualizzata a sinistra o a destra del workbench.", - "panelLocation": "Controlla la posizione del pannello. Può essere visualizzato in basso o a destra del Workbench.", "statusBarVisibility": "Controlla la visibilità della barra di stato nella parte inferiore del workbench.", "activityBarVisibility": "Controlla la visibilità della barra attività nel workbench.", "closeOnFileDelete": "Controlla se gli editor che visualizzano un file devono chiudersi automaticamente quando il file viene eliminato o rinominato da un altro processo. Se si disabilita questa opzione, in una simile circostanza l'editor verrà aperto e i file risulteranno modificati ma non salvati. Nota: se si elimina il file dall'interno dell'applicazione, l'editor verrà sempre chiuso e i file modificati ma non salvati non verranno mai chiusi allo scopo di salvaguardare i dati.", - "experimentalFuzzySearchEndpoint": "Indica l'endpoint da utilizzare per la ricerca di impostazioni sperimentali.", - "experimentalFuzzySearchKey": "Indica la chiave da utilizzare per la ricerca di impostazioni sperimentali.", "fontAliasing": "Controlla il metodo di aliasing dei caratteri nell'area di lavoro.\n- impostazione predefinita: anti-aliasing dei caratteri a livello di sub-pixel. Nella maggior parte delle visualizzazioni non retina consentirà di ottenere un testo con il massimo contrasto.\n- anti-aliasing: anti-aliasing dei caratteri a livello di pixel, invece che a livello di sub-pixel. Consente di visualizzare i caratteri più chiari.\n- nessuno: disabilita l'anti-aliasing dei caratteri. Il testo verrà visualizzato con contorni irregolari.", "workbench.fontAliasing.default": "Anti-aliasing dei caratteri a livello di sub-pixel. Nella maggior parte delle visualizzazioni non retina consentirà di ottenere un testo con il massimo contrasto.", "workbench.fontAliasing.antialiased": "Anti-aliasing dei caratteri a livello di pixel, invece che a livello di sub-pixel. Consente di visualizzare i caratteri più chiari.", "workbench.fontAliasing.none": "Disabilita l'anti-aliasing dei caratteri. Il testo verrà visualizzato con contorni irregolari. ", "swipeToNavigate": "Scorrere orizzontalmente con tre dita per spostarsi tra i file aperti.", "workbenchConfigurationTitle": "Area di lavoro", + "windowConfigurationTitle": "Finestra", "window.openFilesInNewWindow.on": "I file verranno aperti in una nuova finestra", "window.openFilesInNewWindow.off": "I file verranno aperti nella finestra con la cartella dei file aperta o nell'ultima finestra attiva", "window.openFilesInNewWindow.default": "I file verranno aperti nella finestra con la cartella dei file aperta o nell'ultima finestra attiva a meno che non vengano aperti tramite il pannello Dock o da Finder (solo MacOS)", @@ -69,11 +67,11 @@ "autoDetectHighContrast": "Se è abilitata, passa automaticamente a un tema a contrasto elevato se Windows usa un tema di questo tipo e al tipo scuro quando non si usa più un tema a contrasto elevato Windows.", "titleBarStyle": "Consente di modificare l'aspetto della barra del titolo della finestra. Per applicare le modifiche, è necessario un riavvio completo.", "window.nativeTabs": "Abilita le finestre di tab per macOS Sierra. La modifica richiede un riavvio. Eventuali personalizzazioni della barra del titolo verranno disabilitate", - "windowConfigurationTitle": "Finestra", "zenModeConfigurationTitle": "Modalità Zen", "zenMode.fullScreen": "Consente di controllare se attivando la modalità Zen anche l'area di lavoro passa alla modalità schermo intero.", "zenMode.hideTabs": "Controlla se attivando la modalità Zen vengono nascoste anche le schede del workbench.", "zenMode.hideStatusBar": "Controlla se attivando la modalità Zen viene nascosta anche la barra di stato nella parte inferiore del workbench.", "zenMode.hideActivityBar": "Controlla se attivando la modalità Zen viene nascosta anche la barra di stato alla sinistra del workbench", - "zenMode.restore": "Controlla se una finestra deve essere ripristinata nella modalità Zen se è stata chiusa in questa modalità." + "zenMode.restore": "Controlla se una finestra deve essere ripristinata nella modalità Zen se è stata chiusa in questa modalità.", + "JsonSchema.locale": "Linguaggio dell'interfaccia utente da usare." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index dbac73dc76f..217058d67fe 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -30,7 +30,6 @@ "deactivateBreakpoints": "Disattiva punti di interruzione", "reapplyAllBreakpoints": "Riapplica tutti i punti di interruzione", "addFunctionBreakpoint": "Aggiungi punto di interruzione della funzione", - "renameFunctionBreakpoint": "Rinomina punto di interruzione della funzione", "addConditionalBreakpoint": "Aggiungi punto di interruzione condizionale...", "editConditionalBreakpoint": "Modifica punto di interruzione...", "setValue": "Imposta valore", diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json new file mode 100644 index 00000000000..9f6d476a611 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editConditionalBreakpoint": "Modifica punto di interruzione...", + "functionBreakpointsNotSupported": "Punti di interruzione delle funzioni non sono supportati da questo tipo di debug", + "functionBreakpointPlaceholder": "Funzione per cui inserire il punto di interruzione", + "functionBreakPointInputAriaLabel": "Digitare il punto di interruzione della funzione" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json new file mode 100644 index 00000000000..33ed0232266 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "callstackSection": "Sezione Stack di chiamate", + "debugStopped": "In pausa su {0}", + "callStackAriaLabel": "Stack di chiamate di debug", + "process": "Processo", + "paused": "In pausa", + "running": "In esecuzione", + "thread": "Thread", + "pausedOn": "In pausa su {0}", + "loadMoreStackFrames": "Carica altri stack frame", + "threadAriaLabel": "Thread {0}, stack di chiamate, debug", + "stackFrameAriaLabel": "Riga{1} {2} dello stack frame {0}, stack di chiamate, debug" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index accd0baa3c6..7a0c9c59e95 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,5 +20,6 @@ "openExplorerOnEnd": "Apre automaticamente la visualizzazione di esplorazione al termine di una sessione di debug", "inlineValues": "Mostra i valori delle variabili inline nell'editor durante il debug", "hideActionBar": "Controlla se nascondere la barra delle azioni mobile di debug", + "openDebug": "Controlla se la viewlet di debug debba essere aperta all'avvio della sessione di debug.", "launch": "Configurazione globale per l'esecuzione del debug. Può essere usata come un'alternativa a \"launch.json\" " } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 9d3c0444235..c4da42088b5 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,6 @@ "breakpointAdded": "Aggiunto un punto di interruzione a riga {0} del file {1}", "breakpointRemoved": "Rimosso un punto di interruzione a riga {0} del file {1}", "compoundMustHaveConfigurations": "Per avviare più configurazioni, deve essere impostato l'attributo \"configurations\" dell'elemento compounds.", - "configMissing": "In 'launch.json' manca la configurazione '{0}'.", "debugRequestNotSupported": "Nella configurazione di debug scelta l'attributo '{0}' ha un valore non supportato '{1}'.", "debugRequesMissing": "Nella configurazione di debug scelta manca l'attributo '{0}'.", "debugTypeNotSupported": "Il tipo di debug configurato '{0}' non è supportato.", diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json new file mode 100644 index 00000000000..e93a0904c39 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Sezione Variabili", + "variablesAriaTreeLabel": "Esegui debug variabili", + "variableValueAriaLabel": "Digitare il nuovo valore della variabile", + "variableScopeAriaLabel": "Ambito {0}, variabili, debug", + "variableAriaLabel": "Valore {1} di {0}, variabili, debug" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json new file mode 100644 index 00000000000..63dbd8b4596 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expressionsSection": "Sezione Espressioni", + "watchAriaTreeLabel": "Esegui debug espressioni di controllo", + "watchExpressionPlaceholder": "Espressione da controllare", + "watchExpressionInputAriaLabel": "Digitare l'espressione di controllo", + "watchExpressionAriaLabel": "Valore {1} di {0}, espressione di controllo, debug", + "watchVariableAriaLabel": "Valore {1} di {0}, espressione di controllo, debug" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 9dc95614a88..aaef1bf10d2 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -10,16 +10,12 @@ "Uninstalling": "Disinstallazione", "updateAction": "Aggiorna", "updateTo": "Aggiorna a {0}", - "enableForWorkspaceAction.label": "Abilita (area di lavoro)", - "enableAlwaysAction.label": "Abilita (sempre)", - "disableForWorkspaceAction.label": "Disabilita (area di lavoro)", - "disableAlwaysAction.label": "Disabilita (sempre)", "ManageExtensionAction.uninstallingTooltip": "Disinstallazione", - "enableForWorkspaceAction": "Area di lavoro", - "enableGloballyAction": "Sempre", + "enableForWorkspaceAction": "Abilita (area di lavoro)", + "enableGloballyAction": "Abilita", "enableAction": "Abilita", - "disableForWorkspaceAction": "Area di lavoro", - "disableGloballyAction": "Sempre", + "disableForWorkspaceAction": "Disabilita (area di lavoro)", + "disableGloballyAction": "Disabilita", "disableAction": "Disabilita", "checkForUpdates": "Controlla la disponibilità di aggiornamenti", "enableAutoUpdate": "Abilita l'aggiornamento automatico delle estensioni", @@ -47,11 +43,8 @@ "allExtensionsInstalled": "Tutte le estensioni consigliate per questa area di lavoro sono già state installate", "installRecommendedExtension": "Installa l'estensione consigliata", "extensionInstalled": "L'estensione consigliata è già stata installata", - "showRecommendedKeymapExtensions": "Mostra mappature tastiera consigliate", "showRecommendedKeymapExtensionsShort": "Mappature tastiera", - "showLanguageExtensions": "Mostra estensioni del linguaggio", "showLanguageExtensionsShort": "Estensioni del linguaggio", - "showAzureExtensions": "Mostra estensioni di Azure", "showAzureExtensionsShort": "Estensioni di Azure", "OpenExtensionsFile.failed": "Non è possibile creare il file 'extensions.json' all'interno della cartella '.vscode' ({0}).", "configureWorkspaceRecommendedExtensions": "Configura estensioni consigliate (area di lavoro)", diff --git a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 12c0b28e83d..ada39f95c93 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -9,7 +9,7 @@ "extension": "Estensione", "extensions": "Estensioni", "view": "Visualizza", + "developer": "Sviluppatore", "extensionsConfigurationTitle": "Estensioni", - "extensionsAutoUpdate": "Aggiorna automaticamente le estensioni", - "extensionsIgnoreRecommendations": "Ignora le raccomandazioni di estensioni" + "extensionsAutoUpdate": "Aggiorna automaticamente le estensioni" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json new file mode 100644 index 00000000000..d7a84eb6e65 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reportExtensionIssue": "Segnala problema" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/ita/src/vs/workbench/parts/files/browser/fileActions.i18n.json index 3b0fcf88e98..7d23a38e703 100644 --- a/i18n/ita/src/vs/workbench/parts/files/browser/fileActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -69,5 +69,7 @@ "invalidFileNameError": "Il nome **{0}** non è valido per un nome file o un nome di cartella. Scegliere un nome diverso.", "filePathTooLongError": "Con il nome **{0}** il percorso diventa troppo lungo. Scegliere un nome più breve.", "compareWithSaved": "Confronta file attivo con file salvato", - "modifiedLabel": "{0} (su disco) ↔ {1}" + "modifiedLabel": "{0} (su disco) ↔ {1}", + "compareWithClipboard": "Confronta il file attivo con gli appunti", + "clipboardComparisonLabel": "Appunti ↔ {0}" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json new file mode 100644 index 00000000000..4133fa4bc3c --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "folders": "Cartelle" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json new file mode 100644 index 00000000000..08176692fa7 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "File", + "revealInSideBar": "Visualizza nella barra laterale" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json new file mode 100644 index 00000000000..976c0a1a9f7 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -0,0 +1,72 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Riprova", + "rename": "Rinomina", + "newFile": "Nuovo file", + "newFolder": "Nuova cartella", + "openFolderFirst": "Aprire prima di tutto una cartella per creare file o cartelle al suo interno.", + "newUntitledFile": "Nuovo file senza nome", + "createNewFile": "Nuovo file", + "createNewFolder": "Nuova cartella", + "deleteButtonLabelRecycleBin": "&&Sposta nel Cestino", + "deleteButtonLabelTrash": "&&Sposta nel cestino", + "deleteButtonLabel": "&&Elimina", + "dirtyMessageFolderOneDelete": "Si sta per eliminare una cartella con modifiche non salvate in un file. Continuare?", + "dirtyMessageFolderDelete": "Si sta per eliminare una cartella con modifiche non salvate in {0} file. Continuare?", + "dirtyMessageFileDelete": "Si sta per eliminare un file con modifiche non salvate. Continuare?", + "dirtyWarning": "Le modifiche apportate andranno perse se non vengono salvate.", + "confirmMoveTrashMessageFolder": "Eliminare '{0}' e il relativo contenuto?", + "confirmMoveTrashMessageFile": "Eliminare '{0}'?", + "undoBin": "È possibile ripristinare dal Cestino.", + "undoTrash": "È possibile ripristinare dal cestino.", + "doNotAskAgain": "Non chiedermelo di nuovo", + "confirmDeleteMessageFolder": "Eliminare definitivamente '{0}' e il relativo contenuto?", + "confirmDeleteMessageFile": "Eliminare definitivamente '{0}'?", + "irreversible": "Questa azione è irreversibile.", + "permDelete": "Elimina definitivamente", + "delete": "Elimina", + "importFiles": "Importa file", + "confirmOverwrite": "Nella cartella di destinazione esiste già un file o una cartella con lo stesso nome. Sovrascrivere?", + "replaceButtonLabel": "&&Sostituisci", + "copyFile": "Copia", + "pasteFile": "Incolla", + "duplicateFile": "Duplicato", + "openToSide": "Apri lateralmente", + "compareSource": "Seleziona per il confronto", + "globalCompareFile": "Confronta file attivo con...", + "openFileToCompare": "Aprire prima un file per confrontarlo con un altro file.", + "compareFiles": "Confronta file", + "refresh": "Aggiorna", + "save": "Salva", + "saveAs": "Salva con nome...", + "saveAll": "Salva tutto", + "saveAllInGroup": "Salva tutto nel gruppo", + "saveFiles": "Salva tutti i file", + "revert": "Ripristina file", + "focusOpenEditors": "Stato attivo su visualizzazione editor aperti", + "focusFilesExplorer": "Stato attivo su Esplora file", + "showInExplorer": "Visualizza file attivo nella barra laterale", + "openFileToShow": "Aprire prima di tutto un file per visualizzarlo in Esplora risorse", + "collapseExplorerFolders": "Comprimi cartelle in Explorer", + "refreshExplorer": "Aggiorna Explorer", + "openFileInNewWindow": "Apri file attivo in un'altra finestra", + "openFileToShowInNewWindow": "Aprire prima un file per visualizzarlo in un'altra finestra", + "revealInWindows": "Visualizza in Esplora risorse", + "revealInMac": "Visualizza in Finder", + "openContainer": "Apri cartella superiore", + "revealActiveFileInWindows": "Visualizza file attivo in Esplora risorse", + "revealActiveFileInMac": "Visualizza file attivo in Finder", + "openActiveFileContainer": "Apri cartella che contiene il file attivo", + "copyPath": "Copia percorso", + "copyPathOfActive": "Copia percorso del file attivo", + "emptyFileNameError": "È necessario specificare un nome file o un nome di cartella.", + "fileNameExistsError": "In questo percorso esiste già un file o una cartella **{0}**. Scegliere un nome diverso.", + "invalidFileNameError": "Il nome **{0}** non è valido per un nome file o un nome di cartella. Scegliere un nome diverso.", + "filePathTooLongError": "Con il nome **{0}** il percorso diventa troppo lungo. Scegliere un nome più breve.", + "compareWithSaved": "Confronta file attivo con file salvato", + "compareWithClipboard": "Confronta il file attivo con gli appunti" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json new file mode 100644 index 00000000000..a02c62cce4f --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Aprire prima un file per copiarne il percorso", + "openFileToReveal": "Aprire prima un file per visualizzarlo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json new file mode 100644 index 00000000000..d240e8fc075 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -0,0 +1,52 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Mostra Esplora risorse", + "explore": "Esplora risorse", + "view": "Visualizza", + "textFileEditor": "Editor file di testo", + "binaryFileEditor": "Editor file binari", + "filesConfigurationTitle": "File", + "exclude": "Consente di configurare i criteri GLOB per escludere file e cartelle. Ad esempio, la funzionalità Esplora file stabilisce quali file e cartelle mostrare o nascondere in base a questa impostazione.", + "files.exclude.boolean": "Criterio GLOB da usare per trovare percorsi file. Impostare su True o False per abilitare o disabilitare il criterio.", + "files.exclude.when": "Controllo aggiuntivo sugli elementi di pari livello di un file corrispondente. Usare $(basename) come variabile del nome file corrispondente.", + "associations": "Consente di configurare le associazioni tra file e linguaggi, ad esempio \"*.extension\": \"html\". Queste hanno la precedenza sulle associazioni predefinite dei linguaggi installate.", + "encoding": "Codifica del set di caratteri predefinita da usare durante la lettura e la scrittura di file. È possibile configurare questa impostazione anche in base alla lingua.", + "autoGuessEncoding": "Quando questa opzione è abilitata, la codifica del set di caratteri viene ipotizzata all'apertura dei file. È possibile configurare questa impostazione anche in base alla lingua.", + "eol": "Il carattere di fine riga predefinito. Utilizzare \\n per LF e \\r\\n per CRLF.", + "trimTrailingWhitespace": "Se è abilitato, taglierà lo spazio vuoto quando si salva un file.", + "insertFinalNewline": "Se è abilitato, inserisce un carattere di nuova riga finale alla fine del file durante il salvataggio.", + "trimFinalNewlines": "Se è abilitato, taglia tutte le nuove righe dopo il carattere di nuova riga finale alla fine del file durante il salvataggio.", + "files.autoSave.off": "Un file dirty non viene mai salvato automaticamente.", + "files.autoSave.afterDelay": "Un file dirty viene salvato automaticamente in base al valore configurato di 'files.autoSaveDelay'.", + "files.autoSave.onFocusChange": "Un file dirty viene salvato automaticamente quando l'editor perde lo stato attivo.", + "files.autoSave.onWindowChange": "Un file dirty viene salvato automaticamente quando la finestra perde lo stato attivo.", + "autoSave": "Controlla il salvataggio automatico dei file dirty. Valori accettati: '{0}', '{1}', '{2}' (l'editor perde lo stato attivo), '{3}' (la finestra perde lo stato attivo). Se è impostato su '{4}', è possibile configurare il ritardo in 'files.autoSaveDelay'.", + "autoSaveDelay": "Controlla il ritardo in ms dopo il quale un file dirty viene salvato automaticamente. Si applica solo quando 'files.autoSave' è impostato su '{0}'", + "watcherExclude": "Consente di configurare i criteri GLOB dei percorsi file da escludere dal controllo dei file. I criteri devono corrispondere in percorsi assoluti (per una corretta corrispondenza aggiungere come prefisso ** il percorso completo). Se si modifica questa impostazione, è necessario riavviare. Quando si nota che Code consuma troppo tempo della CPU all'avvio, è possibile escludere le cartelle di grandi dimensioni per ridurre il carico iniziale.", + "hotExit.off": "Disabilita Hot Exit.", + "hotExit.onExit": "La funzionalità Hot Exit verrà attivata alla chiusura dell'applicazione, ovvero quando si chiude l'ultima finestra in Windows/Linux o quando si attiva il comando workbench.action.quit (riquadro comandi, tasto di scelta rapida, menu). Tutte le finestre con backup verranno ripristinate al successivo avvio.", + "hotExit.onExitAndWindowClose": "La funzionalità Hot Exit verrà attivata alla chiusura dell'applicazione, ovvero quando si chiude l'ultima finestra in Windows/Linux o quando si attiva il comando workbench.action.quit (riquadro comandi, tasto di scelta rapida, menu), nonché per qualsiasi finestra con una cartella aperta indipendentemente dal fatto che sia l'ultima. Tutte le finestre senza cartelle aperte verranno ripristinate al successivo avvio. Per riportare le finestre di cartelle allo stato in cui si trovavano prima dell'arresto, impostare \"window.restoreFolders\" su \"all\".", + "hotExit": "Controlla se i file non salvati verranno memorizzati tra una sessione e l'altra, consentendo di ignorare il prompt di salvataggio alla chiusura dell'editor.", + "useExperimentalFileWatcher": "Usa il nuovo watcher di file sperimentale.", + "defaultLanguage": "Modalità linguaggio predefinita assegnata ai nuovi file.", + "editorConfigurationTitle": "Editor", + "formatOnSave": "Formatta un file durante il salvataggio. Deve essere disponibile un formattatore, il file non deve essere salvato automaticamente e l'editor non deve essere in fase di chiusura.", + "explorerConfigurationTitle": "Esplora file", + "openEditorsVisible": "Numero di editor visualizzati nel riquadro degli editor aperti. Impostarlo su 0 per nascondere il riquadro.", + "dynamicHeight": "Controlla se l'altezza della sezione degli editor aperti deve essere adattata o meno dinamicamente al numero di elementi.", + "autoReveal": "Controlla se Esplora risorse deve rivelare automaticamente e selezionare i file durante l'apertura.", + "enableDragAndDrop": "Controlla se Esplora risorse deve consentire lo spostamento di file e cartelle tramite trascinamento della selezione.", + "confirmDragAndDrop": "Controlla se Esplora risorse deve chiedere conferma prima di spostare file e cartelle tramite trascinamento della selezione.", + "confirmDelete": "Controlla se Esplora risorse deve chiedere una conferma quando si elimina file tramite il cestino.", + "sortOrder.default": "I file e le cartelle vengono ordinati in ordine alfabetico in base al nome. Le cartelle vengono visualizzate prima dei file.", + "sortOrder.mixed": "I file e le cartelle vengono ordinati ordine alfabetico in base al nome, in un unico elenco ordinato.", + "sortOrder.filesFirst": "I file e le cartelle vengono ordinati in ordine alfabetico in base al nome. I file vengono visualizzati prima delle cartelle.", + "sortOrder.type": "I file e le cartelle vengono ordinati in ordine alfabetico in base all'estensione. Le cartelle vengono visualizzate prima dei file.", + "sortOrder.modified": "I file e le cartelle vengono ordinati in ordine decrescente in base alla data dell'ultima modifica. Le cartelle vengono visualizzate prima dei file.", + "sortOrder": "Controlla l'ordinamento di file e cartelle in Esplora risorse. Oltre all'ordinamento predefinito, è possibile impostare l'ordine su 'mixed' (file e cartelle vengono ordinati insieme), 'type' (in base al tipo di file), 'modified' (in base alla data dell'ultima modifica) o 'filesFirst' (i file vengono ordinati prima delle cartelle).", + "explorer.decorations.badges": "Controlli se decorazioni file devono utilizzare badge." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json new file mode 100644 index 00000000000..49ebceb9611 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "userGuide": "Usare le azioni della barra degli strumenti dell'editor a destra per **annullare** le modifiche o per **sovrascrivere** il contenuto su disco con le modifiche", + "discard": "Rimuovi", + "overwrite": "Sovrascrivi", + "retry": "Riprova", + "readonlySaveError": "Non è stato possibile salvare '{0}': il file è protetto da scrittura. Selezionare 'Sovrascrivi' per rimuovere la protezione.", + "genericSaveError": "Non è stato possibile salvare '{0}': {1}", + "staleSaveError": "Non è stato possibile salvare '{0}': il contenuto sul disco è più recente. Fare clic su **Confronta** per confrontare la versione corrente con quella sul disco.", + "compareChanges": "Confronta", + "saveConflictDiffLabel": "{0} (su disco) ↔ {1} (in {2}) - Risolvere conflitto in fase di salvataggio" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json new file mode 100644 index 00000000000..4427bde01ef --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Nessuna cartella aperta", + "explorerSection": "Sezione Esplora file", + "noWorkspaceHelp": "Non hai ancora aggiunto cartelle nell'area di lavoro", + "noFolderHelp": "Non ci sono ancora cartelle aperte.", + "openFolder": "Apri cartella" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json new file mode 100644 index 00000000000..e0b8c74653b --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label": "Esplora risorse" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json new file mode 100644 index 00000000000..43fcd8d45a7 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Sezione Esplora file", + "treeAriaLabel": "Esplora file" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json new file mode 100644 index 00000000000..e1c70dabcca --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Digitare il nome file. Premere INVIO per confermare oppure ESC per annullare.", + "filesExplorerViewerAriaLabel": "{0}, Esplora file", + "dropFolders": "Aggiungere le cartelle all'area di lavoro?", + "dropFolder": "Aggiungere la cartella all'area di lavoro?", + "addFolders": "&& Aggiungi cartelle", + "addFolder": "&&Aggiungi cartella", + "confirmMove": "Sei sicuro di voler spostare '{0}'?", + "doNotAskAgain": "Non chiedermelo di nuovo", + "moveButtonLabel": "&&Sposta", + "confirmOverwriteMessage": "'{0}' esiste già nella cartella di destinazione. Sostituirlo?", + "irreversible": "Questa azione è irreversibile.", + "replaceButtonLabel": "&&Sostituisci" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json new file mode 100644 index 00000000000..5627c56823f --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Editor aperti", + "openEditosrSection": "Sezione Editor aperti", + "dirtyCounter": "{0} non salvati", + "saveAll": "Salva tutto", + "closeAllUnmodified": "Chiudi non modificati", + "closeAll": "Chiudi tutto", + "compareWithSaved": "Confronta con file salvato", + "close": "Chiudi", + "closeOthers": "Chiudi altri" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json new file mode 100644 index 00000000000..4ca857f227a --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, Gruppo di editor", + "openEditorAriaLabel": "{0}, Apri editor", + "saveAll": "Salva tutto", + "closeAllUnmodified": "Chiudi non modificati", + "closeAll": "Chiudi tutto", + "compareWithSaved": "Confronta con file salvato", + "close": "Chiudi", + "closeOthers": "Chiudi altri" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/ita/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/ita/src/vs/workbench/parts/markers/common/messages.i18n.json index ec1b923160e..e60e5ecc052 100644 --- a/i18n/ita/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,8 +6,6 @@ { "viewCategory": "Visualizza", "problems.view.toggle.label": "Attiva/disattiva problemi", - "problems.view.show.label": "Mostra problemi", - "problems.view.hide.label": "Nascondi problemi", "problems.panel.configuration.title": "Visualizzazione Problemi", "problems.panel.configuration.autoreveal": "Controlla se la visualizzazione Problemi deve visualizzare automaticamente i file durante l'apertura", "markers.panel.title.problems": "Problemi", diff --git a/i18n/ita/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json b/i18n/ita/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json new file mode 100644 index 00000000000..a4bad776c26 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "prof.message": "I profili sono stati creati.", + "prof.detail": "Creare un problema e allegare manualmente i file seguenti:\n{0}", + "prof.restartAndFileIssue": "Crea problema e riavvia", + "prof.restart": "Riavvia", + "prof.thanks": "Grazie per l'aiuto.", + "prof.detail.restart": "È necessario un riavvio alla fine per continuare a utilizzare '{0}'. Ancora una volta, grazie per il vostro contributo." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 90b8531e634..4d00ef4a863 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defineKeybinding.initial": "Premere la combinazione di tasti desiderata e INVIO. Premere ESC per annullare.", "defineKeybinding.chordsTo": "premi contemporaneamente per" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index 52ab13aa8f8..f9bb9629992 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -26,6 +26,7 @@ "editKeybindingLabel": "Cambia tasto di scelta rapida", "addKeybindingLabelWithKey": "Aggiungi tasto di scelta rapida {0}", "addKeybindingLabel": "Aggiungi tasto di scelta rapida", + "title": "{0} ({1})", "commandAriaLabel": "Il comando è {0}.", "keybindingAriaLabel": "Il tasto di scelta rapida è {0}.", "noKeybinding": "Non è stato assegnato alcun tasto di scelta rapida.", diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 7d41a6f7351..9968a08e4f3 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -7,12 +7,12 @@ "settingsEditorName": "Impostazioni predefinite", "SearchSettingsWidget.AriaLabel": "Cerca impostazioni", "SearchSettingsWidget.Placeholder": "Cerca impostazioni", - "totalSettingsMessage": "{0} impostazioni in totale", "noSettingsFound": "Nessun risultato", "oneSettingFound": "1 impostazione corrispondente", "settingsFound": "{0} impostazioni corrispondenti", - "fileEditorWithInputAriaLabel": "{0}. Editor file di testo.", - "fileEditorAriaLabel": "Editor file di testo.", + "totalSettingsMessage": "{0} impostazioni in totale", + "defaultSettings": "Impostazioni predefinite", + "defaultFolderSettings": "Impostazioni cartella predefinite", "defaultEditorReadonly": "Modificare nell'editor a destra per ignorare le impostazioni predefinite.", "preferencesAriaLabel": "Preferenze predefinite. Editor di testo di sola lettura." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 55d6b99c408..268c28632dd 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -7,8 +7,6 @@ "emptyUserSettingsHeader": "Inserire le impostazioni qui per sovrascrivere quelle predefinite.", "emptyWorkspaceSettingsHeader": "Inserire le impostazioni qui per sovrascrivere le impostazioni utente.", "emptyFolderSettingsHeader": "Inserire le impostazioni cartella qui per sovrascrivere quelle dell'area di lavoro.", - "defaultFolderSettingsTitle": "Impostazioni cartella predefinite", - "defaultSettingsTitle": "Impostazioni predefinite", "editTtile": "Modifica", "replaceDefaultValue": "Sostituisci nelle impostazioni", "copyDefaultValue": "Copia nelle impostazioni", diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index a440b0eccc0..4669fa3cd56 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultSettingsFuzzyPrompt": "Prova la ricerca fuzzy!", "defaultSettings": "Inserire le impostazioni nell'editor di lato destro per eseguire l'override.", "noSettingsFound": "Non sono state trovate impostazioni.", - "folderSettingsDetails": "Impostazioni cartella", - "enableFuzzySearch": "Attivare la ricerca fuzzy sperimentale" + "settingsSwitcherBarAriaLabel": "Selezione impostazioni", + "userSettings": "Impostazioni utente", + "workspaceSettings": "Impostazioni area di lavoro", + "folderSettings": "Impostazioni cartella" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json new file mode 100644 index 00000000000..5cc9af3d773 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Editor preferenze predefinite", + "keybindingsEditor": "Editor tasti di scelta rapida", + "preferences": "Preferenze" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json index 8bc8834c5e7..d0a197a727b 100644 --- a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -6,7 +6,6 @@ { "scm providers": "Provider di controllo del codice sorgente", "hideRepository": "Nascondi", - "commitMessage": "Message (press {0} to commit)", "installAdditionalSCMProviders": "Installa ulteriori provider SCM ...", "no open repo": "Non esistono provider di controllo codice sorgente attivi.", "source control": "Controllo del codice sorgente", diff --git a/i18n/ita/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/ita/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index db97a1723f4..e8eab9367a6 100644 --- a/i18n/ita/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defaultLabel": "input", - "useIgnoreFilesDescription": "Usa file ignorati", - "useExcludeSettingsDescription": "Utilizza impostazioni di esclusione" + "useExcludesAndIgnoreFilesDescription": "Utilizzare le impostazioni di esclusione e ignorare i file" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/search/browser/search.contribution.i18n.json index a5096d19095..25315a7f99e 100644 --- a/i18n/ita/src/vs/workbench/parts/search/browser/search.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -16,7 +16,6 @@ "exclude.boolean": "Criterio GLOB da usare per trovare percorsi file. Impostare su True o False per abilitare o disabilitare il criterio.", "exclude.when": "Controllo aggiuntivo sugli elementi di pari livello di un file corrispondente. Usare $(basename) come variabile del nome file corrispondente.", "useRipgrep": "Controlla l'utilizzo di ripgrep nelle ricerche su testo e file", - "useIgnoreFilesByDefault": "Controlla se utilizzare i file .gitignore e .ignore come impostazione predefinita durante la ricerca testuale in una nuova area di lavoro.", "useIgnoreFiles": "Controlla se utilizzare i file .gitignore e .ignore durante la ricerca di file", "search.quickOpen.includeSymbols": "Configurare questa opzione per includere i risultati di una ricerca di simboli globale nei risultati dei file per Quick Open.", "search.followSymlinks": "Controlla se seguire i collegamenti simbolici durante la ricerca." diff --git a/i18n/ita/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/ita/src/vs/workbench/parts/search/browser/searchActions.i18n.json index a7900586404..ebff6e3002a 100644 --- a/i18n/ita/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -10,17 +10,14 @@ "previousSearchExcludePattern": "Mostra i criteri di esclusione per la ricerca precedenti", "nextSearchTerm": "Mostra il termine di ricerca successivo", "previousSearchTerm": "Mostra il termine di ricerca precedente", - "focusNextInputBox": "Sposta lo stato attivo sulla casella di input successiva", - "focusPreviousInputBox": "Sposta lo stato attivo sulla casella di input precedente", "showSearchViewlet": "Mostra Cerca", "findInFiles": "Cerca nei file", "findInFilesWithSelectedText": "Cerca nei file con il testo selezionato", "replaceInFiles": "Sostituisci nei file", "replaceInFilesWithSelectedText": "Sostituisci nei file con il testo selezionato", - "findInWorkspace": "Trova nell'area di lavoro...", - "findInFolder": "Trova nella cartella...", "RefreshAction.label": "Aggiorna", - "ClearSearchResultsAction.label": "Cancella risultati della ricerca", + "CollapseDeepestExpandedLevelAction.label": "Comprimi tutto", + "ClearSearchResultsAction.label": "Cancella", "FocusNextSearchResult.label": "Sposta lo stato attivo sul risultato della ricerca successivo", "FocusPreviousSearchResult.label": "Sposta lo stato attivo sul risultato della ricerca precedente", "RemoveAction.label": "Chiudi", diff --git a/i18n/ita/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json new file mode 100644 index 00000000000..25315a7f99e --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Vai al simbolo nell'area di lavoro...", + "name": "Cerca", + "search": "Cerca", + "view": "Visualizza", + "openAnythingHandlerDescription": "Vai al file", + "openSymbolDescriptionNormal": "Vai al simbolo nell'area di lavoro", + "searchOutputChannelTitle": "Cerca", + "searchConfigurationTitle": "Cerca", + "exclude": "Consente di configurare i criteri GLOB per escludere file e cartelle nelle ricerche. Eredita tutti i criteri GLOB dall'impostazione files.exclude.", + "exclude.boolean": "Criterio GLOB da usare per trovare percorsi file. Impostare su True o False per abilitare o disabilitare il criterio.", + "exclude.when": "Controllo aggiuntivo sugli elementi di pari livello di un file corrispondente. Usare $(basename) come variabile del nome file corrispondente.", + "useRipgrep": "Controlla l'utilizzo di ripgrep nelle ricerche su testo e file", + "useIgnoreFiles": "Controlla se utilizzare i file .gitignore e .ignore durante la ricerca di file", + "search.quickOpen.includeSymbols": "Configurare questa opzione per includere i risultati di una ricerca di simboli globale nei risultati dei file per Quick Open.", + "search.followSymlinks": "Controlla se seguire i collegamenti simbolici durante la ricerca." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/ita/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json new file mode 100644 index 00000000000..dd91e701081 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "findInFolder": "Trova nella cartella...", + "findInWorkspace": "Trova nell'area di lavoro..." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 4f1a6c0fc9a..7defa5c4be7 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -6,10 +6,9 @@ { "tasksCategory": "Attività", "ConfigureTaskRunnerAction.label": "Configura attività", - "ConfigureBuildTaskAction.label": "Configura attività di compilazione", "CloseMessageAction.label": "Chiudi", - "ShowTerminalAction.label": "Visualizza terminale", "problems": "Problemi", + "building": "Compilazione in corso...", "manyMarkers": "Più di 99", "runningTasks": "Visualizza attività in esecuzione", "tasks": "Attività", @@ -52,7 +51,7 @@ "TaslService.noEntryToRun": "Non è stata trovata alcuna attività da eseguire. Configurare le attività...", "TaskService.fetchingBuildTasks": "Recupero delle attività di compilazione...", "TaskService.pickBuildTask": "Selezionare l'attività di compilazione da eseguire", - "TaskService.noBuildTask": "Non è stata trovata alcuna attività di compilazione da eseguire. Configurare le attività...", + "TaskService.noBuildTask": "Nessuna attività di compilazione da eseguire trovato. Configurare l'attività di compilazione...", "TaskService.fetchingTestTasks": "Recupero delle attività di test...", "TaskService.pickTestTask": "Selezionare l'attività di test da eseguire", "TaskService.noTestTaskTerminal": "Non è stata trovata alcuna attività di test da eseguire. Configurare le attività...", diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index acc06bc45a5..281f55cd821 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -7,6 +7,7 @@ "TerminalTaskSystem.unknownError": "Si è verificato un errore sconosciuto durante l'esecuzione di un'attività. Per dettagli, vedere il log di output dell'attività.", "dependencyFailed": "Non è stato possibile risolvere l'attività dipendente '{0}' nella cartella dell'area di lavoro '{1}'", "TerminalTaskSystem.terminalName": "Attività - {0}", + "closeTerminal": "Premere un tasto qualsiasi per chiudere il terminale.", "reuseTerminal": "Terminale verrà riutilizzato dalle attività, premere un tasto qualsiasi per chiuderlo.", "TerminalTaskSystem": "Non è possibile eseguire un comando della shell su un'unità UNC.", "unkownProblemMatcher": "Il matcher problemi {0} non può essere risolto. il matcher verrà ignorato" diff --git a/i18n/ita/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index 5adc56a7ea0..6022523a4a4 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,8 +14,7 @@ "ConfigurationParser.noTypeDefinition": "Errore: non ci sono attività registrate di tipo '{0}'. Non è stata installata un'estensione che fornisce un provider di task corrispondente?", "ConfigurationParser.missingRequiredProperty": "Errore: nella configurazione di attività '{0}' manca la proprietà obbligatoria '{1}'. La configurazione dell'attività verrà ignorata.", "ConfigurationParser.notCustom": "Errore: tasks non è dichiarato come un'attività personalizzata. La configurazione verrà ignorata.\n{0}\n", - "ConfigurationParser.noTaskName": "Errore: le attività devono specificare una proprietà taskName. L'attività verrà ignorata.\n{0}\n", - "taskConfiguration.shellArgs": "Avviso: l'attività '{0}' è un comando della shell e il nome del comando o uno dei relativi argomenti contiene spazi senza codice di escape. Per garantire la corretta indicazione della riga di comando, unire gli argomenti nel comando.", + "taskConfiguration.shellArgs": "Avviso: l'attività '{0}' è un comando di shell e uno dei suoi argomenti potrebbe avere spazi indesiderati. Per garantire la correttezza della riga di comando unire args nel comando stesso.", "taskConfiguration.noCommandOrDependsOn": "Errore: l'attività '{0}' non specifica un comando né una proprietà dependsOn. L'attività verrà ignorata. La sua definizione è:\n{1}", "taskConfiguration.noCommand": "Errore: l'attività '{0}' non definisce un comando. L'attività verrà ignorata. Definizione dell'attività:\n{1}", "TaskParse.noOsSpecificGlobalTasks": "L'attività versione 2.0.0 non supporta attività specifiche globali del sistema operativo. Convertirle in un'attività con un comando specifico del sistema operativo. Attività interessate:\n{0}" diff --git a/i18n/ita/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index 606a321e648..7dc41d5b700 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,7 +6,7 @@ { "termEntryAriaLabel": "{0}, selettore terminale", "termCreateEntryAriaLabel": "{0}, crea un nuovo terminale", - "'workbench.action.terminal.newplus": "$(plus) Crea nuovo terminale integrato", + "workbench.action.terminal.newplus": "$(plus) Crea nuovo terminale integrato", "noTerminalsMatching": "Nessun terminale corrispondente", "noTerminalsFound": "Nessun terminale aperto" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index fe866565bf0..f823b4b682f 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,7 +16,6 @@ "terminal.integrated.rightClickCopyPaste": "Se impostata, impedirà la visualizzazione del menu di scelta rapida quando si fa clic con il pulsante destro del mouse all'interno del terminale, ma eseguirà il comando Copia in presenza di una selezione e il comando Incolla in assenza di una selezione.", "terminal.integrated.fontFamily": "Controlla la famiglia di caratteri del terminale. L'impostazione predefinita è il valore di editor.fontFamily.", "terminal.integrated.fontSize": "Consente di controllare le dimensioni del carattere in pixel del terminale.", - "terminal.integrated.lineHeight": "Controlla l'altezza della riga del terminale. Questo numero è moltiplicato dalle dimensioni del carattere del terminale per ottenere l'altezza di riga effettiva in pixel.", "terminal.integrated.enableBold": "Per abilitare il grassetto del testo all'interno del terminale, è necessario il supporto della shell del terminale.", "terminal.integrated.cursorBlinking": "Controlla se il cursore del terminale è intermittente o meno.", "terminal.integrated.cursorStyle": "Controlla lo stile del cursore del terminale.", diff --git a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 7801fc1c436..551ccc06ba2 100644 --- a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,13 +5,14 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "Tema colori", + "themes.category.light": "temi chiari", + "themes.category.dark": "temi scuri", "installColorThemes": "Installa temi colori aggiuntivi...", "themes.selectTheme": "Selezionare il Tema colori (tasti su/giù per anteprima)", "selectIconTheme.label": "Tema icona file", - "installIconThemes": "Installa temi dell'icona file aggiuntivi...", "noIconThemeLabel": "Nessuno", "noIconThemeDesc": "Disabilita le icone dei file", - "problemChangingIconTheme": "Problema durante l'impostazione del tema dell'icona: {0}", + "installIconThemes": "Installa temi dell'icona file aggiuntivi...", "themes.selectIconTheme": "Seleziona il tema dell'icona file", "generateColorTheme.label": "Genera tema colore da impostazioni correnti", "preferences": "Preferenze", diff --git a/i18n/ita/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/ita/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 39e782467df..ff8f2cb8901 100644 --- a/i18n/ita/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/ita/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -9,9 +9,9 @@ "scope.window.description": "Configurazione specifica della finestra, che può essere configurata nelle impostazioni dell'utente o dell'area di lavoro.", "scope.resource.description": "Configurazione specifica di risorse, che possono essere configurate nelle impostazioni utente, in quelle dell'area di lavoro o di una cartella.", "scope.description": "Ambito in cui la configurazione è applicabile. Gli ambiti disponibili sono 'finestra' e 'risorsa'.", + "vscode.extension.contributes.defaultConfiguration": "Aggiunge come contributo le impostazioni di configurazione predefinite dell'editor in base al linguaggio.", "vscode.extension.contributes.configuration": "Impostazioni di configurazione di contributes.", "invalid.title": "'configuration.title' deve essere una stringa", - "vscode.extension.contributes.defaultConfiguration": "Aggiunge come contributo le impostazioni di configurazione predefinite dell'editor in base al linguaggio.", "invalid.properties": "'configuration.properties' deve essere un oggetto", "invalid.allOf": "'configuration.allOf' è deprecato e non deve più essere usato. Passare invece una matrice di sezioni di configurazione al punto di aggiunta contributo 'configuration'.", "workspaceConfig.folders.description": "Elenco di cartelle da caricare nell'area di lavoro.", diff --git a/i18n/ita/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json b/i18n/ita/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json new file mode 100644 index 00000000000..f3982be9f88 --- /dev/null +++ b/i18n/ita/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableCrashReporting": "Consente l'invio di segnalazioni di arresto anomalo del sistema a Microsoft.\nPer rendere effettiva questa opzione, è necessario riavviare." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/ita/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index 4f75b36a636..6c6578e8261 100644 --- a/i18n/ita/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "bubbleTitle": "contiene elementi sottolineati" + "bubbleTitle": "Contiene elementi enfatizzati" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/ita/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/ita/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/ita/src/vs/workbench/services/files/node/fileService.i18n.json index 158f28c3a3e..d4608f63401 100644 --- a/i18n/ita/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/files/node/fileService.i18n.json @@ -8,8 +8,8 @@ "fileIsDirectoryError": "Il File è una Directory", "fileNotModifiedError": "File non modificato dal giorno", "fileTooLargeError": "File troppo grande per essere aperto", - "fileBinaryError": "Il file sembra essere binario e non può essere aperto come file di testo", "fileNotFoundError": "Il file non è stato trovato ({0})", + "fileBinaryError": "Il file sembra essere binario e non può essere aperto come file di testo", "fileExists": "Il file da creare esiste già ({0})", "fileMoveConflict": "Non è possibile eseguire operazioni di spostamento/copia. Il file esiste già nella destinazione.", "unableToMoveCopyError": "Non è possibile eseguire operazioni di spostamento/copia. Il file sostituirebbe la cartella in cui è contenuto.", diff --git a/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 61103acf9b1..3f4aae3a6f0 100644 --- a/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -21,6 +21,5 @@ "keybindings.json.command": "Nome del comando da eseguire", "keybindings.json.when": "Condizione quando il tasto è attivo.", "keybindings.json.args": "Argomenti da passare al comando da eseguire.", - "keyboardConfigurationTitle": "Tastiera", - "dispatch": "Controlla la logica di invio delle pressioni di tasti da usare, tra `keydown.code` (scelta consigliata) e `keydown.keyCode`." + "keyboardConfigurationTitle": "Tastiera" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/ita/src/vs/workbench/services/textfile/common/textFileService.i18n.json index 5586632023b..8b6ad71cd4e 100644 --- a/i18n/ita/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "files.backup.failSave": "Non è stato possibile eseguire il backup dei file (errore {0}). Per chiudere, provare a salvare i file." -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 97d1cdc1754..c8e3f4e44d8 100644 --- a/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "migration.completed": "Sono state aggiunte nuove impostazioni tema alle impostazioni utente. Backup disponibile in {0}.", "error.cannotloadtheme": "Unable to load {0}: {1}", - "error.cannotloadicontheme": "Unable to load {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifica il tema dell'icona usato nell'area di lavoro oppure 'null' se non viene visualizzato alcun icona di file.", diff --git a/i18n/jpn/extensions/css/client/out/cssMain.i18n.json b/i18n/jpn/extensions/css/client/out/cssMain.i18n.json index fefe07e15fa..29ef8e73dad 100644 --- a/i18n/jpn/extensions/css/client/out/cssMain.i18n.json +++ b/i18n/jpn/extensions/css/client/out/cssMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "cssserver.name": "CSS 言語サーãƒãƒ¼" + "cssserver.name": "CSS 言語サーãƒãƒ¼", + "folding.start": "折りãŸãŸã¿é ˜åŸŸã®é–‹å§‹", + "folding.end": "折りãŸãŸã¿é ˜åŸŸã®çµ‚了" } \ No newline at end of file diff --git a/i18n/jpn/extensions/git/out/autofetch.i18n.json b/i18n/jpn/extensions/git/out/autofetch.i18n.json new file mode 100644 index 00000000000..a4b33109cea --- /dev/null +++ b/i18n/jpn/extensions/git/out/autofetch.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yes": "ã¯ã„", + "no": "ã„ã„ãˆ", + "not now": "ã‚ã¨ã§", + "suggest auto fetch": "Git リãƒã‚¸ãƒˆãƒªã®è‡ªå‹•フェッãƒã‚’有効ã«ã—ã¾ã™ã‹?" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/git/out/commands.i18n.json b/i18n/jpn/extensions/git/out/commands.i18n.json index e825de0716d..e73b6d879f2 100644 --- a/i18n/jpn/extensions/git/out/commands.i18n.json +++ b/i18n/jpn/extensions/git/out/commands.i18n.json @@ -9,9 +9,12 @@ "create branch": "$(plus) æ–°ã—ã„ブランãƒã‚’作æˆ", "repourl": "リãƒã‚¸ãƒˆãƒª URL", "parent": "親ディレクトリ", + "cancel": "$(sync~spin) リãƒã‚¸ãƒˆãƒªã®ã‚¯ãƒ­ãƒ¼ãƒ³ä¸­... キャンセルをクリックã—ã¦ãã ã•ã„", + "cancel tooltip": "クローンã®ã‚­ãƒ£ãƒ³ã‚»ãƒ«", "cloning": "Git リãƒã‚¸ãƒˆãƒªã‚’複製ã—ã¦ã„ã¾ã™...", "openrepo": "リãƒã‚¸ãƒˆãƒªã‚’é–‹ã", "proposeopen": "複製ã—ãŸãƒªãƒã‚¸ãƒˆãƒªã‚’é–‹ãã¾ã™ã‹?", + "init": "Git リãƒã‚¸ãƒˆãƒªã‚’åˆæœŸåŒ–ã™ã‚‹ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã—ã¦ãã ã•ã„", "init repo": "リãƒã‚¸ãƒˆãƒªã®åˆæœŸåŒ–", "create repo": "リãƒã‚¸ãƒˆãƒªã®åˆæœŸåŒ–", "are you sure": "'{0}' ã« Git リãƒã‚¸ãƒˆãƒªã‚’作æˆã—ã¾ã™ã€‚続行ã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹?", @@ -49,12 +52,15 @@ "select branch to delete": "削除ã™ã‚‹ãƒ–ランãƒã®é¸æŠž", "confirm force delete branch": "ブランム'{0}' ã¯ãƒžãƒ¼ã‚¸ã•れã¦ã„ã¾ã›ã‚“。ãれã§ã‚‚削除ã—ã¾ã™ã‹ï¼Ÿ", "delete branch": "ブランãƒã®å‰Šé™¤", + "invalid branch name": "無効ãªãƒ–ランãƒå", + "branch already exists": "ブランãƒå '{0}' ã¯æ—¢ã«å­˜åœ¨ã—ã¾ã™", "select a branch to merge from": "マージ元ã®ãƒ–ランãƒã‚’é¸æŠž", "merge conflicts": "マージã®ç«¶åˆãŒã‚りã¾ã™ã€‚コミットã™ã‚‹å‰ã«ã“れを解決ã—ã¦ãã ã•ã„。", "tag name": "ã‚¿ã‚°å", "provide tag name": "ã‚¿ã‚°åを入力ã—ã¦ãã ã•ã„。", "tag message": "メッセージ", "provide tag message": "注釈付ãã‚¿ã‚°ã«ã¤ã‘るメッセージを入力ã—ã¦ãã ã•ã„", + "no remotes to fetch": "リãƒã‚¸ãƒˆãƒªã«ã¯ã€ãƒ•ェッãƒå…ƒã¨ã—ã¦æ§‹æˆã•れã¦ã„るリモートãŒã‚りã¾ã›ã‚“。", "no remotes to pull": "リãƒã‚¸ãƒˆãƒªã«ã¯ã€ãƒ—ル元ã¨ã—ã¦æ§‹æˆã•れã¦ã„るリモートãŒã‚りã¾ã›ã‚“。", "pick remote pull repo": "リモートをé¸ã‚“ã§ã€ãƒ–ランãƒã‚’次ã‹ã‚‰ãƒ—ルã—ã¾ã™:", "no remotes to push": "リãƒã‚¸ãƒˆãƒªã«ã¯ã€ãƒ—ッシュ先ã¨ã—ã¦æ§‹æˆã•れã¦ã„るリモートãŒã‚りã¾ã›ã‚“。", @@ -71,7 +77,7 @@ "no stashes": "復元ã™ã‚‹ã‚¹ã‚¿ãƒƒã‚·ãƒ¥ãŒã‚りã¾ã›ã‚“。", "pick stash to pop": "é©ç”¨ã™ã‚‹ã‚¹ã‚¿ãƒƒã‚·ãƒ¥ã‚’é¸æŠžã—ã¦ãã ã•ã„", "clean repo": "ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã®å‰ã«ã€ãƒªãƒã‚¸ãƒˆãƒªã®ä½œæ¥­ãƒ„リーを消去ã—ã¦ãã ã•ã„。", - "cant push": "å‚照仕様をリモートã«ãƒ—ッシュã§ãã¾ã›ã‚“。最åˆã« 'Pull' を実行ã—ã¦å¤‰æ›´ã‚’çµ±åˆã—ã¦ãã ã•ã„。", + "cant push": "å‚照仕様をリモートã«ãƒ—ッシュã§ãã¾ã›ã‚“。最åˆã« 'Pull' を実行ã—ã¦å¤‰æ›´ã‚’çµ±åˆã—ã¦ãã ã•ã„。", "git error details": "Git: {0}", "git error": "Git エラー", "open git log": "Git ログを開ã" diff --git a/i18n/jpn/extensions/git/out/main.i18n.json b/i18n/jpn/extensions/git/out/main.i18n.json index 6bb5e4d4046..4af1f0fc9d9 100644 --- a/i18n/jpn/extensions/git/out/main.i18n.json +++ b/i18n/jpn/extensions/git/out/main.i18n.json @@ -4,8 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "looking": "Git を探ã—ã¦ã„ã¾ã™: {0}", "using git": "{1} ã‹ã‚‰ Git {0} を使用ã—ã¦ã„ã¾ã™", - "updateGit": "Git ã®æ›´æ–°", + "downloadgit": "Git ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰", "neverShowAgain": "今後ã¯è¡¨ç¤ºã—ãªã„", + "notfound": "Git ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。Git をインストールã™ã‚‹ã‹ 'git.path' 設定ã§ãƒ‘スを構æˆã—ã¦ãã ã•ã„。", + "updateGit": "Git ã®æ›´æ–°", "git20": "git {0} ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„るよã†ã§ã™ã€‚Code 㯠Git 2 ä»¥ä¸Šã§æœ€é©ã«å‹•作ã—ã¾ã™" } \ No newline at end of file diff --git a/i18n/jpn/extensions/git/out/repository.i18n.json b/i18n/jpn/extensions/git/out/repository.i18n.json index 553e8a8277f..230222eb69b 100644 --- a/i18n/jpn/extensions/git/out/repository.i18n.json +++ b/i18n/jpn/extensions/git/out/repository.i18n.json @@ -21,6 +21,7 @@ "deleted by us": "ã“ã¡ã‚‰å´ã«ã‚ˆã‚‹å‰Šé™¤", "both added": "åŒæ–¹ã¨ã‚‚追加", "both modified": "åŒæ–¹ã¨ã‚‚変更", + "commitMessage": "Message (press {0} to commit)", "commit": "コミット", "merge changes": "変更ã®ãƒžãƒ¼ã‚¸", "staged changes": "ステージング済ã¿ã®å¤‰æ›´", diff --git a/i18n/jpn/extensions/git/package.i18n.json b/i18n/jpn/extensions/git/package.i18n.json index 84c7a81f400..1574014e89e 100644 --- a/i18n/jpn/extensions/git/package.i18n.json +++ b/i18n/jpn/extensions/git/package.i18n.json @@ -33,8 +33,10 @@ "command.checkout": "ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆå…ˆ...", "command.branch": "ブランãƒã‚’作æˆ...", "command.deleteBranch": "ブランãƒã®å‰Šé™¤...", + "command.renameBranch": "ブランãƒåã®å¤‰æ›´...", "command.merge": "ブランãƒã‚’マージ...", "command.createTag": "タグを作æˆ", + "command.fetch": "フェッãƒ", "command.pull": "プル", "command.pullRebase": "プル (リベース)", "command.pullFrom": "指定元ã‹ã‚‰ãƒ—ル...", @@ -42,9 +44,11 @@ "command.pushTo": "プッシュ先...", "command.pushWithTags": "ã‚¿ã‚°ã‚’ã¤ã‘ã¦ãƒ—ッシュ", "command.sync": "åŒæœŸ", + "command.syncRebase": "åŒæœŸ (リベース)", "command.publish": "ブランãƒã®ç™ºè¡Œ", "command.showOutput": "Git 出力ã®è¡¨ç¤º", "command.ignore": "ファイルを .gitignore ã«è¿½åŠ ", + "command.stashIncludeUntracked": "スタッシュ (未追跡ファイルをå«ã‚€)", "command.stash": "スタッシュ", "command.stashPop": "スタッシュをé©ç”¨ã—ã¦å‰Šé™¤...", "command.stashPopLatest": "最新ã®ã‚¹ã‚¿ãƒƒã‚·ãƒ¥ã‚’é©ç”¨ã—ã¦å‰Šé™¤", @@ -57,6 +61,7 @@ "config.countBadge": "Git ãƒãƒƒã‚¸ カウンターを制御ã—ã¾ã™ã€‚`all` ã¯ã™ã¹ã¦ã®å¤‰æ›´ã‚’カウントã—ã¾ã™ã€‚ `tracked` ã¯è¿½è·¡ã—ã¦ã„る変更ã®ã¿ã‚«ã‚¦ãƒ³ãƒˆã—ã¾ã™ã€‚ `off` ã¯ã‚«ã‚¦ãƒ³ãƒˆã‚’オフã—ã¾ã™ã€‚", "config.checkoutType": "`Checkout to...` を実行ã™ã‚‹ã¨ãã«è¡¨ç¤ºã•れるブランãƒã®ç¨®é¡žã‚’制御ã—ã¾ã™ã€‚`all` ã¯ã™ã¹ã¦ã®å‚照を表示ã—ã¾ã™ã€‚`local` ã¯ãƒ­ãƒ¼ã‚«ãƒ« ブランãƒã®ã¿ã€`tags` ã¯ã‚¿ã‚°ã®ã¿ã€`remote` ã¯ãƒªãƒ¢ãƒ¼ãƒˆ ブランãƒã®ã¿ã‚’表示ã—ã¾ã™ã€‚ ", "config.ignoreLegacyWarning": "æ—§ Git ã®è­¦å‘Šã‚’無視ã—ã¾ã™", + "config.ignoreMissingGitWarning": "Git ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã®è­¦å‘Šã‚’無視ã—ã¾ã™", "config.ignoreLimitWarning": "リãƒã‚¸ãƒˆãƒªå†…ã«å¤‰æ›´ãŒå¤šã„å ´åˆã¯è­¦å‘Šã‚’無視ã—ã¾ã™", "config.defaultCloneDirectory": "Git リãƒã‚¸ãƒˆãƒªã‚’クローンã™ã‚‹æ—¢å®šã®å ´æ‰€", "config.enableSmartCommit": "ステージã•れãŸå¤‰æ›´ãŒãªã„å ´åˆã¯ã™ã¹ã¦ã®å¤‰æ›´ã‚’コミットã—ã¾ã™ã€‚", diff --git a/i18n/jpn/extensions/html/client/out/htmlMain.i18n.json b/i18n/jpn/extensions/html/client/out/htmlMain.i18n.json index d3ca6c5500c..bcf35d4b14f 100644 --- a/i18n/jpn/extensions/html/client/out/htmlMain.i18n.json +++ b/i18n/jpn/extensions/html/client/out/htmlMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "htmlserver.name": "HTML 言語サーãƒãƒ¼" + "htmlserver.name": "HTML 言語サーãƒãƒ¼", + "folding.start": "折りãŸãŸã¿é ˜åŸŸã®é–‹å§‹", + "folding.end": "折りãŸãŸã¿é ˜åŸŸã®çµ‚了" } \ No newline at end of file diff --git a/i18n/jpn/extensions/markdown/out/commands.i18n.json b/i18n/jpn/extensions/markdown/out/commands.i18n.json new file mode 100644 index 00000000000..bc7b2057e45 --- /dev/null +++ b/i18n/jpn/extensions/markdown/out/commands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previewTitle": "プレビュー {0}", + "onPreviewStyleLoadError": "'markdown.styles' を読ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã›ã‚“: {0}" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/jpn/extensions/markdown/out/features/previewContentProvider.i18n.json new file mode 100644 index 00000000000..6d4c8918e8f --- /dev/null +++ b/i18n/jpn/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ä¸€éƒ¨ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ãŒç„¡åйã«ãªã£ã¦ã„ã¾ã™", + "preview.securityMessage.title": "安全ã§ãªã„å¯èƒ½æ€§ãŒã‚ã‚‹ã‹ä¿è­·ã•れã¦ã„ãªã„コンテンツã¯ã€ãƒžãƒ¼ã‚¯ãƒ€ã‚¦ãƒ³ プレビューã§ç„¡åŠ¹åŒ–ã•れã¦ã„ã¾ã™ã€‚ä¿è­·ã•れã¦ã„ãªã„コンテンツやスクリプトを有効ã«ã™ã‚‹ã«ã¯ã€ãƒžãƒ¼ã‚¯ãƒ€ã‚¦ãƒ³ プレビューã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šã‚’変更ã—ã¦ãã ã•ã„", + "preview.securityMessage.label": "セキュリティãŒç„¡åйãªã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®è­¦å‘Š" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/markdown/out/security.i18n.json b/i18n/jpn/extensions/markdown/out/security.i18n.json index 4ef933fbf91..40f48a3d2fd 100644 --- a/i18n/jpn/extensions/markdown/out/security.i18n.json +++ b/i18n/jpn/extensions/markdown/out/security.i18n.json @@ -11,5 +11,8 @@ "disable.title": "無効ã«ã™ã‚‹", "disable.description": "ã™ã¹ã¦ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã¨ã‚¹ã‚¯ãƒªãƒ—トã®å®Ÿè¡Œã‚’許å¯ã—ã¾ã™ã€‚推奨ã•れã¾ã›ã‚“。", "moreInfo.title": "詳細情報", + "enableSecurityWarning.title": "ã“ã®ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã§ãƒ—レビューã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è­¦å‘Šã‚’有効ã«ã™ã‚‹", + "disableSecurityWarning.title": "ã“ã®ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã§ãƒ—レビューã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è­¦å‘Šã‚’有効ã«ã™ã‚‹", + "toggleSecurityWarning.description": "コンテンツã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ レベルã«å½±éŸ¿ã—ã¾ã›ã‚“", "preview.showPreviewSecuritySelector.title": "ワークスペースã®ãƒžãƒ¼ã‚¯ãƒ€ã‚¦ãƒ³ プレビューã«é–¢ã™ã‚‹ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šã‚’é¸æŠž " } \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/package.i18n.json b/i18n/jpn/extensions/merge-conflict/package.i18n.json index 3a6930d38af..e87fbfc30b0 100644 --- a/i18n/jpn/extensions/merge-conflict/package.i18n.json +++ b/i18n/jpn/extensions/merge-conflict/package.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "マージã®ç«¶åˆ", + "command.accept.all-current": "ç¾åœ¨ã®æ–¹ã‚’ã™ã¹ã¦å–り込む", "command.accept.all-incoming": "入力å´ã®ã™ã¹ã¦ã‚’å–り込む", "command.accept.all-both": "両方をã™ã¹ã¦å–り込む", "command.accept.current": "ç¾åœ¨ã®æ–¹ã‚’å–り込む", diff --git a/i18n/jpn/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/jpn/extensions/typescript/out/features/completionItemProvider.i18n.json index 98c4b9af245..e974f31a54e 100644 --- a/i18n/jpn/extensions/typescript/out/features/completionItemProvider.i18n.json +++ b/i18n/jpn/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "selectCodeAction": "é©ç”¨ã™ã‚‹ã‚³ãƒ¼ãƒ‰ ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’é¸æŠž", "acquiringTypingsLabel": "Typings ã®å®šç¾©ãƒ•ァイルをå–得中...", "acquiringTypingsDetail": "IntelliSense ã® Typings ã®å®šç¾©ãƒ•ァイルをå–å¾—ã—ã¦ã„ã¾ã™ã€‚", "autoImportLabel": "{0} ã‹ã‚‰è‡ªå‹•インãƒãƒ¼ãƒˆ" diff --git a/i18n/jpn/extensions/typescript/package.i18n.json b/i18n/jpn/extensions/typescript/package.i18n.json index b8035031298..837e11b2972 100644 --- a/i18n/jpn/extensions/typescript/package.i18n.json +++ b/i18n/jpn/extensions/typescript/package.i18n.json @@ -39,6 +39,7 @@ "typescript.openTsServerLog.title": "TS サーãƒãƒ¼ã®ãƒ­ã‚°ã‚’é–‹ã", "typescript.restartTsServer": "TS サーãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹", "typescript.selectTypeScriptVersion.title": "TypeScript ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®é¸æŠž", + "typescript.reportStyleChecksAsWarnings": "スタイルãƒã‚§ãƒƒã‚¯ãƒ¬ãƒãƒ¼ãƒˆã‚’警告扱ã„ã¨ã™ã‚‹", "jsDocCompletion.enabled": " 自動 JSDoc コメントを有効/無効ã«ã—ã¾ã™", "javascript.implicitProjectConfig.checkJs": "JavaScript ファイルã®ã‚»ãƒžãƒ³ãƒ†ã‚£ãƒƒã‚¯ ãƒã‚§ãƒƒã‚¯ã‚’有効/無効ã«ã—ã¾ã™ã€‚既存㮠jsconfi.json ã‚„ tsconfi.json ファイルã®è¨­å®šã¯ã“れより優先ã•れã¾ã™ã€‚TypeScript 㯠2.3.1 以上ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚", "typescript.npm": "型定義ã®è‡ªå‹•å–å¾—ã«ä½¿ç”¨ã•れる NPM 実行å¯èƒ½ãƒ•ァイルã¸ã®ãƒ‘スを指定ã—ã¾ã™ã€‚TypeScript 2.3.4 以上ãŒå¿…è¦ã§ã™ã€‚", diff --git a/i18n/jpn/src/vs/base/common/errorMessage.i18n.json b/i18n/jpn/src/vs/base/common/errorMessage.i18n.json index d233c445822..d496d4a7f81 100644 --- a/i18n/jpn/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/jpn/src/vs/base/common/errorMessage.i18n.json @@ -4,13 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "message": "{0}。エラー コード: {1}", - "error.permission.verbose": "アクセス許å¯ãŒæ‹’å¦ã•れã¾ã—㟠(HTTP {0})", - "error.permission": "アクセス許å¯ãŒæ‹’å¦ã•れã¾ã—ãŸ", - "error.http.verbose": "{0} (HTTP {1}: {2})", - "error.http": "{0} (HTTP {1})", - "error.connection.unknown.verbose": "䏿˜ŽãªæŽ¥ç¶šã‚¨ãƒ©ãƒ¼ ({0})", - "error.connection.unknown": "䏿˜ŽãªæŽ¥ç¶šã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚インターãƒãƒƒãƒˆæŽ¥ç¶šãŒåˆ‡ã‚ŒãŸã‹ã€æŽ¥ç¶šå…ˆã®ã‚µãƒ¼ãƒãƒ¼ãŒã‚ªãƒ•ラインã§ã™ã€‚", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "䏿˜Žãªã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ログã§è©³ç´°ã‚’確èªã—ã¦ãã ã•ã„。", "nodeExceptionMessage": "システム エラーãŒç™ºç”Ÿã—ã¾ã—㟠({0})", diff --git a/i18n/jpn/src/vs/code/electron-main/main.i18n.json b/i18n/jpn/src/vs/code/electron-main/main.i18n.json new file mode 100644 index 00000000000..a56e5d2c7c3 --- /dev/null +++ b/i18n/jpn/src/vs/code/electron-main/main.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "secondInstanceNoResponse": "{0} ã®åˆ¥ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒå®Ÿè¡Œä¸­ã§ã™ãŒå¿œç­”ã—ã¦ã„ã¾ã›ã‚“", + "secondInstanceNoResponseDetail": "ä»–ã™ã¹ã¦ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’é–‰ã˜ã¦ã‹ã‚‰ã‚‚ã†ä¸€åº¦ãŠè©¦ã—ãã ã•ã„。", + "secondInstanceAdmin": "{0} ã® 2 ã¤ç›®ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒæ—¢ã«ç®¡ç†è€…ã¨ã—ã¦å®Ÿè¡Œã•れã¦ã„ã¾ã™ã€‚", + "secondInstanceAdminDetail": "ä»–ã™ã¹ã¦ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’é–‰ã˜ã¦ã‹ã‚‰ã‚‚ã†ä¸€åº¦ãŠè©¦ã—ãã ã•ã„。", + "close": "é–‰ã˜ã‚‹(&&C)" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json index 776dd81e332..8a7dad6df22 100644 --- a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json @@ -22,12 +22,12 @@ "miQuit": "{0} を終了", "miNewFile": "æ–°è¦ãƒ•ァイル(&&N)", "miOpen": "é–‹ã(&&O)...", - "miOpenWorkspace": "ワークスペースを開ã(&&O)...", + "miOpenWorkspace": "ワークスペースを開ã(&&K)...", "miOpenFolder": "フォルダーを開ã(&&F)...", "miOpenFile": "ファイルを開ã(&&O)...", "miOpenRecent": "最近使用ã—ãŸé …目を開ã(&&R)", - "miSaveWorkspaceAs": "åå‰ã‚’付ã‘ã¦ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’ä¿å­˜(&&S)...", - "miAddFolderToWorkspace": "ワークスペースã«ãƒ•ォルダーを追加(&&A)...", + "miSaveWorkspaceAs": "åå‰ã‚’付ã‘ã¦ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’ä¿å­˜...", + "miAddFolderToWorkspace": "ワークスペースã«ãƒ•ォルダーを追加(&&D)...", "miSave": "ä¿å­˜(&&S)", "miSaveAs": "åå‰ã‚’付ã‘ã¦ä¿å­˜(&&A)...", "miSaveAll": "ã™ã¹ã¦ä¿å­˜(&&L)", @@ -157,7 +157,7 @@ "mMergeAllWindows": "ã™ã¹ã¦ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’çµ±åˆ", "miToggleDevTools": "開発者ツールã®åˆ‡ã‚Šæ›¿ãˆ(&&T)", "miAccessibilityOptions": "ユーザー補助オプション(&&O)", - "miReportIssues": "å•題ã®å ±å‘Š(&&I)", + "miReportIssue": "å•題ã®å ±å‘Š(&&I)", "miWelcome": "よã†ã“ã(&&W)", "miInteractivePlayground": "対話型プレイグラウンド(&&I)", "miDocumentation": "å‚照資料(&&D)", @@ -184,6 +184,7 @@ "miDownloadingUpdate": "更新をダウンロードã—ã¦ã„ã¾ã™...", "miInstallingUpdate": "更新プログラムをインストールã—ã¦ã„ã¾ã™...", "miCheckForUpdates": "æ›´æ–°ã®ç¢ºèª...", - "aboutDetail": "\nãƒãƒ¼ã‚¸ãƒ§ãƒ³ {0}\nコミット {1}\n日付 {2}\nシェル {3}\nレンダラー {4}\nNode {5}\nアーキテクãƒãƒ£ {6}", - "okButton": "OK" + "aboutDetail": "ãƒãƒ¼ã‚¸ãƒ§ãƒ³ {0}\nコミット {1}\n日付 {2}\nシェル {3}\nレンダラー {4}\nNode {5}\nアーキテクãƒãƒ£ {6}", + "okButton": "OK", + "copy": "コピー (&&C)" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/browser/services/bulkEdit.i18n.json b/i18n/jpn/src/vs/editor/browser/services/bulkEdit.i18n.json new file mode 100644 index 00000000000..4c84c291c57 --- /dev/null +++ b/i18n/jpn/src/vs/editor/browser/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "ã“ã®é–“ã«æ¬¡ã®ãƒ•ァイルãŒå¤‰æ›´ã•れã¾ã—ãŸ: {0}", + "summary.0": "編集ã¯è¡Œã‚れã¾ã›ã‚“ã§ã—ãŸ", + "summary.nm": "{1} 個ã®ãƒ•ァイル㧠{0} ä»¶ã®ãƒ†ã‚­ã‚¹ãƒˆç·¨é›†ã‚’実行", + "summary.n0": "1 ã¤ã®ãƒ•ァイル㧠{0} 個ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’編集" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json index 1d383dff2bb..f8dc120d025 100644 --- a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,7 +10,11 @@ "fontSize": "フォント サイズをピクセルå˜ä½ã§åˆ¶å¾¡ã—ã¾ã™ã€‚", "lineHeight": "行ã®é«˜ã•を制御ã—ã¾ã™ã€‚fontSize ã«åŸºã¥ã„㦠lineHeight を計算ã™ã‚‹å ´åˆã«ã¯ã€0 を使用ã—ã¾ã™ã€‚", "letterSpacing": "文字ã®é–“隔をピクセルå˜ä½ã§åˆ¶å¾¡ã—ã¾ã™ã€‚", - "lineNumbers": "行番å·ã®è¡¨ç¤ºã‚’制御ã—ã¾ã™ã€‚使用å¯èƒ½ãªå€¤ã¯ã€'on'ã€'off'ã€ãŠã‚ˆã³ 'relative' ã§ã™ã€‚'relative' ã¯ç¾åœ¨ã®ã‚«ãƒ¼ã‚½ãƒ«ä½ç½®ã‹ã‚‰ã®è¡Œæ•°ã‚’示ã—ã¾ã™ã€‚", + "lineNumbers.off": "行番å·ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。", + "lineNumbers.on": "行番å·ã¯ã€çµ¶å¯¾æ•°ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚", + "lineNumbers.relative": "行番å·ã¯ã€ã‚«ãƒ¼ã‚½ãƒ«ä½ç½®ã¾ã§ã®è¡Œæ•°ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚", + "lineNumbers.interval": "行番å·ã¯ 10 行ã”ã¨ã«è¡¨ç¤ºã•れã¾ã™ã€‚", + "lineNumbers": "行番å·ã®è¡¨ç¤ºã‚’制御ã—ã¾ã™ã€‚使用å¯èƒ½ãªå€¤ã¯ã€'on'ã€'off'ã€ãŠã‚ˆã³ 'relative' ã§ã™ã€‚", "rulers": "等幅フォントã®ç‰¹å®šç•ªå·ã®å¾Œã‚ã«åž‚直ルーラーを表示ã—ã¾ã™ã€‚複数ã®ãƒ«ãƒ¼ãƒ©ãƒ¼ã«ã¯è¤‡æ•°ã®å€¤ã‚’使用ã—ã¾ã™ã€‚é…列ãŒç©ºã®å ´åˆã¯ãƒ«ãƒ¼ãƒ©ãƒ¼ã‚’表示ã—ã¾ã›ã‚“。", "wordSeparators": "å˜èªžã«é–¢é€£ã—ãŸãƒŠãƒ“ゲーションã¾ãŸã¯æ“作を実行ã™ã‚‹ã¨ãã«ã€å˜èªžã®åŒºåˆ‡ã‚Šæ–‡å­—ã¨ã—ã¦ä½¿ç”¨ã•れる文字", "tabSize": "1 ã¤ã®ã‚¿ãƒ–ã«ç›¸å½“ã™ã‚‹ã‚¹ãƒšãƒ¼ã‚¹ã®æ•°ã€‚`editor.detectIndentation` ãŒã‚ªãƒ³ã®å ´åˆã€ã“ã®è¨­å®šã¯ãƒ•ァイル コンテンツã«åŸºã¥ã„ã¦ä¸Šæ›¸ãã•れã¾ã™ã€‚", @@ -89,8 +93,8 @@ "links": "エディターãŒãƒªãƒ³ã‚¯ã‚’検出ã—ã¦ã‚¯ãƒªãƒƒã‚¯å¯èƒ½ãªçŠ¶æ…‹ã«ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™", "colorDecorators": "エディターã§ã‚¤ãƒ³ãƒ©ã‚¤ãƒ³ カラー デコレーターã¨è‰²ã®é¸æŠžã‚’表示ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", "codeActions": "コード アクション (lightbulb) を有効ã«ã™ã‚‹", + "selectionClipboard": "Linux ã® PRIMARY クリップボードをサãƒãƒ¼ãƒˆã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", "sideBySide": "差分エディターãŒå·®åˆ†ã‚’横ã«ä¸¦ã¹ã¦è¡¨ç¤ºã™ã‚‹ã‹ã€è¡Œå†…ã«è¡¨ç¤ºã™ã‚‹ã‹ã‚’制御ã—ã¾ã™", "ignoreTrimWhitespace": "差分エディターãŒã€å…ˆé ­ã¾ãŸã¯æœ«å°¾ã®ç©ºç™½ã®å¤‰æ›´ã‚’差分ã¨ã—ã¦è¡¨ç¤ºã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", - "renderIndicators": "差分エディターãŒè¿½åŠ /削除ã•れãŸå¤‰æ›´ã« +/- インジケーターを示ã™ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™", - "selectionClipboard": "Linux ã® PRIMARY クリップボードをサãƒãƒ¼ãƒˆã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚" + "renderIndicators": "差分エディターãŒè¿½åŠ /削除ã•れãŸå¤‰æ›´ã« +/- インジケーターを示ã™ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/jpn/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json new file mode 100644 index 00000000000..f800170e7d3 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "ブラケットã¸ç§»å‹•" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json b/i18n/jpn/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json new file mode 100644 index 00000000000..ba2310b3ed5 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "キャレットを左ã«ç§»å‹•", + "caret.moveRight": "キャレットをå³ã«ç§»å‹•" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/caretOperations/transpose.i18n.json b/i18n/jpn/src/vs/editor/contrib/caretOperations/transpose.i18n.json new file mode 100644 index 00000000000..22876b64d42 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/caretOperations/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "文字ã®å…¥ã‚Œæ›¿ãˆ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/clipboard/clipboard.i18n.json b/i18n/jpn/src/vs/editor/contrib/clipboard/clipboard.i18n.json new file mode 100644 index 00000000000..d52c3575c45 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/clipboard/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "切りå–り", + "actions.clipboard.copyLabel": "コピー", + "actions.clipboard.pasteLabel": "貼り付ã‘", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "構文を強調表示ã—ã¦ã‚³ãƒ”ー" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/comment/comment.i18n.json b/i18n/jpn/src/vs/editor/contrib/comment/comment.i18n.json new file mode 100644 index 00000000000..dbb6b93c0b6 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/comment/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "行コメントã®åˆ‡ã‚Šæ›¿ãˆ", + "comment.line.add": "行コメントã®è¿½åŠ ", + "comment.line.remove": "行コメントã®å‰Šé™¤", + "comment.block": "ブロック コメントã®åˆ‡ã‚Šæ›¿ãˆ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json b/i18n/jpn/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json new file mode 100644 index 00000000000..070e2831f8a --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "エディターã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ メニューã®è¡¨ç¤º" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/find/findController.i18n.json b/i18n/jpn/src/vs/editor/contrib/find/findController.i18n.json new file mode 100644 index 00000000000..93947cdf9ce --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/find/findController.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "検索", + "findNextMatchAction": "次を検索", + "findPreviousMatchAction": "å‰ã‚’検索", + "nextSelectionMatchFindAction": "次ã®é¸æŠžé …目を検索", + "previousSelectionMatchFindAction": "å‰ã®é¸æŠžé …目を検索", + "startReplace": "ç½®æ›", + "showNextFindTermAction": "æ¬¡ã®æ¤œç´¢èªžå¥ã‚’表示", + "showPreviousFindTermAction": "å‰ã®æ¤œç´¢èªžå¥ã‚’表示" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/find/findWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/find/findWidget.i18n.json new file mode 100644 index 00000000000..4dc327d6de8 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/find/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "検索", + "placeholder.find": "検索", + "label.previousMatchButton": "å‰ã®ä¸€è‡´é …ç›®", + "label.nextMatchButton": "次ã®ä¸€è‡´é …ç›®", + "label.toggleSelectionFind": "é¸æŠžç¯„å›²ã‚’æ¤œç´¢", + "label.closeButton": "é–‰ã˜ã‚‹", + "label.replace": "ç½®æ›", + "placeholder.replace": "ç½®æ›", + "label.replaceButton": "ç½®æ›", + "label.replaceAllButton": "ã™ã¹ã¦ç½®æ›", + "label.toggleReplaceButton": "ç½®æ›ãƒ¢ãƒ¼ãƒ‰ã®åˆ‡ã‚Šæ›¿ãˆ", + "title.matchesCountLimit": "最åˆã® {0} ä»¶ã®çµæžœã ã‘ãŒå¼·èª¿è¡¨ç¤ºã•れã¾ã™ãŒã€ã™ã¹ã¦ã®æ¤œç´¢æ“作ã¯ãƒ†ã‚­ã‚¹ãƒˆå…¨ä½“ã§æ©Ÿèƒ½ã—ã¾ã™ã€‚", + "label.matchesLocation": "{0} / {1} ä»¶", + "label.noResults": "çµæžœãªã—" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/find/simpleFindWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/find/simpleFindWidget.i18n.json new file mode 100644 index 00000000000..19f4b3b0c2d --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/find/simpleFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "検索", + "placeholder.find": "検索", + "label.previousMatchButton": "å‰ã®ä¸€è‡´é …ç›®", + "label.nextMatchButton": "次ã®ä¸€è‡´é …ç›®", + "label.closeButton": "é–‰ã˜ã‚‹" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/jpn/src/vs/editor/contrib/folding/folding.i18n.json new file mode 100644 index 00000000000..9d34d92b926 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/folding/folding.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "展開", + "unFoldRecursivelyAction.label": "å†å¸°çš„ã«å±•é–‹", + "foldAction.label": "折りãŸãŸã¿", + "foldRecursivelyAction.label": "å†å¸°çš„ã«æŠ˜ã‚ŠãŸãŸã‚€", + "foldAllBlockComments.label": "ã™ã¹ã¦ã®ãƒ–ロック ã‚³ãƒ¡ãƒ³ãƒˆã®æŠ˜ã‚ŠãŸãŸã¿", + "foldAllAction.label": "ã™ã¹ã¦æŠ˜ã‚ŠãŸãŸã¿", + "unfoldAllAction.label": "ã™ã¹ã¦å±•é–‹", + "foldLevelAction.label": "折りãŸãŸã¿ãƒ¬ãƒ™ãƒ« {0}" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/format/formatActions.i18n.json b/i18n/jpn/src/vs/editor/contrib/format/formatActions.i18n.json new file mode 100644 index 00000000000..077fe93a291 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/format/formatActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "行 {0} ã§ 1 ã¤ã®æ›¸å¼è¨­å®šã‚’編集", + "hintn1": "行 {1} ã§ {0} å€‹ã®æ›¸å¼è¨­å®šã‚’編集", + "hint1n": "行 {0} 㨠{1} ã®é–“ã§ 1 ã¤ã®æ›¸å¼è¨­å®šã‚’編集", + "hintnn": "行 {1} 㨠{2} ã®é–“ã§ {0} å€‹ã®æ›¸å¼è¨­å®šã‚’編集", + "no.provider": "申ã—訳ã‚りã¾ã›ã‚“。インストールã•れ㟠'{0}'ファイル用ã®ãƒ•ォーマッターãŒå­˜åœ¨ã—ã¾ã›ã‚“。", + "formatDocument.label": "ドキュメントã®ãƒ•ォーマット", + "formatSelection.label": "é¸æŠžç¯„å›²ã®ãƒ•ォーマット" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json new file mode 100644 index 00000000000..624f9b7af70 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "'{0}' ã®å®šç¾©ã¯è¦‹ã¤ã‹ã‚Šã¾ã›ã‚“", + "generic.noResults": "定義ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“", + "meta.title": " – {0} 個ã®å®šç¾©", + "actions.goToDecl.label": "定義ã¸ç§»å‹•", + "actions.goToDeclToSide.label": "定義を横ã«é–‹ã", + "actions.previewDecl.label": "定義をã“ã“ã«è¡¨ç¤º", + "goToImplementation.noResultWord": "'{0}' ã®å®Ÿè£…ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“", + "goToImplementation.generic.noResults": "実装ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“", + "meta.implementations.title": "– {0} 個ã®å®Ÿè£…", + "actions.goToImplementation.label": "実装ã«ç§»å‹•", + "actions.peekImplementation.label": "実装ã®ãƒ—レビュー", + "goToTypeDefinition.noResultWord": "'{0}' ã®åž‹å®šç¾©ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“", + "goToTypeDefinition.generic.noResults": "型定義ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“", + "meta.typeDefinitions.title": " – {0} 個ã®åž‹å®šç¾©", + "actions.goToTypeDefinition.label": "型定義ã¸ç§»å‹•", + "actions.peekTypeDefinition.label": "型定義を表示" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json new file mode 100644 index 00000000000..f918ba9f96d --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "クリックã—ã¦ã€{0} ã®å®šç¾©ã‚’表示ã—ã¾ã™ã€‚" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/gotoError/gotoError.i18n.json b/i18n/jpn/src/vs/editor/contrib/gotoError/gotoError.i18n.json new file mode 100644 index 00000000000..53ea71a9d4e --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/gotoError/gotoError.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "次ã®ã‚¨ãƒ©ãƒ¼ã¾ãŸã¯è­¦å‘Šã¸ç§»å‹•", + "markerAction.previous.label": "å‰ã®ã‚¨ãƒ©ãƒ¼ã¾ãŸã¯è­¦å‘Šã¸ç§»å‹•", + "editorMarkerNavigationError": "エディターã®ãƒžãƒ¼ã‚«ãƒ¼ ナビゲーション ウィジェットã®ã‚¨ãƒ©ãƒ¼ã®è‰²ã€‚", + "editorMarkerNavigationWarning": "エディターã®ãƒžãƒ¼ã‚«ãƒ¼ ナビゲーション ウィジェットã®è­¦å‘Šã®è‰²ã€‚", + "editorMarkerNavigationInfo": "エディターã®ãƒžãƒ¼ã‚«ãƒ¼ ナビゲーション ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã®æƒ…å ±ã®è‰²ã€‚", + "editorMarkerNavigationBackground": "エディターã®ãƒžãƒ¼ã‚«ãƒ¼ ナビゲーション ウィジェットã®èƒŒæ™¯ã€‚" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/hover/hover.i18n.json b/i18n/jpn/src/vs/editor/contrib/hover/hover.i18n.json new file mode 100644 index 00000000000..13ad7162719 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/hover/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "ホãƒãƒ¼ã®è¡¨ç¤º" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/hover/modesContentHover.i18n.json b/i18n/jpn/src/vs/editor/contrib/hover/modesContentHover.i18n.json new file mode 100644 index 00000000000..7606a08044a --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/hover/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "読ã¿è¾¼ã‚“ã§ã„ã¾ã™..." +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json b/i18n/jpn/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json new file mode 100644 index 00000000000..2136e47678d --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "å‰ã®å€¤ã«ç½®æ›", + "InPlaceReplaceAction.next.label": "次ã®å€¤ã«ç½®æ›" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/indentation/indentation.i18n.json b/i18n/jpn/src/vs/editor/contrib/indentation/indentation.i18n.json new file mode 100644 index 00000000000..94408494ff6 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/indentation/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "インデントをスペースã«å¤‰æ›", + "indentationToTabs": "インデントをタブã«å¤‰æ›", + "configuredTabSize": "æ§‹æˆã•れãŸã‚¿ãƒ–ã®ã‚µã‚¤ã‚º", + "selectTabWidth": "ç¾åœ¨ã®ãƒ•ァイルã®ã‚¿ãƒ–ã®ã‚µã‚¤ã‚ºã‚’é¸æŠž", + "indentUsingTabs": "タブã«ã‚ˆã‚‹ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆ", + "indentUsingSpaces": "スペースã«ã‚ˆã‚‹ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆ", + "detectIndentation": "内容ã‹ã‚‰ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã‚’検出", + "editor.reindentlines": "行ã®å†ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json b/i18n/jpn/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json new file mode 100644 index 00000000000..a9fd8094ec7 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "行を上ã¸ã‚³ãƒ”ー", + "lines.copyDown": "行を下ã¸ã‚³ãƒ”ー", + "lines.moveUp": "行を上ã¸ç§»å‹•", + "lines.moveDown": "行を下ã¸ç§»å‹•", + "lines.sortAscending": "行を昇順ã«ä¸¦ã¹æ›¿ãˆ", + "lines.sortDescending": "行をé™é †ã«ä¸¦ã¹æ›¿ãˆ", + "lines.trimTrailingWhitespace": "末尾ã®ç©ºç™½ã®ãƒˆãƒªãƒŸãƒ³ã‚°", + "lines.delete": "行ã®å‰Šé™¤", + "lines.indent": "行ã®ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆ", + "lines.outdent": "行ã®ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆè§£é™¤", + "lines.insertBefore": "è¡Œã‚’ä¸Šã«æŒ¿å…¥", + "lines.insertAfter": "è¡Œã‚’ä¸‹ã«æŒ¿å…¥", + "lines.deleteAllLeft": "å·¦å´ã‚’ã™ã¹ã¦å‰Šé™¤", + "lines.deleteAllRight": "å³å´ã‚’ã™ã¹ã¦å‰Šé™¤", + "lines.joinLines": "行をã¤ãªã’ã‚‹", + "editor.transpose": "カーソルã®å‘¨å›²ã®æ–‡å­—を入れ替ãˆã‚‹", + "editor.transformToUppercase": "大文字ã«å¤‰æ›", + "editor.transformToLowercase": "å°æ–‡å­—ã«å¤‰æ›" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/links/links.i18n.json b/i18n/jpn/src/vs/editor/contrib/links/links.i18n.json new file mode 100644 index 00000000000..e00353168e9 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/links/links.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "command キーを押ã—ãªãŒã‚‰ã‚¯ãƒªãƒƒã‚¯ã—ã¦ãƒªãƒ³ã‚¯å…ˆã‚’表示", + "links.navigate": "Ctrl キーを押ã—ãªãŒã‚‰ã‚¯ãƒªãƒƒã‚¯ã—ã¦ãƒªãƒ³ã‚¯å…ˆã‚’表示", + "links.command.mac": "command キーを押ã—ãªãŒã‚‰ã‚¯ãƒªãƒƒã‚¯ã—ã¦ã‚³ãƒžãƒ³ãƒ‰ã‚’実行", + "links.command": "Ctrl キーを押ã—ãªãŒã‚‰ã‚¯ãƒªãƒƒã‚¯ã—ã¦ã‚³ãƒžãƒ³ãƒ‰ã‚’実行", + "links.navigate.al": "Altl キーを押ã—ãªãŒã‚‰ã‚¯ãƒªãƒƒã‚¯ã—ã¦ãƒªãƒ³ã‚¯å…ˆã‚’表示", + "links.command.al": "Alt キーを押ã—ãªãŒã‚‰ã‚¯ãƒªãƒƒã‚¯ã—ã¦ã‚³ãƒžãƒ³ãƒ‰ã‚’実行", + "invalid.url": "申ã—訳ã‚りã¾ã›ã‚“。ã“ã®ãƒªãƒ³ã‚¯ã¯å½¢å¼ãŒæ­£ã—ããªã„ãŸã‚é–‹ãã“ã¨ãŒã§ãã¾ã›ã‚“ã§ã—ãŸ: {0}", + "missing.url": "申ã—訳ã‚りã¾ã›ã‚“。ã“ã®ãƒªãƒ³ã‚¯ã¯ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãŒå­˜åœ¨ã—ãªã„ãŸã‚é–‹ãã“ã¨ãŒã§ãã¾ã›ã‚“ã§ã—ãŸã€‚", + "label": "リンクを開ã" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/multicursor/multicursor.i18n.json b/i18n/jpn/src/vs/editor/contrib/multicursor/multicursor.i18n.json new file mode 100644 index 00000000000..0df6dca88c6 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/multicursor/multicursor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "ã‚«ãƒ¼ã‚½ãƒ«ã‚’ä¸Šã«æŒ¿å…¥", + "mutlicursor.insertBelow": "ã‚«ãƒ¼ã‚½ãƒ«ã‚’ä¸‹ã«æŒ¿å…¥", + "mutlicursor.insertAtEndOfEachLineSelected": "ã‚«ãƒ¼ã‚½ãƒ«ã‚’è¡Œæœ«ã«æŒ¿å…¥", + "addSelectionToNextFindMatch": "é¸æŠžã—ãŸé …目を次ã®ä¸€è‡´é …ç›®ã«è¿½åŠ ", + "addSelectionToPreviousFindMatch": "é¸ã‚“ã é …目をå‰ã®ä¸€è‡´é …ç›®ã«è¿½åŠ ã™ã‚‹", + "moveSelectionToNextFindMatch": "最後ã«é¸æŠžã—ãŸé …目を次ã®ä¸€è‡´é …ç›®ã«ç§»å‹•", + "moveSelectionToPreviousFindMatch": "最後ã«é¸ã‚“ã é …目をå‰ã®ä¸€è‡´é …ç›®ã«ç§»å‹•ã™ã‚‹", + "selectAllOccurrencesOfFindMatch": "一致ã™ã‚‹ã™ã¹ã¦ã®å‡ºç¾ç®‡æ‰€ã‚’é¸æŠžã—ã¾ã™", + "changeAll.label": "ã™ã¹ã¦ã®å‡ºç¾ç®‡æ‰€ã‚’変更" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json b/i18n/jpn/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json new file mode 100644 index 00000000000..64d3d836869 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "パラメーター ヒントをトリガー" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json new file mode 100644 index 00000000000..4ea56b2c8da --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}ã€ãƒ’ント" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/jpn/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json new file mode 100644 index 00000000000..14dcd69b4a6 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "修正プログラム ({0}) を表示ã™ã‚‹", + "quickFix": "修正プログラムを表示ã™ã‚‹", + "quickfix.trigger.label": "クイック修正" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json new file mode 100644 index 00000000000..e6139bff349 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "é–‰ã˜ã‚‹" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json new file mode 100644 index 00000000000..0040e3675d8 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": "– {0} 個ã®å‚ç…§", + "references.action.label": "ã™ã¹ã¦ã®å‚ç…§ã®æ¤œç´¢" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json new file mode 100644 index 00000000000..b31a080bc82 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "読ã¿è¾¼ã‚“ã§ã„ã¾ã™..." +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json new file mode 100644 index 00000000000..00407b4d7e3 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "列 {2} ã® {1} 行目㫠{0} ã¤ã®ã‚·ãƒ³ãƒœãƒ«", + "aria.fileReferences.1": "{0} ã« 1 個ã®ã‚·ãƒ³ãƒœãƒ«ã€å®Œå…¨ãªãƒ‘ス {1}", + "aria.fileReferences.N": "{1} ã« {0} 個ã®ã‚·ãƒ³ãƒœãƒ«ã€å®Œå…¨ãªãƒ‘ス {2}", + "aria.result.0": "一致ã™ã‚‹é …ç›®ã¯ã‚りã¾ã›ã‚“", + "aria.result.1": "{0} ã« 1 個ã®ã‚·ãƒ³ãƒœãƒ«ãŒè¦‹ã¤ã‹ã‚Šã¾ã—ãŸ", + "aria.result.n1": "{1} ã« {0} 個ã®ã‚·ãƒ³ãƒœãƒ«ãŒè¦‹ã¤ã‹ã‚Šã¾ã—ãŸ", + "aria.result.nm": "{1} 個ã®ãƒ•ァイル㫠{0} 個ã®ã‚·ãƒ³ãƒœãƒ«ãŒè¦‹ã¤ã‹ã‚Šã¾ã—ãŸ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json new file mode 100644 index 00000000000..8fedf2e46b0 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "ファイルを解決ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚", + "referencesCount": "{0} 個ã®å‚ç…§", + "referenceCount": "{0} 個ã®å‚ç…§", + "missingPreviewMessage": "プレビューを表示ã§ãã¾ã›ã‚“", + "treeAriaLabel": "å‚ç…§", + "noResults": "çµæžœãŒã‚りã¾ã›ã‚“", + "peekView.alternateTitle": "å‚ç…§", + "peekViewTitleBackground": "ピーク ビューã®ã‚¿ã‚¤ãƒˆãƒ«é ˜åŸŸã®èƒŒæ™¯è‰²ã€‚", + "peekViewTitleForeground": "ピーク ビュー タイトルã®è‰²ã€‚", + "peekViewTitleInfoForeground": "ピーク ビューã®ã‚¿ã‚¤ãƒˆãƒ«æƒ…å ±ã®è‰²ã€‚", + "peekViewBorder": "ピーク ビューã®å¢ƒç•Œã¨çŸ¢å°ã®è‰²ã€‚", + "peekViewResultsBackground": "ピーク ãƒ“ãƒ¥ãƒ¼çµæžœãƒªã‚¹ãƒˆã®èƒŒæ™¯è‰²ã€‚", + "peekViewResultsMatchForeground": "ピーク ãƒ“ãƒ¥ãƒ¼çµæžœãƒªã‚¹ãƒˆã®ãƒ©ã‚¤ãƒ³ ノードã®å‰æ™¯è‰²ã€‚", + "peekViewResultsFileForeground": "ピーク ãƒ“ãƒ¥ãƒ¼çµæžœãƒªã‚¹ãƒˆã®ãƒ•ァイル ノードã®å‰æ™¯è‰²ã€‚", + "peekViewResultsSelectionBackground": "ピーク ãƒ“ãƒ¥ãƒ¼çµæžœãƒªã‚¹ãƒˆã®é¸æŠžæ¸ˆã¿ã‚¨ãƒ³ãƒˆãƒªã®èƒŒæ™¯è‰²ã€‚", + "peekViewResultsSelectionForeground": "ピーク ãƒ“ãƒ¥ãƒ¼çµæžœãƒªã‚¹ãƒˆã®é¸æŠžæ¸ˆã¿ã‚¨ãƒ³ãƒˆãƒªã®å‰æ™¯è‰²ã€‚", + "peekViewEditorBackground": "ピーク ビュー エディターã®èƒŒæ™¯è‰²ã€‚", + "peekViewEditorGutterBackground": "ピーク ビュー エディターã®ä½™ç™½ã®èƒŒæ™¯è‰²ã€‚", + "peekViewResultsMatchHighlight": "ピーク ãƒ“ãƒ¥ãƒ¼çµæžœãƒªã‚¹ãƒˆã®ä¸€è‡´ã—ãŸå¼·èª¿è¡¨ç¤ºè‰²ã€‚", + "peekViewEditorMatchHighlight": "ピーク ビュー エディターã®ä¸€è‡´ã—ãŸå¼·èª¿è¡¨ç¤ºè‰²ã€‚" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/rename/rename.i18n.json b/i18n/jpn/src/vs/editor/contrib/rename/rename.i18n.json new file mode 100644 index 00000000000..65225095897 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/rename/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "çµæžœãŒã‚りã¾ã›ã‚“。", + "aria": "'{0}' ã‹ã‚‰ '{1}' ã¸ã®åå‰å¤‰æ›´ãŒæ­£å¸¸ã«å®Œäº†ã—ã¾ã—ãŸã€‚概è¦: {2}", + "rename.failed": "申ã—訳ã‚りã¾ã›ã‚“。åå‰ã®å¤‰æ›´ã‚’実行ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚", + "rename.label": "シンボルã®åå‰ã‚’変更" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/rename/renameInputField.i18n.json b/i18n/jpn/src/vs/editor/contrib/rename/renameInputField.i18n.json new file mode 100644 index 00000000000..3978f544c8b --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/rename/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "åå‰å¤‰æ›´å…¥åŠ›ã€‚æ–°ã—ã„åå‰ã‚’入力ã—ã€Enter キーを押ã—ã¦ã‚³ãƒŸãƒƒãƒˆã—ã¦ãã ã•ã„。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json b/i18n/jpn/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json new file mode 100644 index 00000000000..381a45a7bda --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "é¸æŠžç¯„å›²ã‚’æ‹¡å¤§", + "smartSelect.shrink": "é¸æŠžç¯„å›²ã‚’ç¸®å°" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/suggest/suggestController.i18n.json b/i18n/jpn/src/vs/editor/contrib/suggest/suggestController.i18n.json new file mode 100644 index 00000000000..1c7707699b8 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/suggest/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "'{0}' ãŒæ¬¡ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’挿入ã—ãŸã“ã¨ã‚’承èªã—ã¦ã„ã¾ã™: {1}", + "suggest.trigger.label": "候補をトリガー" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/suggest/suggestWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/suggest/suggestWidget.i18n.json new file mode 100644 index 00000000000..65e2583d291 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/suggest/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "候補ã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã®èƒŒæ™¯è‰²ã€‚", + "editorSuggestWidgetBorder": "候補ウィジェットã®å¢ƒç•Œç·šè‰²ã€‚", + "editorSuggestWidgetForeground": "候補ウィジェットã®å‰æ™¯è‰²ã€‚", + "editorSuggestWidgetSelectedBackground": "候補ウィジェット内ã§é¸æŠžæ¸ˆã¿ã‚¨ãƒ³ãƒˆãƒªã®èƒŒæ™¯è‰²ã€‚", + "editorSuggestWidgetHighlightForeground": "候補ã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆå†…ã§ä¸€è‡´ã—ãŸãƒã‚¤ãƒ©ã‚¤ãƒˆã®è‰²ã€‚", + "readMore": "詳細を表示...{0}", + "suggestionWithDetailsAriaLabel": "{0}ã€å€™è£œã€è©³ç´°ã‚り", + "suggestionAriaLabel": "{0}ã€å€™è£œ", + "readLess": "詳細を隠ã™...{0}", + "suggestWidget.loading": "読ã¿è¾¼ã‚“ã§ã„ã¾ã™...", + "suggestWidget.noSuggestions": "候補ã¯ã‚りã¾ã›ã‚“。", + "suggestionAriaAccepted": "{0}ã€å—ã‘入れ済ã¿", + "ariaCurrentSuggestionWithDetails": "{0}ã€å€™è£œã€è©³ç´°ã‚り", + "ariaCurrentSuggestion": "{0}ã€å€™è£œ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json b/i18n/jpn/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json new file mode 100644 index 00000000000..63cb6013496 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Tab キーを切り替ãˆã‚‹ã¨ãƒ•ォーカスãŒç§»å‹•ã—ã¾ã™" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json b/i18n/jpn/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json new file mode 100644 index 00000000000..8eac21c6979 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "変数ã®èª­ã¿å–りãªã©èª­ã¿å–りアクセス中ã®ã‚·ãƒ³ãƒœãƒ«ã®èƒŒæ™¯è‰²ã€‚", + "wordHighlightStrong": "変数ã¸ã®æ›¸ãè¾¼ã¿ãªã©æ›¸ãè¾¼ã¿ã‚¢ã‚¯ã‚»ã‚¹ä¸­ã®ã‚·ãƒ³ãƒœãƒ«ã®èƒŒæ™¯è‰²ã€‚", + "overviewRulerWordHighlightForeground": "シンボルを強調表示ã™ã‚‹ã¨ãã®æ¦‚è¦ãƒ«ãƒ¼ãƒ©ãƒ¼ã®ãƒžãƒ¼ã‚«ãƒ¼è‰²ã€‚", + "overviewRulerWordHighlightStrongForeground": "書ãè¾¼ã¿ã‚¢ã‚¯ã‚»ã‚¹ シンボルを強調表示ã™ã‚‹ã¨ãã®æ¦‚è¦ãƒ«ãƒ¼ãƒ©ãƒ¼ã®ãƒžãƒ¼ã‚«ãƒ¼è‰²ã€‚", + "wordHighlight.next.label": "次ã®ã‚·ãƒ³ãƒœãƒ« ãƒã‚¤ãƒ©ã‚¤ãƒˆã«ç§»å‹•", + "wordHighlight.previous.label": "å‰ã®ã‚·ãƒ³ãƒœãƒ« ãƒã‚¤ãƒ©ã‚¤ãƒˆã«ç§»å‹•" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json b/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json index 1545142948e..f118af6afc0 100644 --- a/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json @@ -12,6 +12,8 @@ "newWindow": "æ–°ã—ã„ Code ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’強制ã—ã¾ã™ã€‚", "performance": "'Developer: Startup Performance' コマンドを有効ã«ã—ã¦é–‹å§‹ã—ã¾ã™ã€‚", "prof-startup": "起動中㫠CPU プロファイラーを実行ã™ã‚‹", + "inspect-extensions": "拡張機能ã®ãƒ‡ãƒãƒƒã‚°ã¨ãƒ—ロファイリングを許å¯ã—ã¾ã™ã€‚接続 URI を開発者ツールã§ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚", + "inspect-brk-extensions": "起動後ã«ä¸€æ™‚åœæ­¢ã•れã¦ã„る拡張ホストã¨ã®æ‹¡å¼µæ©Ÿèƒ½ã®ãƒ‡ãƒãƒƒã‚°ã¨ãƒ—ロファイリングを許å¯ã—ã¾ã™ã€‚接続 URI を開発者ツールã§ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚", "reuseWindow": "最後ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ– ウィンドウã«ãƒ•ァイルã¾ãŸã¯ãƒ•ォルダーを強制的ã«é–‹ãã¾ã™ã€‚", "userDataDir": "ユーザー ãƒ‡ãƒ¼ã‚¿ã‚’ä¿æŒã™ã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’指定ã—ã¾ã™ã€‚ルートã§å®Ÿè¡Œã—ã¦ã„ã‚‹å ´åˆã«å½¹ç«‹ã¡ã¾ã™ã€‚", "verbose": "詳細出力を表示ã—ã¾ã™ (--wait ã‚’å«ã¿ã¾ã™)。", @@ -24,6 +26,7 @@ "experimentalApis": "拡張機能ã«å¯¾ã—㦠Proposed API 機能を有効ã«ã—ã¾ã™ã€‚", "disableExtensions": "インストールã•れãŸã™ã¹ã¦ã®æ‹¡å¼µæ©Ÿèƒ½ã‚’無効ã«ã—ã¾ã™ã€‚", "disableGPU": "GPU ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ アクセラレータを無効ã«ã—ã¾ã™ã€‚", + "status": "プロセスã®ä½¿ç”¨çжæ³ã‚„診断情報をå°åˆ·ã—ã¾ã™ã€‚", "version": "ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’表示ã—ã¾ã™ã€‚", "help": "使用法を表示ã—ã¾ã™ã€‚", "usage": "使用法", diff --git a/i18n/jpn/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/jpn/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index a05edf2d326..825d9775739 100644 --- a/i18n/jpn/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/jpn/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "notFound": "æ‹¡å¼µå­ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“", - "noCompatible": "Code ã®ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¨äº’æ›æ€§ã®ã‚ã‚‹ {0} ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚" + "notCompatibleDownload": "VS Code ã®ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ '{0}' ã¨äº’æ›æ€§ã‚’æŒã¤æ‹¡å¼µæ©Ÿèƒ½ãŒè¦‹ã¤ã‹ã‚‰ãªã„ãŸã‚ã€ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã›ã‚“。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/jpn/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index c6bfbf6288e..9901a3c82e4 100644 --- a/i18n/jpn/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/jpn/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,11 +6,16 @@ { "invalidManifest": "æ­£ã—ããªã„拡張機能: package.json 㯠JSON ファイルã§ã¯ã‚りã¾ã›ã‚“。", "restartCodeLocal": "{0} ã‚’å†ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹å‰ã«ã€Code ã‚’å†èµ·å‹•ã—ã¦ãã ã•ã„。", - "restartCodeGallery": "å†ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹å‰ã« Code ã‚’å†èµ·å‹•ã—ã¦ãã ã•ã„。", + "installingOutdatedExtension": "ã“ã®æ‹¡å¼µæ©Ÿèƒ½ã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒæ—¢ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã¾ã™ã€‚å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã“れを上書ãã—ã¾ã™ã‹?", + "override": "上書ã", + "cancel": "キャンセル", + "notFoundCompatible": "VS Code ã®ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ '{1}' ã¨äº’æ›æ€§ã‚’æŒã¤æ‹¡å¼µæ©Ÿèƒ½ '{0}' ãŒè¦‹ã¤ã‹ã‚‰ãªã„ãŸã‚ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ãã¾ã›ã‚“。", + "quitCode": "拡張機能ã®å¤ã„インスタンスãŒã¾ã å®Ÿè¡Œä¸­ã§ã‚ã‚‹ãŸã‚ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ãã¾ã›ã‚“。å†ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«å‰ã« VS Code ã®çµ‚了ã¨èµ·å‹•を実施ã—ã¦ãã ã•ã„。", + "exitCode": "拡張機能ã®å¤ã„インスタンスãŒã¾ã å®Ÿè¡Œä¸­ã§ã‚ã‚‹ãŸã‚ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ãã¾ã›ã‚“。å†ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«å‰ã« VS Code ã®çµ‚了ã¨èµ·å‹•を実施ã—ã¦ãã ã•ã„。", + "notFoundCompatibleDependency": "VS Code ã®ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ '{1}' ã¨äº’æ›æ€§ã‚’æŒã¤ã€ä¾å­˜é–¢ä¿‚ãŒã‚る拡張機能 '{0}' ãŒè¦‹ã¤ã‹ã‚‰ãªã„ãŸã‚ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ãã¾ã›ã‚“。", "uninstallDependeciesConfirmation": "'{0}' ã®ã¿ã‚’アンインストールã—ã¾ã™ã‹ã€ã¾ãŸã¯ä¾å­˜é–¢ä¿‚もアンインストールã—ã¾ã™ã‹?", "uninstallOnly": "é™å®š", "uninstallAll": "ã™ã¹ã¦", - "cancel": "キャンセル", "uninstallConfirmation": "'{0}' をアンインストールã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹?", "ok": "OK", "singleDependentError": "拡張機能 '{0}' をアンインストールã§ãã¾ã›ã‚“。拡張機能 '{1}' ãŒã“ã®æ‹¡å¼µæ©Ÿèƒ½ã«ä¾å­˜ã—ã¦ã„ã¾ã™ã€‚", diff --git a/i18n/jpn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/jpn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index ebcd92b7c61..5697bde4907 100644 --- a/i18n/jpn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -17,6 +17,8 @@ "vscode.extension.activationEvents.onLanguage": "指定ã•れãŸè¨€èªžã‚’解決ã™ã‚‹ãƒ•ァイルãŒé–‹ã‹ã‚Œã‚‹ãŸã³ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化イベントãŒç™ºè¡Œã•れã¾ã™ã€‚", "vscode.extension.activationEvents.onCommand": "指定ã—ãŸã‚³ãƒžãƒ³ãƒ‰ãŒå‘¼ã³å‡ºã•れるãŸã³ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化イベントãŒç™ºè¡Œã•れã¾ã™ã€‚", "vscode.extension.activationEvents.onDebug": "デãƒãƒƒã‚°ã®é–‹å§‹ã¾ãŸã¯ãƒ‡ãƒãƒƒã‚°æ§‹æˆãŒã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã•れるãŸã³ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化イベントãŒç™ºè¡Œã•れã¾ã™ã€‚", + "vscode.extension.activationEvents.onDebugInitialConfigurations": "\"launch.json\" を作æˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã³ã« (ã¾ãŸã¯ã€ã™ã¹ã¦ã® provideDebugConfiguration メソッドを呼ã³å‡ºã™å¿…è¦ãŒã‚ã‚‹ãŸã³ã«) アクティブ化イベントを発行ã—ã¾ã™ã€‚", + "vscode.extension.activationEvents.onDebugResolve": "特定ã®ã‚¿ã‚¤ãƒ—ã®ãƒ‡ãƒãƒƒã‚° セッションãŒèµ·å‹•ã•れるãŸã³ã«ï¼ˆã¾ãŸã¯ã€å¯¾å¿œã™ã‚‹ resolveDebugConfiguration メソッドを呼ã³å‡ºã™å¿…è¦ãŒã‚ã‚‹ãŸã³ã«ï¼‰ã€ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化イベントを発行ã—ã¾ã™ã€‚", "vscode.extension.activationEvents.workspaceContains": "指定ã—㟠glob パターンã«ä¸€è‡´ã™ã‚‹ãƒ•ァイルを少ãªãã¨ã‚‚ 1 ã¤ä»¥ä¸Šå«ã‚€ãƒ•ォルダーを開ããŸã³ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化イベントãŒç™ºè¡Œã•れã¾ã™ã€‚", "vscode.extension.activationEvents.onView": "指定ã—ãŸãƒ“ューを展開ã™ã‚‹ãŸã³ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化イベントãŒç™ºè¡Œã•れã¾ã™ã€‚", "vscode.extension.activationEvents.star": "VS Code 起動時ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化イベントを発行ã—ã¾ã™ã€‚優れãŸã‚¨ãƒ³ãƒ‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ エクスペリエンスを確ä¿ã™ã‚‹ãŸã‚ã«ã€ä»–ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化イベントã®çµ„ã¿åˆã‚ã›ã§ã¯æœ›ã‚€å‹•作ã«ãªã‚‰ãªã„ã¨ãã®ã¿ä½¿ç”¨ã—ã¦ãã ã•ã„。", diff --git a/i18n/jpn/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/jpn/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json new file mode 100644 index 00000000000..1b05e7b1989 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleTabs": "タブ表示ã®åˆ‡ã‚Šæ›¿ãˆ", + "view": "表示" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json index eb0a5534713..07c224802d6 100644 --- a/i18n/jpn/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "largeNumberBadge": "10k+", "badgeTitle": "{0} - {1}", "additionalViews": "ãã®ä»–ã®ãƒ“ュー", "numberBadge": "{0} ({1})", diff --git a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 5c802777acf..9e1f0ccd5c3 100644 --- a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -33,6 +33,7 @@ "openPreviousEditor": "以å‰ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’é–‹ã", "nextEditorInGroup": "ã‚°ãƒ«ãƒ¼ãƒ—å†…ã§æ¬¡ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’é–‹ã", "openPreviousEditorInGroup": "グループ内ã§å‰ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’é–‹ã", + "lastEditorInGroup": "ã‚°ãƒ«ãƒ¼ãƒ—å†…ã®æœ€å¾Œã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’é–‹ã", "navigateNext": "次ã«é€²ã‚€", "navigatePrevious": "å‰ã«æˆ»ã‚‹", "navigateLast": "戻る", diff --git a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index fe4cd303724..31949627cfd 100644 --- a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,7 +6,7 @@ { "editorCommand.activeEditorMove.description": "タブã¾ãŸã¯ã‚°ãƒ«ãƒ¼ãƒ—別ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ– エディターを移動ã™ã‚‹", "editorCommand.activeEditorMove.arg.name": "アクティブ エディター㮠Move 引数", - "editorCommand.activeEditorMove.arg.description": "引数プロパティ:\n\t\t\t\t\t\t* 'to': 引数プロパティ\n\t\t\t\t\t\t* 'by': 移動ã«ä½¿ç”¨ã™ã‚‹å˜ä½ã‚’指定ã™ã‚‹æ–‡å­—列値。タブ別ã¾ãŸã¯ã‚°ãƒ«ãƒ¼ãƒ—別。\n\t\t\t\t\t\t* 'value': 移動ã™ã‚‹ä½ç½®æ•°ã¨çµ¶å¯¾ä½ç½®ã‚’指定ã™ã‚‹æ•°å€¤ã€‚\n\t\t\t\t\t", + "editorCommand.activeEditorMove.arg.description": "引数プロパティ:\n\t* 'to': 移動先を指定ã™ã‚‹æ–‡å­—列値。\n\t* 'by': 移動ã®å˜ä½ã‚’指定ã™ã‚‹æ–‡å­—列値。タブ別ã¾ãŸã¯ã‚°ãƒ«ãƒ¼ãƒ—別。\n\t* 'value': 移動ã®ä½ç½®æ•°ã‚‚ã—ãã¯çµ¶å¯¾ä½ç½®ã‚’指定ã™ã‚‹æ•°å€¤ã€‚", "commandDeprecated": "コマンド **{0}** ã¯å‰Šé™¤ã•れã¾ã—ãŸã€‚代ã‚り㫠**{1}** を使用ã§ãã¾ã™", "openKeybindings": "ショートカット ã‚­ãƒ¼ã®æ§‹æˆ" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 9a2136e7640..805958bc01f 100644 --- a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -53,5 +53,5 @@ "screenReaderDetectedExplanation.answerYes": "ã¯ã„", "screenReaderDetectedExplanation.answerNo": "ã„ã„ãˆ", "screenReaderDetectedExplanation.body1": "VS Codeã¯ç¾åœ¨ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ãƒªãƒ¼ãƒ€ãƒ¼ã®ä½¿ç”¨çжæ³ã«æœ€é©åŒ–ã•れã¦ã„ã¾ã™ã€‚", - "screenReaderDetectedExplanation.body2": "ã„ãã¤ã‹ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼æ©Ÿèƒ½ãŒé€šå¸¸ã¨ç•°ãªã‚‹å‹•作をã—ã¾ã™ã€‚例: 折り返ã—ã€æŠ˜ã‚ŠãŸãŸã¿ã€ã‹ã£ã“ã®è‡ªå‹•é–‰ã˜ãªã©" + "screenReaderDetectedExplanation.body2": "ã„ãã¤ã‹ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼æ©Ÿèƒ½ãŒé€šå¸¸ã¨ç•°ãªã‚‹å‹•作をã—ã¾ã™ã€‚例: 折り返ã—ã€æŠ˜ã‚ŠãŸãŸã¿ãªã©" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/quickopen.i18n.json b/i18n/jpn/src/vs/workbench/browser/quickopen.i18n.json index b598142bc87..6d4bf4f79fa 100644 --- a/i18n/jpn/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/quickopen.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "noResultsMatching": "一致ã™ã‚‹çµæžœã¯ã‚りã¾ã›ã‚“", - "noResultsFound2": "一致ã™ã‚‹é …ç›®ã¯ã‚りã¾ã›ã‚“", - "entryAriaLabel": "{0}ã€ã‚³ãƒžãƒ³ãƒ‰" + "noResultsFound2": "一致ã™ã‚‹é …ç›®ã¯ã‚りã¾ã›ã‚“" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json index a31924013b2..2da6de5555b 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json @@ -30,7 +30,7 @@ "openRecent": "最近開ã„ãŸé …目…", "quickOpenRecent": "最近使用ã—ãŸã‚‚ã®ã‚’é–‹ã...", "closeMessages": "通知メッセージを閉ã˜ã‚‹", - "reportIssues": "å•題ã®å ±å‘Š", + "reportIssueInEnglish": "å•題ã®å ±å‘Š", "reportPerformanceIssue": "パフォーマンスã®å•題ã®ãƒ¬ãƒãƒ¼ãƒˆ", "keybindingsReference": "キーボード ショートカットã®å‚ç…§", "openDocumentationUrl": "ドキュメント", @@ -47,5 +47,25 @@ "showNextWindowTab": "次ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ タブを表示", "moveWindowTabToNewWindow": "ウィンドウ タブを新ã—ã„ウィンドウã«ç§»å‹•", "mergeAllWindowTabs": "ã™ã¹ã¦ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’çµ±åˆ", - "toggleWindowTabsBar": "ウィンドウ タブ ãƒãƒ¼ã®åˆ‡ã‚Šæ›¿ãˆ" + "toggleWindowTabsBar": "ウィンドウ タブ ãƒãƒ¼ã®åˆ‡ã‚Šæ›¿ãˆ", + "configureLocale": "言語を構æˆã™ã‚‹", + "displayLanguage": "VSCode ã®è¡¨ç¤ºè¨€èªžã‚’定義ã—ã¾ã™ã€‚", + "doc": "サãƒãƒ¼ãƒˆã•れã¦ã„る言語ã®ä¸€è¦§ã«ã¤ã„ã¦ã¯ã€{0} ã‚’ã”覧ãã ã•ã„。", + "restart": "値を変更ã™ã‚‹ã«ã¯ VS Code ã®å†èµ·å‹•ãŒå¿…è¦ã§ã™ã€‚", + "fail.createSettings": "'{0}' ({1}) を作æˆã§ãã¾ã›ã‚“。", + "openLogsFolder": "ログ フォルダーを開ã", + "showLogs": "ログã®è¡¨ç¤º...", + "mainProcess": "メイン", + "sharedProcess": "共有", + "rendererProcess": "レンダラー", + "extensionHost": "拡張機能ホスト", + "selectProcess": "プロセスã®é¸æŠž", + "setLogLevel": "ログ レベルã®è¨­å®š", + "trace": "トレース", + "debug": "デãƒãƒƒã‚°", + "info": "情報", + "warn": "警告", + "err": "エラー", + "critical": "é‡å¤§", + "off": "オフ" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json index 2601b151063..2f2b510b284 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,8 +7,8 @@ "view": "表示", "help": "ヘルプ", "file": "ファイル", - "workspaces": "ワークスペース", "developer": "開発者", + "workspaces": "ワークスペース", "showEditorTabs": "é–‹ã„ã¦ã„るエディターをタブã«è¡¨ç¤ºã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", "workbench.editor.labelFormat.default": "ファイルã®åå‰ã‚’表示ã—ã¾ã™ã€‚ã‚¿ãƒ–ãŒæœ‰åйã‹ã¤ 1 ã¤ã®ã‚°ãƒ«ãƒ¼ãƒ—内㮠2 ã¤ã®åŒåファイルãŒã‚ã‚‹ã¨ãã«å„ファイルã®ãƒ‘スã®åŒºåˆ‡ã‚Šè¨˜å·ãŒè¿½åŠ ã•れã¾ã™ã€‚タブを無効ã«ã™ã‚‹ã¨ã€ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªæ™‚ã«ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ フォルダーã®ç›¸å¯¾ãƒ‘スãŒè¡¨ç¤ºã•れã¾ã™ã€‚", "workbench.editor.labelFormat.short": "ディレクトリåã«ç¶šã‘ã¦ãƒ•ァイルåを表示ã—ã¾ã™ã€‚", @@ -16,6 +16,7 @@ "workbench.editor.labelFormat.long": "絶対パスã«ç¶šã‘ã¦ãƒ•ァイルåを表示ã—ã¾ã™ã€‚", "tabDescription": "エディターã®ãƒ©ãƒ™ãƒ«ã®æ›¸å¼ã‚’制御ã—ã¾ã™ã€‚例ã¨ã—ã¦ã“ã®è¨­å®šã‚’変更ã™ã‚‹ã“ã¨ã§ãƒ•ァイルã®å ´æ‰€ã‚’ç†è§£ã—ã‚„ã™ããªã‚Šã¾ã™:\n- short: 'parent'\n- medium: 'workspace/src/parent'\n- long: '/home/user/workspace/src/parent'\n- default: '.../parent',  別タブã§ã€åŒã˜ã‚¿ã‚¤ãƒˆãƒ«ã‚’共有ã™ã‚‹å ´åˆã‚„ã€ç›¸å¯¾çš„ãªãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ パス タブãŒç„¡åйã«ãªã£ã¦ã„ã‚‹å ´åˆ", "editorTabCloseButton": "エディター タブã®é–‰ã˜ã‚‹ãƒœã‚¿ãƒ³ã®ä½ç½®ã‚’制御ã™ã‚‹ã‹ã€[off] ã«è¨­å®šã—ãŸå ´åˆã«ç„¡åйã«ã—ã¾ã™ã€‚", + "tabSizing": "エディターã®ã‚¿ãƒ–ã®å¤§ãã•を制御ã—ã¾ã™ã€‚常ã«å®Œå…¨ãªã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ ラベルを表示ã™ã‚‹ã®ã«è¶³ã‚Šã‚‹ã‚¿ãƒ–ã®å¤§ãã•ã‚’ç¶­æŒã™ã‚‹ã«ã¯ 'fit' を設定ã—ã¾ã™ã€‚ã™ã¹ã¦ã®ã‚¿ãƒ–を一度ã«è¡¨ç¤ºã™ã‚‹ã«ã¯åˆ©ç”¨å¯èƒ½ãªã‚¹ãƒšãƒ¼ã‚¹ãŒè¶³ã‚Šãªã„å ´åˆã«ã€ã‚¿ãƒ–を縮å°å¯èƒ½ã«ã™ã‚‹ã«ã¯ 'shrink' を設定ã—ã¾ã™ã€‚", "showIcons": "é–‹ã„ã¦ã„るエディターをアイコンã§è¡¨ç¤ºã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚ã“れã«ã¯ã€ã‚¢ã‚¤ã‚³ãƒ³ã®ãƒ†ãƒ¼ãƒžã‚’有効ã«ã™ã‚‹å¿…è¦ã‚‚ã‚りã¾ã™ã€‚", "enablePreview": "é–‹ã‹ã‚Œã‚‹ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’プレビューã¨ã—ã¦è¡¨ç¤ºã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚プレビュー エディター㯠(例: ダブル クリックã¾ãŸã¯ç·¨é›†ãªã©ã«ã‚ˆã£ã¦) 変更ã•れる時ã¾ã§å†åˆ©ç”¨ã—ã€æ–œä½“ã§è¡¨ç¤ºã—ã¾ã™ã€‚", "enablePreviewFromQuickOpen": "Quick Open ã§é–‹ã„ãŸã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’プレビューã¨ã—ã¦è¡¨ç¤ºã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚プレビュー エディターã¯ã€ä¿æŒã•れã¦ã„ã‚‹é–“ã€å†åˆ©ç”¨ã•れã¾ã™ (ダブルクリックã¾ãŸã¯ç·¨é›†ãªã©ã«ã‚ˆã£ã¦)。", @@ -26,18 +27,17 @@ "closeOnFocusLost": "フォーカスを失ã£ãŸã¨ãã« Quick Open を自動的ã«é–‰ã˜ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", "openDefaultSettings": "設定を開ãã¨ã™ã¹ã¦ã®æ—¢å®šã®è¨­å®šã‚’表示ã™ã‚‹ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚‚é–‹ãã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", "sideBarLocation": "サイド ãƒãƒ¼ã®ä½ç½®ã‚’制御ã—ã¾ã™ã€‚ワークベンãƒã®å·¦å³ã®ã„ãšã‚Œã‹ã«è¡¨ç¤ºã§ãã¾ã™ã€‚", - "panelLocation": "パãƒãƒ«ã®ä½ç½®ã‚’制御ã—ã¾ã™ã€‚ワークベンãƒã®ä¸‹éƒ¨ã¾ãŸã¯å³ã®ã„ãšã‚Œã‹ã«è¡¨ç¤ºã§ãã¾ã™ã€‚", "statusBarVisibility": "ワークベンãƒã®ä¸‹éƒ¨ã«ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ ãƒãƒ¼ã‚’表示ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", "activityBarVisibility": "ワークベンãƒã§ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ“ティ ãƒãƒ¼ã®è¡¨ç¤ºã‚’コントロールã—ã¾ã™ã€‚", "closeOnFileDelete": "ファイルを表示ã—ã¦ã„るエディターをã€ãƒ•ァイルãŒå‰Šé™¤ã•れるã‹ãã®ä»–ã®ãƒ—ロセスã«ã‚ˆã£ã¦åå‰ã‚’変更ã•れãŸå ´åˆã«ã€è‡ªå‹•çš„ã«é–‰ã˜ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚ã“れを無効ã«ã™ã‚‹ã¨ã€ã“ã®ã‚ˆã†ãªå ´åˆã«ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã¯ãƒ€ãƒ¼ãƒ†ã‚£ã§é–‹ã‹ã‚ŒãŸã¾ã¾ã«ãªã‚Šã¾ã™ã€‚アプリケーション内ã§å‰Šé™¤ã™ã‚‹ã¨ã€å¿…ãšã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã¯é–‰ã˜ã‚‰ã‚Œã€ãƒ€ãƒ¼ãƒ†ã‚£ ファイルã¯é–‰ã˜ã‚‰ã‚Œã‚‹ã“ã¨ãŒãªãã€ãƒ‡ãƒ¼ã‚¿ã¯ä¿å­˜ã•れã¾ã›ã‚“ã®ã§ã”注æ„ãã ã•ã„。", - "experimentalFuzzySearchEndpoint": "試験的ãªè¨­å®šæ¤œç´¢ã§ä½¿ç”¨ã™ã‚‹ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’指定ã—ã¾ã™ã€‚", - "experimentalFuzzySearchKey": "試験的ãªè¨­å®šæ¤œç´¢ã§ä½¿ç”¨ã™ã‚‹ã‚­ãƒ¼ã‚’指定ã—ã¾ã™ã€‚", + "enableNaturalLanguageSettingsSearch": "設定ã§è‡ªç„¶æ–‡æ¤œç´¢ãƒ¢ãƒ¼ãƒ‰ã‚’有効ã«ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", "fontAliasing": "ワークベンãƒã®ãƒ•ォント エイリアシング方法を制御ã—ã¾ã™ã€‚\n- default: サブピクセル方å¼ã§ãƒ•ォントを滑らã‹ã«ã—ã¾ã™ã€‚ã»ã¨ã‚“ã©ã®éž Retina ディスプレイã§ã‚‚ã£ã¨ã‚‚鮮明ãªãƒ†ã‚­ã‚¹ãƒˆã‚’æä¾›ã—ã¾ã™\n- antialiased: サブピクセルã¨ã¯å¯¾ç…§çš„ã«ã€ãƒ”クセルã®ãƒ¬ãƒ™ãƒ«ã§ãƒ•ォントを滑らã‹ã«ã—ã¾ã™ã€‚フォント全体ãŒã‚ˆã‚Šç´°ã見ãˆã¾ã™\n- none: フォントã®ã‚¹ãƒ ãƒ¼ã‚¸ãƒ³ã‚°ã‚’無効ã«ã—ã¾ã™ã€‚テキストをãŽã–ãŽã–ãªå°–ã£ãŸã‚¨ãƒƒã‚¸ã§è¡¨ç¤ºã—ã¾ã™", "workbench.fontAliasing.default": "サブピクセル方å¼ã§ãƒ•ォントを滑らã‹ã«ã—ã¾ã™ã€‚ã»ã¨ã‚“ã©ã®éž Retina ディスプレイã§ã‚‚ã£ã¨ã‚‚鮮明ãªãƒ†ã‚­ã‚¹ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚", "workbench.fontAliasing.antialiased": "サブピクセルã¨ã¯å¯¾ç…§çš„ã«ã€ãƒ”クセルã®ãƒ¬ãƒ™ãƒ«ã§ãƒ•ォントを滑らã‹ã«ã—ã¾ã™ã€‚フォント全体ãŒã‚ˆã‚Šç´°ã見ãˆã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚", "workbench.fontAliasing.none": "フォントã®ã‚¹ãƒ ãƒ¼ã‚¸ãƒ³ã‚°ã‚’無効ã«ã—ã¾ã™ã€‚テキストをãŽã–ãŽã–ãªå°–ã£ãŸã‚¨ãƒƒã‚¸ã§è¡¨ç¤ºã—ã¾ã™ã€‚", "swipeToNavigate": "3 æœ¬ã®æŒ‡ã§æ¨ªæ–¹å‘ã«ã‚¹ãƒ¯ã‚¤ãƒ—ã™ã‚‹ã¨ã€é–‹ã„ã¦ã„るファイル間を移動ã§ãã¾ã™ã€‚", "workbenchConfigurationTitle": "ワークベンãƒ", + "windowConfigurationTitle": "ウィンドウ", "window.openFilesInNewWindow.on": "æ–°ã—ã„ウィンドウã§ãƒ•ァイルを開ãã¾ã™", "window.openFilesInNewWindow.off": "ファイルã®ãƒ•ォルダーãŒé–‹ã‹ã‚Œã¦ã„ãŸã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¾ãŸã¯æœ€å¾Œã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ– ウィンドウã§ãƒ•ァイルを開ãã¾ã™", "window.openFilesInNewWindow.default": "ファイルã®ãƒ•ォルダーãŒé–‹ã‹ã‚Œã¦ã„ãŸã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ãƒ•ァイルを開ãã‹ã€Dock ã¾ãŸã¯ Finder を使用ã—ã¦é–‹ãå ´åˆä»¥å¤–ã¯æœ€å¾Œã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ– ウィンドウã§ãƒ•ァイルを開ãã¾ã™ (macOS ã®ã¿)", @@ -69,11 +69,11 @@ "autoDetectHighContrast": "有効ã«ã™ã‚‹ã¨ã€Windows ã§ãƒã‚¤ コントラスト テーマãŒä½¿ç”¨ã•れã¦ã„ã‚‹å ´åˆã«ã¯ãƒã‚¤ コントラスト テーマã«è‡ªå‹•çš„ã«å¤‰æ›´ã•れã€Windows ã®ãƒã‚¤ コントラスト テーマã‹ã‚‰åˆ‡ã‚Šæ›¿ãˆã‚‰ã‚Œã¦ã„ã‚‹å ´åˆã«ã¯ãƒ€ãƒ¼ã‚¯ テーマã«è‡ªå‹•çš„ã«å¤‰æ›´ã•れã¾ã™ã€‚", "titleBarStyle": "ウィンドウã®ã‚¿ã‚¤ãƒˆãƒ« ãƒãƒ¼ã®å¤–観を調整ã—ã¾ã™ã€‚変更をé©ç”¨ã™ã‚‹ã«ã¯ã€å®Œå…¨ã«å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚", "window.nativeTabs": "macOS Sierra ウィンドウ タブを有効ã«ã—ã¾ã™ã€‚ã“ã®å¤‰æ›´ã‚’é©ç”¨ã™ã‚‹ã«ã¯å®Œå…¨ãªå†èµ·å‹•ãŒå¿…è¦ã§ã‚りã€ãƒã‚¤ãƒ†ã‚£ãƒ– タブã§ã‚«ã‚¹ã‚¿ãƒ ã®ã‚¿ã‚¤ãƒˆãƒ« ãƒãƒ¼ ã‚¹ã‚¿ã‚¤ãƒ«ãŒæ§‹æˆã•れã¦ã„ãŸå ´åˆã¯ãれãŒç„¡åйã«ãªã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。", - "windowConfigurationTitle": "ウィンドウ", "zenModeConfigurationTitle": "Zen Mode", "zenMode.fullScreen": "Zen Mode をオンã«ã™ã‚‹ã¨ãƒ¯ãƒ¼ã‚¯ãƒ™ãƒ³ãƒã‚’自動的ã«å…¨ç”»é¢ãƒ¢ãƒ¼ãƒ‰ã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", "zenMode.hideTabs": "Zen Mode をオンã«ã—ãŸã¨ãã«ãƒ¯ãƒ¼ã‚¯ãƒ™ãƒ³ãƒ タブもéžè¡¨ç¤ºã«ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", "zenMode.hideStatusBar": "Zen Mode をオンã«ã™ã‚‹ã¨ãƒ¯ãƒ¼ã‚¯ãƒ™ãƒ³ãƒã®ä¸‹éƒ¨ã«ã‚るステータス ãƒãƒ¼ã‚’éžè¡¨ç¤ºã«ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", "zenMode.hideActivityBar": "Zen Mode をオンã«ã™ã‚‹ã¨ãƒ¯ãƒ¼ã‚¯ãƒ™ãƒ³ãƒã®å·¦å´ã«ã‚るアクティビティ ãƒãƒ¼ã‚’éžè¡¨ç¤ºã«ã™ã‚‹ã‹ã‚’制御ã—ã¾ã™ã€‚", - "zenMode.restore": "Zen Mode ã§çµ‚了ã—ãŸã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’ Zen Mode ã«å¾©å…ƒã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚" + "zenMode.restore": "Zen Mode ã§çµ‚了ã—ãŸã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’ Zen Mode ã«å¾©å…ƒã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", + "JsonSchema.locale": "使用ã™ã‚‹ UI 言語。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 7e7505788b6..57ba460378d 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -30,7 +30,6 @@ "deactivateBreakpoints": "ブレークãƒã‚¤ãƒ³ãƒˆã®éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–化", "reapplyAllBreakpoints": "ã™ã¹ã¦ã®ãƒ–レークãƒã‚¤ãƒ³ãƒˆã‚’å†é©ç”¨ã™ã‚‹", "addFunctionBreakpoint": "関数ブレークãƒã‚¤ãƒ³ãƒˆã®è¿½åŠ ", - "renameFunctionBreakpoint": "関数ブレークãƒã‚¤ãƒ³ãƒˆã®åå‰å¤‰æ›´", "addConditionalBreakpoint": "æ¡ä»¶ä»˜ãブレークãƒã‚¤ãƒ³ãƒˆã®è¿½åŠ ...", "editConditionalBreakpoint": "ブレークãƒã‚¤ãƒ³ãƒˆã®ç·¨é›†...", "setValue": "値ã®è¨­å®š", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json new file mode 100644 index 00000000000..69243c770fa --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editConditionalBreakpoint": "ブレークãƒã‚¤ãƒ³ãƒˆã®ç·¨é›†...", + "functionBreakpointsNotSupported": "ã“ã®ãƒ‡ãƒãƒƒã‚°ã®ç¨®é¡žã§ã¯é–¢æ•°ãƒ–レークãƒã‚¤ãƒ³ãƒˆã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“", + "functionBreakpointPlaceholder": "中断対象ã®é–¢æ•°", + "functionBreakPointInputAriaLabel": "関数ブレークãƒã‚¤ãƒ³ãƒˆã‚’入力ã—ã¾ã™" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json new file mode 100644 index 00000000000..9151cc82738 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "callstackSection": "コール スタック セクション", + "debugStopped": "{0} ã§ä¸€æ™‚åœæ­¢", + "callStackAriaLabel": "コール スタックã®ãƒ‡ãƒãƒƒã‚°", + "process": "プロセス", + "paused": "ä¸€æ™‚åœæ­¢", + "running": "実行ã—ã¦ã„ã¾ã™", + "thread": "スレッド", + "pausedOn": "{0} ã§ä¸€æ™‚åœæ­¢", + "loadMoreStackFrames": "スタック フレームをã•らã«èª­ã¿è¾¼ã‚€", + "threadAriaLabel": "スレッド {0}ã€å‘¼ã³å‡ºã—スタックã€ãƒ‡ãƒãƒƒã‚°", + "stackFrameAriaLabel": "スタック フレーム {0} 行 {1} {2}ã€å‘¼ã³å‡ºã—スタックã€ãƒ‡ãƒãƒƒã‚°" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index 5a3751ca883..355c26ee039 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,5 +20,10 @@ "openExplorerOnEnd": "デãƒãƒƒã‚° セッションã®çµ‚ã‚りã«ã‚¨ã‚¯ã‚¹ãƒ—ローラ ビューを自動的ã«é–‹ãã¾ã™", "inlineValues": "デãƒãƒƒã‚°ä¸­ã«ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®è¡Œå†…ã«å¤‰æ•°å€¤ã‚’表示ã—ã¾ã™", "hideActionBar": "浮動デãƒãƒƒã‚°æ“作ãƒãƒ¼ã‚’éžè¡¨ç¤ºã«ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™", + "never": "今後ステータス ãƒãƒ¼ã«ãƒ‡ãƒãƒƒã‚°ã‚’表示ã—ãªã„", + "always": "ステータス ãƒãƒ¼ã«ãƒ‡ãƒãƒƒã‚°ã‚’常ã«è¡¨ç¤ºã™ã‚‹", + "onFirstSessionStart": "åˆã‚ã¦ãƒ‡ãƒãƒƒã‚°ãŒé–‹å§‹ã•れãŸã¨ãã®ã¿ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ ãƒãƒ¼ã«ãƒ‡ãƒãƒƒã‚°ã‚’表示ã™ã‚‹", + "showInStatusBar": "デãƒãƒƒã‚°ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ ãƒãƒ¼ãŒè¡¨ç¤ºã•れるタイミングを制御", + "openDebug": "デãƒãƒƒã‚° ビューレットを開ãã‹ã€ãƒ‡ãƒãƒƒã‚° セッションを開始ã™ã‚‹ã‹ã‚’制御ã—ã¾ã™ã€‚", "launch": "グローãƒãƒ« デãƒãƒƒã‚°èµ·å‹•æ§‹æˆã€‚ワークスペース間ã§å…±æœ‰ã•れる 'launch.json' ã®ä»£ã‚りã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index e158385ba5c..2c8374a3999 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,6 @@ "breakpointAdded": "ブレークãƒã‚¤ãƒ³ãƒˆã‚’追加ã—ã¾ã—ãŸã€‚行 {0}ã€ãƒ•ァイル {1}", "breakpointRemoved": "ブレークãƒã‚¤ãƒ³ãƒˆã‚’削除ã—ã¾ã—ãŸã€‚行 {0}ã€ãƒ•ァイル {1}", "compoundMustHaveConfigurations": "è¤‡åˆæ§‹æˆã‚’é–‹å§‹ã™ã‚‹ã«ã¯ã€è¤‡åˆã« \"configurations\" 属性ãŒè¨­å®šã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚", - "configMissing": "æ§‹æˆ '{0}' ㌠'launch.json' 内ã«ã‚りã¾ã›ã‚“。", "debugRequestNotSupported": "é¸æŠžã—ã¦ã„るデãƒãƒƒã‚°æ§‹æˆã§ `{0}` 属性ã¯ã‚µãƒãƒ¼ãƒˆã•れãªã„値 '{1}' を指定ã—ã¦ã„ã¾ã™ã€‚", "debugRequesMissing": "é¸æŠžã—ã¦ã„るデãƒãƒƒã‚°æ§‹æˆã«å±žæ€§ '{0}' ãŒå«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。", "debugTypeNotSupported": "æ§‹æˆã•れã¦ã„るデãƒãƒƒã‚°ã®ç¨®é¡ž '{0}' ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json new file mode 100644 index 00000000000..b9fef75377e --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "変数セクション", + "variablesAriaTreeLabel": "変数ã®ãƒ‡ãƒãƒƒã‚°", + "variableValueAriaLabel": "æ–°ã—ã„変数値を入力ã™ã‚‹", + "variableScopeAriaLabel": "範囲 {0}ã€å¤‰æ•°ã€ãƒ‡ãƒãƒƒã‚°", + "variableAriaLabel": "{0} 値 {1}ã€å¤‰æ•°ã€ãƒ‡ãƒãƒƒã‚°" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json new file mode 100644 index 00000000000..0a37345b7ff --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expressionsSection": "å¼ã‚»ã‚¯ã‚·ãƒ§ãƒ³", + "watchAriaTreeLabel": "ウォッãƒå¼ã®ãƒ‡ãƒãƒƒã‚°", + "watchExpressionPlaceholder": "ウォッãƒå¯¾è±¡ã®å¼", + "watchExpressionInputAriaLabel": "ウォッãƒå¼ã‚’入力ã—ã¾ã™", + "watchExpressionAriaLabel": "{0} 値 {1}ã€ã‚¦ã‚©ãƒƒãƒã€ãƒ‡ãƒãƒƒã‚°", + "watchVariableAriaLabel": "{0} 値 {1}ã€ã‚¦ã‚©ãƒƒãƒã€ãƒ‡ãƒãƒƒã‚°" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 16b98008acb..ef96b090eca 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,9 +6,11 @@ { "name": "拡張機能å", "extension id": "拡張機能ã®è­˜åˆ¥å­", + "preview": "プレビュー", "publisher": "発行者å", "install count": "インストール数", "rating": "評価", + "repository": "リãƒã‚¸ãƒˆãƒª", "license": "ライセンス", "details": "詳細", "contributions": "コントリビューション", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index f9111aed194..9c5f174d8ac 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -10,16 +10,12 @@ "Uninstalling": "アンインストールã—ã¦ã„ã¾ã™", "updateAction": "æ›´æ–°", "updateTo": "{0} ã«æ›´æ–°ã—ã¾ã™", - "enableForWorkspaceAction.label": "有効ã«ã™ã‚‹ (ワークスペース)", - "enableAlwaysAction.label": "å¸¸ã«æœ‰åйã«ã™ã‚‹", - "disableForWorkspaceAction.label": "無効ã«ã™ã‚‹ (ワークスペース)", - "disableAlwaysAction.label": "常ã«ç„¡åйã«ã™ã‚‹", "ManageExtensionAction.uninstallingTooltip": "アンインストールã—ã¦ã„ã¾ã™", - "enableForWorkspaceAction": "ワークスペース", - "enableGloballyAction": "常ã«è¡Œã†", + "enableForWorkspaceAction": "有効ã«ã™ã‚‹ (ワークスペース)", + "enableGloballyAction": "有効", "enableAction": "有効", - "disableForWorkspaceAction": "ワークスペース", - "disableGloballyAction": "常ã«è¡Œã†", + "disableForWorkspaceAction": "無効ã«ã™ã‚‹ (ワークスペース)", + "disableGloballyAction": "無効ã«ã™ã‚‹", "disableAction": "無効ã«ã™ã‚‹", "checkForUpdates": "æ›´æ–°ã®ç¢ºèª", "enableAutoUpdate": "拡張機能ã®è‡ªå‹•更新を有効ã«ã™ã‚‹", @@ -47,11 +43,8 @@ "allExtensionsInstalled": "ã“ã®ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã«æŽ¨å¥¨ã•れã¦ã„ã‚‹ã™ã¹ã¦ã®æ‹¡å¼µæ©Ÿèƒ½ã¯ã™ã§ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã¾ã™", "installRecommendedExtension": "ãŠã™ã™ã‚ã®æ‹¡å¼µæ©Ÿèƒ½ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«", "extensionInstalled": "推奨ã•ã‚ŒãŸæ‹¡å¼µæ©Ÿèƒ½ãŒã™ã§ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã¾ã™", - "showRecommendedKeymapExtensions": "推奨ã®ã‚­ãƒ¼ãƒžãƒƒãƒ—を表示ã™ã‚‹", "showRecommendedKeymapExtensionsShort": "キーマップ", - "showLanguageExtensions": "è¨€èªžã®æ‹¡å¼µæ©Ÿèƒ½ã‚’表示", "showLanguageExtensionsShort": "è¨€èªžã®æ‹¡å¼µæ©Ÿèƒ½", - "showAzureExtensions": "Azure 拡張機能ã®è¡¨ç¤º", "showAzureExtensionsShort": "Azure 拡張機能", "OpenExtensionsFile.failed": "'.vscode' ファルダー ({0}) 内㫠'extensions.json' ファイルを作æˆã§ãã¾ã›ã‚“。", "configureWorkspaceRecommendedExtensions": "æŽ¨å¥¨äº‹é …ã®æ‹¡å¼µæ©Ÿèƒ½ã‚’æ§‹æˆ (ワークスペース)", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json new file mode 100644 index 00000000000..2fd0e4b1fd4 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ratedByUsers": "{0} 人ãŒè©•価" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json new file mode 100644 index 00000000000..157e34cb4b6 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectAndStartDebug": "クリックã—ã¦ãƒ—ãƒ­ãƒ•ã‚¡ã‚¤ãƒªãƒ³ã‚°ã‚’åœæ­¢ã—ã¾ã™ã€‚" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index e9f31ea4af6..58fdc20d916 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -7,9 +7,11 @@ "extensionsCommands": "拡張機能ã®ç®¡ç†", "galleryExtensionsCommands": "ギャラリー拡張機能ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«", "extension": "拡張機能", + "runtimeExtension": "å®Ÿè¡Œä¸­ã®æ‹¡å¼µæ©Ÿèƒ½", "extensions": "拡張機能", "view": "表示", + "developer": "開発者", "extensionsConfigurationTitle": "拡張機能", "extensionsAutoUpdate": "æ‹¡å¼µæ©Ÿèƒ½ã‚’è‡ªå‹•çš„ã«æ›´æ–°ã—ã¾ã™", - "extensionsIgnoreRecommendations": "æ‹¡å¼µæ©Ÿèƒ½ã®æŽ¨å¥¨äº‹é …ã‚’ç„¡è¦–ã™ã‚‹" + "extensionsIgnoreRecommendations": "true ã«è¨­å®šã—ãŸå ´åˆã€æ‹¡å¼µæ©Ÿèƒ½ã®æŽ¨å¥¨äº‹é …ã®é€šçŸ¥ã‚’表示ã—ã¾ã›ã‚“。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json new file mode 100644 index 00000000000..d3fc13a15e0 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "starActivation": "起動時ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化", + "workspaceContainsGlobActivation": "ワークスペース㧠{0} ã«ä¸€è‡´ã™ã‚‹ãƒ•ァイルãŒå­˜åœ¨ã™ã‚‹ã¨ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化", + "workspaceContainsFileActivation": "ワークスペース㫠{0} ファイルãŒå­˜åœ¨ã™ã‚‹ã¨ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化", + "languageActivation": "{0} ファイルãŒé–‹ã‹ã‚Œã‚‹ã¨ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化", + "workspaceGenericActivation": "{0} 上ã§ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化", + "errors": "{0} å€‹ã®æœªæ¤œå‡ºã®ã‚¨ãƒ©ãƒ¼", + "extensionsInputName": "å®Ÿè¡Œä¸­ã®æ‹¡å¼µæ©Ÿèƒ½", + "showRuntimeExtensions": "å®Ÿè¡Œä¸­ã®æ‹¡å¼µæ©Ÿèƒ½ã®è¡¨ç¤º", + "reportExtensionIssue": "å•題ã®å ±å‘Š", + "extensionHostProfileStart": "拡張機能ホストã®ãƒ—ロファイルを開始", + "extensionHostProfileStop": "拡張機能ホストã®ãƒ—ãƒ­ãƒ•ã‚¡ã‚¤ãƒ«ã‚’åœæ­¢", + "saveExtensionHostProfile": "拡張機能ホストã®ãƒ—ロファイルをä¿å­˜" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/fileActions.i18n.json index a17a249ed45..2ef009f9c59 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/fileActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -69,5 +69,7 @@ "invalidFileNameError": "åå‰ **{0}** ãŒãƒ•ァイルåã¾ãŸã¯ãƒ•ォルダーåã¨ã—ã¦ç„¡åйã§ã™ã€‚別ã®åå‰ã‚’指定ã—ã¦ãã ã•ã„。", "filePathTooLongError": "åå‰ **{0}** ã®ãƒ‘スãŒé•·ã™ãŽã¾ã™ã€‚åå‰ã‚’短ãã—ã¦ãã ã•ã„。", "compareWithSaved": "ä¿å­˜æ¸ˆã¿ãƒ•ァイルã¨ä½œæ¥­ä¸­ã®ãƒ•ァイルを比較", - "modifiedLabel": "{0} (ローカル) ↔ {1}" + "modifiedLabel": "{0} (ローカル) ↔ {1}", + "compareWithClipboard": "クリップボードã¨ã‚¢ã‚¯ãƒ†ã‚£ãƒ– ファイルを比較", + "clipboardComparisonLabel": "クリップボード ↔ {0}" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json new file mode 100644 index 00000000000..7b7ea0200a0 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "folders": "フォルダー" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json new file mode 100644 index 00000000000..76306159955 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "ファイル", + "revealInSideBar": "サイド ãƒãƒ¼ã«è¡¨ç¤º", + "acceptLocalChanges": "変更を使用ã—ã¦ãƒ‡ã‚£ã‚¹ã‚¯ã®å†…容を上書ã", + "revertLocalChanges": "変更を破棄ã—ã¦ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®å†…å®¹ã«æˆ»ã‚‹" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json new file mode 100644 index 00000000000..2ef009f9c59 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "å†è©¦è¡Œ", + "rename": "åå‰å¤‰æ›´", + "newFile": "æ–°ã—ã„ファイル", + "newFolder": "æ–°ã—ã„フォルダー", + "openFolderFirst": "フォルダー内ã«ãƒ•ァイルやフォルダーを作æˆã™ã‚‹ã«ã¯ã€ãƒ•ォルダーをã¾ãšé–‹ãå¿…è¦ãŒã‚りã¾ã™ã€‚", + "newUntitledFile": "ç„¡é¡Œã®æ–°è¦ãƒ•ァイル", + "createNewFile": "æ–°ã—ã„ファイル", + "createNewFolder": "æ–°ã—ã„フォルダー", + "deleteButtonLabelRecycleBin": "ã”ã¿ç®±ã«ç§»å‹•(&&M)", + "deleteButtonLabelTrash": "ゴミ箱ã«ç§»å‹•(&&M)", + "deleteButtonLabel": "削除(&&D)", + "dirtyMessageFolderOneDelete": "ä¿å­˜ã•れã¦ã„ãªã„変更ãŒã‚ã‚‹ 1 個ã®ãƒ•ァイルをå«ã‚€ãƒ•ォルダーを削除ã—ã¾ã™ã€‚続行ã—ã¾ã™ã‹?", + "dirtyMessageFolderDelete": "ä¿å­˜ã•れã¦ã„ãªã„変更ãŒã‚るファイルを {0} 個å«ã‚€ãƒ•ォルダーを削除ã—ã¾ã™ã€‚続行ã—ã¾ã™ã‹?", + "dirtyMessageFileDelete": "ä¿å­˜ã•れã¦ã„ãªã„変更ãŒã‚るファイルを削除ã—ã¾ã™ã€‚続行ã—ã¾ã™ã‹?", + "dirtyWarning": "ä¿å­˜ã—ãªã„ã¨å¤‰æ›´å†…容ãŒå¤±ã‚れã¾ã™ã€‚", + "confirmMoveTrashMessageFolder": "'{0}' ã¨ãã®å†…容を削除ã—ã¾ã™ã‹?", + "confirmMoveTrashMessageFile": "'{0}' を削除ã—ã¾ã™ã‹?", + "undoBin": "ã”ã¿ç®±ã‹ã‚‰å¾©å…ƒã§ãã¾ã™ã€‚", + "undoTrash": "ゴミ箱ã‹ã‚‰å¾©å…ƒã§ãã¾ã™ã€‚", + "doNotAskAgain": "å†åº¦è¡¨ç¤ºã—ãªã„", + "confirmDeleteMessageFolder": "'{0}' ã¨ãã®å†…容を完全ã«å‰Šé™¤ã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹?", + "confirmDeleteMessageFile": "'{0}' を完全ã«å‰Šé™¤ã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹?", + "irreversible": "ã“ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å…ƒã«æˆ»ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。", + "permDelete": "完全ã«å‰Šé™¤", + "delete": "削除", + "importFiles": "ファイルã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ", + "confirmOverwrite": "ä¿å­˜å…ˆã®ãƒ•ォルダーã«åŒã˜åå‰ã®ãƒ•ァイルã¾ãŸã¯ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ãŒæ—¢ã«å­˜åœ¨ã—ã¾ã™ã€‚ç½®ãæ›ãˆã¦ã‚‚よã‚ã—ã„ã§ã™ã‹?", + "replaceButtonLabel": "ç½®æ›(&&R)", + "copyFile": "コピー", + "pasteFile": "貼り付ã‘", + "duplicateFile": "é‡è¤‡", + "openToSide": "横ã«ä¸¦ã¹ã¦é–‹ã", + "compareSource": "比較対象ã®é¸æŠž", + "globalCompareFile": "アクティブ ファイルを比較ã—ã¦ã„ã¾ã™...", + "openFileToCompare": "ã¾ãšãƒ•ァイルを開ã„ã¦ã‹ã‚‰åˆ¥ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¨æ¯”較ã—ã¦ãã ã•ã„", + "compareWith": "'{0}' 㨠'{1}' を比較", + "compareFiles": "ãƒ•ã‚¡ã‚¤ãƒ«ã®æ¯”較", + "refresh": "æœ€æ–°ã®æƒ…å ±ã«æ›´æ–°", + "save": "ä¿å­˜", + "saveAs": "åå‰ã‚’付ã‘ã¦ä¿å­˜...", + "saveAll": "ã™ã¹ã¦ä¿å­˜", + "saveAllInGroup": "グループ内ã®ã™ã¹ã¦ã‚’ä¿å­˜ã™ã‚‹", + "saveFiles": "ã™ã¹ã¦ã®ãƒ•ァイルをä¿å­˜", + "revert": "ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å…ƒã«æˆ»ã™", + "focusOpenEditors": "é–‹ã„ã¦ã„るエディターã®ãƒ“ューã«ãƒ•ォーカスã™ã‚‹", + "focusFilesExplorer": "ファイル エクスプローラーã«ãƒ•ォーカスを置ã", + "showInExplorer": "アクティブ ファイルをサイド ãƒãƒ¼ã«è¡¨ç¤º", + "openFileToShow": "エクスプローラーã§ãƒ•ァイルを表示ã™ã‚‹ã«ã¯ã€ãƒ•ァイルをã¾ãšé–‹ãå¿…è¦ãŒã‚りã¾ã™", + "collapseExplorerFolders": "エクスプローラーã®ãƒ•ォルダーを折りãŸãŸã‚€", + "refreshExplorer": "エクスプローラーを最新表示ã™ã‚‹", + "openFileInNewWindow": "æ–°ã—ã„ウィンドウã§ã‚¢ã‚¯ãƒ†ã‚£ãƒ– ファイルを開ã", + "openFileToShowInNewWindow": "ã¾ãšãƒ•ァイルを開ã„ã¦ã‹ã‚‰æ–°ã—ã„ウィンドウã§é–‹ãã¾ã™", + "revealInWindows": "エクスプローラーã§è¡¨ç¤º", + "revealInMac": "Finder ã§è¡¨ç¤ºã—ã¾ã™", + "openContainer": "ã“ã®ã‚¢ã‚¤ãƒ†ãƒ ã®ãƒ•ォルダーを開ã", + "revealActiveFileInWindows": "Windows エクスプローラーã§ã‚¢ã‚¯ãƒ†ã‚£ãƒ– ファイルを表示ã™ã‚‹", + "revealActiveFileInMac": "Finder ã§ã‚¢ã‚¯ãƒ†ã‚£ãƒ– ファイルを表示ã™ã‚‹", + "openActiveFileContainer": "アクティブ ファイルをå«ã‚“ã§ã„るフォルダーを開ã", + "copyPath": "パスã®ã‚³ãƒ”ー", + "copyPathOfActive": "アクティブ ファイルã®ãƒ‘スã®ã‚³ãƒ”ー", + "emptyFileNameError": "ファイルã¾ãŸã¯ãƒ•ォルダーã®åå‰ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚", + "fileNameExistsError": "**{0}** ã¨ã„ã†ãƒ•ァイルã¾ãŸã¯ãƒ•ォルダーã¯ã“ã®å ´æ‰€ã«æ—¢ã«å­˜åœ¨ã—ã¾ã™ã€‚別ã®åå‰ã‚’指定ã—ã¦ãã ã•ã„。", + "invalidFileNameError": "åå‰ **{0}** ãŒãƒ•ァイルåã¾ãŸã¯ãƒ•ォルダーåã¨ã—ã¦ç„¡åйã§ã™ã€‚別ã®åå‰ã‚’指定ã—ã¦ãã ã•ã„。", + "filePathTooLongError": "åå‰ **{0}** ã®ãƒ‘スãŒé•·ã™ãŽã¾ã™ã€‚åå‰ã‚’短ãã—ã¦ãã ã•ã„。", + "compareWithSaved": "ä¿å­˜æ¸ˆã¿ãƒ•ァイルã¨ä½œæ¥­ä¸­ã®ãƒ•ァイルを比較", + "modifiedLabel": "{0} (ローカル) ↔ {1}", + "compareWithClipboard": "クリップボードã¨ã‚¢ã‚¯ãƒ†ã‚£ãƒ– ファイルを比較", + "clipboardComparisonLabel": "クリップボード ↔ {0}" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json new file mode 100644 index 00000000000..4f2a963e359 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "ã¾ãšãƒ•ァイルを開ã„ã¦ã‹ã‚‰ãã®ãƒ‘スをコピーã—ã¾ã™", + "openFileToReveal": "ã¾ãšãƒ•ァイルを開ã„ã¦ã‹ã‚‰è¡¨ç¤ºã—ã¾ã™" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json new file mode 100644 index 00000000000..5461c0b3fa9 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "エクスプローラーを表示", + "explore": "エクスプローラー", + "view": "表示", + "textFileEditor": "テキスト ファイル エディター", + "binaryFileEditor": "ãƒã‚¤ãƒŠãƒª ファイル エディター", + "filesConfigurationTitle": "ファイル", + "exclude": "ファイルã¨ãƒ•ォルダーを除外ã™ã‚‹ãŸã‚ã® glob パターンを構æˆã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒ•ァイル エクスプローラーã§ã¯ã“ã®è¨­å®šã«åŸºã¥ã„ã¦ãƒ•ァイルã¨ãƒ•ォルダーã®è¡¨ç¤ºã‚„éžè¡¨ç¤ºã‚’決定ã—ã¾ã™ã€‚", + "files.exclude.boolean": "ファイル パスã®ç…§åˆåŸºæº–ã¨ãªã‚‹ glob パターン。ã“れを true ã¾ãŸã¯ false ã«è¨­å®šã™ã‚‹ã¨ã€ãƒ‘ターンãŒãれãžã‚Œæœ‰åй/無効ã«ãªã‚Šã¾ã™ã€‚", + "files.exclude.when": "一致ã™ã‚‹ãƒ•ァイルã®å…„弟をã•らã«ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚一致ã™ã‚‹ãƒ•ァイルåã®å¤‰æ•°ã¨ã—㦠$(basename) を使用ã—ã¾ã™ã€‚", + "associations": "言語ã«å¯¾ã™ã‚‹ãƒ•ァイルã®é–¢é€£ä»˜ã‘ (例 \"*.extension\": \"html\") ã‚’æ§‹æˆã—ã¾ã™ã€‚ã“れらã®é–¢é€£ä»˜ã‘ã¯ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã‚‹è¨€èªžã®æ—¢å®šã®é–¢é€£ä»˜ã‘より優先ã•れã¾ã™ã€‚", + "encoding": "ファイルã®èª­ã¿å–り/書ãè¾¼ã¿ã§ä½¿ç”¨ã™ã‚‹æ—¢å®šã®æ–‡å­—セット エンコーディング。言語ã”ã¨ã«æ§‹æˆã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚", + "autoGuessEncoding": "有効ãªå ´åˆã€ãƒ•ァイルを開ãã¨ãã«æ–‡å­—セット エンコードを推測ã—ã¾ã™ã€‚言語ã”ã¨ã«æ§‹æˆã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚", + "eol": "æ—¢å®šã®æ”¹è¡Œæ–‡å­—。LF ã®å ´åˆã«ã¯ \\n ã‚’ CRLF ã®å ´åˆã«ã¯ \\r\\n を使用ã—ã¦ãã ã•ã„。", + "trimTrailingWhitespace": "有効ã«ã™ã‚‹ã¨ã€ãƒ•ァイルã®ä¿å­˜æ™‚ã«æœ«å°¾ã®ç©ºç™½ã‚’トリミングã—ã¾ã™ã€‚", + "insertFinalNewline": "有効ã«ã™ã‚‹ã¨ã€ãƒ•ァイルã®ä¿å­˜æ™‚ã«æœ€æ–°ã®è¡Œã‚’æœ«å°¾ã«æŒ¿å…¥ã—ã¾ã™ã€‚", + "trimFinalNewlines": "有効ã«ã™ã‚‹ã¨ã€ãƒ•ァイルã®ä¿å­˜æ™‚ã«æœ€çµ‚行以é™ã®æ–°ã—ã„行をトリミングã—ã¾ã™ã€‚", + "files.autoSave.off": "ダーティ ファイルを自動的ã«ä¿å­˜ã™ã‚‹ã“ã¨ã¯ã—ã¾ã›ã‚“。", + "files.autoSave.afterDelay": "'files.autoSaveDelay' ã§æ§‹æˆã•ã‚ŒãŸæ™‚é–“ã®çµŒéŽå¾Œã«ã€ãƒ€ãƒ¼ãƒ†ã‚£ ファイルを自動的ã«ä¿å­˜ã—ã¾ã™ã€‚", + "files.autoSave.onFocusChange": "エディターãŒãƒ•ォーカスを失ã£ãŸæ™‚点ã§ã€ãƒ€ãƒ¼ãƒ†ã‚£ ファイルを自動的ã«ä¿å­˜ã—ã¾ã™ã€‚", + "files.autoSave.onWindowChange": "ウィンドウãŒãƒ•ォーカスを失ã£ãŸæ™‚点ã§ã€ãƒ€ãƒ¼ãƒ†ã‚£ ファイルを自動的ã«ä¿å­˜ã—ã¾ã™ã€‚", + "autoSave": "ダーティ ファイルã®è‡ªå‹•ä¿å­˜ã‚’制御ã—ã¾ã™ã€‚有効ãªå€¤: '{0}'ã€'{1}'ã€'{2}' (エディターãŒãƒ•ォーカスを失ã„ã¾ã™)ã€'{3}' (ウィンドウãŒãƒ•ォーカスを失ã„ã¾ã™)。'{4}' ã«è¨­å®šã™ã‚‹ã¨ã€'files.autoSaveDelay' ã§é…å»¶ã‚’æ§‹æˆã§ãã¾ã™ã€‚", + "autoSaveDelay": "ダーティ ファイルã®è‡ªå‹•ä¿å­˜ã®é…延をミリ秒å˜ä½ã§åˆ¶å¾¡ã—ã¾ã™ã€‚'files.autoSave' ㌠'{0}' ã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆã®ã¿é©ç”¨ã•れã¾ã™", + "watcherExclude": "ファイル監視ã‹ã‚‰é™¤å¤–ã™ã‚‹ãƒ•ァイル パス㮠glob パターンを設定ã—ã¾ã™ã€‚パターンã¯çµ¶å¯¾ãƒ‘スã§ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ (ã¤ã¾ã‚Šã€é©åˆ‡ã«ä¸€è‡´ã™ã‚‹ã«ã¯ã€ãƒ—レフィックス ** を指定ã™ã‚‹ã‹ã€å®Œå…¨ãƒ‘スを指定ã—ã¾ã™\n)。ã“ã®è¨­å®šã‚’変更ã—ãŸå ´åˆã¯ã€å†èµ·å‹•ãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚始動時㫠Code ãŒæ¶ˆè²»ã™ã‚‹ CPU 時間ãŒå¤šã„å ´åˆã¯ã€å¤§ãã„フォルダーを除外ã™ã‚Œã°åˆæœŸã®è² è·ã‚’減らã™ã“ã¨ãŒã§ãã¾ã™ã€‚", + "hotExit.off": "Hot Exit を無効ã«ã—ã¾ã™ã€‚", + "hotExit.onExit": "アプリケーションãŒé–‰ã˜ã‚‹ã¨ (Windows/Linux ã§æœ€å¾Œã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒé–‰ã˜ã‚‹ã¨ãã€ã¾ãŸã¯ workbench.action.quit コマンドãŒãƒˆãƒªã‚¬ãƒ¼ã•れるã¨ã (コマンド パレットã€ã‚­ãƒ¼ ãƒã‚¤ãƒ³ãƒ‰ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼))ã€Hot Exit ãŒãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™ã€‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•れã¦ã„ã‚‹ã™ã¹ã¦ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ã€æ¬¡ã®èµ·å‹•時ã«å¾©å…ƒã•れã¾ã™ã€‚", + "hotExit.onExitAndWindowClose": "アプリケーションãŒé–‰ã˜ã‚‹ã¨ (Windows/Linux ã§æœ€å¾Œã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒé–‰ã˜ã‚‹ã¨ãã€ã¾ãŸã¯ workbench.action.quit コマンドãŒãƒˆãƒªã‚¬ãƒ¼ã™ã‚‹ã¨ã (コマンド パレットã€ã‚­ãƒ¼ ãƒã‚¤ãƒ³ãƒ‰ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼))ã€Hot Exit ãŒãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™ã€‚ã¾ãŸã€ãƒ•ォルダーãŒé–‹ã‹ã‚Œã¦ã„るウィンドウã«ã¤ã„ã¦ã‚‚ã€ãã‚ŒãŒæœ€å¾Œã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‹ã©ã†ã‹ã«é–¢ä¿‚ãªãã€Hot Exit ãŒãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™ã€‚フォルダーãŒé–‹ã‹ã‚Œã¦ã„ãªã„ウィンドウã¯ã™ã¹ã¦ã€æ¬¡å›žã®èµ·å‹•時ã«å¾©å…ƒã•れã¾ã™ã€‚フォルダーã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’シャットダウンå‰ã¨åŒã˜çŠ¶æ…‹ã«å¾©å…ƒã™ã‚‹ã«ã¯ã€\"window.restoreWindows\" ã‚’ \"all\" ã«è¨­å®šã—ã¾ã™ã€‚", + "hotExit": "エディターを終了ã™ã‚‹ã¨ãã«ä¿å­˜ã‚’確èªã™ã‚‹ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’çœç•¥ã—ã€ä¿å­˜ã•れã¦ã„ãªã„ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ã‚»ãƒƒã‚·ãƒ§ãƒ³å¾Œã‚‚ä¿æŒã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", + "useExperimentalFileWatcher": "æ–°ã—ã„試験的㪠File Watcher を使用ã—ã¾ã™ã€‚", + "defaultLanguage": "æ–°ã—ã„ファイルã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹æ—¢å®šã®è¨€èªžãƒ¢ãƒ¼ãƒ‰ã€‚", + "editorConfigurationTitle": "エディター", + "formatOnSave": "ファイルをä¿å­˜ã™ã‚‹ã¨ãã«ãƒ•ォーマットã—ã¦ãã ã•ã„。フォーマッタを使用å¯èƒ½ã«ã—ã¦ã€ãƒ•ァイルを自動ä¿å­˜ã›ãšã€ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’シャットダウンã—ãªã„ã§ãã ã•ã„。", + "explorerConfigurationTitle": "エクスプローラー", + "openEditorsVisible": "[é–‹ã„ã¦ã„るエディター] ウィンドウã«è¡¨ç¤ºã•れã¦ã„ã‚‹ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®æ•°ã€‚0 ã«è¨­å®šã™ã‚‹ã¨ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒéžè¡¨ç¤ºã«ãªã‚Šã¾ã™ã€‚", + "dynamicHeight": "é–‹ã„ã¦ã„るエディターã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®é«˜ã•ã‚’è¦ç´ ã®æ•°ã«åˆã‚ã›ã¦å‹•çš„ã«èª¿æ•´ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", + "autoReveal": "エクスプローラーã§ãƒ•ァイルを開ãã¨ãã€è‡ªå‹•çš„ã«ãƒ•ァイルã®å†…容を表示ã—ã¦é¸æŠžã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", + "enableDragAndDrop": "ドラッグ アンド ドロップを使用ã—ãŸãƒ•ァイルã¨ãƒ•ォルダーã®ç§»å‹•をエクスプローラーãŒè¨±å¯ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", + "confirmDragAndDrop": "ドラッグ アンド ドロップを使用ã—ãŸãƒ•ァイルやフォルダーã®ç§»å‹•時ã«ã‚¨ã‚¯ã‚¹ãƒ—ローラーãŒç¢ºèªã‚’求ã‚ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", + "confirmDelete": "ã”ã¿ç®±ã‚’経由ã—ãŸãƒ•ァイル削除時ã«ã‚¨ã‚¯ã‚¹ãƒ—ローラーãŒç¢ºèªã‚’求ã‚ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", + "sortOrder.default": "ファイルã¨ãƒ•ォルダーをアルファベット順ã«åå‰ã§ä¸¦ã³æ›¿ãˆã¾ã™ã€‚フォルダーã¯ãƒ•ァイルã®å‰ã«è¡¨ç¤ºã•れã¾ã™ã€‚", + "sortOrder.mixed": "ファイルã¨ãƒ•ォルダーをアルファベット順ã«åå‰ã§ä¸¦ã³æ›¿ãˆã¾ã™ã€‚ファイルã¯ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã¨æ··äº¤ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚", + "sortOrder.filesFirst": "ファイルã¨ãƒ•ォルダーをアルファベット順ã«åå‰ã§ä¸¦ã³æ›¿ãˆã¾ã™ã€‚ファイルã¯ãƒ•ォルダーã®å‰ã«è¡¨ç¤ºã•れã¾ã™ã€‚", + "sortOrder.type": "ファイルã¨ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’ã‚¢ãƒ«ãƒ•ã‚¡ãƒ™ãƒƒãƒˆé †ã«æ‹¡å¼µå­ã§ä¸¦ã³æ›¿ãˆã¾ã™ã€‚フォルダーã¯ãƒ•ァイルã®å‰ã«è¡¨ç¤ºã•れã¾ã™ã€‚", + "sortOrder.modified": "ファイルã¨ãƒ•ォルダーをé™é †ã«æœ€çµ‚æ›´æ–°æ—¥ã§ä¸¦ã³æ›¿ãˆã¾ã™ã€‚フォルダーã¯ãƒ•ァイルã®å‰ã«è¡¨ç¤ºã•れã¾ã™ã€‚", + "sortOrder": "エクスプローラー内ã®ãƒ•ァイルã¨ãƒ•ォルダーã®ä¸¦ã³é †ã‚’制御ã—ã¾ã™ã€‚既定ã®ä¸¦ã³é †ã«åŠ ãˆã¦ã€'mixed' (ファイルã¨ãƒ•ォルダーを混交ã—ãŸä¸¦ã³é †)ã€' type' (ファイルã®ç¨®é¡žé †)ã€' modified' (最終更新日時順)ã€ã¾ãŸã¯ 'filesFirst' (フォルダーã®å‰ã«ãƒ•ァイルを並ã¹ã‚‹) ã®ã„ãšã‚Œã‹ã®ä¸¦ã³é †ã«è¨­å®šã§ãã¾ã™ã€‚ ", + "explorer.decorations.colors": "ファイルã®è£…飾ã«é…色を使用ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", + "explorer.decorations.badges": "ファイルã®è£…飾ã«ãƒãƒƒã‚¸ã‚’使用ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json new file mode 100644 index 00000000000..a11f1cb6ffc --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "userGuide": "å³å´ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ ツール ãƒãƒ¼ã®æ“作ã§ã€å¤‰æ›´ã‚’ [å…ƒã«æˆ»ã™] ã‹ã€ãƒ‡ã‚£ã‚¹ã‚¯ã®å†…容を変更内容㧠[上書ã] ã—ã¾ã™", + "discard": "破棄", + "overwrite": "上書ã", + "retry": "å†è©¦è¡Œ", + "readonlySaveError": "'{0}' ã®ä¿å­˜ã«å¤±æ•—ã—ã¾ã—ãŸã€‚ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ›¸ãè¾¼ã¿ç¦æ­¢ã«ãªã£ã¦ã„ã¾ã™ã€‚[上書ã] ã‚’é¸æŠžã—ã¦ä¿è­·ã‚’解除ã—ã¦ãã ã•ã„。", + "genericSaveError": "'{0}' ã®ä¿å­˜ã«å¤±æ•—ã—ã¾ã—ãŸ: {1}", + "staleSaveError": "'{0} ã®ä¿å­˜ã«å¤±æ•—ã—ã¾ã—ãŸã€‚ディスクã®å†…å®¹ã®æ–¹ãŒæ–°ã—ããªã£ã¦ã„ã¾ã™ã€‚[比較] をクリックã—ã¦ã”使用ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ディスク上ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¨æ¯”較ã—ã¦ãã ã•ã„。", + "compareChanges": "比較", + "saveConflictDiffLabel": "{0} (ディスク上) ↔ {1} ({2} 内) - ä¿å­˜ã®ç«¶åˆã‚’解決" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json new file mode 100644 index 00000000000..ac152686d08 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "é–‹ã„ã¦ã„るフォルダーãŒã‚りã¾ã›ã‚“", + "explorerSection": "ファイル エクスプローラー セクション", + "noWorkspaceHelp": "ã¾ã ãƒ•ォルダーをワークスペースã«è¿½åŠ ã—ã¦ã„ã¾ã›ã‚“。", + "addFolder": "フォルダーã®è¿½åŠ ", + "noFolderHelp": "ã¾ã ãƒ•ォルダーを開ã„ã¦ã„ã¾ã›ã‚“。", + "openFolder": "フォルダーを開ã" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json new file mode 100644 index 00000000000..44e1e67ff1c --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label": "エクスプローラー", + "canNotResolve": "ワークスペース フォルダーを解決ã§ãã¾ã›ã‚“" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json new file mode 100644 index 00000000000..2397d9a49b4 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "ファイル エクスプローラー セクション", + "treeAriaLabel": "ファイル エクスプローラー" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json new file mode 100644 index 00000000000..f9c3565a125 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "ファイルåを入力ã—ã¾ã™ã€‚Enter キーを押ã—ã¦ç¢ºèªã™ã‚‹ã‹ã€Esc キーを押ã—ã¦å–り消ã—ã¾ã™ã€‚", + "filesExplorerViewerAriaLabel": "{0}ã€ãƒ•ァイル エクスプローラー", + "dropFolders": "ワークスペースã«ãƒ•ォルダーを追加ã—ã¾ã™ã‹?", + "dropFolder": "ワークスペースã«ãƒ•ォルダーを追加ã—ã¾ã™ã‹?", + "addFolders": "フォルダーã®è¿½åŠ (&&A)", + "addFolder": "フォルダーã®è¿½åŠ (&&A)", + "confirmMove": "'{0}' を移動ã—ã¾ã™ã‹?", + "doNotAskAgain": "å†åº¦è¡¨ç¤ºã—ãªã„", + "moveButtonLabel": "移動(&&M)", + "confirmOverwriteMessage": "'{0}' ã¯ä¿å­˜å…ˆãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«æ—¢ã«å­˜åœ¨ã—ã¾ã™ã€‚ç½®ãæ›ãˆã¦ã‚‚よã‚ã—ã„ã§ã™ã‹ã€‚", + "irreversible": "ã“ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å…ƒã«æˆ»ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。", + "replaceButtonLabel": "ç½®æ›(&&R)" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json new file mode 100644 index 00000000000..b798b662ed0 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "é–‹ã„ã¦ã„るエディター", + "openEditosrSection": "[é–‹ã„ã¦ã„るエディター] セクション", + "dirtyCounter": "未ä¿å­˜ ({0})", + "saveAll": "ã™ã¹ã¦ä¿å­˜", + "closeAllUnmodified": "未変更を閉ã˜ã‚‹", + "closeAll": "ã™ã¹ã¦é–‰ã˜ã‚‹", + "compareWithSaved": "ä¿å­˜æ¸ˆã¿ã¨æ¯”較", + "close": "é–‰ã˜ã‚‹", + "closeOthers": "ãã®ä»–ã‚’é–‰ã˜ã‚‹" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json new file mode 100644 index 00000000000..838a289ecd9 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}ã€ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ グループ", + "openEditorAriaLabel": "{0}ã€é–‹ã„ã¦ã„るエディター", + "saveAll": "ã™ã¹ã¦ä¿å­˜", + "closeAllUnmodified": "未変更を閉ã˜ã‚‹", + "closeAll": "ã™ã¹ã¦é–‰ã˜ã‚‹", + "compareWithSaved": "ä¿å­˜æ¸ˆã¿ã¨æ¯”較", + "close": "é–‰ã˜ã‚‹", + "closeOthers": "ãã®ä»–ã‚’é–‰ã˜ã‚‹" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/jpn/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json new file mode 100644 index 00000000000..335a111c7ab --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "totalProblems": "åˆè¨ˆ {0} 個ã®å•題", + "filteredProblems": "{1} 個中 {0} 個ã®å•題を表示ã—ã¦ã„ã¾ã™" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/jpn/src/vs/workbench/parts/markers/common/messages.i18n.json index 9a17f323ff9..efe22d017f6 100644 --- a/i18n/jpn/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,8 +6,7 @@ { "viewCategory": "表示", "problems.view.toggle.label": "å•題ã®åˆ‡ã‚Šæ›¿ãˆ", - "problems.view.show.label": "å•題を表示ã™ã‚‹", - "problems.view.hide.label": "å•題ã®éžè¡¨ç¤º", + "problems.view.focus.label": "å•題ã«ãƒ•ォーカス", "problems.panel.configuration.title": "å•題ビュー", "problems.panel.configuration.autoreveal": "ファイルを開ãã¨ãã«å•題ビューã«è‡ªå‹•çš„ã«ãã®ãƒ•ァイルを表示ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™", "markers.panel.title.problems": "å•題", diff --git a/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json b/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json new file mode 100644 index 00000000000..bc5d929551c --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "prof.message": "ãƒ—ãƒ­ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ­£å¸¸ã«ä½œæˆã•れã¾ã—ãŸã€‚", + "prof.detail": "案件を作æˆã—ã€æ‰‹å‹•ã§æ¬¡ã®ãƒ•ァイルを添付ã—ã¦ãã ã•ã„:\\n{0}", + "prof.restartAndFileIssue": "å•題を作æˆã—ã¦å†èµ·å‹•", + "prof.restart": "å†èµ·å‹•", + "prof.thanks": "ã”å”力ã„ãŸã ãã€ã‚りãŒã¨ã†ã”ã–ã„ã¾ã™ã€‚", + "prof.detail.restart": "'{0}' を引ãç¶šã使用ã™ã‚‹ã«ã¯ã€æœ€å¾Œã®å†èµ·å‹•ãŒå¿…è¦ã§ã™ã€‚ 改ã‚ã¦ã‚ãªãŸã®è²¢çŒ®ã«æ„Ÿè¬ã—ã¾ã™ã€‚" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index c99a48b4e76..efdc6c41cac 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defineKeybinding.initial": "ä»»æ„ã®ã‚­ãƒ¼ã®çµ„ã¿åˆã‚ã›ã‚’押ã—ã€Enter キーを押ã—ã¾ã™ã€‚キャンセルã™ã‚‹ã«ã¯ Esc キーを押ã—ã¦ãã ã•ã„。", + "defineKeybinding.initial": "ä»»æ„ã®ã‚­ãƒ¼ã®çµ„ã¿åˆã‚ã›ã‚’押ã—ã€ENTER キーを押ã—ã¾ã™ã€‚", "defineKeybinding.chordsTo": "次ã¸ã®ã‚³ãƒ¼ãƒ‰:" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index 9b0f4ce7178..d963a2915fe 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -26,6 +26,7 @@ "editKeybindingLabel": "キー ãƒã‚¤ãƒ³ãƒ‰ã®å¤‰æ›´", "addKeybindingLabelWithKey": "キー ãƒã‚¤ãƒ³ãƒ‰ã®è¿½åŠ  {0}", "addKeybindingLabel": "キー ãƒã‚¤ãƒ³ãƒ‰ã®è¿½åŠ ", + "title": "{0} ({1})", "commandAriaLabel": "コマンド㯠{0} ã§ã™ã€‚", "keybindingAriaLabel": "キー ãƒã‚¤ãƒ³ãƒ‰ã¯ {0} ã§ã™ã€‚", "noKeybinding": "キー ãƒã‚¤ãƒ³ãƒ‰ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã›ã‚“。", diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 3257770db15..8d64e396992 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "openRawDefaultSettings": "既定ã®è¨­å®šã‚’ Raw ã§é–‹ã", "openGlobalSettings": "ユーザー設定を開ã", "openGlobalKeybindings": "キーボード ショートカットを開ã", "openGlobalKeybindingsFile": "キーボード ショートカット ファイルを開ã", diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 4df3bbb8de6..dacdf6ccd9d 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -7,12 +7,12 @@ "settingsEditorName": "既定ã®è¨­å®š", "SearchSettingsWidget.AriaLabel": "è¨­å®šã®æ¤œç´¢", "SearchSettingsWidget.Placeholder": "è¨­å®šã®æ¤œç´¢", - "totalSettingsMessage": "åˆè¨ˆ {0} 個ã®è¨­å®š", "noSettingsFound": "çµæžœãªã—", "oneSettingFound": "1 ã¤ã®è¨­å®šãŒä¸€è‡´ã—ã¾ã™", "settingsFound": "{0} 個ã®è¨­å®šãŒä¸€è‡´ã—ã¾ã™", - "fileEditorWithInputAriaLabel": "{0}。テキスト ファイル エディター。", - "fileEditorAriaLabel": "テキスト ファイル エディター。", + "totalSettingsMessage": "åˆè¨ˆ {0} 個ã®è¨­å®š", + "defaultSettings": "既定ã®è¨­å®š", + "defaultFolderSettings": "既定ã®ãƒ•ォルダー設定", "defaultEditorReadonly": "既定値を上書ãã™ã‚‹ã«ã¯ã€å³å´ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’編集ã—ã¾ã™ã€‚", "preferencesAriaLabel": "既定ã®åŸºæœ¬è¨­å®šã€‚読ã¿å–り専用ã®ãƒ†ã‚­ã‚¹ãƒˆ エディター。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 77e44623852..726fb894b04 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -7,8 +7,6 @@ "emptyUserSettingsHeader": "既定ã®è¨­å®šã‚’上書ãã™ã‚‹ã«ã¯ã€ã“ã®ãƒ•ァイル内ã«è¨­å®šã‚’挿入ã—ã¾ã™ã€‚", "emptyWorkspaceSettingsHeader": "ユーザー設定を上書ãã™ã‚‹ã«ã¯ã€ã“ã®ãƒ•ァイル内ã«è¨­å®šã‚’挿入ã—ã¾ã™ã€‚", "emptyFolderSettingsHeader": "ワークスペースã®è¨­å®šã‚’上書ãã™ã‚‹ã«ã¯ã€ã“ã®ãƒ•ァイル内ã«ãƒ•ォルダーã®è¨­å®šã‚’挿入ã—ã¾ã™ã€‚", - "defaultFolderSettingsTitle": "既定ã®ãƒ•ォルダー設定", - "defaultSettingsTitle": "既定ã®è¨­å®š", "editTtile": "編集", "replaceDefaultValue": "設定を置æ›", "copyDefaultValue": "設定ã«ã‚³ãƒ”ー", diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index 3997e1202fd..dbb463d1324 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultSettingsFuzzyPrompt": "ã‚ã„ã¾ã„検索をãŠè©¦ã—ãã ã•ã„!", + "defaultSettingsFuzzyPrompt": "自然文検索 (natural language search) を試ã—下ã•ã„!", "defaultSettings": "上書ãã™ã‚‹ã«ã¯ã€å³å´ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«è¨­å®šã‚’入力ã—ã¾ã™ã€‚", "noSettingsFound": "設定ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。", - "folderSettingsDetails": "フォルダーã®è¨­å®š", - "enableFuzzySearch": "試験的ãªã‚ã„ã¾ã„検索を有効ã«ã™ã‚‹" + "settingsSwitcherBarAriaLabel": "設定切り替ãˆ", + "userSettings": "ユーザー設定", + "workspaceSettings": "ワークスペースã®è¨­å®š", + "folderSettings": "フォルダーã®è¨­å®š", + "enableFuzzySearch": "自然文検索を有効ã«ã™ã‚‹" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json new file mode 100644 index 00000000000..10d2433b22a --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "既定ã®åŸºæœ¬è¨­å®šã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼", + "keybindingsEditor": "キー ãƒã‚¤ãƒ³ãƒ‰ エディター", + "preferences": "基本設定" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json index 8f9dfe27002..2cd7ee76d8f 100644 --- a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -6,7 +6,6 @@ { "scm providers": "ソース管ç†ãƒ—ロãƒã‚¤ãƒ€ãƒ¼", "hideRepository": "éžè¡¨ç¤º", - "commitMessage": "Message (press {0} to commit)", "installAdditionalSCMProviders": "ãã®ä»–ã® SCM プロãƒã‚¤ãƒ€ãƒ¼ã‚’インストール...", "no open repo": "有効ãªã‚½ãƒ¼ã‚¹ç®¡ç†ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ãŒã‚りã¾ã›ã‚“。", "source control": "ソース管ç†", diff --git a/i18n/jpn/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/jpn/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index 4957ca3db7e..1fa2626c490 100644 --- a/i18n/jpn/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defaultLabel": "入力", - "useIgnoreFilesDescription": "無視設ファイルを使用ã—ã¾ã™", - "useExcludeSettingsDescription": "除外設定を使用ã™ã‚‹" + "useExcludesAndIgnoreFilesDescription": "除外設定を使用ã—ã¦ã€ãƒ•ァイルを無視ã—ã¾ã™ã€‚" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/search/browser/search.contribution.i18n.json index 7d61d0b13e6..cea0aca3303 100644 --- a/i18n/jpn/src/vs/workbench/parts/search/browser/search.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -16,7 +16,6 @@ "exclude.boolean": "ファイル パスã®ç…§åˆåŸºæº–ã¨ãªã‚‹ glob パターン。ã“れを true ã¾ãŸã¯ false ã«è¨­å®šã™ã‚‹ã¨ã€ãƒ‘ターンãŒãれãžã‚Œæœ‰åй/無効ã«ãªã‚Šã¾ã™ã€‚", "exclude.when": "一致ã™ã‚‹ãƒ•ァイルã®å…„弟をã•らã«ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚一致ã™ã‚‹ãƒ•ァイルåã®å¤‰æ•°ã¨ã—㦠$(basename) を使用ã—ã¾ã™ã€‚", "useRipgrep": "テキストã¨ãƒ•ァイル検索㧠ripgrep を使用ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™", - "useIgnoreFilesByDefault": "æ–°ã—ã„ワークスペースã§ãƒ†ã‚­ã‚¹ãƒˆã‚’検索ã™ã‚‹ã¨ãã«ã€æ—¢å®šã§ .gitignore ファイル㨠.ignore ファイルを使用ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚", "useIgnoreFiles": "ファイルを検索ã™ã‚‹ã¨ãã«ã€.gitignore ファイルを使用ã™ã‚‹ã‹ .ignore ファイルを使用ã™ã‚‹ã‹ã‚’制御ã—ã¾ã™ã€‚", "search.quickOpen.includeSymbols": "グローãƒãƒ« シンボル検索ã®çµæžœã‚’ã€Quick Open ã®çµæžœãƒ•ァイルã«å«ã‚るよã†ã«æ§‹æˆã—ã¾ã™ã€‚", "search.followSymlinks": "検索中ã«ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯ リンクを追跡ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚" diff --git a/i18n/jpn/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 7f6464f3a56..d07e4c94a3f 100644 --- a/i18n/jpn/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -10,17 +10,14 @@ "previousSearchExcludePattern": "å‰ã®æ¤œç´¢é™¤å¤–パターンを表示", "nextSearchTerm": "æ¬¡ã®æ¤œç´¢èªžå¥ã‚’表示", "previousSearchTerm": "å‰ã®æ¤œç´¢èªžå¥ã‚’表示", - "focusNextInputBox": "次ã®å…¥åŠ›ãƒœãƒƒã‚¯ã‚¹ã«ãƒ•ォーカス", - "focusPreviousInputBox": "å‰ã®å…¥åŠ›ãƒœãƒƒã‚¯ã‚¹ã«ãƒ•ォーカス", "showSearchViewlet": "検索ã®è¡¨ç¤º", "findInFiles": "フォルダーを指定ã—ã¦æ¤œç´¢", "findInFilesWithSelectedText": "é¸æŠžã—ãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ãƒ•ァイルを検索", "replaceInFiles": "複数ã®ãƒ•ァイルã§ç½®æ›", "replaceInFilesWithSelectedText": "é¸æŠžã—ãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ãƒ•ァイルã®ç½®æ›", - "findInWorkspace": "ワークスペース内を検索...", - "findInFolder": "フォルダー内を検索...", "RefreshAction.label": "æœ€æ–°ã®æƒ…å ±ã«æ›´æ–°", - "ClearSearchResultsAction.label": "æ¤œç´¢çµæžœã®ã‚¯ãƒªã‚¢", + "CollapseDeepestExpandedLevelAction.label": "ã™ã¹ã¦æŠ˜ã‚ŠãŸãŸã‚€", + "ClearSearchResultsAction.label": "クリア", "FocusNextSearchResult.label": "æ¬¡ã®æ¤œç´¢çµæžœã«ãƒ•ォーカス", "FocusPreviousSearchResult.label": "å‰ã®æ¤œç´¢çµæžœã«ãƒ•ォーカス", "RemoveAction.label": "å´ä¸‹", diff --git a/i18n/jpn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json new file mode 100644 index 00000000000..e266c4b0298 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "ワークスペース内ã®ã‚·ãƒ³ãƒœãƒ«ã¸ç§»å‹•...", + "name": "検索", + "search": "検索", + "view": "表示", + "openAnythingHandlerDescription": "ファイルã«ç§»å‹•ã™ã‚‹", + "openSymbolDescriptionNormal": "ワークスペース内ã®ã‚·ãƒ³ãƒœãƒ«ã¸ç§»å‹•", + "searchOutputChannelTitle": "検索", + "searchConfigurationTitle": "検索", + "exclude": "検索ã§ãƒ•ァイルã¨ãƒ•ォルダーを除外ã™ã‚‹ãŸã‚ã« glob パターンを構æˆã—ã¾ã™ã€‚files.exclude 設定ã‹ã‚‰ã™ã¹ã¦ã® glob パターンを継承ã—ã¾ã™ã€‚", + "exclude.boolean": "ファイル パスã®ç…§åˆåŸºæº–ã¨ãªã‚‹ glob パターン。ã“れを true ã¾ãŸã¯ false ã«è¨­å®šã™ã‚‹ã¨ã€ãƒ‘ターンãŒãれãžã‚Œæœ‰åй/無効ã«ãªã‚Šã¾ã™ã€‚", + "exclude.when": "一致ã™ã‚‹ãƒ•ァイルã®å…„弟をã•らã«ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚一致ã™ã‚‹ãƒ•ァイルåã®å¤‰æ•°ã¨ã—㦠$(basename) を使用ã—ã¾ã™ã€‚", + "useRipgrep": "テキストã¨ãƒ•ァイル検索㧠ripgrep を使用ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™", + "useIgnoreFiles": "ファイルを検索ã™ã‚‹ã¨ãã«ã€.gitignore ファイルを使用ã™ã‚‹ã‹ .ignore ファイルを使用ã™ã‚‹ã‹ã‚’制御ã—ã¾ã™ã€‚", + "search.quickOpen.includeSymbols": "グローãƒãƒ« シンボル検索ã®çµæžœã‚’ã€Quick Open ã®çµæžœãƒ•ァイルã«å«ã‚るよã†ã«æ§‹æˆã—ã¾ã™ã€‚", + "search.followSymlinks": "検索中ã«ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯ リンクをãŸã©ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json new file mode 100644 index 00000000000..379fc84bf34 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "findInFolder": "フォルダー内を検索...", + "findInWorkspace": "ワークスペース内を検索..." +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index ec353f855bf..312bf5688b3 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -6,10 +6,9 @@ { "tasksCategory": "タスク", "ConfigureTaskRunnerAction.label": "ã‚¿ã‚¹ã‚¯ã®æ§‹æˆ", - "ConfigureBuildTaskAction.label": "ビルド タスクを構æˆã—ã¾ã™", "CloseMessageAction.label": "é–‰ã˜ã‚‹", - "ShowTerminalAction.label": "ターミナルã®è¡¨ç¤º", "problems": "å•題", + "building": "ビルド中...", "manyMarkers": "99+", "runningTasks": "実行中ã®ã‚¿ã‚¹ã‚¯ã‚’表示", "tasks": "タスク", @@ -52,7 +51,7 @@ "TaslService.noEntryToRun": "実行ã™ã‚‹ã‚¿ã‚¹ã‚¯ãŒã‚りã¾ã›ã‚“。タスクを構æˆã™ã‚‹...", "TaskService.fetchingBuildTasks": "ビルド タスクをフェッãƒã—ã¦ã„ã¾ã™...", "TaskService.pickBuildTask": "実行ã™ã‚‹ãƒ“ルド ã‚¿ã‚¹ã‚¯ã‚’é¸æŠž", - "TaskService.noBuildTask": "実行ã™ã‚‹ãƒ“ルド タスクãŒã‚りã¾ã›ã‚“。タスクを構æˆã™ã‚‹... ", + "TaskService.noBuildTask": "実行ã™ã‚‹ãƒ“ルド タスクãŒã‚りã¾ã›ã‚“。ビルド タスクを構æˆã™ã‚‹...", "TaskService.fetchingTestTasks": "テスト タスクをフェッãƒã—ã¦ã„ã¾ã™...", "TaskService.pickTestTask": "実行ã™ã‚‹ãƒ†ã‚¹ãƒˆ ã‚¿ã‚¹ã‚¯ã‚’é¸æŠžã—ã¦ãã ã•ã„", "TaskService.noTestTaskTerminal": "実行ã™ã‚‹ãƒ†ã‚¹ãƒˆ タスクãŒã‚りã¾ã›ã‚“。タスクを構æˆã™ã‚‹... ", diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 0fe8ccee4c6..38c25f4c1c3 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -7,6 +7,7 @@ "TerminalTaskSystem.unknownError": "タスクã®å®Ÿè¡Œä¸­ã«ä¸æ˜Žãªã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚詳細ã«ã¤ã„ã¦ã¯ã€ã‚¿ã‚¹ã‚¯å‡ºåŠ›ãƒ­ã‚°ã‚’å‚ç…§ã—ã¦ãã ã•ã„。", "dependencyFailed": "ワークスペース フォルダー '{1}' 内ã§ä¾å­˜ã‚¿ã‚¹ã‚¯ã® '{0}' を解決ã§ãã¾ã›ã‚“ã§ã—ãŸ", "TerminalTaskSystem.terminalName": "タスク - {0}", + "closeTerminal": "ä»»æ„ã®ã‚­ãƒ¼ã‚’押ã—ã¦ã‚¿ãƒ¼ãƒŸãƒŠãƒ«ã‚’終了ã—ã¾ã™ã€‚", "reuseTerminal": "ターミナルã¯ã‚¿ã‚¹ã‚¯ã§å†åˆ©ç”¨ã•れã¾ã™ã€é–‰ã˜ã‚‹ã«ã¯ä»»æ„ã®ã‚­ãƒ¼ã‚’押ã—ã¦ãã ã•ã„。", "TerminalTaskSystem": "UNC ドライブã§ã‚·ã‚§ãƒ« コマンドを実行ã§ãã¾ã›ã‚“。", "unkownProblemMatcher": "å•題マッãƒãƒ£ãƒ¼ {0} ã¯è§£æ±ºã§ãã¾ã›ã‚“ã§ã—ãŸã€‚マッãƒãƒ£ãƒ¼ã¯ç„¡è¦–ã•れã¾ã™" diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index ac618cfa97a..c33b85b3dfe 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,8 +14,8 @@ "ConfigurationParser.noTypeDefinition": "Error: タスク タイプ '{0}' ã¯ç™»éŒ²ã•れã¦ã„ã¾ã›ã‚“。対応ã™ã‚‹ã‚¿ã‚¹ã‚¯ プロãƒã‚¤ãƒ€ãƒ¼ã‚’æä¾›ã™ã‚‹æ‹¡å¼µæ©Ÿèƒ½ã‚’インストールã—ã¾ã—ãŸã‹?", "ConfigurationParser.missingRequiredProperty": "エラー: ã‚¿ã‚¹ã‚¯æ§‹æˆ '{0}' ã«å¿…è¦ãª '{1}' プロパティãŒã‚りã¾ã›ã‚“。構æˆã¯ç„¡è¦–ã•れã¾ã™ã€‚ ", "ConfigurationParser.notCustom": "エラー: タスクãŒã‚«ã‚¹ã‚¿ãƒ  タスクã¨ã—ã¦å®šç¾©ã•れã¦ã„ã¾ã›ã‚“。ã“ã®æ§‹æˆã¯ç„¡è¦–ã•れã¾ã™ã€‚\n{0}\n", - "ConfigurationParser.noTaskName": "エラー: タスク㌠taskName プロパティをæä¾›ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ã“ã®ã‚¿ã‚¹ã‚¯ã¯ç„¡è¦–ã•れã¾ã™ã€‚\n{0}\n", - "taskConfiguration.shellArgs": "警告: タスク '{0}' ã¯ã‚·ã‚§ãƒ« コマンドã§ã™ã€‚コマンドåã¾ãŸã¯å¼•æ•°ã® 1 ã¤ã«ã€ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•れã¦ã„ãªã„スペースãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚コマンド ラインã®å¼•ç”¨ãŒæ­£ã—ã解釈ã•れるよã†ã«ã€å¼•数をコマンドã«ãƒžãƒ¼ã‚¸ã—ã¦ãã ã•ã„。", + "ConfigurationParser.noTaskName": "エラー: タスク㌠label プロパティをæä¾›ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ã“ã®ã‚¿ã‚¹ã‚¯ã¯ç„¡è¦–ã•れã¾ã™ã€‚\n{0}\n", + "taskConfiguration.shellArgs": "警告: タスク '{0}' ã¯ã‚·ã‚§ãƒ« コマンドã§ã‚りã€ãã®å¼•æ•°ã® 1 ã¤ã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•れã¦ã„ãªã„スペースãŒå«ã¾ã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚コマンド ラインã®å¼•ç”¨ãŒæ­£ã—ã解釈ã•れるよã†ã«ã€å¼•数をコマンドã«ãƒžãƒ¼ã‚¸ã—ã¦ãã ã•ã„。", "taskConfiguration.noCommandOrDependsOn": "エラー: タスク '{0}' ã¯ã€ã‚³ãƒžãƒ³ãƒ‰ã‚‚ dependsOn プロパティも指定ã—ã¦ã„ã¾ã›ã‚“。ã“ã®ã‚¿ã‚¹ã‚¯ã¯ç„¡è¦–ã•れã¾ã™ã€‚å®šç¾©ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™:\n{1}", "taskConfiguration.noCommand": "エラー: タスク '{0}' ã¯ã‚³ãƒžãƒ³ãƒ‰ã‚’定義ã—ã¦ã„ã¾ã›ã‚“。ã“ã®ã‚¿ã‚¹ã‚¯ã¯ç„¡è¦–ã•れã¾ã™ã€‚å®šç¾©ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™:\n{1}", "TaskParse.noOsSpecificGlobalTasks": "ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 2.0.0 ã®ã‚¿ã‚¹ã‚¯ã§ã¯ã€OS ã«å›ºæœ‰ã®ã‚°ãƒ­ãƒ¼ãƒãƒ« タスクã¯ã‚µãƒãƒ¼ãƒˆã•れã¾ã›ã‚“。OS ã«å›ºæœ‰ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ãŸã‚¿ã‚¹ã‚¯ã«å¤‰æ›ã—ã¦ãã ã•ã„。影響をå—ã‘ã‚‹ã‚¿ã‚¹ã‚¯ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ã€‚\n{0}" diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index f4845c96a75..daa7ef1a9ed 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,7 +6,7 @@ { "termEntryAriaLabel": "{0}ã€ã‚¿ãƒ¼ãƒŸãƒŠãƒ« ピッカー", "termCreateEntryAriaLabel": "{0} ã€æ–°ã—ã„ターミナルã®ä½œæˆ", - "'workbench.action.terminal.newplus": "$(plus) æ–°ã—ã„çµ±åˆã‚¿ãƒ¼ãƒŸãƒŠãƒ«ã®ä½œæˆ", + "workbench.action.terminal.newplus": "$(plus) æ–°ã—ã„çµ±åˆã‚¿ãƒ¼ãƒŸãƒŠãƒ«ã®ä½œæˆ", "noTerminalsMatching": "一致ã™ã‚‹ã‚¿ãƒ¼ãƒŸãƒŠãƒ«ãŒã‚りã¾ã›ã‚“", "noTerminalsFound": "é–‹ã„ã¦ã„るターミナルãŒã‚りã¾ã›ã‚“" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 7592dde26b5..ffdf047f3bc 100644 --- a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,13 +5,15 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "é…色テーマ", + "themes.category.light": "ライト テーマ", + "themes.category.dark": "ダーク テーマ", + "themes.category.hc": "ãƒã‚¤ コントラスト テーマ", "installColorThemes": "ãã®ä»–ã®é…色テーマをインストール...", "themes.selectTheme": "é…色テーマã®é¸æŠž (上/下キーã§ãƒ—レビューå¯èƒ½)", "selectIconTheme.label": "ファイル アイコンã®ãƒ†ãƒ¼ãƒž", - "installIconThemes": "ãã®ä»–ã®ãƒ•ァイル アイコンã®ãƒ†ãƒ¼ãƒžã‚’インストール...", "noIconThemeLabel": "ãªã—", "noIconThemeDesc": "ファイル アイコンを無効ã«ã™ã‚‹", - "problemChangingIconTheme": "アイコン テーマã®è¨­å®šã§å•題ãŒç™ºç”Ÿã—ã¾ã—ãŸ: {0}", + "installIconThemes": "ãã®ä»–ã®ãƒ•ァイル アイコンã®ãƒ†ãƒ¼ãƒžã‚’インストール...", "themes.selectIconTheme": "ファイル アイコンã®ãƒ†ãƒ¼ãƒžã‚’é¸æŠžã—ã¾ã™", "generateColorTheme.label": "ç¾åœ¨ã®è¨­å®šã‹ã‚‰é…色テーマを生æˆã™ã‚‹", "preferences": "基本設定", diff --git a/i18n/jpn/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/jpn/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 76c3f968a64..799b42b9fae 100644 --- a/i18n/jpn/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -9,9 +9,9 @@ "scope.window.description": "ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦å›ºæœ‰ã®æ§‹æˆã€‚ユーザーã¾ãŸã¯ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã®è¨­å®šã§æ§‹æˆã§ãã¾ã™ã€‚", "scope.resource.description": "ãƒªã‚½ãƒ¼ã‚¹å›ºæœ‰ã®æ§‹æˆã€‚ユーザーã€ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã€ã¾ãŸã¯ãƒ•ォルダーã®è¨­å®šã§æ§‹æˆã§ãã¾ã™ã€‚", "scope.description": "æ§‹æˆãŒé©ç”¨ã•れる範囲。 使用å¯èƒ½ãªã‚¹ã‚³ãƒ¼ãƒ—㯠`window` 㨠` resource` ã§ã™ã€‚", + "vscode.extension.contributes.defaultConfiguration": "言語ã”ã¨ã«æ—¢å®šã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼æ§‹æˆã®è¨­å®šã‚’æä¾›ã—ã¾ã™ã€‚", "vscode.extension.contributes.configuration": "æ§‹æˆã®è¨­å®šã‚’æä¾›ã—ã¾ã™ã€‚", "invalid.title": "'configuration.title' ã¯ã€æ–‡å­—列ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™", - "vscode.extension.contributes.defaultConfiguration": "言語ã”ã¨ã«æ—¢å®šã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼æ§‹æˆã®è¨­å®šã‚’æä¾›ã—ã¾ã™ã€‚", "invalid.properties": "'configuration.properties' ã¯ã€ã‚ªãƒ–ジェクトã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™", "invalid.allOf": "'configuration.allOf' ã¯éžæŽ¨å¥¨ã§ä½¿ç”¨ã§ããªããªã‚Šã¾ã™ã€‚代ã‚り㫠'configuration' コントリビューション ãƒã‚¤ãƒ³ãƒˆã«è¤‡æ•°ã®æ§‹æˆã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’é…列ã¨ã—ã¦æ¸¡ã—ã¾ã™ã€‚", "workspaceConfig.folders.description": "ワークスペースã§èª­ã¿è¾¼ã¾ã‚Œã‚‹ãƒ•ォルダーã®ãƒªã‚¹ãƒˆã€‚", diff --git a/i18n/jpn/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json b/i18n/jpn/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json new file mode 100644 index 00000000000..7df1ec40941 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "テレメトリ", + "telemetry.enableCrashReporting": "クラッシュ レãƒãƒ¼ãƒˆã‚’ Microsoft ã«é€ä¿¡ã™ã‚‹ã‚ˆã†ã«è¨­å®šã—ã¾ã™ã€‚\nã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã«ã¯ã€å†èµ·å‹•ãŒå¿…è¦ã§ã™ã€‚" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/jpn/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json new file mode 100644 index 00000000000..24243ff33ad --- /dev/null +++ b/i18n/jpn/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "message": "$(zap) 拡張機能ホストã®ãƒ—ロファイリング..." +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/jpn/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index a4d588df685..e2aef1055ae 100644 --- a/i18n/jpn/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -9,5 +9,6 @@ "extensionHostProcess.crash": "拡張機能ã®ãƒ›ã‚¹ãƒˆãŒäºˆæœŸã›ãšã«çµ‚了ã—ã¾ã—ãŸã€‚", "extensionHostProcess.unresponsiveCrash": "拡張機能ã®ãƒ›ã‚¹ãƒˆãŒå¿œç­”ã—ãªã„ãŸã‚終了ã—ã¾ã—ãŸã€‚", "overwritingExtension": "拡張機能 {0} ã‚’ {1} ã§ä¸Šæ›¸ãã—ã¦ã„ã¾ã™ã€‚", - "extensionUnderDevelopment": "é–‹ç™ºã®æ‹¡å¼µæ©Ÿèƒ½ã‚’ {0} ã«èª­ã¿è¾¼ã‚“ã§ã„ã¾ã™" + "extensionUnderDevelopment": "é–‹ç™ºã®æ‹¡å¼µæ©Ÿèƒ½ã‚’ {0} ã«èª­ã¿è¾¼ã‚“ã§ã„ã¾ã™", + "extensionCache.invalid": "拡張機能ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§å¤‰æ›´ã•れã¦ã„ã¾ã™ã€‚ウィンドウをå†åº¦èª­ã¿è¾¼ã‚“ã§ãã ã•ã„。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/jpn/src/vs/workbench/services/files/node/fileService.i18n.json index af58e0c5a88..104db33f633 100644 --- a/i18n/jpn/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/files/node/fileService.i18n.json @@ -8,8 +8,8 @@ "fileIsDirectoryError": "ファイルã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ã™", "fileNotModifiedError": "ãƒ•ã‚¡ã‚¤ãƒ«ã¯æ¬¡ã®æ™‚点以後ã«å¤‰æ›´ã•れã¦ã„ã¾ã›ã‚“:", "fileTooLargeError": "é–‹ãファイルãŒå¤§ãã™ãŽã¾ã™", - "fileBinaryError": "ファイルã¯ãƒã‚¤ãƒŠãƒªã®ã‚ˆã†ãªã®ã§ã€ãƒ†ã‚­ã‚¹ãƒˆã¨ã—ã¦é–‹ãã“ã¨ãŒã§ãã¾ã›ã‚“", "fileNotFoundError": "ファイルãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ ({0})", + "fileBinaryError": "ファイルã¯ãƒã‚¤ãƒŠãƒªã®ã‚ˆã†ãªã®ã§ã€ãƒ†ã‚­ã‚¹ãƒˆã¨ã—ã¦é–‹ãã“ã¨ãŒã§ãã¾ã›ã‚“", "fileExists": "生æˆã—よã†ã¨ã—ã¦ã„るファイル ({0}) ã¯æ—¢ã«å­˜åœ¨ã—ã¦ã„ã¾ã™", "fileMoveConflict": "移動/コピーã§ãã¾ã›ã‚“。移動/コピー先ã«ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ—¢ã«å­˜åœ¨ã—ã¾ã™ã€‚", "unableToMoveCopyError": "移動/コピーã§ãã¾ã›ã‚“。ファイルãŒå«ã¾ã‚Œã‚‹ãƒ•ォルダーãŒç½®ãæ›ã‚ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚", diff --git a/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 2da1f235edd..4845e670df1 100644 --- a/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -22,5 +22,5 @@ "keybindings.json.when": "キーãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆã®æ¡ä»¶ã€‚", "keybindings.json.args": "実行ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã«æ¸¡ã™å¼•数。", "keyboardConfigurationTitle": "キーボード", - "dispatch": "`keydown.code` (推奨) ã¾ãŸã¯ `keydown.keyCode` ã®ã„ãšã‚Œã‹ã‚’使用ã™ã‚‹ã‚­ãƒ¼æ“作ã®ãƒ‡ã‚£ã‚¹ãƒ‘ッムロジックを制御ã—ã¾ã™ã€‚" + "dispatch": "`code` (推奨) ã¾ãŸã¯ `keyCode` ã®ã„ãšã‚Œã‹ã‚’使用ã™ã‚‹ã‚­ãƒ¼æ“作ã®ãƒ‡ã‚£ã‚¹ãƒ‘ッムロジックを制御ã—ã¾ã™ã€‚" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/jpn/src/vs/workbench/services/textfile/common/textFileService.i18n.json index 28f71f4b441..047c6f1369b 100644 --- a/i18n/jpn/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "files.backup.failSave": "ファイルをãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã§ãã¾ã›ã‚“ã§ã—㟠(エラー: {0})。ファイルをä¿å­˜ã—ãªãŠã—ã¦çµ‚了ã—ã¦ãã ã•ã„。" + "files.backup.failSave": "変更ã•れãŸãƒ•ァイルをãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—å ´æ‰€ã«æ›¸ãè¾¼ã‚ã¾ã›ã‚“ã§ã—㟠(エラー: {0})。ファイルをä¿å­˜ã—ãªãŠã—ã¦çµ‚了ã—ã¦ãã ã•ã„。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index db40a8ef3c1..b1fd1a9b69e 100644 --- a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "migration.completed": "ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šã«æ–°ã—ã„テーマã®è¨­å®šãŒè¿½åŠ ã•れã¾ã—ãŸã€‚{0} ã«åˆ©ç”¨å¯èƒ½ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒã‚りã¾ã™ã€‚", "error.cannotloadtheme": "Unable to load {0}: {1}", - "error.cannotloadicontheme": "Unable to load {0}", "colorTheme": "ワークベンãƒã§ä½¿ç”¨ã™ã‚‹é…色テーマを指定ã—ã¾ã™ã€‚", "colorThemeError": "テーマãŒä¸æ˜Žã€ã¾ãŸã¯ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã¾ã›ã‚“。", "iconTheme": "ワークベンãƒã§ä½¿ç”¨ã™ã‚‹ã‚¢ã‚¤ã‚³ãƒ³ã®ãƒ†ãƒ¼ãƒžã‚’指定ã—ã¾ã™ã€‚'null' を指定ã™ã‚‹ã¨ãƒ•ァイル アイコンãŒè¡¨ç¤ºã•れãªããªã‚Šã¾ã™ã€‚", diff --git a/i18n/kor/extensions/git/out/autofetch.i18n.json b/i18n/kor/extensions/git/out/autofetch.i18n.json new file mode 100644 index 00000000000..9ecba049193 --- /dev/null +++ b/i18n/kor/extensions/git/out/autofetch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yes": "예", + "no": "아니요" +} \ No newline at end of file diff --git a/i18n/kor/extensions/git/out/commands.i18n.json b/i18n/kor/extensions/git/out/commands.i18n.json index bb03f6a5647..2dc481e046b 100644 --- a/i18n/kor/extensions/git/out/commands.i18n.json +++ b/i18n/kor/extensions/git/out/commands.i18n.json @@ -71,7 +71,6 @@ "no stashes": "ë³µì›í•  스태시가 없습니다.", "pick stash to pop": "표시할 스태시 ì„ íƒ", "clean repo": "ì²´í¬ ì•„ì›ƒí•˜ê¸° ì „ì— ë¦¬í¬ì§€í† ë¦¬ 작업 트리를 정리하세요.", - "cant push": "참조를 ì›ê²©ì— 푸시할 수 없습니다. 먼저 'í’€'ì„ ì‹¤í–‰í•˜ì—¬ 변경 ë‚´ìš©ì„ í†µí•©í•˜ì„¸ìš”.", "git error details": "Git: {0}", "git error": "Git 오류", "open git log": "Git 로그 열기" diff --git a/i18n/kor/extensions/git/out/main.i18n.json b/i18n/kor/extensions/git/out/main.i18n.json index 5f6b712cb7e..1d7b6e3355c 100644 --- a/i18n/kor/extensions/git/out/main.i18n.json +++ b/i18n/kor/extensions/git/out/main.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "using git": "{1}ì—서 git {0}ì„(를) 사용하는 중", - "updateGit": "Git ì—…ë°ì´íЏ", "neverShowAgain": "다시 표시 안 함", + "updateGit": "Git ì—…ë°ì´íЏ", "git20": "Git {0}ì´(ê°€) ì„¤ì¹˜ëœ ê²ƒ 같습니다. 코드는 2 ì´í•˜ì˜ Gitì—서 최ì ìœ¼ë¡œ ìž‘ë™í•©ë‹ˆë‹¤." } \ No newline at end of file diff --git a/i18n/kor/extensions/git/out/repository.i18n.json b/i18n/kor/extensions/git/out/repository.i18n.json index c5c45af0062..c8d7793b731 100644 --- a/i18n/kor/extensions/git/out/repository.i18n.json +++ b/i18n/kor/extensions/git/out/repository.i18n.json @@ -21,6 +21,7 @@ "deleted by us": "본ì¸ì´ 삭제함", "both added": "둘 다 추가ë¨", "both modified": "둘 다 수정ë¨", + "commitMessage": "메시지(커밋하려면 {0} 누르기)", "commit": "커밋", "merge changes": "변경 ë‚´ìš© 병합", "staged changes": "스테ì´ì§•ëœ ë³€ê²½ ë‚´ìš©", diff --git a/i18n/kor/extensions/markdown/out/commands.i18n.json b/i18n/kor/extensions/markdown/out/commands.i18n.json new file mode 100644 index 00000000000..f38833da5da --- /dev/null +++ b/i18n/kor/extensions/markdown/out/commands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "'markdown.styles': {0}ì„ ë¶ˆëŸ¬ì˜¬ 수 ì—†ìŒ" +} \ No newline at end of file diff --git a/i18n/kor/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/kor/extensions/markdown/out/features/previewContentProvider.i18n.json new file mode 100644 index 00000000000..966b7d5fad1 --- /dev/null +++ b/i18n/kor/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "ì´ ë¬¸ì„œì—서 ì¼ë¶€ 콘í…츠가 사용하지 않ë„ë¡ ì„¤ì •ë˜ì—ˆìŠµë‹ˆë‹¤.", + "preview.securityMessage.title": "Markdown 미리 보기ì—서 잠재ì ìœ¼ë¡œ 안전하지 않거나 보안ë˜ì§€ ì•Šì€ ì½˜í…츠가 사용하지 않ë„ë¡ ì„¤ì •ë˜ì–´ 있습니다. ì´ ì½˜í…츠나 스í¬ë¦½íŠ¸ë¥¼ 허용하려면 Markdown 미리 보기 보안 ì„¤ì •ì„ ë³€ê²½í•˜ì„¸ìš”.", + "preview.securityMessage.label": "콘í…츠 사용할 수 ì—†ìŒ ë³´ì•ˆ 경고" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/base/common/errorMessage.i18n.json b/i18n/kor/src/vs/base/common/errorMessage.i18n.json index a1079b63959..5f42a2d8f30 100644 --- a/i18n/kor/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/kor/src/vs/base/common/errorMessage.i18n.json @@ -4,13 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "message": "{0}. 오류 코드: {1}", - "error.permission.verbose": "사용 ê¶Œí•œì´ ê±°ë¶€ë˜ì—ˆìŠµë‹ˆë‹¤(HTTP {0}).", - "error.permission": "사용 ê¶Œí•œì´ ê±°ë¶€ë˜ì—ˆìŠµë‹ˆë‹¤.", - "error.http.verbose": "{0}(HTTP {1}: {2})", - "error.http": "{0}(HTTP {1})", - "error.connection.unknown.verbose": "알 수 없는 ì—°ê²° 오류({0})", - "error.connection.unknown": "알 수 없는 ì—°ê²° 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. ì¸í„°ë„·ì— ì—°ê²°ë˜ì§€ 않았거나 ì—°ê²°ëœ ì„œë²„ê°€ 오프ë¼ì¸ ìƒíƒœìž…니다.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "알 수 없는 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. ìžì„¸í•œ ë‚´ìš©ì€ ë¡œê·¸ë¥¼ 참조하세요.", "nodeExceptionMessage": "시스템 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤({0}).", diff --git a/i18n/kor/src/vs/code/electron-main/main.i18n.json b/i18n/kor/src/vs/code/electron-main/main.i18n.json new file mode 100644 index 00000000000..d259f7872ca --- /dev/null +++ b/i18n/kor/src/vs/code/electron-main/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "닫기(&&C)" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/code/electron-main/menus.i18n.json b/i18n/kor/src/vs/code/electron-main/menus.i18n.json index 2e942d1252d..08a780b6810 100644 --- a/i18n/kor/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/menus.i18n.json @@ -22,12 +22,10 @@ "miQuit": "{0} 종료", "miNewFile": "새 파ì¼(&&N)", "miOpen": "열기(&&O)...", - "miOpenWorkspace": "작업 ì˜ì—­ 열기(&O)...", "miOpenFolder": "í´ë” 열기(&&F)...", "miOpenFile": "íŒŒì¼ ì—´ê¸°(&&O)...", "miOpenRecent": "최근 항목 열기(&&R)", - "miSaveWorkspaceAs": "다른 ì´ë¦„으로 작업 ì˜ì—­ 저장(&S)...", - "miAddFolderToWorkspace": "작업 ì˜ì—­ì— í´ë” 추가(&&A)", + "miSaveWorkspaceAs": "작업 ì˜ì—­ì„ 다른 ì´ë¦„으로 저장", "miSave": "저장(&&S)", "miSaveAs": "다른 ì´ë¦„으로 저장(&&A)...", "miSaveAll": "ëª¨ë‘ ì €ìž¥(&&L)", @@ -157,7 +155,6 @@ "mMergeAllWindows": "모든 ì°½ 병합", "miToggleDevTools": "ê°œë°œìž ë„구 설정/í•´ì œ(&&T)", "miAccessibilityOptions": "접근성 옵션(&&O)", - "miReportIssues": "문제 ë³´ê³ (&&I)", "miWelcome": "시작(&&W)", "miInteractivePlayground": "대화형 실습(&&I)", "miDocumentation": "설명서(&&D)", @@ -184,6 +181,6 @@ "miDownloadingUpdate": "ì—…ë°ì´íŠ¸ë¥¼ 다운로드하는 중...", "miInstallingUpdate": "ì—…ë°ì´íŠ¸ë¥¼ 설치하는 중...", "miCheckForUpdates": "ì—…ë°ì´íЏ 확ì¸...", - "aboutDetail": "\n버전 {0}\n커밋 {1}\në‚ ì§œ {2}\nì…¸ {3}\në Œë”러 {4}\n노드 {5}\n아키í…처 {6}", - "okButton": "확ì¸" + "okButton": "확ì¸", + "copy": "복사(&&C)" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/browser/services/bulkEdit.i18n.json b/i18n/kor/src/vs/editor/browser/services/bulkEdit.i18n.json new file mode 100644 index 00000000000..e75053c8837 --- /dev/null +++ b/i18n/kor/src/vs/editor/browser/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "ì´ëŸ¬í•œ 파ì¼ì´ ë™ì‹œì— 변경ë˜ì—ˆìŠµë‹ˆë‹¤. {0}", + "summary.0": "편집하지 않ìŒ", + "summary.nm": "{1}ê°œ 파ì¼ì—서 {0}ê°œ í…스트 íŽ¸ì§‘ì„ ìˆ˜í–‰í•¨", + "summary.n0": "1ê°œ 파ì¼ì—서 {0}ê°œ í…스트 íŽ¸ì§‘ì„ ìˆ˜í–‰í•¨" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json index ca3b604fcad..a5e25a8bb9a 100644 --- a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,12 +10,16 @@ "fontSize": "글꼴 í¬ê¸°(픽셀)를 제어합니다.", "lineHeight": "줄 높ì´ë¥¼ 제어합니다. fontSizeì˜ lineHeight를 계산하려면 0ì„ ì‚¬ìš©í•©ë‹ˆë‹¤.", "letterSpacing": "ê¸€ìž ê°„ê²©ì„ í”½ì…€ 단위로 조정합니다.", - "lineNumbers": "줄 ë²ˆí˜¸ì˜ í‘œì‹œ 여부를 제어합니다. 가능한 ê°’ì€ 'on', 'off', 'relative'입니다. 'relative'는 현재 커서 위치ì—서 줄 수를 표시합니다.", + "lineNumbers.off": "줄 번호는 ë Œë”ë§ ë˜ì§€ 않습니다.", + "lineNumbers.on": "줄 번호는 절대값으로 ë Œë”ë§ ë©ë‹ˆë‹¤.", + "lineNumbers.relative": "줄 번호는 커서 위치ì—서 줄 간격 거리로 ë Œë”ë§ ë©ë‹ˆë‹¤.", + "lineNumbers.interval": "줄 번호는 매 10 줄마다 ë Œë”ë§ì´ ì´ë£¨ì–´ì§‘니다.", + "lineNumbers": "줄 ë²ˆí˜¸ì˜ í‘œì‹œ 여부를 제어합니다. 가능한 ê°’ì€ 'on', 'off', 'relative'입니다.", "rulers": "특정 ìˆ˜ì˜ ê³ ì • í­ ë¬¸ìž ë’¤ì— ì„¸ë¡œ 눈금ìžë¥¼ ë Œë”ë§í•©ë‹ˆë‹¤. 여러 눈금ìžì˜ 경우 여러 ê°’ì„ ì‚¬ìš©í•©ë‹ˆë‹¤. ë°°ì—´ì´ ë¹„ì–´ 있는 경우 눈금ìžê°€ 그려져 있지 않습니다.", "wordSeparators": "단어 관련 íƒìƒ‰ ë˜ëŠ” ìž‘ì—…ì„ ìˆ˜í–‰í•  때 단어 구분 기호로 사용ë˜ëŠ” 문ìžìž…니다.", "tabSize": "탭 한 ê°œì— í•´ë‹¹í•˜ëŠ” 공백 수입니다. `editor.detectIndentation`ì´ ì¼œì ¸ 있는 경우 ì´ ì„¤ì •ì€ íŒŒì¼ ì½˜í…ì¸ ì— ë”°ë¼ ìž¬ì •ì˜ë©ë‹ˆë‹¤.", "tabSize.errorMessage": "'number'ê°€ 필요합니다. ê°’ \"auto\"는 `editor.detectIndentation` ì„¤ì •ì— ì˜í•´ 바뀌었습니다.", - "insertSpaces": " 키를 누를 때 ê³µë°±ì„ ì‚½ìž…í•©ë‹ˆë‹¤. `editor.detectIndentation`ì´ ì¼œì ¸ 있는 경우 ì´ ì„¤ì •ì€ íŒŒì¼ ì½˜í…ì¸ ì— ë”°ë¼ ìž¬ì •ì˜ë©ë‹ˆë‹¤.", + "insertSpaces": "탭 키를 누를 때 ê³µë°±ì„ ì‚½ìž…í•©ë‹ˆë‹¤. `editor.detectIndentation`ì´ ì¼œì ¸ 있는 경우 ì´ ì„¤ì •ì€ íŒŒì¼ ì½˜í…ì¸ ì— ë”°ë¼ ìž¬ì •ì˜ë©ë‹ˆë‹¤.", "insertSpaces.errorMessage": "'boolean'ì´ í•„ìš”í•©ë‹ˆë‹¤. ê°’ \"auto\"는 `editor.detectIndentation` ì„¤ì •ì— ì˜í•´ 바뀌었습니다.", "detectIndentation": "파ì¼ì„ ì—´ë©´ íŒŒì¼ ì½˜í…츠를 기반으로 하여 'editor.tabSize'와 'editor.insertSpaces'ê°€ 검색ë©ë‹ˆë‹¤.", "roundedSelection": "ì„ íƒ í•­ëª©ì˜ ëª¨ì„œë¦¬ë¥¼ 둥글게 í• ì§€ 여부를 제어합니다.", @@ -89,8 +93,8 @@ "links": "편집기ì—서 ë§í¬ë¥¼ ê°ì§€í•˜ê³  í´ë¦­í•  수 있게 만들지 결정합니다.", "colorDecorators": "편집기ì—서 ì¸ë¼ì¸ 색 ë°ì½”ë ˆì´í„° ë° ìƒ‰ ì„ íƒì„ ë Œë”ë§í• ì§€ë¥¼ 제어합니다.", "codeActions": "코드 ë™ìž‘ 전구를 사용합니다.", + "selectionClipboard": "Linux 주 í´ë¦½ë³´ë“œì˜ ì§€ì› ì—¬ë¶€ë¥¼ 제어합니다.", "sideBySide": "diff 편집기ì—서 diff를 나란히 표시할지 ì¸ë¼ì¸ìœ¼ë¡œ 표시할지 여부를 제어합니다.", "ignoreTrimWhitespace": "diff 편집기ì—서 ì„ í–‰ 공백 ë˜ëŠ” 후행 공백 ë³€ê²½ì„ diffs로 표시할지 여부를 제어합니다.", - "renderIndicators": "diff 편집기ì—서 추가/ì œê±°ëœ ë³€ê²½ ë‚´ìš©ì— ëŒ€í•´ +/- 표시기를 표시하는지 여부를 제어합니다.", - "selectionClipboard": "Linux 주 í´ë¦½ë³´ë“œì˜ ì§€ì› ì—¬ë¶€ë¥¼ 제어합니다." + "renderIndicators": "diff 편집기ì—서 추가/ì œê±°ëœ ë³€ê²½ ë‚´ìš©ì— ëŒ€í•´ +/- 표시기를 표시하는지 여부를 제어합니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/kor/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json new file mode 100644 index 00000000000..4bf58092c96 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "대괄호로 ì´ë™" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json b/i18n/kor/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json new file mode 100644 index 00000000000..27cec366d1a --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "ìºëŸ¿ì„ 왼쪽으로 ì´ë™", + "caret.moveRight": "ìºëŸ¿ì„ 오른쪽으로 ì´ë™" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/caretOperations/transpose.i18n.json b/i18n/kor/src/vs/editor/contrib/caretOperations/transpose.i18n.json new file mode 100644 index 00000000000..71fd84232aa --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/caretOperations/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "ë¬¸ìž ë°”ê¾¸ê¸°" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/clipboard/clipboard.i18n.json b/i18n/kor/src/vs/editor/contrib/clipboard/clipboard.i18n.json new file mode 100644 index 00000000000..1e6e7c17e21 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/clipboard/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "잘ë¼ë‚´ê¸°", + "actions.clipboard.copyLabel": "복사", + "actions.clipboard.pasteLabel": "붙여넣기", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "êµ¬ë¬¸ì„ ê°•ì¡° 표시하여 복사" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/comment/comment.i18n.json b/i18n/kor/src/vs/editor/contrib/comment/comment.i18n.json new file mode 100644 index 00000000000..5b5b2cac857 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/comment/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "줄 ì£¼ì„ ì„¤ì •/í•´ì œ", + "comment.line.add": "줄 ì£¼ì„ ì¶”ê°€", + "comment.line.remove": "줄 ì£¼ì„ ì œê±°", + "comment.block": "ë¸”ë¡ ì£¼ì„ ì„¤ì •/í•´ì œ" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json b/i18n/kor/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json new file mode 100644 index 00000000000..cee5d91a1b7 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "편집기 ìƒí™©ì— 맞는 메뉴 표시" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/find/findController.i18n.json b/i18n/kor/src/vs/editor/contrib/find/findController.i18n.json new file mode 100644 index 00000000000..7201d1ab08f --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/find/findController.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "찾기", + "findNextMatchAction": "ë‹¤ìŒ ì°¾ê¸°", + "findPreviousMatchAction": "ì´ì „ 찾기", + "nextSelectionMatchFindAction": "ë‹¤ìŒ ì„ íƒ ì°¾ê¸°", + "previousSelectionMatchFindAction": "ì´ì „ ì„ íƒ ì°¾ê¸°", + "startReplace": "바꾸기", + "showNextFindTermAction": "ë‹¤ìŒ ê²€ìƒ‰ì–´ 표시", + "showPreviousFindTermAction": "ì´ì „ 검색어 표시" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/find/findWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/find/findWidget.i18n.json new file mode 100644 index 00000000000..f820392132e --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/find/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "찾기", + "placeholder.find": "찾기", + "label.previousMatchButton": "ì´ì „ 검색 ê²°ê³¼", + "label.nextMatchButton": "ë‹¤ìŒ ê²€ìƒ‰ ê²°ê³¼", + "label.toggleSelectionFind": "ì„ íƒ í•­ëª©ì—서 찾기", + "label.closeButton": "닫기", + "label.replace": "바꾸기", + "placeholder.replace": "바꾸기", + "label.replaceButton": "바꾸기", + "label.replaceAllButton": "ëª¨ë‘ ë°”ê¾¸ê¸°", + "label.toggleReplaceButton": "바꾸기 모드 설정/í•´ì œ", + "title.matchesCountLimit": "ì²˜ìŒ {0}ê°œì˜ ê²°ê³¼ê°€ ê°•ì¡° 표시ë˜ì§€ë§Œ 모든 찾기 ìž‘ì—…ì€ ì „ì²´ í…ìŠ¤íŠ¸ì— ëŒ€í•´ 수행ë©ë‹ˆë‹¤.", + "label.matchesLocation": "{0}/{1}", + "label.noResults": "ê²°ê³¼ ì—†ìŒ" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/find/simpleFindWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/find/simpleFindWidget.i18n.json new file mode 100644 index 00000000000..c45550055e9 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/find/simpleFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "찾기", + "placeholder.find": "찾기", + "label.previousMatchButton": "ì´ì „ 검색 ê²°ê³¼", + "label.nextMatchButton": "ë‹¤ìŒ ê²€ìƒ‰ ê²°ê³¼", + "label.closeButton": "닫기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/kor/src/vs/editor/contrib/folding/folding.i18n.json new file mode 100644 index 00000000000..0d8ac009a87 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/folding/folding.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "펼치기", + "unFoldRecursivelyAction.label": "재귀ì ìœ¼ë¡œ 펼치기", + "foldAction.label": "접기", + "foldRecursivelyAction.label": "재귀ì ìœ¼ë¡œ 접기", + "foldAllBlockComments.label": "모든 ë¸”ë¡ ì½”ë©˜íŠ¸ë¥¼ 접기", + "foldAllAction.label": "ëª¨ë‘ ì ‘ê¸°", + "unfoldAllAction.label": "ëª¨ë‘ íŽ¼ì¹˜ê¸°", + "foldLevelAction.label": "수준 {0} 접기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/format/formatActions.i18n.json b/i18n/kor/src/vs/editor/contrib/format/formatActions.i18n.json new file mode 100644 index 00000000000..8811618c869 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/format/formatActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "줄 {0}ì—서 1ê°œ ì„œì‹ íŽ¸ì§‘ì„ ìˆ˜í–‰í–ˆìŠµë‹ˆë‹¤.", + "hintn1": "줄 {1}ì—서 {0}ê°œ ì„œì‹ íŽ¸ì§‘ì„ ìˆ˜í–‰í–ˆìŠµë‹ˆë‹¤.", + "hint1n": "줄 {0}ê³¼(와) {1} 사ì´ì—서 1ê°œ ì„œì‹ íŽ¸ì§‘ì„ ìˆ˜í–‰í–ˆìŠµë‹ˆë‹¤.", + "hintnn": "줄 {1}ê³¼(와) {2} 사ì´ì—서 {0}ê°œ ì„œì‹ íŽ¸ì§‘ì„ ìˆ˜í–‰í–ˆìŠµë‹ˆë‹¤.", + "no.provider": "죄송 합니다, 하지만 ' {0} '파ì¼ì— 대 한 í¬ë§·í„°ê°€ 존재 하지 않습니다..", + "formatDocument.label": "문서 서ì‹", + "formatSelection.label": "ì„ íƒ ì˜ì—­ 서ì‹" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json b/i18n/kor/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json new file mode 100644 index 00000000000..eb7148607bd --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "'{0}'ì— ëŒ€í•œ ì •ì˜ë¥¼ ì°¾ì„ ìˆ˜ 없습니다.", + "generic.noResults": "ì •ì˜ë¥¼ ì°¾ì„ ìˆ˜ ì—†ìŒ", + "meta.title": "– {0} ì •ì˜", + "actions.goToDecl.label": "ì •ì˜ë¡œ ì´ë™", + "actions.goToDeclToSide.label": "측면ì—서 ì •ì˜ ì—´ê¸°", + "actions.previewDecl.label": "ì •ì˜ í”¼í‚¹(Peeking)", + "goToImplementation.noResultWord": "'{0}'ì— ëŒ€í•œ êµ¬í˜„ì„ ì°¾ì„ ìˆ˜ 없습니다.", + "goToImplementation.generic.noResults": "êµ¬í˜„ì„ ì°¾ì„ ìˆ˜ 없습니다.", + "meta.implementations.title": " – {0} ê°œ 구현", + "actions.goToImplementation.label": "구현으로 ì´ë™", + "actions.peekImplementation.label": "구현 미리 보기", + "goToTypeDefinition.noResultWord": "'{0}'ì— ëŒ€í•œ í˜•ì‹ ì •ì˜ë¥¼ ì°¾ì„ ìˆ˜ 없습니다.", + "goToTypeDefinition.generic.noResults": "í˜•ì‹ ì •ì˜ë¥¼ ì°¾ì„ ìˆ˜ 없습니다.", + "meta.typeDefinitions.title": "– {0} í˜•ì‹ ì •ì˜", + "actions.goToTypeDefinition.label": "í˜•ì‹ ì •ì˜ë¡œ ì´ë™", + "actions.peekTypeDefinition.label": "í˜•ì‹ ì •ì˜ ë¯¸ë¦¬ 보기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json b/i18n/kor/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json new file mode 100644 index 00000000000..57b4929798f --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "{0}ê°œ ì •ì˜ë¥¼ 표시하려면 í´ë¦­í•˜ì„¸ìš”." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/gotoError/gotoError.i18n.json b/i18n/kor/src/vs/editor/contrib/gotoError/gotoError.i18n.json new file mode 100644 index 00000000000..58029e4cfcd --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/gotoError/gotoError.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "ë‹¤ìŒ ì˜¤ë¥˜ ë˜ëŠ” 경고로 ì´ë™", + "markerAction.previous.label": "ì´ì „ 오류 ë˜ëŠ” 경고로 ì´ë™", + "editorMarkerNavigationError": "편집기 í‘œì‹ íƒìƒ‰ 위젯 오류 색입니다.", + "editorMarkerNavigationWarning": "편집기 í‘œì‹ íƒìƒ‰ 위젯 경고 색입니다.", + "editorMarkerNavigationInfo": "편집기 í‘œì‹ íƒìƒ‰ 위젯 ì •ë³´ 색입니다.", + "editorMarkerNavigationBackground": "편집기 í‘œì‹ íƒìƒ‰ 위젯 배경입니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/hover/hover.i18n.json b/i18n/kor/src/vs/editor/contrib/hover/hover.i18n.json new file mode 100644 index 00000000000..af972da445a --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/hover/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "가리키기 표시" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/hover/modesContentHover.i18n.json b/i18n/kor/src/vs/editor/contrib/hover/modesContentHover.i18n.json new file mode 100644 index 00000000000..9e3147cdd15 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/hover/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "로드 중..." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json b/i18n/kor/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json new file mode 100644 index 00000000000..8c88e6b0caa --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "ì´ì „ 값으로 바꾸기", + "InPlaceReplaceAction.next.label": "ë‹¤ìŒ ê°’ìœ¼ë¡œ 바꾸기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/indentation/indentation.i18n.json b/i18n/kor/src/vs/editor/contrib/indentation/indentation.i18n.json new file mode 100644 index 00000000000..0e91b461922 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/indentation/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "들여쓰기를 공백으로 변환", + "indentationToTabs": "들여쓰기를 탭으로 변환", + "configuredTabSize": "êµ¬ì„±ëœ íƒ­ í¬ê¸°", + "selectTabWidth": "현재 파ì¼ì˜ 탭 í¬ê¸° ì„ íƒ", + "indentUsingTabs": "íƒ­ì„ ì‚¬ìš©í•œ 들여쓰기", + "indentUsingSpaces": "ê³µë°±ì„ ì‚¬ìš©í•œ 들여쓰기", + "detectIndentation": "콘í…츠ì—서 들여쓰기 ê°ì§€", + "editor.reindentlines": "줄 다시 들여쓰기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json b/i18n/kor/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json new file mode 100644 index 00000000000..7e12706f990 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "ìœ„ì— ì¤„ 복사", + "lines.copyDown": "ì•„ëž˜ì— ì¤„ 복사", + "lines.moveUp": "줄 위로 ì´ë™", + "lines.moveDown": "줄 아래로 ì´ë™", + "lines.sortAscending": "ì¤„ì„ ì˜¤ë¦„ì°¨ìˆœ ì •ë ¬", + "lines.sortDescending": "ì¤„ì„ ë‚´ë¦¼ì°¨ìˆœìœ¼ë¡œ ì •ë ¬", + "lines.trimTrailingWhitespace": "후행 공백 ìžë¥´ê¸°", + "lines.delete": "줄 ì‚­ì œ", + "lines.indent": "줄 들여쓰기", + "lines.outdent": "줄 내어쓰기", + "lines.insertBefore": "ìœ„ì— ì¤„ 삽입", + "lines.insertAfter": "ì•„ëž˜ì— ì¤„ 삽입", + "lines.deleteAllLeft": "왼쪽 ëª¨ë‘ ì‚­ì œ", + "lines.deleteAllRight": "ìš°ì¸¡ì— ìžˆëŠ” 항목 ì‚­ì œ", + "lines.joinLines": "줄 ì—°ê²°", + "editor.transpose": "커서 주위 ë¬¸ìž ë°”ê¾¸ê¸°", + "editor.transformToUppercase": "대문ìžë¡œ 변환", + "editor.transformToLowercase": "소문ìžë¡œ 변환" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/links/links.i18n.json b/i18n/kor/src/vs/editor/contrib/links/links.i18n.json new file mode 100644 index 00000000000..2bc3afdb9fc --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/links/links.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Cmd 키를 누르고 í´ë¦­í•˜ì—¬ ë§í¬ë¡œ ì´ë™", + "links.navigate": "Ctrl 키를 누르고 í´ë¦­í•˜ì—¬ ë§í¬ë¡œ ì´ë™", + "links.command.mac": "ëª…ë ¹ì„ ì‹¤í–‰í•˜ë ¤ë©´ Cmd+í´ë¦­", + "links.command": "ëª…ë ¹ì„ ì‹¤í–‰í•˜ë ¤ë©´ Ctrl+í´ë¦­", + "links.navigate.al": "Alt 키를 누르고 í´ë¦­í•˜ì—¬ ë§í¬ë¡œ ì´ë™", + "links.command.al": "ëª…ë ¹ì„ ì‹¤í–‰í•˜ë ¤ë©´ Alt+í´ë¦­", + "invalid.url": "죄송합니다. ì´ ë§í¬ëŠ” 형ì‹ì´ 올바르지 않으므로 ì—´ì§€ 못했습니다. {0}", + "missing.url": "죄송합니다. 대ìƒì´ 없으므로 ì´ ë§í¬ë¥¼ ì—´ì§€ 못했습니다.", + "label": "ë§í¬ 열기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/multicursor/multicursor.i18n.json b/i18n/kor/src/vs/editor/contrib/multicursor/multicursor.i18n.json new file mode 100644 index 00000000000..af6f5d6235c --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/multicursor/multicursor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "ìœ„ì— ì»¤ì„œ 추가", + "mutlicursor.insertBelow": "ì•„ëž˜ì— ì»¤ì„œ 추가", + "mutlicursor.insertAtEndOfEachLineSelected": "줄 ëì— ì»¤ì„œ 추가", + "addSelectionToNextFindMatch": "ë‹¤ìŒ ì¼ì¹˜ 항목 ì°¾ê¸°ì— ì„ íƒ í•­ëª© 추가", + "addSelectionToPreviousFindMatch": "ì´ì „ ì¼ì¹˜ 항목 ì°¾ê¸°ì— ì„ íƒ í•­ëª© 추가", + "moveSelectionToNextFindMatch": "ë‹¤ìŒ ì¼ì¹˜ 항목 찾기로 마지막 ì„ íƒ í•­ëª© ì´ë™", + "moveSelectionToPreviousFindMatch": "마지막 ì„ íƒ í•­ëª©ì„ ì´ì „ ì¼ì¹˜ 항목 찾기로 ì´ë™", + "selectAllOccurrencesOfFindMatch": "ì¼ì¹˜ 항목 ì°¾ê¸°ì˜ ëª¨ë“  항목 ì„ íƒ", + "changeAll.label": "모든 항목 변경" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json b/i18n/kor/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json new file mode 100644 index 00000000000..884202c9ab9 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "매개 변수 힌트 트리거" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json new file mode 100644 index 00000000000..83d04f35bc4 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, 힌트" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/kor/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json new file mode 100644 index 00000000000..d4430bc088d --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "수정 사항 표시({0})", + "quickFix": "수정 사항 표시", + "quickfix.trigger.label": "빠른 수정" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json new file mode 100644 index 00000000000..9befc5560b1 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "닫기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json new file mode 100644 index 00000000000..199f308fdda --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": "–참조 {0}ê°œ", + "references.action.label": "모든 참조 찾기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json new file mode 100644 index 00000000000..519c07a8e60 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "로드 중..." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json new file mode 100644 index 00000000000..48d18866618 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "{2}ì—´, {1}줄, {0}ì˜ ê¸°í˜¸", + "aria.fileReferences.1": "{0}ì˜ ê¸°í˜¸ 1ê°œ, ì „ì²´ 경로 {1}", + "aria.fileReferences.N": "{1}ì˜ ê¸°í˜¸ {0}ê°œ, ì „ì²´ 경로 {2}", + "aria.result.0": "ê²°ê³¼ ì—†ìŒ", + "aria.result.1": "{0}ì—서 기호 1개를 찾았습니다.", + "aria.result.n1": "{1}ì—서 기호 {0}개를 찾았습니다.", + "aria.result.nm": "{1}ê°œ 파ì¼ì—서 기호 {0}개를 찾았습니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json new file mode 100644 index 00000000000..bebeacf6346 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "파ì¼ì„ 확ì¸í•˜ì§€ 못했습니다.", + "referencesCount": "참조 {0}ê°œ", + "referenceCount": "참조 {0}ê°œ", + "missingPreviewMessage": "미리 보기를 사용할 수 ì—†ìŒ", + "treeAriaLabel": "참조", + "noResults": "ê²°ê³¼ ì—†ìŒ", + "peekView.alternateTitle": "참조", + "peekViewTitleBackground": "Peek ë·° 제목 ì˜ì—­ì˜ 배경색입니다.", + "peekViewTitleForeground": "Peek ë·° 제목 색입니다.", + "peekViewTitleInfoForeground": "Peek ë·° 제목 ì •ë³´ 색입니다.", + "peekViewBorder": "Peek ë·° í…Œë‘리 ë° í™”ì‚´í‘œ 색입니다.", + "peekViewResultsBackground": "Peek ë·° ê²°ê³¼ 목ë¡ì˜ 배경색입니다.", + "peekViewResultsMatchForeground": "Peek ë·° ê²°ê³¼ 목ë¡ì—서 ë¼ì¸ ë…¸ë“œì˜ ì „ê²½ìƒ‰ìž…ë‹ˆë‹¤.", + "peekViewResultsFileForeground": "Peek ë·° ê²°ê³¼ 목ë¡ì—서 íŒŒì¼ ë…¸ë“œì˜ ì „ê²½ìƒ‰ìž…ë‹ˆë‹¤.", + "peekViewResultsSelectionBackground": "Peek ë·° ê²°ê³¼ 목ë¡ì—서 ì„ íƒëœ í•­ëª©ì˜ ë°°ê²½ìƒ‰ìž…ë‹ˆë‹¤.", + "peekViewResultsSelectionForeground": "Peek ë·° ê²°ê³¼ 목ë¡ì—서 ì„ íƒëœ í•­ëª©ì˜ ì „ê²½ìƒ‰ìž…ë‹ˆë‹¤.", + "peekViewEditorBackground": "Peek ë·° íŽ¸ì§‘ê¸°ì˜ ë°°ê²½ìƒ‰ìž…ë‹ˆë‹¤.", + "peekViewEditorGutterBackground": "Peek ë·° íŽ¸ì§‘ê¸°ì˜ ê±°í„° 배경색입니다.", + "peekViewResultsMatchHighlight": "Peek ë·° ê²°ê³¼ 목ë¡ì˜ ì¼ì¹˜ 항목 ê°•ì¡° 표시 색입니다.", + "peekViewEditorMatchHighlight": "Peek ë·° íŽ¸ì§‘ê¸°ì˜ ì¼ì¹˜ 항목 ê°•ì¡° 표시 색입니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/rename/rename.i18n.json b/i18n/kor/src/vs/editor/contrib/rename/rename.i18n.json new file mode 100644 index 00000000000..623526b7432 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/rename/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "결과가 없습니다.", + "aria": "'{0}'ì„(를) '{1}'(으)로 ì´ë¦„ì„ ë³€ê²½í–ˆìŠµë‹ˆë‹¤. 요약: {2}", + "rename.failed": "죄송합니다. ì´ë¦„ 바꾸기를 실행하지 못했습니다.", + "rename.label": "기호 ì´ë¦„ 바꾸기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/rename/renameInputField.i18n.json b/i18n/kor/src/vs/editor/contrib/rename/renameInputField.i18n.json new file mode 100644 index 00000000000..8e16d0a05f7 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/rename/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "ìž…ë ¥ ì´ë¦„ì„ ë°”ê¾¸ì„¸ìš”. 새 ì´ë¦„ì„ ìž…ë ¥í•œ ë‹¤ìŒ [Enter] 키를 눌러 커밋하세요." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json b/i18n/kor/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json new file mode 100644 index 00000000000..127400173af --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "ì„ íƒ í™•ìž¥", + "smartSelect.shrink": "ì„ íƒ ì¶•ì†Œ" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/suggest/suggestController.i18n.json b/i18n/kor/src/vs/editor/contrib/suggest/suggestController.i18n.json new file mode 100644 index 00000000000..c9232c0a95d --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/suggest/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "'{0}'ì„(를) ì ìš©í•˜ì—¬ ë‹¤ìŒ í…스트가 삽입ë˜ì—ˆìŠµë‹ˆë‹¤.\n {1}", + "suggest.trigger.label": "제안 항목 트리거" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/suggest/suggestWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/suggest/suggestWidget.i18n.json new file mode 100644 index 00000000000..db8bbbe6670 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/suggest/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "제안 ìœ„ì ¯ì˜ ë°°ê²½ìƒ‰ìž…ë‹ˆë‹¤.", + "editorSuggestWidgetBorder": "제안 ìœ„ì ¯ì˜ í…Œë‘리 색입니다.", + "editorSuggestWidgetForeground": "제안 ìœ„ì ¯ì˜ ì „ê²½ìƒ‰ìž…ë‹ˆë‹¤.", + "editorSuggestWidgetSelectedBackground": "제한 위젯ì—서 ì„ íƒëœ í•­ëª©ì˜ ë°°ê²½ìƒ‰ìž…ë‹ˆë‹¤.", + "editorSuggestWidgetHighlightForeground": "제안 ìœ„ì ¯ì˜ ì¼ì¹˜ 항목 ê°•ì¡° 표시 색입니다.", + "readMore": "ìžì„¸ížˆ 알아보기...{0}", + "suggestionWithDetailsAriaLabel": "{0}, 제안, 세부 ì •ë³´ 있ìŒ", + "suggestionAriaLabel": "{0}, 제안", + "readLess": "간단히 보기...{0}", + "suggestWidget.loading": "로드 중...", + "suggestWidget.noSuggestions": "제안 í•­ëª©ì´ ì—†ìŠµë‹ˆë‹¤.", + "suggestionAriaAccepted": "{0}, 수ë½ë¨", + "ariaCurrentSuggestionWithDetails": "{0}, 제안, 세부 ì •ë³´ 있ìŒ", + "ariaCurrentSuggestion": "{0}, 제안" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json b/i18n/kor/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json new file mode 100644 index 00000000000..71b2a67ea6a --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": " 키로 í¬ì»¤ìФ ì´ë™ 설정/í•´ì œ" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json b/i18n/kor/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json new file mode 100644 index 00000000000..ab340d73f19 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "변수 ì½ê¸°ì™€ ê°™ì€ ì½ê¸° 액세스 중 ê¸°í˜¸ì˜ ë°°ê²½ìƒ‰ìž…ë‹ˆë‹¤.", + "wordHighlightStrong": "ë³€ìˆ˜ì— ì“°ê¸°ì™€ ê°™ì€ ì“°ê¸° 액세스 중 ê¸°í˜¸ì˜ ë°°ê²½ìƒ‰ìž…ë‹ˆë‹¤.", + "overviewRulerWordHighlightForeground": "기호 ê°•ì¡° í‘œì‹œì˜ ê°œìš” ëˆˆê¸ˆìž ë§ˆì»¤ 색입니다.", + "overviewRulerWordHighlightStrongForeground": "쓰기 권한 기호 ê°•ì¡° í‘œì‹œì˜ ê°œìš” ëˆˆê¸ˆìž ë§ˆì»¤ 색입니다.", + "wordHighlight.next.label": "ë‹¤ìŒ ê°•ì¡° 기호로 ì´ë™", + "wordHighlight.previous.label": "ì´ì „ ê°•ì¡° 기호로 ì´ë™" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/kor/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index 80dddd1b0c5..8b6ad71cd4e 100644 --- a/i18n/kor/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/kor/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -3,7 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "notFound": "í™•ìž¥ì„ ì°¾ì„ ìˆ˜ 없습니다.", - "noCompatible": "ì´ ë²„ì „ì˜ Codeì—서 {0}ì˜ í˜¸í™˜ ë²„ì „ì„ ì°¾ì„ ìˆ˜ 없습니다." -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/kor/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index a346e007e1c..1f9083afa00 100644 --- a/i18n/kor/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/kor/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,11 +6,10 @@ { "invalidManifest": "ìž˜ëª»ëœ í™•ìž¥: package.jsonì´ JSON 파ì¼ì´ 아닙니다.", "restartCodeLocal": "{0}ì„(를) 다시 설치하기 ì „ì— Code를 다시 시작하세요.", - "restartCodeGallery": "다시 설치하기 ì „ì— Code를 다시 시작하세요.", + "cancel": "취소", "uninstallDependeciesConfirmation": "'{0}'ë§Œ 제거할까요, 아니면 종ì†ì„±ë„ 제거할까요?", "uninstallOnly": "ë§Œ", "uninstallAll": "모ë‘", - "cancel": "취소", "uninstallConfirmation": "'{0}'ì„(를) 제거할까요?", "ok": "확ì¸", "singleDependentError": "확장 '{0}'ì„(를) 제거할 수 없습니다. 확장 '{1}'ì´(ê°€) ì´ í™•ìž¥ì— ì¢…ì†ë©ë‹ˆë‹¤.", diff --git a/i18n/kor/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/kor/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json new file mode 100644 index 00000000000..091e1d88413 --- /dev/null +++ b/i18n/kor/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "view": "보기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index d5bda0aa791..ed6d0f43e21 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -33,6 +33,7 @@ "openPreviousEditor": "ì´ì „ 편집기 열기", "nextEditorInGroup": "그룹ì—서 ë‹¤ìŒ íŽ¸ì§‘ê¸° 열기", "openPreviousEditorInGroup": "그룹ì—서 ì´ì „ 편집기 열기", + "lastEditorInGroup": "ê·¸ë£¹ì˜ ë§ˆì§€ë§‰ 편집기 열기", "navigateNext": "앞으로 ì´ë™", "navigatePrevious": "뒤로 ì´ë™", "navigateLast": "마지막으로 ì´ë™", diff --git a/i18n/kor/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index ea611dbaba2..9b3b3941512 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,7 +6,6 @@ { "editorCommand.activeEditorMove.description": "활성 편집기를 탭 ë˜ëŠ” 그룹 단위로 ì´ë™", "editorCommand.activeEditorMove.arg.name": "활성 편집기 ì´ë™ ì¸ìˆ˜", - "editorCommand.activeEditorMove.arg.description": "ì¸ìˆ˜ ì†ì„±:\n\t\t\t\t\t\t* 'to': ì´ë™í•  위치를 지정하는 문ìžì—´ 값입니다.\n\t\t\t\t\t\t* 'by': ì´ë™í•  단위를 지정하는 문ìžì—´ 값입니다. 탭 단위 ë˜ëŠ” 그룹 단위입니다\n\t\t\t\t\t\t* 'value': ì´ë™í•  위치 수 ë˜ëŠ” 절대 위치를 지정하는 ìˆ«ìž ê°’ìž…ë‹ˆë‹¤.\n\t\t\t\t\t", "commandDeprecated": "**{0}** ëª…ë ¹ì´ ì œê±°ë˜ì—ˆìŠµë‹ˆë‹¤. 대신 **{1}** ëª…ë ¹ì„ ì‚¬ìš©í•  수 있습니다.", "openKeybindings": "바로 가기 키 구성" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 3c0b9b984d4..8c2c5a8883c 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -52,6 +52,5 @@ "screenReaderDetectedExplanation.question": "VS Code를 ìž‘ë™í•˜ê¸° 위해 화면 ì½ê¸° í”„ë¡œê·¸ëž¨ì„ ì‚¬ìš©í•˜ì‹­ë‹ˆê¹Œ?", "screenReaderDetectedExplanation.answerYes": "예", "screenReaderDetectedExplanation.answerNo": "아니요", - "screenReaderDetectedExplanation.body1": "VS Codeê°€ ì´ì œ 화면 ì½ê¸° 프로그램과 사용하는 ë° ìµœì í™”ë˜ì—ˆìŠµë‹ˆë‹¤.", - "screenReaderDetectedExplanation.body2": "ì¼ë¶€ 편집기 기능ì—는 ìžë™ 줄바꿈, 접기, ìžë™ 닫는 대괄호 등 여러 가지 ë™ìž‘ì´ ìžˆìŠµë‹ˆë‹¤. " + "screenReaderDetectedExplanation.body1": "VS Codeê°€ ì´ì œ 화면 ì½ê¸° 프로그램과 사용하는 ë° ìµœì í™”ë˜ì—ˆìŠµë‹ˆë‹¤." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/quickopen.i18n.json b/i18n/kor/src/vs/workbench/browser/quickopen.i18n.json index 15bbb282f52..828c5a496b5 100644 --- a/i18n/kor/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/quickopen.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "noResultsMatching": "ì¼ì¹˜í•˜ëŠ” ê²°ê³¼ ì—†ìŒ", - "noResultsFound2": "ê²°ê³¼ ì—†ìŒ", - "entryAriaLabel": "{0}, 명령" + "noResultsFound2": "ê²°ê³¼ ì—†ìŒ" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json index f652392a397..248d9a80226 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json @@ -30,7 +30,7 @@ "openRecent": "최근 항목 열기...", "quickOpenRecent": "빠른 최근 항목 열기...", "closeMessages": "알림 메시지 닫기", - "reportIssues": "문제 ë³´ê³ ", + "reportIssueInEnglish": "문제 ë³´ê³ ", "reportPerformanceIssue": "성능 문제 ë³´ê³ ", "keybindingsReference": "바로 가기 키 참조", "openDocumentationUrl": "설명서", @@ -47,5 +47,14 @@ "showNextWindowTab": "ë‹¤ìŒ ì°½ 탭 표시", "moveWindowTabToNewWindow": "ì°½ íƒ­ì„ ìƒˆ 창으로 ì´ë™", "mergeAllWindowTabs": "모든 ì°½ 병합", - "toggleWindowTabsBar": "ì°½ 탭 ëª¨ìŒ ì„¤ì •/í•´ì œ" + "toggleWindowTabsBar": "ì°½ 탭 ëª¨ìŒ ì„¤ì •/í•´ì œ", + "configureLocale": "언어 구성", + "displayLanguage": "VSCodeì˜ í‘œì‹œ 언어를 ì •ì˜í•©ë‹ˆë‹¤.", + "doc": "ì§€ì›ë˜ëŠ” 언어 목ë¡ì€ {0} ì„(를) 참조하세요.", + "restart": "ê°’ì„ ë³€ê²½í•˜ë ¤ë©´ VSCode를 다시 시작해야 합니다.", + "fail.createSettings": "{0}'({1})ì„(를) 만들 수 없습니다.", + "debug": "디버그", + "info": "ì •ë³´", + "warn": "경고", + "err": "오류" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json index 767f6d6d93c..a78356cadf9 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,8 +7,8 @@ "view": "보기", "help": "ë„움ë§", "file": "파ì¼", - "workspaces": "작업 ì˜ì—­", "developer": "개발ìž", + "workspaces": "작업 ì˜ì—­", "showEditorTabs": "ì—´ë ¤ 있는 편집기를 탭ì—서 표시할지 여부를 제어합니다.", "workbench.editor.labelFormat.default": "íŒŒì¼ ì´ë¦„ì„ í‘œì‹œí•©ë‹ˆë‹¤. íƒ­ì´ ì‚¬ìš©í•˜ë„ë¡ ì„¤ì •ë˜ì–´ 있고 í•˜ë‚˜ì˜ ê·¸ë£¹ì—서 íŒŒì¼ 2ê°œì˜ ì´ë¦„ì´ ë™ì¼í•˜ë©´, ê° íŒŒì¼ ê²½ë¡œì˜ íŠ¹ì • ì„¹ì…˜ì´ ì¶”ê°€ë©ë‹ˆë‹¤. íƒ­ì´ ì‚¬ìš©í•˜ë„ë¡ ì„¤ì •ë˜ì–´ 있지 않으면, 작업 ì˜ì—­ í´ë”ì— ëŒ€í•œ 경로는 편집기가 활성 ìƒíƒœì¼ 때 표시ë©ë‹ˆë‹¤.", "workbench.editor.labelFormat.short": "디렉터리 ì´ë¦„ ì•žì— ì˜¤ëŠ” 파ì¼ì˜ ì´ë¦„ì„ í‘œì‹œí•©ë‹ˆë‹¤.", @@ -26,18 +26,16 @@ "closeOnFocusLost": "Quick Openê°€ í¬ì»¤ìŠ¤ë¥¼ 잃으면 ìžë™ìœ¼ë¡œ ë‹«ì„ì§€ 여부를 제어합니다.", "openDefaultSettings": "ì„¤ì •ì„ ì—´ë©´ 모든 기본 ì„¤ì •ì„ í‘œì‹œí•˜ëŠ” íŽ¸ì§‘ê¸°ë„ ì—´ë¦¬ëŠ”ì§€ 여부를 제어합니다.", "sideBarLocation": "사ì´ë“œë°”ì˜ ìœ„ì¹˜ë¥¼ 제어합니다. 워í¬ë²¤ì¹˜ì˜ 왼쪽ì´ë‚˜ ì˜¤ë¥¸ìª½ì— í‘œì‹œë  ìˆ˜ 있습니다.", - "panelLocation": "패ë„ì˜ ìœ„ì¹˜ë¥¼ 제어합니다. 워í¬ë²¤ì¹˜ì˜ 아래 ë˜ëŠ” ì˜¤ë¥¸ìª½ì— í‘œì‹œë  ìˆ˜ 있습니다.", "statusBarVisibility": "워í¬ë²¤ì¹˜ 아래쪽ì—서 ìƒíƒœ í‘œì‹œì¤„ì˜ í‘œì‹œ ìœ í˜•ì„ ì œì–´í•©ë‹ˆë‹¤.", "activityBarVisibility": "워í¬ë²¤ì¹˜ì—서 작업 ë§‰ëŒ€ì˜ í‘œì‹œ ìœ í˜•ì„ ì œì–´í•©ë‹ˆë‹¤.", "closeOnFileDelete": "ì¼ë¶€ 다른 프로세스ì—서 파ì¼ì„ 삭제하거나 ì´ë¦„ì„ ë°”ê¿€ 때 파ì¼ì„ 표시하는 편집기를 ìžë™ìœ¼ë¡œ ë‹«ì„ì§€ 여부를 제어합니다. 사용하지 않ë„ë¡ ì„¤ì •í•˜ëŠ” 경우 ì´ëŸ¬í•œ ì´ë²¤íŠ¸ê°€ ë°œìƒí•˜ë©´ 편집기가 ë”í‹° ìƒíƒœë¡œ ê³„ì† ì—´ë ¤ 있습니다. ì‘ìš© 프로그램 ë‚´ì—서 삭제하면 í•­ìƒ íŽ¸ì§‘ê¸°ê°€ 닫히고 ë°ì´í„°ë¥¼ 유지하기 위해 ë”í‹° 파ì¼ì€ 닫히지 않습니다.", - "experimentalFuzzySearchEndpoint": "실험 설정 ê²€ìƒ‰ì— ì‚¬ìš©í•  ëì ì„ 나타냅니다.", - "experimentalFuzzySearchKey": "실험 설정 ê²€ìƒ‰ì— ì‚¬ìš©í•  키를 나타냅니다.", "fontAliasing": "워í¬ë²¤ì¹˜ì—서 글꼴 앨리어싱 ë°©ì‹ì„ 제어합니다.\n- 기본: 서브 픽셀 글꼴 다듬기. ëŒ€ë¶€ë¶„ì˜ ì¼ë°˜ 디스플레ì´ì—서 가장 선명한 글꼴 제공\n- 안티앨리어싱: 서브 í”½ì…€ì´ ì•„ë‹Œ 픽셀 단위ì—서 글꼴 다듬기. ì „ë°˜ì ìœ¼ë¡œ ë” ë°ì€ ëŠë‚Œì„ 줄 수 있ìŒ\n- ì—†ìŒ: 글꼴 다듬기 사용 안 함. í…스트 모서리가 ê°ì§€ê²Œ 표시ë¨", "workbench.fontAliasing.default": "서브 픽셀 글꼴 다듬기. ëŒ€ë¶€ë¶„ì˜ ì¼ë°˜ 디스플레ì´ì—서 가장 선명한 í…스트를 제공합니다. ", "workbench.fontAliasing.antialiased": "서브 í”½ì…€ì´ ì•„ë‹Œ 픽셀 수준ì—서 ê¸€ê¼´ì„ ë‹¤ë“¬ìŠµë‹ˆë‹¤. ì „ë°˜ì ìœ¼ë¡œ ê¸€ê¼´ì´ ë” ë°ê²Œ 표시ë©ë‹ˆë‹¤.", "workbench.fontAliasing.none": "글꼴 다듬기를 사용하지 않습니다. í…스트 가장ìžë¦¬ê°€ ê°ì§€ê²Œ 표시ë©ë‹ˆë‹¤.", "swipeToNavigate": "세 ì†ê°€ë½ìœ¼ë¡œ 가로로 ì‚´ì§ ë°€ì–´ ì—´ë ¤ 있는 íŒŒì¼ ê°„ì„ ì´ë™í•©ë‹ˆë‹¤.", "workbenchConfigurationTitle": "워í¬ë²¤ì¹˜", + "windowConfigurationTitle": "ì°½", "window.openFilesInNewWindow.on": "파ì¼ì´ 새 ì°½ì—서 열립니다.", "window.openFilesInNewWindow.off": "파ì¼ì´ 파ì¼ì˜ í´ë”ê°€ ì—´ë ¤ 있는 ì°½ ë˜ëŠ” 마지막 활성 ì°½ì—서 열립니다.", "window.openFilesInNewWindow.default": "Dock ë˜ëŠ” Finder(macOS ì „ìš©)를 통해 파ì¼ì„ ì—° 경우를 제외하고 파ì¼ì´ 파ì¼ì˜ í´ë”ê°€ 열린 ì°½ ë˜ëŠ” 마지막 활성 ì°½ì—서 열립니다.", @@ -69,11 +67,11 @@ "autoDetectHighContrast": "사용하ë„ë¡ ì„¤ì •í•œ 경우 Windowsì—서 고대비 테마를 사용 중ì´ë©´ 고대비 테마로 ìžë™ìœ¼ë¡œ 변경ë˜ê³  Windows 고대비 테마를 해제하면 ì–´ë‘ìš´ 테마로 변경ë©ë‹ˆë‹¤.", "titleBarStyle": "ì°½ 제목 í‘œì‹œì¤„ì˜ ëª¨ì–‘ì„ ì¡°ì •í•©ë‹ˆë‹¤. 변경 ë‚´ìš©ì„ ì ìš©í•˜ë ¤ë©´ ì „ì²´ 다시 시작해야 합니다.", "window.nativeTabs": "macOS Sierra ì°½ íƒ­ì„ ì‚¬ìš©í•˜ë„ë¡ ì„¤ì •í•©ë‹ˆë‹¤. 변경\n ë‚´ìš©ì„ ì ìš©í•˜ë ¤ë©´ ì „ì²´ 다시 시작해야 하고, 기본 탭ì—서\n ì‚¬ìš©ìž ì§€ì • 제목 표시줄 스타ì¼(êµ¬ì„±ëœ ê²½ìš°)ì„ ë¹„í™œì„±í™”í•©ë‹ˆë‹¤.", - "windowConfigurationTitle": "ì°½", "zenModeConfigurationTitle": "Zen 모드", "zenMode.fullScreen": "Zen 모드를 켜면 워í¬ë²¤ì¹˜ë„ ì „ì²´ 화면 모드로 전환ë˜ëŠ”ì§€ 여부를 제어합니다.", "zenMode.hideTabs": "Zen 모드를 켜면 워í¬ë²¤ì¹˜ íƒ­ë„ ìˆ¨ê¸¸ì§€ë¥¼ 제어합니다.", "zenMode.hideStatusBar": "Zen 모드를 켜면 워í¬ë²¤ì¹˜ 하단ì—서 ìƒíƒœ í‘œì‹œì¤„ë„ ìˆ¨ê¸¸ì§€ë¥¼ 제어합니다.", "zenMode.hideActivityBar": "Zen 모드를 켜면 워í¬ë²¤ì¹˜ì˜ ì™¼ìª½ì— ìžˆëŠ” 작업 ë§‰ëŒ€ë„ ìˆ¨ê¸¸ì§€\n 여부를 제어합니다.", - "zenMode.restore": "ì°½ì´ Zen 모드ì—서 ì¢…ë£Œëœ ê²½ìš° Zen 모드로 ë³µì›í• ì§€ 제어합니다." + "zenMode.restore": "ì°½ì´ Zen 모드ì—서 ì¢…ë£Œëœ ê²½ìš° Zen 모드로 ë³µì›í• ì§€ 제어합니다.", + "JsonSchema.locale": "사용할 UI 언어입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 46ca3defb9b..4565e411057 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -30,7 +30,6 @@ "deactivateBreakpoints": "ì¤‘ë‹¨ì  ë¹„í™œì„±í™”", "reapplyAllBreakpoints": "모든 ì¤‘ë‹¨ì  ë‹¤ì‹œ ì ìš©", "addFunctionBreakpoint": "함수 ì¤‘ë‹¨ì  ì¶”ê°€", - "renameFunctionBreakpoint": "함수 ì¤‘ë‹¨ì  ì´ë¦„ 바꾸기", "addConditionalBreakpoint": "ì¡°ê±´ë¶€ ì¤‘ë‹¨ì  ì¶”ê°€...", "editConditionalBreakpoint": "ì¤‘ë‹¨ì  íŽ¸ì§‘...", "setValue": "ê°’ 설정", diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json new file mode 100644 index 00000000000..cbbc468180a --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editConditionalBreakpoint": "ì¤‘ë‹¨ì  íŽ¸ì§‘...", + "functionBreakpointsNotSupported": "ì´ ë””ë²„ê·¸ 형ì‹ì€ 함수 중단ì ì„ ì§€ì›í•˜ì§€ 않습니다.", + "functionBreakpointPlaceholder": "중단할 함수", + "functionBreakPointInputAriaLabel": "함수 ì¤‘ë‹¨ì  ìž…ë ¥" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json new file mode 100644 index 00000000000..a01e9bbdce1 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "callstackSection": "호출 ìŠ¤íƒ ì„¹ì…˜", + "debugStopped": "{0}ì—서 ì¼ì‹œ 중지ë¨", + "callStackAriaLabel": "호출 ìŠ¤íƒ ë””ë²„ê·¸", + "process": "프로세스", + "paused": "ì¼ì‹œ 중지ë¨", + "running": "실행 중", + "thread": "스레드", + "pausedOn": "{0}ì—서 ì¼ì‹œ 중지ë¨", + "loadMoreStackFrames": "ë” ë§Žì€ ìŠ¤íƒ í”„ë ˆìž„ 로드", + "threadAriaLabel": "스레드 {0}, 호출 스íƒ, 디버그", + "stackFrameAriaLabel": "ìŠ¤íƒ í”„ë ˆìž„ {0} 줄 {1} {2}, 호출 스íƒ, 디버그" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 345e2691e98..9b138b5c585 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,6 @@ "breakpointAdded": "íŒŒì¼ {1}, 줄 {0}ì— ì¤‘ë‹¨ì ì´ 추가ë˜ì—ˆìŠµë‹ˆë‹¤.", "breakpointRemoved": "íŒŒì¼ {1}, 줄 {0}ì—서 중단ì ì´ 제거ë˜ì—ˆìŠµë‹ˆë‹¤.", "compoundMustHaveConfigurations": "여러 êµ¬ì„±ì„ ì‹œìž‘í•˜ë ¤ë©´ ë³µí•©ì— \"configurations\" 특성 ì§‘í•©ì´ ìžˆì–´ì•¼ 합니다.", - "configMissing": "'{0}' êµ¬ì„±ì´ 'launch.json'ì— ì—†ìŠµë‹ˆë‹¤.", "debugRequestNotSupported": "ì„ íƒí•œ 디버그 구성ì—서 특성 '{0}'ì— ì§€ì›ë˜ì§€ 않는 ê°’ '{1}'ì´(ê°€) 있습니다.", "debugRequesMissing": "ì„ íƒí•œ 디버그 êµ¬ì„±ì— íŠ¹ì„± '{0}'ì´(ê°€) 없습니다.", "debugTypeNotSupported": "êµ¬ì„±ëœ ë””ë²„ê·¸ í˜•ì‹ '{0}'ì€(는) ì§€ì›ë˜ì§€ 않습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json new file mode 100644 index 00000000000..2cf50793711 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "변수 섹션", + "variablesAriaTreeLabel": "변수 디버그", + "variableValueAriaLabel": "새 변수 ê°’ ìž…ë ¥", + "variableScopeAriaLabel": "{0} 범위, 변수, 디버그", + "variableAriaLabel": "{0} ê°’ {1}, 변수, 디버그" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json new file mode 100644 index 00000000000..c15eef20405 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expressionsSection": "ì‹ ì„¹ì…˜", + "watchAriaTreeLabel": "ì¡°ì‚¬ì‹ ë””ë²„ê·¸", + "watchExpressionPlaceholder": "조사할 ì‹", + "watchExpressionInputAriaLabel": "ì¡°ì‚¬ì‹ ìž…ë ¥", + "watchExpressionAriaLabel": "{0} ê°’ {1}, 조사ì‹, 디버그", + "watchVariableAriaLabel": "{0} ê°’ {1}, 조사ì‹, 디버그" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 0a9211f6a12..68a9c95c957 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -10,16 +10,12 @@ "Uninstalling": "제거하는 중", "updateAction": "ì—…ë°ì´íЏ", "updateTo": "{0}(으)로 ì—…ë°ì´íЏ", - "enableForWorkspaceAction.label": "사용(작업 ì˜ì—­)", - "enableAlwaysAction.label": "사용(í•­ìƒ)", - "disableForWorkspaceAction.label": "사용 안 함(작업 ì˜ì—­)", - "disableAlwaysAction.label": "사용 안 함(í•­ìƒ)", "ManageExtensionAction.uninstallingTooltip": "제거하는 중", - "enableForWorkspaceAction": "작업 ì˜ì—­", - "enableGloballyAction": "í•­ìƒ", + "enableForWorkspaceAction": "사용(작업 ì˜ì—­)", + "enableGloballyAction": "사용", "enableAction": "사용", - "disableForWorkspaceAction": "작업 ì˜ì—­", - "disableGloballyAction": "í•­ìƒ", + "disableForWorkspaceAction": "사용 안 함(작업 ì˜ì—­)", + "disableGloballyAction": "사용 안 함", "disableAction": "사용 안 함", "checkForUpdates": "ì—…ë°ì´íЏ 확ì¸", "enableAutoUpdate": "확장 ìžë™ ì—…ë°ì´íЏ 사용", @@ -47,11 +43,8 @@ "allExtensionsInstalled": "ì´ ìž‘ì—… ì˜ì—­ì— 권장ë˜ëŠ” í™•ìž¥ì´ ëª¨ë‘ ì´ë¯¸ 설치ë˜ì—ˆìŠµë‹ˆë‹¤.", "installRecommendedExtension": "권장ë˜ëŠ” 확장 설치", "extensionInstalled": "권장ë˜ëŠ” í™•ìž¥ì´ ì´ë¯¸ 설치ë˜ì–´ 있습니다.", - "showRecommendedKeymapExtensions": "권장ë˜ëŠ” 키 ë§µ 표시", "showRecommendedKeymapExtensionsShort": "키 ë§µ", - "showLanguageExtensions": "언어 확장 표시", "showLanguageExtensionsShort": "언어 확장", - "showAzureExtensions": "Azure 확장 표시", "showAzureExtensionsShort": "Azure 확장", "OpenExtensionsFile.failed": "'.vscode' í´ë”({0}) ë‚´ì— 'extensions.json' 파ì¼ì„ 만들 수 없습니다.", "configureWorkspaceRecommendedExtensions": "권장 확장 구성(작업 ì˜ì—­)", diff --git a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index ef99dee28ef..9742da49372 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -9,7 +9,7 @@ "extension": "확장", "extensions": "확장", "view": "보기", + "developer": "개발ìž", "extensionsConfigurationTitle": "확장", - "extensionsAutoUpdate": "ìžë™ìœ¼ë¡œ 확장 ì—…ë°ì´íЏ", - "extensionsIgnoreRecommendations": "확장 권장 사항 무시" + "extensionsAutoUpdate": "ìžë™ìœ¼ë¡œ 확장 ì—…ë°ì´íЏ" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json new file mode 100644 index 00000000000..4b0a8e8d046 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reportExtensionIssue": "문제 ë³´ê³ " +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json new file mode 100644 index 00000000000..11ed628ff54 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "folders": "í´ë”" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json new file mode 100644 index 00000000000..70dd8169321 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "파ì¼", + "revealInSideBar": "세로 ë§‰ëŒ€ì— í‘œì‹œ", + "acceptLocalChanges": "ë³€ê²½ì„ ì ìš©í•˜ê³  ë””ìŠ¤í¬ ì½˜í…츠 ë®ì–´ì“°ê¸°", + "revertLocalChanges": "변경 ë‚´ìš©ì„ ì·¨ì†Œí•˜ê³  디스í¬ì˜ 콘í…츠로 ë˜ëŒë¦¬ê¸°" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json new file mode 100644 index 00000000000..b962da52ed9 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "다시 시ë„", + "rename": "ì´ë¦„ 바꾸기", + "newFile": "새 파ì¼", + "newFolder": "새 í´ë”", + "openFolderFirst": "ì•ˆì— íŒŒì¼ì´ë‚˜ í´ë”를 만들려면 먼저 í´ë”를 엽니다.", + "newUntitledFile": "ì œëª©ì´ ì—†ëŠ” 새 파ì¼", + "createNewFile": "새 파ì¼", + "createNewFolder": "새 í´ë”", + "deleteButtonLabelRecycleBin": "휴지통으로 ì´ë™(&&M)", + "deleteButtonLabelTrash": "휴지통으로 ì´ë™(&&M)", + "deleteButtonLabel": "ì‚­ì œ(&&D)", + "dirtyMessageFolderOneDelete": "1ê°œ 파ì¼ì— 저장ë˜ì§€ ì•Šì€ ë³€ê²½ ë‚´ìš©ì´ ìžˆëŠ” í´ë”를 삭제하려고 합니다. 계ì†í•˜ì‹œê² ìŠµë‹ˆê¹Œ?", + "dirtyMessageFolderDelete": "{0}ê°œ 파ì¼ì— 저장ë˜ì§€ ì•Šì€ ë³€ê²½ ë‚´ìš©ì´ ìžˆëŠ” í´ë”를 삭제하려고 합니다. 계ì†í•˜ì‹œê² ìŠµë‹ˆê¹Œ?", + "dirtyMessageFileDelete": "저장ë˜ì§€ ì•Šì€ ë³€ê²½ ë‚´ìš©ì´ ìžˆëŠ” 파ì¼ì„ 삭제하려고 합니다. 계ì†í•˜ì‹œê² ìŠµë‹ˆê¹Œ?", + "dirtyWarning": "변경 ë‚´ìš©ì„ ì €ìž¥í•˜ì§€ ì•Šì€ ê²½ìš° 변경 ë‚´ìš©ì´ ì†ì‹¤ë©ë‹ˆë‹¤.", + "confirmMoveTrashMessageFolder": "'{0}'ê³¼(와) 해당 ë‚´ìš©ì„ ì‚­ì œí• ê¹Œìš”?", + "confirmMoveTrashMessageFile": "'{0}'ì„(를) 삭제할까요?", + "undoBin": "휴지통ì—서 ë³µì›í•  수 있습니다.", + "undoTrash": "휴지통ì—서 ë³µì›í•  수 있습니다.", + "doNotAskAgain": "ì´ ë©”ì‹œì§€ë¥¼ 다시 표시 안 함", + "confirmDeleteMessageFolder": "'{0}'ê³¼(와) 해당 ë‚´ìš©ì„ ì˜êµ¬ížˆ 삭제할까요?", + "confirmDeleteMessageFile": "'{0}'ì„(를) ì˜êµ¬ížˆ 삭제할까요?", + "irreversible": "ì´ ìž‘ì—…ì€ ì·¨ì†Œí•  수 없습니다.", + "permDelete": "ì˜êµ¬ížˆ ì‚­ì œ", + "delete": "ì‚­ì œ", + "importFiles": "íŒŒì¼ ê°€ì ¸ì˜¤ê¸°", + "confirmOverwrite": "ì´ë¦„ì´ ê°™ì€ íŒŒì¼ ë˜ëŠ” í´ë”ê°€ ëŒ€ìƒ í´ë”ì— ì´ë¯¸ 있습니다. ë®ì–´ì“¸ê¹Œìš”?", + "replaceButtonLabel": "바꾸기(&&R)", + "copyFile": "복사", + "pasteFile": "붙여넣기", + "duplicateFile": "중복", + "openToSide": "측면ì—서 열기", + "compareSource": "비êµë¥¼ 위해 ì„ íƒ", + "globalCompareFile": "활성 파ì¼ì„ 다ìŒê³¼ 비êµ...", + "openFileToCompare": "첫 번째 파ì¼ì„ 열어서 다른 파ì¼ê³¼ 비êµí•©ë‹ˆë‹¤.", + "compareWith": "'{0}'ê³¼(와) '{1}' 비êµ", + "compareFiles": "íŒŒì¼ ë¹„êµ", + "refresh": "새로 고침", + "save": "저장", + "saveAs": "다른 ì´ë¦„으로 저장...", + "saveAll": "ëª¨ë‘ ì €ìž¥", + "saveAllInGroup": "ê·¸ë£¹ì˜ ëª¨ë“  항목 저장", + "saveFiles": "íŒŒì¼ ëª¨ë‘ ì €ìž¥", + "revert": "íŒŒì¼ ë˜ëŒë¦¬ê¸°", + "focusOpenEditors": "ì—´ë ¤ 있는 편집기 ë·°ì— í¬ì»¤ìФ", + "focusFilesExplorer": "íŒŒì¼ íƒìƒ‰ê¸°ì— í¬ì»¤ìФ", + "showInExplorer": "세로 막대ì—서 활성 íŒŒì¼ í‘œì‹œ", + "openFileToShow": "íƒìƒ‰ê¸°ì— 표시하려면 먼저 파ì¼ì„ 엽니다.", + "collapseExplorerFolders": "íƒìƒ‰ê¸°ì—서 í´ë” 축소", + "refreshExplorer": "íƒìƒ‰ê¸° 새로 고침", + "openFileInNewWindow": "새 ì°½ì—서 활성 íŒŒì¼ ì—´ê¸°", + "openFileToShowInNewWindow": "먼저 íŒŒì¼ í•œ 개를 새 ì°½ì—서 엽니다.", + "revealInWindows": "íƒìƒ‰ê¸°ì— 표시", + "revealInMac": "Finderì— í‘œì‹œ", + "openContainer": "ìƒìœ„ í´ë” 열기", + "revealActiveFileInWindows": "Windows íƒìƒ‰ê¸°ì— 활성 íŒŒì¼ í‘œì‹œ", + "revealActiveFileInMac": "Finderì— í™œì„± íŒŒì¼ í‘œì‹œ", + "openActiveFileContainer": "활성 파ì¼ì˜ ìƒìœ„ í´ë” 열기", + "copyPath": "경로 복사", + "copyPathOfActive": "활성 파ì¼ì˜ 경로 복사", + "emptyFileNameError": "íŒŒì¼ ë˜ëŠ” í´ë” ì´ë¦„ì„ ìž…ë ¥í•´ì•¼ 합니다.", + "fileNameExistsError": "íŒŒì¼ ë˜ëŠ” í´ë” **{0}**ì´(ê°€) ì´ ìœ„ì¹˜ì— ì´ë¯¸ 있습니다. 다른 ì´ë¦„ì„ ì„ íƒí•˜ì„¸ìš”.", + "invalidFileNameError": "**{0}**(ì´)ë¼ëŠ” ì´ë¦„ì€ íŒŒì¼ ë˜ëŠ” í´ë” ì´ë¦„으로 올바르지 않습니다. 다른 ì´ë¦„ì„ ì„ íƒí•˜ì„¸ìš”.", + "filePathTooLongError": "**{0}**(ì´)ë¼ëŠ” ì´ë¦„ì„ ì‚¬ìš©í•˜ë©´ 경로가 너무 길어집니다. ì§§ì€ ì´ë¦„ì„ ì„ íƒí•˜ì„¸ìš”.", + "compareWithSaved": "활성 파ì¼ì„ ì €ìž¥ëœ íŒŒì¼ê³¼ 비êµ", + "modifiedLabel": "{0}(디스í¬) ↔ {1}" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json new file mode 100644 index 00000000000..f77f75c5013 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "첫 번째 파ì¼ì„ 열어서 경로를 복사합니다.", + "openFileToReveal": "첫 번째 파ì¼ì„ 열어서 나타냅니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json new file mode 100644 index 00000000000..64e3a748c1d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "íƒìƒ‰ê¸° 표시", + "explore": "íƒìƒ‰ê¸°", + "view": "보기", + "textFileEditor": "í…스트 íŒŒì¼ íŽ¸ì§‘ê¸°", + "binaryFileEditor": "ì´ì§„ íŒŒì¼ íŽ¸ì§‘ê¸°", + "filesConfigurationTitle": "파ì¼", + "exclude": "íŒŒì¼ ë° í´ë”를 제외하ë„ë¡ GLOB íŒ¨í„´ì„ êµ¬ì„±í•©ë‹ˆë‹¤. 예를 들어 íŒŒì¼ íƒìƒ‰ê¸°ëŠ” ì´ ì„¤ì •ì— ë”°ë¼ í‘œì‹œí•˜ê±°ë‚˜ 숨길 íŒŒì¼ ë° í´ë”를 결정합니다.", + "files.exclude.boolean": "íŒŒì¼ ê²½ë¡œë¥¼ ì¼ì¹˜ì‹œí‚¬ GLOB 패턴입니다. íŒ¨í„´ì„ ì‚¬ìš©í•˜ê±°ë‚˜ 사용하지 않ë„ë¡ ì„¤ì •í•˜ë ¤ë©´ true ë˜ëŠ” false로 설정하세요.", + "files.exclude.when": "ì¼ì¹˜í•˜ëŠ” 파ì¼ì˜ í˜•ì œì— ëŒ€í•œ 추가 검사입니다. $(basename)ì„ ì¼ì¹˜í•˜ëŠ” íŒŒì¼ ì´ë¦„ì— ëŒ€í•œ 변수로 사용하세요.", + "associations": "파ì¼ê³¼ ì–¸ì–´ì˜ ì—°ê²°ì„ êµ¬ì„±í•˜ì„¸ìš”(예: \"*.extension\": \"html\"). ì´ëŸ¬í•œ êµ¬ì„±ì€ ì„¤ì¹˜ëœ ì–¸ì–´ì˜ ê¸°ë³¸ 연결보다 ìš°ì„  순위가 높습니다.", + "encoding": "파ì¼ì„ ì½ê³  쓸 때 사용할 기본 ë¬¸ìž ì§‘í•© ì¸ì½”딩입니다. ì´ ì„¤ì •ì€ ì–¸ì–´ë³„ë¡œ 구성할 ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤.", + "autoGuessEncoding": "사용하ë„ë¡ ì„¤ì •í•˜ëŠ” 경우 파ì¼ì„ ì—´ 때 ë¬¸ìž ì§‘í•© ì¸ì½”ë”©ì„ ì¶”ì¸¡í•©ë‹ˆë‹¤. ì´ ì„¤ì •ì€ ì–¸ì–´ë³„ë¡œ 구성할 ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤.", + "eol": "줄 바꿈 문ìžì˜ 기본 ë입니다. LFì—는 \\n, CRLFì—는 \\r\\nì„ ì‚¬ìš©í•˜ì„¸ìš”.", + "trimTrailingWhitespace": "사용하ë„ë¡ ì„¤ì •ë˜ë©´ 파ì¼ì„ 저장할 때 후행 ê³µë°±ì´ ìž˜ë¦½ë‹ˆë‹¤.", + "insertFinalNewline": "사용하ë„ë¡ ì„¤ì •ë˜ë©´ 저장할 때 íŒŒì¼ ëì— ë§ˆì§€ë§‰ ì¤„ë°”ê¿ˆì„ ì‚½ìž…í•©ë‹ˆë‹¤.", + "trimFinalNewlines": "사용하ë„ë¡ ì„¤ì •ë˜ë©´ 저장할 때 íŒŒì¼ ëì— ë§ˆì§€ë§‰ 줄 바꿈 ì´í›„ì˜ ëª¨ë“  줄 ë°”ê¿ˆì´ ìž˜ë¦½ë‹ˆë‹¤.", + "files.autoSave.off": "ë”í‹° 파ì¼ì´ ìžë™ìœ¼ë¡œ 저장ë˜ì§€ 않습니다.", + "files.autoSave.afterDelay": "'files.autoSaveDelay' 구성 후 ë”í‹° 파ì¼ì´ ìžë™ìœ¼ë¡œ 저장ë©ë‹ˆë‹¤.", + "files.autoSave.onFocusChange": "편집기가 í¬ì»¤ìŠ¤ë¥¼ 잃으면 ë”í‹° 파ì¼ì´ ìžë™ìœ¼ë¡œ 저장ë©ë‹ˆë‹¤.", + "files.autoSave.onWindowChange": "ì°½ì´ í¬ì»¤ìŠ¤ë¥¼ 잃으면 ë”í‹° 파ì¼ì´ ìžë™ìœ¼ë¡œ 저장ë©ë‹ˆë‹¤.", + "autoSave": "ë”í‹° íŒŒì¼ ìžë™ ì €ìž¥ì„ ì œì–´í•©ë‹ˆë‹¤. 허용ë˜ëŠ” ê°’ì€ '{0}', '{1}', '{2}'(편집기가 í¬ì»¤ìŠ¤ë¥¼ 잃ìŒ), '{3}'(ì°½ì´ í¬ì»¤ìŠ¤ë¥¼ 잃ìŒ)입니다. '{4}'(으)로 설정하는 경우 'files.autoSaveDelay'ì—서 ì§€ì—°ì„ êµ¬ì„±í•  수 있습니다.", + "autoSaveDelay": "ë”í‹° 파ì¼ì„ ìžë™ìœ¼ë¡œ 저장할 ë•Œê¹Œì§€ì˜ ì§€ì—°(밀리초)ì„ ì œì–´í•©ë‹ˆë‹¤. 'files.autoSave'를 '{0}'(으)로 설정한 경우ì—ë§Œ ì ìš©ë©ë‹ˆë‹¤.", + "watcherExclude": "íŒŒì¼ ê°ì‹œì—서 제외할 íŒŒì¼ ê²½ë¡œì˜ GLOB íŒ¨í„´ì„ êµ¬ì„±í•˜ì„¸ìš”. íŒ¨í„´ì€ ì ˆëŒ€ 경로(**ì ‘ë‘사가 있는 경로 ë˜ëŠ” ì „ì²´ 경로)여야 합니다. ì´ ì„¤ì •ì„ ë³€ê²½í•˜ë ¤ë©´ 다시 시작해야 합니다. 시작 시 Codeì—서 CPU ì‹œê°„ì„ ë§Žì´ ì°¨ì§€í•˜ë©´ 대용량 í´ë”를 제외하여 초기 로드를 ì¤„ì¼ ìˆ˜ 있습니다.", + "hotExit.off": "í•« 종료를 사용하지 않습니다.", + "hotExit.onExit": "í•« 종료는 ì‘ìš© í”„ë¡œê·¸ëž¨ì„ ë‹«ì„ ë•Œ 트리거ë©ë‹ˆë‹¤. 즉 Windows/Linuxì—서 마지막 ì°½ì„ ë‹«ì„ ë•Œë‚˜ workbench.action.quit ëª…ë ¹ì´ íŠ¸ë¦¬ê±°ë  ë•Œ(명령 팔레트, 키 ë°”ì¸ë”©, 메뉴)입니다. ë‹¤ìŒ ì‹¤í–‰ 시 ë°±ì—…ì„ í¬í•¨í•œ 모든 ì°½ì´ ë³µì›ë©ë‹ˆë‹¤.", + "hotExit.onExitAndWindowClose": "í•« 종료는 ì‘ìš© í”„ë¡œê·¸ëž¨ì„ ë‹«ì„ ë•Œ 트리거ë©ë‹ˆë‹¤. 즉 Windows/Linuxì—서 마지막 ì°½ì„ ë‹«ì„ ë•Œë‚˜ workbench.action.quit ëª…ë ¹ì´ íŠ¸ë¦¬ê±°ë  ë•Œ(명령 팔레트, 키 ë°”ì¸ë”©, 메뉴), ë˜í•œ 마지막 ì°½ì¸ì§€ ì—¬ë¶€ì— ìƒê´€ì—†ì´ í´ë”ê°€ 열린 모든 ì°½ì˜ ê²½ìš°ìž…ë‹ˆë‹¤. 열린 í´ë”ê°€ 없는 모든 ì°½ì€ ë‹¤ìŒ ì‹¤í–‰ 시 ë³µì›ë©ë‹ˆë‹¤. 종료ë˜ê¸° ì „ ìƒíƒœë¡œ í´ë” ì°½ì„ ë³µì›í•˜ë ¤ë©´ \"window.restoreWindows\"를 \"all\"로 설정합니다.", + "hotExit": "저장하지 ì•Šì€ íŒŒì¼ì„ 세션 ê°„ì— ê¸°ì–µí•˜ì—¬, 편집기를 종료할 때 저장할지 묻는 메시지를 건너뛸지 여부를 제어합니다.", + "useExperimentalFileWatcher": "새로운 실험 íŒŒì¼ ê°ì‹œìžë¥¼ 사용하세요.", + "defaultLanguage": "새 파ì¼ì— 할당ë˜ëŠ” 기본 언어 모드입니다.", + "editorConfigurationTitle": "편집기", + "formatOnSave": "íŒŒì¼ ì €ìž¥ 시 서ì‹ì„ 지정합니다. í¬ë§·í„°ë¥¼ 사용할 수 있어야 하며, 파ì¼ì´ ìžë™ìœ¼ë¡œ 저장ë˜ì§€ 않아야 하고, 편집기가 종료ë˜ì§€ 않아야 합니다.", + "explorerConfigurationTitle": "íŒŒì¼ íƒìƒ‰ê¸°", + "openEditorsVisible": "ì—´ë ¤ 있는 편집기 ì°½ì— í‘œì‹œë˜ëŠ” 편집기 수입니다. ì°½ì„ ìˆ¨ê¸°ë ¤ë©´ 0으로 설정합니다.", + "dynamicHeight": "ì—´ë ¤ 있는 편집기 ì„¹ì…˜ì˜ ë†’ì´ê°€ 요소 ìˆ˜ì— ë”°ë¼ ë™ì ìœ¼ë¡œ ì¡°ì •ë˜ëŠ”ì§€ 여부를 제어합니다.", + "autoReveal": "íƒìƒ‰ê¸°ì—서 파ì¼ì„ ì—´ 때 ìžë™ìœ¼ë¡œ 표시하고 ì„ íƒí• ì§€ë¥¼ 제어합니다.", + "enableDragAndDrop": "íƒìƒ‰ê¸°ì—서 ëŒì–´ì„œ 놓기를 통한 íŒŒì¼ ë° í´ë” ì´ë™ì„ 허용하는지를 제어합니다.", + "confirmDragAndDrop": "ëŒì–´ì„œ 놓기를 사용하여 íŒŒì¼ ë° í´ë”를 ì´ë™í•˜ê¸° 위해 íƒìƒ‰ê¸°ì—서 확ì¸ì„ 요청해야 하는지 제어합니다.", + "confirmDelete": "파ì¼ì„ 휴지통ì—서 삭제할 때 íƒìƒ‰ê¸°ì—서 확ì¸ì„ 요청해야 하는지 제어합니다.", + "sortOrder.default": "íŒŒì¼ ë° í´ë”ê°€ ì´ë¦„ì„ ê¸°ì¤€ìœ¼ë¡œ 사전순으로 ì •ë ¬ë©ë‹ˆë‹¤. í´ë”ê°€ íŒŒì¼ ì•žì— í‘œì‹œë©ë‹ˆë‹¤.", + "sortOrder.mixed": "íŒŒì¼ ë° í´ë”ê°€ ì´ë¦„ì„ ê¸°ì¤€ìœ¼ë¡œ 사전순으로 ì •ë ¬ë©ë‹ˆë‹¤. 파ì¼ì´ í´ë”와 ê²°í•©ë©ë‹ˆë‹¤.", + "sortOrder.filesFirst": "íŒŒì¼ ë° í´ë”ê°€ ì´ë¦„ì„ ê¸°ì¤€ìœ¼ë¡œ 사전순으로 ì •ë ¬ë©ë‹ˆë‹¤. 파ì¼ì´ í´ë” ì•žì— í‘œì‹œë©ë‹ˆë‹¤.", + "sortOrder.type": "íŒŒì¼ ë° í´ë”ê°€ í™•ìž¥ëª…ì„ ê¸°ì¤€ìœ¼ë¡œ 사전순으로 ì •ë ¬ë©ë‹ˆë‹¤. í´ë”ê°€ íŒŒì¼ ì•žì— í‘œì‹œë©ë‹ˆë‹¤.", + "sortOrder.modified": "íŒŒì¼ ë° í´ë”ê°€ 마지막으로 수정한 날짜를 기준으로 내림차순 ì •ë ¬ë©ë‹ˆë‹¤. í´ë”ê°€ íŒŒì¼ ì•žì— í‘œì‹œë©ë‹ˆë‹¤.", + "sortOrder": "íƒìƒ‰ê¸°ì—서 íŒŒì¼ ë° í´ë”ì˜ ì •ë ¬ 순서를 제어합니다. 기본 ì •ë ¬ ì™¸ì— ìˆœì„œë¥¼ 'mixed'(íŒŒì¼ ë° í´ë”ê°€ ê²°í•©ë˜ì–´ ì •ë ¬), 'type'(íŒŒì¼ í˜•ì‹ ê¸°ì¤€), 'modified'(마지막으로 수정한 ë‚ ì§œ 기준) ë˜ëŠ” 'filesFirst'(파ì¼ì„ í´ë” ì•žì— ì •ë ¬)로 설정할 수 있습니다.", + "explorer.decorations.colors": "íŒŒì¼ ìž¥ì‹ì— ìƒ‰ì„ ì‚¬ìš©í•´ì•¼ 하는지 제어합니다.", + "explorer.decorations.badges": "íŒŒì¼ ìž¥ì‹ì— 배지를 사용해야 하는지 제어합니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json new file mode 100644 index 00000000000..6cf353ae712 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "userGuide": "오른쪽 편집기 ë„구 모ìŒì˜ ìž‘ì—…ì„ ì‚¬ìš©í•˜ì—¬ 변경 ë‚´ìš©ì„ **실행 취소**하거나 디스í¬ì˜ 콘í…츠를 변경 내용으로 **ë®ì–´ì“°ê¸°**", + "discard": "ì‚­ì œ", + "overwrite": "ë®ì–´ì“°ê¸°", + "retry": "다시 시ë„", + "readonlySaveError": "'{0}'ì„(를) 저장하지 못했습니다. 파ì¼ì´ 쓰기 보호ë˜ì–´ 있습니다. 보호를 제거하려면 'ë®ì–´ì“°ê¸°'를 ì„ íƒí•˜ì„¸ìš”.", + "genericSaveError": "'{0}'ì„(를) 저장하지 못했습니다. {1}", + "staleSaveError": "'{0}'ì„(를) 저장하지 못했습니다. 디스í¬ì˜ ë‚´ìš©ì´ ìµœì‹  버전입니다. ë²„ì „ì„ ë””ìŠ¤í¬ì— 있는 버전과 비êµí•˜ë ¤ë©´ **비êµ**를 í´ë¦­í•˜ì„¸ìš”.", + "compareChanges": "비êµ", + "saveConflictDiffLabel": "{0}(디스í¬ì— 있ìŒ) ↔ {1}({2}ì— ìžˆìŒ) - 저장 ì¶©ëŒ í•´ê²°" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json new file mode 100644 index 00000000000..4ce15b3e32b --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "열린 í´ë” ì—†ìŒ", + "explorerSection": "íŒŒì¼ íƒìƒ‰ê¸° 섹션", + "noWorkspaceHelp": "작업 ì˜ì—­ì— ì•„ì§ í´ë”를 추가하지 않았습니다.", + "noFolderHelp": "ì•„ì§ í´ë”를 ì—´ì§€ 않았습니다.", + "openFolder": "í´ë” 열기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json new file mode 100644 index 00000000000..89eb88bfbfe --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label": "íƒìƒ‰ê¸°", + "canNotResolve": "작업 ì˜ì—­ í´ë”를 확ì¸í•  수 없습니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json new file mode 100644 index 00000000000..e98c63b21c8 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "íŒŒì¼ íƒìƒ‰ê¸° 섹션", + "treeAriaLabel": "íŒŒì¼ íƒìƒ‰ê¸°" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json new file mode 100644 index 00000000000..249d7018e6a --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "íŒŒì¼ ì´ë¦„ì„ ìž…ë ¥í•©ë‹ˆë‹¤. 확ì¸í•˜ë ¤ë©´ Enter 키를 누르고, 취소하려면 Esc 키를 누릅니다.", + "filesExplorerViewerAriaLabel": "{0}, íŒŒì¼ íƒìƒ‰ê¸°", + "dropFolders": "작업 ì˜ì—­ì— í´ë”를 추가하시겠습니까?", + "dropFolder": "작업 ì˜ì—­ì— í´ë”를 추가하시겠습니까?", + "addFolders": "í´ë” 추가(&&A)", + "addFolder": "í´ë” 추가(&&A)", + "confirmMove": "'{0}'ì„(를) ì´ë™í•˜ì‹œê² ìŠµë‹ˆê¹Œ?", + "doNotAskAgain": "ì´ ë©”ì‹œì§€ë¥¼ 다시 표시 안 함", + "moveButtonLabel": "ì´ë™(&&M)", + "confirmOverwriteMessage": "'{0}'ì´(ê°€) ëŒ€ìƒ í´ë”ì— ì´ë¯¸ 있습니다. 바꿀까요?", + "irreversible": "ì´ ìž‘ì—…ì€ ì·¨ì†Œí•  수 없습니다.", + "replaceButtonLabel": "바꾸기(&&R)" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json new file mode 100644 index 00000000000..56030126c94 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "ì—´ë ¤ 있는 편집기", + "openEditosrSection": "ì—´ë ¤ 있는 편집기 섹션", + "dirtyCounter": "{0}ì´(ê°€) 저장ë˜ì§€ 않ìŒ", + "saveAll": "ëª¨ë‘ ì €ìž¥", + "closeAllUnmodified": "미수정 항목 닫기", + "closeAll": "ëª¨ë‘ ë‹«ê¸°", + "compareWithSaved": "ì €ìž¥ëœ í•­ëª©ê³¼ 비êµ", + "close": "닫기", + "closeOthers": "기타 항목 닫기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json new file mode 100644 index 00000000000..4946bd4745c --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, 편집기 그룹", + "openEditorAriaLabel": "{0}, 편집기 열기", + "saveAll": "ëª¨ë‘ ì €ìž¥", + "closeAllUnmodified": "미수정 항목 닫기", + "closeAll": "ëª¨ë‘ ë‹«ê¸°", + "compareWithSaved": "ì €ìž¥ëœ í•­ëª©ê³¼ 비êµ", + "close": "닫기", + "closeOthers": "기타 항목 닫기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/kor/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/kor/src/vs/workbench/parts/markers/common/messages.i18n.json index 08ea34ce594..fb8699cf20f 100644 --- a/i18n/kor/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,8 +6,6 @@ { "viewCategory": "보기", "problems.view.toggle.label": "설정/í•´ì œ 문제", - "problems.view.show.label": "문제 표시", - "problems.view.hide.label": "숨기기 문제", "problems.panel.configuration.title": "문제 보기", "problems.panel.configuration.autoreveal": "문제 보기를 ì—´ 때 문제 ë³´ê¸°ì— ìžë™ìœ¼ë¡œ 파ì¼ì´ 표시ë˜ì–´ì•¼ 하는지를 제어합니다.", "markers.panel.title.problems": "문제", diff --git a/i18n/kor/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json b/i18n/kor/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json new file mode 100644 index 00000000000..d0885df5255 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "prof.message": "í”„ë¡œí•„ì„ ë§Œë“¤ì—ˆìŠµë‹ˆë‹¤.", + "prof.detail": "문제를 ë°œìƒì‹œí‚¤ê³  ë‹¤ìŒ íŒŒì¼ì„ 수ë™ìœ¼ë¡œ 첨부하세요.\n{0}", + "prof.restartAndFileIssue": "문제 만들기 ë° ë‹¤ì‹œ 시작", + "prof.restart": "다시 시작", + "prof.thanks": "ë„ì›€ì„ ì£¼ì…”ì„œ ê°ì‚¬í•©ë‹ˆë‹¤.", + "prof.detail.restart": "ê³„ì† '{0}'ì„(를) 사용하려면 마지막으로 다시 시작해야 합니다. 기여해 주셔서 다시 한번 ê°ì‚¬ë“œë¦½ë‹ˆë‹¤." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 667bd135979..edf361223f6 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defineKeybinding.initial": "ì›í•˜ëŠ” 키 ì¡°í•©ì„ ìž…ë ¥í•˜ê³  키를 누릅니다. 취소하려면 키를 누릅니다.", "defineKeybinding.chordsTo": "현" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index f6f3684850f..adf5c1ee858 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -26,6 +26,7 @@ "editKeybindingLabel": "키 ë°”ì¸ë”© 변경", "addKeybindingLabelWithKey": "키 ë°”ì¸ë”© {0} 추가", "addKeybindingLabel": "키 ë°”ì¸ë”© 추가", + "title": "{0}({1})", "commandAriaLabel": "ëª…ë ¹ì€ {0}입니다.", "keybindingAriaLabel": "키 ë°”ì¸ë”©ì€ {0}입니다.", "noKeybinding": "키 ë°”ì¸ë”©ì´ 할당ë˜ì§€ 않았습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index ff68e7246b7..0356863191a 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -7,12 +7,11 @@ "settingsEditorName": "기본 설정", "SearchSettingsWidget.AriaLabel": "설정 검색", "SearchSettingsWidget.Placeholder": "설정 검색", - "totalSettingsMessage": "ì´ {0}ê°œ 설정", "noSettingsFound": "ê²°ê³¼ ì—†ìŒ", "oneSettingFound": "1ê°œ 설정 ì¼ì¹˜í•¨", "settingsFound": "{0}ê°œ 설정 ì¼ì¹˜í•¨", - "fileEditorWithInputAriaLabel": "{0}. í…스트 íŒŒì¼ íŽ¸ì§‘ê¸°ìž…ë‹ˆë‹¤.", - "fileEditorAriaLabel": "í…스트 íŒŒì¼ íŽ¸ì§‘ê¸°ìž…ë‹ˆë‹¤.", + "totalSettingsMessage": "ì´ {0}ê°œ 설정", + "defaultSettings": "기본 설정", "defaultEditorReadonly": "ê¸°ë³¸ê°’ì„ ìž¬ì •ì˜í•˜ë ¤ë©´ 오른쪽 편집기를 편집하세요.", "preferencesAriaLabel": "기본 설정. ì½ê¸° ì „ìš© í…스트 편집기입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 7a02526e6fa..c9e560bb0ca 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -7,8 +7,6 @@ "emptyUserSettingsHeader": "ì„¤ì •ì„ ì—¬ê¸°ì— ë„£ì–´ì„œ 기본 ì„¤ì •ì„ ë®ì–´ì”니다.", "emptyWorkspaceSettingsHeader": "ì„¤ì •ì„ ì—¬ê¸°ì— ë„£ì–´ì„œ ì‚¬ìš©ìž ì„¤ì •ì„ ë®ì–´ì”니다.", "emptyFolderSettingsHeader": "í´ë” ì„¤ì •ì„ ì—¬ê¸°ì— ë„£ì–´ì„œ 작업 ì˜ì—­ ì„¤ì •ì„ ë®ì–´ì”니다.", - "defaultFolderSettingsTitle": "기본 í´ë” 설정", - "defaultSettingsTitle": "기본 설정", "editTtile": "편집", "replaceDefaultValue": "설정ì—서 바꾸기", "copyDefaultValue": "ì„¤ì •ì— ë³µì‚¬", diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index dad1ce0c9be..7a4c308d03c 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultSettingsFuzzyPrompt": "유사 항목 ê²€ìƒ‰ì„ ì‚¬ìš©í•´ë³´ì„¸ìš”!", "defaultSettings": "ì„¤ì •ì„ ì˜¤ë¥¸ìª½ íŽ¸ì§‘ê¸°ì— ë„£ì–´ì„œ ë®ì–´ì”니다.", "noSettingsFound": "ì„¤ì •ì„ ì°¾ì„ ìˆ˜ 없습니다.", - "folderSettingsDetails": "í´ë” 설정", - "enableFuzzySearch": "실험 유사 항목 검색 사용" + "settingsSwitcherBarAriaLabel": "설정 전환기", + "userSettings": "ì‚¬ìš©ìž ì„¤ì •", + "workspaceSettings": "작업 ì˜ì—­ 설정" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json new file mode 100644 index 00000000000..c37bd69f731 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "기본 설정 편집기", + "keybindingsEditor": "키 ë°”ì¸ë”© 편집기", + "preferences": "기본 설정" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json index 7706711508b..f5dbc3eb318 100644 --- a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -6,7 +6,6 @@ { "scm providers": "소스 제어 공급ìž", "hideRepository": "숨기기", - "commitMessage": "Message (press {0} to commit)", "installAdditionalSCMProviders": "추가 SCM ê³µê¸‰ìž ì„¤ì¹˜...", "no open repo": "활성 소스 제어 공급ìžê°€ 없습니다.", "source control": "소스 제어", diff --git a/i18n/kor/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/kor/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index 70914be2648..25d60399f44 100644 --- a/i18n/kor/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultLabel": "ìž…ë ¥", - "useIgnoreFilesDescription": "íŒŒì¼ ë¬´ì‹œ 사용", - "useExcludeSettingsDescription": "제외 설정 사용" + "defaultLabel": "ìž…ë ¥" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/search/browser/search.contribution.i18n.json index 2d787a2e21c..9b239f6fd5f 100644 --- a/i18n/kor/src/vs/workbench/parts/search/browser/search.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -16,7 +16,6 @@ "exclude.boolean": "íŒŒì¼ ê²½ë¡œë¥¼ ì¼ì¹˜ì‹œí‚¬ GLOB 패턴입니다. íŒ¨í„´ì„ ì‚¬ìš©í•˜ê±°ë‚˜ 사용하지 않ë„ë¡ ì„¤ì •í•˜ë ¤ë©´ true ë˜ëŠ” false로 설정하세요.", "exclude.when": "ì¼ì¹˜í•˜ëŠ” 파ì¼ì˜ í˜•ì œì— ëŒ€í•œ 추가 검사입니다. $(basename)ì„ ì¼ì¹˜í•˜ëŠ” íŒŒì¼ ì´ë¦„ì— ëŒ€í•œ 변수로 사용하세요.", "useRipgrep": "í…스트 ë° íŒŒì¼ ê²€ìƒ‰ì—서 ripgrep 사용 여부를 제어합니다.", - "useIgnoreFilesByDefault": "새 작업 ì˜ì—­ì—서 검색할 때 기본ì ìœ¼ë¡œ .gitignore íŒŒì¼ ë° .ignore 파ì¼ì„ 사용할지 여부를 제어합니다.", "useIgnoreFiles": "파ì¼ì„ 검색할 때 .gitignore íŒŒì¼ ë° .ignore 파ì¼ì„ 사용할지 여부를 제어합니다.", "search.quickOpen.includeSymbols": "Quick Openì— ëŒ€í•œ íŒŒì¼ ê²°ê³¼ì— ì „ì—­ 기호 검색 결과를 í¬í•¨í•˜ë„ë¡ êµ¬ì„±í•©ë‹ˆë‹¤.", "search.followSymlinks": "검색하는 ë™ì•ˆ symlink를 누를지 여부를 제어합니다." diff --git a/i18n/kor/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/kor/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 2feb55cb593..b045a022b27 100644 --- a/i18n/kor/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -10,17 +10,14 @@ "previousSearchExcludePattern": "ì´ì „ 검색 제외 패턴 표시", "nextSearchTerm": "ë‹¤ìŒ ê²€ìƒ‰ì–´ 표시", "previousSearchTerm": "ì´ì „ 검색어 표시", - "focusNextInputBox": "ë‹¤ìŒ ìž…ë ¥ ìƒìžì— í¬ì»¤ìФ", - "focusPreviousInputBox": "ì´ì „ ìž…ë ¥ ìƒìžì— í¬ì»¤ìФ", "showSearchViewlet": "검색 표시", "findInFiles": "파ì¼ì—서 찾기", "findInFilesWithSelectedText": "ì„ íƒí•œ í…스트가 있는 파ì¼ì—서 찾기", "replaceInFiles": "파ì¼ì—서 바꾸기", "replaceInFilesWithSelectedText": "ì„ íƒí•œ í…스트가 있는 파ì¼ì—서 바꾸기", - "findInWorkspace": "작업 ì˜ì—­ì—서 찾기...", - "findInFolder": "í´ë”ì—서 찾기...", "RefreshAction.label": "새로 고침", - "ClearSearchResultsAction.label": "검색 ê²°ê³¼ 지우기", + "CollapseDeepestExpandedLevelAction.label": "ëª¨ë‘ ì¶•ì†Œ", + "ClearSearchResultsAction.label": "지우기", "FocusNextSearchResult.label": "ë‹¤ìŒ ê²€ìƒ‰ ê²°ê³¼ì— í¬ì»¤ìФ", "FocusPreviousSearchResult.label": "ì´ì „ 검색 ê²°ê³¼ì— í¬ì»¤ìФ", "RemoveAction.label": "í•´ì œ", diff --git a/i18n/kor/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json new file mode 100644 index 00000000000..9b239f6fd5f --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "작업 ì˜ì—­ì—서 기호로 ì´ë™...", + "name": "검색", + "search": "검색", + "view": "보기", + "openAnythingHandlerDescription": "파ì¼ë¡œ ì´ë™", + "openSymbolDescriptionNormal": "작업 ì˜ì—­ì—서 기호로 ì´ë™", + "searchOutputChannelTitle": "검색", + "searchConfigurationTitle": "검색", + "exclude": "검색ì—서 íŒŒì¼ ë° í´ë”를 제외하ë„ë¡ GLOB íŒ¨í„´ì„ êµ¬ì„±í•©ë‹ˆë‹¤. files.exclude 설정ì—서 모든 GLOB íŒ¨í„´ì„ ìƒì†í•©ë‹ˆë‹¤.", + "exclude.boolean": "íŒŒì¼ ê²½ë¡œë¥¼ ì¼ì¹˜ì‹œí‚¬ GLOB 패턴입니다. íŒ¨í„´ì„ ì‚¬ìš©í•˜ê±°ë‚˜ 사용하지 않ë„ë¡ ì„¤ì •í•˜ë ¤ë©´ true ë˜ëŠ” false로 설정하세요.", + "exclude.when": "ì¼ì¹˜í•˜ëŠ” 파ì¼ì˜ í˜•ì œì— ëŒ€í•œ 추가 검사입니다. $(basename)ì„ ì¼ì¹˜í•˜ëŠ” íŒŒì¼ ì´ë¦„ì— ëŒ€í•œ 변수로 사용하세요.", + "useRipgrep": "í…스트 ë° íŒŒì¼ ê²€ìƒ‰ì—서 ripgrep 사용 여부를 제어합니다.", + "useIgnoreFiles": "파ì¼ì„ 검색할 때 .gitignore íŒŒì¼ ë° .ignore 파ì¼ì„ 사용할지 여부를 제어합니다.", + "search.quickOpen.includeSymbols": "Quick Openì— ëŒ€í•œ íŒŒì¼ ê²°ê³¼ì— ì „ì—­ 기호 검색 결과를 í¬í•¨í•˜ë„ë¡ êµ¬ì„±í•©ë‹ˆë‹¤.", + "search.followSymlinks": "검색하는 ë™ì•ˆ symlink를 누를지 여부를 제어합니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/kor/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 56b330a8ddb..e0344b0285b 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -6,9 +6,7 @@ { "tasksCategory": "작업", "ConfigureTaskRunnerAction.label": "작업 구성", - "ConfigureBuildTaskAction.label": "빌드 작업 구성", "CloseMessageAction.label": "닫기", - "ShowTerminalAction.label": "í„°ë¯¸ë„ ë³´ê¸°", "problems": "문제", "manyMarkers": "99+", "runningTasks": "실행 ì¤‘ì¸ ìž‘ì—… 표시", @@ -52,7 +50,6 @@ "TaslService.noEntryToRun": "실행할 ìž‘ì—…ì´ ì—†ìŠµë‹ˆë‹¤. 작업 구성...", "TaskService.fetchingBuildTasks": "빌드 ìž‘ì—…ì„ íŽ˜ì¹˜í•˜ëŠ” 중...", "TaskService.pickBuildTask": "실행할 빌드 작업 ì„ íƒ", - "TaskService.noBuildTask": "실행할 빌드 ìž‘ì—…ì´ ì—†ìŠµë‹ˆë‹¤. 작업 구성...", "TaskService.fetchingTestTasks": "테스트 ìž‘ì—…ì„ íŽ˜ì¹˜í•˜ëŠ” 중...", "TaskService.pickTestTask": "실행할 테스트 작업 ì„ íƒ", "TaskService.noTestTaskTerminal": "실행할 테스트 ìž‘ì—…ì´ ì—†ìŠµë‹ˆë‹¤. 작업 구성...", diff --git a/i18n/kor/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index d676ae23acb..7638704dea1 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,8 +14,6 @@ "ConfigurationParser.noTypeDefinition": "오류: 등ë¡ëœ 작업 í˜•ì‹ '{0}'ì´(ê°€) 없습니다. 해당하는 작업 공급ìžë¥¼ 제공하는 í™•ìž¥ì„ ì„¤ì¹˜í•˜ì§€ 않으셨습니까?", "ConfigurationParser.missingRequiredProperty": "오류: 작업 구성 '{0}'ì— í•„ìš”í•œ ì†ì„± '{1}'ì´(ê°€) 없습니다. 작업 êµ¬ì„±ì´ ë¬´ì‹œë©ë‹ˆë‹¤.", "ConfigurationParser.notCustom": "오류: ìž‘ì—…ì´ ì‚¬ìš©ìž ì§€ì • 작업으로 ì„ ì–¸ë˜ì§€ 않았습니다. ì´ êµ¬ì„±ì€ ë¬´ì‹œë©ë‹ˆë‹¤.\n{0}\n", - "ConfigurationParser.noTaskName": "오류: 작업ì—서 taskName ì†ì„±ì„ 제공해야 합니다. ì´ ìž‘ì—…ì€ ë¬´ì‹œë©ë‹ˆë‹¤.\n{0}\n", - "taskConfiguration.shellArgs": "경고: 작업 '{0}'ì€(는) ì…¸ 명령ì´ë©°, 명령 ì´ë¦„ì´ë‚˜ ì¸ìˆ˜ 중 í•˜ë‚˜ì— ì´ìŠ¤ì¼€ì´í”„ë˜ì§€ ì•Šì€ ê³µë°±ì´ ìžˆìŠµë‹ˆë‹¤. 명령줄 ì¸ìš©ì„ 올바르게 하려면 ì¸ìˆ˜ë¥¼ 명령으로 병합하세요.", "taskConfiguration.noCommandOrDependsOn": "오류: 작업 '{0}'ì—서 명령ì´ë‚˜ dependsOn ì†ì„±ì„ 지정하지 않습니다. ì´ ìž‘ì—…ì€ ë¬´ì‹œë©ë‹ˆë‹¤. 해당 ìž‘ì—…ì˜ ì •ì˜ëŠ” {1}입니다.", "taskConfiguration.noCommand": "오류: 작업 '{0}'ì—서 ëª…ë ¹ì„ ì •ì˜í•˜ì§€ 않습니다. ì´ ìž‘ì—…ì€ ë¬´ì‹œë©ë‹ˆë‹¤. 해당 ìž‘ì—…ì˜ ì •ì˜ëŠ”\n{1}입니다.", "TaskParse.noOsSpecificGlobalTasks": "작업 버전 2.0.0ì€ ê¸€ë¡œë²Œ OS별 ìž‘ì—…ì„ ì§€ì›í•˜ì§€ 않습니다. OS별 ëª…ë ¹ì„ ì‚¬ìš©í•˜ì—¬ 작업으로 변환하세요. ì˜í–¥ì„ 받는 작업::\n{0}" diff --git a/i18n/kor/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index 0c1970cb3cf..456b167f15a 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,7 +6,7 @@ { "termEntryAriaLabel": "{0}, í„°ë¯¸ë„ ì„ íƒê¸°", "termCreateEntryAriaLabel": "{0}, 새 í„°ë¯¸ë„ ë§Œë“¤ê¸°", - "'workbench.action.terminal.newplus": "$(plus) 새 통합 í„°ë¯¸ë„ ë§Œë“¤ê¸°", + "workbench.action.terminal.newplus": "$(plus) 새 통합 í„°ë¯¸ë„ ë§Œë“¤ê¸°", "noTerminalsMatching": "ì¼ì¹˜í•˜ëŠ” í„°ë¯¸ë„ ì—†ìŒ", "noTerminalsFound": "열린 í„°ë¯¸ë„ ì—†ìŒ" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 1b4f36cd671..1a66c6cd537 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,7 +16,6 @@ "terminal.integrated.rightClickCopyPaste": "설정하는 경우 í„°ë¯¸ë„ ë‚´ì—서 마우스 오른쪽 단추를 í´ë¦­í•  때 ìƒí™©ì— 맞는 메뉴가 표시ë˜ì§€ 않고 대신 ì„ íƒ í•­ëª©ì´ ìžˆìœ¼ë©´ 복사하고 ì„ íƒ í•­ëª©ì´ ì—†ìœ¼ë©´ 붙여넣습니다.", "terminal.integrated.fontFamily": "터미ë„ì˜ ê¸€ê¼´ 패밀리를 제어하며, ê¸°ë³¸ê°’ì€ editor.fontFamilyì˜ ê°’ìž…ë‹ˆë‹¤.", "terminal.integrated.fontSize": "터미ë„ì˜ ê¸€ê¼´ í¬ê¸°(픽셀)를 제어합니다.", - "terminal.integrated.lineHeight": "터미ë„ì˜ ì¤„ 높ì´ë¥¼ 제어하며, ì´ ìˆ«ìžëŠ” í„°ë¯¸ë„ ê¸€ê¼´ í¬ê¸°ë¥¼ 곱하여 실제 줄 높ì´(픽셀)를 얻습니다.", "terminal.integrated.enableBold": "í„°ë¯¸ë„ ë‚´ì—서 êµµì€ í…스트를 사용하ë„ë¡ ì„¤ì •í• ì§€ 여부ì´ë©°, í„°ë¯¸ë„ ì…¸ì˜ ì§€ì›ì´ 필요합니다.", "terminal.integrated.cursorBlinking": "í„°ë¯¸ë„ ì»¤ì„œ 깜박임 여부를 제어합니다.", "terminal.integrated.cursorStyle": "í„°ë¯¸ë„ ì»¤ì„œì˜ ìŠ¤íƒ€ì¼ì„ 제어합니다.", diff --git a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index b3a4598456f..43a0bba1a52 100644 --- a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -8,10 +8,9 @@ "installColorThemes": "추가 색 테마 설치...", "themes.selectTheme": "색 테마 ì„ íƒ(미리 보려면 위로/아래로 키 사용)", "selectIconTheme.label": "íŒŒì¼ ì•„ì´ì½˜ 테마", - "installIconThemes": "추가 íŒŒì¼ ì•„ì´ì½˜ 테마 설치...", "noIconThemeLabel": "ì—†ìŒ", "noIconThemeDesc": "íŒŒì¼ ì•„ì´ì½˜ 사용 안 함", - "problemChangingIconTheme": "ì•„ì´ì½˜ 테마를 설정하는 ë™ì•ˆ 문제 ë°œìƒ: {0}", + "installIconThemes": "추가 íŒŒì¼ ì•„ì´ì½˜ 테마 설치...", "themes.selectIconTheme": "íŒŒì¼ ì•„ì´ì½˜ 테마 ì„ íƒ", "generateColorTheme.label": "현재 설정ì—서 색 테마 ìƒì„±", "preferences": "기본 설정", diff --git a/i18n/kor/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/kor/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index c3734d9997d..a790ec1d90c 100644 --- a/i18n/kor/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/kor/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -9,9 +9,9 @@ "scope.window.description": "[사용ìž] 설정 ë˜ëŠ” [작업 ì˜ì—­] 설정ì—서 구성할 수 있는 ì°½ 특정 구성입니다.", "scope.resource.description": "사용ìž, 작업 ì˜ì—­ ë˜ëŠ” í´ë” 설정ì—서 구성할 수 있는 리소스 특정 구성", "scope.description": "êµ¬ì„±ì´ ì ìš©ë˜ëŠ” 범위입니다. 사용 가능 범위는 'ì°½'ê³¼ '리소스'입니다.", + "vscode.extension.contributes.defaultConfiguration": "언어별로 기본 편집기 구성 ì„¤ì •ì„ ì ìš©í•©ë‹ˆë‹¤.", "vscode.extension.contributes.configuration": "구성 ì„¤ì •ì„ ì ìš©í•©ë‹ˆë‹¤.", "invalid.title": "'configuration.title'ì€ ë¬¸ìžì—´ì´ì–´ì•¼ 합니다.", - "vscode.extension.contributes.defaultConfiguration": "언어별로 기본 편집기 구성 ì„¤ì •ì„ ì ìš©í•©ë‹ˆë‹¤.", "invalid.properties": "'configuration.properties'는 개체여야 합니다.", "invalid.allOf": "'configuration.allOf'는 사용ë˜ì§€ 않으며 ë” ì´ìƒ 사용해서는 안ë©ë‹ˆë‹¤. 대신 여러 구성 ì„¹ì…˜ì„ ë°°ì—´ë¡œ 'configuration' 기여 ì§€ì ì— 전달하세요.", "workspaceConfig.folders.description": "작업 ì˜ì—­ì— 로드ë˜ëŠ” í´ë” 목ë¡ìž…니다.", diff --git a/i18n/kor/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json b/i18n/kor/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json new file mode 100644 index 00000000000..cff423b1f3b --- /dev/null +++ b/i18n/kor/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "ì›ê²© ë¶„ì„", + "telemetry.enableCrashReporting": "ì¶©ëŒ ë³´ê³ ì„œë¥¼ Microsoftì— ì „ì†¡í•  수 있ë„ë¡ ì„¤ì •í•©ë‹ˆë‹¤.\nì´ ì˜µì…˜ì„ ì ìš©í•˜ë ¤ë©´ 다시 시작해야 합니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/kor/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index ba22c381c7d..8b6ad71cd4e 100644 --- a/i18n/kor/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "bubbleTitle": "ê°•ì¡°ëœ í•­ëª© í¬í•¨" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/kor/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/kor/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/kor/src/vs/workbench/services/files/node/fileService.i18n.json index 28c96c9fb3d..0ad83956b0f 100644 --- a/i18n/kor/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/files/node/fileService.i18n.json @@ -8,8 +8,8 @@ "fileIsDirectoryError": "파ì¼ì´ 디렉터리입니다.", "fileNotModifiedError": "íŒŒì¼ ìˆ˜ì • 안 ë¨", "fileTooLargeError": "파ì¼ì´ 너무 커서 ì—´ 수 ì—†ìŒ", - "fileBinaryError": "파ì¼ì´ ì´ì§„ì¸ ê²ƒ 같으므로 테스트로 ì—´ 수 없습니다.", "fileNotFoundError": "파ì¼ì„ ì°¾ì„ ìˆ˜ 없습니다({0}).", + "fileBinaryError": "파ì¼ì´ ì´ì§„ì¸ ê²ƒ 같으므로 테스트로 ì—´ 수 없습니다.", "fileExists": "만드려는 파ì¼ì´ ì´ë¯¸ 있ìŒ({0})", "fileMoveConflict": "ì´ë™/복사할 수 없습니다. 대ìƒì— 파ì¼ì´ ì´ë¯¸ 있습니다.", "unableToMoveCopyError": "ì´ë™/복사할 수 없습니다. 파ì¼ì´ í¬í•¨ëœ í´ë”를 파ì¼ë¡œ 대체합니다.", diff --git a/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 1d3e36aa30f..10bf5a9ef4f 100644 --- a/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -21,6 +21,5 @@ "keybindings.json.command": "실행할 ëª…ë ¹ì˜ ì´ë¦„", "keybindings.json.when": "키가 활성화ë˜ëŠ” 조건입니다.", "keybindings.json.args": "실행할 ëª…ë ¹ì— ì „ë‹¬í•  ì¸ìˆ˜ìž…니다.", - "keyboardConfigurationTitle": "키보드", - "dispatch": "`keydown.code`(권장) ë˜ëŠ” `keydown.keyCode`를 사용하는 키 ëˆ„ë¦„ì— ëŒ€í•œ 디스패치 논리를 제어합니다." + "keyboardConfigurationTitle": "키보드" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/kor/src/vs/workbench/services/textfile/common/textFileService.i18n.json index 71888705e2c..8b6ad71cd4e 100644 --- a/i18n/kor/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "files.backup.failSave": "파ì¼ì„ 백업할 수 없습니다(오류: {0}). 종료하려면 파ì¼ì„ 저장해 보세요." -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index c7ed3a3fe46..d365ddcbff5 100644 --- a/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "migration.completed": "새 테마 ì„¤ì •ì´ ì‚¬ìš©ìž ì„¤ì •ì— ì¶”ê°€ë˜ì—ˆìŠµë‹ˆë‹¤. {0}ì—서 ë°±ì—…ì„ ì‚¬ìš©í•  수 있습니다.", "error.cannotloadtheme": "Unable to load {0}: {1}", - "error.cannotloadicontheme": "Unable to load {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "워í¬ë²¤ì¹˜ì—서 사용ë˜ëŠ” ì•„ì´ì½˜ 테마를 지정합니다. 'null'로 지정하면 íŒŒì¼ ì•„ì´ì½˜ì„ 표시하지 않습니다.", diff --git a/i18n/ptb/extensions/css/client/out/cssMain.i18n.json b/i18n/ptb/extensions/css/client/out/cssMain.i18n.json index a649796227b..4eeecc57ff2 100644 --- a/i18n/ptb/extensions/css/client/out/cssMain.i18n.json +++ b/i18n/ptb/extensions/css/client/out/cssMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "cssserver.name": "Servidor de linguagem CSS" + "cssserver.name": "Servidor de linguagem CSS", + "folding.start": "Início da Região Expansível", + "folding.end": "Fim da Região Expansível" } \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/autofetch.i18n.json b/i18n/ptb/extensions/git/out/autofetch.i18n.json new file mode 100644 index 00000000000..1c3c1cf318d --- /dev/null +++ b/i18n/ptb/extensions/git/out/autofetch.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yes": "Sim", + "no": "Não", + "not now": "Agora Não", + "suggest auto fetch": "Deseja habilitar o autopreenchimento dos repositórios Git?" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/commands.i18n.json b/i18n/ptb/extensions/git/out/commands.i18n.json index d3e314a0e15..03a6223ad1d 100644 --- a/i18n/ptb/extensions/git/out/commands.i18n.json +++ b/i18n/ptb/extensions/git/out/commands.i18n.json @@ -9,9 +9,12 @@ "create branch": "$(plus) criar nova ramificação", "repourl": "URL do repositório", "parent": "Diretório pai", + "cancel": "$(sync~spin) Clonando o repositório... Clique para cancelar", + "cancel tooltip": "Cancelar o clone", "cloning": "Clonando repositório do Git...", "openrepo": "Abrir Repositório", "proposeopen": "Gostaria de abrir o repositório clonado?", + "init": "Escolher a pasta de trabalho para inicializar o git repo", "init repo": "Inicializar Repositório", "create repo": "Inicializar Repositório", "are you sure": "Isto irá criar um repositório Git em '{0}'. Tem certeza que deseja continuar?", @@ -49,12 +52,15 @@ "select branch to delete": "Selecione uma ramificação para excluir", "confirm force delete branch": "A ramificação '{0}' não foi totalmente mesclada. Excluir mesmo assim?", "delete branch": "Excluir ramificação", + "invalid branch name": "Nome da ramificação inválido.", + "branch already exists": "Um ramo chamado '{0}' já existe", "select a branch to merge from": "Selecione uma ramificação para mesclar", "merge conflicts": "Existem conflitos de mesclagem. Resolva-os antes de confirmar.", "tag name": "Nome do rótulo", "provide tag name": "Por favor, forneça um nome de Tag", "tag message": "Mensagem", "provide tag message": "Por favor, forneça uma mensagem para comentar o rótulo", + "no remotes to fetch": "Este repositório não possui remotos configurados para buscar algo", "no remotes to pull": "O seu repositório não possui remotos configurados para efetuar pull.", "pick remote pull repo": "Selecione um remoto para efeutar o pull da ramificação", "no remotes to push": "O seu repositório não possui remotos configurados para efetuar push.", @@ -71,7 +77,7 @@ "no stashes": "Não há esconderijos para restaurar.", "pick stash to pop": "Escolher um esconderijo de pop", "clean repo": "Por favor, limpe sua árvore de trabalho do repositório antes de fazer check-out.", - "cant push": "Não pode empurrar referências para remoto. Execute 'Pull' primeiro para integrar suas alterações.", + "cant push": "Não foi possível enviar referências para ramoto. Tente executar primeiro o 'Pull' para integrar com suas modificações.", "git error details": "Git: {0}", "git error": "Erro de Git", "open git log": "Abrir Histórico do Git" diff --git a/i18n/ptb/extensions/git/out/main.i18n.json b/i18n/ptb/extensions/git/out/main.i18n.json index ae1dee26032..9991e6dc5e9 100644 --- a/i18n/ptb/extensions/git/out/main.i18n.json +++ b/i18n/ptb/extensions/git/out/main.i18n.json @@ -4,8 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "looking": "Procurando por git em: {0}", "using git": "Usando git {0} de {1}", - "updateGit": "Atualizar o Git", + "downloadgit": "Baixar o Git", "neverShowAgain": "Não mostrar novamente", + "notfound": "Git não encontrado. Instale ou configure usando a configuração 'git.path'.", + "updateGit": "Atualizar o Git", "git20": "Você parece ter o git {0} instalado. Code funciona melhor com git > = 2" } \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/repository.i18n.json b/i18n/ptb/extensions/git/out/repository.i18n.json index d9855ba9df2..214c9e1d36f 100644 --- a/i18n/ptb/extensions/git/out/repository.i18n.json +++ b/i18n/ptb/extensions/git/out/repository.i18n.json @@ -21,6 +21,7 @@ "deleted by us": "Excluído por nós", "both added": "Ambos adicionados", "both modified": "Ambos modificados", + "commitMessage": "Mensagem (tecle {0} para confirmar)", "commit": "Confirmar", "merge changes": "Mesclar Alterações", "staged changes": "Alterações em Etapas", diff --git a/i18n/ptb/extensions/git/package.i18n.json b/i18n/ptb/extensions/git/package.i18n.json index 99f6aa755f8..81db50ac04f 100644 --- a/i18n/ptb/extensions/git/package.i18n.json +++ b/i18n/ptb/extensions/git/package.i18n.json @@ -33,8 +33,10 @@ "command.checkout": "Fazer checkout para...", "command.branch": "Criar Ramificação...", "command.deleteBranch": "Excluir Ramificação...", + "command.renameBranch": "Renomear o Branch", "command.merge": "Mesclar ramificação...", "command.createTag": "Criar Tag", + "command.fetch": "Buscar", "command.pull": "Efetuar pull", "command.pullRebase": "Efetuar pull (Rebase)", "command.pullFrom": "Fazer pull de...", @@ -42,9 +44,11 @@ "command.pushTo": "Enviar por push para...", "command.pushWithTags": "Mover com Tags", "command.sync": "Sincronizar", + "command.syncRebase": "Sincronização (Rebase)", "command.publish": "Publicar Ramo", "command.showOutput": "Mostrar Saída do Git", "command.ignore": "Adicionar arquivo ao .gitignore", + "command.stashIncludeUntracked": "Estoque (incluir não controlados)", "command.stash": "Esconder", "command.stashPop": "Pop Stash...", "command.stashPopLatest": "Pop mais recente Stash", @@ -57,6 +61,7 @@ "config.countBadge": "Controla o contador de distintivos do git. 'todos' considera todas as alterações. 'rastreado' considera apenas as alterações controladas. 'desligado' desliga o contador.", "config.checkoutType": "Controla quais tipos de ramos são listados quando executando `Checkout para... `. `todos` mostra todas as referências, `local` mostra apenas os ramos locais, `etiqueta` mostra apenas etiquetas e `remoto` mostra apenas os ramos remotos.", "config.ignoreLegacyWarning": "Ignora o aviso de Git legado", + "config.ignoreMissingGitWarning": "Ignora o aviso quando Git não existir.", "config.ignoreLimitWarning": "Ignora o aviso quando houver muitas alterações em um repositório", "config.defaultCloneDirectory": "O local padrão onde clonar um repositório git", "config.enableSmartCommit": "Confirme todas as alterações quando não há modificações planejadas.", diff --git a/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json b/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json index 314d1e5c58a..30700d15da1 100644 --- a/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json +++ b/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "htmlserver.name": "Servidor de Linguagem HTML" + "htmlserver.name": "Servidor de Linguagem HTML", + "folding.start": "Início da Região Expansível", + "folding.end": "Fim da Região Expansível" } \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/commands.i18n.json b/i18n/ptb/extensions/markdown/out/commands.i18n.json new file mode 100644 index 00000000000..2396a32ab23 --- /dev/null +++ b/i18n/ptb/extensions/markdown/out/commands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previewTitle": "Visualização {0}", + "onPreviewStyleLoadError": "Não foi possível carregar o 'markdown.styles': {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/ptb/extensions/markdown/out/features/previewContentProvider.i18n.json new file mode 100644 index 00000000000..b8fe23c6262 --- /dev/null +++ b/i18n/ptb/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "Algum conteúdo foi desativado neste documento", + "preview.securityMessage.title": "Conteúdo potencialmente inseguro foi desativado na visualização de remarcação. Altere a configuração de segurança de visualização do Markdown para permitir conteúdo inseguro ou habilitar scripts", + "preview.securityMessage.label": "Conteúdo do aviso de segurança desativado" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/security.i18n.json b/i18n/ptb/extensions/markdown/out/security.i18n.json index c0b18587a31..3d066b17ee3 100644 --- a/i18n/ptb/extensions/markdown/out/security.i18n.json +++ b/i18n/ptb/extensions/markdown/out/security.i18n.json @@ -11,5 +11,8 @@ "disable.title": "Desabilitar", "disable.description": "Permitir a execução de conteúdo e scripts. Não recomendado", "moreInfo.title": "Mais informações", + "enableSecurityWarning.title": "Habilitar a visualização de avisos de segurança neste espaço de trabalho", + "disableSecurityWarning.title": "Desabilitar a visualização de avisos de segurança neste espaço de trabalho", + "toggleSecurityWarning.description": "Não afeta o nível de segurança do conteúdo", "preview.showPreviewSecuritySelector.title": "Selecione as configurações de segurança para visualizações de Markdown neste espaço de trabalho" } \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/package.i18n.json b/i18n/ptb/extensions/merge-conflict/package.i18n.json index ad47caacee9..bef36d2bc57 100644 --- a/i18n/ptb/extensions/merge-conflict/package.i18n.json +++ b/i18n/ptb/extensions/merge-conflict/package.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "Conflito de Mesclagem", + "command.accept.all-current": "Aceitar Todos os Atuais", "command.accept.all-incoming": "Aceitar todas entradas", "command.accept.all-both": "Aceitar todas as duas", "command.accept.current": "Aceitar a corrente", diff --git a/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json index 861ace441d3..2da5a12a9ff 100644 --- a/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json +++ b/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "selectCodeAction": "Selecione uma ação de código para aplicar", "acquiringTypingsLabel": "Adquirindo digitações...", "acquiringTypingsDetail": "Adquirindo definições de digitações para o Intellisense.", "autoImportLabel": "Importação automática de {0}" diff --git a/i18n/ptb/extensions/typescript/package.i18n.json b/i18n/ptb/extensions/typescript/package.i18n.json index 0884bfdaa43..7ca623d773b 100644 --- a/i18n/ptb/extensions/typescript/package.i18n.json +++ b/i18n/ptb/extensions/typescript/package.i18n.json @@ -39,6 +39,7 @@ "typescript.openTsServerLog.title": "Abrir arquivo de log do servidor TS", "typescript.restartTsServer": "Reiniciar o servidor TS", "typescript.selectTypeScriptVersion.title": "Selecionar a versão do JavaScript", + "typescript.reportStyleChecksAsWarnings": "Relatório de verificações de estilo como avisos", "jsDocCompletion.enabled": "Habilitar/Desabilitar comentários JSDoc automáticos.", "javascript.implicitProjectConfig.checkJs": "Habilitar/desabilitar verificação semântica de arquivos JavaScript. Os arquivos existentes jsconfig.json ou tsconfig.json substituem essa configuração. Requer TypeScript > = 2.3.1.", "typescript.npm": "Especifica o caminho para o executável do NPM usado para Aquisição de Tipo Automático. Requer TypeScript > = 2.3.4.", diff --git a/i18n/ptb/src/vs/base/common/errorMessage.i18n.json b/i18n/ptb/src/vs/base/common/errorMessage.i18n.json index 257ffd9e14c..400654b9c38 100644 --- a/i18n/ptb/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/ptb/src/vs/base/common/errorMessage.i18n.json @@ -4,13 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "message": "{0}. Código de erro: {1}", - "error.permission.verbose": "Permissão Negada (HTTP {0})", - "error.permission": "Permissão Negada", - "error.http.verbose": "{0} (HTTP {1}: {2})", - "error.http": "{0} (HTTP {1})", - "error.connection.unknown.verbose": "Erro de Conexão Desconhecido ({0})", - "error.connection.unknown": "Ocorreu um erro de conexão desconhecido. Você não está mais conectado à Internet ou o servidor que você está conectado está offline.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "Ocorreu um erro desconhecido. Consulte o log para obter mais detalhes.", "nodeExceptionMessage": "Ocorreu um erro de sistema ({0})", diff --git a/i18n/ptb/src/vs/code/electron-main/main.i18n.json b/i18n/ptb/src/vs/code/electron-main/main.i18n.json new file mode 100644 index 00000000000..ed5f54197e5 --- /dev/null +++ b/i18n/ptb/src/vs/code/electron-main/main.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "secondInstanceNoResponse": "Outra instância de {0} está sendo executada, mas não está respondendo", + "secondInstanceNoResponseDetail": "Por favor, feche todas as outras instãncias e tente novamente.", + "secondInstanceAdmin": "Uma segunda instãncia de {0} já está sendo executada como administrador.", + "secondInstanceAdminDetail": "Por favor, feche a outra instãncia e tente novamente.", + "close": "&&Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/menus.i18n.json b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json index fa5680aff39..cf26e0d0a73 100644 --- a/i18n/ptb/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json @@ -22,12 +22,12 @@ "miQuit": "Sair de {0}", "miNewFile": "&&Novo Arquivo", "miOpen": "&&Abrir", - "miOpenWorkspace": "&&Abrir espaço de trabalho...", + "miOpenWorkspace": "Abrir &&Espaço de Trabalho...", "miOpenFolder": "Abrir &&Pasta", "miOpenFile": "&&Abrir Arquivo", "miOpenRecent": "Abrir &&Recente", - "miSaveWorkspaceAs": "&& Salvar o espaço de trabalho como...", - "miAddFolderToWorkspace": "&&Adicionar pasta para área de trabalho...", + "miSaveWorkspaceAs": "Salvar Espaço de Trabalho Como...", + "miAddFolderToWorkspace": "A&&dicionar Pasta para o Espaço de Trabalho...", "miSave": "&&Salvar", "miSaveAs": "Salvar &&Como...", "miSaveAll": "Salvar &&Tudo", @@ -157,7 +157,7 @@ "mMergeAllWindows": "Mesclar todas as janelas", "miToggleDevTools": "&&Alternar Ferramentas do Desenvolvedor", "miAccessibilityOptions": "&&Opções de Acessibilidade", - "miReportIssues": "Relatar &&Problemas", + "miReportIssue": "Reportar &&Problema", "miWelcome": "&&Bem-vindo", "miInteractivePlayground": "Playground &&Interativo", "miDocumentation": "&&Documentação", @@ -184,6 +184,7 @@ "miDownloadingUpdate": "Baixando Atualização...", "miInstallingUpdate": "Instalando Atualização...", "miCheckForUpdates": "Verificar Atualizações...", - "aboutDetail": "\nVersão {0}\nConfirmação {1}\nData {2}\nShell {3}\nRenderizador {4}\nNó {5}\nArquitetura {6}", - "okButton": "OK" + "aboutDetail": "Versão {0}\nConfirmação {1}\nData {2}\nShell {3}\nRenderizador {4}\nNó {5}\nArquitetura {6}", + "okButton": "OK", + "copy": "&&Copiar" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/browser/services/bulkEdit.i18n.json b/i18n/ptb/src/vs/editor/browser/services/bulkEdit.i18n.json new file mode 100644 index 00000000000..3fada6ebf53 --- /dev/null +++ b/i18n/ptb/src/vs/editor/browser/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "Estes arquivos foram alterados nesse meio tempo: {0}", + "summary.0": "Não foram feitas edições", + "summary.nm": "Feitas {0} edições de texto em {1} arquivos", + "summary.n0": "Feitas {0} edições de texto em um arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json index 52d56cf1cda..db6da099ec4 100644 --- a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,10 +10,14 @@ "fontSize": "Controla o tamanho da fonte em pixels.", "lineHeight": "Controla a altura da linha. Use 0 para computar a altura da linha a partir do tamanho da fonte.", "letterSpacing": "Controla o espaçamento da letra em pixels.", - "lineNumbers": "Controla a exibição de números de linha. Valores possíveis são 'on', 'off' e 'relative'. 'relative' mostra a contagem de linhas a partir da posição atual do cursor.", + "lineNumbers.off": "Números de linhas não são renderizados.", + "lineNumbers.on": "Números de linhas são renderizados em números absolutos.", + "lineNumbers.relative": "Números de linhas são renderizadas como distância em linhas até a posição do cursor.", + "lineNumbers.interval": "Números de linhas são renderizados a cada 10 linhas.", + "lineNumbers": "Controla a exibição dos números de linha. Os valores possíveis são 'on', 'off' e 'relative'.", "rulers": "Renderiza réguas verticais após um certo número de caracteres de espaço. Use vários valores para várias réguas. Réguas não serão desenhadas se a matriz estiver vazia", "wordSeparators": "Caracteres que serão usados como separadores de palavras ao fazer navegação relacionada a palavras ou operações", - "tabSize": "O número de espaços equivalentes a uma tabulação. Esta configuração é sobreposta no conteúdo do arquivo quando `editor.detectIndentation` está ligado.", + "tabSize": "O número de espaços equivalentes a uma tabulação. Esta configuração é sobreposta com base no conteúdo do arquivo quando `editor.detectIndentation` está ligado.", "tabSize.errorMessage": "Esperado 'número'. Note que o valor \"auto\" foi alterado pela configuração 'editor.detectIndentation'.", "insertSpaces": "Insere espaços quanto pressionado Tab. Esta configuração é sobrescrita com base no conteúdo do arquivo quando 'editor.detectIndentation' está habilitado.", "insertSpaces.errorMessage": "Esperado 'booleano'. Note que o valor \"auto\" foi alterado pela configuração 'editor.detectIndentation'.", @@ -89,8 +93,8 @@ "links": "Controla se o editor deve detectar links e torná-los clicáveis", "colorDecorators": "Controla se o editor deve processar os decoradores de cor inline e o seletor de cores.", "codeActions": "Habilita a ação de código lightbulb", + "selectionClipboard": "Controla se a área primária de transferência Linux deve ser suportada.", "sideBySide": "Controla se o editor de diff mostra as diff lado a lado ou inline.", "ignoreTrimWhitespace": "Controla se o editor de diff mostra alterações nos espaços iniciais ou finais como diferenças", - "renderIndicators": "Controla se o editor de diff mostra indicadores +/- para alterações adicionadas/removidas", - "selectionClipboard": "Controla se a área primária de transferência Linux deve ser suportada." + "renderIndicators": "Controla se o editor de diff mostra indicadores +/- para alterações adicionadas/removidas" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/ptb/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json new file mode 100644 index 00000000000..4af1753636d --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Ir para colchete" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json b/i18n/ptb/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json new file mode 100644 index 00000000000..157105c4a35 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "Mover cursor para a esquerda", + "caret.moveRight": "Mover cursor para a direita" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/caretOperations/transpose.i18n.json b/i18n/ptb/src/vs/editor/contrib/caretOperations/transpose.i18n.json new file mode 100644 index 00000000000..c1d3083b198 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/caretOperations/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Transport letras" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/clipboard/clipboard.i18n.json b/i18n/ptb/src/vs/editor/contrib/clipboard/clipboard.i18n.json new file mode 100644 index 00000000000..903f9fc1086 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/clipboard/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Recortar", + "actions.clipboard.copyLabel": "Copiar", + "actions.clipboard.pasteLabel": "Colar", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Copiar com realce de sintaxe" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/comment/comment.i18n.json b/i18n/ptb/src/vs/editor/contrib/comment/comment.i18n.json new file mode 100644 index 00000000000..ff1ba569c0c --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/comment/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Alternar Comentário de Linha", + "comment.line.add": "Adicionar Comentário de Linha", + "comment.line.remove": "Remover Comentário de Linha", + "comment.block": "Alternar Comentário de Bloco" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json b/i18n/ptb/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json new file mode 100644 index 00000000000..e2b1d946bee --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Mostrar o menu de contexto do editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/find/findController.i18n.json b/i18n/ptb/src/vs/editor/contrib/find/findController.i18n.json new file mode 100644 index 00000000000..ce656c20f36 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/find/findController.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Localizar", + "findNextMatchAction": "Localizar Próximo", + "findPreviousMatchAction": "Localizar anterior", + "nextSelectionMatchFindAction": "Localizar Próxima Seleção", + "previousSelectionMatchFindAction": "Localizar Seleção Anterior", + "startReplace": "Substituir", + "showNextFindTermAction": "Mostrar Próximo Termo de Busca", + "showPreviousFindTermAction": "Mostrar Termo de Busca Anterior" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/find/findWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/find/findWidget.i18n.json new file mode 100644 index 00000000000..1f4f15c5562 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/find/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Localizar", + "placeholder.find": "Localizar", + "label.previousMatchButton": "Correspondência anterior", + "label.nextMatchButton": "Próxima correspondência", + "label.toggleSelectionFind": "Localizar na seleção", + "label.closeButton": "Fechar", + "label.replace": "Substituir", + "placeholder.replace": "Substituir", + "label.replaceButton": "Substituir", + "label.replaceAllButton": "Substituir Tudo", + "label.toggleReplaceButton": "Ativar/desativar modo Substituir", + "title.matchesCountLimit": "Apenas os primeiros {0} resultados serão destacados, mas todas as operações de busca funcionam em todo o texto.", + "label.matchesLocation": "{0} de {1}", + "label.noResults": "Nenhum resultado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/find/simpleFindWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/find/simpleFindWidget.i18n.json new file mode 100644 index 00000000000..9172767f770 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/find/simpleFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Localizar", + "placeholder.find": "Localizar", + "label.previousMatchButton": "Correspondência anterior", + "label.nextMatchButton": "Próxima correspondência", + "label.closeButton": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/ptb/src/vs/editor/contrib/folding/folding.i18n.json new file mode 100644 index 00000000000..eb3341e2a4d --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/folding/folding.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Abrir", + "unFoldRecursivelyAction.label": "Abrir recursivamente", + "foldAction.label": "Colapsar", + "foldRecursivelyAction.label": "Colapsar recursivamente", + "foldAllBlockComments.label": "Fechar Todos os Comentários de Bloco", + "foldAllAction.label": "Colapsar tudo", + "unfoldAllAction.label": "Abrir tudo", + "foldLevelAction.label": "Nível de colapsamento {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/format/formatActions.i18n.json b/i18n/ptb/src/vs/editor/contrib/format/formatActions.i18n.json new file mode 100644 index 00000000000..71cbf2723a6 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/format/formatActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "1 edição de formatação feita na linha {0}", + "hintn1": "{0} edições de formatação feitas na linha {1}", + "hint1n": "Feita 1 edição de formatação entre as linhas {0} e {1}", + "hintnn": "Feitas {0} edições de formatação entre as linhas {1} e {2}", + "no.provider": "Desculpe-nos, mas não há formatador instalado para '{0}'-arquivos.", + "formatDocument.label": "Formatar Documento", + "formatSelection.label": "Formatar Seleção" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json new file mode 100644 index 00000000000..01753366bca --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Não foi encontrada definição para '{0}'", + "generic.noResults": "Nenhuma definição encontrada", + "meta.title": "- {0} definições", + "actions.goToDecl.label": "Ir para Definição", + "actions.goToDeclToSide.label": "Abrir definição ao lado", + "actions.previewDecl.label": "Inspecionar definição", + "goToImplementation.noResultWord": "Nenhuma implementação encontrada para '{0}'", + "goToImplementation.generic.noResults": "Nenhuma implementação encontrada", + "meta.implementations.title": "– {0} implementações", + "actions.goToImplementation.label": "Ir para a implementação", + "actions.peekImplementation.label": "Inspecionar implementação", + "goToTypeDefinition.noResultWord": "Nenhuma definição encontrada para '{0}'", + "goToTypeDefinition.generic.noResults": "Nenhuma definição de tipo encontrada", + "meta.typeDefinitions.title": "– {0} definições de tipos", + "actions.goToTypeDefinition.label": "Ir para a definição de tipo", + "actions.peekTypeDefinition.label": "Inspecionar definição de tipo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json new file mode 100644 index 00000000000..675cbe29ae1 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Clique para mostrar {0} definições." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/gotoError/gotoError.i18n.json b/i18n/ptb/src/vs/editor/contrib/gotoError/gotoError.i18n.json new file mode 100644 index 00000000000..d05aeee6c34 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/gotoError/gotoError.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Ir para o Próximo Erro ou Aviso", + "markerAction.previous.label": "Ir para o Erro ou Aviso Anterior", + "editorMarkerNavigationError": "Ferramenta de marcação de edição apresentando error na cor ", + "editorMarkerNavigationWarning": "Ferramenta de marcação de edição apresentando adventência na cor", + "editorMarkerNavigationInfo": "Cor de informação da ferramenta de navegação do marcador do editor.", + "editorMarkerNavigationBackground": "Cor de fundo da ferramenta de marcação de navegação do editor." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/hover/hover.i18n.json b/i18n/ptb/src/vs/editor/contrib/hover/hover.i18n.json new file mode 100644 index 00000000000..196a8fb2bb0 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/hover/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Mostrar Item Flutuante" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/hover/modesContentHover.i18n.json b/i18n/ptb/src/vs/editor/contrib/hover/modesContentHover.i18n.json new file mode 100644 index 00000000000..2c74cf6f1ec --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/hover/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json b/i18n/ptb/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json new file mode 100644 index 00000000000..fbbfbd02161 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Substituir pelo valor anterior", + "InPlaceReplaceAction.next.label": "Substituir pelo próximo valor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/indentation/indentation.i18n.json b/i18n/ptb/src/vs/editor/contrib/indentation/indentation.i18n.json new file mode 100644 index 00000000000..8edeaaf8104 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/indentation/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Converter indentação em espaços.", + "indentationToTabs": "Coverter Indentação a Tabulações.", + "configuredTabSize": "Tamanho de Tabulação Configurado", + "selectTabWidth": "Selecione o Tamanho de Tabulação para o Arquivo Atual", + "indentUsingTabs": "Indentar Usando Tabulações", + "indentUsingSpaces": "Indentar Usando Espaços", + "detectIndentation": "Detectar Indentação a Partir do Conteúdo", + "editor.reindentlines": "Reindentar Linhas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json b/i18n/ptb/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json new file mode 100644 index 00000000000..8a368ab368d --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Copiar linha acima", + "lines.copyDown": "Copiar linha abaixo", + "lines.moveUp": "Mover linha para cima", + "lines.moveDown": "Mover linha para baixo", + "lines.sortAscending": "Classificar Linhas Ascendentemente", + "lines.sortDescending": "Classificar Linhas Descendentemente", + "lines.trimTrailingWhitespace": "Cortar Espaço em Branco à Direita", + "lines.delete": "Excluir linha", + "lines.indent": "Recuar linha", + "lines.outdent": "Recuar linha para a esquerda", + "lines.insertBefore": "Inserir linha acima", + "lines.insertAfter": "Inserir linha abaixo", + "lines.deleteAllLeft": "Excluir tudo à Esquerda", + "lines.deleteAllRight": "Excluir Tudo à Direita", + "lines.joinLines": "Unir Linhas", + "editor.transpose": "Transpor caracteres ao redor do cursor", + "editor.transformToUppercase": "Transformar para maiúsculas", + "editor.transformToLowercase": "Transformar para minúsculas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/links/links.i18n.json b/i18n/ptb/src/vs/editor/contrib/links/links.i18n.json new file mode 100644 index 00000000000..d37606739d8 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/links/links.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Cmd + clique para seguir o link", + "links.navigate": "Ctrl + clique para seguir o link", + "links.command.mac": "Cmd + clique para executar o comando", + "links.command": "Ctrl + clique para executar o comando", + "links.navigate.al": "Alt + clique para seguir o link", + "links.command.al": "Alt + clique para executar o comando", + "invalid.url": "Desculpe, falha ao abrir este link porque ele não está bem formatado: {0}", + "missing.url": "Desculpe, falha ao abrir este link porque seu destino está faltando.", + "label": "Abrir link" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/multicursor/multicursor.i18n.json b/i18n/ptb/src/vs/editor/contrib/multicursor/multicursor.i18n.json new file mode 100644 index 00000000000..790c737c8eb --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/multicursor/multicursor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Inserir cursor acima", + "mutlicursor.insertBelow": "Inserir cursor abaixo", + "mutlicursor.insertAtEndOfEachLineSelected": "Adicionar Cursores ao Final das Linhas", + "addSelectionToNextFindMatch": "Adicionar Seleção ao Próximo Localizar Correspondência", + "addSelectionToPreviousFindMatch": "Adicionar Seleção à Correspondência de Localização Anterior", + "moveSelectionToNextFindMatch": "Mover Última Seleção para Próximo Localizar Correspondência", + "moveSelectionToPreviousFindMatch": "Mover Última Seleção para Correspondência de Localização Anterior", + "selectAllOccurrencesOfFindMatch": "Selecionar Todas as Ocorrências de Localizar Correspondência", + "changeAll.label": "Alterar todas as ocorrências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json b/i18n/ptb/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json new file mode 100644 index 00000000000..f0450d3f4de --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Dicas de parâmetro de gatilho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json new file mode 100644 index 00000000000..0f8237adbb3 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, dica" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/ptb/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json new file mode 100644 index 00000000000..01ae8d7aff8 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Mostrar correções ({0})", + "quickFix": "Mostrar correções", + "quickfix.trigger.label": "Correção Rápida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json new file mode 100644 index 00000000000..41ad7313b7d --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json new file mode 100644 index 00000000000..9d557535df6 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": "- {0} referências", + "references.action.label": "Localizar Todas as Referências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json new file mode 100644 index 00000000000..65217d2ace8 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json new file mode 100644 index 00000000000..2e25322d32c --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "símbolo em {0} na linha {1} e coluna {2}", + "aria.fileReferences.1": "1 símbolo em {0}, caminho completo {1}", + "aria.fileReferences.N": "{0} símbolos em {1}, caminho completo {2}", + "aria.result.0": "Nenhum resultado encontrado", + "aria.result.1": "Encontrado 1 símbolo em {0}", + "aria.result.n1": "Encontrados {0} símbolos em {1}", + "aria.result.nm": "Encontrados {0} símbolos em {1} arquivos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json new file mode 100644 index 00000000000..72f61eeaf83 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Falha ao resolver arquivo.", + "referencesCount": "{0} referências", + "referenceCount": "{0} referência", + "missingPreviewMessage": "nenhuma visualização disponível", + "treeAriaLabel": "Referências", + "noResults": "Nenhum resultado", + "peekView.alternateTitle": "Referências", + "peekViewTitleBackground": "Cor de fundo da área de visualização do título.", + "peekViewTitleForeground": "Cor de visualização do título.", + "peekViewTitleInfoForeground": "Cor da visualização de informações do título.", + "peekViewBorder": "Cor das bordas e seta da área de visualização", + "peekViewResultsBackground": "Cor de fundo da área de visualização da lista de resultados.", + "peekViewResultsMatchForeground": "Cor de primeiro plano para nós de linha na lista de resultados visualizados.", + "peekViewResultsFileForeground": "Cor de primeiro plano para nós de arquivos na lista de resultados visualizados.", + "peekViewResultsSelectionBackground": "Cor de fundo da entrada selecionada na visualização da lista de resultados.", + "peekViewResultsSelectionForeground": "Cor da entrada selecionada na visualização da lista de resultados.", + "peekViewEditorBackground": "Cor de fundo da visualização do editor.", + "peekViewEditorGutterBackground": "Cor de fundo da separação na visualização rápida do editor.", + "peekViewResultsMatchHighlight": "Corresponder cor de realce com visualização da lista de resultados.", + "peekViewEditorMatchHighlight": "Corresponder cor de realce com visualização do editor." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/rename/rename.i18n.json b/i18n/ptb/src/vs/editor/contrib/rename/rename.i18n.json new file mode 100644 index 00000000000..a56535f6241 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/rename/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Nenhum resultado.", + "aria": "Renomeado '{0}' para '{1}'com sucesso. Resumo: {2}", + "rename.failed": "Desculpe, falha na execução de renomear.", + "rename.label": "Renomear Símbolo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/rename/renameInputField.i18n.json b/i18n/ptb/src/vs/editor/contrib/rename/renameInputField.i18n.json new file mode 100644 index 00000000000..49eba92fa44 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/rename/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Renomear entrada. Digite o novo nome e tecle Enter para gravar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json b/i18n/ptb/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json new file mode 100644 index 00000000000..89319f9a266 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Expandir seleção", + "smartSelect.shrink": "Reduzir seleção" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/suggest/suggestController.i18n.json b/i18n/ptb/src/vs/editor/contrib/suggest/suggestController.i18n.json new file mode 100644 index 00000000000..b064152c8be --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/suggest/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "Ao aceitar '{0}' foi inserido o seguinte texto: {1}", + "suggest.trigger.label": "Sugestão de gatilho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/suggest/suggestWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/suggest/suggestWidget.i18n.json new file mode 100644 index 00000000000..c9da4793d67 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/suggest/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "Cor de fundo para a ferramenta de sugestão.", + "editorSuggestWidgetBorder": "Cor da borda para a ferramenta de sugestão.", + "editorSuggestWidgetForeground": "Cor de primeiro plano para a ferramenta de sugestão.", + "editorSuggestWidgetSelectedBackground": "Cor de fundo da entrada selecionada da ferramenta de sugestões.", + "editorSuggestWidgetHighlightForeground": "Cor de realce da correspondência na ferramenta de sugestão.", + "readMore": "Ler Mais...{0}", + "suggestionWithDetailsAriaLabel": "{0}, sugestão, tem detalhes", + "suggestionAriaLabel": "{0}, sugestão", + "readLess": "Ler menos... {0}", + "suggestWidget.loading": "Carregando...", + "suggestWidget.noSuggestions": "Nenhuma sugestão.", + "suggestionAriaAccepted": "{0}, aceito", + "ariaCurrentSuggestionWithDetails": "{0}, sugestão, tem detalhes", + "ariaCurrentSuggestion": "{0}, sugestão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json b/i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json new file mode 100644 index 00000000000..0f3dd068095 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Alterne o uso da tecla Tab para mover o foco" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json b/i18n/ptb/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json new file mode 100644 index 00000000000..6ccc873b02c --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Cor de fundo de um símbolo durante acesso de leitura, como ao ler uma variável.", + "wordHighlightStrong": "Cor de fundo de um símbolo durante acesso de escrita, como ao escrever uma variável.", + "overviewRulerWordHighlightForeground": "Visão geral da cor do marcador da régua para destaques de símbolos.", + "overviewRulerWordHighlightStrongForeground": "Visão geral da cor do marcador da régua para gravação de destaques de símbolos.", + "wordHighlight.next.label": "Ir para o próximo símbolo em destaque", + "wordHighlight.previous.label": "Ir para o símbolo de destaque anterior" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json b/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json index 0aa4f21b3dd..eb886a026f7 100644 --- a/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json @@ -12,6 +12,8 @@ "newWindow": "Força uma nova instância do Código.", "performance": "Comece com o 'Desenvolvedor: Desempenho de inicialização' comando habilitado.", "prof-startup": "Rodar o CPU profiler durante a inicialização", + "inspect-extensions": "Permite depuração e criação de perfis de extensões. Verifique as ferramentas de desenvolvimento para a conexão uri.", + "inspect-brk-extensions": "Permitir depuração e criação de perfil de extensões com o host de extensão em pausa após o início. Verifique as ferramentas do desenvolvedor para a conexão uri.", "reuseWindow": "Forçar a abertura de um arquivo ou pasta na última janela ativa", "userDataDir": "Especifica o diretório que os dados do usuário serão mantidos, útil quando estiver rodando como root.", "verbose": "Imprimir a saída detalhada (Implica -- esperar).", @@ -24,6 +26,7 @@ "experimentalApis": "Permite recursos de api propostos para uma extensão.", "disableExtensions": "Desabilita todas as extensões instaladas.", "disableGPU": "Desabilita aceleração de hardware da GPU.", + "status": "Utilização do processo de impressão e informações de diagnóstico.", "version": "Versão de impressão", "help": "Uso de impressão.", "usage": "Uso", diff --git a/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index 76dc4cf48f3..4d844ce5278 100644 --- a/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "notFound": "Extensão não encontrada", - "noCompatible": "Não foi possível econtrar uma versão de {0} com esta versão do Code." + "notCompatibleDownload": "Não foi possível baixar porque a extensão compatível com a versão atual '{0}' do VS Code não foi encontrada." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index e90957df5d7..98c0be5cdcb 100644 --- a/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,11 +6,16 @@ { "invalidManifest": "Extensão inválida: pacote.json nao é um arquivo JSON válido", "restartCodeLocal": "Por favor reinicie Code antes de reinstalar {0}.", - "restartCodeGallery": "Por favor reinicie o Code antes de reinstalar.", + "installingOutdatedExtension": "Uma nova versão desta extensão já está instalada. Você deseja sobrescrever esta instalação com a versão mais antiga?", + "override": "Sobrescrever", + "cancel": "Cancelar", + "notFoundCompatible": "Não foi possível instalar porque a extensão '{0}' compatível com a versão atual '{1}' do VS Code não foi encontrada.", + "quitCode": "Não foi possível instalar porque uma instância obsoleta da extensão ainda está em execução. Por favor, pare e inicie o VS Code antes de reinstalar.", + "exitCode": "Não foi possível instalar porque uma instância obsoleta da extensão ainda está em execução. Por favor, pare e inicie o VS Code antes de reinstalar.", + "notFoundCompatibleDependency": "Não foi possível instalar porque a extensão dependente '{0}' compatível com a versão atual '{1}' do VS Code não foi encontrada.", "uninstallDependeciesConfirmation": "Gostaria de desinstalar '{0}' somente, ou suas dependências também?", "uninstallOnly": "Apenas", "uninstallAll": "Todos", - "cancel": "Cancelar", "uninstallConfirmation": "Tem certeza que deseja desinstalar '{0}'?", "ok": "OK", "singleDependentError": "Não foi possível desinstalar a extensão '{0}'. A extensão '{1}' depende dela.", diff --git a/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 3f6e49c05ce..4b66b9a4cb6 100644 --- a/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -17,6 +17,8 @@ "vscode.extension.activationEvents.onLanguage": "Um evento de ativação emitido sempre que um arquivo que resolve para a linguagem especificada é aberto.", "vscode.extension.activationEvents.onCommand": "Um evento de ativação emitido sempre que o comando especificado for invocado.", "vscode.extension.activationEvents.onDebug": "Um evento de ativação emitido sempre que um usuário está prestes a iniciar a depuração ou a definir as configurações de depuração.", + "vscode.extension.activationEvents.onDebugInitialConfigurations": "Um evento de ativação é emitido sempre que um \"launch.json\" precisa ser criado (e todos os métodos provideDebugConfigurations precisam ser chamados).", + "vscode.extension.activationEvents.onDebugResolve": "Um evento de ativação emitido quando uma sessão de debug com um tipo específico está para ser iniciada (e um método resolveDebugConfiguration correspondente precisa ser chamado).", "vscode.extension.activationEvents.workspaceContains": "Um evento de ativação emitido quando uma pasta que contém pelo menos um arquivo correspondente ao padrão global especificado é aberta.", "vscode.extension.activationEvents.onView": "Um evento de ativação emitido sempre que o modo de visualização especificado é expandido.", "vscode.extension.activationEvents.star": "Um evento de ativação emitido na inicialização do VS Code. Para garantir uma ótima experiência de usuário, por favor, use este evento de ativação em sua extensão somente quando nenhuma outra combinação de eventos de ativação funcionar em seu caso de uso.", diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json new file mode 100644 index 00000000000..fb0582dbfe9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleTabs": "Alternar Visibilidade da Aba", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json index d64f23c4102..74ea809120e 100644 --- a/i18n/ptb/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "largeNumberBadge": "+ de 10k", "badgeTitle": "{0} - {1}", "additionalViews": "Visualizações Adicionais", "numberBadge": "{0} ({1})", diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 7c10c0e60fd..5035a541040 100644 --- a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -33,6 +33,7 @@ "openPreviousEditor": "Abrir editor anterior", "nextEditorInGroup": "Abrir próximo editor no grupo", "openPreviousEditorInGroup": "Abrir editor anterior no grupo", + "lastEditorInGroup": "Abrir Último Editor do Grupo", "navigateNext": "Avançar", "navigatePrevious": "Voltar", "navigateLast": "Ir para o último", diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index f42c45c02f5..4b701929e85 100644 --- a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,7 +6,7 @@ { "editorCommand.activeEditorMove.description": "Mover o editor ativo por guias ou grupos", "editorCommand.activeEditorMove.arg.name": "Argumento de movimento do editor ativo", - "editorCommand.activeEditorMove.arg.description": "Propriedades do argumento: \n\t\t\t\t\t\t- 'para': sequência de valor fornecendo para onde mover.\n\t\t\t\t\t\t- 'por': sequência de valor, fornecendo a unidade para o movimento. Por guia ou por grupo.\n\t\t\t\t\t\t- 'valor': valor numérico, fornecendo quantas posições ou uma posição absoluta para mover.\n\t\t\t\t\t", + "editorCommand.activeEditorMove.arg.description": "Propriedades do argumento:\n* 'to': Valor do tipo sequencia de caracteres fornecendo onde se mover.\n\t* 'by': sequência de valor, proporcionando a unidade para o movimento. Por guia ou por grupo.\n\t* 'value': valor numérico, fornecendo quantas posições ou uma posição absoluta para mover.", "commandDeprecated": "Comando **{0}** foi removido. Você pode usar **{1}** em vez disso", "openKeybindings": "Configurar os atalhos de teclado" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index fd2c0fd6d01..3d74847e2ab 100644 --- a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -53,5 +53,5 @@ "screenReaderDetectedExplanation.answerYes": "Sim", "screenReaderDetectedExplanation.answerNo": "Não", "screenReaderDetectedExplanation.body1": "O VS Code agora está otimizado para uso com um leitor de tela.", - "screenReaderDetectedExplanation.body2": "Alguns recursos do editor terão comportamento diferente: por exemplo, a palavra envoltura, dobradura, auto fechamento de colchetes, etc." + "screenReaderDetectedExplanation.body2": "Alguns recursos do editor terão comportamento diferente: por exemplo, quebra de linha, cruzamento, etc." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json b/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json index 098ead453d8..cacc3f119b7 100644 --- a/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "noResultsMatching": "Nenhum resultado encontrado", - "noResultsFound2": "Nenhum resultado encontrado", - "entryAriaLabel": "{0}, comando" + "noResultsFound2": "Nenhum resultado encontrado" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json index ac9c586bc14..04de1ce8cef 100644 --- a/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json @@ -30,7 +30,7 @@ "openRecent": "Abrir Recente...", "quickOpenRecent": "Abertura Rápida de Recente...", "closeMessages": "Fechar mensagens de notificação", - "reportIssues": "Reportar Problemas", + "reportIssueInEnglish": "Reportar Problema", "reportPerformanceIssue": "Reportar Problema de Desempenho", "keybindingsReference": "Referência de Atalhos de Teclado", "openDocumentationUrl": "Documentação", @@ -47,5 +47,25 @@ "showNextWindowTab": "Mostrar guia da próxima janela", "moveWindowTabToNewWindow": "Mover a guia da janela para a nova janela", "mergeAllWindowTabs": "Mesclar todas as janelas", - "toggleWindowTabsBar": "Alternar a Barra de Guias da Janela" + "toggleWindowTabsBar": "Alternar a Barra de Guias da Janela", + "configureLocale": "Configurar Idioma", + "displayLanguage": "Define o idioma de exibição do VSCode.", + "doc": "Veja {0} para obter uma lista dos idiomas suportados.", + "restart": "Modificar o valor requer reinicialização do VSCode.", + "fail.createSettings": "Não foi possível criar '{0}' ({1}).", + "openLogsFolder": "Abrir Pasta de Logs", + "showLogs": "Exibir Logs...", + "mainProcess": "Principal", + "sharedProcess": "Compartilhado", + "rendererProcess": "Renderizador", + "extensionHost": "Host de Extensão", + "selectProcess": "Selecionar processo", + "setLogLevel": "Definir Nível de Log", + "trace": "Rastreamento", + "debug": "Depurar", + "info": "Informações", + "warn": "Aviso", + "err": "Erro", + "critical": "Crítico", + "off": "Desligado" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json index 797652bab42..06f44d416ff 100644 --- a/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,8 +7,8 @@ "view": "Exibir", "help": "Ajuda", "file": "Arquivo", - "workspaces": "Espaços de trabalho", "developer": "Desenvolvedor", + "workspaces": "Espaços de trabalho", "showEditorTabs": "Controla se os editores abertos devem ou não serem exibidos em abas.", "workbench.editor.labelFormat.default": "Mostra o nome do arquivo. Quando guias estiverem ativadas e dois arquivos em um grupo tiverem o mesmo nome, a seção de distinção para cada caminho de arquivo é adicionada. Quando guias estiverem desativadas, o caminho relativo para a pasta do espaço de trabalho é exibida se o editor estiver ativo.", "workbench.editor.labelFormat.short": "Mostrar o nome do arquivo seguido pelo nome do diretório.", @@ -16,6 +16,7 @@ "workbench.editor.labelFormat.long": "Mostrar o nome do arquivo seguido pelo seu caminho absoluto.", "tabDescription": "Controla o formato do rótulo para um editor. Alterar essa configuração pode por exemplo tornar mais fácil entender a localização de um arquivo:\n- curto: 'parent'\n- médio: 'workspace/src/parent'\n- longa: '/ home/user/workspace/src/parent'\n- padrão: '... /parent, quando outra guia compartilha o mesmo título, ou o caminho relativo do espaço de trabalho se as guias estão desabilitadas", "editorTabCloseButton": "Controla a posição dos botões de fechar das abas do editor ou os desabilita quando configurados para 'desligado'.", + "tabSizing": "Controla o tamanho das guias do editor. Configure para 'fit' para manter as guias sempre com o tamanho suficiente para mostrar o rótulo do editor completo. Configure para 'shrink' para permitir que as guias sejam menores quando o espaço disponível não seja suficiente para mostrar todas as guias juntas.", "showIcons": "Controla se os editores abertos devem ou não ser exibidos com um ícone. Requer um tema de ícone para ser habilitado. ", "enablePreview": "Controla se editores abertos mostram uma visualização. Editores de visualização são reutilizados até que eles sejam mantidos (por exemplo, através do duplo clique ou edição) e aparecerem com um estilo de fonte em itálico.", "enablePreviewFromQuickOpen": "Controla se os editores abertos da Abertura Rápida são exibidos como visualização. Os editores de visualização são reutilizados até serem preservados (por exemplo, através de um duplo clique ou edição).", @@ -26,18 +27,17 @@ "closeOnFocusLost": "Controla se Abertura Rápida deve fechar automaticamente caso perca o foco.", "openDefaultSettings": "Controla se a abertura de configurações também abre um editor mostrando todas as configurações padrão.", "sideBarLocation": "Controla a localização da barra lateral. Ele pode ser exibido à esquerda ou à direita da área de trabalho.", - "panelLocation": "Painle de controle de localização. Pode também ser visualizado na parte inferior ou a direita da área de trabalho.", "statusBarVisibility": "Controla a visibilidade da barra de status na parte inferior da área de trabalho.", "activityBarVisibility": "Controla a visibilidade da barra de atividades na área de trabalho.", "closeOnFileDelete": "Controla se os editores que mostram um arquivo devem fechar automaticamente quanto o arquivo é apagado ou renomeado por algum outro processo. Desativar isso manterá o editor aberto como sujo neste evento. Note que apagar do aplicativo sempre fechará o editor e os arquivos sujos nunca fecharão para preservar seus dados.", - "experimentalFuzzySearchEndpoint": "Indica o ponto de extremidade usar para a busca de definições experimental.", - "experimentalFuzzySearchKey": "Indica a chave a ser usada para a busca experimental de configurações.", + "enableNaturalLanguageSettingsSearch": "Controla se deve habilitar o modo de busca de linguagem natural para as configurações.", "fontAliasing": "Controla o método de identificação de fonte no espaço de trabalho.\n- padrão: Suavização de fonte subpixel. Na maioria dos monitores não-retina isto mostrará o texto mais nítido\n- antialiased: Suaviza a fonte no nível do pixel, em oposição a subpixel. Pode fazer a fonte aparecer mais clara de um modo geral \n- nenhum: Desabilita a suavização de fonte. Texto será mostrado com bordas irregulares", "workbench.fontAliasing.default": "Suavização de fonte subpixel. Na maioria dos monitores não-retina isto mostrará o texto mais nítido.", "workbench.fontAliasing.antialiased": "Suavizar a fonte no nível do pixel, em oposição a subpixel. Pode fazer com que a fonte apareça mais clara de uma forma geral.", "workbench.fontAliasing.none": "Desabilita a suavização de fonte. Texto será mostrado com bordas irregulares.", "swipeToNavigate": "Navegue entre arquivos abertos usando o deslizamento horizontal de três dedos.", "workbenchConfigurationTitle": "Ãrea de Trabalho", + "windowConfigurationTitle": "Janela", "window.openFilesInNewWindow.on": "Arquivos serão abertos em uma nova janela", "window.openFilesInNewWindow.off": "Arquivos serão abertos em uma nova janela com a pasta de arquivos aberta ou com a última janela ativa.", "window.openFilesInNewWindow.default": "Os arquivos serão abertos na janela com a pasta de arquivos aberta ou a última janela ativa, a menos que seja aberto através do dock ou do finder (somente macOS)", @@ -69,11 +69,11 @@ "autoDetectHighContrast": "Se habilitado, irá mudar automaticamente para o tema de alto contraste se o Windows estiver utilizando um tema de alto contraste, e para o tema escuro ao mudar de um tema de alto contraste do Windows.", "titleBarStyle": "Ajusta a aparência da barra de título da janela. As alterações exigem um reinício completo.", "window.nativeTabs": "Habilita as abas da janela do macOS Sierra. Note que as alterações exigem um reinício completo e que as abas nativas desabilitarão um estilo de barra de título customizado, se configurado.", - "windowConfigurationTitle": "Janela", "zenModeConfigurationTitle": "Modo Zen", "zenMode.fullScreen": "Controla se a ativação do modo Zen também coloca o espaço de trabalho em modo de tela cheia.", "zenMode.hideTabs": "Controla se a ativação do modo Zen também oculta as abas do espaço de trabalho.", "zenMode.hideStatusBar": "Controla se a ativação do modo Zen também oculta a barra de status no rodapé do espaço de trabalho.", "zenMode.hideActivityBar": "Controla se a ativação do modo Zen também oculta a barra de atividades à esquerda do espaço de trabalho.", - "zenMode.restore": "Controla se uma janela deve ser restaurada para o modo zen se ela foi finalizada no modo zen." + "zenMode.restore": "Controla se uma janela deve ser restaurada para o modo zen se ela foi finalizada no modo zen.", + "JsonSchema.locale": "O idioma da interface do usuário a ser usada." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 1bc052297a1..5e018e07d5f 100644 --- a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -30,7 +30,6 @@ "deactivateBreakpoints": "Desativar Pontos de Parada", "reapplyAllBreakpoints": "Reaplicar Todos os Pontos de Parada", "addFunctionBreakpoint": "Adicionar Ponto de Parada de Função", - "renameFunctionBreakpoint": "Renomeie o Ponto de Parada de Função", "addConditionalBreakpoint": "Adicionar Ponto de Parada Condicional...", "editConditionalBreakpoint": "Editar o Ponto de Parada...", "setValue": "Definir Valor", diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json new file mode 100644 index 00000000000..b263f4f0c2b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editConditionalBreakpoint": "Editar o Ponto de Parada...", + "functionBreakpointsNotSupported": "Pontos de parada de função não são suportados por este tipo de depuração", + "functionBreakpointPlaceholder": "Função de parada", + "functionBreakPointInputAriaLabel": "Digitar Ponto de Parada de Função" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json new file mode 100644 index 00000000000..2802e46ce44 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "callstackSection": "Seção de Pilha de Chamada", + "debugStopped": "Pausado em {0}", + "callStackAriaLabel": "Depurar a Pilha de Chamadas", + "process": "Processar", + "paused": "Em pausa", + "running": "Em execução", + "thread": "Thread", + "pausedOn": "Pausado em {0}", + "loadMoreStackFrames": "Carregar mais segmentos de pilha", + "threadAriaLabel": "Thread {0}, pilha de chamadas, depuração", + "stackFrameAriaLabel": "Segmento de Pilha {0} linha {1} {2}, pilha de chamadas, depuração" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index c13b5cafe99..b576d0807c8 100644 --- a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,5 +20,8 @@ "openExplorerOnEnd": "Automaticamente abre a visualização do explorador no final de uma sessão de depuração", "inlineValues": "Mostrar valores de variáveis em linha no editor durante a depuração", "hideActionBar": "Controlar se a barra de ação flutuante do depurador deve ser ocultada", + "never": "Nunca mostrar debug na barra de status", + "showInStatusBar": "Controla quando a barra de status de depuração deve ser visível", + "openDebug": "Controla se o depurador viewlet deve ser aberto no início de sessão de depuração.", "launch": "Configuração global do lançamento do depurador. Deve ser usado como uma alternativa para o arquivo 'launch.json' que é compartilhado entre os espaços de trabalho" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 8232f470b36..9d0ec3a464b 100644 --- a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,6 @@ "breakpointAdded": "Adicionado ponto de interrupção, linha {0}, arquivo {1}", "breakpointRemoved": "Ponto de interrupção removido, linha {0}, arquivo {1}", "compoundMustHaveConfigurations": "Composição deve ter o atributo \"configurations\" definido para iniciar várias configurações.", - "configMissing": "Configuração '{0}' não tem 'launch.json'.", "debugRequestNotSupported": "Atributo '{0}' tem um valor sem suporte '{1}' na configuração de depuração escolhida.", "debugRequesMissing": "Atributo '{0}' está faltando para a configuração de depuração escolhida.", "debugTypeNotSupported": "Tipo de depuração configurado '{0}' não é suportado.", diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json new file mode 100644 index 00000000000..3392c862aaa --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Seção de variáveis", + "variablesAriaTreeLabel": "Variáveis de Depuração", + "variableValueAriaLabel": "Digite o novo valor da variável", + "variableScopeAriaLabel": "Escopo {0}, variáveis, depuração", + "variableAriaLabel": "{0} valor {1}, variáveis, depuração" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json new file mode 100644 index 00000000000..70a43f8f1c8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expressionsSection": "Seção de Expressões", + "watchAriaTreeLabel": "Depurar Expressões Monitoradas", + "watchExpressionPlaceholder": "Expressão para monitorar", + "watchExpressionInputAriaLabel": "Digitar expressão a monitorar", + "watchExpressionAriaLabel": "{0} valor {1}, monitorar, depuração", + "watchVariableAriaLabel": "{0} valor {1}, monitorar, depuração" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index dfd7672ae26..f9a8f5b8629 100644 --- a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,9 +6,11 @@ { "name": "Nome da extensão", "extension id": "Identificador da extensão", + "preview": "Visualizar", "publisher": "Nome do editor", "install count": "Quantidade de Instalações", "rating": "Avaliação", + "repository": "Repositório", "license": "Licença", "details": "Detalhes", "contributions": "Contribuições", diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 3e15ba649f8..3899c295290 100644 --- a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -10,16 +10,12 @@ "Uninstalling": "Desinstalando", "updateAction": "Atualizar", "updateTo": "Atualizar para {0}", - "enableForWorkspaceAction.label": "Habilitar (Espaço de Trabalho)", - "enableAlwaysAction.label": "Habilitar (Sempre)", - "disableForWorkspaceAction.label": "Desabilitar (Espaço de Trabalho)", - "disableAlwaysAction.label": "Desabilitar (Sempre)", "ManageExtensionAction.uninstallingTooltip": "Desinstalando", - "enableForWorkspaceAction": "Espaço de trabalho", - "enableGloballyAction": "Sempre", + "enableForWorkspaceAction": "Habilitar (Espaço de Trabalho)", + "enableGloballyAction": "Habilitar", "enableAction": "Habilitar", - "disableForWorkspaceAction": "Espaço de trabalho", - "disableGloballyAction": "Sempre", + "disableForWorkspaceAction": "Desabilitar (Espaço de Trabalho)", + "disableGloballyAction": "Desabilitar", "disableAction": "Desabilitar", "checkForUpdates": "Verificar Atualizações", "enableAutoUpdate": "Habilitar Extensões Auto-Atualizáveis", @@ -47,11 +43,8 @@ "allExtensionsInstalled": "Todas as extensões recomendadas para este espaço de trabalho já foram instaladas", "installRecommendedExtension": "Instalar a extensão recomendada", "extensionInstalled": "A extensão recomendada já foi instalada", - "showRecommendedKeymapExtensions": "Mostrar Mapeamentos de Teclado Recomendados", "showRecommendedKeymapExtensionsShort": "Mapeamentos de Teclado", - "showLanguageExtensions": "Mostrar Extensões de Linguagem", "showLanguageExtensionsShort": "Extensões de Linguagem", - "showAzureExtensions": "Mostrar extensões para o Azure", "showAzureExtensionsShort": "Extensões do Azure", "OpenExtensionsFile.failed": "Não foi possível criar o arquivo 'extensions.json' na pasta '.vscode' ({0}).", "configureWorkspaceRecommendedExtensions": "Configurar Extensões Recomendadas (Espaço de Trabalho)", diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json new file mode 100644 index 00000000000..d82c863fc27 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ratedByUsers": "Avaliado por {0} usuários" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json new file mode 100644 index 00000000000..7cc618600b3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectAndStartDebug": "Clique para parar a perfilação." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 76bf0379481..77e6de1fbbc 100644 --- a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -7,9 +7,10 @@ "extensionsCommands": "Gerenciar Extensões", "galleryExtensionsCommands": "Instalar Extensões da Galeria", "extension": "Extensão", + "runtimeExtension": "Extensões em Execução", "extensions": "Extensões", "view": "Exibir", + "developer": "Desenvolvedor", "extensionsConfigurationTitle": "Extensões", - "extensionsAutoUpdate": "Atualizar extensões automaticamente", - "extensionsIgnoreRecommendations": "Ignorar recomendações de extensão" + "extensionsAutoUpdate": "Atualizar extensões automaticamente" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json new file mode 100644 index 00000000000..bec798884ff --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "starActivation": "Ativado ao iniciar", + "workspaceContainsGlobActivation": "Ativado porque existe um arquivo {0} correspondente em seu espaço de trabalho", + "workspaceContainsFileActivation": "Ativado porque o arquivo {0} existe no seu espaço de trabalho", + "languageActivation": "Ativado porque você abriu um arquivo {0}", + "workspaceGenericActivation": "Ativado em {0}", + "errors": "{0} erros não capturados", + "extensionsInputName": "Executando extensões", + "showRuntimeExtensions": "Mostrar extensões em execução", + "reportExtensionIssue": "Reportar Problema" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json index 7c51e1cc24f..7c8e3e05c0a 100644 --- a/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -69,5 +69,7 @@ "invalidFileNameError": "O nome **{0}** não é válido como um nome de arquivo ou pasta. Por favor, escolha um nome diferente.", "filePathTooLongError": "O nome **{0}** resulta em um caminho muito longo. Escolha um nome mais curto.", "compareWithSaved": "Comparar arquivo ativo com salvo", - "modifiedLabel": "{0} (em disco) ↔ {1}" + "modifiedLabel": "{0} (em disco) ↔ {1}", + "compareWithClipboard": "Compare o Arquivo Ativo com a Ãrea de Transferência", + "clipboardComparisonLabel": "Ãrea de transferência ↔ {0}" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json new file mode 100644 index 00000000000..18b7465dc08 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "folders": "Pastas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json new file mode 100644 index 00000000000..464da97e4e9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Arquivo", + "revealInSideBar": "Revelar na Barra Lateral", + "acceptLocalChanges": "Usar suas alterações e substituir o conteúdo do disco", + "revertLocalChanges": "Descartar as alterações e reverter para o conteúdo no disco" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json new file mode 100644 index 00000000000..18ed68af70c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Tentar novamente", + "rename": "Renomear", + "newFile": "Novo Arquivo", + "newFolder": "Nova Pasta", + "openFolderFirst": "Abrir uma pasta primeiro para criar arquivos ou pastas dentro dele.", + "newUntitledFile": "Novo Arquivo Sem Título", + "createNewFile": "Novo Arquivo", + "createNewFolder": "Nova Pasta", + "deleteButtonLabelRecycleBin": "&&Mover para Lixeira", + "deleteButtonLabelTrash": "&&Mover para o Lixo", + "deleteButtonLabel": "&&Excluir", + "dirtyMessageFolderOneDelete": "Você está excluindo uma pasta com alterações não salvas em 1 arquivo. Você quer continuar?", + "dirtyMessageFolderDelete": "Você está excluindo uma pasta com alterações não salvas em {0} arquivos. Você quer continuar?", + "dirtyMessageFileDelete": "Você está excluindo um arquivo com alterações não salvas. Você quer continuar?", + "dirtyWarning": "Suas alterações serão perdidas se você não salvá-las.", + "confirmMoveTrashMessageFolder": "Tem certeza de que deseja excluir '{0}' e seu conteúdo?", + "confirmMoveTrashMessageFile": "Tem certeza de que deseja excluir '{0}'?", + "undoBin": "Você pode restaurar da lixeira.", + "undoTrash": "Você pode restaurar a partir do lixo.", + "doNotAskAgain": "Não me pergunte novamente", + "confirmDeleteMessageFolder": "Tem certeza de que deseja excluir permanentemente '{0}' e seu conteúdo?", + "confirmDeleteMessageFile": "Tem certeza de que deseja excluir permanentemente '{0}'?", + "irreversible": "Esta ação é irreversível!", + "permDelete": "Excluir permanentemente", + "delete": "Excluir", + "importFiles": "Importar Arquivos", + "confirmOverwrite": "Um arquivo ou pasta com o mesmo nome já existe na pasta de destino. Você quer substituí-lo?", + "replaceButtonLabel": "&&Substituir", + "copyFile": "Copiar", + "pasteFile": "Colar", + "duplicateFile": "Duplicar", + "openToSide": "Aberto para o lado", + "compareSource": "Selecione para comparar", + "globalCompareFile": "Compare o Arquivo Ativo Com...", + "openFileToCompare": "Abrir um arquivo primeiro para compará-lo com outro arquivo.", + "compareWith": "Comparar '{0}' com '{1}'", + "compareFiles": "Comparar Arquivos", + "refresh": "Atualizar", + "save": "Salvar", + "saveAs": "Salvar como...", + "saveAll": "Salvar Todos", + "saveAllInGroup": "Salvar Todos no Grupo", + "saveFiles": "Salvar todos os arquivos", + "revert": "Reverter Arquivo", + "focusOpenEditors": "Foco na Visualização dos Editores Abertos", + "focusFilesExplorer": "Foco no Explorador de Arquivos", + "showInExplorer": "Revelar o Arquivo Ativo na Barra Lateral", + "openFileToShow": "Abrir um arquivo primeiro para mostrá-lo no explorer", + "collapseExplorerFolders": "Esconder Pastas no Explorador", + "refreshExplorer": "Atualizar Explorador", + "openFileInNewWindow": "Abrir o Arquivo Ativo em uma Nova Janela", + "openFileToShowInNewWindow": "Abrir um arquivo primeiro para abrir em uma nova janela", + "revealInWindows": "Revelar no Explorer", + "revealInMac": "Revelar no Finder", + "openContainer": "Abrir a Pasta", + "revealActiveFileInWindows": "Revelar Arquivo Ativo no Windows Explorer", + "revealActiveFileInMac": "Revelar Arquivo Ativo no Finder", + "openActiveFileContainer": "Abrir a Pasta do Arquivo Ativo.", + "copyPath": "Copiar Caminho", + "copyPathOfActive": "Copiar Caminho do Arquivo Ativo", + "emptyFileNameError": "Um nome de arquivo ou pasta deve ser fornecido.", + "fileNameExistsError": "Um arquivo ou pasta **{0}** já existe neste local. Escolha um nome diferente.", + "invalidFileNameError": "O nome **{0}** não é válido como um nome de arquivo ou pasta. Por favor, escolha um nome diferente.", + "filePathTooLongError": "O nome **{0}** resulta em um caminho muito longo. Escolha um nome mais curto.", + "compareWithSaved": "Comparar o Arquivo Ativo com o Arquivo Salvo", + "modifiedLabel": "{0} (em disco) ↔ {1}", + "compareWithClipboard": "Compare o Arquivo Ativo com a Ãrea de Transferência", + "clipboardComparisonLabel": "Ãrea de Transferência ↔ {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json new file mode 100644 index 00000000000..2e61a1656c8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Abrir um arquivo primeiro para copiar seu caminho", + "openFileToReveal": "Abrir um arquivo primeiro para revelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json new file mode 100644 index 00000000000..0e95d226253 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Mostrar Explorer", + "explore": "Explorador", + "view": "Exibir", + "textFileEditor": "Editor de Arquivo de Texto", + "binaryFileEditor": "Editor de Arquivo Binário", + "filesConfigurationTitle": "Arquivos", + "exclude": "Configure padrões glob para excluir os arquivos e pastas. Por exemplo, o explorador de arquivos decide quais arquivos e pastas mostrar ou ocultar baseado nessa configuração.", + "files.exclude.boolean": "O padrão glob com o qual combinar os caminhos de arquivo. Defina para verdadeiro ou falso para habilitar ou desabilitar o padrão.", + "files.exclude.when": "Verificação adicional nos irmãos de um arquivo correspondente. Use $(basename) como variável para o nome do arquivo correspondente.", + "associations": "Configurar as associações de arquivo para linguagens (por exemplo, \"* Extension\": \"html\"). Estas têm precedência sobre as associações padrão das linguagens instaladas.", + "encoding": "O conjunto de codificação de caracteres padrão a ser usado ao ler e gravar arquivos. Essa configuração também pode ser configurada por linguagem.", + "autoGuessEncoding": "Quando habilitado, tentará adivinhar o conjunto de codificação de caracteres ao abrir arquivos. Essa configuração também pode ser configurada por linguagem.", + "eol": "O caractere padrão de fim de linha. Use \\n para LF e \\r\\n para CRLF.", + "trimTrailingWhitespace": "Quando habilitado, removerá espaços em branco à direita ao salvar um arquivo.", + "insertFinalNewline": "Quando habilitado, inseririrá uma nova linha no final do arquivo quando salvá-lo.", + "trimFinalNewlines": "Quando habilitado, removerá todas as novas linhas após a nova linha no final do arquivo ao salvá-lo.", + "files.autoSave.off": "Um arquivo sujo nunca é automaticamente salvo.", + "files.autoSave.afterDelay": "Um arquivo sujo é salvo automaticamente após configurado em 'files.autoSaveDelay'.", + "files.autoSave.onFocusChange": "Um arquivo sujo é salvo automaticamente quando o editor perde o foco.", + "files.autoSave.onWindowChange": "Um arquivo sujo é salvo automaticamente quando a janela perde o foco.", + "autoSave": "Controla o auto-salvamento de arquivos sujos. Aceita os valores: '{0}', '{1}', '{2}' (editor perde o foco), '{3}' (janela perde o foco). Se definido como '{4}', você pode configurar o atraso em 'files.autoSaveDelay'.", + "autoSaveDelay": "Controla o atraso em milissegundos depois que um arquivo sujo é salvo automaticamente. Só se aplica quando 'files.autoSave' for definida como '{0}'", + "watcherExclude": "Configure padrões glob de caminhos de arquivo para excluir do monitoramento de arquivo. Padrões devem corresponder a caminhos absolutos (ou seja, prefixo com ** ou o caminho completo para combinar corretamente). Alterar essa configuração requer uma reinicialização. Quando o Code estiver consumindo muito tempo de cpu na inicialização, você pode excluir pastas grandes para reduzir a carga inicial.", + "hotExit.off": "Desabilitar a saída à quente.", + "hotExit.onExit": "Saída à quente será acionada quando o aplicativo for fechado, ou seja, quando a última janela é fechada no Windows/Linux ou quando o comando workbench.action.quit é acionado (paleta de comandos, keybinding, menu). Todas as janelas com backups serão restauradas na próxima execução.", + "hotExit.onExitAndWindowClose": "Saída à quente será acionada quando o aplicativo for fechado, ou seja, quando a última janela é fechada no Windows/Linux ou quando o comando workbench.action.quit é acionado (paleta de comando, keybinding, menu), e também para qualquer janela com uma pasta aberta independentemente se é a última janela. Todas as janelas sem pastas abertas serão restauradas no próximo lançamento. Para restaurar janelas de pastas como eram antes do desligamento configure \"window.restoreWindows\" para \"todos\".", + "hotExit": "Controla se os arquivos não salvos são lembrados entre as sessões, permitindo salvar alerta ao sair do editor seja ignorada.", + "useExperimentalFileWatcher": "Usar o novo monitor experimental de arquivo.", + "defaultLanguage": "O modo de linguagem padrão que é atribuída para novos arquivos.", + "editorConfigurationTitle": "Editor", + "formatOnSave": "Formata um arquivo no salvamento. Um formatador deve estar disponível, o arquivo não deve ser salvo automaticamente e editor não deve ser desligado.", + "explorerConfigurationTitle": "Explorador de arquivos", + "openEditorsVisible": "Número de editores mostrado no painel Abrir Editores. Configurá-lo para 0 irá ocultar o painel.", + "dynamicHeight": "Controla se a altura da seção de editores abertos deve adaptar-se dinamicamente para o número de elementos ou não.", + "autoReveal": "Controla se o explorador deve automaticamente revelar e selecionar arquivos ao abri-los.", + "enableDragAndDrop": "Controla se o explorador deve permitir mover arquivos e pastas através de arrastar e soltar.", + "confirmDragAndDrop": "Controla se o explorer deve pedir a confirmação ao mover arquivos ou pastas através de arrastar e soltar.", + "confirmDelete": "Controla se o explorador deve pedir a confirmação ao excluir um arquivo por meio do lixo.", + "sortOrder.default": "Arquivos e pastas são classificadas por seus nomes, em ordem alfabética. Pastas são exibidas acima dos arquivos.", + "sortOrder.mixed": "Arquivos e pastas são classificadas por seus nomes, em ordem alfabética. Arquivos são misturados com pastas.", + "sortOrder.filesFirst": "Arquivos e pastas são classificadas por seus nomes, em ordem alfabética. Os arquivos são exibidos acima das pastas.", + "sortOrder.type": "Arquivos e pastas são classificadas de acordo com suas extensões, em ordem alfabética. Pastas são exibidas acima dos arquivos.", + "sortOrder.modified": "Arquivos e pastas são classificados de acordo com a data da última modificação, em ordem decrescente. Pastas são exibidas acima dos arquivos.", + "sortOrder": "Controla a ordem de classificação dos arquivos e pastas no explorador. Além da classificação padrão, você pode definir a ordem para 'mixed' (arquivos e pastas misturados), 'type' (por tipo de arquivo), 'modified' (pela data da última modificação) ou 'filesFirst' (exibe os arquivos acima das pastas).", + "explorer.decorations.colors": "Controles se as decorações de arquivo devem usar cores.", + "explorer.decorations.badges": "Controles se as decorações de arquivo devem usar identificações." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json new file mode 100644 index 00000000000..09a29894643 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "userGuide": "Use as ações na barra de ferramentas de editor para a direita para **desfazer** suas alterações ou **substituir** o conteúdo no disco com as alterações", + "discard": "Descartar", + "overwrite": "Sobrescrever", + "retry": "Tentar novamente", + "readonlySaveError": "Falha ao salvar '{0}': O arquivo está protegido contra gravação. Selecione 'Substituir' para remover a proteção.", + "genericSaveError": "Erro ao salvar '{0}': {1}", + "staleSaveError": "Falha ao salvar '{0}': O conteúdo no disco é mais recente. Clique em **Comparar** para comparar a sua versão com a do disco.", + "compareChanges": "Comparar", + "saveConflictDiffLabel": "{0} (no disco) ↔ {1} (em {2}) - Resolver conflitos de salvamento" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json new file mode 100644 index 00000000000..ca0724076d8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Nenhuma Pasta Aberta", + "explorerSection": "Seção de Explorador de Arquivos", + "noWorkspaceHelp": "Você ainda não adicionou uma pasta ao espaço de trabalho.", + "addFolder": "Adicionar Pasta", + "noFolderHelp": "Você ainda não abriu uma pasta.", + "openFolder": "Abrir Pasta" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json new file mode 100644 index 00000000000..36d4c36aa75 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label": "Explorador", + "canNotResolve": "Não foi possível resolver a pasta da área de trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json new file mode 100644 index 00000000000..4753a88bd4c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Seção de Explorador de Arquivos", + "treeAriaLabel": "Explorador de Arquivos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json new file mode 100644 index 00000000000..02afd8f004f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Digite o Nome do arquivo. Pressione Enter para confirmar ou Escape para cancelar.", + "filesExplorerViewerAriaLabel": "{0}, Explorador de Arquivos", + "dropFolders": "Você deseja adicionar as pastas ao espaço de trabalho?", + "dropFolder": "Você quer adicionar a pasta no espaço de trabalho?", + "addFolders": "&&Adicionar Pastas", + "addFolder": "&&Adicionar Pasta", + "confirmMove": "Tem certeza que deseja mover '{0}'?", + "doNotAskAgain": "Não me pergunte novamente", + "moveButtonLabel": "&&Mover", + "confirmOverwriteMessage": "'{0}' já existe na pasta de destino. Deseja substituí-lo?", + "irreversible": "Esta ação é irreversível!", + "replaceButtonLabel": "&&Substituir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json new file mode 100644 index 00000000000..83f2a510196 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Abrir Editores", + "openEditosrSection": "Abrir Seção de Editores", + "dirtyCounter": "{0} não salvos", + "saveAll": "Salvar Todos", + "closeAllUnmodified": "Fechar Não Modificados", + "closeAll": "Fechar todos", + "compareWithSaved": "Comparar com o salvo", + "close": "Fechar", + "closeOthers": "Fechar Outros" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json new file mode 100644 index 00000000000..5564dee7aea --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, Agrupar Editor", + "openEditorAriaLabel": "{0}, Abrir Editor", + "saveAll": "Salvar Todos", + "closeAllUnmodified": "Fechar Não Modificados", + "closeAll": "Fechar todos", + "compareWithSaved": "Comparar com o salvo", + "close": "Fechar", + "closeOthers": "Fechar Outros" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/ptb/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json new file mode 100644 index 00000000000..9daea31f4af --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "totalProblems": "Total {0} Problemas", + "filteredProblems": "Mostrando {0} de {1} Problemas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json index a753fe413e8..ad1f8b439c5 100644 --- a/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,8 +6,7 @@ { "viewCategory": "Exibir", "problems.view.toggle.label": "Alternar Problemas", - "problems.view.show.label": "Mostrar Problemas", - "problems.view.hide.label": "Esconder problemas", + "problems.view.focus.label": "Problemas de foco", "problems.panel.configuration.title": "Visualização de Problemas", "problems.panel.configuration.autoreveal": "Controla se a visaulização de problemas evela os arquivos automaticamente ao abri-los", "markers.panel.title.problems": "Problemas", diff --git a/i18n/ptb/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json b/i18n/ptb/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json new file mode 100644 index 00000000000..886f4120ac9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "prof.message": "Perfis criados com sucesso.", + "prof.detail": "Por favor, crie um problema e anexe manualmente os seguintes arquivos:\n{0}", + "prof.restartAndFileIssue": "Criar Problema e Reiniciar", + "prof.restart": "Reiniciar", + "prof.thanks": "Obrigado por nos ajudar.", + "prof.detail.restart": "É necessário um reinício final para continuar a usar '{0}'. Novamente, obrigado pela sua contribuição." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 279307d4b87..63c74c15053 100644 --- a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defineKeybinding.initial": "Pressionar a combinação de teclas desejada e ENTER. ESCAPE para cancelar.", + "defineKeybinding.initial": "Pressione a combinação de teclas desejada e pressione ENTER.", "defineKeybinding.chordsTo": "Acorde para" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index 1cb6541687c..4027814e08d 100644 --- a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -26,6 +26,7 @@ "editKeybindingLabel": "Alterar Keybinding", "addKeybindingLabelWithKey": "Adicionar Keybinding {0}", "addKeybindingLabel": "Adicionar Keybinding", + "title": "{0} ({1})", "commandAriaLabel": "Comando é {0}.", "keybindingAriaLabel": "KeyBinding é {0}.", "noKeybinding": "Nenhum Keybinding atribuído.", diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 0abf761f3b5..50c13e91259 100644 --- a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "openRawDefaultSettings": "Abrir Configurações Padrão Raw", "openGlobalSettings": "Abra as Configurações de Usuário", "openGlobalKeybindings": "Abrir Atalhos de Teclado", "openGlobalKeybindingsFile": "Abrir Arquivo de Atalhos de Teclado", diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 406b00bf2d0..49fd2fe9bd8 100644 --- a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -7,12 +7,12 @@ "settingsEditorName": "Configurações Padrão", "SearchSettingsWidget.AriaLabel": "Configurações de Pesquisa", "SearchSettingsWidget.Placeholder": "Configurações de Pesquisa", - "totalSettingsMessage": "Total {0} Configurações", "noSettingsFound": "Nenhum resultado", "oneSettingFound": "1 Configuração correspondente", "settingsFound": "{0} Configurações correspondentes", - "fileEditorWithInputAriaLabel": "{0}. Editor de Arquivo de Texto.", - "fileEditorAriaLabel": "Editor de Arquivo de Texto", + "totalSettingsMessage": "Total {0} Configurações", + "defaultSettings": "Configurações Padrão", + "defaultFolderSettings": "Configuração Padrão da Pasta", "defaultEditorReadonly": "Editar no editor do lado direito para substituir os padrões.", "preferencesAriaLabel": "Preferências padrão. Editor de texto somente leitura." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 136d71cc546..619b08fd936 100644 --- a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -7,8 +7,6 @@ "emptyUserSettingsHeader": "Coloque as suas configurações aqui para substituir as configurações padrão.", "emptyWorkspaceSettingsHeader": "Coloque as suas configurações aqui para substituir as configurações de usuário.", "emptyFolderSettingsHeader": "Coloque as suas configurações de pasta aqui para substituir aqueles das configurações do espaço de trabalho.", - "defaultFolderSettingsTitle": "Configurações de pasta padrão", - "defaultSettingsTitle": "Configurações Padrão", "editTtile": "Editar", "replaceDefaultValue": "Substituir nas Configurações", "copyDefaultValue": "Copiar para Configurações", diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index 77e307a5580..800b9bf18e2 100644 --- a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultSettingsFuzzyPrompt": "Tente pesquisa fuzzy!", + "defaultSettingsFuzzyPrompt": "Tente a busca de linguagem natural!", "defaultSettings": "Coloque suas configurações no editor do lado direito para substituir.", "noSettingsFound": "Não há configurações encontradas.", - "folderSettingsDetails": "Configurações de pasta", - "enableFuzzySearch": "Ative a pesquisa fuzzy experimental" + "settingsSwitcherBarAriaLabel": "Chave de Configurações", + "userSettings": "Configurações de Usuário", + "workspaceSettings": "Configurações de Espaço de Trabalho", + "folderSettings": "Configurações da Pasta", + "enableFuzzySearch": "Habilitar busca de linguagem natural" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json new file mode 100644 index 00000000000..40e6d0841da --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Editor de Preferências Padrão", + "keybindingsEditor": "Editor de Keybindings", + "preferences": "Preferências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json index 4b9c688e07f..fc4f8f90311 100644 --- a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -6,7 +6,6 @@ { "scm providers": "Provedores de Controle de Código Fonte", "hideRepository": "Ocultar", - "commitMessage": "Mensagem (tecle {0} para confirmar)", "installAdditionalSCMProviders": "Instalar provedores de SCM adicionais...", "no open repo": "Não existem provedores controle de código fonte ativos.", "source control": "Controle de código-fonte", diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index b4db95bce09..17f6fb93d52 100644 --- a/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defaultLabel": "entrada", - "useIgnoreFilesDescription": "Usar Ignorar Arquivos", - "useExcludeSettingsDescription": "Usar Configurações de Exclusão" + "useExcludesAndIgnoreFilesDescription": "Usar excluir configurações e ignorar arquivos" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json index e3cabff1118..b7b7494e9e4 100644 --- a/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -16,7 +16,6 @@ "exclude.boolean": "O padrão glob com o qual combinar os caminhos de arquivo. Defina para verdadeiro ou falso para habilitar ou desabilitar o padrão.", "exclude.when": "Verificação adicional nos irmãos de um arquivo correspondente. Use $(basename) como variável para o nome do arquivo correspondente.", "useRipgrep": "Controla se utiliza ripgrep em buscas de texto e de arquivo", - "useIgnoreFilesByDefault": "Controla se utiliza arquivos .gitignore e .ignore por padrão ao fazer pesquisas de texto em um novo espaço de trabalho.", "useIgnoreFiles": "Controla se utiliza arquivos .gitignore e .ignore por padrão ao fazer pesquisas de arquivos.", "search.quickOpen.includeSymbols": "Configurar para incluir resultados de uma pesquisa símbolo global nos resultados do arquivo para Abertura Rápida.", "search.followSymlinks": "Controla quando seguir symlinks ao realizar uma busca." diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 18c5fd1a3c4..34ded87a267 100644 --- a/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -10,17 +10,14 @@ "previousSearchExcludePattern": "Mostrar a Busca Anterior Excluindo Padrões", "nextSearchTerm": "Mostrar o Próximo Termo de Pesquisa", "previousSearchTerm": "Mostrar Termo de Pesquisa Anterior", - "focusNextInputBox": "Focalizar a Próxima Caixa de Entrada", - "focusPreviousInputBox": "Focalizar a Caixa de Entrada Anterior", "showSearchViewlet": "Mostrar Busca", "findInFiles": "Localizar nos Arquivos", "findInFilesWithSelectedText": "Localizar nos Arquivos Com o Texto Selecionado", "replaceInFiles": "Substituir nos Arquivos", "replaceInFilesWithSelectedText": "Substituir nos Arquivos Com o Texto Selecionado", - "findInWorkspace": "Procurar no Espaço de Trabalho...", - "findInFolder": "Procurar na pasta...", "RefreshAction.label": "Atualizar", - "ClearSearchResultsAction.label": "Limpar os Resultados da Pesquisa", + "CollapseDeepestExpandedLevelAction.label": "Recolher tudo", + "ClearSearchResultsAction.label": "Limpar", "FocusNextSearchResult.label": "Focalizar o Próximo Resultado da Pesquisa", "FocusPreviousSearchResult.label": "Focalizar o Resultado da Pesquisa Anterior", "RemoveAction.label": "Ignorar", diff --git a/i18n/ptb/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json new file mode 100644 index 00000000000..b7b7494e9e4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Ir para Símbolo no Espaço de Trabalho...", + "name": "Pesquisar", + "search": "Pesquisar", + "view": "Exibir", + "openAnythingHandlerDescription": "Ir para o Arquivo", + "openSymbolDescriptionNormal": "Ir para o Símbolo em Ãrea de Trabalho", + "searchOutputChannelTitle": "Pesquisar", + "searchConfigurationTitle": "Pesquisar", + "exclude": "Configure os padrões glob para excluir arquivos e pastas nas pesquisas. Herda todos os padrões glob da configuração files.exclude.", + "exclude.boolean": "O padrão glob com o qual combinar os caminhos de arquivo. Defina para verdadeiro ou falso para habilitar ou desabilitar o padrão.", + "exclude.when": "Verificação adicional nos irmãos de um arquivo correspondente. Use $(basename) como variável para o nome do arquivo correspondente.", + "useRipgrep": "Controla se utiliza ripgrep em buscas de texto e de arquivo", + "useIgnoreFiles": "Controla se utiliza arquivos .gitignore e .ignore por padrão ao fazer pesquisas de arquivos.", + "search.quickOpen.includeSymbols": "Configurar para incluir resultados de uma pesquisa símbolo global nos resultados do arquivo para Abertura Rápida.", + "search.followSymlinks": "Controla quando seguir symlinks ao realizar uma busca." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json new file mode 100644 index 00000000000..a25c73a96fa --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "findInFolder": "Procurar na pasta...", + "findInWorkspace": "Procurar no Espaço de Trabalho..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 7841731c435..52458377224 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -6,10 +6,9 @@ { "tasksCategory": "Tarefas", "ConfigureTaskRunnerAction.label": "Configurar a tarefa", - "ConfigureBuildTaskAction.label": "Configurar Tarefa de Compilação", "CloseMessageAction.label": "Fechar", - "ShowTerminalAction.label": "Terminal Visualização", "problems": "Problemas", + "building": "Compilando...", "manyMarkers": "99+", "runningTasks": "Mostrar tarefas em execução", "tasks": "Tarefas", @@ -52,7 +51,7 @@ "TaslService.noEntryToRun": "Nenhuma tarefa para executar foi encontrada. Configure Tarefas...", "TaskService.fetchingBuildTasks": "Buscando tarefas de compilação...", "TaskService.pickBuildTask": "Selecione a tarefa de compilação para executar", - "TaskService.noBuildTask": "Nenhuma tarefa de compilação para executar foi encontrada. Configure Tarefas...", + "TaskService.noBuildTask": "Nenhuma tarefa de compilação para executar foi encontrada. Configure a tarefa de compilação... \n", "TaskService.fetchingTestTasks": "Buscando tarefas de teste...", "TaskService.pickTestTask": "Selecione a tarefa de teste para executar", "TaskService.noTestTaskTerminal": "Nenhuma tarefa de teste para executar foi encontrada. Configure Tarefas...", diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index f258ad63adf..207ef35291c 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -7,6 +7,7 @@ "TerminalTaskSystem.unknownError": "Um erro desconhecido ocorreu durante a execução de uma tarefa. Consulte o log de saída de tarefa para obter detalhes.", "dependencyFailed": "Não foi possível resolver a tarefa dependente '{0}' na pasta de espaço de trabalho '{1}'", "TerminalTaskSystem.terminalName": "Tarefa - {0}", + "closeTerminal": "Pressione qualquer tecla para fechar o terminal.", "reuseTerminal": "Terminal será reutilizado pelas tarefas, pressione qualquer tecla para fechar.", "TerminalTaskSystem": "Não é possível executar um comando shell em uma unidade UNC.", "unkownProblemMatcher": "Problem matcher {0} não pode ser resolvido. O matcher será ignorado" diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index ada7842e796..ae90ef5cf64 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,8 +14,8 @@ "ConfigurationParser.noTypeDefinition": "Erro: não há nenhum tipo de tarefa registrado '{0}'. Você esqueceu de instalar uma extensão que fornece um provedor de tarefa correspondente?", "ConfigurationParser.missingRequiredProperty": "Erro: a configuração de tarefa '{0}' não possui a propriedade obrigatória '{1}'. A configuração de tarefa será ignorada.", "ConfigurationParser.notCustom": "Erro: tarefas não está declarada como uma tarefa personalizada. A configuração será ignorada.\n{0}\n", - "ConfigurationParser.noTaskName": "Erro: tarefas devem fornecer uma propriedade taskName. A tarefa será ignorada.\n{0}\n", - "taskConfiguration.shellArgs": "Aviso: a tarefa '{0}' é um comando do shell e o nome de comando ou um dos seus argumentos tem espaços sem escape. Para garantir a linha de comando correta por favor mesclar argumentos no comando.", + "ConfigurationParser.noTaskName": "Erro: uma tarefa deve fornecer uma propriedade de rótulo. A tarefa será ignorada.\n{0}\n", + "taskConfiguration.shellArgs": "Aviso: a tarefa '{0}' é um comando shell e um dos seus argumentos pode ter espaços sem escape. Para garantir a citação da linha de comando correta por favor mesclar args ao comando.", "taskConfiguration.noCommandOrDependsOn": "Erro: a tarefa '{0}' não especifica nem um comando nem uma propriedade dependsOn. A tarefa será ignorada. Sua definição é: \n{1}", "taskConfiguration.noCommand": "Erro: a tarefa '{0}' não define um comando. A tarefa será ignorada. Sua definição é: {1}", "TaskParse.noOsSpecificGlobalTasks": "Tarefa versão 2.0.0 não oferece suporte a tarefas globais específicas do sistema operacional. Converta-as em uma tarefa com um comando específico do sistema operacional. Tarefas afetadas:\n{0}" diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index 44762cc06d3..62b6ee547fb 100644 --- a/i18n/ptb/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,7 +6,7 @@ { "termEntryAriaLabel": "{0}, seletor de terminal", "termCreateEntryAriaLabel": "{0}, criar novo terminal", - "'workbench.action.terminal.newplus": "$(plus) criar novo Terminal Integrado", + "workbench.action.terminal.newplus": "$(plus) criar novo Terminal Integrado", "noTerminalsMatching": "Não há terminais correspondentes", "noTerminalsFound": "Não há terminais abertos" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index f4a78b8d461..d97a515c6ea 100644 --- a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,7 +16,7 @@ "terminal.integrated.rightClickCopyPaste": "Quando configurado, isto evitará que o menu de contexto apareça quando pressionado o botão direito do mouse dentro do terminal, em vez disso vai copiar quando há uma seleção e colar quando não há nenhuma seleção.", "terminal.integrated.fontFamily": "Controla a família de fontes do terminal, este padrão é o valor do editor.fontFamily.", "terminal.integrated.fontSize": "Controla o tamanho da fonte em pixels do terminal.", - "terminal.integrated.lineHeight": "Controles a altura da linha do terminal, este número é multiplicada pelo tamanho da fonte terminal para obter a altura real da linha em pixels.", + "terminal.integrated.lineHeight": "Controla a altura da linha do terminal, este número é multiplicado pelo tamanho da fonte do terminal para obter a altura real da linha em pixels.", "terminal.integrated.enableBold": "Se deseja habilitar o texto em negrito dentro do terminal, note que isso requer o apoio do shell do terminal.", "terminal.integrated.cursorBlinking": "Controla se o cursor do terminal pisca.", "terminal.integrated.cursorStyle": "Controla o estilo do cursor do terminal.", diff --git a/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 9968bf0b9b1..36e908bf1ee 100644 --- a/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,13 +5,15 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "Tema de Cores", + "themes.category.light": "temas claros", + "themes.category.dark": "temas escuros", + "themes.category.hc": "temas de alto contraste", "installColorThemes": "Instalar temas de cor adicionais...", "themes.selectTheme": "Selecione o tema de cor (teclas cima/baixo para visualização)", "selectIconTheme.label": "Arquivo de Ãcone do Tema", - "installIconThemes": "Instalar Temas de Ãcones de Arquivos Adicionais...", "noIconThemeLabel": "Nenhum", "noIconThemeDesc": "Desabilitar ícones de arquivos", - "problemChangingIconTheme": "Problema configurando tema de ícones: {0}", + "installIconThemes": "Instalar Temas de Ãcones de Arquivos Adicionais...", "themes.selectIconTheme": "Selecionar Tema de Ãcones de Arquivos", "generateColorTheme.label": "Gerar Tema de Cores a Partir das Configurações Atuais", "preferences": "Preferências", diff --git a/i18n/ptb/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/ptb/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index e274edfe6f1..0ff71be7ea4 100644 --- a/i18n/ptb/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/ptb/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -9,9 +9,9 @@ "scope.window.description": "Janela de configuração específica que pode ser configurada nas configurações do usuário ou área de trabalho.", "scope.resource.description": "Configuração específica do recurso que pode ser configurada nas configurações do usuário, espaço de trabalho ou pasta.", "scope.description": "Escopo em que a configuração é aplicável. Escopos disponíveis são 'window' e 'resource'.", + "vscode.extension.contributes.defaultConfiguration": "Contribui às definições de configuração padrão do editor por linguagem.", "vscode.extension.contributes.configuration": "Contribui às definições de configuração.", "invalid.title": "'configuration.title' deve ser um string", - "vscode.extension.contributes.defaultConfiguration": "Contribui às definições de configuração padrão do editor por linguagem.", "invalid.properties": "'configuration.properties' deve ser um objeto", "invalid.allOf": "'configuration.allOf' está obsoleto e não deve ser usado. Em vez disso, passe várias seções de configuração como uma matriz para o ponto de contribuição 'configuration'.", "workspaceConfig.folders.description": "Lista de pastas a serem carregadas no espaço de trabalho.", diff --git a/i18n/ptb/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json b/i18n/ptb/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json new file mode 100644 index 00000000000..63fd1d1955d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableCrashReporting": "Ativar o envio de relatórios de incidentes à Microsoft. Esta opção requer reinicialização para ser efetiva." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/ptb/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index f0518e7f98e..b24908e5597 100644 --- a/i18n/ptb/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/ptb/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "bubbleTitle": "contém itens enfatizados" + "bubbleTitle": "Contém itens enfatizados" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/ptb/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/ptb/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index 8b5f44c434a..fc90af28527 100644 --- a/i18n/ptb/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/ptb/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -9,5 +9,6 @@ "extensionHostProcess.crash": "Host de extensão foi encerrado inesperadamente.", "extensionHostProcess.unresponsiveCrash": "Host de extensão encerrado porque não foi responsivo.", "overwritingExtension": "Sobrescrevendo extensão {0} por {1}.", - "extensionUnderDevelopment": "Carregando extensão de desenvolvimento em {0}" + "extensionUnderDevelopment": "Carregando extensão de desenvolvimento em {0}", + "extensionCache.invalid": "Extensões foram modificadas no disco. Por favor atualize a janela." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json index e6423a5b25c..ae4ae718743 100644 --- a/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json @@ -8,8 +8,8 @@ "fileIsDirectoryError": "Arquivo é um diretório", "fileNotModifiedError": "Arquivo não modificado desde", "fileTooLargeError": "Arquivo muito grande para abrir", - "fileBinaryError": "Arquivo parece ser binário e não pode ser aberto como texto", "fileNotFoundError": "Arquivo não encontrado ({0})", + "fileBinaryError": "Arquivo parece ser binário e não pode ser aberto como texto", "fileExists": "Arquivo a ser criado já existe ({0})", "fileMoveConflict": "Não é possível mover/copiar. Arquivo já existe no destino.", "unableToMoveCopyError": "Não é possível mover/copiar. Arquivo poderia substituir a pasta em que está contida.", diff --git a/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index b890aa49bd7..fedfd5457f0 100644 --- a/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -22,5 +22,5 @@ "keybindings.json.when": "Condição quando a chave está ativa.", "keybindings.json.args": "Argumentos a serem passados para o comando para executar.", "keyboardConfigurationTitle": "Teclado", - "dispatch": "Controla a lógica de expedição para pressionamentos de teclas para usar `keydown.code` (recomendado) ou 'keydown.keyCode'." + "dispatch": "Controla a lógica de pressionamentos de teclas a ser usada para envio, se será 'code' (recomendado) ou 'keyCode'." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json index 9fe74ad26f3..ca08dc13ff6 100644 --- a/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "files.backup.failSave": "Arquivos não poderiam ser backupeados (erro: {0}), tente salvar seus arquivos para sair." + "files.backup.failSave": "Arquivos que estão com problemas não podem ser escritos na localização de backup (erro: {0}). Tente salvar seus arquivos primeiro e depois sair." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index d27ccd6f4ab..15017c07157 100644 --- a/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "migration.completed": "Foram adicionadas novas configurações de tema para as configurações de usuário. Backup está disponível em {0}.", "error.cannotloadtheme": "Não é possível carregar {0}: {1}", - "error.cannotloadicontheme": "Não é possível carregar {0}", "colorTheme": "Especifica o tema de cores usado no espaço de trabalho.", "colorThemeError": "Tema é desconhecido ou não está instalado.", "iconTheme": "Especifica o tema de ícones usado no espaço de trabalho ou 'null' para não mostrar qualquer arquivo de ícones.", diff --git a/i18n/rus/extensions/git/out/autofetch.i18n.json b/i18n/rus/extensions/git/out/autofetch.i18n.json new file mode 100644 index 00000000000..0f8fdf4d3aa --- /dev/null +++ b/i18n/rus/extensions/git/out/autofetch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yes": "Да", + "no": "Ðет" +} \ No newline at end of file diff --git a/i18n/rus/extensions/git/out/commands.i18n.json b/i18n/rus/extensions/git/out/commands.i18n.json index 58ec5f6da20..149e1af6b09 100644 --- a/i18n/rus/extensions/git/out/commands.i18n.json +++ b/i18n/rus/extensions/git/out/commands.i18n.json @@ -71,7 +71,6 @@ "no stashes": "ОтÑутÑтвуют ÑпрÑтанные изменениÑ, которые необходимо воÑÑтановить.", "pick stash to pop": "Выберите ÑпрÑтанное изменение Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ", "clean repo": "ОчиÑтите рабочее дерево Ñ€ÐµÐ¿Ð¾Ð·Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ Ð¿ÐµÑ€ÐµÐ´ извлечением.", - "cant push": "Ðе удаетÑÑ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²Ð¸Ñ‚ÑŒ ÑÑылки в удаленную ветвь. Сначала выберите \"Извлечь\", чтобы интегрировать изменениÑ.", "git error details": "Git: {0}", "git error": "Ошибка Git", "open git log": "Открыть журнал GIT" diff --git a/i18n/rus/extensions/git/out/main.i18n.json b/i18n/rus/extensions/git/out/main.i18n.json index 175b7f3a7cc..85416c1538a 100644 --- a/i18n/rus/extensions/git/out/main.i18n.json +++ b/i18n/rus/extensions/git/out/main.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "using git": "ИÑпользование GIT {0} из {1}", - "updateGit": "Обновить Git", "neverShowAgain": "Больше не показывать", + "updateGit": "Обновить Git", "git20": "У Ð²Ð°Ñ ÑƒÑтановлен Git {0}. Код лучше вÑего работает Ñ Git >= 2." } \ No newline at end of file diff --git a/i18n/rus/extensions/git/out/repository.i18n.json b/i18n/rus/extensions/git/out/repository.i18n.json index 053f8f8b45f..beb3198e742 100644 --- a/i18n/rus/extensions/git/out/repository.i18n.json +++ b/i18n/rus/extensions/git/out/repository.i18n.json @@ -21,6 +21,7 @@ "deleted by us": "Удалено нами", "both added": "Добавлено обеими Ñторонами", "both modified": "Изменено обеими Ñторонами", + "commitMessage": "Сообщение (чтобы зафикÑировать, нажмите кнопку {0})", "commit": "Commit", "merge changes": "Объединить изменениÑ", "staged changes": "Промежуточно Ñохраненные изменениÑ", diff --git a/i18n/rus/extensions/markdown/out/commands.i18n.json b/i18n/rus/extensions/markdown/out/commands.i18n.json new file mode 100644 index 00000000000..5c5b3690dc6 --- /dev/null +++ b/i18n/rus/extensions/markdown/out/commands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "Ðе удалоÑÑŒ загрузить 'markdown.styles': {0}" +} \ No newline at end of file diff --git a/i18n/rus/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/rus/extensions/markdown/out/features/previewContentProvider.i18n.json new file mode 100644 index 00000000000..62ff186c858 --- /dev/null +++ b/i18n/rus/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "Ðекоторое Ñодержимое в Ñтом документе было отключено", + "preview.securityMessage.title": "Ð’ предварительном проÑмотре Markdown было отключено потенциально опаÑное или ненадежное Ñодержимое. Чтобы разрешить ненадежное Ñодержимое или включить Ñценарии, измените параметры безопаÑноÑти предварительного проÑмотра Markdown.", + "preview.securityMessage.label": "Предупреждение безопаÑноÑти об отключении Ñодержимого" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/base/common/errorMessage.i18n.json b/i18n/rus/src/vs/base/common/errorMessage.i18n.json index d3403f4afa5..5edc4744723 100644 --- a/i18n/rus/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/rus/src/vs/base/common/errorMessage.i18n.json @@ -4,13 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "message": "{0}. Код ошибки: {1}", - "error.permission.verbose": "Отказано в разрешении (HTTP {0})", - "error.permission": "Отказано в разрешении", - "error.http.verbose": "{0} (HTTP {1}: {2})", - "error.http": "{0} (HTTP {1})", - "error.connection.unknown.verbose": "Произошла неизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ ({0})", - "error.connection.unknown": "Произошла неизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° подключениÑ. УтерÑно подключение к Интернету, либо Ñервер, к которому вы подключены, перешел в автономный режим.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "Произошла неизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°. Подробные ÑÐ²ÐµÐ´ÐµÐ½Ð¸Ñ Ñм. в журнале.", "nodeExceptionMessage": "Произошла ÑиÑÑ‚ÐµÐ¼Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° ({0})", diff --git a/i18n/rus/src/vs/code/electron-main/main.i18n.json b/i18n/rus/src/vs/code/electron-main/main.i18n.json new file mode 100644 index 00000000000..3a698517ea1 --- /dev/null +++ b/i18n/rus/src/vs/code/electron-main/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "&&Закрыть" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/code/electron-main/menus.i18n.json b/i18n/rus/src/vs/code/electron-main/menus.i18n.json index 683007474d8..194c4240f25 100644 --- a/i18n/rus/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/menus.i18n.json @@ -22,12 +22,9 @@ "miQuit": "Выйти из {0}", "miNewFile": "&&Ðовый файл", "miOpen": "Открыть...", - "miOpenWorkspace": "&&Открыть рабочую облаÑть...", "miOpenFolder": "Открыть &&папку...", "miOpenFile": "&&Открыть файл...", "miOpenRecent": "Открыть &&поÑледние", - "miSaveWorkspaceAs": "&&Сохранить рабочую облаÑть как...", - "miAddFolderToWorkspace": "&& Добавить папку в рабочую облаÑть...", "miSave": "Сохранить", "miSaveAs": "Сохранить &&как...", "miSaveAll": "Сохранить &&вÑе", @@ -157,7 +154,6 @@ "mMergeAllWindows": "Объединить вÑе окна", "miToggleDevTools": "&&Показать/Ñкрыть ÑредÑтва разработчика", "miAccessibilityOptions": "Специальные &&возможноÑти", - "miReportIssues": "&&Сообщить о проблемах", "miWelcome": "&&ПриветÑтвие", "miInteractivePlayground": "&&Ð˜Ð½Ñ‚ÐµÑ€Ð°ÐºÑ‚Ð¸Ð²Ð½Ð°Ñ Ð¿Ð»Ð¾Ñ‰Ð°Ð´ÐºÐ°", "miDocumentation": "&&ДокументациÑ", @@ -184,6 +180,6 @@ "miDownloadingUpdate": "СкачиваетÑÑ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ðµ...", "miInstallingUpdate": "Идет уÑтановка обновлениÑ...", "miCheckForUpdates": "Проверить наличие обновлений...", - "aboutDetail": "\nВерÑÐ¸Ñ {0}\nФикÑÐ°Ñ†Ð¸Ñ {1}\nДата {2}\nОблочка {3}\nОтриÑовщик {4}\nУзел {5}\nÐрхитектура {6}", - "okButton": "ОК" + "okButton": "ОК", + "copy": "Копировать" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/browser/services/bulkEdit.i18n.json b/i18n/rus/src/vs/editor/browser/services/bulkEdit.i18n.json new file mode 100644 index 00000000000..fc197d1c5c6 --- /dev/null +++ b/i18n/rus/src/vs/editor/browser/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "Следующие файлы были изменены: {0}", + "summary.0": "Ðет изменений", + "summary.nm": "Сделано изменений {0} в {1} файлах", + "summary.n0": "Сделано изменений {0} в одном файле" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json index 4d615e7f9cf..83b7b87dd66 100644 --- a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,12 +10,9 @@ "fontSize": "УправлÑет размером шрифта в пикÑелÑÑ….", "lineHeight": "УправлÑет выÑотой Ñтрок. Укажите 0 Ð´Ð»Ñ Ð²Ñ‹Ñ‡Ð¸ÑÐ»ÐµÐ½Ð¸Ñ Ð²Ñ‹Ñоты Ñтроки по размеру шрифта.", "letterSpacing": "УправлÑет интервалом между буквами в пикÑелÑÑ….", - "lineNumbers": "УправлÑет видимоÑтью номеров Ñтрок. Возможные значениÑ: \"on\", \"off\" и \"relative\". Значение \"relative\" показывает количеÑтво Ñтрок, Ð½Ð°Ñ‡Ð¸Ð½Ð°Ñ Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ ÐºÑƒÑ€Ñора.", "rulers": "Отображать вертикальные линейки поÑле определенного чиÑла моноширинных Ñимволов. Ð”Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð½ÐµÑкольких линеек укажите неÑколько значений. ЕÑли не указано ни одного значениÑ, вертикальные линейки отображатьÑÑ Ð½Ðµ будут.", "wordSeparators": "Символы, которые будут иÑпользоватьÑÑ ÐºÐ°Ðº разделители Ñлов при выполнении навигации или других операций, ÑвÑзанных Ñо Ñловами.", - "tabSize": "ЧиÑло пробелов в табулÑции. Эта наÑтройка переопределÑетÑÑ Ð½Ð° оÑновании Ñодержимого файла, когда включен параметр \"editor.detectIndentation\".", "tabSize.errorMessage": "ОжидаетÑÑ Ñ‡Ð¸Ñло. Обратите внимание, что значение auto заменено параметром editor.detectIndentation.", - "insertSpaces": "Ð’ÑтавлÑть пробелы при нажатии клавиши TAB. Эта наÑтройка переопределÑетÑÑ Ð½Ð° оÑновании Ñодержимого файла, когда включен параметр \"editor.detectIndentation\".", "insertSpaces.errorMessage": "ОжидаетÑÑ Ð»Ð¾Ð³Ð¸Ñ‡ÐµÑкое значение. Обратите внимание, что значение auto заменено параметром editor.detectIndentation.", "detectIndentation": "При открытии файла editor.tabSize и editor.insertSpaces будут определÑтьÑÑ Ð½Ð° оÑнове Ñодержимого файла.", "roundedSelection": "ОпределÑет, будут ли Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¸Ð¼ÐµÑ‚ÑŒ Ñкругленные углы.", @@ -89,8 +86,8 @@ "links": "ОпределÑет, должен ли редактор определÑть ÑÑылки и делать их доÑтупными Ð´Ð»Ñ Ñ‰ÐµÐ»Ñ‡ÐºÐ°", "colorDecorators": "ОпределÑет, должны ли в редакторе отображатьÑÑ Ð²Ð½ÑƒÑ‚Ñ€ÐµÐ½Ð½Ð¸Ðµ декораторы цвета и ÑредÑтво выбора цвета.", "codeActions": "Включает индикатор дейÑÑ‚Ð²Ð¸Ñ ÐºÐ¾Ð´Ð°", + "selectionClipboard": "Контролирует, Ñледует ли поддерживать первичный буфер обмена Linux.", "sideBySide": "ОпределÑет, как редактор неÑовпадений отображает отличиÑ: Ñ€Ñдом или в текÑте.", "ignoreTrimWhitespace": "ОпределÑет, должен ли редактор неÑовпадений трактовать неÑÐ¾Ð²Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ Ñимволов-разделителей как различиÑ.", - "renderIndicators": "ОпределÑет отображение редактором неÑовпадений индикаторов +/- Ð´Ð»Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð½Ñ‹Ñ… или удаленных изменений", - "selectionClipboard": "Контролирует, Ñледует ли поддерживать первичный буфер обмена Linux." + "renderIndicators": "ОпределÑет отображение редактором неÑовпадений индикаторов +/- Ð´Ð»Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð½Ñ‹Ñ… или удаленных изменений" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/rus/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json new file mode 100644 index 00000000000..b1e1079e98b --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Перейти к Ñкобке" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json b/i18n/rus/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json new file mode 100644 index 00000000000..75a9728d2c7 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "ПеремеÑтить курÑор влево", + "caret.moveRight": "ПеремеÑтить курÑор вправо" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/caretOperations/transpose.i18n.json b/i18n/rus/src/vs/editor/contrib/caretOperations/transpose.i18n.json new file mode 100644 index 00000000000..f747bcfde4d --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/caretOperations/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "ТранÑпортировать буквы" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/clipboard/clipboard.i18n.json b/i18n/rus/src/vs/editor/contrib/clipboard/clipboard.i18n.json new file mode 100644 index 00000000000..390f04f8581 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/clipboard/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Вырезать", + "actions.clipboard.copyLabel": "Копировать", + "actions.clipboard.pasteLabel": "Ð’Ñтавить", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Копировать Ñ Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸ÐµÐ¼ ÑинтакÑиÑа" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/comment/comment.i18n.json b/i18n/rus/src/vs/editor/contrib/comment/comment.i18n.json new file mode 100644 index 00000000000..58b80b36af4 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/comment/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Закомментировать или раÑкомментировать Ñтроку", + "comment.line.add": "Закомментировать Ñтроку", + "comment.line.remove": "РаÑкомментировать Ñтроку", + "comment.block": "Закомментировать или раÑкомментировать блок" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json b/i18n/rus/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json new file mode 100644 index 00000000000..1d813732e52 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Показать контекÑтное меню редактора" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/find/findController.i18n.json b/i18n/rus/src/vs/editor/contrib/find/findController.i18n.json new file mode 100644 index 00000000000..5c6f87afd29 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/find/findController.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Ðайти", + "findNextMatchAction": "Ðайти далее", + "findPreviousMatchAction": "Ðайти ранее", + "nextSelectionMatchFindAction": "Ðайти Ñледующее выделение", + "previousSelectionMatchFindAction": "Ðайти предыдущее выделение", + "startReplace": "Заменить", + "showNextFindTermAction": "Показать Ñледующий найденный термин", + "showPreviousFindTermAction": "Показать предыдущий найденный термин" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/find/findWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/find/findWidget.i18n.json new file mode 100644 index 00000000000..42b7cc3e8ea --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/find/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Ðайти", + "placeholder.find": "Ðайти", + "label.previousMatchButton": "Предыдущее ÑоответÑтвие", + "label.nextMatchButton": "Следующее ÑоответÑтвие", + "label.toggleSelectionFind": "Ðайти в выделении", + "label.closeButton": "Закрыть", + "label.replace": "Заменить", + "placeholder.replace": "Заменить", + "label.replaceButton": "Заменить", + "label.replaceAllButton": "Заменить вÑе", + "label.toggleReplaceButton": "Режим \"Переключение замены\"", + "title.matchesCountLimit": "ОтображаютÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ первые {0} результатов, но вÑе операции поиÑка выполнÑÑŽÑ‚ÑÑ Ñо вÑем текÑтом.", + "label.matchesLocation": "{0} из {1}", + "label.noResults": "Ðет результатов" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/find/simpleFindWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/find/simpleFindWidget.i18n.json new file mode 100644 index 00000000000..e03b15626d2 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/find/simpleFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Ðайти", + "placeholder.find": "Ðайти", + "label.previousMatchButton": "Предыдущее ÑоответÑтвие", + "label.nextMatchButton": "Следующее ÑоответÑтвие", + "label.closeButton": "Закрыть" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/rus/src/vs/editor/contrib/folding/folding.i18n.json new file mode 100644 index 00000000000..5fe065ae0dc --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/folding/folding.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Развернуть", + "unFoldRecursivelyAction.label": "Развернуть рекурÑивно", + "foldAction.label": "Свернуть", + "foldRecursivelyAction.label": "Свернуть рекурÑивно", + "foldAllAction.label": "Свернуть вÑе", + "unfoldAllAction.label": "Развернуть вÑе", + "foldLevelAction.label": "Уровень папки {0}" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/format/formatActions.i18n.json b/i18n/rus/src/vs/editor/contrib/format/formatActions.i18n.json new file mode 100644 index 00000000000..5ff5028a8fb --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/format/formatActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "ВнеÑена одна правка Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð² Ñтроке {0}.", + "hintn1": "ВнеÑены правки Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ ({0}) в Ñтроке {1}.", + "hint1n": "ВнеÑена одна правка Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñƒ Ñтроками {0} и {1}.", + "hintnn": "ВнеÑены правки Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ ({0}) между Ñтроками {1} и {2}.", + "no.provider": "К Ñожалению, модуль Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð² '{0}' не уÑтановлен.", + "formatDocument.label": "Форматировать документ", + "formatSelection.label": "Форматировать выбранный фрагмент" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json b/i18n/rus/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json new file mode 100644 index 00000000000..e61942e5d18 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Определение Ð´Ð»Ñ \"{0}\" не найдено.", + "generic.noResults": "ÐžÐ¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð½Ðµ найдены.", + "meta.title": " — Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ {0}", + "actions.goToDecl.label": "Перейти к определению", + "actions.goToDeclToSide.label": "Открыть определение Ñбоку", + "actions.previewDecl.label": "Показать определение", + "goToImplementation.noResultWord": "Ðе найдена Ñ€ÐµÐ°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð´Ð»Ñ \"{0}\".", + "goToImplementation.generic.noResults": "Ðе найдена реализациÑ.", + "meta.implementations.title": "— {0} реализаций", + "actions.goToImplementation.label": "Перейти к реализации", + "actions.peekImplementation.label": "Показать реализацию", + "goToTypeDefinition.noResultWord": "Ðе найдено определение типа Ð´Ð»Ñ \"{0}\".", + "goToTypeDefinition.generic.noResults": "Ðе найдено определение типа.", + "meta.typeDefinitions.title": "— {0} определений типов", + "actions.goToTypeDefinition.label": "Перейти к определению типа", + "actions.peekTypeDefinition.label": "Показать определение типа" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json b/i18n/rus/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json new file mode 100644 index 00000000000..a403ef380f2 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Щелкните, чтобы отобразить Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ ({0})." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/gotoError/gotoError.i18n.json b/i18n/rus/src/vs/editor/contrib/gotoError/gotoError.i18n.json new file mode 100644 index 00000000000..5ca181d11bd --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/gotoError/gotoError.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Перейти к Ñледующей ошибке или предупреждению", + "markerAction.previous.label": "Перейти к предыдущей ошибке или предупреждению", + "editorMarkerNavigationError": "Цвет ошибки в мини-приложении навигации по меткам редактора.", + "editorMarkerNavigationWarning": "Цвет Ð¿Ñ€ÐµÐ´ÑƒÐ¿Ñ€ÐµÐ¶Ð´ÐµÐ½Ð¸Ñ Ð² мини-приложении навигации по меткам редактора.", + "editorMarkerNavigationInfo": "Цвет информационного ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð² мини-приложении навигации по меткам редактора.", + "editorMarkerNavigationBackground": "Фон мини-Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ð¸ по меткам редактора." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/hover/hover.i18n.json b/i18n/rus/src/vs/editor/contrib/hover/hover.i18n.json new file mode 100644 index 00000000000..61fdcdb90de --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/hover/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Показать при наведении" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/hover/modesContentHover.i18n.json b/i18n/rus/src/vs/editor/contrib/hover/modesContentHover.i18n.json new file mode 100644 index 00000000000..afb4cd39d72 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/hover/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Идет загрузка..." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json b/i18n/rus/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json new file mode 100644 index 00000000000..49cfabc0148 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Заменить предыдущим значением", + "InPlaceReplaceAction.next.label": "Заменить Ñледующим значением" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/indentation/indentation.i18n.json b/i18n/rus/src/vs/editor/contrib/indentation/indentation.i18n.json new file mode 100644 index 00000000000..6f61e049156 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/indentation/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Преобразовать отÑтуп в пробелы", + "indentationToTabs": "Преобразовать отÑтуп в шаги табулÑции", + "configuredTabSize": "ÐаÑтроенный размер шага табулÑции", + "selectTabWidth": "Выбрать размер шага табулÑции Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ файла", + "indentUsingTabs": "ОтÑтуп Ñ Ð¸Ñпользованием табулÑции", + "indentUsingSpaces": "ОтÑтуп Ñ Ð¸Ñпользованием пробелов", + "detectIndentation": "Определение отÑтупа от Ñодержимого", + "editor.reindentlines": "Повторно раÑÑтавить отÑтупы Ñтрок" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json b/i18n/rus/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json new file mode 100644 index 00000000000..26b632bbca2 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Копировать Ñтроку Ñверху", + "lines.copyDown": "Копировать Ñтроку Ñнизу", + "lines.moveUp": "ПеремеÑтить Ñтроку вверх", + "lines.moveDown": "ПеремеÑтить Ñтроку вниз", + "lines.sortAscending": "Сортировка Ñтрок по возраÑтанию", + "lines.sortDescending": "Сортировка Ñтрок по убыванию", + "lines.trimTrailingWhitespace": "Удалить конечные Ñимволы-разделители", + "lines.delete": "Удалить Ñтроку", + "lines.indent": "Увеличить отÑтуп", + "lines.outdent": "Уменьшить отÑтуп", + "lines.insertBefore": "Ð’Ñтавить Ñтроку выше", + "lines.insertAfter": "Ð’Ñтавить Ñтроку ниже", + "lines.deleteAllLeft": "Удалить вÑе Ñлева", + "lines.deleteAllRight": "Удалить вÑе Ñправа", + "lines.joinLines": "_Объединить Ñтроки", + "editor.transpose": "ТранÑпонировать Ñимволы вокруг курÑора", + "editor.transformToUppercase": "Преобразовать в верхний региÑтр", + "editor.transformToLowercase": "Преобразовать в нижний региÑтр" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/links/links.i18n.json b/i18n/rus/src/vs/editor/contrib/links/links.i18n.json new file mode 100644 index 00000000000..0e2b04db373 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/links/links.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Щелкните Ñ Ð½Ð°Ð¶Ð°Ñ‚Ð¾Ð¹ клавишей Cmd, чтобы перейти по ÑÑылке", + "links.navigate": "Щелкните Ñ Ð½Ð°Ð¶Ð°Ñ‚Ð¾Ð¹ клавишей Ctrl, чтобы перейти по ÑÑылке", + "links.command.mac": "Ð”Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ щелкните ее, ÑƒÐ´ÐµÑ€Ð¶Ð¸Ð²Ð°Ñ Ð½Ð°Ð¶Ð°Ñ‚Ð¾Ð¹ клавишу CMD", + "links.command": "Ð”Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ щелкните ее, ÑƒÐ´ÐµÑ€Ð¶Ð¸Ð²Ð°Ñ Ð½Ð°Ð¶Ð°Ñ‚Ð¾Ð¹ клавишу CTRL", + "links.navigate.al": "Щелкните Ñ Ð½Ð°Ð¶Ð°Ñ‚Ð¾Ð¹ клавишей ALT, чтобы перейти по ÑÑылке.", + "links.command.al": "Ð”Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ щелкните ее, ÑƒÐ´ÐµÑ€Ð¶Ð¸Ð²Ð°Ñ Ð½Ð°Ð¶Ð°Ñ‚Ð¾Ð¹ клавишу ALT", + "invalid.url": "Ðе удалоÑÑŒ открыть ÑÑылку, так как она имеет неправильный формат: {0}", + "missing.url": "Ðе удалоÑÑŒ открыть ÑÑылку, у нее отÑутÑтвует целевой объект.", + "label": "Открыть ÑÑылку" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/multicursor/multicursor.i18n.json b/i18n/rus/src/vs/editor/contrib/multicursor/multicursor.i18n.json new file mode 100644 index 00000000000..660193a943e --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/multicursor/multicursor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Добавить курÑор выше", + "mutlicursor.insertBelow": "Добавить курÑор ниже", + "mutlicursor.insertAtEndOfEachLineSelected": "Добавить курÑоры к окончаниÑм Ñтрок", + "addSelectionToNextFindMatch": "Добавить выделение в Ñледующее найденное Ñовпадение", + "addSelectionToPreviousFindMatch": "Добавить выделенный фрагмент в предыдущее найденное Ñовпадение", + "moveSelectionToNextFindMatch": "ПеремеÑтить поÑледнее выделение в Ñледующее найденное Ñовпадение", + "moveSelectionToPreviousFindMatch": "ПеремеÑтить поÑледний выделенный фрагмент в предыдущее найденное Ñовпадение", + "selectAllOccurrencesOfFindMatch": "Выбрать вÑе Ð²Ñ…Ð¾Ð¶Ð´ÐµÐ½Ð¸Ñ Ð½Ð°Ð¹Ð´ÐµÐ½Ð½Ñ‹Ñ… Ñовпадений", + "changeAll.label": "Изменить вÑе вхождениÑ" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json b/i18n/rus/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json new file mode 100644 index 00000000000..cd5e78cf6b8 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Переключить подÑказки к параметрам" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json new file mode 100644 index 00000000000..c4092de0c2f --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, подÑказка" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/rus/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json new file mode 100644 index 00000000000..f12b3174d4c --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Показать иÑÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ ({0})", + "quickFix": "Показать иÑправлениÑ", + "quickfix.trigger.label": "БыÑтрое иÑправление" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json new file mode 100644 index 00000000000..6f6dde161df --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Закрыть" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json b/i18n/rus/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json new file mode 100644 index 00000000000..32ab4f7dea8 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": " — ÑÑылки {0}", + "references.action.label": "Ðайти вÑе ÑÑылки" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json b/i18n/rus/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json new file mode 100644 index 00000000000..bc424e9b7e3 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Идет загрузка..." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json b/i18n/rus/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json new file mode 100644 index 00000000000..88bbf853904 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "ÑÑылка в {0} в Ñтроке {1} и Ñимволе {2}", + "aria.fileReferences.1": "1 Ñимвол в {0}, полный путь: {1}", + "aria.fileReferences.N": "{0} Ñимволов в {1}, полный путь: {2} ", + "aria.result.0": "Результаты не найдены", + "aria.result.1": "Обнаружен 1 Ñимвол в {0}", + "aria.result.n1": "Обнаружено {0} Ñимволов в {1}", + "aria.result.nm": "Обнаружено {0} Ñимволов в {1} файлах" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json new file mode 100644 index 00000000000..9b523c27fc1 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Ðе удалоÑÑŒ разрешить файл.", + "referencesCount": "СÑылок: {0}", + "referenceCount": "{0} ÑÑылка", + "missingPreviewMessage": "предварительный проÑмотр недоÑтупен", + "treeAriaLabel": "СÑылки", + "noResults": "Результаты отÑутÑтвуют", + "peekView.alternateTitle": "СÑылки", + "peekViewTitleBackground": "Цвет фона облаÑти заголовка быÑтрого редактора.", + "peekViewTitleForeground": "Цвет заголовка быÑтрого редактора.", + "peekViewTitleInfoForeground": "Цвет Ñведений о заголовке быÑтрого редактора.", + "peekViewBorder": "Цвет границ быÑтрого редактора и маÑÑива.", + "peekViewResultsBackground": "Цвет фона в ÑпиÑке результатов предÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð±Ñ‹Ñтрого редактора.", + "peekViewResultsMatchForeground": "Цвет переднего плана узлов Ñтроки в ÑпиÑке результатов быÑтрого редактора.", + "peekViewResultsFileForeground": "Цвет переднего плана узлов файла в ÑпиÑке результатов быÑтрого редактора.", + "peekViewResultsSelectionBackground": "Цвет фона выбранной запиÑи в ÑпиÑке результатов быÑтрого редактора.", + "peekViewResultsSelectionForeground": "Цвет переднего плана выбранной запиÑи в ÑпиÑке результатов быÑтрого редактора.", + "peekViewEditorBackground": "Цвет фона быÑтрого редактора.", + "peekViewEditorGutterBackground": "Цвет фона Ð¿Ð¾Ð»Ñ Ð² окне быÑтрого редактора.", + "peekViewResultsMatchHighlight": "Цвет Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ñовпадений в ÑпиÑке результатов быÑтрого редактора.", + "peekViewEditorMatchHighlight": "Цвет Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ñовпадений в быÑтром редакторе." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/rename/rename.i18n.json b/i18n/rus/src/vs/editor/contrib/rename/rename.i18n.json new file mode 100644 index 00000000000..10cdfc7238d --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/rename/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Результаты отÑутÑтвуют.", + "aria": "«{0}» уÑпешно переименован в «{1}». Сводка: {2}", + "rename.failed": "Ðе удалоÑÑŒ переименовать.", + "rename.label": "Переименовать Ñимвол" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/rename/renameInputField.i18n.json b/i18n/rus/src/vs/editor/contrib/rename/renameInputField.i18n.json new file mode 100644 index 00000000000..8d52949bcbb --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/rename/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Введите новое Ð¸Ð¼Ñ Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð½Ñ‹Ñ… данных и нажмите клавишу ВВОД Ð´Ð»Ñ Ð¿Ð¾Ð´Ñ‚Ð²ÐµÑ€Ð¶Ð´ÐµÐ½Ð¸Ñ." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json b/i18n/rus/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json new file mode 100644 index 00000000000..937d51a9e11 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Развернуть выделение", + "smartSelect.shrink": "Сжать выделение" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/suggest/suggestController.i18n.json b/i18n/rus/src/vs/editor/contrib/suggest/suggestController.i18n.json new file mode 100644 index 00000000000..b93db54e42c --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/suggest/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "При принÑтии \"{0}\" был добавлен Ñледующий текÑÑ‚: \"{1}\"", + "suggest.trigger.label": "Переключить предложение" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/suggest/suggestWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/suggest/suggestWidget.i18n.json new file mode 100644 index 00000000000..ef1bb257b47 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/suggest/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "Цвет фона виджета подÑказок.", + "editorSuggestWidgetBorder": "Цвет границ виджета подÑказок.", + "editorSuggestWidgetForeground": "Цвет переднего плана мини-Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¿Ñ€ÐµÐ´Ð»Ð¾Ð¶ÐµÐ½Ð¸Ð¹.", + "editorSuggestWidgetSelectedBackground": "Фоновый цвет выбранной запиÑи в мини-приложении предложений.", + "editorSuggestWidgetHighlightForeground": "Цвет Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ ÑоответÑÑ‚Ð²Ð¸Ñ Ð² мини-приложении предложений.", + "readMore": "Подробнее...{0}", + "suggestionWithDetailsAriaLabel": "{0}, предложение, Ñодержит данные", + "suggestionAriaLabel": "{0}, предложение", + "readLess": "Кратко...{0}", + "suggestWidget.loading": "Идет загрузка...", + "suggestWidget.noSuggestions": "ÐŸÑ€ÐµÐ´Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¾Ñ‚ÑутÑтвуют.", + "suggestionAriaAccepted": "{0}, принÑто", + "ariaCurrentSuggestionWithDetails": "{0}, предложение, Ñодержит данные", + "ariaCurrentSuggestion": "{0}, предложение" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json b/i18n/rus/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json new file mode 100644 index 00000000000..f9af3519019 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Переключение клавиши TAB перемещает фокуÑ." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json b/i18n/rus/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json new file mode 100644 index 00000000000..ab058cc24db --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Цвет фона Ñимвола при доÑтупе на чтение, например Ñчитывании переменной.", + "wordHighlightStrong": "Цвет фона Ñимвола при доÑтупе на запиÑÑŒ, например запиÑи переменной.", + "overviewRulerWordHighlightForeground": "Цвет метки линейки в окне проÑмотра Ð´Ð»Ñ Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ð¹ Ñимволов.", + "overviewRulerWordHighlightStrongForeground": "Цвет метки линейки в окне проÑмотра Ð´Ð»Ñ Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ð¹ Ñимволов, доÑтупных Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи. ", + "wordHighlight.next.label": "Перейти к Ñледующему выделению Ñимволов", + "wordHighlight.previous.label": "Перейти к предыдущему выделению Ñимволов" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/rus/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index a0674557251..8b6ad71cd4e 100644 --- a/i18n/rus/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/rus/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -3,7 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "notFound": "РаÑширение не найдено", - "noCompatible": "Ðе удалоÑÑŒ найти верÑию {0}, ÑовмеÑтимую Ñ Ñтой верÑией кода." -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/rus/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index 16024062ff7..44292b6a1de 100644 --- a/i18n/rus/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/rus/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,11 +6,10 @@ { "invalidManifest": "ÐедопуÑтимое раÑширение: package.json не ÑвлÑетÑÑ Ñ„Ð°Ð¹Ð»Ð¾Ð¼ JSON.", "restartCodeLocal": "ПерезапуÑтите код перед переуÑтановкой {0}.", - "restartCodeGallery": "ПерезапуÑтите Code перед повторной уÑтановкой.", + "cancel": "Отмена", "uninstallDependeciesConfirmation": "Ð’Ñ‹ хотите удалить \"{0}\" отдельно или вмеÑте Ñ Ð·Ð°Ð²Ð¸ÑимоÑÑ‚Ñми?", "uninstallOnly": "Только", "uninstallAll": "Ð’Ñе", - "cancel": "Отмена", "uninstallConfirmation": "Ð’Ñ‹ дейÑтвительно хотите удалить \"{0}\"?", "ok": "ОК", "singleDependentError": "Ðе удаетÑÑ ÑƒÐ´Ð°Ð»Ð¸Ñ‚ÑŒ раÑширение \"{0}\". От него завиÑит раÑширение \"{1}\".", diff --git a/i18n/rus/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/rus/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json new file mode 100644 index 00000000000..305c47b7195 --- /dev/null +++ b/i18n/rus/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "view": "ПроÑмотр" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 86a745f5204..4dba80c961d 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -33,6 +33,7 @@ "openPreviousEditor": "Открыть предыдущий редактор", "nextEditorInGroup": "Открыть Ñледующий редактор в группе", "openPreviousEditorInGroup": "Открыть предыдущий редактор в группе", + "lastEditorInGroup": "Открыть поÑледний редактор в группе", "navigateNext": "Далее", "navigatePrevious": "Ðазад", "navigateLast": "Перейти к поÑледнему", diff --git a/i18n/rus/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index c2081565e8f..769c14c870b 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,7 +6,6 @@ { "editorCommand.activeEditorMove.description": "Перемещение активного редактора по вкладкам или группам", "editorCommand.activeEditorMove.arg.name": "Ðргумент Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð°ÐºÑ‚Ð¸Ð²Ð½Ð¾Ð³Ð¾ редактора", - "editorCommand.activeEditorMove.arg.description": "СвойÑтва аргумента:\n\t\t\t\t\t\t* 'to': Ñтроковое значение, указывающее направление перемещениÑ.\n\t\t\t\t\t\t* 'by': Ñтроковое значение, указывающее единицу Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ (вкладка или группа).\n\t\t\t\t\t\t* 'value': чиÑловое значение, указывающее количеÑтво позиций Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ абÑолютную позицию, на которую необходимо перемеÑтить.\n\t\t\t\t\t", "commandDeprecated": "Команда **{0}** удалена. ВмеÑто нее можно иÑпользовать **{1}**", "openKeybindings": "ÐаÑтройка Ñочетаний клавиш" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index c38e7f9a12a..b72594a677c 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -52,6 +52,5 @@ "screenReaderDetectedExplanation.question": "Ð’Ñ‹ иÑпользуете ÑредÑтво Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ñ Ñкрана в VS Code?", "screenReaderDetectedExplanation.answerYes": "Да", "screenReaderDetectedExplanation.answerNo": "Ðет", - "screenReaderDetectedExplanation.body1": "Теперь Ñреда VS Code оптимизирована Ð´Ð»Ñ ÑредÑтва Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ñ Ñкрана.", - "screenReaderDetectedExplanation.body2": "Ðекоторые функции редактора (например, Ð¿ÐµÑ€ÐµÐ½Ð¾Ñ Ñлов, Ñворачивание, автоматичеÑÐºÐ°Ñ Ð²Ñтавка закрывающих Ñкобок и Ñ‚.д.) будут работать по-другому." + "screenReaderDetectedExplanation.body1": "Теперь Ñреда VS Code оптимизирована Ð´Ð»Ñ ÑредÑтва Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ñ Ñкрана." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/quickopen.i18n.json b/i18n/rus/src/vs/workbench/browser/quickopen.i18n.json index b1992b59c50..2ef796eee29 100644 --- a/i18n/rus/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/quickopen.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "noResultsMatching": "Ðет ÑоответÑтвующих результатов", - "noResultsFound2": "Результаты не найдены", - "entryAriaLabel": "{0}, команда" + "noResultsFound2": "Результаты не найдены" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json index be259940bc0..0af36ba16b2 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json @@ -30,7 +30,7 @@ "openRecent": "Открыть поÑледние...", "quickOpenRecent": "БыÑтро открыть поÑледние...", "closeMessages": "Закрыть уведомлениÑ", - "reportIssues": "Сообщить о проблемах", + "reportIssueInEnglish": "Сообщить об ошибке", "reportPerformanceIssue": "Сообщать о проблемах производительноÑти", "keybindingsReference": "Справочник по ÑочетаниÑм клавиш", "openDocumentationUrl": "ДокументациÑ", @@ -47,5 +47,14 @@ "showNextWindowTab": "Показать Ñледующую вкладку в окне", "moveWindowTabToNewWindow": "ПеремеÑтить вкладку окна в новое окно", "mergeAllWindowTabs": "Объединить вÑе окна", - "toggleWindowTabsBar": "Переключить панель вкладок окна" + "toggleWindowTabsBar": "Переключить панель вкладок окна", + "configureLocale": "ÐаÑтроить Ñзык", + "displayLanguage": "ОпределÑет Ñзык интерфейÑа VSCode.", + "doc": "СпиÑок поддерживаемых Ñзыков Ñм. в {0}.", + "restart": "Ð”Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñ‚Ñ€ÐµÐ±ÑƒÐµÑ‚ÑÑ Ð¿ÐµÑ€ÐµÐ·Ð°Ð¿ÑƒÑк VSCode.", + "fail.createSettings": "Ðевозможно Ñоздать \"{0}\" ({1}).", + "debug": "Отладка", + "info": "СведениÑ", + "warn": "Предупреждение", + "err": "Ошибка" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json index 62c0bd21813..fc3f719ff28 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,8 +7,8 @@ "view": "ПроÑмотреть", "help": "Справка", "file": "Файл", - "workspaces": "Рабочие облаÑти", "developer": "Разработчик", + "workspaces": "Рабочие облаÑти", "showEditorTabs": "ОпределÑет, должны ли открытые редакторы отображатьÑÑ Ð½Ð° вкладках или нет.", "workbench.editor.labelFormat.default": "Отображать Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°. ЕÑли вкладки включены и в одной группе еÑть два файла Ñ Ð¾Ð´Ð¸Ð½Ð°ÐºÐ¾Ð²Ñ‹Ð¼Ð¸ именами, то к имени каждого из Ñтих файлов будут добавлены различающиеÑÑ Ñ‡Ð°Ñти пути. ЕÑли вкладки отключены, то Ð´Ð»Ñ Ð°ÐºÑ‚Ð¸Ð²Ð½Ð¾Ð³Ð¾ редактора отображаетÑÑ Ð¿ÑƒÑ‚ÑŒ по отношению к папке рабочей облаÑти.", "workbench.editor.labelFormat.short": "Отображать Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° и Ð¸Ð¼Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð°.", @@ -26,18 +26,16 @@ "closeOnFocusLost": "УправлÑет автоматичеÑким закрытием Quick Open при потере фокуÑа.", "openDefaultSettings": "УправлÑет открытием редактора Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸ÐµÐ¼ вÑех наÑтроек по умолчанию при открытии наÑтроек.", "sideBarLocation": "ОпределÑет раÑположение боковой панели: Ñлева или Ñправа от рабочего меÑта.", - "panelLocation": "ОпределÑет раÑположение панели: Ñнизу или Ñправа от рабочего меÑта.", "statusBarVisibility": "УправлÑет видимоÑтью Ñтроки ÑоÑтоÑÐ½Ð¸Ñ Ð² нижней чаÑти рабочего меÑта.", "activityBarVisibility": "УправлÑет видимоÑтью панели дейÑтвий на рабочем меÑте.", "closeOnFileDelete": "ОпределÑет, Ñледует ли автоматичеÑки закрывать редакторы, когда отображаемый в них файл удален или переименован другим процеÑÑом. При отключении Ñтой функции редактор оÑтаетÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ñ‹Ð¼ в качеÑтве черновика. Обратите внимание, что при удалении из Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¾Ñ€ закрываетÑÑ Ð²Ñегда и что файлы черновиков никогда не закрываютÑÑ Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ….", - "experimentalFuzzySearchEndpoint": "Указывает конечную точку, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð±ÑƒÐ´ÐµÑ‚ иÑпользоватьÑÑ Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка Ñ ÑкÑпериментальными параметрами.", - "experimentalFuzzySearchKey": "Указывает ключ, иÑпользуемый Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка Ñ ÑкÑпериментальными параметрами.", "fontAliasing": "УправлÑет методом ÑÐ³Ð»Ð°Ð¶Ð¸Ð²Ð°Ð½Ð¸Ñ ÑˆÑ€Ð¸Ñ„Ñ‚Ð¾Ð² в рабочей облаÑти.-по умолчанию: ÑубпикÑельное Ñглаживание шрифтов; позволит добитьÑÑ Ð¼Ð°ÐºÑимальной четкоÑти текÑта на большинÑтве диÑплеев за иÑключением Retina - Ñглаживание: Ñглаживание шрифтов на уровне пикÑелей, в отличие от ÑубпикÑельного ÑглаживаниÑ; позволит Ñделать шрифт более Ñветлым в целом - нет: Ñглаживание шрифтов отключено; текÑÑ‚ будет отображатьÑÑ Ñ Ð½ÐµÑ€Ð¾Ð²Ð½Ñ‹Ð¼Ð¸ оÑтрыми краÑми ", "workbench.fontAliasing.default": "СубпикÑельное Ñглаживание шрифтов; позволит добитьÑÑ Ð¼Ð°ÐºÑимальной четкоÑти текÑта на большинÑтве диÑплеев за иÑключением Retina.", "workbench.fontAliasing.antialiased": "Сглаживание шрифтов на уровне пикÑелей, в отличие от ÑубпикÑельного ÑглаживаниÑ. Может Ñделать шрифт Ñветлее в целом.", "workbench.fontAliasing.none": "Отключает Ñглаживание шрифтов; текÑÑ‚ будет отображатьÑÑ Ñ Ð½ÐµÑ€Ð¾Ð²Ð½Ñ‹Ð¼Ð¸ оÑтрыми краÑми.", "swipeToNavigate": "ПереключайтеÑÑŒ между открытыми файлами, Ð¿Ñ€Ð¾Ð²Ð¾Ð´Ñ Ð¿Ð¾ Ñкрану по горизонтали Ñ‚Ñ€ÐµÐ¼Ñ Ð¿Ð°Ð»ÑŒÑ†Ð°Ð¼Ð¸.", "workbenchConfigurationTitle": "Workbench", + "windowConfigurationTitle": "Окно", "window.openFilesInNewWindow.on": "Файлы будут открыватьÑÑ Ð² новом окне.", "window.openFilesInNewWindow.off": "Файлы будут открыватьÑÑ Ð² окне Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¾Ð¹ папкой файлов или поÑледнем активном окне.", "window.openFilesInNewWindow.default": "Файлы будут открыватьÑÑ Ð² окне Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¾Ð¹ папкой файлов или поÑледнем активном окне, еÑли они не открываютÑÑ Ð¸Ð· панели Dock или ÑиÑтемы поиÑка (только macOS).", @@ -69,11 +67,11 @@ "autoDetectHighContrast": "ЕÑли включено, будет выполнÑтьÑÑ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑкий переход к выÑококонтраÑтной теме, еÑли в Windows иÑпользуетÑÑ Ñ‚ÐµÐ¼Ð° выÑокой контраÑтноÑти, или к темной теме при выходе из темы выÑокой контраÑтноÑти Windows.", "titleBarStyle": "ÐаÑтройка внешнего вида заголовка окна. Чтобы применить изменениÑ, потребуетÑÑ Ð¿Ð¾Ð»Ð½Ñ‹Ð¹ перезапуÑк.", "window.nativeTabs": "Включает вкладки окна macOS Sierra. Обратите внимание, что Ð´Ð»Ñ Ð¿Ñ€Ð¸Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñтих изменений потребуетÑÑ Ð¿Ð¾Ð»Ð½Ð°Ñ Ð¿ÐµÑ€ÐµÐ·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ°, и что Ð´Ð»Ñ Ð²Ñех внутренних вкладок будет отключен пользовательÑкий Ñтиль заголовка, еÑли он был наÑтроен.", - "windowConfigurationTitle": "Окно", "zenModeConfigurationTitle": "Режим Zen", "zenMode.fullScreen": "ОпределÑет, будет ли переключение в режим Zen переключать рабочее проÑтранÑтво в полноÑкранный режим.", "zenMode.hideTabs": "ОпределÑет, будет ли включение режима Zen также Ñкрывать вкладки рабочего меÑта.", "zenMode.hideStatusBar": "ОпределÑет, будет ли включение режима Zen также Ñкрывать Ñтроку ÑоÑтоÑÐ½Ð¸Ñ Ð² нижней чаÑти рабочего меÑта.", "zenMode.hideActivityBar": "ОпределÑет, будет ли при включении режима Zen Ñкрыта панель дейÑтвий в левой чаÑти рабочей облаÑти.", - "zenMode.restore": "ОпределÑет, должно ли окно воÑÑтанавливатьÑÑ Ð² режиме Zen, еÑли закрылоÑÑŒ в режиме Zen." + "zenMode.restore": "ОпределÑет, должно ли окно воÑÑтанавливатьÑÑ Ð² режиме Zen, еÑли закрылоÑÑŒ в режиме Zen.", + "JsonSchema.locale": "Язык пользовательÑкого интерфейÑа." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index fca987ec803..1378489d276 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -30,7 +30,6 @@ "deactivateBreakpoints": "Отключить точки оÑтанова", "reapplyAllBreakpoints": "Повторно применить вÑе точки оÑтанова", "addFunctionBreakpoint": "Добавить точку оÑтанова в функции", - "renameFunctionBreakpoint": "Переименовать точку оÑтанова в функции", "addConditionalBreakpoint": "Добавить уÑловную точку оÑтанова…", "editConditionalBreakpoint": "Изменить точку оÑтанова…", "setValue": "Задать значение", diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json new file mode 100644 index 00000000000..9d0545aa308 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editConditionalBreakpoint": "Изменить точку оÑтанова…", + "functionBreakpointsNotSupported": "Точки оÑтанова функций не поддерживаютÑÑ Ð² Ñтом типе отладки", + "functionBreakpointPlaceholder": "ФункциÑ, в которой производитÑÑ Ð¾Ñтанов", + "functionBreakPointInputAriaLabel": "Введите точку оÑтанова в функции" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json new file mode 100644 index 00000000000..4cec9f05c1e --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "callstackSection": "Раздел Ñтека вызовов", + "debugStopped": "ПриоÑтановлено на {0}", + "callStackAriaLabel": "Отладка Ñтека вызовов", + "process": "ПроцеÑÑ", + "paused": "ПриоÑтановлено", + "running": "Работает", + "thread": "Поток", + "pausedOn": "ПриоÑтановлено на {0}", + "loadMoreStackFrames": "Загрузить больше кадров Ñтека", + "threadAriaLabel": "Поток {0}, Ñтек вызовов, отладка", + "stackFrameAriaLabel": "Кадр Ñтека {0}, Ñтрока {1} {2}, Ñтек вызовов, отладка" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index cae64165643..1f995f9f60b 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,6 @@ "breakpointAdded": "Добавлена точка оÑтанова: Ñтрока {0}, файл {1}", "breakpointRemoved": "Удалена точка оÑтанова: Ñтрока {0}, файл {1}", "compoundMustHaveConfigurations": "Ð”Ð»Ñ ÑоÑтавного Ñлемента должен быть задан атрибут configurations Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка неÑкольких конфигураций.", - "configMissing": "ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ \"{0}\" отÑутÑтвует в launch.json.", "debugRequestNotSupported": "Ðтрибут '{0}' имеет неподдерживаемое значение '{1}' в выбранной конфигурации отладки.", "debugRequesMissing": "Ð’ выбранной конфигурации отладки отÑутÑтвует атрибут '{0}'.", "debugTypeNotSupported": "ÐаÑтроенный тип отладки \"{0}\" не поддерживаетÑÑ.", diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json new file mode 100644 index 00000000000..3eb2647fe99 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Раздел переменных", + "variablesAriaTreeLabel": "Отладка переменных", + "variableValueAriaLabel": "Введите новое значение переменной", + "variableScopeAriaLabel": "ОблаÑть {0}, переменные, отладка", + "variableAriaLabel": "{0} значение {1}, переменные, отладка" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json new file mode 100644 index 00000000000..10eba135555 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expressionsSection": "Раздел выражений", + "watchAriaTreeLabel": "Отладка выражений контрольных значений", + "watchExpressionPlaceholder": "Выражение Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ñ‹Ð¼ значением", + "watchExpressionInputAriaLabel": "Введите выражение контрольного значениÑ", + "watchExpressionAriaLabel": "{0} значение {1}, контрольное значение, отладка", + "watchVariableAriaLabel": "{0} значение {1}, контрольное значение, отладка" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 18a5d06c06b..c0c171b628c 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -10,16 +10,12 @@ "Uninstalling": "Идет удаление", "updateAction": "Обновить", "updateTo": "Обновить до {0}", - "enableForWorkspaceAction.label": "Включить (Ñ€Ð°Ð±Ð¾Ñ‡Ð°Ñ Ð¾Ð±Ð»Ð°Ñть)", - "enableAlwaysAction.label": "Включать (вÑегда)", - "disableForWorkspaceAction.label": "Отключить (Ñ€Ð°Ð±Ð¾Ñ‡Ð°Ñ Ð¾Ð±Ð»Ð°Ñть)", - "disableAlwaysAction.label": "Отключать (вÑегда)", "ManageExtensionAction.uninstallingTooltip": "Идет удаление", - "enableForWorkspaceAction": "Ð Ð°Ð±Ð¾Ñ‡Ð°Ñ Ð¾Ð±Ð»Ð°Ñть", - "enableGloballyAction": "Ð’Ñегда", + "enableForWorkspaceAction": "Включить (Ñ€Ð°Ð±Ð¾Ñ‡Ð°Ñ Ð¾Ð±Ð»Ð°Ñть)", + "enableGloballyAction": "Включить", "enableAction": "Включить", - "disableForWorkspaceAction": "Ð Ð°Ð±Ð¾Ñ‡Ð°Ñ Ð¾Ð±Ð»Ð°Ñть", - "disableGloballyAction": "Ð’Ñегда", + "disableForWorkspaceAction": "Отключить (Ñ€Ð°Ð±Ð¾Ñ‡Ð°Ñ Ð¾Ð±Ð»Ð°Ñть)", + "disableGloballyAction": "Отключить", "disableAction": "Отключить", "checkForUpdates": "Проверка обновлений", "enableAutoUpdate": "Включить автоматичеÑкое обновление раÑширений", @@ -47,11 +43,8 @@ "allExtensionsInstalled": "Ð’Ñе рекомендуемые раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ñтой рабочей облаÑти уже уÑтановлены", "installRecommendedExtension": "УÑтановить рекомендуемое раÑширение", "extensionInstalled": "Рекомендуемое раÑширение уже уÑтановлено", - "showRecommendedKeymapExtensions": "Показать рекомендуемые раÑкладки клавиатуры", "showRecommendedKeymapExtensionsShort": "РаÑкладки клавиатуры", - "showLanguageExtensions": "Показать раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ñзыка", "showLanguageExtensionsShort": "РаÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ñзыка", - "showAzureExtensions": "Показать раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Azure", "showAzureExtensionsShort": "РаÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Azure", "OpenExtensionsFile.failed": "Ðе удаетÑÑ Ñоздать файл \"extensions.json\" в папке \".vscode\" ({0}).", "configureWorkspaceRecommendedExtensions": "ÐаÑтроить рекомендуемые раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ (Ñ€Ð°Ð±Ð¾Ñ‡Ð°Ñ Ð¾Ð±Ð»Ð°Ñть)", diff --git a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 957fb1a214b..ecf99790051 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -9,7 +9,7 @@ "extension": "РаÑширение", "extensions": "РаÑширениÑ", "view": "ПроÑмотреть", + "developer": "Разработчик", "extensionsConfigurationTitle": "РаÑширениÑ", - "extensionsAutoUpdate": "ÐвтоматичеÑки обновлÑть раÑширениÑ", - "extensionsIgnoreRecommendations": "Игнорировать рекомендации по раÑширениÑм" + "extensionsAutoUpdate": "ÐвтоматичеÑки обновлÑть раÑширениÑ" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json new file mode 100644 index 00000000000..d813ae7a27e --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reportExtensionIssue": "Сообщить об ошибке" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json new file mode 100644 index 00000000000..a01d559fbf1 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "folders": "Папки" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json new file mode 100644 index 00000000000..821930bfc87 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Файл", + "revealInSideBar": "Показать в боковой панели", + "acceptLocalChanges": "ИÑпользовать Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¸ перезапиÑать Ñодержимое диÑка", + "revertLocalChanges": "Отменить Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¸ вернутьÑÑ Ðº Ñодержимому на диÑке" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json new file mode 100644 index 00000000000..c601c781bde --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -0,0 +1,72 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Повторить попытку", + "rename": "Переименовать", + "newFile": "Создать файл", + "newFolder": "Создать папку", + "openFolderFirst": "Сначала откройте папку, в которой будут Ñозданы файлы и папки.", + "newUntitledFile": "Ðовый файл без имени", + "createNewFile": "Создать файл", + "createNewFolder": "Создать папку", + "deleteButtonLabelRecycleBin": "&&ПеремеÑтить в корзину", + "deleteButtonLabelTrash": "&&ПеремеÑтить в удаленные", + "deleteButtonLabel": "&&Удалить", + "dirtyMessageFolderOneDelete": "Ð’Ñ‹ удалÑете папку Ñ Ð½ÐµÑохраненными изменениÑми в одном файле. Ð’Ñ‹ хотите продолжить?", + "dirtyMessageFolderDelete": "Ð’Ñ‹ удалÑете папку Ñ Ð½ÐµÑохраненными изменениÑми в неÑкольких файлах ({0}). Ð’Ñ‹ хотите продолжить?", + "dirtyMessageFileDelete": "Ð’Ñ‹ удалÑете файл Ñ Ð½ÐµÑохраненными изменениÑми. Ð’Ñ‹ хотите продолжить?", + "dirtyWarning": "ЕÑли не Ñохранить изменениÑ, они будут утерÑны.", + "confirmMoveTrashMessageFolder": "Ð’Ñ‹ дейÑтвительно хотите удалить папку \"{0}\" и ее Ñодержимое?", + "confirmMoveTrashMessageFile": "Ð’Ñ‹ дейÑтвительно хотите удалить \"{0}\"?", + "undoBin": "Ð’Ñ‹ можете выполнить воÑÑтановление из корзины.", + "undoTrash": "Ð’Ñ‹ можете выполнить воÑÑтановление из корзины.", + "doNotAskAgain": "Больше не Ñпрашивать", + "confirmDeleteMessageFolder": "Ð’Ñ‹ дейÑтвительно хотите удалить папку \"{0}\" и ее Ñодержимое без возможноÑти воÑÑтановлениÑ?", + "confirmDeleteMessageFile": "Ð’Ñ‹ дейÑтвительно хотите удалить \"{0}\" без возможноÑти воÑÑтановлениÑ?", + "irreversible": "Это дейÑтвие необратимо.", + "permDelete": "Удалить навÑегда", + "delete": "Удалить", + "importFiles": "Импорт файлов", + "confirmOverwrite": "Файл или папка Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем уже ÑущеÑтвует в конечной папке. Заменить их?", + "replaceButtonLabel": "Заменить", + "copyFile": "Копировать", + "pasteFile": "Ð’Ñтавить", + "duplicateFile": "Дублировать", + "openToSide": "Открыть Ñбоку", + "compareSource": "Выбрать Ð´Ð»Ñ ÑравнениÑ", + "globalCompareFile": "Сравнить активный файл Ñ...", + "openFileToCompare": "Чтобы Ñравнить файл Ñ Ð´Ñ€ÑƒÐ³Ð¸Ð¼ файлом, Ñначала откройте его.", + "compareWith": "Сравнить '{0}' Ñ '{1}'", + "compareFiles": "Сравнить файлы", + "refresh": "Обновить", + "save": "Сохранить", + "saveAs": "Сохранить как...", + "saveAll": "Сохранить вÑе", + "saveAllInGroup": "Сохранить вÑе в группе", + "revert": "Отменить Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² файле", + "focusOpenEditors": "Ð¤Ð¾ÐºÑƒÑ Ð½Ð° предÑтавлении открытых редакторов", + "focusFilesExplorer": "Ð¤Ð¾ÐºÑƒÑ Ð½Ð° проводнике", + "showInExplorer": "Показать активный файл в боковой панели", + "openFileToShow": "Сначала откройте файл Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð² обозревателе.", + "collapseExplorerFolders": "Свернуть папки в проводнике", + "refreshExplorer": "Обновить окно проводника", + "openFileInNewWindow": "Открыть активный файл в новом окне", + "openFileToShowInNewWindow": "Чтобы открыть файл в новом окне, Ñначала откройте его.", + "revealInWindows": "Отобразить в проводнике", + "revealInMac": "Отобразить в Finder", + "openContainer": "Открыть Ñодержащую папку", + "revealActiveFileInWindows": "Отобразить активный файл в проводнике", + "revealActiveFileInMac": "Отобразить активный файл в Finder", + "openActiveFileContainer": "Открыть папку, Ñодержащую активный файл", + "copyPath": "Скопировать путь", + "copyPathOfActive": "Копировать путь к активному файлу", + "emptyFileNameError": "Ðеобходимо указать Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° или папки.", + "fileNameExistsError": "Файл или папка **{0}** уже ÑущеÑтвует в данном раÑположении. Выберите другое имÑ.", + "invalidFileNameError": "Ð˜Ð¼Ñ **{0}** недопуÑтимо Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð° или папки. Выберите другое имÑ.", + "filePathTooLongError": "Из-за иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¸Ð¼ÐµÐ½Ð¸ **{0}** путь Ñлишком длинный. Выберите более короткое имÑ.", + "compareWithSaved": "Сравнить активный файл Ñ Ñохраненным", + "modifiedLabel": "{0} (на диÑке) ↔ {1}" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json new file mode 100644 index 00000000000..f51fb88b34b --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Чтобы Ñкопировать путь к файлу, Ñначала откройте его", + "openFileToReveal": "Чтобы отобразить файл, Ñначала откройте его" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json new file mode 100644 index 00000000000..d0ffe58b0f9 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Показать проводник", + "explore": "Проводник", + "view": "ПроÑмотр", + "textFileEditor": "Редактор текÑтовых файлов", + "binaryFileEditor": "Редактор двоичных файлов", + "filesConfigurationTitle": "Файлы", + "exclude": "ÐаÑтройте Ñтандартные маÑки Ð´Ð»Ñ Ð¸ÑÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð² и папок. Этот параметр влиÑет, например, на Ñкрытые и отображаемые файлы в проводнике.", + "files.exclude.boolean": "Ð¡Ñ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ð°Ñ Ð¼Ð°Ñка, ÑоответÑÑ‚Ð²ÑƒÑŽÑ‰Ð°Ñ Ð¿ÑƒÑ‚Ñм к файлам. Задайте значение true или false, чтобы включить или отключить маÑку.", + "files.exclude.when": "Ð”Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ° Ñлементов того же ÑƒÑ€Ð¾Ð²Ð½Ñ ÑоответÑтвующего файла. ИÑпользуйте $(basename) в качеÑтве переменной Ð´Ð»Ñ ÑоответÑтвующего имени файла.", + "associations": "ÐаÑтройте ÑопоÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð² Ñ Ñзыками (например, \"*.extension\": \"html\"). У них будет приоритет перед заданными по умолчанию ÑопоÑтавлениÑми уÑтановленных Ñзыков.", + "encoding": "Кодировка по умолчанию, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÐµÐ¼Ð°Ñ Ð¿Ñ€Ð¸ чтении и запиÑи файлов. Этот параметр также можно наÑтроить Ð´Ð»Ñ Ð¾Ñ‚Ð´ÐµÐ»ÑŒÐ½Ñ‹Ñ… Ñзыков.", + "autoGuessEncoding": "ЕÑли Ñтот параметр уÑтановлен, то при открытии файла будет предпринÑта попытка определить кодировку Ñимволов. Этот параметр также можно наÑтроить Ð´Ð»Ñ Ð¾Ñ‚Ð´ÐµÐ»ÑŒÐ½Ñ‹Ñ… Ñзыков.", + "eol": "Символ конца Ñтроки по умолчанию. ИÑпользуйте \\n Ð´Ð»Ñ LF и \\r\\n Ð´Ð»Ñ CRLF.", + "trimTrailingWhitespace": "ЕÑли Ñтот параметр включен, при Ñохранении файла будут удалены концевые пробелы.", + "insertFinalNewline": "ЕÑли Ñтот параметр включен, при Ñохранении файла в его конец вÑтавлÑетÑÑ Ñ„Ð¸Ð½Ð°Ð»ÑŒÐ½Ð°Ñ Ð½Ð¾Ð²Ð°Ñ Ñтрока.", + "trimFinalNewlines": "ЕÑли Ñтот параметр уÑтановлен, то при Ñохранении файла будут удалены вÑе новые Ñтроки за поÑледней новой Ñтрокой в конце файла.", + "files.autoSave.off": "\"ГрÑзный\" файл не ÑохранÑетÑÑ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑки.", + "files.autoSave.afterDelay": "\"ГрÑзный\" файл автоматичеÑки ÑохранÑетÑÑ Ð¿Ð¾ иÑтечении Ñрока \"files.autoSaveDelay\".", + "files.autoSave.onFocusChange": "\"ГрÑзный\" файл автоматичеÑки ÑохранÑетÑÑ Ð¿Ñ€Ð¸ потере фокуÑа редактором.", + "files.autoSave.onWindowChange": "\"ГрÑзный\" файл автоматичеÑки ÑохранÑетÑÑ Ð¿Ñ€Ð¸ потере фокуÑа окном.", + "autoSave": "УправлÑет автоматичеÑким Ñохранением \"грÑзных\" файлов. ДопуÑтимые значениÑ: \"{0}\", \"{1}\", \"{2}\" (редактор терÑет фокуÑ) и \"{3}\" (окно терÑет фокуÑ). ЕÑли задано значение \"{4}\", можно наÑтроить задержку в \"files.autoSaveDelay\".", + "autoSaveDelay": "ОпределÑет задержку в мÑ, поÑле которой измененный файл ÑохранÑетÑÑ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑки. ДейÑтвует, только еÑли параметр \"files.autoSave\" имеет значение \"{0}\".", + "watcherExclude": "ÐаÑтройте Ñтандартные маÑки путей файлов, которые Ñледует иÑключить из ÑпиÑка отÑлеживаемых файлов. Пути должны ÑоответÑтвовать полным путÑм (Ñ‚.е. Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð¾Ð³Ð¾ ÑопоÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½ÐµÐ¾Ð±Ñ…Ð¾Ð´Ð¸Ð¼Ð¾ указывать ** в начале неполного пути или указывать полные пути). ПоÑле Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñтого параметра потребуетÑÑ Ð¿ÐµÑ€ÐµÐ·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ°. ЕÑли отображаетÑÑ Ñообщение \"Код потреблÑет большое количеÑтво процеÑÑорного времени при запуÑке\" можно иÑключить большие папки, чтобы уменьшить начальную нагрузку.", + "hotExit.off": "Отключите \"горÑчий\" выход.", + "hotExit.onExit": "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ \"горÑчий выход\" будет активирована при закрытии приложениÑ, то еÑть при закрытии поÑледнего окна в Windows или Linux или при активации команды workbench.action.quit (палитра команд, наÑтраиваемое Ñочетание клавиш, меню). Ð’Ñе окна Ñ Ñ€ÐµÐ·ÐµÑ€Ð²Ð½Ñ‹Ð¼Ð¸ копиÑми будут воÑÑтановлены при Ñледующем запуÑке.", + "hotExit.onExitAndWindowClose": "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ \"горÑчий выход\" будет активирована при закрытии приложениÑ, то еÑть при закрытии поÑледнего окна в Windows или Linux или при активации команды workbench.action.quit (Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ палитры команд, наÑтраиваемого ÑÐ¾Ñ‡ÐµÑ‚Ð°Ð½Ð¸Ñ ÐºÐ»Ð°Ð²Ð¸Ñˆ или пункта меню), а также Ð´Ð»Ñ Ð»ÑŽÐ±Ñ‹Ñ… окон Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ñ‹Ð¼Ð¸ папками незавиÑимо от того, ÑвлÑетÑÑ Ð»Ð¸ Ñто окно поÑледним. Ð’Ñе окна без открытых папок будут воÑÑтановлены при Ñледующем запуÑке. Чтобы воÑÑтановить иÑходное ÑоÑтоÑние окон Ñ Ð¿Ð°Ð¿ÐºÐ°Ð¼Ð¸, уÑтановите параметр \"window.restoreWindows\" в значение \"all\".", + "hotExit": "ОпределÑет, запоминаютÑÑ Ð»Ð¸ неÑохраненные файлы между ÑеанÑами. Ð’ Ñтом Ñлучае приглашение на их Ñохранение при выходе из редактора не поÑвлÑетÑÑ.", + "useExperimentalFileWatcher": "ИÑпользовать новое ÑкÑпериментальное ÑредÑтво Ð½Ð°Ð±Ð»ÑŽÐ´ÐµÐ½Ð¸Ñ Ð·Ð° файлами.", + "defaultLanguage": "Режим Ñзыка по умолчанию, который назначаетÑÑ Ð½Ð¾Ð²Ñ‹Ð¼ файлам.", + "editorConfigurationTitle": "Редактор", + "formatOnSave": "Форматирование файла при Ñохранении. Модуль Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð¾Ð»Ð¶ÐµÐ½ быть доÑтупен, файл не должен ÑохранÑтьÑÑ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑки, а работа редактора не должна завершатьÑÑ.", + "explorerConfigurationTitle": "Проводник", + "openEditorsVisible": "ЧиÑло редакторов, отображаемых на панели открытых редакторов. Задайте значение 0, чтобы Ñкрыть панель.", + "dynamicHeight": "ОпределÑет, будет ли выÑота раздела открытых редакторов динамичеÑки адаптироватьÑÑ Ðº количеÑтву Ñлементов.", + "autoReveal": "ОпределÑет, будет ли проводник автоматичеÑки отображать и выбирать файлы при их открытии.", + "enableDragAndDrop": "ОпределÑет, разрешено ли перемещение файлов и папок перетаÑкиванием в проводнике.", + "confirmDragAndDrop": "ОпределÑет, должно ли запрашиватьÑÑ Ð¿Ð¾Ð´Ñ‚Ð²ÐµÑ€Ð¶Ð´ÐµÐ½Ð¸Ðµ при перемещении файлов и папок в проводнике.", + "confirmDelete": "ОпределÑет, должно ли запрашиватьÑÑ Ð¿Ð¾Ð´Ñ‚Ð²ÐµÑ€Ð¶Ð´ÐµÐ½Ð¸Ðµ при удалении файла в корзину.", + "sortOrder.default": "Файлы и папки ÑортируютÑÑ Ð¿Ð¾ именам в алфавитном порÑдке. Папки отображаютÑÑ Ð¿ÐµÑ€ÐµÐ´ файлами.", + "sortOrder.mixed": "Файлы и папки ÑортируютÑÑ Ð¿Ð¾ именам в алфавитном порÑдке. Файлы чередуютÑÑ Ñ Ð¿Ð°Ð¿ÐºÐ°Ð¼Ð¸.", + "sortOrder.filesFirst": "Файлы и папки ÑортируютÑÑ Ð¿Ð¾ именам в алфавитном порÑдке. Файлы отображаютÑÑ Ð¿ÐµÑ€ÐµÐ´ папками. ", + "sortOrder.type": "Файлы и папки ÑортируютÑÑ Ð¿Ð¾ раÑширениÑм в алфавитном порÑдке. Папки отображаютÑÑ Ð¿ÐµÑ€ÐµÐ´ файлами.", + "sortOrder.modified": "Файлы и папки ÑортируютÑÑ Ð¿Ð¾ дате поÑледнего Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² порÑдке убываниÑ. Папки отображаютÑÑ Ð¿ÐµÑ€ÐµÐ´ файлами.", + "sortOrder": "УправлÑет порÑдком Ñортировки файлов и папок в проводнике. ÐарÑду Ñ Ñортировкой по умолчанию можно уÑтановить Ñледующие варианты Ñортировки: 'mixed' (файлы и папки ÑортируютÑÑ Ð²Ð¼ÐµÑте), 'type' (по типу файла), 'modified' (по дате поÑледнего изменениÑ) и 'filesFirst' (Ñортировать файлы перед папками).", + "explorer.decorations.colors": "ОпределÑет, Ñледует ли иÑпользовать цвета в декораторах файла.", + "explorer.decorations.badges": "ОпределÑет, Ñледует ли иÑпользовать Ñмблемы в декораторах файла. " +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json new file mode 100644 index 00000000000..d5622eec39a --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "userGuide": "ИÑпользуйте команды на панели инÑтрументов редактора Ñправа Ð´Ð»Ñ **отмены** изменений или **перезапиÑи** Ñодержимого на диÑке Ñ ÑƒÑ‡ÐµÑ‚Ð¾Ð¼ Ñтих изменений", + "discard": "Отмена", + "overwrite": "ПерезапиÑать", + "retry": "Повторить попытку", + "readonlySaveError": "Ðе удалоÑÑŒ Ñохранить \"{0}\": файл защищен от запиÑи. Чтобы ÑнÑть защиту, нажмите \"ПерезапиÑать\".", + "genericSaveError": "Ðе удалоÑÑŒ Ñохранить \"{0}\": {1}", + "staleSaveError": "Ðе удалоÑÑŒ Ñохранить \"{0}\": Ñодержимое на диÑке более новое. Чтобы Ñравнить Ñвою верÑию Ñ Ð²ÐµÑ€Ñией на диÑке, нажмите **Сравнить**.", + "compareChanges": "Сравнить", + "saveConflictDiffLabel": "{0} (на диÑке) ↔ {1} (в {2}) - Разрешить конфликт ÑохранениÑ" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json new file mode 100644 index 00000000000..5c9b67b2669 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Ðет открытой папки", + "explorerSection": "Раздел проводника", + "noFolderHelp": "Ð’Ñ‹ еще не открыли папку.", + "openFolder": "Открыть папку" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json new file mode 100644 index 00000000000..3a4c179faa0 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label": "Проводник", + "canNotResolve": "Ðе удаетÑÑ Ñ€Ð°Ð·Ñ€ÐµÑˆÐ¸Ñ‚ÑŒ папку рабочей облаÑти" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json new file mode 100644 index 00000000000..d89fe12ed35 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Раздел проводника", + "treeAriaLabel": "Проводник" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json new file mode 100644 index 00000000000..620852a6f18 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Введите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°. Ðажмите клавишу ВВОД, чтобы подтвердить введенные данные, или ESCAPE Ð´Ð»Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ñ‹.", + "filesExplorerViewerAriaLabel": "{0}, Проводник", + "addFolders": "&&Добавить папки", + "addFolder": "&&Добавить папку", + "confirmMove": "Ð’Ñ‹ дейÑтвительно хотите перемеÑтить '{0}'?", + "doNotAskAgain": "Больше не Ñпрашивать", + "moveButtonLabel": "&&ПеремеÑтить", + "confirmOverwriteMessage": "{0} уже ÑущеÑтвует в целевой папке. Заменить его?", + "irreversible": "Это дейÑтвие необратимо.", + "replaceButtonLabel": "Заменить" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json new file mode 100644 index 00000000000..ecfb243efe9 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Открытые редакторы", + "openEditosrSection": "Раздел открытых редакторов", + "dirtyCounter": "Ðе Ñохранено: {0}", + "saveAll": "Сохранить вÑе", + "closeAllUnmodified": "Закрыть без изменений", + "closeAll": "Закрыть вÑе", + "compareWithSaved": "Сравнить Ñ Ñохраненным", + "close": "Закрыть", + "closeOthers": "Закрыть другие" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json new file mode 100644 index 00000000000..863c0a79ec8 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, группа редакторов", + "openEditorAriaLabel": "{0}, открытый редактор", + "saveAll": "Сохранить вÑе", + "closeAllUnmodified": "Закрыть без изменений", + "closeAll": "Закрыть вÑе", + "compareWithSaved": "Сравнить Ñ Ñохраненным", + "close": "Закрыть", + "closeOthers": "Закрыть другие" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/rus/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/rus/src/vs/workbench/parts/markers/common/messages.i18n.json index df6b024772e..2729294f21e 100644 --- a/i18n/rus/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,8 +6,6 @@ { "viewCategory": "ПроÑмотреть", "problems.view.toggle.label": "Показать/Ñкрыть проблемы", - "problems.view.show.label": "Показать проблемы", - "problems.view.hide.label": "Скрыть проблемы", "problems.panel.configuration.title": "ПредÑтавление \"Проблемы\"", "problems.panel.configuration.autoreveal": "ОпределÑет, Ñледует ли предÑтавлению \"Проблемы\" отображать файлы при их открытии", "markers.panel.title.problems": "Проблемы", diff --git a/i18n/rus/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json b/i18n/rus/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json new file mode 100644 index 00000000000..e53e26469ea --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "prof.message": "Профили уÑпешно Ñозданы.", + "prof.detail": "Создайте проблему и вручную вложите Ñледующие файлы:\n{0}", + "prof.restartAndFileIssue": "Создать проблему и выполнить перезапуÑк", + "prof.restart": "ПерезапуÑтить", + "prof.thanks": "СпаÑибо за помощь.", + "prof.detail.restart": "Ð”Ð»Ñ Ð¿Ñ€Ð¾Ð´Ð¾Ð»Ð¶ÐµÐ½Ð¸Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñ '{0}' необходимо еще раз перезагрузить ÑиÑтему. Благодарим Ð²Ð°Ñ Ð·Ð° учаÑтие." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 134c08226bb..209030a10b2 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defineKeybinding.initial": "Ðажмите нужное Ñочетание клавиш, а затем — ВВОД. Ðажмите клавишу ESC Ð´Ð»Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ñ‹.", "defineKeybinding.chordsTo": "Ðккорд длÑ" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index 4338bc61e7b..e686b8d481f 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -26,6 +26,7 @@ "editKeybindingLabel": "Изменить наÑтраиваемое Ñочетание клавиш", "addKeybindingLabelWithKey": "Добавить наÑтраиваемое Ñочетание клавиш {0}", "addKeybindingLabel": "Добавить наÑтраиваемое Ñочетание клавиш", + "title": "{0} ({1})", "commandAriaLabel": "Команда: {0}.", "keybindingAriaLabel": "ÐаÑтраиваемое Ñочетание клавиш: {0}.", "noKeybinding": "Ðет назначенных наÑтраиваемых Ñочетаний клавиш.", diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index de15465f5cd..329b7f8c4b7 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -7,12 +7,12 @@ "settingsEditorName": "Параметры по умолчанию", "SearchSettingsWidget.AriaLabel": "Параметры поиÑка", "SearchSettingsWidget.Placeholder": "Параметры поиÑка", - "totalSettingsMessage": "Ð’Ñего параметров: {0}", "noSettingsFound": "Ðет результатов", "oneSettingFound": "Один ÑоответÑтвующий параметр", "settingsFound": "СоответÑтвующих параметров: {0}", - "fileEditorWithInputAriaLabel": "{0}. Редактор текÑтовых файлов.", - "fileEditorAriaLabel": "Редактор текÑтовых файлов.", + "totalSettingsMessage": "Ð’Ñего параметров: {0}", + "defaultSettings": "Параметры по умолчанию", + "defaultFolderSettings": "Параметры папок по умолчанию", "defaultEditorReadonly": "Редактировать в правой облаÑти редактора, чтобы переопределить Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾ умолчанию.", "preferencesAriaLabel": "Параметры по умолчанию. ТекÑтовый редактор только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 140a93428bc..32f4adc90d9 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -7,8 +7,6 @@ "emptyUserSettingsHeader": "Укажите параметры здеÑÑŒ, чтобы перезапиÑать параметры по умолчанию.", "emptyWorkspaceSettingsHeader": "Укажите параметры здеÑÑŒ, чтобы перезапиÑать параметры пользователей.", "emptyFolderSettingsHeader": "Укажите параметры папок здеÑÑŒ, чтобы перезапиÑать параметры рабочих облаÑтей.", - "defaultFolderSettingsTitle": "Параметры папок по умолчанию", - "defaultSettingsTitle": "Параметры по умолчанию", "editTtile": "Изменить", "replaceDefaultValue": "Заменить в параметрах", "copyDefaultValue": "Копировать в параметры", diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index 46adf092d08..ef7dc4d8783 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultSettingsFuzzyPrompt": "Попробуйте нечеткий поиÑк!", "defaultSettings": "Чтобы переопределить параметры по умолчанию, укажите Ñвои параметры в облаÑти Ñправа.", "noSettingsFound": "Параметры не найдены.", - "folderSettingsDetails": "Параметры папок", - "enableFuzzySearch": "Включить ÑкÑпериментальный нечеткий поиÑк" + "settingsSwitcherBarAriaLabel": "Переключатель параметров", + "userSettings": "Параметры пользователÑ", + "workspaceSettings": "Параметры рабочей облаÑти" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json new file mode 100644 index 00000000000..afbf76af53c --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Редактор наÑтроек по умолчанию", + "keybindingsEditor": "Редактор наÑтраиваемых Ñочетаний клавиш", + "preferences": "Параметры" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json index d61548e8be2..dc3203c75ba 100644 --- a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -6,7 +6,6 @@ { "scm providers": "ПоÑтавщики ÑиÑтем ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð²ÐµÑ€ÑиÑми", "hideRepository": "Скрыть", - "commitMessage": "Message (press {0} to commit)", "installAdditionalSCMProviders": "УÑтановить дополнительных поÑтавщиков SCM...", "no open repo": "ОтÑутÑтвуют активные поÑтавщики ÑиÑтем ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð²ÐµÑ€ÑиÑми.", "source control": "СиÑтема ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð²ÐµÑ€ÑиÑми", diff --git a/i18n/rus/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/rus/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index 0cf1e2835de..cd29f7f88b8 100644 --- a/i18n/rus/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultLabel": "ввод", - "useIgnoreFilesDescription": "ИÑпользование пропуÑка файлов", - "useExcludeSettingsDescription": "ИÑпользовать параметры иÑключениÑ" + "defaultLabel": "ввод" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/search/browser/search.contribution.i18n.json index 3eafd57dd44..fb91734ab3b 100644 --- a/i18n/rus/src/vs/workbench/parts/search/browser/search.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -16,7 +16,6 @@ "exclude.boolean": "Ð¡Ñ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ð°Ñ Ð¼Ð°Ñка, ÑоответÑÑ‚Ð²ÑƒÑŽÑ‰Ð°Ñ Ð¿ÑƒÑ‚Ñм к файлам. Задайте значение true или false, чтобы включить или отключить маÑку.", "exclude.when": "Ð”Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ° Ñлементов того же ÑƒÑ€Ð¾Ð²Ð½Ñ ÑоответÑтвующего файла. ИÑпользуйте $(basename) в качеÑтве переменной Ð´Ð»Ñ ÑоответÑтвующего имени файла.", "useRipgrep": "ОпределÑет, Ñледует ли иÑпользовать ripgrep в текÑтовом поиÑке и в поиÑке по файлам", - "useIgnoreFilesByDefault": "ОпределÑет, Ñледует ли иÑпользовать GITIGNORE- и IGNORE-файлы по умолчанию при поиÑке текÑта в новой рабочей облаÑти.", "useIgnoreFiles": "ОпределÑет, Ñледует ли иÑпользовать GITIGNORE- и IGNORE-файлы по умолчанию при поиÑке файлов.", "search.quickOpen.includeSymbols": "ÐаÑтройте Ð´Ð»Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ð¾Ð² поиÑка глобальных Ñимволов в файлы по запроÑу Ð´Ð»Ñ Quick Open.", "search.followSymlinks": "ОпределÑет, нужно ли Ñледовать ÑимволичеÑким ÑÑылкам при поиÑке." diff --git a/i18n/rus/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/rus/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 3243bdde9a8..acbdea84856 100644 --- a/i18n/rus/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -10,17 +10,14 @@ "previousSearchExcludePattern": "Показать предыдущий шаблон иÑÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¸Ð· поиÑка", "nextSearchTerm": "Показать Ñледующее уÑловие поиÑка", "previousSearchTerm": "Показать предыдущее уÑловие поиÑка", - "focusNextInputBox": "Ð¤Ð¾ÐºÑƒÑ Ð½Ð° Ñледующем поле ввода", - "focusPreviousInputBox": "Ð¤Ð¾ÐºÑƒÑ Ð½Ð° предыдущем поле ввода", "showSearchViewlet": "Показать ÑредÑтво поиÑка", "findInFiles": "Ðайти в файлах", "findInFilesWithSelectedText": "Ðайти в файлах Ñ Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼ текÑтом", "replaceInFiles": "Заменить в файлах", "replaceInFilesWithSelectedText": "Заменить в файлах Ñ Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼ текÑтом", - "findInWorkspace": "Ðайти в рабочей облаÑти...", - "findInFolder": "Ðайти в папке...", "RefreshAction.label": "Обновить", - "ClearSearchResultsAction.label": "ОчиÑтить результаты поиÑка", + "CollapseDeepestExpandedLevelAction.label": "Свернуть вÑе", + "ClearSearchResultsAction.label": "ОчиÑтить", "FocusNextSearchResult.label": "Перейти к Ñледующему результату поиÑка.", "FocusPreviousSearchResult.label": "Перейти к предыдущему результату поиÑка.", "RemoveAction.label": "Отклонить", diff --git a/i18n/rus/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json new file mode 100644 index 00000000000..fb91734ab3b --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Перейти к Ñимволу в рабочей облаÑти...", + "name": "ПоиÑк", + "search": "ПоиÑк", + "view": "ПроÑмотр", + "openAnythingHandlerDescription": "Перейти к файлу", + "openSymbolDescriptionNormal": "Перейти к Ñимволу в рабочей облаÑти", + "searchOutputChannelTitle": "ПоиÑк", + "searchConfigurationTitle": "ПоиÑк", + "exclude": "ÐаÑтройте Ñтандартные маÑки Ð´Ð»Ñ Ð¸ÑÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð² и папок при поиÑке. Ð’Ñе Ñтандартные маÑки наÑледуютÑÑ Ð¾Ñ‚ параметра file.exclude.", + "exclude.boolean": "Ð¡Ñ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ð°Ñ Ð¼Ð°Ñка, ÑоответÑÑ‚Ð²ÑƒÑŽÑ‰Ð°Ñ Ð¿ÑƒÑ‚Ñм к файлам. Задайте значение true или false, чтобы включить или отключить маÑку.", + "exclude.when": "Ð”Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ° Ñлементов того же ÑƒÑ€Ð¾Ð²Ð½Ñ ÑоответÑтвующего файла. ИÑпользуйте $(basename) в качеÑтве переменной Ð´Ð»Ñ ÑоответÑтвующего имени файла.", + "useRipgrep": "ОпределÑет, Ñледует ли иÑпользовать ripgrep в текÑтовом поиÑке и в поиÑке по файлам", + "useIgnoreFiles": "ОпределÑет, Ñледует ли иÑпользовать GITIGNORE- и IGNORE-файлы по умолчанию при поиÑке файлов.", + "search.quickOpen.includeSymbols": "ÐаÑтройте Ð´Ð»Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ð¾Ð² поиÑка глобальных Ñимволов в файлы по запроÑу Ð´Ð»Ñ Quick Open.", + "search.followSymlinks": "ОпределÑет, нужно ли Ñледовать ÑимволичеÑким ÑÑылкам при поиÑке." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/rus/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 89b6fae2e75..2cba25f0f5e 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -6,9 +6,7 @@ { "tasksCategory": "Задачи", "ConfigureTaskRunnerAction.label": "ÐаÑтроить задачу", - "ConfigureBuildTaskAction.label": "ÐаÑтроить задачу Ñборки", "CloseMessageAction.label": "Закрыть", - "ShowTerminalAction.label": "ОзнакомитьÑÑ Ñ Ñ‚ÐµÑ€Ð¼Ð¸Ð½Ð°Ð»Ð¾Ð¼", "problems": "Проблемы", "manyMarkers": "99+", "runningTasks": "Показать выполнÑемые задачи", @@ -52,7 +50,6 @@ "TaslService.noEntryToRun": "Задача Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка не найдена. ÐаÑтройте задачи...", "TaskService.fetchingBuildTasks": "Получение задач Ñборки...", "TaskService.pickBuildTask": "Выберите задачу Ñборки Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка", - "TaskService.noBuildTask": "Задача Ñборки не найдена. ÐаÑтройте задачи... ", "TaskService.fetchingTestTasks": "Получение задач теÑтированиÑ...", "TaskService.pickTestTask": "Выберите задачу теÑÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка", "TaskService.noTestTaskTerminal": "ТеÑÑ‚Ð¾Ð²Ð°Ñ Ð·Ð°Ð´Ð°Ñ‡Ð° Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка не найдена. ÐаÑтройте задачи...", diff --git a/i18n/rus/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index a317034d2a3..1b0a682834e 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,8 +14,6 @@ "ConfigurationParser.noTypeDefinition": "Ошибка: тип задачи '{0}' не зарегиÑтрирован. Возможно, вы не уÑтановили раÑширение, которое предоÑтавлÑет ÑоответÑтвующий поÑтавщик задач.", "ConfigurationParser.missingRequiredProperty": "Ошибка: в конфигурации задачи '{0}' отÑутÑтвует необходимое ÑвойÑтво '{1}'. ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð·Ð°Ð´Ð°Ñ‡Ð¸ будет проигнорирована.", "ConfigurationParser.notCustom": "Ошибка: задачи не объÑвлены в качеÑтве пользовательÑкой задачи. ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð±ÑƒÐ´ÐµÑ‚ проигнорирована.\n{0}\n", - "ConfigurationParser.noTaskName": "Ошибка: задачи должны предоÑтавлÑть ÑвойÑтво taskName. Задача будет проигнорирована.\n{0}\n", - "taskConfiguration.shellArgs": "Предупреждение: задача \"{0}\" ÑвлÑетÑÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð¾Ð¹ оболочки, и Ð¸Ð¼Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ или одного из ее аргументов включает пробелы без escape-поÑледовательноÑти. Чтобы обеÑпечить правильную раÑÑтановку кавычек в командной Ñтроке, объедините аргументы в команде.", "taskConfiguration.noCommandOrDependsOn": "Ошибка: в задаче \"{0}\" не указаны ни команда, ни ÑвойÑтво dependsOn. Задача будет проигнорирована. Определение задачи:\n{1}", "taskConfiguration.noCommand": "Ошибка: задача \"{0}\" не определÑет команду. Задача будет игнорироватьÑÑ. Ее определение:\n{1}", "TaskParse.noOsSpecificGlobalTasks": "ВерÑÐ¸Ñ Ð·Ð°Ð´Ð°Ñ‡ 2.0.0 не поддерживает глобальные задачи Ð´Ð»Ñ ÐºÐ¾Ð½ÐºÑ€ÐµÑ‚Ð½Ñ‹Ñ… ОС. Преобразуйте их в задачи Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ команд Ð´Ð»Ñ ÐºÐ¾Ð½ÐºÑ€ÐµÑ‚Ð½Ñ‹Ñ… ОС.\nЗатронутые задачи: {0}" diff --git a/i18n/rus/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index bc758f05704..e321dc23923 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,7 +6,7 @@ { "termEntryAriaLabel": "{0}, ÑредÑтво выбора терминалов", "termCreateEntryAriaLabel": "{0}, Ñоздать новый терминал", - "'workbench.action.terminal.newplus": "$(plus) Создать новый интегрированный терминал", + "workbench.action.terminal.newplus": "$(plus) Создать новый интегрированный терминал", "noTerminalsMatching": "Терминалы, ÑоответÑтвующие уÑловию, отÑутÑтвуют", "noTerminalsFound": "Открытые терминалы отÑутÑтвуют" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 045380be606..b8da8b233eb 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,7 +16,6 @@ "terminal.integrated.rightClickCopyPaste": "ЕÑли задано, блокирует отображение контекÑтного меню при щелчке правой кнопкой мыши в терминале. ВмеÑто Ñтого будет выполнÑтьÑÑ ÐºÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ðµ выбранного Ñлемента и вÑтавка в облаÑть, в которой нет выбранных Ñлементов.", "terminal.integrated.fontFamily": "ОпределÑет ÑемейÑтво шрифтов терминала, значение по умолчанию — editor.fontFamily.", "terminal.integrated.fontSize": "ОпределÑет размер шрифта (в пикÑелÑÑ…) Ð´Ð»Ñ Ñ‚ÐµÑ€Ð¼Ð¸Ð½Ð°Ð»Ð°.", - "terminal.integrated.lineHeight": "ОпределÑет выÑоту Ñтроки терминала; Ñто чиÑло умножаетÑÑ Ð½Ð° размер шрифта терминала, что дает фактичеÑкую выÑоту Ñтроки в пикÑелÑÑ….", "terminal.integrated.enableBold": "Следует ли разрешить полужирный текÑÑ‚ в терминале. Эта Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° поддерживатьÑÑ Ð¾Ð±Ð¾Ð»Ð¾Ñ‡ÐºÐ¾Ð¹ терминала.", "terminal.integrated.cursorBlinking": "УправлÑет миганием курÑора терминала.", "terminal.integrated.cursorStyle": "ОпределÑет Ñтиль курÑора терминала.", diff --git a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index b252e0872aa..1296713c724 100644 --- a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -8,10 +8,9 @@ "installColorThemes": "УÑтановить дополнительные цветовые темы...", "themes.selectTheme": "Выберите цветовую тему (иÑпользуйте клавиши Ñтрелок вверх и вниз Ð´Ð»Ñ Ð¿Ñ€ÐµÐ´Ð²Ð°Ñ€Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾Ð³Ð¾ проÑмотра)", "selectIconTheme.label": "Тема значков файлов", - "installIconThemes": "УÑтановить дополнительные темы значков файлов...", "noIconThemeLabel": "Ðет", "noIconThemeDesc": "Отключить значки файлов", - "problemChangingIconTheme": "Проблема при задании темы значка: {0}", + "installIconThemes": "УÑтановить дополнительные темы значков файлов...", "themes.selectIconTheme": "Выбрать тему значка файла", "generateColorTheme.label": "Создать цветовую тему на оÑнове текущих параметров", "preferences": "Параметры", diff --git a/i18n/rus/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/rus/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 8915524eb9b..a2c3f05959f 100644 --- a/i18n/rus/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/rus/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -9,9 +9,9 @@ "scope.window.description": "ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð¾ÐºÐ½Ð°, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð¼Ð¾Ð¶ÐµÑ‚ быть задана в параметрах Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¸Ð»Ð¸ рабочей облаÑти.", "scope.resource.description": "Конфигурации реÑурÑов, которые могут быть заданы в параметрах пользователей, рабочих облаÑтей или папок.", "scope.description": "ОблаÑть, в которой применÑетÑÑ ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ. ДоÑтупные облаÑти — 'window' и 'resource'.", + "vscode.extension.contributes.defaultConfiguration": "ПредоÑтавлÑет параметры конфигурации редактора по умолчанию в ÑоответÑтвии Ñ Ñзыком.", "vscode.extension.contributes.configuration": "ДобавлÑет параметры конфигурации.", "invalid.title": "configuration.title должно быть Ñтрокой", - "vscode.extension.contributes.defaultConfiguration": "ПредоÑтавлÑет параметры конфигурации редактора по умолчанию в ÑоответÑтвии Ñ Ñзыком.", "invalid.properties": "configuration.properties должно быть объектом", "invalid.allOf": "Параметр 'configuration.allOf' ÑвлÑетÑÑ ÑƒÑтаревшим, и иÑпользовать его не рекомендуетÑÑ. ВмеÑто Ñтого передайте неÑколько параметров в виде маÑÑива в точку вклада 'configuration'.", "workspaceConfig.folders.description": "СпиÑок папок, которые будут загружены в рабочую облаÑть.", diff --git a/i18n/rus/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json b/i18n/rus/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json new file mode 100644 index 00000000000..b9b24e91bdb --- /dev/null +++ b/i18n/rus/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "ТелеметриÑ", + "telemetry.enableCrashReporting": "Разрешить отправку отчетов о ÑбоÑÑ… в МайкроÑофт.\nЧтобы Ñтот параметр вÑтупил в Ñилу, требуетÑÑ Ð¿ÐµÑ€ÐµÐ·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ°." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/rus/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index 6e3ff1bf5c1..8b6ad71cd4e 100644 --- a/i18n/rus/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "bubbleTitle": "Ñодержит выделенные Ñлементы" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/rus/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/rus/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/rus/src/vs/workbench/services/files/node/fileService.i18n.json index 6e032cd3874..9363e76f0d5 100644 --- a/i18n/rus/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/files/node/fileService.i18n.json @@ -8,8 +8,8 @@ "fileIsDirectoryError": "Файл ÑвлÑетÑÑ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð¾Ð¼", "fileNotModifiedError": "undefined", "fileTooLargeError": "Ðе удаетÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ файл, так как он имеет Ñлишком большой размер", - "fileBinaryError": "Похоже, файл ÑвлÑетÑÑ Ð´Ð²Ð¾Ð¸Ñ‡Ð½Ñ‹Ð¼, и его Ð½ÐµÐ»ÑŒÐ·Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ как текÑтовый.", "fileNotFoundError": "Файл не найден ({0})", + "fileBinaryError": "Похоже, файл ÑвлÑетÑÑ Ð´Ð²Ð¾Ð¸Ñ‡Ð½Ñ‹Ð¼, и его Ð½ÐµÐ»ÑŒÐ·Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ как текÑтовый.", "fileExists": "Создаваемый файл уже ÑущеÑтвует ({0})", "fileMoveConflict": "Ðевозможно перемеÑтить или Ñкопировать файл, так как он уже ÑущеÑтвует в папке назначениÑ.", "unableToMoveCopyError": "Ðевозможно перемеÑтить или Ñкопировать файл, так как он заменил бы папку, в которой ÑодержитÑÑ.", diff --git a/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index caff4f65c29..297bca0ac5f 100644 --- a/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -21,6 +21,5 @@ "keybindings.json.command": "Ð˜Ð¼Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ñемой команды", "keybindings.json.when": "УÑловие, когда клавиша нажата.", "keybindings.json.args": "Ðргументы, передаваемые в выполнÑемую команду.", - "keyboardConfigurationTitle": "Клавиатура", - "dispatch": "УправлÑет логикой диÑпетчеризации Ð´Ð»Ñ Ð½Ð°Ð¶Ð°Ñ‚Ð¸Ð¹ клавиш \"keydown.code\" (рекомендуетÑÑ) или \"keydown.keyCode\"." + "keyboardConfigurationTitle": "Клавиатура" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/rus/src/vs/workbench/services/textfile/common/textFileService.i18n.json index f01fee847aa..8b6ad71cd4e 100644 --- a/i18n/rus/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "files.backup.failSave": "Ðе удалоÑÑŒ выполнить резервное копирование файлов (ошибка: {0}). Попробуйте Ñохранить файлы, чтобы выйти." -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index e2aef412ef5..9cba5bba5fd 100644 --- a/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "migration.completed": "Ð’ параметры Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð±Ñ‹Ð»Ð¸ добавлены новые параметры темы. Ð ÐµÐ·ÐµÑ€Ð²Ð½Ð°Ñ ÐºÐ¾Ð¿Ð¸Ñ Ð´Ð¾Ñтупна в {0}.", "error.cannotloadtheme": "Unable to load {0}: {1}", - "error.cannotloadicontheme": "Unable to load {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Указывает тему значков, иÑпользуемую в рабочей облаÑти. Чтобы значки файлов не отображалиÑÑŒ, иÑпользуйте значение 'null'.", diff --git a/i18n/trk/extensions/git/out/autofetch.i18n.json b/i18n/trk/extensions/git/out/autofetch.i18n.json new file mode 100644 index 00000000000..95a3249f5f4 --- /dev/null +++ b/i18n/trk/extensions/git/out/autofetch.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yes": "Evet", + "no": "Hayır", + "not now": "Åžu An İstemiyorum", + "suggest auto fetch": "Otomatik Git depoları alımını etkinleÅŸtirmek ister misiniz?" +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/commands.i18n.json b/i18n/trk/extensions/git/out/commands.i18n.json index 91a6f890483..fac3c95bae7 100644 --- a/i18n/trk/extensions/git/out/commands.i18n.json +++ b/i18n/trk/extensions/git/out/commands.i18n.json @@ -9,9 +9,12 @@ "create branch": "$(plus) Yeni dal oluÅŸtur", "repourl": "Depo URL'si", "parent": "Üst Klasör", + "cancel": "$(sync~spin) Depo kopyalanıyor... İptal etmek için tıklayın", + "cancel tooltip": "Kopyalamayı iptal et", "cloning": "Git deposu kopyalanıyor...", "openrepo": "Depoyu Aç", "proposeopen": "Kopyalanan depoyu açmak ister misiniz?", + "init": "Git deposunun oluÅŸturulacağı çalışma alanı klasörünü seçin", "init repo": "Depo OluÅŸtur", "create repo": "Depo OluÅŸtur", "are you sure": "Bu, '{0}' dizininde bir Git deposu oluÅŸturacak. Devam etmek istediÄŸinizden emin misiniz?", @@ -49,12 +52,15 @@ "select branch to delete": "Silinecek dalı seçin", "confirm force delete branch": "'{0}' dalı tamamen birleÅŸtirilmemiÅŸ. Yine de silinsin mi?", "delete branch": "Dalı Sil", + "invalid branch name": "Geçersiz dal adı", + "branch already exists": "'{0}' adında bir dal zaten mevcut", "select a branch to merge from": "BirleÅŸtirilmesi için bir dal seçin", "merge conflicts": "BirleÅŸtirme çakışmaları var. Commit'lemeden önce bunları çözün.", "tag name": "Etiket adı", "provide tag name": "Lütfen bir etiket adı belirtin", "tag message": "Mesaj", "provide tag message": "Lütfen etikete açıklama yapmak için bir mesaj belirtin", + "no remotes to fetch": "Bu depoda alma iÅŸleminin yapılacağı hiçbir uzak uçbirim yapılandırılmamış.", "no remotes to pull": "Deponuzda çekme iÅŸleminin yapılacağı hiçbir uzak uçbirim yapılandırılmamış.", "pick remote pull repo": "Dalın çekileceÄŸi bir uzak uçbirim seçin", "no remotes to push": "Deponuzda gönderimin yapılacağı hiçbir uzak uçbirim yapılandırılmamış.", @@ -71,7 +77,7 @@ "no stashes": "Geri yüklenecek geçici deÄŸiÅŸiklik yok.", "pick stash to pop": "Geri yüklenecek ögeyi seçin", "clean repo": "GeçiÅŸ yapmadan önce deponuzdaki çalışma aÄŸacınızı temizleyin.", - "cant push": "BaÅŸvurular uzak uçbirime gönderilemiyor. DeÄŸiÅŸikliklerinizi entegre etmeden, ilk olarak 'Çek'i çalıştırın. ", + "cant push": "BaÅŸvurular uzak uçbirime gönderilemiyor. DeÄŸiÅŸikliklerinizi entegre etmeden, ilk olarak 'Çek'i çalıştırmayı deneyin. ", "git error details": "Git: {0}", "git error": "Git hatası", "open git log": "Git Günlüğünü Aç" diff --git a/i18n/trk/extensions/git/out/main.i18n.json b/i18n/trk/extensions/git/out/main.i18n.json index eda1b0cc9a9..34a8658c392 100644 --- a/i18n/trk/extensions/git/out/main.i18n.json +++ b/i18n/trk/extensions/git/out/main.i18n.json @@ -4,8 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "looking": "Git, ÅŸu konumda aranıyor: {0}", "using git": "{1} yolundaki git {0} kullanılıyor", - "updateGit": "Git'i Güncelle", + "downloadgit": "Git'i İndir", "neverShowAgain": "Tekrar gösterme", + "notfound": "Git bulunamadı. Git'i kurun veya 'git.path' ayarı ile yapılandırın.", + "updateGit": "Git'i Güncelle", "git20": "git {0} yüklemiÅŸ olarak görünüyorsunuz. Code, git >= 2 ile en iyi ÅŸekilde çalışır" } \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/repository.i18n.json b/i18n/trk/extensions/git/out/repository.i18n.json index 4f0f8a1a395..793421109b8 100644 --- a/i18n/trk/extensions/git/out/repository.i18n.json +++ b/i18n/trk/extensions/git/out/repository.i18n.json @@ -21,6 +21,7 @@ "deleted by us": "Bizim Tarafımızdan Silindi", "both added": "Her İkimiz de Ekledik", "both modified": "Her İkimiz de DeÄŸiÅŸtirdik", + "commitMessage": "Mesaj (commit'lemek için {0} tuÅŸlarına basın)", "commit": "Commit'le", "merge changes": "DeÄŸiÅŸiklikleri BirleÅŸtir", "staged changes": "Hazırlanmış DeÄŸiÅŸiklikler", diff --git a/i18n/trk/extensions/git/package.i18n.json b/i18n/trk/extensions/git/package.i18n.json index fdf41929b4d..3955baf58a0 100644 --- a/i18n/trk/extensions/git/package.i18n.json +++ b/i18n/trk/extensions/git/package.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "command.clone": "Klonla", + "command.clone": "Kopyala", "command.init": "Depo OluÅŸtur", "command.close": "Depoyu Kapat", "command.refresh": "Yenile", @@ -33,8 +33,10 @@ "command.checkout": "GeçiÅŸ yap...", "command.branch": "Dal OluÅŸtur...", "command.deleteBranch": "Dalı Sil...", + "command.renameBranch": "Dalı Yeniden Adlandır...", "command.merge": "Dalı BirleÅŸtir...", "command.createTag": "Etiket OluÅŸtur", + "command.fetch": "Al", "command.pull": "Çek", "command.pullRebase": "Çek (Yeniden Adresle)", "command.pullFrom": "Åžuradan Çek...", @@ -42,9 +44,11 @@ "command.pushTo": "Gönder...", "command.pushWithTags": "Etiketlerle Gönder", "command.sync": "Senkronize Et", + "command.syncRebase": "EÅŸitle (Yeniden Adresle)", "command.publish": "Dalı Yayınla", "command.showOutput": "Git Çıktısını Göster", "command.ignore": ".gitignore'a Dosya Ekle", + "command.stashIncludeUntracked": "Geçici Olarak Sakla(İzlenmeyenleri Dahil Et)", "command.stash": "Geçici Olarak Sakla", "command.stashPop": "Geçici Olarak Saklananı Geri Yükle...", "command.stashPopLatest": "En Son Geçici Olarak Saklananı Geri Yükle", @@ -57,6 +61,7 @@ "config.countBadge": "Git gösterge sayacını denetler. `all` tüm deÄŸiÅŸiklikleri sayar. `tracked` sadece izlenen deÄŸiÅŸikliklikleri sayar. `off` ise kapatır.", "config.checkoutType": "`GeçiÅŸ Yap...` çalıştırılırken listelenecek dal türlerini denetler. `all` tüm baÅŸvuruları gösterir, `local` sadece yerel dalları gösterir, `tags` sadece etiketleri gösterir ve `remote` sadece uzak uçbirim dallarını gösterir.", "config.ignoreLegacyWarning": "Eski Git uyarısını görmezden gelir", + "config.ignoreMissingGitWarning": "Git mevcut olmadığında uyarıyı yok sayar", "config.ignoreLimitWarning": "Bir depoda çok fazla deÄŸiÅŸiklik var uyarısını görmezden gelir", "config.defaultCloneDirectory": "Bir git deposunun kopyalanacağı varsayılan konum", "config.enableSmartCommit": "Hazırlanan deÄŸiÅŸiklik yoksa tüm deÄŸiÅŸiklikleri commit'le.", diff --git a/i18n/trk/extensions/markdown/out/commands.i18n.json b/i18n/trk/extensions/markdown/out/commands.i18n.json new file mode 100644 index 00000000000..58734fd8dcf --- /dev/null +++ b/i18n/trk/extensions/markdown/out/commands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previewTitle": "{0} Önizlemesi", + "onPreviewStyleLoadError": "'markdown.styles' yüklenemedi: {0}" +} \ No newline at end of file diff --git a/i18n/trk/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/trk/extensions/markdown/out/features/previewContentProvider.i18n.json new file mode 100644 index 00000000000..04c06b0e2dd --- /dev/null +++ b/i18n/trk/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "Bu belgedeki bazı içerikler devre dışı bırakıldı", + "preview.securityMessage.title": "Markdown önizlemesinde potansiyel olarak tehlikeli veya güvenli olmayan içerik devre dışı bırakıldı. Güvenli olmayan içeriÄŸe izin vermek veya betikleri etkinleÅŸtirmek için Markdown önizleme güvenlik ayarını deÄŸiÅŸtirin", + "preview.securityMessage.label": "İçerik Devre Dışı Güvenlik Uyarısı" +} \ No newline at end of file diff --git a/i18n/trk/extensions/markdown/out/security.i18n.json b/i18n/trk/extensions/markdown/out/security.i18n.json index fa3ecf1c124..b066062580e 100644 --- a/i18n/trk/extensions/markdown/out/security.i18n.json +++ b/i18n/trk/extensions/markdown/out/security.i18n.json @@ -11,5 +11,8 @@ "disable.title": "Devre Dışı Bırak", "disable.description": "Tüm içeriÄŸe ve betik yürütmeye izin ver. Tavsiye edilmez", "moreInfo.title": "Daha Fazla Bilgi", + "enableSecurityWarning.title": "Bu çalışma alanında önizleme güvenlik uyarılarını etkinleÅŸtir", + "disableSecurityWarning.title": "Bu çalışma alanında önizleme güvenlik uyarılarını devre dışı bırak", + "toggleSecurityWarning.description": "İçerik güvenlik seviyesini etkilemez", "preview.showPreviewSecuritySelector.title": "Bu çalışma alanında Markdown önizlemeleri için güvenlik ayarlarını seçin" } \ No newline at end of file diff --git a/i18n/trk/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/trk/extensions/merge-conflict/out/codelensProvider.i18n.json index 26571af8cf3..0476f24fb1e 100644 --- a/i18n/trk/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/trk/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "acceptCurrentChange": "Geçerli DeÄŸiÅŸikliÄŸi Kabul Et", + "acceptCurrentChange": "Mevcut DeÄŸiÅŸikliÄŸi Kabul Et", "acceptIncomingChange": "Gelen DeÄŸiÅŸikliÄŸi Kabul Et", "acceptBothChanges": "Her İki DeÄŸiÅŸikliÄŸi de Kabul Et", "compareChanges": "DeÄŸiÅŸiklikleri KarşılaÅŸtır" diff --git a/i18n/trk/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/trk/extensions/merge-conflict/out/commandHandler.i18n.json index 3811062c8a3..705fbc5a822 100644 --- a/i18n/trk/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/trk/extensions/merge-conflict/out/commandHandler.i18n.json @@ -5,9 +5,9 @@ // Do not edit this file. It is machine generated. { "cursorNotInConflict": "Düzenleyici imleci birleÅŸtirme çakışması içinde deÄŸil", - "compareChangesTitle": "{0}: Geçerli DeÄŸiÅŸiklikler ⟷ Gelen DeÄŸiÅŸiklikler", - "cursorOnCommonAncestorsRange": "Düzenleyici imleci ortak atalar bloÄŸunda, imleci lütfen \"geçerli\" veya \"gelen\" bloÄŸundan birine getirin", - "cursorOnSplitterRange": "Düzenleyici imleci birleÅŸtirme çakışması ayırıcısında, imleci lütfen \"geçerli\" veya \"gelen\" bloÄŸundan birine getirin", + "compareChangesTitle": "{0}: Mevcut DeÄŸiÅŸiklikler ⟷ Gelen DeÄŸiÅŸiklikler", + "cursorOnCommonAncestorsRange": "Düzenleyici imleci ortak atalar bloÄŸunda, imleci lütfen \"mevcut\" veya \"gelen\" bloÄŸundan birine getirin", + "cursorOnSplitterRange": "Düzenleyici imleci birleÅŸtirme çakışması ayırıcısında, imleci lütfen \"mevcut\" veya \"gelen\" bloÄŸundan birine getirin", "noConflicts": "Bu dosyada birleÅŸtirme çakışması bulunamadı", "noOtherConflictsInThisFile": "Bu dosyada baÅŸka birleÅŸtirme çakışması bulunamadı" } \ No newline at end of file diff --git a/i18n/trk/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/trk/extensions/merge-conflict/out/mergeDecorator.i18n.json index 4e7bccae262..3e7f492fb7d 100644 --- a/i18n/trk/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/trk/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "currentChange": "(Geçerli DeÄŸiÅŸiklik)", + "currentChange": "(Mevcut DeÄŸiÅŸiklik)", "incomingChange": "(Gelen DeÄŸiÅŸiklik)" } \ No newline at end of file diff --git a/i18n/trk/extensions/merge-conflict/package.i18n.json b/i18n/trk/extensions/merge-conflict/package.i18n.json index 75e7f2cd722..1752dca0d1b 100644 --- a/i18n/trk/extensions/merge-conflict/package.i18n.json +++ b/i18n/trk/extensions/merge-conflict/package.i18n.json @@ -5,9 +5,10 @@ // Do not edit this file. It is machine generated. { "command.category": "BirleÅŸtirme Çakışması", + "command.accept.all-current": "Mevcut Olan Tümünü Kabul Et", "command.accept.all-incoming": "Gelen Tümünü Kabul Et", "command.accept.all-both": "Tümünü Birden Kabul Et", - "command.accept.current": "Åžuan Geçerli Olanı Kabul Et", + "command.accept.current": "Mevcut Olanı Kabul Et", "command.accept.incoming": "Geleni Kabul Et", "command.accept.selection": "Seçimi Kabul Et", "command.accept.both": "Her İkisini de Kabul Et", diff --git a/i18n/trk/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/trk/extensions/typescript/out/features/completionItemProvider.i18n.json index 99dbe99b705..ee78a27da0a 100644 --- a/i18n/trk/extensions/typescript/out/features/completionItemProvider.i18n.json +++ b/i18n/trk/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "selectCodeAction": "Uygulanacak kod eylemini seçin", "acquiringTypingsLabel": "TuÅŸlamalar alınıyor...", "acquiringTypingsDetail": "IntelliSense için tuÅŸlama tanımları alınıyor...", "autoImportLabel": "{0} kaynağından otomatik içe aktar" diff --git a/i18n/trk/extensions/typescript/package.i18n.json b/i18n/trk/extensions/typescript/package.i18n.json index 27309eac057..6ad268b596e 100644 --- a/i18n/trk/extensions/typescript/package.i18n.json +++ b/i18n/trk/extensions/typescript/package.i18n.json @@ -39,6 +39,7 @@ "typescript.openTsServerLog.title": "TS Sunucu günlüğünü aç", "typescript.restartTsServer": "TS sunucusunu yeniden baÅŸlat", "typescript.selectTypeScriptVersion.title": "TypeScript Sürümünü Seç", + "typescript.reportStyleChecksAsWarnings": "Stil kontrollerini uyarı olarak bildir", "jsDocCompletion.enabled": "Otomatik JSDoc yorumlarını etkinleÅŸtir veya devre dışı bırak.", "javascript.implicitProjectConfig.checkJs": "JavaScript dosyalarının anlamsal kontrolünü etkinleÅŸtir veya devre dışı bırak. Mevcut jsconfig.json veya tsconfig.json dosyaları bu ayarı geçersiz kılar. TypeScript >= 2.3.1 gerektirir.", "typescript.npm": "Otomatik Tür Kazanımı için kullanılacak NPM yürütülebilir dosyasının yolunu belirtir. TypeScript >= 2.3.4 gerektirir.", diff --git a/i18n/trk/src/vs/base/common/errorMessage.i18n.json b/i18n/trk/src/vs/base/common/errorMessage.i18n.json index e1e685c3ab2..854eb577ebb 100644 --- a/i18n/trk/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/trk/src/vs/base/common/errorMessage.i18n.json @@ -4,13 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "message": "{0}. Hata kodu: {1}", - "error.permission.verbose": "İzin Verilmedi (HTTP {0})", - "error.permission": "İzin Verilmedi", - "error.http.verbose": "{0} (HTTP {1}: {2})", - "error.http": "{0} (HTTP {1})", - "error.connection.unknown.verbose": "Bilinmeyen BaÄŸlantı Hatası ({0})", - "error.connection.unknown": "Bilinmeyen bir baÄŸlantı hatası oluÅŸtu. Artık İnternet'e baÄŸlı deÄŸilsiniz veya baÄŸlandığınız sunucu çevrimdışı.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "Bilinmeyen bir hata oluÅŸtu. Daha fazla ayrıntı için lütfen günlüğe baÅŸvurun.", "nodeExceptionMessage": "Bir sistem hatası oluÅŸtu ({0})", diff --git a/i18n/trk/src/vs/code/electron-main/main.i18n.json b/i18n/trk/src/vs/code/electron-main/main.i18n.json new file mode 100644 index 00000000000..dce3cbffb10 --- /dev/null +++ b/i18n/trk/src/vs/code/electron-main/main.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "secondInstanceNoResponse": "{0}'un baÅŸka bir örneÄŸi çalışıyor ancak yanıt vermiyor", + "secondInstanceNoResponseDetail": "Lütfen diÄŸer tüm örnekleri kapatın ve tekrar deneyin.", + "secondInstanceAdmin": "{0}'un ikinci bir örneÄŸi zaten yönetici olarak çalışıyor.", + "secondInstanceAdminDetail": "Lütfen diÄŸer örneÄŸi kapatın ve tekrar deneyin.", + "close": "&&Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/code/electron-main/menus.i18n.json b/i18n/trk/src/vs/code/electron-main/menus.i18n.json index 245e33677c8..f94d5322c97 100644 --- a/i18n/trk/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/trk/src/vs/code/electron-main/menus.i18n.json @@ -22,11 +22,11 @@ "miQuit": "{0} Öğesinden Çık", "miNewFile": "&&Yeni Dosya", "miOpen": "&&Aç...", - "miOpenWorkspace": "Çalışma Alanı &&Aç...", + "miOpenWorkspace": "Ça&&lışma Alanı Aç...", "miOpenFolder": "&&Klasör Aç...", "miOpenFile": "&&Dosya Aç...", "miOpenRecent": "&&Son Kullanılanları Aç", - "miSaveWorkspaceAs": "Çalışma Alanını &&Farklı Kaydet...", + "miSaveWorkspaceAs": "Çalışma Alanını Farklı Kaydet...", "miAddFolderToWorkspace": "Çalışma Alanına Klasör &&Ekle...", "miSave": "&&Kaydet", "miSaveAs": "&&Farklı Kaydet", @@ -157,7 +157,7 @@ "mMergeAllWindows": "Tüm Pencereleri BirleÅŸtir", "miToggleDevTools": "&&GeliÅŸtirici Araçlarını Aç/Kapat", "miAccessibilityOptions": "&&EriÅŸilebilirlik Seçenekleri", - "miReportIssues": "So&&run Bildir", + "miReportIssue": "&&Sorun Bildir", "miWelcome": "&&HoÅŸ Geldiniz", "miInteractivePlayground": "&&İnteraktif Oyun Alanı", "miDocumentation": "&&Belgeler", @@ -184,6 +184,7 @@ "miDownloadingUpdate": "GüncelleÅŸtirme İndiriliyor...", "miInstallingUpdate": "GüncelleÅŸtirme Yükleniyor...", "miCheckForUpdates": "GüncelleÅŸtirmeleri Denetle...", - "aboutDetail": "\nSürüm {0}\nCommit {1}\nTarih {2}\nKabuk {3}\nOluÅŸturucu {4}\nNode {5}\nMimari {6}", - "okButton": "Tamam" + "aboutDetail": "Sürüm {0}\nCommit {1}\nTarih {2}\nKabuk {3}\nRender Alan {4}\nNode {5}\nMimari {6}", + "okButton": "Tamam", + "copy": "K&&opyala" } \ No newline at end of file diff --git a/i18n/trk/src/vs/code/node/cliProcessMain.i18n.json b/i18n/trk/src/vs/code/node/cliProcessMain.i18n.json index 8ca0b4fc0b4..5c84d9e6049 100644 --- a/i18n/trk/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/trk/src/vs/code/node/cliProcessMain.i18n.json @@ -8,6 +8,7 @@ "notInstalled": "'{0}' eklentisi yüklü deÄŸil.", "useId": "Eklentinin tam ID'sini, yayıncı da dahil olmak üzere kullandığınızdan emin olun, ör: {0}", "successVsixInstall": "'{0}' eklentisi baÅŸarıyla yüklendi.", + "cancelVsixInstall": "'{0}' eklentisini yükleme iÅŸlemi iptal edildi.", "alreadyInstalled": "'{0}' eklentisi zaten yüklü.", "foundExtension": "'{0}' markette bulundu.", "installing": "Yükleniyor...", diff --git a/i18n/trk/src/vs/editor/browser/services/bulkEdit.i18n.json b/i18n/trk/src/vs/editor/browser/services/bulkEdit.i18n.json new file mode 100644 index 00000000000..b081029e080 --- /dev/null +++ b/i18n/trk/src/vs/editor/browser/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "Bu dosyalar bu arada deÄŸiÅŸtirildi: {0}", + "summary.0": "Düzenleme yapılmadı", + "summary.nm": "{1} dosyada {0} metin düzenlemesi yapıldı", + "summary.n0": "Bir dosyada {0} metin düzenlemesi yapıldı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json index 8936db41305..33eec63f82e 100644 --- a/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,7 +10,11 @@ "fontSize": "Yazı tipi boyutunu piksel olarak denetler.", "lineHeight": "Satır yüksekliÄŸini denetler. lineHeight deÄŸerini, fontSize deÄŸeri kullanarak hesaplamak için 0 girin.", "letterSpacing": "Harfler arası boÅŸluÄŸu pixel olarak denetler.", - "lineNumbers": "Satır numaralarının görüntülenmesini denetler. Olası deÄŸerler 'on', 'off' ve 'relative'dir. 'relative' satırların geçerli imleç konumundan uzaklıklarını gösterir.", + "lineNumbers.off": "Satır numaraları gösterilmez.", + "lineNumbers.on": "Satır numaraları mutlak sayı olarak gösterilir.", + "lineNumbers.relative": "Satır numaraları imlecin konumuna olan uzaklık olarak gösterilir.", + "lineNumbers.interval": "Satır numaraları her 10 satırda bir gösterilir.", + "lineNumbers": "Satır numaralarının görüntülenmesini denetler. Olası deÄŸerler 'on', 'off' ve 'relative'dir.", "rulers": "Belirli bir eÅŸit geniÅŸlikli karakterlerden sonra dikey cetveller göster. Birden çok cetvel için birden çok deÄŸer kullanın. Dizi boÅŸ ise cetvel gösterilmez", "wordSeparators": "Sözcüklerle ilgili gezinti veya iÅŸlem yaparken kelime ayırıcı olarak kullanılacak karakterler", "tabSize": "Bir sekmenin eÅŸit olduÄŸu boÅŸluk sayısı. Bu ayar, `editor.detectIndentation` açıkken dosya içeriÄŸine baÄŸlı olarak geçersiz kılınır.", @@ -89,8 +93,8 @@ "links": "Düzenleyicinin baÄŸlantıları otomatik algılayıp, onları tıklanabilir yapıp yapmayacağını denetler", "colorDecorators": "Düzenleyicinin satır içi renk dekoratörlerini ve renk seçiciyi gösterip göstermemesini denetler.", "codeActions": "Kod eylemleri ampulunu etkinleÅŸtirir", + "selectionClipboard": "Linux birincil panosunun desteklenip desteklenmeyeceÄŸini denetler.", "sideBySide": "KarşılaÅŸtırma düzenleyicisinin farklılıkları yan yana mı yoksa satır içinde mi göstereceÄŸini denetler", "ignoreTrimWhitespace": "KarşılaÅŸtırma düzenleyicisinin baÅŸtaki veya sondaki boÅŸluklardaki deÄŸiÅŸmeleri farklılık olarak gösterip göstermemesini denetler", - "renderIndicators": "KarşılaÅŸtırma düzenleyicisinin ekleme/çıkarma deÄŸiÅŸiklikleri için +/- göstergeleri gösterip göstermemesini denetler.", - "selectionClipboard": "Linux birincil panosunun desteklenip desteklenmeyeceÄŸini denetler." + "renderIndicators": "KarşılaÅŸtırma düzenleyicisinin ekleme/çıkarma deÄŸiÅŸiklikleri için +/- göstergeleri gösterip göstermemesini denetler." } \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/trk/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json new file mode 100644 index 00000000000..1c4928f4039 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Ayraca Git" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json b/i18n/trk/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json new file mode 100644 index 00000000000..c5196837029 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/caretOperations/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "İmleci Sola Taşı", + "caret.moveRight": "İmleci SaÄŸa Taşı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/caretOperations/transpose.i18n.json b/i18n/trk/src/vs/editor/contrib/caretOperations/transpose.i18n.json new file mode 100644 index 00000000000..5ee978f2342 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/caretOperations/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Harfleri Birbirleriyle DeÄŸiÅŸtir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/clipboard/clipboard.i18n.json b/i18n/trk/src/vs/editor/contrib/clipboard/clipboard.i18n.json new file mode 100644 index 00000000000..768e8e3511f --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/clipboard/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Kes", + "actions.clipboard.copyLabel": "Kopyala", + "actions.clipboard.pasteLabel": "Yapıştır", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Sentaks Vurgulaması İle Kopyala" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/comment/comment.i18n.json b/i18n/trk/src/vs/editor/contrib/comment/comment.i18n.json new file mode 100644 index 00000000000..30ac850837c --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/comment/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Satır Yorumunu Aç/Kapat", + "comment.line.add": "Satır Açıklaması Ekle", + "comment.line.remove": "Satır Açıklamasını Kaldır", + "comment.block": "Yorum BloÄŸunu Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json b/i18n/trk/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json new file mode 100644 index 00000000000..fbed2327052 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/contextmenu/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Düzenleyici BaÄŸlam Menüsünü Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/find/findController.i18n.json b/i18n/trk/src/vs/editor/contrib/find/findController.i18n.json new file mode 100644 index 00000000000..d6d3fc6ccf3 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/find/findController.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Bul", + "findNextMatchAction": "Sonrakini Bul", + "findPreviousMatchAction": "Öncekini Bul", + "nextSelectionMatchFindAction": "Sonraki Seçimi Bul", + "previousSelectionMatchFindAction": "Önceki Seçimi Bul", + "startReplace": "DeÄŸiÅŸtir", + "showNextFindTermAction": "Sonraki Arama Terimini Göster", + "showPreviousFindTermAction": "Önceki Arama Terimini Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/find/findWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/find/findWidget.i18n.json new file mode 100644 index 00000000000..265b74d65a5 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/find/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Bul", + "placeholder.find": "Bul", + "label.previousMatchButton": "Önceki eÅŸleÅŸme", + "label.nextMatchButton": "Sonraki eÅŸleÅŸme", + "label.toggleSelectionFind": "Seçimde bul", + "label.closeButton": "Kapat", + "label.replace": "DeÄŸiÅŸtir", + "placeholder.replace": "DeÄŸiÅŸtir", + "label.replaceButton": "DeÄŸiÅŸtir", + "label.replaceAllButton": "Tümünü DeÄŸiÅŸtir", + "label.toggleReplaceButton": "DeÄŸiÅŸtirme modunu deÄŸiÅŸtir", + "title.matchesCountLimit": "Sadece ilk {0} sonuç vurgulandı, fakat metnin tamamında tüm arama iÅŸlemleri çalışıyor.", + "label.matchesLocation": "{0}/{1}", + "label.noResults": "Sonuç Yok" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/find/simpleFindWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/find/simpleFindWidget.i18n.json new file mode 100644 index 00000000000..baad53fc2a4 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/find/simpleFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Bul", + "placeholder.find": "Bul", + "label.previousMatchButton": "Önceki eÅŸleÅŸme", + "label.nextMatchButton": "Sonraki eÅŸleÅŸme", + "label.closeButton": "Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/trk/src/vs/editor/contrib/folding/folding.i18n.json new file mode 100644 index 00000000000..ef3c3e89fe6 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/folding/folding.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Katlamayı Aç", + "unFoldRecursivelyAction.label": "Katlamaları Özyinelemeli Olarak Aç", + "foldAction.label": "Katla", + "foldRecursivelyAction.label": "Özyinelemeli Olarak Katla", + "foldAllBlockComments.label": "Tüm Yorum Bloklarını Katla", + "foldAllMarkerRegions.label": "Tüm Bölgeleri Katla", + "unfoldAllMarkerRegions.label": "Tüm Bölgelerdeki Katlamayı Aç", + "foldAllAction.label": "Hepsini Katla", + "unfoldAllAction.label": "Tüm Katlamaları Aç", + "foldLevelAction.label": "{0}. Düzeyi Katla" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/format/formatActions.i18n.json b/i18n/trk/src/vs/editor/contrib/format/formatActions.i18n.json new file mode 100644 index 00000000000..52d2abe3a3d --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/format/formatActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "{0}. satırda 1 biçimlendirme düzenlemesi yapıldı", + "hintn1": "{1}. satırda {0} biçimlendirme düzenlemesi yapıldı", + "hint1n": "{0} ve {1} satırları arasında 1 biçimlendirme düzenlemesi yapıldı", + "hintnn": "{1} ve {2} satırları arasında {0} biçimlendirme düzenlemesi yapıldı", + "no.provider": "Maalesef, '{0}' dosyaları için yüklenmiÅŸ bir biçimlendirici yok.", + "formatDocument.label": "Belgeyi Biçimlendir", + "formatSelection.label": "Seçimi Biçimlendir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json b/i18n/trk/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json new file mode 100644 index 00000000000..fae99c4c772 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/goToDeclaration/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "'{0}' için tanım bulunamadı", + "generic.noResults": "Tanım bulunamadı", + "meta.title": " – {0} tanım", + "actions.goToDecl.label": "Tanıma Git", + "actions.goToDeclToSide.label": "Tanımı Yana Aç", + "actions.previewDecl.label": "Tanıma Göz At", + "goToImplementation.noResultWord": "'{0}' için uygulama bulunamadı", + "goToImplementation.generic.noResults": "Uygulama bulunamadı", + "meta.implementations.title": " – {0} uygulama", + "actions.goToImplementation.label": "Uygulamaya Git", + "actions.peekImplementation.label": "Uygulamaya Göz At", + "goToTypeDefinition.noResultWord": "'{0}' için tür tanımı bulunamadı", + "goToTypeDefinition.generic.noResults": "Tür tanımı bulunamadı", + "meta.typeDefinitions.title": " – {0} tür tanımı", + "actions.goToTypeDefinition.label": "Tür Tanımına Git", + "actions.peekTypeDefinition.label": "Tür Tanımına Göz At" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json b/i18n/trk/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json new file mode 100644 index 00000000000..010de11a57d --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/goToDeclaration/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "{0} tanımı göstermek için tıklayın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/gotoError/gotoError.i18n.json b/i18n/trk/src/vs/editor/contrib/gotoError/gotoError.i18n.json new file mode 100644 index 00000000000..6bc3935d6f4 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/gotoError/gotoError.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Sonraki Hata veya Uyarıya Git", + "markerAction.previous.label": "Önceki Hata veya Uyarıya Git", + "editorMarkerNavigationError": "Düzenleyicinin iÅŸaretçi gezinti aracının hata rengi.", + "editorMarkerNavigationWarning": "Düzenleyicinin iÅŸaretçi gezinti aracının uyarı rengi.", + "editorMarkerNavigationInfo": "Düzenleyicinin iÅŸaretçi gezinti aracının bilgilendirme rengi.", + "editorMarkerNavigationBackground": "Düzenleyicinin iÅŸaretçi gezinti aracının arka planı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/hover/hover.i18n.json b/i18n/trk/src/vs/editor/contrib/hover/hover.i18n.json new file mode 100644 index 00000000000..e1a33122702 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/hover/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "BaÄŸlantı Vurgusunu Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/hover/modesContentHover.i18n.json b/i18n/trk/src/vs/editor/contrib/hover/modesContentHover.i18n.json new file mode 100644 index 00000000000..1b70c63296f --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/hover/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Yükleniyor..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json b/i18n/trk/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json new file mode 100644 index 00000000000..bb4caacacb1 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/inPlaceReplace/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Önceki DeÄŸerle DeÄŸiÅŸtir", + "InPlaceReplaceAction.next.label": "Sonraki DeÄŸerle DeÄŸiÅŸtir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/indentation/indentation.i18n.json b/i18n/trk/src/vs/editor/contrib/indentation/indentation.i18n.json new file mode 100644 index 00000000000..76b8b3c8391 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/indentation/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Girintiyi BoÅŸluklara Dönüştür", + "indentationToTabs": "Girintiyi Sekmelere Dönüştür", + "configuredTabSize": "Yapılandırılmış Sekme Boyutu", + "selectTabWidth": "Geçerli Dosya İçin Sekme Boyutunu Seç", + "indentUsingTabs": "Sekme Kullanarak Girintile", + "indentUsingSpaces": "BoÅŸluk Kullanarak Girintile", + "detectIndentation": "Girintiyi, İçeriÄŸi Kontrol Ederek Algıla", + "editor.reindentlines": "Satır Girintilerini Yeniden Ayarla" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json b/i18n/trk/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json new file mode 100644 index 00000000000..4ae7163c50c --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/linesOperations/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Satırı Yukarı Kopyala", + "lines.copyDown": "Satırı AÅŸağı Kopyala", + "lines.moveUp": "Satırı Yukarı Taşı", + "lines.moveDown": "Satırı AÅŸağı Taşı", + "lines.sortAscending": "Satırları Artan Åžekilde Sırala", + "lines.sortDescending": "Satırları Azalan Åžekilde Sırala", + "lines.trimTrailingWhitespace": "Sondaki BoÅŸluÄŸu Kırp", + "lines.delete": "Satırı Sil", + "lines.indent": "Satırı Girintile", + "lines.outdent": "Satırın Girintisini Azalt", + "lines.insertBefore": "Üste Satır Ekle", + "lines.insertAfter": "Alta Satır Ekle", + "lines.deleteAllLeft": "Soldaki Her Åžeyi Sil", + "lines.deleteAllRight": "SaÄŸdaki Her Åžeyi Sil", + "lines.joinLines": "Satırları BirleÅŸtir", + "editor.transpose": "İmlecin etrafındaki karakterleri birbirleriyle deÄŸiÅŸtir", + "editor.transformToUppercase": "Büyük Harfe Dönüştür", + "editor.transformToLowercase": "Küçük Harfe Dönüştür" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/links/links.i18n.json b/i18n/trk/src/vs/editor/contrib/links/links.i18n.json new file mode 100644 index 00000000000..7f51a75306c --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/links/links.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "BaÄŸlantıyı izlemek için Cmd tuÅŸuna basarak tıklayın", + "links.navigate": "BaÄŸlantıyı izlemek için Ctrl tuÅŸuna basarak tıklayın", + "links.command.mac": "Komutu yürütmek için Cmd + tıklama yapın", + "links.command": "Komutu yürütmek için Ctrl + tıklama yapın", + "links.navigate.al": "BaÄŸlantıyı izlemek için Alt tuÅŸuna basarak tıklayın", + "links.command.al": "Komutu yürütmek için Alt + tıklama yapın", + "invalid.url": "Üzgünüz, bu baÄŸlantı iyi oluÅŸturulmamış olduÄŸu için açılamadı: {0}", + "missing.url": "Üzgünüz; bu baÄŸlantı, hedefi eksik olduÄŸu için açılamadı.", + "label": "BaÄŸlantıyı Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/multicursor/multicursor.i18n.json b/i18n/trk/src/vs/editor/contrib/multicursor/multicursor.i18n.json new file mode 100644 index 00000000000..899e10e4b02 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/multicursor/multicursor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Yukarıya İmleç Ekle", + "mutlicursor.insertBelow": "AÅŸağıya İmleç Ekle", + "mutlicursor.insertAtEndOfEachLineSelected": "Satır Sonlarına İmleç Ekle", + "addSelectionToNextFindMatch": "Seçimi Sonraki Bulunan EÅŸleÅŸmeye Ekle", + "addSelectionToPreviousFindMatch": "Seçimi Önceki Bulunan EÅŸleÅŸmeye Ekle", + "moveSelectionToNextFindMatch": "Son Seçimi Sonraki Bulunan EÅŸleÅŸmeye Taşı", + "moveSelectionToPreviousFindMatch": "Son Seçimi Önceki Bulunan EÅŸleÅŸmeye Taşı", + "selectAllOccurrencesOfFindMatch": "Bulunan EÅŸleÅŸmenin Tüm Tekrarlamalarını Seç", + "changeAll.label": "Tüm Tekrarlamaları DeÄŸiÅŸtir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json b/i18n/trk/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json new file mode 100644 index 00000000000..b7a4e43b2b6 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/parameterHints/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Parametre İpuçlarını Tetikle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json new file mode 100644 index 00000000000..ed56fe64626 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/parameterHints/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, ipucu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/trk/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json new file mode 100644 index 00000000000..86586e96e0a --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Düzeltmeleri Göster ({0})", + "quickFix": "Düzeltmeleri Göster", + "quickfix.trigger.label": "Hızlı Düzeltme" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json new file mode 100644 index 00000000000..8a312782515 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json new file mode 100644 index 00000000000..9ddf0e9fbe0 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": "– {0} baÅŸvuru", + "references.action.label": "Tüm BaÅŸvuruları Bul" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json new file mode 100644 index 00000000000..14c77e0d644 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Yükleniyor..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json new file mode 100644 index 00000000000..a3b4193dbe7 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "{0} yolunda, {1}. satır {2}. sütundaki sembol", + "aria.fileReferences.1": "{0} içinde 1 sembol, tam yol {1}", + "aria.fileReferences.N": "{1} içinde {0} sembol, tam yol {2}", + "aria.result.0": "Sonuç bulunamadı", + "aria.result.1": "{0} yolunda 1 sembol bulundu", + "aria.result.n1": "{1} yolunda {0} sembol bulundu", + "aria.result.nm": "{1} dosyada {0} sembol bulundu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json new file mode 100644 index 00000000000..6165a40b9f9 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Dosya çözümlenemedi.", + "referencesCount": "{0} baÅŸvuru", + "referenceCount": "{0} baÅŸvuru", + "missingPreviewMessage": "önizleme yok", + "treeAriaLabel": "BaÅŸvurular", + "noResults": "Sonuç yok", + "peekView.alternateTitle": "BaÅŸvurular", + "peekViewTitleBackground": "Gözetleme görünümü baÅŸlık alanının arka plan rengi.", + "peekViewTitleForeground": "Gözetleme görünümü baÅŸlığının rengi.", + "peekViewTitleInfoForeground": "Gözetleme görünümü baÅŸlık bilgisinin rengi.", + "peekViewBorder": "Gözetleme görünümü kenarlıkları ve ok iÅŸaretinin rengi.", + "peekViewResultsBackground": "Gözetleme görünümü sonuç listesinin arka plan rengi.", + "peekViewResultsMatchForeground": "Gözetleme görünümü sonuç listesindeki satır düğümlerinin ön plan rengi.", + "peekViewResultsFileForeground": "Gözetleme görünümü sonuç listesindeki dosya düğümlerinin ön plan rengi.", + "peekViewResultsSelectionBackground": "Gözetleme görünümü sonuç listesindeki seçilen girdinin arka plan rengi.", + "peekViewResultsSelectionForeground": "Gözetleme görünümü sonuç listesindeki seçilen girdinin ön plan rengi.", + "peekViewEditorBackground": "Gözetleme görünümü düzenleyicisinin arka plan rengi.", + "peekViewEditorGutterBackground": "Gözetleme görünümü düzenleyicisindeki oluÄŸun arka plan rengi.", + "peekViewResultsMatchHighlight": "Gözetleme görünümü sonuç listesindeki eÅŸleÅŸme vurgusu rengi.", + "peekViewEditorMatchHighlight": "Gözetleme görünümü düzenleyicisindeki eÅŸleÅŸme vurgusu rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/rename/rename.i18n.json b/i18n/trk/src/vs/editor/contrib/rename/rename.i18n.json new file mode 100644 index 00000000000..4440b96d71b --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/rename/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Sonuç yok.", + "aria": "'{0}', '{1}' olarak baÅŸarıyla yeniden adlandırıldı. Özet: {2}", + "rename.failed": "Üzgünüz, yeniden adlandırma iÅŸlemi baÅŸarısız oldu.", + "rename.label": "Sembolü Yeniden Adlandır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/rename/renameInputField.i18n.json b/i18n/trk/src/vs/editor/contrib/rename/renameInputField.i18n.json new file mode 100644 index 00000000000..eea4501c3d8 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/rename/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Girdiyi yeniden adlandır. Yeni adı girin ve iÅŸlemek için Enter'a basın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json b/i18n/trk/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json new file mode 100644 index 00000000000..b63d95ca271 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/smartSelect/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Seçimi GeniÅŸlet", + "smartSelect.shrink": "Seçimi Daralt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/suggest/suggestController.i18n.json b/i18n/trk/src/vs/editor/contrib/suggest/suggestController.i18n.json new file mode 100644 index 00000000000..d6c0cfacacb --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/suggest/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "'{0}' kabul edildiÄŸi için ÅŸu metin eklendi: {1}", + "suggest.trigger.label": "Öneriyi Tetikle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/suggest/suggestWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/suggest/suggestWidget.i18n.json new file mode 100644 index 00000000000..657260a0049 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/suggest/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "Öneri aracının arka plan rengi.", + "editorSuggestWidgetBorder": "Öneri aracının kenarlık rengi.", + "editorSuggestWidgetForeground": "Öneri aracının ön plan rengi.", + "editorSuggestWidgetSelectedBackground": "Öneri aracındaki seçilen girdinin arka plan rengi.", + "editorSuggestWidgetHighlightForeground": "Öneri aracındaki eÅŸleÅŸme vurgularının rengi.", + "readMore": "Devamını Oku...{0}", + "suggestionWithDetailsAriaLabel": "{0}, öneri, detaylı", + "suggestionAriaLabel": "{0}, öneri", + "readLess": "Daha azını oku...{0}", + "suggestWidget.loading": "Yükleniyor...", + "suggestWidget.noSuggestions": "Öneri yok.", + "suggestionAriaAccepted": "{0}, kabul edildi", + "ariaCurrentSuggestionWithDetails": "{0}, öneri, detaylı", + "ariaCurrentSuggestion": "{0}, öneri" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json b/i18n/trk/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json new file mode 100644 index 00000000000..720f500431f --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Tab TuÅŸu İle Odak DeÄŸiÅŸtirmeyi Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json b/i18n/trk/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json new file mode 100644 index 00000000000..6faf663326d --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/wordHighlighter/wordHighlighter.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Bir deÄŸiÅŸkeni okumak gibi, okuma-eriÅŸimi sırasındaki bir sembolün arka plan rengi.", + "wordHighlightStrong": "Bir deÄŸiÅŸkene yazmak gibi, yazma-eriÅŸimi sırasındaki bir sembolün arka plan rengi.", + "overviewRulerWordHighlightForeground": "Sembol vurguları için genel bakış cetvelinin iÅŸaretleyici rengi.", + "overviewRulerWordHighlightStrongForeground": "Yazma eriÅŸimli sembol vurguları için genel bakış cetvelinin iÅŸaretleyici rengi.", + "wordHighlight.next.label": "Sonraki Sembol Vurgusuna Git", + "wordHighlight.previous.label": "Önceki Sembol Vurgusuna Git" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/environment/node/argv.i18n.json b/i18n/trk/src/vs/platform/environment/node/argv.i18n.json index 0e8cbe0d850..7d132e007de 100644 --- a/i18n/trk/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/trk/src/vs/platform/environment/node/argv.i18n.json @@ -12,8 +12,11 @@ "newWindow": "Yeni bir Code örneÄŸini zorla.", "performance": "'GeliÅŸtirici: BaÅŸlangıç Performansı' komutu etkinleÅŸtirilmiÅŸ olarak baÅŸlat.", "prof-startup": "BaÅŸlangıç sırasında CPU profil oluÅŸturucusunu çalıştır", + "inspect-extensions": "Eklentilerde hata ayıklama ve ayrımlamaya izin ver. BaÄŸlantı URI'ı için geliÅŸtirici araçlarını kontrol edin.", + "inspect-brk-extensions": "Eklentilerde hata ayıklama ve ayrımlamaya eklenti sunucusu baÅŸladıktan hemen sonra duraklatılacak ÅŸekilde izin ver. BaÄŸlantı URI'ı için geliÅŸtirici araçlarını kontrol edin.", "reuseWindow": "Bir dosya veya klasörü son etkin pencerede açmaya zorlayın.", "userDataDir": "Kullanıcı verilerinin tutulacağı klasörü belirtir, root olarak çalışırken yararlıdır.", + "log": "Kullanılacak günlüğe yazma seviyesi. İzin verilen deÄŸerler 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off' ÅŸeklindedir.", "verbose": "Ayrıntılı çıktı oluÅŸtur (--wait anlamına gelir).", "wait": "Geri dönmeden önce dosyaların kapanmasını bekle.", "extensionHomePath": "Eklentilerin kök dizinini belirle.", @@ -24,6 +27,7 @@ "experimentalApis": "Bir eklenti için önerilen API özelliklerini etkinleÅŸtirir.", "disableExtensions": "Yüklü tüm eklentileri devre dışı bırak.", "disableGPU": "GPU donanım hızlandırmasını devre dışı bırak.", + "status": "İşlem kullanımını ve tanılama bilgilerini yazdır.", "version": "Sürümü göster.", "help": "Kullanımı göster.", "usage": "Kullanım", diff --git a/i18n/trk/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/trk/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index e335acfc388..c6b46f632c1 100644 --- a/i18n/trk/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/trk/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "notFound": "Eklenti bulunamadı", - "noCompatible": "{0} eklentisinin Code'un bu sürümüyle uyumlu bir sürümü bulunamadı." + "notCompatibleDownload": "İndirme baÅŸarısız oldu çünkü, eklentinin uyumlu olduÄŸu VS Code'un '{0}' sürümü bulunamadı." } \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/trk/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index c32c5815cff..7cf70b2f373 100644 --- a/i18n/trk/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/trk/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,11 +6,16 @@ { "invalidManifest": "Eklenti geçersiz: package.json bir JSON dosyası deÄŸil.", "restartCodeLocal": "{0} eklentisini yeniden yüklemeden önce lütfen Code'u yeniden baÅŸlatın.", - "restartCodeGallery": "Yeniden yüklemeden önce lütfen Code'u yeniden baÅŸlatın.", + "installingOutdatedExtension": "Bu eklentinin daha yeni bir sürümü zaten yüklü. Bunu, daha eski bir sürümle geçersiz kılmak ister misiniz?", + "override": "Geçersiz Kıl", + "cancel": "İptal", + "notFoundCompatible": "Yükleme baÅŸarısız oldu çünkü, '{0}' eklentisinin uyumlu olduÄŸu VS Code'un '{1}' sürümü bulunamadı.", + "quitCode": "Yükleme baÅŸarısız oldu çünkü, eklentinin eski bir örneÄŸi hâlâ çalışıyor. Yeniden yüklemeden önce lütfen VS Code'dan çıkın ve tekrar açın.", + "exitCode": "Yükleme baÅŸarısız oldu çünkü, eklentinin eski bir örneÄŸi hâlâ çalışıyor. Yeniden yüklemeden önce lütfen VS Code'dan çıkın ve tekrar açın.", + "notFoundCompatibleDependency": "Yükleme baÅŸarısız oldu çünkü, bağımlılığı bulunan '{0}' eklentisinin uyumlu olduÄŸu VS Code'un '{1}' sürümü bulunamadı.", "uninstallDependeciesConfirmation": "Yalnızca '{0}' eklentisini mi yoksa bağımlılıklarını da kaldırmak ister misiniz?", "uninstallOnly": "Sadece Eklenti", "uninstallAll": "Tümü", - "cancel": "İptal", "uninstallConfirmation": "'{0}' eklentisini kaldırmak istediÄŸinizden emin misiniz?", "ok": "Tamam", "singleDependentError": "'{0}' eklentisi kaldırılamıyor. '{1}' eklentisi buna baÄŸlı.", diff --git a/i18n/trk/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/trk/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index bf95a5cb19e..e1d5347b655 100644 --- a/i18n/trk/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/trk/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -17,6 +17,8 @@ "vscode.extension.activationEvents.onLanguage": "Belirtilen dilde çözümlenen bir dosya her açıldığında bir etkinleÅŸtirme olayı yayınlanır.", "vscode.extension.activationEvents.onCommand": "Belirtilen komut her çaÄŸrıldığında bir etkinleÅŸtirme olayı yayınlanır.", "vscode.extension.activationEvents.onDebug": "Bir kullanıcının hata ayıklamaya baÅŸlamak veya hata ayıklama yapılandırmasını ayarlamak üzere olduÄŸu her an bir etkinleÅŸtirme olayı yayınlanır.", + "vscode.extension.activationEvents.onDebugInitialConfigurations": "Bir \"launch.json\" dosyasının oluÅŸturulması(ve tüm provideDebugConfigurations metodlarının çaÄŸrılması) gerektiÄŸi zaman etkinleÅŸtirme olayı yayınlanır.", + "vscode.extension.activationEvents.onDebugResolve": "Belirtilen türde bir hata ayıklama oturumu baÅŸlamaya yaklaÅŸtığında (ve buna karşılık gelen bir resolveDebugConfiguration metodunun çaÄŸrılması gerektiÄŸinde) bir etkinleÅŸtirme olayı yayınlanır.", "vscode.extension.activationEvents.workspaceContains": "Belirtilen glob deseni ile eÅŸleÅŸen en az bir dosya içeren bir klasör her açıldığında bir etkinleÅŸtirme olayı yayınlanır.", "vscode.extension.activationEvents.onView": "Belirtilen görünüm her geniÅŸletildiÄŸinde bir etkinleÅŸtirme olayı yayınlanır.", "vscode.extension.activationEvents.star": "VS Code baÅŸlatıldığında yayılan etkinleÅŸtirme olayı. Mükemmel bir son kullanıcı deneyimi saÄŸlandığından emin olmak için, lütfen bu etkinleÅŸtirme olayını eklentinizde sadece kullanım durumunuzda baÅŸka hiçbir aktivasyon olayı kombinasyonu çalışmıyorsa kullanın.", diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json new file mode 100644 index 00000000000..3a06d6df829 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleTabs": "Sekme Görünürlüğünü Aç/Kapat", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json index d031a47b23a..3590178cc87 100644 --- a/i18n/trk/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json +++ b/i18n/trk/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "largeNumberBadge": "10k+", "badgeTitle": "{0} - {1}", "additionalViews": "Ek Görünümler", "numberBadge": "{0} ({1})", diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index a5fd9ca0033..b32e97503d9 100644 --- a/i18n/trk/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -33,6 +33,7 @@ "openPreviousEditor": "Önceki Düzenleyiciyi Aç", "nextEditorInGroup": "Gruptaki Sonraki Düzenleyiciyi Aç", "openPreviousEditorInGroup": "Gruptaki Önceki Düzenleyiciyi Aç", + "lastEditorInGroup": "Gruptaki Son Düzenleyiciyi Aç", "navigateNext": "İleri Git", "navigatePrevious": "Geri Dön", "navigateLast": "Bir Öncekine Git", diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index ec6a3cb04f0..4eac419d706 100644 --- a/i18n/trk/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,7 +6,7 @@ { "editorCommand.activeEditorMove.description": "Aktif düzenleyiciyi sekmeler veya gruplar halinde taşıyın", "editorCommand.activeEditorMove.arg.name": "Aktif düzenleyici taşıma argümanı", - "editorCommand.activeEditorMove.arg.description": "Argüman Özellikleri:\n\t\t\t\t\t\t* 'to': Nereye taşınacağını belirten dize deÄŸeri.\n\t\t\t\t\t\t* 'by': Kaç birim taşınacağını belirten dize deÄŸeri. Sekme veya grup olarak.\n\t\t\t\t\t\t* 'value': Kaç tane pozisyonun taşınacağını belirten sayı deÄŸeri.\n\t\t\t\t\t", + "editorCommand.activeEditorMove.arg.description": "Argüman Özellikleri:\n\t* 'to': Nereye taşınacağını belirten dize deÄŸeri.\n\t* 'by': Kaç birim taşınacağını belirten dize deÄŸeri. Sekme veya gruba göre.\n\t* 'value': Kaç tane pozisyonun taşınacağını belirten sayı deÄŸeri.", "commandDeprecated": "**{0}** komutu kaldırıldı. Onun yerine **{1}** komutunu kullanabilirsiniz", "openKeybindings": "Klavye Kısayollarını Yapılandır" } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 915f4052355..af7268f7016 100644 --- a/i18n/trk/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -53,5 +53,5 @@ "screenReaderDetectedExplanation.answerYes": "Evet", "screenReaderDetectedExplanation.answerNo": "Hayır", "screenReaderDetectedExplanation.body1": "VS Code, ekran okuyucu ile kullanılmak için uygun hale getirilmiÅŸtir.", - "screenReaderDetectedExplanation.body2": "Bazı düzenleyici özellikleri farklı bir davranış sergileyecektir: ör. sözcük kaydırma, katlama, ayraçları otomatik kapatma, vb." + "screenReaderDetectedExplanation.body2": "Bazı düzenleyici özellikleri farklı bir davranış sergileyecektir: ör. sözcük kaydırma, katlama, vb." } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/quickopen.i18n.json b/i18n/trk/src/vs/workbench/browser/quickopen.i18n.json index a0b7b06168e..8a54c054893 100644 --- a/i18n/trk/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/trk/src/vs/workbench/browser/quickopen.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "noResultsMatching": "EÅŸleÅŸen sonuç yok", - "noResultsFound2": "Sonuç bulunamadı", - "entryAriaLabel": "{0}, komut" + "noResultsFound2": "Sonuç bulunamadı" } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json index 84919f4ec14..7c4352f507b 100644 --- a/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json @@ -30,7 +30,7 @@ "openRecent": "Son Kullanılanları Aç...", "quickOpenRecent": "Son Kullanılanları Hızlı Aç...", "closeMessages": "Bildirim İletilerini Kapat", - "reportIssues": "Sorunları Bildir", + "reportIssueInEnglish": "Sorun Bildir", "reportPerformanceIssue": "Performans Sorunu Bildir", "keybindingsReference": "Klavye Kısayolları BaÅŸvurusu", "openDocumentationUrl": "Belgeler", @@ -47,5 +47,14 @@ "showNextWindowTab": "Sonraki Pencere Sekmesini Göster", "moveWindowTabToNewWindow": "Pencere Sekmesini Yeni Pencereye Taşı", "mergeAllWindowTabs": "Tüm Pencereleri BirleÅŸtir", - "toggleWindowTabsBar": "Pencere Sekmeleri ÇubuÄŸunu Gizle/Göster" + "toggleWindowTabsBar": "Pencere Sekmeleri ÇubuÄŸunu Gizle/Göster", + "configureLocale": "Dili Yapılandır", + "displayLanguage": "VSCode'un görüntüleme dilini tanımlar.", + "doc": "Desteklenen dillerin listesi için göz atın: {0}", + "restart": "DeÄŸeri deÄŸiÅŸtirirseniz VSCode'u yeniden baÅŸlatmanız gerekir.", + "fail.createSettings": " '{0}' oluÅŸturulamadı ({1}).", + "debug": "Hata Ayıklama", + "info": "Bilgi", + "warn": "Uyarı", + "err": "Hata" } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/main.contribution.i18n.json index 03dfb498b1e..8aacc6f4f6e 100644 --- a/i18n/trk/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/trk/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,8 +7,8 @@ "view": "Görüntüle", "help": "Yardım", "file": "Dosya", - "workspaces": "Çalışma Alanları", "developer": "GeliÅŸtirici", + "workspaces": "Çalışma Alanları", "showEditorTabs": "Açık düzenleyicilerin sekmelerde gösterilip gösterilmeyeceÄŸini denetler", "workbench.editor.labelFormat.default": "Dosyanın adını göster. Sekmeler etkinleÅŸtirilmiÅŸ ve bir grupta iki dosya aynı ada sahiplerse, her dosyanın yolundaki ayırt edici bölümler eklenir. Sekmeler devre dışı ve düzenleyici aktifse, çalışma alanı klasörüne göreli yol gösterilir.", "workbench.editor.labelFormat.short": "Dosyanın adını ve ardından dizin adını göster.", @@ -16,6 +16,7 @@ "workbench.editor.labelFormat.long": "Dosyanın adını ve ardından mutlak yolunu göster.", "tabDescription": "Bir düzenleyici için etiketin biçimini denetler. Bu ayarı deÄŸiÅŸtirmek; örneÄŸin, bir dosyanın konumunun daha kolay anlaşılmasını saÄŸlar:\n- short: 'ustklasor'\n- medium: 'calismaalani/src/ustklasor'\n- long: '/home/user/calismaalani/src/ustklasor'\n- default: diÄŸer bir sekme aynı baÅŸlığı paylaşıyorsa '.../ustklasor' veya sekmeler devre dışı ise göreli çalışma alanı yolu", "editorTabCloseButton": "Düzenleyici sekmelerinin kapat butonlarının konumunu denetler veya 'off' olarak ayarlandığında devre dışı bırakır.", + "tabSizing": "Düzenleyici sekmelerinin boyutlarını denetler. Sekmelerin her zaman tam düzenleyici etiketini gösterecek kadar büyük tutmak için 'fit' olarak ayarlayın. Mevcut alan bir seferde tüm sekmeleri göstermek için yeterli olmadığında sekmelerin küçülmesini saÄŸlamak için 'shrink' olarak ayarlayın.", "showIcons": "Açık düzenleyicilerin bir simge ile gösterilip gösterilmemelerini denetler. Bu, bir simge temasının etkinleÅŸtirilmesini de gerektirir.", "enablePreview": "Açık düzenleyicilerin önizleme olarak gösterilip gösterilmeyeceÄŸini denetler. Önizleme düzenleyicileri kalıcı olarak açılana kadar (ör. çift tıklama veya düzenleme ile) tekrar kullanılırlar ve italik yazı tipiyle gösterilirler.", "enablePreviewFromQuickOpen": "Hızlı Aç'taki açık düzenleyicilerin önizleme olarak gösterilip gösterilmeyeceÄŸini denetler. Önizleme düzenleyicileri kalıcı olarak açılana kadar (ör. çift tıklama veya düzenleme ile) tekrar kullanılırlar.", @@ -26,18 +27,17 @@ "closeOnFocusLost": "Hızlı Aç'ın odağını kaybettiÄŸinde otomatik olarak kapanıp kapanmayacağını denetler.", "openDefaultSettings": "Ayarları açmanın ayrıca tüm varsayılan ayarları gösteren bir düzenleyici açıp açmayacağını denetler.", "sideBarLocation": "Kenar çubuÄŸunun konumunu denetler. Çalışma ekranının ya solunda ya da sağında gösterilebilir.", - "panelLocation": "Panelin konumunu denetler. Çalışma ekranının ya altında ya da sağında gösterilebilir.", "statusBarVisibility": "Çalışma ekranının altındaki durum çubuÄŸunun görünürlüğünü denetler.", "activityBarVisibility": "Çalışma ekranındaki etkinlik çubuÄŸunun görünürlüğünü denetler.", "closeOnFileDelete": "Düzenleyicinin gösterdiÄŸi bir dosyanın, baÅŸka bir iÅŸlem tarafından silinmesi veya yeniden adlandırması durumunda dosyayı otomatik olarak kapatıp kapatmamasını denetler. Bunu devre dışı bırakmak, böyle bir durumda düzenleyicinin kaydedilmemiÅŸ deÄŸiÅŸiklikler içeriyor durumunda kalmasını saÄŸlar. Uygulama içinde silmek, düzenleyiciyi her zaman kapatır ve kaydedilmemiÅŸ deÄŸiÅŸiklikler içeren dosyalar, verilerinizin korunması için otomatik olarak kapatılmaz.", - "experimentalFuzzySearchEndpoint": "Deneysel ayar araması için kullanılacak uçbirimi belirtir.", - "experimentalFuzzySearchKey": "Deneysel ayar araması için kullanılacak anahtarı belirtir.", + "enableNaturalLanguageSettingsSearch": "Ayarlar için doÄŸal dil arama modunun etkinleÅŸtirilip etkinleÅŸtirilmeyeceÄŸini denetler.", "fontAliasing": "Çalışma ekranındaki yazı tipi yumuÅŸatma yöntemini denetler.\n- default: Alt-piksel yazı tipi yumuÅŸatma. Bu, çoÄŸu retina olmayan ekranda en keskin metni verir\n- antialiased: Alt-pikselin tersine, pikselin seviyesine göre yazı tipini yumuÅŸat. Yazı tipinin genel olarak daha açık görünmesini saÄŸlayabilir\n- none: Yazı tipi yumuÅŸatmayı devre dışı bırakır. Metin pürüzlü keskin kenarlarla gösterilir.", "workbench.fontAliasing.default": "Alt-piksel yazı tipi yumuÅŸatma. Bu, çoÄŸu retina olmayan ekranda en keskin metni verir.", "workbench.fontAliasing.antialiased": "Alt-pikselin tersine, pikselin seviyesine göre yazı tipini yumuÅŸat. Yazı tipinin genel olarak daha açık görünmesini saÄŸlayabilir.", "workbench.fontAliasing.none": "Yazı tipi yumuÅŸatmayı devre dışı bırakır. Metin pürüzlü keskin kenarlarla gösterilir.", "swipeToNavigate": "Yatay olarak üç parmakla kaydırma ile açık dosyalar arasında gezinin.", "workbenchConfigurationTitle": "Çalışma Ekranı", + "windowConfigurationTitle": "Pencere", "window.openFilesInNewWindow.on": "Dosyalar yeni bir pencerede açılacak", "window.openFilesInNewWindow.off": "Dosyalar, dosyaların klasörünün olduÄŸu pencerede veya son aktif pencerede açılacak", "window.openFilesInNewWindow.default": "Dosyalar, Dock veya Finder ile açılmadıkça (sadece macOS için) dosyaların klasörünün olduÄŸu pencerede veya son aktif pencerede açılacak", @@ -69,11 +69,11 @@ "autoDetectHighContrast": "EtkinleÅŸtirilirse; eÄŸer Windows bir yüksek karşıtlık teması kullanıyorsa, otomatik olarak yüksek karşıtlık temasına geçiÅŸ yapılır; ve Windows, yüksek karşıtlık temasını kullanmayı bıraktığında koyu temaya geçiÅŸ yapılır.", "titleBarStyle": "Pencere baÅŸlık çubuÄŸunun görünümünü ayarlayın. DeÄŸiÅŸikliklerin uygulanması için tam yeniden baÅŸlatma gerekir.", "window.nativeTabs": "macOS Sierra pencere sekmelerini etkinleÅŸtirir. DeÄŸiÅŸikliklerin uygulanması için tam yeniden baÅŸlatma gerekeceÄŸini ve yerel sekmelerin, eÄŸer yapılandırılmışsa özel baÅŸlık çubuÄŸu stilini devre dışı bıracağını unutmayın.", - "windowConfigurationTitle": "Pencere", "zenModeConfigurationTitle": "Zen Modu", "zenMode.fullScreen": "Zen Moduna geçmenin ayrıca çalışma ekranını tam ekran moduna geçirip geçirmeyeceÄŸini denetler.", "zenMode.hideTabs": "Zen Moduna geçmenin ayrıca çalışma ekranı sekmelerini gizleyip gizlemeyeceÄŸini denetler.", "zenMode.hideStatusBar": "Zen Moduna geçmenin ayrıca çalışma ekranının altındaki durum çubuÄŸunu gizleyip gizlemeyeceÄŸini denetler.", "zenMode.hideActivityBar": "Zen Moduna geçmenin ayrıca çalışma ekranının solundaki etkinlik çubuÄŸunu gizleyip gizlemeyeceÄŸini denetler.", - "zenMode.restore": "Bir pencere Zen modundayken çıkıldıysa, bu pencerenin Zen moduna geri dönüp dönmeyeceÄŸini denetler." + "zenMode.restore": "Bir pencere Zen modundayken çıkıldıysa, bu pencerenin Zen moduna geri dönüp dönmeyeceÄŸini denetler.", + "JsonSchema.locale": "Kullanılacak Kullanıcı Arayüzü Dili." } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 3f796ff047d..d6c708e7602 100644 --- a/i18n/trk/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -30,7 +30,6 @@ "deactivateBreakpoints": "Kesme Noktalarını Devre Dışı Bırak", "reapplyAllBreakpoints": "Tüm Kesme Noktalarını Yeniden Uygula", "addFunctionBreakpoint": "Fonksiyon Kesme Noktası Ekle", - "renameFunctionBreakpoint": "Fonksiyon Kesme Noktasını Kaldır", "addConditionalBreakpoint": "KoÅŸullu Kesme Noktası Ekle...", "editConditionalBreakpoint": "Kesme Noktasını Düzenle...", "setValue": "DeÄŸeri Ayarla", diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json new file mode 100644 index 00000000000..1baa43d6564 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/breakpointsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editConditionalBreakpoint": "Kesme Noktasını Düzenle...", + "functionBreakpointsNotSupported": "Fonksiyon kesme noktaları bu hata ayıklama türü tarafından desteklenmiyor", + "functionBreakpointPlaceholder": "Mola verilecek fonksiyon", + "functionBreakPointInputAriaLabel": "Fonksiyon kesme noktasını girin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json new file mode 100644 index 00000000000..001d372f06a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/callStackView.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "callstackSection": "ÇaÄŸrı Yığını Bölümü", + "debugStopped": "{0} Üzerinde Duraklatıldı", + "callStackAriaLabel": "Hata Ayıklama ÇaÄŸrı Yığını", + "process": "İşlem", + "paused": "Duraklatıldı", + "running": "Çalışıyor", + "thread": "İş Parçacığı", + "pausedOn": "{0} Üzerinde Duraklatıldı", + "loadMoreStackFrames": "Daha Fazla Yığın Çerçevesi Yükleyin", + "threadAriaLabel": "{0} iÅŸ parçacığı, çaÄŸrı yığını, hata ayıklama", + "stackFrameAriaLabel": "Yığın Çerçevesi {0} satır {1} {2}, çaÄŸrı yığını, hata ayıklama" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index 21b83c7bc92..8a38e9caf2a 100644 --- a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,5 +20,10 @@ "openExplorerOnEnd": "Bir hata ayıklama oturumunun sonunda otomatik olarak gezgin görünümünü açın", "inlineValues": "Hata ayıklama sırasında deÄŸiÅŸken deÄŸerlerini düzenleyicide satır içinde göster", "hideActionBar": "DolaÅŸtırılabilir hata ayıklama eylem çubuÄŸunun gizlenip gizlenmeyeceÄŸini denetler", + "never": "Hata ayıklamayı durum çubuÄŸunda asla gösterme", + "always": "Hata ayıklamayı durum çubuÄŸunda her zaman göster", + "onFirstSessionStart": "Hata ayıklamayı sadece ilk kez baÅŸladıktan sonra durum çubuÄŸunda göster", + "showInStatusBar": "Hata ayıklama durum çubuÄŸunun ne zaman görünür olacağını denetler", + "openDebug": "Hata ayıklama viewlet'ının, hata ayıklama oturumu baÅŸlangıcında açılıp açılmayacağını denetler.", "launch": "Global hata ayıklama baÅŸlatma yapılandırması. Çalışma alanlarında paylaşılan 'launch.json'a alternatif olarak kullanılmalıdır" } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index a72d826faba..957aae1111b 100644 --- a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,8 @@ "breakpointAdded": "Kesme noktası eklendi, {0}. satır, {1} dosyası", "breakpointRemoved": "Kesme noktası kaldırıldı, {0}. satır, {1} dosyası", "compoundMustHaveConfigurations": "BileÅŸik, birden çok yapılandırmayı baÅŸlatmak için \"configurations\" özniteliÄŸi bulundurmalıdır.", - "configMissing": "'launch.json' dosyasında '{0}' yapılandırması eksik.", + "configMissing": "'launch.json' mevcut deÄŸil veya '{0}' yapılandırmasını içermiyor.", + "launchJsonDoesNotExist": "'launch.json' mevcut deÄŸil.", "debugRequestNotSupported": "Seçilen hata ayıklama yapılandırılmasındaki `{0}` özniteliÄŸi desteklenmeyen `{1}` deÄŸeri içeriyor.", "debugRequesMissing": "'{0}' özniteliÄŸi seçilen hata ayıklama yapılandırılmasında eksik.", "debugTypeNotSupported": "Yapılandırılan hata ayıklama türü '{0}', desteklenmiyor.", diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json new file mode 100644 index 00000000000..07a5b7d0f7a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/variablesView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "DeÄŸiÅŸkenler Bölümü", + "variablesAriaTreeLabel": "Hata Ayıklama DeÄŸiÅŸkenleri", + "variableValueAriaLabel": "Yeni deÄŸiÅŸken adını girin", + "variableScopeAriaLabel": "{0} kapsamı, deÄŸiÅŸkenler, hata ayıklama", + "variableAriaLabel": "{0} deÄŸeri {1}, deÄŸiÅŸkenler, hata ayıklama" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json new file mode 100644 index 00000000000..5c51a9a049b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expressionsSection": "İfadeler Bölümü", + "watchAriaTreeLabel": "Hata Ayıklama İzleme İfadeleri", + "watchExpressionPlaceholder": "İzlenecek ifade", + "watchExpressionInputAriaLabel": "İzleme ifadesi girin", + "watchExpressionAriaLabel": "{0} deÄŸeri {1}, izleme, hata ayıklama", + "watchVariableAriaLabel": "{0} deÄŸeri {1}, izleme, hata ayıklama" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 4c3d5d2ef5f..0640208ea52 100644 --- a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,9 +6,11 @@ { "name": "Eklenti adı", "extension id": "Eklenti tanımlayıcısı", + "preview": "Önizleme", "publisher": "Yayıncı adı", "install count": "Yüklenme sayısı", "rating": "Derecelendirme", + "repository": "Depo", "license": "Lisans", "details": "Detaylar", "contributions": "Eklemeler", diff --git a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 14daf8309bd..e9474bb59f0 100644 --- a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -10,16 +10,12 @@ "Uninstalling": "Kaldırılıyor", "updateAction": "Güncelle", "updateTo": "{0} sürümüne güncelle", - "enableForWorkspaceAction.label": "EtkinleÅŸtir (Çalışma Alanı)", - "enableAlwaysAction.label": "EtkinleÅŸtir (Daima)", - "disableForWorkspaceAction.label": "Devre Dışı Bırak (Çalışma Alanı)", - "disableAlwaysAction.label": "Devre Dışı Bırak (Daima)", "ManageExtensionAction.uninstallingTooltip": "Kaldırılıyor", - "enableForWorkspaceAction": "Çalışma Alanı", - "enableGloballyAction": "Daima", + "enableForWorkspaceAction": "EtkinleÅŸtir (Çalışma Alanı)", + "enableGloballyAction": "EtkinleÅŸtir", "enableAction": "EtkinleÅŸtir", - "disableForWorkspaceAction": "Çalışma Alanı", - "disableGloballyAction": "Daima", + "disableForWorkspaceAction": "Devre Dışı Bırak (Çalışma Alanı)", + "disableGloballyAction": "Devre Dışı Bırak", "disableAction": "Devre Dışı Bırak", "checkForUpdates": "GüncelleÅŸtirmeleri Denetle", "enableAutoUpdate": "Eklentileri Otomatik Olarak GüncelleÅŸtirmeyi EtkinleÅŸtir", @@ -47,11 +43,8 @@ "allExtensionsInstalled": "Bu çalışma alanı için tavsiye edilen tüm eklentiler zaten yüklü", "installRecommendedExtension": "Tavsiye Edilen Eklentiyi Yükle", "extensionInstalled": "Tavsiye edilen eklenti zaten yüklü", - "showRecommendedKeymapExtensions": "Tavsiye Edilen TuÅŸ Haritalarını Göster", "showRecommendedKeymapExtensionsShort": "TuÅŸ Haritaları", - "showLanguageExtensions": "Dil Eklentilerini Göster", "showLanguageExtensionsShort": "Dil Eklentileri", - "showAzureExtensions": "Azure Eklentilerini Göster", "showAzureExtensionsShort": "Azure Eklentileri", "OpenExtensionsFile.failed": " '.vscode' klasörü içinde 'extensions.json' dosyası oluÅŸturulamıyor ({0}).", "configureWorkspaceRecommendedExtensions": "Tavsiye Edilen Eklentileri Yapılandır (Çalışma Alanı)", diff --git a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json new file mode 100644 index 00000000000..8b6ad71cd4e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index f6176cf12dd..31d65218f0e 100644 --- a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -9,7 +9,7 @@ "extension": "Eklenti", "extensions": "Eklentiler", "view": "Görüntüle", + "developer": "GeliÅŸtirici", "extensionsConfigurationTitle": "Eklentiler", - "extensionsAutoUpdate": "Eklentileri otomatik olarak güncelle", - "extensionsIgnoreRecommendations": "Eklenti tavsiyelerini yok say" + "extensionsAutoUpdate": "Eklentileri otomatik olarak güncelle" } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json new file mode 100644 index 00000000000..cbbd312d9f3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reportExtensionIssue": "Sorun Bildir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json b/i18n/trk/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json new file mode 100644 index 00000000000..090a3012753 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/electron-browser/explorerViewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "folders": "Klasörler" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json new file mode 100644 index 00000000000..09b50f5c819 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Dosya", + "revealInSideBar": "Kenar ÇubuÄŸunda Ortaya Çıkar", + "acceptLocalChanges": "DeÄŸiÅŸikliklerinizi kullanın ve diskteki içeriklerin üzerine yazın", + "revertLocalChanges": "DeÄŸiÅŸikliklerinizi göz ardı edin ve diskteki içeriÄŸe geri dönün" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/trk/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json new file mode 100644 index 00000000000..2be3f4a5668 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Yeniden Dene", + "rename": "Yeniden Adlandır", + "newFile": "Yeni Dosya", + "newFolder": "Yeni Klasör", + "openFolderFirst": "İçinde dosyalar veya klasörler oluÅŸturmak için ilk olarak bir klasör açın.", + "newUntitledFile": "Yeni İsimsiz Dosya", + "createNewFile": "Yeni Dosya", + "createNewFolder": "Yeni Klasör", + "deleteButtonLabelRecycleBin": "&&Geri Dönüşüm Kutusuna Taşı", + "deleteButtonLabelTrash": "&&Çöp Kutusuna Taşı", + "deleteButtonLabel": "&&Sil", + "dirtyMessageFolderOneDelete": "1 dosyada kaydedilmemiÅŸ deÄŸiÅŸiklik barındıran bir klasörü siliyorsunuz. Devam etmek istiyor musunuz?", + "dirtyMessageFolderDelete": "{0} dosyada kaydedilmemiÅŸ deÄŸiÅŸiklik barındıran bir klasörü siliyorsunuz. Devam etmek istiyor musunuz?", + "dirtyMessageFileDelete": "KaydedilmemiÅŸ deÄŸiÅŸiklik barındıran bir dosyayı siliyorsunuz. Devam etmek istiyor musunuz?", + "dirtyWarning": "DeÄŸiÅŸiklikleriniz, kaydetmezseniz kaybolur.", + "confirmMoveTrashMessageFolder": "'{0}' ve içindekileri silmek istediÄŸinizden emin misiniz?", + "confirmMoveTrashMessageFile": "'{0}' öğesini silmek istediÄŸinize emin misiniz?", + "undoBin": "Geri dönüşüm kutusundan geri alabilirsiniz.", + "undoTrash": "Çöp kutusundan geri alabilirsiniz.", + "doNotAskAgain": "Bir daha sorma", + "confirmDeleteMessageFolder": "'{0}' öğesini ve içindekileri kalıcı olarak silmek istediÄŸinizden emin misiniz?", + "confirmDeleteMessageFile": "'{0}' öğesini kalıcı olarak silmek istediÄŸinizden emin misiniz?", + "irreversible": "Bu eylem geri döndürülemez!", + "permDelete": "Kalıcı Olarak Sil", + "delete": "Sil", + "importFiles": "Dosya İçe Aktar", + "confirmOverwrite": "Hedef klasörde aynı ada sahip bir dosya veya klasör zaten var. DeÄŸiÅŸtirmek istiyor musunuz?", + "replaceButtonLabel": "&&DeÄŸiÅŸtir", + "copyFile": "Kopyala", + "pasteFile": "Yapıştır", + "duplicateFile": "ÇoÄŸalt", + "openToSide": "Yana Aç", + "compareSource": "KarşılaÅŸtırma İçin Seç", + "globalCompareFile": "Aktif Dosyayı KarşılaÅŸtır...", + "openFileToCompare": "Bir baÅŸka dosya ile karşılaÅŸtırmak için ilk olarak bir dosya açın.", + "compareWith": "'{0}' dosyasını '{1}' ile karşılaÅŸtır", + "compareFiles": "Dosyaları KarşılaÅŸtır", + "refresh": "Yenile", + "save": "Kaydet", + "saveAs": "Farklı Kaydet...", + "saveAll": "Tümünü Kaydet", + "saveAllInGroup": "Gruptaki Tümünü Kadet", + "saveFiles": "Tüm Dosyaları Kaydet", + "revert": "Dosyayı Geri Döndür", + "focusOpenEditors": "Açık Düzenleyiciler Görünümüne Odakla", + "focusFilesExplorer": "Dosya Gezginine Odakla", + "showInExplorer": "Aktif Dosyayı Kenar ÇubuÄŸunda Ortaya Çıkar", + "openFileToShow": "Gezginde göstermek için ilk olarak bir dosya açın", + "collapseExplorerFolders": "Gezgindeki Klasörleri Daralt", + "refreshExplorer": "Gezgini Yenile", + "openFileInNewWindow": "Aktif Dosyayı Yeni Pencerede Aç", + "openFileToShowInNewWindow": "Yeni pencerede açmak için ilk olarak bir dosya açın", + "revealInWindows": "Gezginde Ortaya Çıkar", + "revealInMac": "Finder'da Ortaya Çıkar", + "openContainer": "İçeren Klasörü Aç", + "revealActiveFileInWindows": "Aktif Dosyayı Windows Gezgini'nde Ortaya Çıkar", + "revealActiveFileInMac": "Aktif Dosyayı Finder'da Ortaya Çıkar", + "openActiveFileContainer": "Aktif Dosyayı İçeren Klasörü Aç", + "copyPath": "Yolu Kopyala", + "copyPathOfActive": "Aktif Dosyanın Yolunu Kopyala", + "emptyFileNameError": "Bir dosya veya klasör adı saÄŸlanması gerekiyor.", + "fileNameExistsError": "Bu konumda bir **{0}** dosyası veya klasörü zaten mevcut. Lütfen baÅŸka bir ad seçin.", + "invalidFileNameError": "**{0}** adı, bir dosya veya klasör adı olarak geçerli deÄŸildir. Lütfen baÅŸka bir ad seçin.", + "filePathTooLongError": "**{0}** adı çok uzun bir yol ile sonuçlanıyor. Lütfen daha kısa bir ad seçin.", + "compareWithSaved": "Aktif Dosyayı Kaydedilenle KarşılaÅŸtır", + "modifiedLabel": "{0} (diskte) ↔ {1}", + "compareWithClipboard": "Aktif Dosyayı Panodakiyle KarşılaÅŸtır", + "clipboardComparisonLabel": "Pano ↔ {0}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/trk/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json new file mode 100644 index 00000000000..699305824d3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Yolunu kopyalamak için ilk olarak bir dosya açın", + "openFileToReveal": "Ortaya çıkarmak için ilk olarak bir dosya açın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json new file mode 100644 index 00000000000..4948cddf5c4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Gezgini Göster", + "explore": "Gezgin", + "view": "Görüntüle", + "textFileEditor": "Metin Dosyası Düzenleyicisi", + "binaryFileEditor": "İkili Dosya Düzenleyicisi", + "filesConfigurationTitle": "Dosyalar", + "exclude": "Dosyaları ve klasörleri hariç tutmak için glob desenlerini yapılandırın. Örnek olarak, dosya gezgini bu ayara baÄŸlı olarak hangi dosya ve klasörlerin gösterileceÄŸine karar verir.", + "files.exclude.boolean": "Dosya yollarının eÅŸleÅŸtirileceÄŸi glob deseni. Deseni etkinleÅŸtirmek veya devre dışı bırakmak için true veya false olarak ayarlayın.", + "files.exclude.when": "EÅŸleÅŸen bir dosyanın eÅŸdüzey dosyalarında ek denetim. EÅŸleÅŸen dosya adı için deÄŸiÅŸken olarak $(basename) kullanın.", + "associations": "Dillerle dosya iliÅŸkilendirmelerini yapılandırın (ör. \"*.uzanti\": \"html\"). Bunların, kurulu olan dillerin varsayılan iliÅŸkilendirmeleri karşısında önceliÄŸi vardır.", + "encoding": "Dosyalar okunurken ve yazılırken kullanılacak varsayılan karakter kümesi kodlaması. Bu ayar her bir dil için de yapılandırılabilir.", + "autoGuessEncoding": "EtkinleÅŸtirildiÄŸinde, dosyaları açarken karakter kümesini tahmin etmeye çalışır. Bu ayar her bir dil için de yapılandırılabilir.", + "eol": "Varsayılan satır sonu karakteri. LF için \\n ve CRLF için \\r\\n kullan.", + "trimTrailingWhitespace": "EtkinleÅŸtirildiÄŸinde, bir dosyayı kaydettiÄŸinizde sondaki boÅŸluk kırpılır.", + "insertFinalNewline": "EtkinleÅŸtirildiÄŸinde, bir dosyayı kaydederken dosya sonuna bir boÅŸ satır ekler.", + "trimFinalNewlines": "EtkinleÅŸtirildiÄŸinde, bir dosyayı kaydederken dosya sonundaki birden fazla boÅŸ satırı kırparak tek boÅŸ satıra çevirir", + "files.autoSave.off": "KaydedilmemiÅŸ deÄŸiÅŸiklikler içeren bir dosya hiçbir zaman otomatik olarak kaydedilmez.", + "files.autoSave.afterDelay": "KaydedilmemiÅŸ deÄŸiÅŸiklikler içeren bir dosya, 'files.autoSaveDelay' ayarlandıktan sonra otomatik olarak kaydedilir.", + "files.autoSave.onFocusChange": "KaydedilmemiÅŸ deÄŸiÅŸiklikler içeren bir dosya, düzenleyici odaktan çıktığı an otomatik olarak kaydedilir.", + "files.autoSave.onWindowChange": "KaydedilmemiÅŸ deÄŸiÅŸiklikler içeren bir dosya, pencere odaktan çıktığı an otomatik olarak kaydedilir.", + "autoSave": "KaydedilmemiÅŸ deÄŸiÅŸiklikler içeren dosyaların otomatik kaydedilmesini denetler. Kabul edilen deÄŸerler: '{0}', '{1}', '{2}' (düzenleyici odaktan çıktığında), '{3}' (pencere odaktan çıktığında). '{4}' olarak ayarlanırsa, gecikmeyi 'files.autoSaveDelay' ile ayarlayabilirsiniz.", + "autoSaveDelay": "KaydedilmemiÅŸ deÄŸiÅŸiklikler içeren bir dosyanın kaç ms gecikmeli otomatik olarak kaydedileceÄŸini denetler. Sadece 'files.autoSave', '{0}' olarak ayarlandığında uygulanır.", + "watcherExclude": "Dosya izlemeden hariç tutulacak dosya yollarının glob desenlerini yapılandırın. Desenler mutlak yollarla eÅŸleÅŸmelidir (ör. ** ile ön ek veya düzgün eÅŸleÅŸtirmek için tam yol). Bu ayar deÄŸiÅŸtiÄŸinde yeniden baÅŸlatma gerektirir. Code'un baÅŸlangıçta çok fazla CPU zamanı harcadığını görürseniz, baÅŸlangıç yüklemesini azaltmak için büyük klasörleri hariç tutabilirsiniz.", + "hotExit.off": "Hızlı çıkışı devre dışı bırak.", + "hotExit.onExit": "Hızlı çıkış, uygulama kapandığında tetiklenir, yani Windows/Linux'da son pencere kapandığında veya workbench.action.quit komutu tetiklendiÄŸi zaman (komut paleti, tuÅŸ bağı, menü). Bir sonraki baÅŸlatmada tüm pencereler yedekleriyle geri yüklenir.", + "hotExit.onExitAndWindowClose": "Hızlı çıkış, uygulama kapandığında tetiklenir, yani Windows/Linux'da son pencere kapandığında veya workbench.action.quit komutu tetiklendiÄŸi zaman (komut paleti, tuÅŸ bağı, menü), ve ayrıca son pencere olmasından bağımsız açık bir klasör bulunan herhangi bir pencere varsa. Bir sonraki baÅŸlatmada tüm pencereler yedekleriyle geri yüklenir. Klasör pencerelerini kapatılmadan önceki konumlarına geri yüklemek için \"window.restoreWindows\" ögesini \"all\" olarak ayarlayın.", + "hotExit": "Oturumlar arasında kaydedilmemiÅŸ dosyaların hatırlanıp hatırlanmayacağını denetler, düzenleyiciden çıkarken kaydetmek için izin istenmesi atlanacaktır.", + "useExperimentalFileWatcher": "Yeni deneysel dosya izleyicisini kullanın.", + "defaultLanguage": "Yeni dosyalara atanan varsayılan dil modu.", + "editorConfigurationTitle": "Düzenleyici", + "formatOnSave": "Dosyayı kaydederken biçimlendir. Bir biçimlendirici mevcut olmalıdır, dosya otomatik olarak kaydedilmemelidir, ve düzenleyici kapanmıyor olmalıdır.", + "explorerConfigurationTitle": "Dosya Gezgini", + "openEditorsVisible": "Açık Editörler bölmesinde gösterilen düzenleyici sayısı. Bölmeyi gizlemek için 0 olarak ayarlayın.", + "dynamicHeight": "Açık düzenleyiciler bölümü yüksekliÄŸinin öge sayısına göre dinamik olarak uyarlanıp uyarlanmayacağını denetler.", + "autoReveal": "Gezginin dosyaları açarken, onları otomatik olarak ortaya çıkartmasını ve seçmesini denetler.", + "enableDragAndDrop": "Gezgeinin sürükle bırak ile dosyaları ve klasörleri taşımaya izin verip vermeyeceÄŸini denetler.", + "confirmDragAndDrop": "Gezginin, sürükle bırak ile dosyalar ve klasörlerin taşındığı zaman onay isteyip istemeyeceÄŸini denetler.", + "confirmDelete": "Gezginin, geri dönüşüm kutusu ile dosya silineceÄŸi zaman onay isteyip istemeyeceÄŸini denetler.", + "sortOrder.default": "Dosya ve klasörler adlarına göre, alfabetik olarak sıralanırlar. Klasörler dosyalardan önce görüntülenir.", + "sortOrder.mixed": "Dosya ve klasörler adlarına göre, alfabetik olarak sıralanırlar. Dosyalar ve klasörler iç içe bulunur.", + "sortOrder.filesFirst": "Dosya ve klasörler adlarına göre, alfabetik olarak sıralanırlar. Dosyalar klasörlerden önce görüntülenir.", + "sortOrder.type": "Dosya ve klasörler uzantılarına göre, alfabetik olarak sıralanırlar. Klasörler dosyalardan önce görüntülenir.", + "sortOrder.modified": "Dosya ve klasörler son deÄŸiÅŸtirilme tarihine göre, azalan düzende sıralanırlar. Klasörler dosyalardan önce görüntülenir.", + "sortOrder": "Gezginde dosya ve klasörlerin sıralamasını denetler. Varsayılan sıralamaya ek olarak, sıralamayı; 'mixed' (dosya ve klasörler karışık olarak sıralanır), 'type' (dosya türüne göre), 'modified' (son düzenlenme tarihine göre) veya 'filesFirst' (dosyaları klasörlerden önce sırala) olarak ayarlayabilirsiniz.", + "explorer.decorations.colors": "Dosya süslemelerinin renkleri kullanıp kullanmayacağını denetler.", + "explorer.decorations.badges": "Dosya süslemelerinin göstergeleri kullanıp kullanmayacağını denetler." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json new file mode 100644 index 00000000000..660d16789d0 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "userGuide": "DeÄŸiÅŸikliklerinizi **geri al**mak veya diskteki içeriÄŸin **üzerine yaz**mak için düzenleyicideki araç çubuÄŸunu kullanabilirsiniz", + "discard": "At", + "overwrite": "Üzerine Yaz", + "retry": "Yeniden Dene", + "readonlySaveError": "'{0}' kaydedilemedi: Dosya yazmaya karşı korunuyor. Korumayı kaldırmak için 'Üzerine Yaz'ı seçin.", + "genericSaveError": "'{0}' kaydedilemedi: ({1}).", + "staleSaveError": "'{0}' kaydedilemedi: Diskteki içerik daha yeni. Sizdeki sürüm ile disktekini karşılaÅŸtırmak için **KarşılaÅŸtır**a tıklayın.", + "compareChanges": "KarşılaÅŸtır", + "saveConflictDiffLabel": "{0} (diskte) ↔ {1} ({2} uygulamasında) - Kaydetme çakışmasını çöz" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json new file mode 100644 index 00000000000..78cbb2f07ff --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Açık Klasör Yok", + "explorerSection": "Dosya Gezgini Bölümü", + "noWorkspaceHelp": "Çalışma alanına hâlâ bir klasör eklemediniz.", + "addFolder": "Klasör Ekle", + "noFolderHelp": "Henüz bir klasör açmadınız.", + "openFolder": "Klasör Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json new file mode 100644 index 00000000000..5e24e43299f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label": "Gezgin", + "canNotResolve": "Çalışma alanı klasörü çözümlenemiyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json b/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json new file mode 100644 index 00000000000..d8b937fc203 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Dosya Gezgini Bölümü", + "treeAriaLabel": "Dosya Gezgini" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json new file mode 100644 index 00000000000..f8f351a367f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Dosya adı girin. Onaylamak için Enter'a, iptal etmek için Escape tuÅŸuna basın.", + "filesExplorerViewerAriaLabel": "{0}, Dosya Gezgini", + "dropFolders": "Klasörleri çalışma alanına eklemek istiyor musunuz?", + "dropFolder": "Klasörü çalışma alanına eklemek istiyor musunuz?", + "addFolders": "Klasörleri &&Ekle", + "addFolder": "Klasörü &&Ekle", + "confirmMove": "'{0}' ögesini taşımak istediÄŸinizden emin misiniz?", + "doNotAskAgain": "Bir daha sorma", + "moveButtonLabel": "&&Taşı", + "confirmOverwriteMessage": "'{0}' hedef klasörde zaten mevcut. DeÄŸiÅŸtirmek istiyor musunuz?", + "irreversible": "Bu eylem geri döndürülemez!", + "replaceButtonLabel": "&&DeÄŸiÅŸtir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json b/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json new file mode 100644 index 00000000000..9f1cee51d98 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Açık Düzenleyiciler", + "openEditosrSection": "Açık Düzenleyiciler Bölümü", + "dirtyCounter": "{0} kaydedilmemiÅŸ", + "saveAll": "Tümünü Kaydet", + "closeAllUnmodified": "DeÄŸiÅŸtirilmeyenleri Kapat", + "closeAll": "Tümünü Kapat", + "compareWithSaved": "Kaydedilenle KarşılaÅŸtır", + "close": "Kapat", + "closeOthers": "DiÄŸerlerini Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json b/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json new file mode 100644 index 00000000000..f22af02df4b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, Düzenleyici Grubu", + "openEditorAriaLabel": "{0}, Açık Düzenleyici", + "saveAll": "Tümünü Kaydet", + "closeAllUnmodified": "DeÄŸiÅŸtirilmeyenleri Kapat", + "closeAll": "Tümünü Kapat", + "compareWithSaved": "Kaydedilenle KarşılaÅŸtır", + "close": "Kapat", + "closeOthers": "DiÄŸerlerini Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/trk/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json new file mode 100644 index 00000000000..8aeae721120 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "totalProblems": "Toplam {0} Sorun", + "filteredProblems": "{1} Sorundan {0} Tanesi Gösteriliyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/trk/src/vs/workbench/parts/markers/common/messages.i18n.json index 16978d67428..fe543da8a99 100644 --- a/i18n/trk/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,8 +6,7 @@ { "viewCategory": "Görüntüle", "problems.view.toggle.label": "Sorunları Aç/Kapat", - "problems.view.show.label": "Sorunları Göster", - "problems.view.hide.label": "Sorunları Gizle", + "problems.view.focus.label": "Sorunlara Odakla", "problems.panel.configuration.title": "Sorunlar Görünümü", "problems.panel.configuration.autoreveal": "Sorunlar görünümünün; dosyalar açılırken, dosyaları otomatik olarak ortaya çıkarıp çıkarmayacağını denetler.", "markers.panel.title.problems": "Sorunlar", diff --git a/i18n/trk/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json b/i18n/trk/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json new file mode 100644 index 00000000000..af8637daeca --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/performance/electron-browser/startupProfiler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "prof.message": "Profiller baÅŸarıyla oluÅŸturuldu.", + "prof.detail": "Lütfen bir sorun (bildirimi) oluÅŸturun ve aÅŸağıdaki dosyaları manuel olarak ekleyin:\n{0}", + "prof.restartAndFileIssue": "Sorun OluÅŸtur ve Yeniden BaÅŸlat", + "prof.restart": "Yeniden BaÅŸlat", + "prof.thanks": "Bize yardımcı olduÄŸunuz için teÅŸekkürler.", + "prof.detail.restart": "'{0}' uygulamasını kullanmaya devam etmek için son bir yeniden baÅŸlatma gerekiyor. Katkılarınız için tekrar teÅŸekkür ederiz." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 68b1055180c..3078f1cb51e 100644 --- a/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defineKeybinding.initial": "İstenen tuÅŸ kombinasyonuna basın ve daha sonra ENTER'a basın. İptal etmek için ESCAPE tuÅŸuna basın.", + "defineKeybinding.initial": "İstenen tuÅŸ kombinasyonuna basın ve daha sonra ENTER'a basın.", "defineKeybinding.chordsTo": "ardından" } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index db847246500..1646456ece5 100644 --- a/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -26,6 +26,7 @@ "editKeybindingLabel": "TuÅŸ Bağını DeÄŸiÅŸtir", "addKeybindingLabelWithKey": "{0} TuÅŸ Bağını Ekle", "addKeybindingLabel": "TuÅŸ Bağını Ekle", + "title": "{0} ({1})", "commandAriaLabel": "Komut {0}'dır.", "keybindingAriaLabel": "TuÅŸ bağı {0}'dır.", "noKeybinding": "TuÅŸ bağı atanmamış.", diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index fad9ab4f40b..a11100c756a 100644 --- a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "openRawDefaultSettings": "Ham Varsayılan Ayarları Aç", "openGlobalSettings": "Kullanıcı Ayarlarını Aç", "openGlobalKeybindings": "Klavye Kısayollarını Aç", "openGlobalKeybindingsFile": "Klavye Kısayolları Dosyasını Aç", diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 5fa332cf96c..0f7fda7cc49 100644 --- a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -7,12 +7,12 @@ "settingsEditorName": "Varsayılan Ayarlar", "SearchSettingsWidget.AriaLabel": "Ayarları ara", "SearchSettingsWidget.Placeholder": "Ayarları Ara", - "totalSettingsMessage": "Toplam {0} Ayar", "noSettingsFound": "Sonuç Yok", "oneSettingFound": "1 ayar eÅŸleÅŸti", "settingsFound": "{0} ayar eÅŸleÅŸti", - "fileEditorWithInputAriaLabel": "{0}. Metin dosyası düzenleyici.", - "fileEditorAriaLabel": "Metin dosyası düzenleyici.", + "totalSettingsMessage": "Toplam {0} Ayar", + "defaultSettings": "Varsayılan Ayarlar", + "defaultFolderSettings": "Varsayılan Klasör Ayarları", "defaultEditorReadonly": "Varsayılan ayarları geçersiz kılmak için saÄŸ taraftaki düzeyicide düzenleme yapın.", "preferencesAriaLabel": "Varsayılan tercihler. Salt okunabilir metin editörü." } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 94a6b10edb2..d3014741d72 100644 --- a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -7,8 +7,6 @@ "emptyUserSettingsHeader": "Varsayılan ayarların üzerine yazmak için ayarlarınızı buraya yerleÅŸtirin.", "emptyWorkspaceSettingsHeader": "Varsayılan kullanıcı ayarlarının üzerine yazmak için ayarlarınızı buraya yerleÅŸtirin.", "emptyFolderSettingsHeader": "Çalışma alanı ayarlarındakilerin üzerine yazmak için klasör ayarlarınızı buraya yerleÅŸtirin.", - "defaultFolderSettingsTitle": "Varsayılan Klasör Ayarları", - "defaultSettingsTitle": "Varsayılan Ayarlar", "editTtile": "Düzenle", "replaceDefaultValue": "Ayarlarda DeÄŸiÅŸtir", "copyDefaultValue": "Ayarlara Kopyala", diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index e5a6991d06e..dad393ec3bf 100644 --- a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultSettingsFuzzyPrompt": "Bulanık aramayı deneyin!", + "defaultSettingsFuzzyPrompt": "DoÄŸal dil aramasını deneyin!", "defaultSettings": "Geçersiz kılmak için ayarlarınızı saÄŸ taraftaki düzeyiciye ekleyin.", "noSettingsFound": "Hiçbir Ayar Bulunamadı.", - "folderSettingsDetails": "Klasör Ayarları", - "enableFuzzySearch": "Deneysel bulanık aramayı etkinleÅŸtir" + "settingsSwitcherBarAriaLabel": "Ayar DeÄŸiÅŸtirici", + "userSettings": "Kullanıcı Ayarları", + "workspaceSettings": "Çalışma Alanı Ayarları", + "folderSettings": "Klasör Ayarları", + "enableFuzzySearch": "DoÄŸal dil aramasını etkinleÅŸtir" } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json new file mode 100644 index 00000000000..76c31109169 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Varsayılan Tercihler Düzenleyicisi", + "keybindingsEditor": "TuÅŸ BaÄŸları Düzenleyicisi", + "preferences": "Tercihler" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json index 7d7165d58a6..919a0969127 100644 --- a/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -6,7 +6,6 @@ { "scm providers": "Kaynak Kontrolü SaÄŸlayıcıları", "hideRepository": "Gizle", - "commitMessage": "Mesaj (commit'lemek için {0} tuÅŸlarına basın)", "installAdditionalSCMProviders": "Ek SCM SaÄŸlayıcıları Yükle...", "no open repo": "Aktif bir kaynak kontrolü saÄŸlayıcısı yok.", "source control": "Kaynak Kontrolü", diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index 138ce93c325..2f4ab069502 100644 --- a/i18n/trk/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defaultLabel": "giriÅŸ", - "useIgnoreFilesDescription": "Yok Sayma Dosyalarını Kullan", - "useExcludeSettingsDescription": "Hariç Tutma Ayarlarını Kullan" + "useExcludesAndIgnoreFilesDescription": "Hariç Tutma Ayarlarını ve Yok Sayma Dosyalarını Kullan" } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/search.contribution.i18n.json index e5f8ce96be9..fd6f32d47d6 100644 --- a/i18n/trk/src/vs/workbench/parts/search/browser/search.contribution.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -16,7 +16,6 @@ "exclude.boolean": "Dosya yollarının eÅŸleÅŸtirileceÄŸi glob deseni. Deseni etkinleÅŸtirmek veya devre dışı bırakmak için true veya false olarak ayarlayın.", "exclude.when": "EÅŸleÅŸen bir dosyanın eÅŸdüzey dosyalarında ek denetim. EÅŸleÅŸen dosya adı için deÄŸiÅŸken olarak $(basename) kullanın.", "useRipgrep": "Metin ve dosya aramasında Ripgrep kullanılıp kullanılmayacağını denetler", - "useIgnoreFilesByDefault": "Yeni bir çalışma alanında arama yaparken .gitignore ve .ignore dosyalarının varsayılan olarak kullanılıp kullanılmayacağını denetler.", "useIgnoreFiles": "Dosyaları ararken .gitignore ve .ignore dosyalarının kullanılıp kullanılmayacağını denetler.", "search.quickOpen.includeSymbols": "Dosya sonuçlarındaki bir global sembol aramasının sonuçlarının Hızlı Aç'a dahil edilip edilmeyeceÄŸini yapılandırın.", "search.followSymlinks": "Arama yaparken sembolik linklerin takip edilip edilmeyeceÄŸini denetler." diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 416275aedbf..cf14cf9120f 100644 --- a/i18n/trk/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -10,17 +10,14 @@ "previousSearchExcludePattern": "Önceki Aramada Hariç Tutulan Kalıbı Göster", "nextSearchTerm": "Sonraki Arama Terimini Göster", "previousSearchTerm": "Önceki Arama Terimini Göster", - "focusNextInputBox": "Sonraki Girdi Kutusuna Odakla", - "focusPreviousInputBox": "Önceki Girdi Kutusuna Odakla", "showSearchViewlet": "Aramayı Göster", "findInFiles": "Dosyalarda Bul", "findInFilesWithSelectedText": "Seçili Metni Dosyalarda Bul", "replaceInFiles": "Dosyalardakileri DeÄŸiÅŸtir", "replaceInFilesWithSelectedText": "Dosyalardaki Seçili Metni DeÄŸiÅŸtir", - "findInWorkspace": "Çalışma Alanında Bul...", - "findInFolder": "Klasörde Bul...", "RefreshAction.label": "Yenile", - "ClearSearchResultsAction.label": "Arama Sonuçlarını Temizle", + "CollapseDeepestExpandedLevelAction.label": "Tümünü Daralt", + "ClearSearchResultsAction.label": "Temizle", "FocusNextSearchResult.label": "Sonraki Arama Sonucuna Odakla", "FocusPreviousSearchResult.label": "Önceki Arama Sonucuna Odakla", "RemoveAction.label": "Sonlandır", diff --git a/i18n/trk/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json new file mode 100644 index 00000000000..fd6f32d47d6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Çalışma Alanında Sembole Git...", + "name": "Ara", + "search": "Ara", + "view": "Görüntüle", + "openAnythingHandlerDescription": "Dosyaya Git", + "openSymbolDescriptionNormal": "Çalışma Alanında Sembole Git", + "searchOutputChannelTitle": "Ara", + "searchConfigurationTitle": "Ara", + "exclude": "Aramalarda dosyaları ve klasörleri hariç tutmak için glob desenlerini yapılandırın. files.exclude ayarından, tüm glob desenlerini devralır.", + "exclude.boolean": "Dosya yollarının eÅŸleÅŸtirileceÄŸi glob deseni. Deseni etkinleÅŸtirmek veya devre dışı bırakmak için true veya false olarak ayarlayın.", + "exclude.when": "EÅŸleÅŸen bir dosyanın eÅŸdüzey dosyalarında ek denetim. EÅŸleÅŸen dosya adı için deÄŸiÅŸken olarak $(basename) kullanın.", + "useRipgrep": "Metin ve dosya aramasında Ripgrep kullanılıp kullanılmayacağını denetler", + "useIgnoreFiles": "Dosyaları ararken .gitignore ve .ignore dosyalarının kullanılıp kullanılmayacağını denetler.", + "search.quickOpen.includeSymbols": "Dosya sonuçlarındaki bir global sembol aramasının sonuçlarının Hızlı Aç'a dahil edilip edilmeyeceÄŸini yapılandırın.", + "search.followSymlinks": "Arama yaparken sembolik linklerin takip edilip edilmeyeceÄŸini denetler." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/trk/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json new file mode 100644 index 00000000000..e2063bd2f0e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "findInFolder": "Klasörde Bul...", + "findInWorkspace": "Çalışma Alanında Bul..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 38414621301..9719a9bb448 100644 --- a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -6,10 +6,9 @@ { "tasksCategory": "Görevler", "ConfigureTaskRunnerAction.label": "Görevi Yapılandır", - "ConfigureBuildTaskAction.label": "Derleme Görevini Yapılandır", "CloseMessageAction.label": "Kapat", - "ShowTerminalAction.label": "Terminali Görüntüle", "problems": "Sorunlar", + "building": "Derleniyor...", "manyMarkers": "99+", "runningTasks": "Çalışan Görevleri Göster", "tasks": "Görevler", @@ -52,7 +51,7 @@ "TaslService.noEntryToRun": "Çalıştırılacak hiçbir görev bulunamadı. Görevleri Yapılandır...", "TaskService.fetchingBuildTasks": "Derleme görevleri alınıyor...", "TaskService.pickBuildTask": "Çalıştırılacak derleme görevini seçin", - "TaskService.noBuildTask": "Çalıştırılacak hiçbir derleme görevi bulunamadı. Görevleri Yapılandır...", + "TaskService.noBuildTask": "Çalıştırılacak hiçbir derleme görevi bulunamadı. Derleme Görevini Yapılandır...", "TaskService.fetchingTestTasks": "Test görevleri alınıyor...", "TaskService.pickTestTask": "Çalıştırılacak test görevini seçin", "TaskService.noTestTaskTerminal": "Çalıştırılacak hiçbir test görevi bulunamadı. Görevleri Yapılandır...", diff --git a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 2e339c2d029..eafabd5ff3c 100644 --- a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -7,6 +7,7 @@ "TerminalTaskSystem.unknownError": "Görev çalıştırılırken bir hata oluÅŸtu. Detaylar için görev çıktısı günlüğüne bakın.", "dependencyFailed": "'{1}' çalışma alanı klasöründe, '{0}' bağımlı görevi çözümlenemiyor", "TerminalTaskSystem.terminalName": "Görev - {0}", + "closeTerminal": "Terminali kapatmak için lütfen bir tuÅŸa basın.", "reuseTerminal": "Terminal görevler tarafından tekrar kullanılacak, kapatmak için herhangi bir tuÅŸa basın.", "TerminalTaskSystem": "UNC sürücüsünde kabuk komutu yürütülemez.", "unkownProblemMatcher": "{0} sorun eÅŸleÅŸtirici çözümlenemiyor. EÅŸleÅŸtirici yok sayılacaktır." diff --git a/i18n/trk/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index fc4afcade92..c2bd4e04b92 100644 --- a/i18n/trk/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,8 +14,8 @@ "ConfigurationParser.noTypeDefinition": "Hata: '{0}' olarak kayıtlı bir görev türü yok. İlgili görev saÄŸlayıcısını içeren bir eklentiyi yüklemeyi mi unuttunuz?", "ConfigurationParser.missingRequiredProperty": "Hata: ihtiyaç duyulan '{1}' özelliÄŸi, '{0}' görev yapılandırmasında eksik. Görev yapılandırması yok sayılacaktır.", "ConfigurationParser.notCustom": "Hata: 'tasks' bir özel görev olarak tanımlanmamış. Yapılandırma yok sayılacaktır.\n{0}\n", - "ConfigurationParser.noTaskName": "Hata: 'tasks' bir 'taskName' özelliÄŸi belirtmelidir. Görev yok sayılacaktır.\n{0}\n", - "taskConfiguration.shellArgs": "Uyarı: '{0}' görevi bir kabuk komutudur ve komut adı veya argümanlarından biri kaçış karakteri içermeyen boÅŸluklar içeriyor. DoÄŸru komut satırı alıntılamasını saÄŸlamak için lütfen argümanları komutlarla birleÅŸtirin.", + "ConfigurationParser.noTaskName": "Hata: bir görev, bir 'label' özelliÄŸi belirtmelidir. Görev yok sayılacaktır.\n{0}\n", + "taskConfiguration.shellArgs": "Uyarı: '{0}' görevi bir kabuk komutudur ve argümanlarından biri kaçış karakteri içermeyen boÅŸluklar içeriyor olabilir. DoÄŸru komut satırı alıntısını saÄŸlamak için lütfen argümanları komutlarla birleÅŸtirin.", "taskConfiguration.noCommandOrDependsOn": "Hata: '{0}' görevi bir komut veya dependsOn özelliÄŸi belirtmiyor. Görev yok sayılacaktır. Görevin tanımı:\n{1}", "taskConfiguration.noCommand": "Hata: '{0}' görevi bir komut tanımlamıyor. Görev yok sayılacaktır. Görevin tanımı:\n{1}", "TaskParse.noOsSpecificGlobalTasks": "2.0.0 görev sürümü genel iÅŸletim sistemi özel görevlerini desteklemiyor. Bunları iÅŸletim sistemine özel komut içeren bir göreve çevirin. Etkilenen görevler:\n{0}" diff --git a/i18n/trk/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index 82b1bdbdd46..f2bb55a8b4e 100644 --- a/i18n/trk/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,7 +6,7 @@ { "termEntryAriaLabel": "{0}, terminal seçici", "termCreateEntryAriaLabel": "{0}, yeni terminal oluÅŸtur", - "'workbench.action.terminal.newplus": "$(plus) Yeni Entegre Terminal OluÅŸtur", + "workbench.action.terminal.newplus": "$(plus) Yeni Entegre Terminal OluÅŸtur", "noTerminalsMatching": "EÅŸleÅŸen terminal yok", "noTerminalsFound": "Açık terminal yok" } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index ef4e0417b9d..c6efd852646 100644 --- a/i18n/trk/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,13 +5,15 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "Renk Teması", + "themes.category.light": "açık temalar", + "themes.category.dark": "koyu temalar", + "themes.category.hc": "yüksek karşıtlık temaları", "installColorThemes": "Ek Renk Temaları Yükle...", "themes.selectTheme": "Bir Renk Teması Seç (Yukarı/AÅŸağı TuÅŸlarıyla Önizleme Yap)", "selectIconTheme.label": "Dosya Simgesi Teması", - "installIconThemes": "Ek Dosya Simgesi Temaları Yükle...", "noIconThemeLabel": "Hiçbiri", "noIconThemeDesc": "Dosya simgelerini devre dışı bırak", - "problemChangingIconTheme": "Simge temasını ayarlama sorunu: {0}", + "installIconThemes": "Ek Dosya Simgesi Temaları Yükle...", "themes.selectIconTheme": "Dosya Simgesi Teması Seç", "generateColorTheme.label": "Geçerli Ayarlardan Renk Teması OluÅŸtur", "preferences": "Tercihler", diff --git a/i18n/trk/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/trk/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 4c2ceda75b6..917d8450400 100644 --- a/i18n/trk/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/trk/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -9,9 +9,9 @@ "scope.window.description": "Kullanıcı veya çalışma alanında yapılandırılabilen Windows'a özel yapılandırma.", "scope.resource.description": "Kullanıcı veya çalışma alanında yapılandırılabilen kaynaÄŸa özel yapılandırma.", "scope.description": "Yapılandırmanın uygulanabilir olduÄŸu kapsam. Mevcut kapsamlar 'window' ve 'resource'tır.", + "vscode.extension.contributes.defaultConfiguration": "Varsayılan düzenleyici yapılandırma ayarlarına dil bazında ekleme yapar.", "vscode.extension.contributes.configuration": "Yapılandırma ayarlarına ekleme yapar.", "invalid.title": "'configuration.title' bir dize olmalıdır", - "vscode.extension.contributes.defaultConfiguration": "Varsayılan düzenleyici yapılandırma ayarlarına dil bazında ekleme yapar.", "invalid.properties": "'configuration.properties' bir nesne olmalıdır", "invalid.allOf": "'configuration.allOf' kullanım dışıdır ve artık kullanılmamalıdır. Bunun yerine, birden çok yapılandırma bölümlerini bir dizi olarak 'configuration' ekleme noktasına geçirin.", "workspaceConfig.folders.description": "Çalışma alanına yüklenecek klasörler listesi.", diff --git a/i18n/trk/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json b/i18n/trk/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json new file mode 100644 index 00000000000..4289f712979 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetri", + "telemetry.enableCrashReporting": "Kilitlenme raporlarının Microsoft'a gönderilmesini etkinleÅŸtirin.\nBu seçeneÄŸin yürürlüğe girmesi için yeniden baÅŸlatma gerekir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/trk/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index 778ed05c3e7..24290675b55 100644 --- a/i18n/trk/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/trk/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "bubbleTitle": "vurgulanan öğeler içeriyor" + "bubbleTitle": "Vurgulanan öğeler içeriyor" } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/trk/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json new file mode 100644 index 00000000000..1c8a872ac88 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "message": "$(zap) Eklenti Sunucusu Ayrımlanıyor..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/trk/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index f94d7e7d32f..305fd56ccc7 100644 --- a/i18n/trk/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/trk/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -9,5 +9,6 @@ "extensionHostProcess.crash": "Eklenti sunucusu beklenmeyen biçimde sonlandırıldı.", "extensionHostProcess.unresponsiveCrash": "Eklenti sunucusu yanıt vermediÄŸinden sonlandırıldı.", "overwritingExtension": "{0} eklentisinin üzerine {1} yazılıyor.", - "extensionUnderDevelopment": "{0} konumundaki geliÅŸtirme eklentisi yükleniyor" + "extensionUnderDevelopment": "{0} konumundaki geliÅŸtirme eklentisi yükleniyor", + "extensionCache.invalid": "Eklentiler disk üzerinde deÄŸiÅŸime uÄŸradı. Lütfen pencereyi yeniden yükleyin." } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/trk/src/vs/workbench/services/files/node/fileService.i18n.json index 0c8d70cb473..4604d836bb6 100644 --- a/i18n/trk/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/trk/src/vs/workbench/services/files/node/fileService.i18n.json @@ -8,8 +8,8 @@ "fileIsDirectoryError": "Dosya bir dizindir", "fileNotModifiedError": "Dosya ÅŸu tarihten beri deÄŸiÅŸtirilmemiÅŸ:", "fileTooLargeError": "Dosya, açmak için çok büyük", - "fileBinaryError": "Dosya ikili olarak görünüyor ve metin olarak açılamıyor", "fileNotFoundError": "Dosya bulunamadı ({0})", + "fileBinaryError": "Dosya ikili olarak görünüyor ve metin olarak açılamıyor", "fileExists": "OluÅŸturulacak dosya zaten mevcut ({0})", "fileMoveConflict": "Taşıma/kopyalama yapılamadı. Dosya, hedefte zaten mevcut.", "unableToMoveCopyError": "Taşıma/kopyalama yapılamadı. Dosya, içinde bulunduÄŸu klasörü deÄŸiÅŸtiriyor.", diff --git a/i18n/trk/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/trk/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 2aa6fbc364a..4a33b67187c 100644 --- a/i18n/trk/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/trk/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -22,5 +22,5 @@ "keybindings.json.when": "TuÅŸun aktif olacağı koÅŸul", "keybindings.json.args": "Yürütülecek komuta iletilecek argümanlar.", "keyboardConfigurationTitle": "Klavye", - "dispatch": "TuÅŸ basımlarının ya `keydown.code` (önerilen) ya da ` keydown.keyCode` kullanarak gönderilmesini denetler." + "dispatch": "TuÅŸ basımlarının ya `code` (önerilen) ya da `keyCode` kullanarak gönderilmesini denetler." } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/trk/src/vs/workbench/services/textfile/common/textFileService.i18n.json index d3399a79e65..5b46633251d 100644 --- a/i18n/trk/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/trk/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "files.backup.failSave": "Dosyalar yedeklenemedi (Hata: {0}), çıkmak için dosyalarınızı kaydetmeyi deneyin." + "files.backup.failSave": "KaydedilmemiÅŸ deÄŸiÅŸiklikler içeren dosyalar yedekleme konumuna yazılamadı. (Hata: {0}). Önce dosyalarınızı kaydetmeyi deneyin ve ardından kapatın." } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/trk/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 6715de58332..06e828ba73e 100644 --- a/i18n/trk/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/trk/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "migration.completed": "Yeni tema ayarları kullanıcı ayarlarına eklendi. Yedek, {0} konumunda mevcuttur.", "error.cannotloadtheme": "{0} yüklenemedi: {1}", - "error.cannotloadicontheme": "{0} yüklenemedi", "colorTheme": "Çalışma ekranında kullanılan renk temasını belirtir.", "colorThemeError": "Tema bilinmiyor veya yüklenmemiÅŸ.", "iconTheme": "Çalışma ekranında kullanılan simge temasını veya hiçbir dosya simgesi göstermemek için 'null' belirtir.", diff --git a/package.json b/package.json index d902790fbfe..8535979bdf1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", - "version": "1.19.0", - "distro": "11ff877087592418b32fc1b49bb18bc5f77341e1", + "version": "1.20.0", + "distro": "3e04fd7a1141705f5e82fb1175edc03d0d4ddf9c", "author": { "name": "Microsoft Corporation" }, @@ -34,12 +34,13 @@ "minimist": "1.2.0", "native-keymap": "1.2.5", "native-watchdog": "0.3.0", - "node-pty": "0.7.3", + "node-pty": "0.7.4", "nsfw": "1.0.16", "semver": "4.3.6", - "v8-profiler": "jrieken/v8-profiler#vscode", + "spdlog": "0.3.7", + "v8-inspect-profiler": "^0.0.7", "vscode-chokidar": "1.6.2", - "vscode-debugprotocol": "1.25.0-pre.0", + "vscode-debugprotocol": "1.25.0", "vscode-ripgrep": "^0.6.0-patch.0.5", "vscode-textmate": "^3.2.0", "xterm": "Tyriar/xterm.js#vscode-release/1.19", @@ -64,7 +65,7 @@ "flatpak-bundler": "^0.1.1", "glob": "^5.0.13", "gulp": "^3.8.9", - "gulp-atom-electron": "^1.11.0", + "gulp-atom-electron": "1.15.1", "gulp-azure-storage": "^0.7.0", "gulp-bom": "^1.0.0", "gulp-buffer": "0.0.2", diff --git a/resources/linux/bin/code.sh b/resources/linux/bin/code.sh index bb146af861f..088bcf8b2ab 100755 --- a/resources/linux/bin/code.sh +++ b/resources/linux/bin/code.sh @@ -12,7 +12,7 @@ if [ "$(id -u)" = "0" ]; then fi done if [ -z $DATA_DIR_SET ]; then - echo "It is recommended to start vscode as a normal user. To run as root, you must specify an alternate user data directory with the --user-data-dir argument." 1>&2 + echo "You are trying to start vscode as a super user which is not recommended. If you really want to, you must specify an alternate user data directory using the --user-data-dir argument." 1>&2 exit 1 fi fi diff --git a/src/main.js b/src/main.js index 7b31fc5dcab..3192f1f086c 100644 --- a/src/main.js +++ b/src/main.js @@ -5,13 +5,6 @@ 'use strict'; -if (process.argv.indexOf('--prof-startup') >= 0) { - var profiler = require('v8-profiler'); - var prefix = require('crypto').randomBytes(2).toString('hex'); - process.env.VSCODE_PROFILES_PREFIX = prefix; - profiler.startProfiling('main', true); -} - var perf = require('./vs/base/common/performance'); perf.mark('main:started'); @@ -122,6 +115,10 @@ function getNLSConfiguration() { } function getNodeCachedDataDir() { + // flag to disable cached data support + if (process.argv.indexOf('--no-cached-data') > 0) { + return Promise.resolve(undefined); + } // IEnvironmentService.isBuilt if (process.env['VSCODE_DEV']) { diff --git a/src/tsconfig.json b/src/tsconfig.json index 2d516dd2313..e8f68d0088d 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -13,8 +13,9 @@ "noUnusedLocals": true, "noImplicitThis": true, "baseUrl": ".", + "outDir": "../out", "typeRoots": [ "typings" ] } -} \ No newline at end of file +} diff --git a/src/typings/node.d.ts b/src/typings/node.d.ts index 05c02cd26b9..37db4dd80f0 100644 --- a/src/typings/node.d.ts +++ b/src/typings/node.d.ts @@ -2718,9 +2718,9 @@ declare module "fs" { export function writeFile(filename: string | number, data: any, encoding: string, callback: (err: NodeJS.ErrnoException) => void): void; export function writeFile(filename: string | number, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; export function writeFile(filename: string | number, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFileSync(filename: string, data: any, encoding: string): void; - export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; - export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void; + export function writeFileSync(filename: string | number, data: any, encoding: string): void; + export function writeFileSync(filename: string | number, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; + export function writeFileSync(filename: string | number, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void; export function appendFile(filename: string, data: any, encoding: string, callback: (err: NodeJS.ErrnoException) => void): void; export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; diff --git a/src/typings/spdlog.d.ts b/src/typings/spdlog.d.ts new file mode 100644 index 00000000000..ef93a9cf800 --- /dev/null +++ b/src/typings/spdlog.d.ts @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +declare module 'spdlog' { + + export const version: string; + export function setAsyncMode(bufferSize: number, flushInterval: number); + + export enum LogLevel { + CRITICAL, + ERROR, + WARN, + INFO, + DEBUG, + TRACE, + OFF + } + + export class RotatingLogger { + constructor(name: string, filename: string, filesize: number, filecount: number); + + trace(message: string); + debug(message: string); + info(message: string); + warn(message: string); + error(message: string); + critical(message: string); + setLevel(level: number); + flush(): void; + drop(): void; + } +} \ No newline at end of file diff --git a/src/typings/v8-inspect-profiler.d.ts b/src/typings/v8-inspect-profiler.d.ts new file mode 100644 index 00000000000..50449c7ae10 --- /dev/null +++ b/src/typings/v8-inspect-profiler.d.ts @@ -0,0 +1,37 @@ +declare module 'v8-inspect-profiler' { + + export interface ProfileResult { + profile: Profile; + } + + export interface Profile { + nodes: ProfileNode[]; + samples?: number[]; + timeDeltas?: number[]; + startTime: number; + endTime: number; + } + + export interface ProfileNode { + id: number; + hitCount?: number; + children?: number[]; + callFrame: { + url: string; + scriptId: string; + functionName: string; + lineNumber: number; + columnNumber: number; + }; + deoptReason?: string; + positionTicks?: { line: number; ticks: number }[]; + } + + export interface ProfilingSession { + stop(afterDelay?: number): PromiseLike; + } + + export function startProfiling(options: { port: number, tries?: number, retyWait?: number }): PromiseLike; + export function writeProfile(profile: ProfileResult, name?: string): PromiseLike; + export function rewriteAbsolutePaths(profile, replaceWith?); +} diff --git a/src/vs/base/browser/builder.ts b/src/vs/base/browser/builder.ts index 48003c5f48c..1fa18942cf1 100644 --- a/src/vs/base/browser/builder.ts +++ b/src/vs/base/browser/builder.ts @@ -70,30 +70,6 @@ let DATA_BINDING_ID = '__$binding'; let LISTENER_BINDING_ID = '__$listeners'; let VISIBILITY_BINDING_ID = '__$visibility'; -export class Position { - public x: number; - public y: number; - - constructor(x: number, y: number) { - this.x = x; - this.y = y; - } -} - -export class Box { - public top: number; - public right: number; - public bottom: number; - public left: number; - - constructor(top: number, right: number, bottom: number, left: number) { - this.top = top; - this.right = right; - this.bottom = bottom; - this.left = left; - } -} - export class Dimension { public width: number; public height: number; @@ -102,15 +78,6 @@ export class Dimension { this.width = width; this.height = height; } - - public substract(box: Box): Dimension { - return new Dimension(this.width - box.left - box.right, this.height - box.top - box.bottom); - } -} - -export interface IRange { - start: number; - end: number; } function data(element: any): any { @@ -336,18 +303,6 @@ export class Builder implements IDisposable { return this.doElement('ul', attributes, fn); } - /** - * Creates a new element of this kind as child of the current element or parent. - * Accepts an object literal as first parameter that can be used to describe the - * attributes of the element. - * Accepts a function as second parameter that can be used to create child elements - * of the element. The function will be called with a new builder created with the - * provided element. - */ - public ol(attributes?: any, fn?: (builder: Builder) => void): Builder { - return this.doElement('ol', attributes, fn); - } - /** * Creates a new element of this kind as child of the current element or parent. * Accepts an object literal as first parameter that can be used to describe the @@ -396,42 +351,6 @@ export class Builder implements IDisposable { return this.doElement('a', attributes, fn); } - /** - * Creates a new element of this kind as child of the current element or parent. - * Accepts an object literal as first parameter that can be used to describe the - * attributes of the element. - * Accepts a function as second parameter that can be used to create child elements - * of the element. The function will be called with a new builder created with the - * provided element. - */ - public header(attributes?: any, fn?: (builder: Builder) => void): Builder { - return this.doElement('header', attributes, fn); - } - - /** - * Creates a new element of this kind as child of the current element or parent. - * Accepts an object literal as first parameter that can be used to describe the - * attributes of the element. - * Accepts a function as second parameter that can be used to create child elements - * of the element. The function will be called with a new builder created with the - * provided element. - */ - public section(attributes?: any, fn?: (builder: Builder) => void): Builder { - return this.doElement('section', attributes, fn); - } - - /** - * Creates a new element of this kind as child of the current element or parent. - * Accepts an object literal as first parameter that can be used to describe the - * attributes of the element. - * Accepts a function as second parameter that can be used to create child elements - * of the element. The function will be called with a new builder created with the - * provided element. - */ - public footer(attributes?: any, fn?: (builder: Builder) => void): Builder { - return this.doElement('footer', attributes, fn); - } - /** * Creates a new element of given tag name as child of the current element or parent. * Accepts an object literal as first parameter that can be used to describe the @@ -488,30 +407,6 @@ export class Builder implements IDisposable { return this; } - /** - * Returns true if the current element of this builder is the active element. - */ - public hasFocus(): boolean { - let activeElement: Element = document.activeElement; - - return (activeElement === this.currentElement); - } - - /** - * Calls select() on the current HTML element; - */ - public domSelect(range: IRange = null): Builder { - let input = this.currentElement; - - input.select(); - - if (range) { - input.setSelectionRange(range.start, range.end); - } - - return this; - } - /** * Calls blur() on the current HTML element; */ @@ -521,15 +416,6 @@ export class Builder implements IDisposable { return this; } - /** - * Calls click() on the current HTML element; - */ - public domClick(): Builder { - this.currentElement.click(); - - return this; - } - /** * Registers listener on event types on the current element. */ @@ -645,30 +531,6 @@ export class Builder implements IDisposable { return this; } - /** - * Registers listener on event types on the current element and causes - * the event to prevent default execution (e.preventDefault()). If the - * parameter "cancelBubble" is set to true, it will also prevent bubbling - * of the event. - */ - public preventDefault(type: string, cancelBubble: boolean, listenerToUnbindContainer?: IDisposable[], useCapture?: boolean): Builder; - public preventDefault(typesArray: string[], cancelBubble: boolean, listenerToUnbindContainer?: IDisposable[], useCapture?: boolean): Builder; - public preventDefault(arg1: any, cancelBubble: boolean, listenerToUnbindContainer?: IDisposable[], useCapture?: boolean): Builder { - let fn = function (e: Event) { - e.preventDefault(); - - if (cancelBubble) { - if (e.stopPropagation) { - e.stopPropagation(); - } else { - e.cancelBubble = true; - } - } - }; - - return this.on(arg1, fn, listenerToUnbindContainer, useCapture); - } - /** * This method has different characteristics based on the parameter provided: * a) a single string passed in as argument will return the attribute value using the @@ -745,24 +607,6 @@ export class Builder implements IDisposable { return this; } - /** - * Sets the src attribute to the value provided for the current HTML element of the builder. - */ - public src(src: string): Builder { - this.currentElement.setAttribute('src', src); - - return this; - } - - /** - * Sets the href attribute to the value provided for the current HTML element of the builder. - */ - public href(href: string): Builder { - this.currentElement.setAttribute('href', href); - - return this; - } - /** * Sets the title attribute to the value provided for the current HTML element of the builder. */ @@ -772,15 +616,6 @@ export class Builder implements IDisposable { return this; } - /** - * Sets the name attribute to the value provided for the current HTML element of the builder. - */ - public name(name: string): Builder { - this.currentElement.setAttribute('name', name); - - return this; - } - /** * Sets the type attribute to the value provided for the current HTML element of the builder. */ @@ -799,24 +634,6 @@ export class Builder implements IDisposable { return this; } - /** - * Sets the alt attribute to the value provided for the current HTML element of the builder. - */ - public alt(alt: string): Builder { - this.currentElement.setAttribute('alt', alt); - - return this; - } - - /** - * Sets the name draggable to the value provided for the current HTML element of the builder. - */ - public draggable(isDraggable: boolean): Builder { - this.currentElement.setAttribute('draggable', isDraggable ? 'true' : 'false'); - - return this; - } - /** * Sets the tabindex attribute to the value provided for the current HTML element of the builder. */ @@ -960,22 +777,6 @@ export class Builder implements IDisposable { return this; } - /** - * Sets the first class to the current HTML element of the builder if the second class is currently set - * and vice versa otherwise. - */ - public swapClass(classA: string, classB: string): Builder { - if (this.hasClass(classA)) { - this.removeClass(classA); - this.addClass(classB); - } else { - this.removeClass(classB); - this.addClass(classA); - } - - return this; - } - /** * Adds or removes the provided className for the current HTML element of the builder. */ @@ -998,15 +799,6 @@ export class Builder implements IDisposable { return this; } - /** - * Sets the CSS property background. - */ - public background(color: string): Builder { - this.currentElement.style.backgroundColor = color; - - return this; - } - /** * Sets the CSS property padding. */ @@ -1169,71 +961,6 @@ export class Builder implements IDisposable { return this; } - /** - * Sets the CSS property float. - */ - public float(float: string): Builder { - this.currentElement.style.cssFloat = float; - - return this; - } - - /** - * Sets the CSS property clear. - */ - public clear(clear: string): Builder { - this.currentElement.style.clear = clear; - - return this; - } - - /** - * Sets the CSS property for fonts back to default. - */ - public normal(): Builder { - this.currentElement.style.fontStyle = 'normal'; - this.currentElement.style.fontWeight = 'normal'; - this.currentElement.style.textDecoration = 'none'; - - return this; - } - - /** - * Sets the CSS property font-style to italic. - */ - public italic(): Builder { - this.currentElement.style.fontStyle = 'italic'; - - return this; - } - - /** - * Sets the CSS property font-weight to bold. - */ - public bold(): Builder { - this.currentElement.style.fontWeight = 'bold'; - - return this; - } - - /** - * Sets the CSS property text-decoration to underline. - */ - public underline(): Builder { - this.currentElement.style.textDecoration = 'underline'; - - return this; - } - - /** - * Sets the CSS property overflow. - */ - public overflow(overflow: string): Builder { - this.currentElement.style.overflow = overflow; - - return this; - } - /** * Sets the CSS property display. */ @@ -1243,18 +970,6 @@ export class Builder implements IDisposable { return this; } - public disable(): Builder { - this.currentElement.setAttribute('disabled', 'disabled'); - - return this; - } - - public enable(): Builder { - this.currentElement.removeAttribute('disabled'); - - return this; - } - /** * Shows the current element of the builder. */ @@ -1439,24 +1154,6 @@ export class Builder implements IDisposable { return this; } - /** - * Sets the CSS property text-align. - */ - public textAlign(textAlign: string): Builder { - this.currentElement.style.textAlign = textAlign; - - return this; - } - - /** - * Sets the CSS property vertical-align. - */ - public verticalAlign(valign: string): Builder { - this.currentElement.style.verticalAlign = valign; - - return this; - } - private toPixel(obj: any): string { if (obj.toString().indexOf('px') === -1) { return obj.toString() + 'px'; @@ -1507,32 +1204,6 @@ export class Builder implements IDisposable { return this.innerHtml(strings.escape(html), append); } - /** - * Adds the provided object as property to the current element. Call getBinding() - * to retrieve it again. - */ - public bind(object: any): Builder { - bindElement(this.currentElement, object); - - return this; - } - - /** - * Removes the binding of the current element. - */ - public unbind(): Builder { - unbindElement(this.currentElement); - - return this; - } - - /** - * Returns the object that was passed into the bind() call. - */ - public getBinding(): any { - return getBindingFromElement(this.currentElement); - } - /** * Allows to store arbritary data into the current element. */ @@ -1560,29 +1231,6 @@ export class Builder implements IDisposable { return this; } - /** - * Returns a new builder with the parent element of the current element of the builder. - */ - public parent(offdom?: boolean): Builder { - assert.ok(!this.offdom, 'Builder was created with offdom = true and thus has no parent set'); - - return withElement(this.currentElement.parentNode, offdom); - } - - /** - * Returns a new builder with all child elements of the current element of the builder. - */ - public children(offdom?: boolean): MultiBuilder { - let children = this.currentElement.children; - - let builders: Builder[] = []; - for (let i = 0; i < children.length; i++) { - builders.push(withElement(children.item(i), offdom)); - } - - return new MultiBuilder(builders); - } - /** * Returns a new builder with the child at the given index. */ @@ -1592,55 +1240,6 @@ export class Builder implements IDisposable { return withElement(children.item(index)); } - /** - * Removes the current HTMLElement from the given builder from this builder if this builders - * current HTMLElement is the direct parent. - */ - public removeChild(builder: Builder): Builder { - if (this.currentElement === builder.parent().getHTMLElement()) { - this.currentElement.removeChild(builder.getHTMLElement()); - } - - return this; - } - - /** - * Returns a new builder with all elements matching the provided selector scoped to the - * current element of the builder. Use Build.withElementsBySelector() to run the selector - * over the entire DOM. - * The returned builder is an instance of array that can have 0 elements if the selector does not match any - * elements. - */ - public select(selector: string, offdom?: boolean): MultiBuilder { - assert.ok(types.isString(selector), 'Expected String as parameter'); - - let elements = this.currentElement.querySelectorAll(selector); - - let builders: Builder[] = []; - for (let i = 0; i < elements.length; i++) { - builders.push(withElement(elements.item(i), offdom)); - } - - return new MultiBuilder(builders); - } - - /** - * Returns true if the current element of the builder matches the given selector and false otherwise. - */ - public matches(selector: string): boolean { - let element = this.currentElement; - let matches = (element).webkitMatchesSelector || (element).mozMatchesSelector || (element).msMatchesSelector || (element).oMatchesSelector; - - return matches && matches.call(element, selector); - } - - /** - * Returns true if the current element of the builder has no children. - */ - public isEmpty(): boolean { - return !this.currentElement.childNodes || this.currentElement.childNodes.length === 0; - } - /** * Recurse through all descendant nodes and remove their data binding. */ @@ -1691,6 +1290,7 @@ export class Builder implements IDisposable { * Removes all HTML elements from the current element of the builder. */ public clearChildren(): Builder { + // Remove Elements if (this.currentElement) { DOM.clearNode(this.currentElement); @@ -1772,16 +1372,6 @@ export class Builder implements IDisposable { return new Dimension(totalWidth, totalHeight); } - /** - * Gets the size (in pixels) of the inside of the element, excluding the border and padding. - */ - public getContentSize(): Dimension { - let contentWidth = DOM.getContentWidth(this.currentElement); - let contentHeight = DOM.getContentHeight(this.currentElement); - - return new Dimension(contentWidth, contentHeight); - } - /** * Another variant of getting the inner dimensions of an element. */ @@ -1910,74 +1500,9 @@ export class MultiBuilder extends Builder { this.length = this.builders.length; } - public pop(): Builder { - let element = this.builders.pop(); - this.length = this.builders.length; - - return element; - } - - public concat(items: Builder[]): Builder[] { - let elements = this.builders.concat(items); - this.length = this.builders.length; - - return elements; - } - - public shift(): Builder { - let element = this.builders.shift(); - this.length = this.builders.length; - - return element; - } - - public unshift(item: Builder): number { - let res = this.builders.unshift(item); - this.length = this.builders.length; - - return res; - } - - public slice(start: number, end?: number): Builder[] { - let elements = this.builders.slice(start, end); - this.length = this.builders.length; - - return elements; - } - - public splice(start: number, deleteCount?: number): Builder[] { - let elements = this.builders.splice(start, deleteCount); - this.length = this.builders.length; - - return elements; - } - public clone(): MultiBuilder { return new MultiBuilder(this); } - - public and(element: HTMLElement): MultiBuilder; - public and(builder: Builder): MultiBuilder; - public and(obj: any): MultiBuilder { - - // Convert HTMLElement to Builder as necessary - if (!(obj instanceof Builder) && !(obj instanceof MultiBuilder)) { - obj = new Builder((obj)); - } - - let builders: Builder[] = []; - if (obj instanceof MultiBuilder) { - for (let i = 0; i < (obj).length; i++) { - builders.push((obj).item(i)); - } - } else { - builders.push(obj); - } - - this.push.apply(this, builders); - - return this; - } } function withBuilder(builder: Builder, offdom?: boolean): Builder { @@ -1988,7 +1513,7 @@ function withBuilder(builder: Builder, offdom?: boolean): Builder { return new Builder(builder.getHTMLElement(), offdom); } -function withElement(element: HTMLElement, offdom?: boolean): Builder { +export function withElement(element: HTMLElement, offdom?: boolean): Builder { return new Builder(element, offdom); } @@ -2019,15 +1544,6 @@ export function getPropertyFromElement(element: HTMLElement, key: string, fallba return fallback; } -/** - * Removes a property from an element. - */ -export function removePropertyFromElement(element: HTMLElement, key: string): void { - if (hasData(element)) { - delete data(element)[key]; - } -} - /** * Adds the provided object as property to the given element. Call getBinding() * to retrieve it again. @@ -2036,29 +1552,6 @@ export function bindElement(element: HTMLElement, object: any): void { setPropertyOnElement(element, DATA_BINDING_ID, object); } -/** - * Removes the binding of the given element. - */ -export function unbindElement(element: HTMLElement): void { - removePropertyFromElement(element, DATA_BINDING_ID); -} - -/** - * Returns the object that was passed into the bind() call for the element. - */ -export function getBindingFromElement(element: HTMLElement): any { - return getPropertyFromElement(element, DATA_BINDING_ID); -} - -export const Binding = { - setPropertyOnElement: setPropertyOnElement, - getPropertyFromElement: getPropertyFromElement, - removePropertyFromElement: removePropertyFromElement, - bindElement: bindElement, - unbindElement: unbindElement, - getBindingFromElement: getBindingFromElement -}; - let SELECTOR_REGEX = /([\w\-]+)?(#([\w\-]+))?((.([\w\-]+))*)/; export const $: QuickBuilder = function (arg?: any): Builder { @@ -2151,10 +1644,6 @@ export const $: QuickBuilder = function (arg?: any): Builder { } }; -($).Box = Box; ($).Dimension = Dimension; -($).Position = Position; ($).Builder = Builder; -($).MultiBuilder = MultiBuilder; ($).Build = Build; -($).Binding = Binding; \ No newline at end of file diff --git a/src/vs/base/browser/dnd.ts b/src/vs/base/browser/dnd.ts index 7ca472fe69e..b95e397071f 100644 --- a/src/vs/base/browser/dnd.ts +++ b/src/vs/base/browser/dnd.ts @@ -39,4 +39,23 @@ export class DelayedDragHandler { public dispose(): void { this.clearDragTimeout(); } -} \ No newline at end of file +} + +// Common data transfers +export const DataTransfers = { + + /** + * Application specific resource transfer type. + */ + URL: 'URL', + + /** + * Browser specific transfer type to download. + */ + DOWNLOAD_URL: 'DownloadURL', + + /** + * Typicaly transfer type for copy/paste transfers. + */ + TEXT: 'text/plain' +}; \ No newline at end of file diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index d3a0f38d8c8..8bb4ed5e331 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -477,22 +477,13 @@ const sizeUtils = { getBorderTopWidth: function (element: HTMLElement): number { return getDimension(element, 'border-top-width', 'borderTopWidth'); }, - getBorderRightWidth: function (element: HTMLElement): number { - return getDimension(element, 'border-right-width', 'borderRightWidth'); - }, getBorderBottomWidth: function (element: HTMLElement): number { return getDimension(element, 'border-bottom-width', 'borderBottomWidth'); }, - getPaddingLeft: function (element: HTMLElement): number { - return getDimension(element, 'padding-left', 'paddingLeft'); - }, getPaddingTop: function (element: HTMLElement): number { return getDimension(element, 'padding-top', 'paddingTop'); }, - getPaddingRight: function (element: HTMLElement): number { - return getDimension(element, 'padding-right', 'paddingRight'); - }, getPaddingBottom: function (element: HTMLElement): number { return getDimension(element, 'padding-bottom', 'paddingBottom'); }, @@ -588,14 +579,6 @@ export const StandardWindow: IStandardWindow = new class { } }; -// Adapted from WinJS -// Gets the width of the content of the specified element. The content width does not include borders or padding. -export function getContentWidth(element: HTMLElement): number { - let border = sizeUtils.getBorderLeftWidth(element) + sizeUtils.getBorderRightWidth(element); - let padding = sizeUtils.getPaddingLeft(element) + sizeUtils.getPaddingRight(element); - return element.offsetWidth - border - padding; -} - // Adapted from WinJS // Gets the width of the element, including margins. export function getTotalWidth(element: HTMLElement): number { diff --git a/src/vs/base/browser/htmlContentRenderer.ts b/src/vs/base/browser/htmlContentRenderer.ts index 1a0097aadf8..d9cc2348e9c 100644 --- a/src/vs/base/browser/htmlContentRenderer.ts +++ b/src/vs/base/browser/htmlContentRenderer.ts @@ -8,16 +8,16 @@ import * as DOM from 'vs/base/browser/dom'; import { defaultGenerator } from 'vs/base/common/idGenerator'; import { escape } from 'vs/base/common/strings'; -import { TPromise } from 'vs/base/common/winjs.base'; import { removeMarkdownEscapes, IMarkdownString } from 'vs/base/common/htmlContent'; import { marked } from 'vs/base/common/marked/marked'; import { IMouseEvent } from 'vs/base/browser/mouseEvent'; +import { isThenable } from 'vs/base/common/async'; export interface RenderOptions { className?: string; inline?: boolean; actionCallback?: (content: string, event?: IMouseEvent) => void; - codeBlockRenderer?: (modeId: string, value: string) => string | TPromise; + codeBlockRenderer?: (modeId: string, value: string) => string | Thenable; } function createElement(options: RenderOptions): HTMLElement { @@ -53,7 +53,7 @@ export function renderMarkdown(markdown: IMarkdownString, options: RenderOptions // signal to code-block render that the // element has been created let signalInnerHTML: Function; - const withInnerHTML = new TPromise(c => signalInnerHTML = c); + const withInnerHTML = new Promise(c => signalInnerHTML = c); const renderer = new marked.Renderer(); renderer.image = (href: string, title: string, text: string) => { @@ -122,17 +122,17 @@ export function renderMarkdown(markdown: IMarkdownString, options: RenderOptions return value; } - if (TPromise.is(value)) { + if (isThenable(value)) { // when code-block rendering is async we return sync // but update the node with the real result later. const id = defaultGenerator.nextId(); - TPromise.join([value, withInnerHTML]).done(values => { + Promise.all([value, withInnerHTML]).then(values => { const strValue = values[0] as string; const span = element.querySelector(`div[data-code="${id}"]`); if (span) { span.innerHTML = strValue; } - }, err => { + }).catch(err => { // ignore }); return `
${escape(code)}
`; diff --git a/src/vs/base/browser/touch.ts b/src/vs/base/browser/touch.ts index 27b3fb546bf..57c603edcbb 100644 --- a/src/vs/base/browser/touch.ts +++ b/src/vs/base/browser/touch.ts @@ -7,6 +7,7 @@ import arrays = require('vs/base/common/arrays'); import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import DomUtils = require('vs/base/browser/dom'); +import { memoize } from 'vs/base/common/decorators'; export namespace EventType { export const Tap = '-monaco-gesturetap'; @@ -35,8 +36,6 @@ export interface GestureEvent extends MouseEvent { pageY: number; } -export const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0; - interface Touch { identifier: number; screenX: number; @@ -67,55 +66,53 @@ interface TouchEvent extends Event { export class Gesture implements IDisposable { - private static readonly HOLD_DELAY = 700; private static readonly SCROLL_FRICTION = -0.005; + private static INSTANCE: Gesture; + private static HOLD_DELAY = 700; - private targetElement: HTMLElement; - private callOnTarget: IDisposable[]; + private dispatched: boolean; + private targets: HTMLElement[]; + private toDispose: IDisposable[]; private handle: IDisposable; private activeTouches: { [id: number]: TouchData; }; - constructor(target: HTMLElement) { - this.callOnTarget = []; + private constructor() { + this.toDispose = []; this.activeTouches = {}; - this.target = target; this.handle = null; + this.targets = []; + this.toDispose.push(DomUtils.addDisposableListener(document, 'touchstart', (e) => this.onTouchStart(e))); + this.toDispose.push(DomUtils.addDisposableListener(document, 'touchend', (e) => this.onTouchEnd(e))); + this.toDispose.push(DomUtils.addDisposableListener(document, 'touchmove', (e) => this.onTouchMove(e))); + } + + public static addTarget(element: HTMLElement): void { + if (!Gesture.isTouchDevice()) { + return; + } + if (!Gesture.INSTANCE) { + Gesture.INSTANCE = new Gesture(); + } + + Gesture.INSTANCE.targets.push(element); + } + + @memoize + private static isTouchDevice(): boolean { + return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0; } public dispose(): void { - this.target = null; if (this.handle) { this.handle.dispose(); + dispose(this.toDispose); this.handle = null; } } - public set target(element: HTMLElement) { - this.callOnTarget = dispose(this.callOnTarget); - - this.activeTouches = {}; - - this.targetElement = element; - - if (!this.targetElement) { - return; - } - - this.callOnTarget.push(DomUtils.addDisposableListener(this.targetElement, 'touchstart', (e) => this.onTouchStart(e))); - this.callOnTarget.push(DomUtils.addDisposableListener(this.targetElement, 'touchend', (e) => this.onTouchEnd(e))); - this.callOnTarget.push(DomUtils.addDisposableListener(this.targetElement, 'touchmove', (e) => this.onTouchMove(e))); - } - - private static newGestureEvent(type: string): GestureEvent { - let event = (document.createEvent('CustomEvent')); - event.initEvent(type, false, true); - return event; - } - private onTouchStart(e: TouchEvent): void { let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based. - e.preventDefault(); if (this.handle) { this.handle.dispose(); @@ -136,17 +133,21 @@ export class Gesture implements IDisposable { rollingPageY: [touch.pageY] }; - let evt = Gesture.newGestureEvent(EventType.Start); + let evt = this.newGestureEvent(EventType.Start, touch.target); evt.pageX = touch.pageX; evt.pageY = touch.pageY; - this.targetElement.dispatchEvent(evt); + this.dispatchEvent(evt); + } + + if (this.dispatched) { + e.preventDefault(); + e.stopPropagation(); + this.dispatched = false; } } private onTouchEnd(e: TouchEvent): void { let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based. - e.preventDefault(); - e.stopPropagation(); let activeTouchCount = Object.keys(this.activeTouches).length; @@ -166,21 +167,19 @@ export class Gesture implements IDisposable { && Math.abs(data.initialPageX - arrays.tail(data.rollingPageX)) < 30 && Math.abs(data.initialPageY - arrays.tail(data.rollingPageY)) < 30) { - let evt = Gesture.newGestureEvent(EventType.Tap); - evt.initialTarget = data.initialTarget; + let evt = this.newGestureEvent(EventType.Tap, data.initialTarget); evt.pageX = arrays.tail(data.rollingPageX); evt.pageY = arrays.tail(data.rollingPageY); - this.targetElement.dispatchEvent(evt); + this.dispatchEvent(evt); } else if (holdTime >= Gesture.HOLD_DELAY && Math.abs(data.initialPageX - arrays.tail(data.rollingPageX)) < 30 && Math.abs(data.initialPageY - arrays.tail(data.rollingPageY)) < 30) { - let evt = Gesture.newGestureEvent(EventType.Contextmenu); - evt.initialTarget = data.initialTarget; + let evt = this.newGestureEvent(EventType.Contextmenu, data.initialTarget); evt.pageX = arrays.tail(data.rollingPageX); evt.pageY = arrays.tail(data.rollingPageY); - this.targetElement.dispatchEvent(evt); + this.dispatchEvent(evt); } else if (activeTouchCount === 1) { let finalX = arrays.tail(data.rollingPageX); @@ -190,7 +189,9 @@ export class Gesture implements IDisposable { let deltaX = finalX - data.rollingPageX[0]; let deltaY = finalY - data.rollingPageY[0]; - this.inertia(timestamp, // time now + // We need to get all the dispatch targets on the start of the inertia event + const dispatchTo = this.targets.filter(t => data.initialTarget instanceof Node && t.contains(data.initialTarget)); + this.inertia(dispatchTo, timestamp, // time now Math.abs(deltaX) / deltaT, // speed deltaX > 0 ? 1 : -1, // x direction finalX, // x now @@ -200,12 +201,36 @@ export class Gesture implements IDisposable { ); } + + this.dispatchEvent(this.newGestureEvent(EventType.End, data.initialTarget)); // forget about this touch delete this.activeTouches[touch.identifier]; } + + if (this.dispatched) { + e.preventDefault(); + e.stopPropagation(); + this.dispatched = false; + } } - private inertia(t1: number, vX: number, dirX: number, x: number, vY: number, dirY: number, y: number): void { + private newGestureEvent(type: string, intialTarget?: EventTarget): GestureEvent { + let event = (document.createEvent('CustomEvent')); + event.initEvent(type, false, true); + event.initialTarget = intialTarget; + return event; + } + + private dispatchEvent(event: GestureEvent): void { + this.targets.forEach(target => { + if (event.initialTarget instanceof Node && target.contains(event.initialTarget)) { + target.dispatchEvent(event); + this.dispatched = true; + } + }); + } + + private inertia(dispatchTo: EventTarget[], t1: number, vX: number, dirX: number, x: number, vY: number, dirY: number, y: number): void { this.handle = DomUtils.scheduleAtNextAnimationFrame(() => { let now = Date.now(); @@ -228,21 +253,19 @@ export class Gesture implements IDisposable { } // dispatch translation event - let evt = Gesture.newGestureEvent(EventType.Change); + let evt = this.newGestureEvent(EventType.Change); evt.translationX = delta_pos_x; evt.translationY = delta_pos_y; - this.targetElement.dispatchEvent(evt); + dispatchTo.forEach(d => d.dispatchEvent(evt)); if (!stopped) { - this.inertia(now, vX, dirX, x + delta_pos_x, vY, dirY, y + delta_pos_y); + this.inertia(dispatchTo, now, vX, dirX, x + delta_pos_x, vY, dirY, y + delta_pos_y); } }); } private onTouchMove(e: TouchEvent): void { let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based. - e.preventDefault(); - e.stopPropagation(); for (let i = 0, len = e.changedTouches.length; i < len; i++) { @@ -255,12 +278,12 @@ export class Gesture implements IDisposable { let data = this.activeTouches[touch.identifier]; - let evt = Gesture.newGestureEvent(EventType.Change); + let evt = this.newGestureEvent(EventType.Change, data.initialTarget); evt.translationX = touch.pageX - arrays.tail(data.rollingPageX); evt.translationY = touch.pageY - arrays.tail(data.rollingPageY); evt.pageX = touch.pageX; evt.pageY = touch.pageY; - this.targetElement.dispatchEvent(evt); + this.dispatchEvent(evt); // only keep a few data points, to average the final speed if (data.rollingPageX.length > 3) { @@ -273,5 +296,11 @@ export class Gesture implements IDisposable { data.rollingPageY.push(touch.pageY); data.rollingTimestamps.push(timestamp); } + + if (this.dispatched) { + e.preventDefault(); + e.stopPropagation(); + this.dispatched = false; + } } } diff --git a/src/vs/base/browser/ui/actionbar/actionbar.ts b/src/vs/base/browser/ui/actionbar/actionbar.ts index 42b707b51c0..41eb283271e 100644 --- a/src/vs/base/browser/ui/actionbar/actionbar.ts +++ b/src/vs/base/browser/ui/actionbar/actionbar.ts @@ -14,7 +14,7 @@ import { SelectBox } from 'vs/base/browser/ui/selectBox/selectBox'; import { IAction, IActionRunner, Action, IActionChangeEvent, ActionRunner, IRunEvent } from 'vs/base/common/actions'; import DOM = require('vs/base/browser/dom'); import types = require('vs/base/common/types'); -import { Gesture, EventType, isTouchDevice } from 'vs/base/browser/touch'; +import { EventType, Gesture } from 'vs/base/browser/touch'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import Event, { Emitter } from 'vs/base/common/event'; @@ -41,7 +41,6 @@ export class BaseActionItem implements IActionItem { public _context: any; public _action: IAction; - private gesture: Gesture; private _actionRunner: IActionRunner; constructor(context: any, action: IAction, protected options?: IBaseActionItemOptions) { @@ -106,16 +105,14 @@ export class BaseActionItem implements IActionItem { public render(container: HTMLElement): void { this.builder = $(container); - this.gesture = new Gesture(container); + Gesture.addTarget(container); const enableDragging = this.options && this.options.draggable; if (enableDragging) { container.draggable = true; } - if (isTouchDevice) { - this.builder.on(EventType.Tap, e => this.onClick(e)); - } + this.builder.on(EventType.Tap, e => this.onClick(e)); this.builder.on(DOM.EventType.MOUSE_DOWN, (e) => { if (!enableDragging) { @@ -203,11 +200,6 @@ export class BaseActionItem implements IActionItem { this.builder = null; } - if (this.gesture) { - this.gesture.dispose(); - this.gesture = null; - } - this._callOnDispose = lifecycle.dispose(this._callOnDispose); } } diff --git a/src/vs/base/browser/ui/dropdown/dropdown.ts b/src/vs/base/browser/ui/dropdown/dropdown.ts index 8a321c10bd1..d6d67657887 100644 --- a/src/vs/base/browser/ui/dropdown/dropdown.ts +++ b/src/vs/base/browser/ui/dropdown/dropdown.ts @@ -67,7 +67,7 @@ export class BaseDropdown extends ActionRunner { this._toDispose.push(cleanupFn); } - this._toDispose.push(new Gesture(this.$label.getHTMLElement())); + Gesture.addTarget(this.$label.getHTMLElement()); } public get toDispose(): IDisposable[] { diff --git a/src/vs/base/browser/ui/inputbox/inputBox.ts b/src/vs/base/browser/ui/inputbox/inputBox.ts index 8dfb882931c..df7c0b99ba6 100644 --- a/src/vs/base/browser/ui/inputbox/inputBox.ts +++ b/src/vs/base/browser/ui/inputbox/inputBox.ts @@ -219,10 +219,6 @@ export class InputBox extends Widget { } } - public setContextViewProvider(contextViewProvider: IContextViewProvider): void { - this.contextViewProvider = contextViewProvider; - } - public get inputElement(): HTMLInputElement { return this.input; } diff --git a/src/vs/base/browser/ui/list/list.ts b/src/vs/base/browser/ui/list/list.ts index f828de62d83..05ab5d56cd8 100644 --- a/src/vs/base/browser/ui/list/list.ts +++ b/src/vs/base/browser/ui/list/list.ts @@ -3,6 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { GestureEvent } from 'vs/base/browser/touch'; + export interface IDelegate { getHeight(element: T): number; getTemplateId(element: T): string; @@ -15,19 +17,26 @@ export interface IRenderer { disposeTemplate(templateData: TTemplateData): void; } -export interface IListElementEvent { - element: T; - index: number; - event: E; -} - export interface IListEvent { elements: T[]; indexes: number[]; } -export interface IListMouseEvent extends MouseEvent { - element: T; +export interface IListMouseEvent { + browserEvent: MouseEvent; + element: T | undefined; + index: number; +} + +export interface IListTouchEvent { + browserEvent: TouchEvent; + element: T | undefined; + index: number; +} + +export interface IListGestureEvent { + browserEvent: GestureEvent; + element: T | undefined; index: number; } diff --git a/src/vs/base/browser/ui/list/listPaging.ts b/src/vs/base/browser/ui/list/listPaging.ts index c11ff0e6f8d..e1c22181d06 100644 --- a/src/vs/base/browser/ui/list/listPaging.ts +++ b/src/vs/base/browser/ui/list/listPaging.ts @@ -7,7 +7,7 @@ import 'vs/css!./list'; import { IDisposable } from 'vs/base/common/lifecycle'; import { range } from 'vs/base/common/arrays'; import { IDelegate, IRenderer, IListEvent } from './list'; -import { List, IListOptions } from './listWidget'; +import { List, IListOptions, IListStyles } from './listWidget'; import { IPagedModel } from 'vs/base/common/paging'; import Event, { mapEvent } from 'vs/base/common/event'; @@ -73,6 +73,22 @@ export class PagedList { this.list = new List(container, delegate, pagedRenderers, options); } + getHTMLElement(): HTMLElement { + return this.list.getHTMLElement(); + } + + isDOMFocused(): boolean { + return this.list.getHTMLElement() === document.activeElement; + } + + get onDidFocus(): Event { + return this.list.onDidFocus; + } + + get onDidBlur(): Event { + return this.list.onDidBlur; + } + get widget(): List { return this.list; } @@ -110,6 +126,14 @@ export class PagedList { this.list.scrollTop = scrollTop; } + open(indexes: number[]): void { + this.list.open(indexes); + } + + setFocus(indexes: number[]): void { + this.list.setFocus(indexes); + } + focusNext(n?: number, loop?: boolean): void { this.list.focusNext(n, loop); } @@ -149,4 +173,8 @@ export class PagedList { reveal(index: number, relativeTop?: number): void { this.list.reveal(index, relativeTop); } + + style(styles: IListStyles): void { + this.list.style(styles); + } } \ No newline at end of file diff --git a/src/vs/base/browser/ui/list/listView.ts b/src/vs/base/browser/ui/list/listView.ts index f7a875c47f2..3936eb41473 100644 --- a/src/vs/base/browser/ui/list/listView.ts +++ b/src/vs/base/browser/ui/list/listView.ts @@ -3,19 +3,22 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { assign, getOrDefault } from 'vs/base/common/objects'; +import { getOrDefault } from 'vs/base/common/objects'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Gesture, EventType as TouchEventType, GestureEvent } from 'vs/base/browser/touch'; import * as DOM from 'vs/base/browser/dom'; +import Event, { mapEvent, filterEvent } from 'vs/base/common/event'; import { domEvent } from 'vs/base/browser/event'; import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { ScrollEvent, ScrollbarVisibility } from 'vs/base/common/scrollable'; import { RangeMap, IRange, relativeComplement, intersect, shift } from './rangeMap'; -import { IDelegate, IRenderer } from './list'; +import { IDelegate, IRenderer, IListMouseEvent, IListTouchEvent, IListGestureEvent } from './list'; import { RowCache, IRow } from './rowCache'; import { isWindows } from 'vs/base/common/platform'; import * as browser from 'vs/base/browser/browser'; import { ISpliceable } from 'vs/base/common/sequence'; +import { memoize } from 'vs/base/common/decorators'; +import { DragMouseEvent } from 'vs/base/browser/mouseEvent'; function canUseTranslate3d(): boolean { if (browser.isFirefox) { @@ -47,18 +50,6 @@ interface IItem { row: IRow; } -const MouseEventTypes = [ - 'click', - 'dblclick', - 'mouseup', - 'mousedown', - 'mouseover', - 'mousemove', - 'mouseout', - 'contextmenu', - 'touchstart' -]; - export interface IListViewOptions { useShadows?: boolean; } @@ -80,6 +71,10 @@ export class ListView implements ISpliceable, IDisposable { private gesture: Gesture; private rowsContainer: HTMLElement; private scrollableElement: ScrollableElement; + private splicing = false; + private dragAndDropScrollInterval: number; + private dragAndDropScrollTimeout: number; + private dragAndDropMouseY: number; private disposables: IDisposable[]; constructor( @@ -106,7 +101,7 @@ export class ListView implements ISpliceable, IDisposable { this.rowsContainer = document.createElement('div'); this.rowsContainer.className = 'monaco-list-rows'; - this.gesture = new Gesture(this.rowsContainer); + Gesture.addTarget(this.rowsContainer); this.scrollableElement = new ScrollableElement(this.rowsContainer, { alwaysConsumeMouseWheel: true, @@ -123,6 +118,9 @@ export class ListView implements ISpliceable, IDisposable { this.scrollableElement.onScroll(this.onScroll, this, this.disposables); domEvent(this.rowsContainer, TouchEventType.Change)(this.onTouchChange, this, this.disposables); + const onDragOver = mapEvent(domEvent(this.rowsContainer, 'dragover'), e => new DragMouseEvent(e)); + onDragOver(this.onDragOver, this, this.disposables); + this.layout(); } @@ -131,6 +129,20 @@ export class ListView implements ISpliceable, IDisposable { } splice(start: number, deleteCount: number, elements: T[] = []): T[] { + if (this.splicing) { + throw new Error('Can\'t run recursive splices.'); + } + + this.splicing = true; + + try { + return this._splice(start, deleteCount, elements); + } finally { + this.splicing = false; + } + } + + private _splice(start: number, deleteCount: number, elements: T[] = []): T[] { const previousRenderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight); const deleteRange = { start, end: start + deleteCount }; const removeRange = intersect(previousRenderRange, deleteRange); @@ -316,31 +328,33 @@ export class ListView implements ISpliceable, IDisposable { // Events - addListener(type: string, handler: (event: any) => void, useCapture?: boolean): IDisposable { - const userHandler = handler; - let domNode = this.domNode; + @memoize get onMouseClick(): Event> { return filterEvent(mapEvent(domEvent(this.domNode, 'click'), e => this.toMouseEvent(e)), e => e.index >= 0); } + @memoize get onMouseDblClick(): Event> { return filterEvent(mapEvent(domEvent(this.domNode, 'dblclick'), e => this.toMouseEvent(e)), e => e.index >= 0); } + @memoize get onMouseUp(): Event> { return filterEvent(mapEvent(domEvent(this.domNode, 'mouseup'), e => this.toMouseEvent(e)), e => e.index >= 0); } + @memoize get onMouseDown(): Event> { return filterEvent(mapEvent(domEvent(this.domNode, 'mousedown'), e => this.toMouseEvent(e)), e => e.index >= 0); } + @memoize get onMouseOver(): Event> { return filterEvent(mapEvent(domEvent(this.domNode, 'mouseover'), e => this.toMouseEvent(e)), e => e.index >= 0); } + @memoize get onMouseMove(): Event> { return filterEvent(mapEvent(domEvent(this.domNode, 'mousemove'), e => this.toMouseEvent(e)), e => e.index >= 0); } + @memoize get onMouseOut(): Event> { return filterEvent(mapEvent(domEvent(this.domNode, 'mouseout'), e => this.toMouseEvent(e)), e => e.index >= 0); } + @memoize get onContextMenu(): Event> { return filterEvent(mapEvent(domEvent(this.domNode, 'contextmenu'), e => this.toMouseEvent(e)), e => e.index >= 0); } + @memoize get onTouchStart(): Event> { return filterEvent(mapEvent(domEvent(this.domNode, 'touchstart'), e => this.toTouchEvent(e)), e => e.index >= 0); } + @memoize get onTap(): Event> { return filterEvent(mapEvent(domEvent(this.rowsContainer, TouchEventType.Tap), e => this.toGestureEvent(e)), e => e.index >= 0); } - if (MouseEventTypes.indexOf(type) > -1) { - handler = e => this.fireScopedEvent(e, userHandler, this.getItemIndexFromMouseEvent(e)); - } else if (type === TouchEventType.Tap) { - domNode = this.rowsContainer; - handler = e => this.fireScopedEvent(e, userHandler, this.getItemIndexFromGestureEvent(e)); - } - - return DOM.addDisposableListener(domNode, type, handler, useCapture); + private toMouseEvent(browserEvent: MouseEvent): IListMouseEvent { + const index = this.getItemIndexFromEventTarget(browserEvent.target); + const element = index < 0 ? undefined : this.items[index].element; + return { browserEvent, index, element }; } - private fireScopedEvent( - event: any, - handler: (event: any) => void, - index: number - ) { - if (index < 0) { - return; - } + private toTouchEvent(browserEvent: TouchEvent): IListTouchEvent { + const index = this.getItemIndexFromEventTarget(browserEvent.target); + const element = index < 0 ? undefined : this.items[index].element; + return { browserEvent, index, element }; + } - const element = this.items[index].element; - handler(assign(event, { element, index })); + private toGestureEvent(browserEvent: GestureEvent): IListGestureEvent { + const index = this.getItemIndexFromEventTarget(browserEvent.initialTarget); + const element = index < 0 ? undefined : this.items[index].element; + return { browserEvent, index, element }; } private onScroll(e: ScrollEvent): void { @@ -354,16 +368,60 @@ export class ListView implements ISpliceable, IDisposable { this.scrollTop -= event.translationY; } + private onDragOver(event: DragMouseEvent): void { + this.setupDragAndDropScrollInterval(); + this.dragAndDropMouseY = event.posy; + } + + private setupDragAndDropScrollInterval(): void { + var viewTop = DOM.getTopLeftOffset(this._domNode).top; + + if (!this.dragAndDropScrollInterval) { + this.dragAndDropScrollInterval = window.setInterval(() => { + if (this.dragAndDropMouseY === undefined) { + return; + } + + var diff = this.dragAndDropMouseY - viewTop; + var scrollDiff = 0; + var upperLimit = this.renderHeight - 35; + + if (diff < 35) { + scrollDiff = Math.max(-14, 0.2 * (diff - 35)); + } else if (diff > upperLimit) { + scrollDiff = Math.min(14, 0.2 * (diff - upperLimit)); + } + + this.scrollTop += scrollDiff; + }, 10); + + this.cancelDragAndDropScrollTimeout(); + + this.dragAndDropScrollTimeout = window.setTimeout(() => { + this.cancelDragAndDropScrollInterval(); + this.dragAndDropScrollTimeout = null; + }, 1000); + } + } + + private cancelDragAndDropScrollInterval(): void { + if (this.dragAndDropScrollInterval) { + window.clearInterval(this.dragAndDropScrollInterval); + this.dragAndDropScrollInterval = null; + } + + this.cancelDragAndDropScrollTimeout(); + } + + private cancelDragAndDropScrollTimeout(): void { + if (this.dragAndDropScrollTimeout) { + window.clearTimeout(this.dragAndDropScrollTimeout); + this.dragAndDropScrollTimeout = null; + } + } + // Util - private getItemIndexFromMouseEvent(event: MouseEvent): number { - return this.getItemIndexFromEventTarget(event.target); - } - - private getItemIndexFromGestureEvent(event: GestureEvent): number { - return this.getItemIndexFromEventTarget(event.initialTarget); - } - private getItemIndexFromEventTarget(target: EventTarget): number { while (target instanceof HTMLElement && target !== this.rowsContainer) { const element = target as HTMLElement; diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index 0a80be240c8..d2c737a6691 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -10,12 +10,12 @@ import { range, firstIndex } from 'vs/base/common/arrays'; import { memoize } from 'vs/base/common/decorators'; import * as DOM from 'vs/base/browser/dom'; import * as platform from 'vs/base/common/platform'; -import { EventType as TouchEventType } from 'vs/base/browser/touch'; +import { Gesture } from 'vs/base/browser/touch'; import { KeyCode } from 'vs/base/common/keyCodes'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import Event, { Emitter, EventBufferer, chain, mapEvent, fromCallback, anyEvent } from 'vs/base/common/event'; +import Event, { Emitter, EventBufferer, chain, mapEvent, anyEvent } from 'vs/base/common/event'; import { domEvent } from 'vs/base/browser/event'; -import { IDelegate, IRenderer, IListEvent, IListMouseEvent, IListContextMenuEvent } from './list'; +import { IDelegate, IRenderer, IListEvent, IListContextMenuEvent, IListMouseEvent, IListTouchEvent, IListGestureEvent } from './list'; import { ListView, IListViewOptions } from './listView'; import { Color } from 'vs/base/common/color'; import { mixin } from 'vs/base/common/objects'; @@ -253,17 +253,24 @@ class TraitSpliceable implements ISpliceable { } } +function isInputElement(e: HTMLElement): boolean { + return e.tagName === 'INPUT' || e.tagName === 'TEXTAREA'; +} + class KeyboardController implements IDisposable { private disposables: IDisposable[]; constructor( private list: List, - private view: ListView + private view: ListView, + options: IListOptions ) { + const multipleSelectionSupport = !(options.multipleSelectionSupport === false); this.disposables = []; const onKeyDown = chain(domEvent(view.domNode, 'keydown')) + .filter(e => !isInputElement(e.target as HTMLElement)) .map(e => new StandardKeyboardEvent(e)); onKeyDown.filter(e => e.keyCode === KeyCode.Enter).on(this.onEnter, this, this.disposables); @@ -271,8 +278,11 @@ class KeyboardController implements IDisposable { onKeyDown.filter(e => e.keyCode === KeyCode.DownArrow).on(this.onDownArrow, this, this.disposables); onKeyDown.filter(e => e.keyCode === KeyCode.PageUp).on(this.onPageUpArrow, this, this.disposables); onKeyDown.filter(e => e.keyCode === KeyCode.PageDown).on(this.onPageDownArrow, this, this.disposables); - onKeyDown.filter(e => (platform.isMacintosh ? e.metaKey : e.ctrlKey) && e.keyCode === KeyCode.KEY_A).on(this.onCtrlA, this, this.disposables); onKeyDown.filter(e => e.keyCode === KeyCode.Escape).on(this.onEscape, this, this.disposables); + + if (multipleSelectionSupport) { + onKeyDown.filter(e => (platform.isMacintosh ? e.metaKey : e.ctrlKey) && e.keyCode === KeyCode.KEY_A).on(this.onCtrlA, this, this.disposables); + } } private onEnter(e: StandardKeyboardEvent): void { @@ -333,33 +343,39 @@ class KeyboardController implements IDisposable { } } -function isSelectionSingleChangeEvent(event: IListMouseEvent): boolean { - return platform.isMacintosh ? event.metaKey : event.ctrlKey; +function isSelectionSingleChangeEvent(event: IListMouseEvent | IListTouchEvent): boolean { + return platform.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey; } -function isSelectionRangeChangeEvent(event: IListMouseEvent): boolean { - return event.shiftKey; +function isSelectionRangeChangeEvent(event: IListMouseEvent | IListTouchEvent): boolean { + return event.browserEvent.shiftKey; } -function isSelectionChangeEvent(event: IListMouseEvent): boolean { +function isSelectionChangeEvent(event: IListMouseEvent | IListTouchEvent): boolean { return isSelectionSingleChangeEvent(event) || isSelectionRangeChangeEvent(event); } -export interface IMouseControllerOptions { - selectOnMouseDown?: boolean; - focusOnMouseDown?: boolean; -} - class MouseController implements IDisposable { - private disposables: IDisposable[]; + private multipleSelectionSupport: boolean; + private didJustPressContextMenuKey: boolean = false; + private disposables: IDisposable[] = []; @memoize get onContextMenu(): Event> { - const fromKeyboard = chain(domEvent(this.view.domNode, 'keydown')) + const fromKeydown = chain(domEvent(this.view.domNode, 'keydown')) .map(e => new StandardKeyboardEvent(e)) - .filter(e => this.list.getFocus().length > 0) - .filter(e => e.keyCode === KeyCode.ContextMenu || (e.shiftKey && e.keyCode === KeyCode.F10)) - .map(e => { + .filter(e => this.didJustPressContextMenuKey = e.keyCode === KeyCode.ContextMenu || (e.shiftKey && e.keyCode === KeyCode.F10)) + .filter(e => { e.preventDefault(); e.stopPropagation(); return false; }) + .event as Event; + + const fromKeyup = chain(domEvent(this.view.domNode, 'keyup')) + .filter(() => { + const didJustPressContextMenuKey = this.didJustPressContextMenuKey; + this.didJustPressContextMenuKey = false; + return didJustPressContextMenuKey; + }) + .filter(() => this.list.getFocus().length > 0) + .map(() => { const index = this.list.getFocus()[0]; const element = this.view.element(index); const anchor = this.view.domElement(index); @@ -368,45 +384,48 @@ class MouseController implements IDisposable { .filter(({ anchor }) => !!anchor) .event; - const fromMouse = chain(fromCallback(handler => this.view.addListener('contextmenu', handler))) - .map(({ element, index, clientX, clientY }) => ({ element, index, anchor: { x: clientX + 1, y: clientY } })) + const fromMouse = chain(this.view.onContextMenu) + .filter(() => !this.didJustPressContextMenuKey) + .map(({ element, index, browserEvent }) => ({ element, index, anchor: { x: browserEvent.clientX + 1, y: browserEvent.clientY } })) .event; - return anyEvent>(fromKeyboard, fromMouse); + return anyEvent>(fromKeydown, fromKeyup, fromMouse); } constructor( private list: List, private view: ListView, - private options: IMouseControllerOptions = {} + private options: IListOptions = {} ) { - this.disposables = []; - this.disposables.push(view.addListener('mousedown', e => this.onMouseDown(e))); - this.disposables.push(view.addListener('click', e => this.onPointer(e))); - this.disposables.push(view.addListener('dblclick', e => this.onDoubleClick(e))); - this.disposables.push(view.addListener('touchstart', e => this.onMouseDown(e))); - this.disposables.push(view.addListener(TouchEventType.Tap, e => this.onPointer(e))); + this.multipleSelectionSupport = options.multipleSelectionSupport !== false; + + view.onMouseDown(this.onMouseDown, this, this.disposables); + view.onMouseClick(this.onPointer, this, this.disposables); + view.onMouseDblClick(this.onDoubleClick, this, this.disposables); + view.onTouchStart(this.onMouseDown, this, this.disposables); + view.onTap(this.onPointer, this, this.disposables); + Gesture.addTarget(view.domNode); } - private onMouseDown(e: IListMouseEvent): void { + private onMouseDown(e: IListMouseEvent | IListTouchEvent): void { if (this.options.focusOnMouseDown === false) { - e.preventDefault(); - e.stopPropagation(); - } else { + e.browserEvent.preventDefault(); + e.browserEvent.stopPropagation(); + } else if (document.activeElement !== e.browserEvent.target) { this.view.domNode.focus(); } let reference = this.list.getFocus()[0]; reference = reference === undefined ? this.list.getSelection()[0] : reference; - if (isSelectionRangeChangeEvent(e)) { + if (this.multipleSelectionSupport && isSelectionRangeChangeEvent(e)) { return this.changeSelection(e, reference); } const focus = e.index; this.list.setFocus([focus]); - if (isSelectionChangeEvent(e)) { + if (this.multipleSelectionSupport && isSelectionChangeEvent(e)) { return this.changeSelection(e, reference); } @@ -417,7 +436,7 @@ class MouseController implements IDisposable { } private onPointer(e: IListMouseEvent): void { - if (isSelectionChangeEvent(e)) { + if (this.multipleSelectionSupport && isSelectionChangeEvent(e)) { return; } @@ -429,7 +448,7 @@ class MouseController implements IDisposable { } private onDoubleClick(e: IListMouseEvent): void { - if (isSelectionChangeEvent(e)) { + if (this.multipleSelectionSupport && isSelectionChangeEvent(e)) { return; } @@ -438,7 +457,7 @@ class MouseController implements IDisposable { this.list.pin(focus); } - private changeSelection(e: IListMouseEvent, reference: number | undefined): void { + private changeSelection(e: IListMouseEvent | IListTouchEvent, reference: number | undefined): void { const focus = e.index; if (isSelectionRangeChangeEvent(e) && reference !== undefined) { @@ -472,11 +491,14 @@ class MouseController implements IDisposable { } } -export interface IListOptions extends IListViewOptions, IMouseControllerOptions, IListStyles { +export interface IListOptions extends IListViewOptions, IListStyles { identityProvider?: IIdentityProvider; ariaLabel?: string; mouseSupport?: boolean; + selectOnMouseDown?: boolean; + focusOnMouseDown?: boolean; keyboardSupport?: boolean; + multipleSelectionSupport?: boolean; } export interface IListStyles { @@ -511,7 +533,8 @@ const defaultStyles: IListStyles = { const DefaultOptions: IListOptions = { keyboardSupport: true, - mouseSupport: true + mouseSupport: true, + multipleSelectionSupport: true }; // TODO@Joao: move these utils into a SortedArray class @@ -634,7 +657,7 @@ export class List implements ISpliceable, IDisposable { private focus: Trait; private selection: Trait; - private eventBufferer: EventBufferer; + private eventBufferer = new EventBufferer(); private view: ListView; private spliceable: ISpliceable; private disposables: IDisposable[]; @@ -648,10 +671,7 @@ export class List implements ISpliceable, IDisposable { return mapEvent(this.eventBufferer.wrapEvent(this.selection.onChange), e => this.toListEvent(e)); } - private _onContextMenu: Event> = Event.None; - get onContextMenu(): Event> { - return this._onContextMenu; - } + readonly onContextMenu: Event> = Event.None; private _onOpen = new Emitter(); @memoize get onOpen(): Event> { @@ -663,6 +683,20 @@ export class List implements ISpliceable, IDisposable { return mapEvent(this._onPin.event, indexes => this.toListEvent({ indexes })); } + get onMouseClick(): Event> { return this.view.onMouseClick; } + get onMouseDblClick(): Event> { return this.view.onMouseDblClick; } + get onMouseUp(): Event> { return this.view.onMouseUp; } + get onMouseDown(): Event> { return this.view.onMouseDown; } + get onMouseOver(): Event> { return this.view.onMouseOver; } + get onMouseMove(): Event> { return this.view.onMouseMove; } + get onMouseOut(): Event> { return this.view.onMouseOut; } + get onTouchStart(): Event> { return this.view.onTouchStart; } + get onTap(): Event> { return this.view.onTap; } + + get onKeyDown(): Event { return domEvent(this.view.domNode, 'keydown'); } + get onKeyUp(): Event { return domEvent(this.view.domNode, 'keyup'); } + get onKeyPress(): Event { return domEvent(this.view.domNode, 'keypress'); } + readonly onDidFocus: Event; readonly onDidBlur: Event; @@ -679,7 +713,6 @@ export class List implements ISpliceable, IDisposable { this.focus = new FocusTrait(i => this.getElementDomId(i)); this.selection = new Trait('selected'); - this.eventBufferer = new EventBufferer(); mixin(options, defaultStyles, false); renderers = renderers.map(r => new PipelineRenderer(r.templateId, [aria, this.focus.renderer, this.selection.renderer, r])); @@ -704,14 +737,14 @@ export class List implements ISpliceable, IDisposable { this.onDidBlur = mapEvent(domEvent(this.view.domNode, 'blur', true), () => null); if (typeof options.keyboardSupport !== 'boolean' || options.keyboardSupport) { - const controller = new KeyboardController(this, this.view); + const controller = new KeyboardController(this, this.view, options); this.disposables.push(controller); } if (typeof options.mouseSupport !== 'boolean' || options.mouseSupport) { const controller = new MouseController(this, this.view, options); this.disposables.push(controller); - this._onContextMenu = controller.onContextMenu; + this.onContextMenu = controller.onContextMenu; } this.onFocusChange(this._onFocusChange, this, this.disposables); diff --git a/src/vs/base/browser/ui/sash/sash.ts b/src/vs/base/browser/ui/sash/sash.ts index fbeddfdd55a..98f01d9ed3c 100644 --- a/src/vs/base/browser/ui/sash/sash.ts +++ b/src/vs/base/browser/ui/sash/sash.ts @@ -12,7 +12,7 @@ import { isIPad } from 'vs/base/browser/browser'; import { isMacintosh } from 'vs/base/common/platform'; import types = require('vs/base/common/types'); import DOM = require('vs/base/browser/dom'); -import { EventType, GestureEvent } from 'vs/base/browser/touch'; +import { EventType, GestureEvent, Gesture } from 'vs/base/browser/touch'; import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import Event, { Emitter } from 'vs/base/common/event'; @@ -71,6 +71,7 @@ export class Sash { this.$e.on(DOM.EventType.MOUSE_DOWN, (e) => { this.onMouseDown(e as MouseEvent); }); this.$e.on(DOM.EventType.DBLCLICK, (e) => this._onDidReset.fire()); + Gesture.addTarget(this.$e.getHTMLElement()); this.$e.on(EventType.Start, (e) => { this.onTouchStart(e as GestureEvent); }); this.size = options.baseSize || 5; diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 3094acbc635..525365b8638 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -59,6 +59,25 @@ enum State { Busy } +function pushToEnd(arr: T[], value: T): T[] { + let didFindValue = false; + + const result = arr.filter(v => { + if (v === value) { + didFindValue = true; + return false; + } + + return true; + }); + + if (didFindValue) { + result.push(value); + } + + return result; +} + export class SplitView implements IDisposable { private orientation: Orientation; @@ -203,9 +222,9 @@ export class SplitView implements IDisposable { this.state = State.Idle; } - private relayout(): void { + private relayout(lowPriorityIndex?: number): void { const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); - this.resize(this.viewItems.length - 1, this.contentSize - contentSize); + this.resize(this.viewItems.length - 1, this.size - contentSize, undefined, lowPriorityIndex); } layout(size: number): void { @@ -249,7 +268,7 @@ export class SplitView implements IDisposable { size = typeof size === 'number' ? size : item.size; size = clamp(size, item.view.minimumSize, item.view.maximumSize); item.size = size; - this.relayout(); + this.relayout(index); } resizeView(index: number, size: number): void { @@ -298,21 +317,28 @@ export class SplitView implements IDisposable { return this.viewItems[index].size; } - private resize(index: number, delta: number, sizes = this.viewItems.map(i => i.size)): void { + private resize(index: number, delta: number, sizes = this.viewItems.map(i => i.size), lowPriorityIndex?: number): void { if (index < 0 || index >= this.viewItems.length) { return; } if (delta !== 0) { - const upIndexes = range(index, -1); - const up = upIndexes.map(i => this.viewItems[i]); + let upIndexes = range(index, -1); + let downIndexes = range(index + 1, this.viewItems.length); + + if (typeof lowPriorityIndex === 'number') { + upIndexes = pushToEnd(upIndexes, lowPriorityIndex); + downIndexes = pushToEnd(downIndexes, lowPriorityIndex); + } + + const upItems = upIndexes.map(i => this.viewItems[i]); const upSizes = upIndexes.map(i => sizes[i]); - const downIndexes = range(index + 1, this.viewItems.length); - const down = downIndexes.map(i => this.viewItems[i]); + + const downItems = downIndexes.map(i => this.viewItems[i]); const downSizes = downIndexes.map(i => sizes[i]); - for (let i = 0, deltaUp = delta; deltaUp !== 0 && i < up.length; i++) { - const item = up[i]; + for (let i = 0, deltaUp = delta; deltaUp !== 0 && i < upItems.length; i++) { + const item = upItems[i]; const size = clamp(upSizes[i] + deltaUp, item.view.minimumSize, item.view.maximumSize); const viewDelta = size - upSizes[i]; @@ -320,8 +346,8 @@ export class SplitView implements IDisposable { item.size = size; } - for (let i = 0, deltaDown = delta; deltaDown !== 0 && i < down.length; i++) { - const item = down[i]; + for (let i = 0, deltaDown = delta; deltaDown !== 0 && i < downItems.length; i++) { + const item = downItems[i]; const size = clamp(downSizes[i] - deltaDown, item.view.minimumSize, item.view.maximumSize); const viewDelta = size - downSizes[i]; diff --git a/src/vs/base/common/async.ts b/src/vs/base/common/async.ts index 9eff176c713..90e4c4ffdd6 100644 --- a/src/vs/base/common/async.ts +++ b/src/vs/base/common/async.ts @@ -349,13 +349,14 @@ export function always(promise: TPromise, f: Function): TPromise { * Runs the provided list of promise factories in sequential order. The returned * promise will complete to an array of results from each promise. */ -export function sequence(promiseFactories: ITask>[]): TPromise { + +export function sequence(promiseFactories: ITask>[]): TPromise { const results: T[] = []; // reverse since we start with last element using pop() promiseFactories = promiseFactories.reverse(); - function next(): Promise { + function next(): Thenable { if (promiseFactories.length) { return promiseFactories.pop()(); } @@ -363,7 +364,7 @@ export function sequence(promiseFactories: ITask>[]): TPromise { if (result !== undefined && result !== null) { results.push(result); } @@ -692,4 +693,4 @@ export class ThrottledEmitter extends Emitter { this.hasLastEvent = false; this.lastEvent = void 0; } -} \ No newline at end of file +} diff --git a/src/vs/base/common/color.ts b/src/vs/base/common/color.ts index d650dc0d92d..f18a87dc15e 100644 --- a/src/vs/base/common/color.ts +++ b/src/vs/base/common/color.ts @@ -214,7 +214,7 @@ export class HSVA { m = ((r - g) / delta) + 4; } - return new HSVA(m * 60, s, cmax, rgba.a); + return new HSVA(Math.round(m * 60), s, cmax, rgba.a); } // from http://www.rapidtables.com/convert/color/hsv-to-rgb.htm diff --git a/src/vs/base/common/date.ts b/src/vs/base/common/date.ts new file mode 100644 index 00000000000..7cae97659cd --- /dev/null +++ b/src/vs/base/common/date.ts @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +function pad(number: number): string { + if (number < 10) { + return '0' + number; + } + + return String(number); +} + +export function toLocalISOString(date: Date): string { + return date.getFullYear() + + '-' + pad(date.getMonth() + 1) + + '-' + pad(date.getDate()) + + 'T' + pad(date.getHours()) + + ':' + pad(date.getMinutes()) + + ':' + pad(date.getSeconds()) + + '.' + (date.getMilliseconds() / 1000).toFixed(3).slice(2, 5) + + 'Z'; +} \ No newline at end of file diff --git a/src/vs/base/common/diff/diff.ts b/src/vs/base/common/diff/diff.ts index b9dee8dda6e..faa62fad913 100644 --- a/src/vs/base/common/diff/diff.ts +++ b/src/vs/base/common/diff/diff.ts @@ -95,7 +95,7 @@ export class MyArray { // LcsDiff.cs // // An implementation of the difference algorithm described in -// "An O(ND) Difference Algorithm and its letiations" by Eugene W. Myers +// "An O(ND) Difference Algorithm and its variations" by Eugene W. Myers // // Copyright (C) 2008 Microsoft Corporation @minifier_do_not_preserve //***************************************************************************** @@ -215,7 +215,7 @@ const hasOwnProperty = Object.prototype.hasOwnProperty; /** * An implementation of the difference algorithm described in - * "An O(ND) Difference Algorithm and its letiations" by Eugene W. Myers + * "An O(ND) Difference Algorithm and its variations" by Eugene W. Myers */ export class LcsDiff { diff --git a/src/vs/base/common/event.ts b/src/vs/base/common/event.ts index 2f67b009aa5..36f2a501252 100644 --- a/src/vs/base/common/event.ts +++ b/src/vs/base/common/event.ts @@ -365,6 +365,7 @@ export class EventBufferer { export interface IChainableEvent { event: Event; map(fn: (i: T) => O): IChainableEvent; + forEach(fn: (i: T) => void): IChainableEvent; filter(fn: (e: T) => boolean): IChainableEvent; on(listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[]): IDisposable; } @@ -373,6 +374,10 @@ export function mapEvent(event: Event, map: (i: I) => O): Event { return (listener, thisArgs = null, disposables?) => event(i => listener.call(thisArgs, map(i)), null, disposables); } +export function forEach(event: Event, each: (i: I) => void): Event { + return (listener, thisArgs = null, disposables?) => event(i => { each(i); listener.call(thisArgs, i); }, null, disposables); +} + export function filterEvent(event: Event, filter: (e: T) => boolean): Event { return (listener, thisArgs = null, disposables?) => event(e => filter(e) && listener.call(thisArgs, e), null, disposables); } @@ -387,6 +392,10 @@ class ChainableEvent implements IChainableEvent { return new ChainableEvent(mapEvent(this._event, fn)); } + forEach(fn: (i: T) => void): IChainableEvent { + return new ChainableEvent(forEach(this._event, fn)); + } + filter(fn: (e: T) => boolean): IChainableEvent { return new ChainableEvent(filterEvent(this._event, fn)); } diff --git a/src/vs/base/common/events.ts b/src/vs/base/common/events.ts deleted file mode 100644 index 82997d15554..00000000000 --- a/src/vs/base/common/events.ts +++ /dev/null @@ -1,78 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -export class Event { - public time: number; - public originalEvent: Event; - public source: any; - - constructor(originalEvent?: Event) { - this.time = (new Date()).getTime(); - this.originalEvent = originalEvent; - this.source = null; - } -} - -export class PropertyChangeEvent extends Event { - public key: string; - public oldValue: any; - public newValue: any; - - constructor(key?: string, oldValue?: any, newValue?: any, originalEvent?: Event) { - super(originalEvent); - - this.key = key; - this.oldValue = oldValue; - this.newValue = newValue; - } -} - -export class ViewerEvent extends Event { - public element: any; - - constructor(element: any, originalEvent?: Event) { - super(originalEvent); - - this.element = element; - } -} - -export interface ISelectionEvent { - selection: any[]; - payload?: any; - source: any; -} - -export interface IFocusEvent { - focus: any; - payload?: any; - source: any; -} - -export interface IHighlightEvent { - highlight: any; - payload?: any; - source: any; -} - -export const EventType = { - PROPERTY_CHANGED: 'propertyChanged', - SELECTION: 'selection', - FOCUS: 'focus', - BLUR: 'blur', - HIGHLIGHT: 'highlight', - EXPAND: 'expand', - COLLAPSE: 'collapse', - TOGGLE: 'toggle', - BEFORE_RUN: 'beforeRun', - RUN: 'run', - EDIT: 'edit', - SAVE: 'save', - CANCEL: 'cancel', - CHANGE: 'change', - DISPOSE: 'dispose', -}; - diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index b43808d4e31..0ff9a4513e4 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -341,6 +341,8 @@ export function matchesFuzzy(word: string, wordToMatchAgainst: string, enableSep return enableSeparateSubstringMatching ? fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst); } +//#region --- fuzzyScore --- + export function createMatches(position: number[]): IMatch[] { let ret: IMatch[] = []; if (!position) { @@ -503,7 +505,7 @@ export function fuzzyScore(pattern: string, word: string, patternMaxWhitespaceIg } else { score = 5; } - } else if (isSeparatorAtPos(lowWord, wordPos - 2)) { + } else if (isSeparatorAtPos(lowWord, wordPos - 2) || isWhitespaceAtPos(lowWord, wordPos - 2)) { // post separator: `foo <-> bar_foo` score = 5; @@ -673,8 +675,7 @@ class LazyArray { slice(): LazyArray { const ret = new LazyArray(); ret._parent = this; - ret._parentLen = this._data ? this._data.length : 0; - return ret; + ret._parentLen = this._data ? this._data.length : 0; return ret; } toArray(): number[] { @@ -693,14 +694,69 @@ class LazyArray { } } -export function nextTypoPermutation(pattern: string, patternPos: number) { +//#endregion + + +//#region --- graceful --- + +export function fuzzyScoreGracefulAggressive(pattern: string, word: string, patternMaxWhitespaceIgnore?: number): [number, number[]] { + return fuzzyScoreWithPermutations(pattern, word, true, patternMaxWhitespaceIgnore); +} + +export function fuzzyScoreGraceful(pattern: string, word: string, patternMaxWhitespaceIgnore?: number): [number, number[]] { + return fuzzyScoreWithPermutations(pattern, word, false, patternMaxWhitespaceIgnore); +} + +function fuzzyScoreWithPermutations(pattern: string, word: string, aggressive?: boolean, patternMaxWhitespaceIgnore?: number): [number, number[]] { + let top: [number, number[]] = fuzzyScore(pattern, word, patternMaxWhitespaceIgnore); + + if (top && !aggressive) { + // when using the original pattern yield a result we` + // return it unless we are aggressive and try to find + // a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`. + return top; + } + + if (pattern.length >= 3) { + // When the pattern is long enough then try a few (max 7) + // permutations of the pattern to find a better match. The + // permutations only swap neighbouring characters, e.g + // `cnoso` becomes `conso`, `cnsoo`, `cnoos`. + let tries = Math.min(7, pattern.length - 1); + for (let patternPos = 1; patternPos < tries; patternPos++) { + let newPattern = nextTypoPermutation(pattern, patternPos); + if (newPattern) { + let candidate = fuzzyScore(newPattern, word, patternMaxWhitespaceIgnore); + if (candidate) { + candidate[0] -= 3; // permutation penalty + if (!top || candidate[0] > top[0]) { + top = candidate; + } + } + } + } + } + + return top; +} + +function nextTypoPermutation(pattern: string, patternPos: number): string { if (patternPos + 1 >= pattern.length) { return undefined; } + let swap1 = pattern[patternPos]; + let swap2 = pattern[patternPos + 1]; + + if (swap1 === swap2) { + return undefined; + } + return pattern.slice(0, patternPos) - + pattern[patternPos + 1] - + pattern[patternPos] + + swap2 + + swap1 + pattern.slice(patternPos + 2); -} \ No newline at end of file +} + +//#endregion diff --git a/src/vs/base/common/iterator.ts b/src/vs/base/common/iterator.ts index f930237759c..7c2f0fabc1e 100644 --- a/src/vs/base/common/iterator.ts +++ b/src/vs/base/common/iterator.ts @@ -6,7 +6,7 @@ 'use strict'; export interface IIterator { - next(): { done: boolean, value: E }; + next(): { readonly done: boolean, readonly value: E }; } export interface INextIterator { diff --git a/src/vs/base/common/json.ts b/src/vs/base/common/json.ts index 042e0c863e5..ffa75f46095 100644 --- a/src/vs/base/common/json.ts +++ b/src/vs/base/common/json.ts @@ -961,6 +961,9 @@ export function visit(text: string, visitor: JSONVisitor, options?: ParseOptions } onSeparator(','); scanNext(); // consume comma + if (_scanner.getToken() === SyntaxKind.CloseBracketToken && allowTrailingComma) { + break; + } } else if (needsComma) { handleError(ParseErrorCode.CommaExpected, [], []); } diff --git a/src/vs/base/common/jsonSchema.ts b/src/vs/base/common/jsonSchema.ts index 538858e0c0d..5bec1537db2 100644 --- a/src/vs/base/common/jsonSchema.ts +++ b/src/vs/base/common/jsonSchema.ts @@ -55,6 +55,7 @@ export interface IJSONSchema { markdownEnumDescriptions?: string[]; // VSCode extension markdownDescription?: string; // VSCode extension doNotSuggest?: boolean; // VSCode extension + allowComments?: boolean; // VSCode extension } export interface IJSONSchemaMap { diff --git a/src/vs/base/common/labels.ts b/src/vs/base/common/labels.ts index 7730a5dbf80..e8f135512e7 100644 --- a/src/vs/base/common/labels.ts +++ b/src/vs/base/common/labels.ts @@ -106,6 +106,10 @@ export function tildify(path: string, userHome: string): string { return path; } +export function untildify(path: string, userHome: string): string { + return path.replace(/^~($|\/|\\)/, `${userHome}$1`); +} + /** * Shortens the paths but keeps them easy to distinguish. * Replaces not important parts with ellipsis. diff --git a/src/vs/base/common/linkedList.ts b/src/vs/base/common/linkedList.ts index 95f91a74c06..d40fd2a2861 100644 --- a/src/vs/base/common/linkedList.ts +++ b/src/vs/base/common/linkedList.ts @@ -95,21 +95,19 @@ export class LinkedList { } iterator(): IIterator { - let _done: boolean; - let _value: E; let element = { - get done() { return _done; }, - get value() { return _value; } + done: undefined, + value: undefined, }; let node = this._first; return { next(): { done: boolean; value: E } { if (!node) { - _done = true; - _value = undefined; + element.done = true; + element.value = undefined; } else { - _done = false; - _value = node.element; + element.done = false; + element.value = node.element; node = node.next; } return element; diff --git a/src/vs/base/common/map.ts b/src/vs/base/common/map.ts index 04186a763cd..58e3fea9be1 100644 --- a/src/vs/base/common/map.ts +++ b/src/vs/base/common/map.ts @@ -555,18 +555,6 @@ export class LinkedMap { } } - public forEachReverse(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void { - let current = this._tail; - while (current) { - if (thisArg) { - callbackfn.bind(thisArg)(current.value, current.key, this); - } else { - callbackfn(current.value, current.key, this); - } - current = current.previous; - } - } - public values(): V[] { let result: V[] = []; let current = this._head; diff --git a/src/vs/base/common/marshalling.ts b/src/vs/base/common/marshalling.ts index 9275b413307..ab5adf12626 100644 --- a/src/vs/base/common/marshalling.ts +++ b/src/vs/base/common/marshalling.ts @@ -11,7 +11,9 @@ export function stringify(obj: any): string { } export function parse(text: string): any { - return JSON.parse(text, reviver); + let data = JSON.parse(text); + data = revive(data, 0); + return data; } interface MarshalledObject { @@ -30,15 +32,27 @@ function replacer(key: string, value: any): any { return value; } -function reviver(key: string, value: any): any { - let marshallingConst: number; - if (value !== void 0 && value !== null) { - marshallingConst = (value).$mid; +function revive(obj: any, depth: number): any { + + if (!obj || depth > 200) { + return obj; } - switch (marshallingConst) { - case 1: return URI.revive(value); - case 2: return new RegExp(value.source, value.flags); - default: return value; + if (typeof obj === 'object') { + + switch ((obj).$mid) { + case 1: return URI.revive(obj); + case 2: return new RegExp(obj.source, obj.flags); + } + + // walk object (or array) + for (let key in obj) { + if (Object.hasOwnProperty.call(obj, key)) { + obj[key] = revive(obj[key], depth + 1); + } + } } + + return obj; } + diff --git a/src/vs/base/common/types.ts b/src/vs/base/common/types.ts index 84ecab74d33..5cae5c567f8 100644 --- a/src/vs/base/common/types.ts +++ b/src/vs/base/common/types.ts @@ -147,7 +147,7 @@ export function validateConstraint(arg: any, constraint: TypeConstraint): void { if (arg instanceof constraint) { return; } - if (arg && arg.constructor === constraint) { + if (!isUndefinedOrNull(arg) && arg.constructor === constraint) { return; } if (constraint.length === 1 && constraint.call(undefined, arg) === true) { diff --git a/src/vs/base/common/uri.ts b/src/vs/base/common/uri.ts index d99a0e403db..2ccad2d4ad3 100644 --- a/src/vs/base/common/uri.ts +++ b/src/vs/base/common/uri.ts @@ -174,27 +174,27 @@ export default class URI implements UriComponents { if (scheme === void 0) { scheme = this.scheme; } else if (scheme === null) { - scheme = ''; + scheme = _empty; } if (authority === void 0) { authority = this.authority; } else if (authority === null) { - authority = ''; + authority = _empty; } if (path === void 0) { path = this.path; } else if (path === null) { - path = ''; + path = _empty; } if (query === void 0) { query = this.query; } else if (query === null) { - query = ''; + query = _empty; } if (fragment === void 0) { fragment = this.fragment; } else if (fragment === null) { - fragment = ''; + fragment = _empty; } if (scheme === this.scheme diff --git a/src/vs/base/node/encoding.ts b/src/vs/base/node/encoding.ts index b8b6707cda7..03a87492c34 100644 --- a/src/vs/base/node/encoding.ts +++ b/src/vs/base/node/encoding.ts @@ -8,6 +8,8 @@ import stream = require('vs/base/node/stream'); import iconv = require('iconv-lite'); import { TPromise } from 'vs/base/common/winjs.base'; +import { isLinux, isMacintosh } from 'vs/base/common/platform'; +import { exec } from 'child_process'; export const UTF8 = 'utf8'; export const UTF8_with_bom = 'utf8bom'; @@ -165,3 +167,88 @@ export function toCanonicalName(enc: string): string { return enc; } } + +// https://ss64.com/nt/chcp.html +const windowsTerminalEncodings = { + '437': 'cp437', // United States + '850': 'cp850', // Multilingual(Latin I) + '852': 'cp852', // Slavic(Latin II) + '855': 'cp855', // Cyrillic(Russian) + '857': 'cp857', // Turkish + '860': 'cp860', // Portuguese + '861': 'cp861', // Icelandic + '863': 'cp863', // Canadian - French + '865': 'cp865', // Nordic + '866': 'cp866', // Russian + '869': 'cp869', // Modern Greek + '1252': 'cp1252' // West European Latin +}; + +export function resolveTerminalEncoding(verbose?: boolean): TPromise { + let rawEncodingPromise: TPromise; + + // Support a global environment variable to win over other mechanics + const cliEncodingEnv = process.env['VSCODE_CLI_ENCODING']; + if (cliEncodingEnv) { + if (verbose) { + console.log(`Found VSCODE_CLI_ENCODING variable: ${cliEncodingEnv}`); + } + + rawEncodingPromise = TPromise.as(cliEncodingEnv); + } + + // Linux/Mac: use "locale charmap" command + else if (isLinux || isMacintosh) { + rawEncodingPromise = new TPromise(c => { + if (verbose) { + console.log('Running "locale charmap" to detect terminal encoding...'); + } + + exec('locale charmap', (err, stdout, stderr) => c(stdout)); + }); + } + + // Windows: educated guess + else { + rawEncodingPromise = new TPromise(c => { + if (verbose) { + console.log('Running "chcp" to detect terminal encoding...'); + } + + exec('chcp', (err, stdout, stderr) => { + if (stdout) { + const windowsTerminalEncodingKeys = Object.keys(windowsTerminalEncodings); + for (let i = 0; i < windowsTerminalEncodingKeys.length; i++) { + const key = windowsTerminalEncodingKeys[i]; + if (stdout.indexOf(key) >= 0) { + return c(windowsTerminalEncodings[key]); + } + } + } + + return c(void 0); + }); + }); + } + + return rawEncodingPromise.then(rawEncoding => { + if (verbose) { + console.log(`Detected raw terminal encoding: ${rawEncoding}`); + } + + if (!rawEncoding || rawEncoding.toLowerCase() === 'utf-8' || rawEncoding.toLowerCase() === UTF8) { + return UTF8; + } + + const iconvEncoding = toIconvLiteEncoding(rawEncoding); + if (iconv.encodingExists(iconvEncoding)) { + return iconvEncoding; + } + + if (verbose) { + console.log('Unsupported terminal encoding, falling back to UTF-8.'); + } + + return UTF8; + }); +} diff --git a/src/vs/base/node/extfs.ts b/src/vs/base/node/extfs.ts index 77b60dad317..b01051d4d93 100644 --- a/src/vs/base/node/extfs.ts +++ b/src/vs/base/node/extfs.ts @@ -363,6 +363,35 @@ export function writeFileAndFlush(path: string, data: string | NodeBuffer, optio }); } +export function writeFileAndFlushSync(path: string, data: string | NodeBuffer, options?: { mode?: number; flag?: string; }): void { + if (!canFlush) { + return fs.writeFileSync(path, data, options); + } + + if (!options) { + options = { mode: 0o666, flag: 'w' }; + } + + // Open the file with same flags and mode as fs.writeFile() + const fd = fs.openSync(path, options.flag, options.mode); + + try { + + // It is valid to pass a fd handle to fs.writeFile() and this will keep the handle open! + fs.writeFileSync(fd, data); + + // Flush contents (not metadata) of the file to disk + try { + fs.fdatasyncSync(fd); + } catch (syncError) { + console.warn('[node.js fs] fdatasyncSync is now disabled for this session because it failed: ', syncError); + canFlush = false; + } + } finally { + fs.closeSync(fd); + } +} + /** * Copied from: https://github.com/Microsoft/vscode-node-debug/blob/master/src/node/pathUtilities.ts#L83 * diff --git a/src/vs/base/node/id.ts b/src/vs/base/node/id.ts index 22a79358a0a..c4c5a8ee431 100644 --- a/src/vs/base/node/id.ts +++ b/src/vs/base/node/id.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as getmac from 'getmac'; -import * as crypto from 'crypto'; import { TPromise } from 'vs/base/common/winjs.base'; import * as errors from 'vs/base/common/errors'; import * as uuid from 'vs/base/common/uuid'; @@ -86,17 +84,22 @@ export function getMachineId(): TPromise { function getMacMachineId(): TPromise { return new TPromise(resolve => { - try { - getmac.getMac((error, macAddress) => { - if (!error) { - resolve(crypto.createHash('sha256').update(macAddress, 'utf8').digest('hex')); - } else { - resolve(undefined); - } - }); - } catch (err) { + TPromise.join([import('crypto'), import('getmac')]).then(([crypto, getmac]) => { + try { + getmac.getMac((error, macAddress) => { + if (!error) { + resolve(crypto.createHash('sha256').update(macAddress, 'utf8').digest('hex')); + } else { + resolve(undefined); + } + }); + } catch (err) { + errors.onUnexpectedError(err); + resolve(undefined); + } + }, err => { errors.onUnexpectedError(err); resolve(undefined); - } + }); }); } diff --git a/src/vs/base/node/ports.ts b/src/vs/base/node/ports.ts index 1ab7de9ab2c..94e6cfb01dc 100644 --- a/src/vs/base/node/ports.ts +++ b/src/vs/base/node/ports.ts @@ -11,24 +11,24 @@ import net = require('net'); * Given a start point and a max number of retries, will find a port that * is openable. Will return 0 in case no free port can be found. */ -export function findFreePort(startPort: number, giveUpAfter: number, timeout: number, clb: (port: number) => void): void { +export function findFreePort(startPort: number, giveUpAfter: number, timeout: number): Thenable { let done = false; - const timeoutHandle = setTimeout(() => { - if (!done) { - done = true; + return new Promise(resolve => { + const timeoutHandle = setTimeout(() => { + if (!done) { + done = true; + return resolve(0); + } + }, timeout); - return clb(0); - } - }, timeout); - - doFindFreePort(startPort, giveUpAfter, (port) => { - if (!done) { - done = true; - clearTimeout(timeoutHandle); - - return clb(port); - } + doFindFreePort(startPort, giveUpAfter, (port) => { + if (!done) { + done = true; + clearTimeout(timeoutHandle); + return resolve(port); + } + }); }); } diff --git a/src/vs/base/node/profiler.ts b/src/vs/base/node/profiler.ts deleted file mode 100644 index 782c20e28f1..00000000000 --- a/src/vs/base/node/profiler.ts +++ /dev/null @@ -1,100 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { join, basename } from 'path'; -import { writeFile } from 'vs/base/node/pfs'; - -export function startProfiling(name: string): TPromise { - return lazyV8Profiler.value.then(profiler => { - profiler.startProfiling(name); - return true; - }); -} - -const _isRunningOutOfDev = process.env['VSCODE_DEV']; - -export function stopProfiling(dir: string, prefix: string): TPromise { - return lazyV8Profiler.value.then(profiler => { - return profiler.stopProfiling(); - }).then(profile => { - return new TPromise((resolve, reject) => { - - // remove pii paths - if (!_isRunningOutOfDev) { - removePiiPaths(profile); // remove pii from our users - } - - profile.export(function (error, result) { - profile.delete(); - if (error) { - reject(error); - return; - } - let filepath = join(dir, `${prefix}_${profile.title}.cpuprofile`); - if (!_isRunningOutOfDev) { - filepath += '.txt'; // github issues must be: txt, zip, png, gif - } - writeFile(filepath, result).then(() => resolve(filepath), reject); - }); - }); - }); -} - -export function removePiiPaths(profile: Profile) { - const stack = [profile.head]; - while (stack.length > 0) { - const element = stack.pop(); - if (element.url) { - const shortUrl = basename(element.url); - if (element.url !== shortUrl) { - element.url = `pii_removed/${shortUrl}`; - } - } - if (element.children) { - stack.push(...element.children); - } - } -} - -declare interface Profiler { - startProfiling(name: string): void; - stopProfiling(): Profile; -} - -export declare interface Profile { - title: string; - export(callback: (err, data) => void): void; - delete(): void; - head: ProfileSample; -} - -export declare interface ProfileSample { - // bailoutReason:"" - // callUID:2333 - // children:Array[39] - // functionName:"(root)" - // hitCount:0 - // id:1 - // lineNumber:0 - // scriptId:0 - // url:"" - url: string; - children: ProfileSample[]; -} - -const lazyV8Profiler = new class { - private _value: TPromise; - get value() { - if (!this._value) { - this._value = new TPromise((resolve, reject) => { - require(['v8-profiler'], resolve, reject); - }); - } - return this._value; - } -}; diff --git a/src/vs/base/node/ps-win.ps1 b/src/vs/base/node/ps-win.ps1 new file mode 100644 index 00000000000..b98ad7b42c5 --- /dev/null +++ b/src/vs/base/node/ps-win.ps1 @@ -0,0 +1,183 @@ +################################################################################################ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +################################################################################################ + +Param( + [string]$ProcessName = "code.exe", + [int]$MaxSamples = 10 +) + +$processLength = "process(".Length + +function Get-MachineInfo { + $model = (Get-WmiObject -Class Win32_Processor).Name + $memory = (Get-WmiObject -Class Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum / 1MB + $wmi_cs = Get-WmiObject -Class Win32_ComputerSystem + return @{ + "type" = "machineInfo" + "model" = $model + "processors" = $wmi_cs.NumberOfProcessors + "logicalProcessors" = $wmi_cs.NumberOfLogicalProcessors + "totalMemory" = $memory + + } +} +$machineInfo = Get-MachineInfo + +function Get-MachineState { + $proc = Get-WmiObject Win32_Processor + $os = Get-WmiObject win32_OperatingSystem + return @{ + "type" = 'machineState' + "cpuLoad" = $proc.LoadPercentage + "handles" = (Get-Process | Measure-Object Handles -Sum).Sum + "memory" = @{ + "total" = $os.TotalVisibleMemorySize + "free" = $os.FreePhysicalMemory + "swapTotal" = $os.TotalVirtualMemorySize + "swapFree" = $os.FreeVirtualMemory + } + } +} +$machineState = Get-MachineState + +$processId2CpuLoad = @{} +function Get-PerformanceCounters ($logicalProcessors) { + $counterError + # In a first round we get the performance counters and the process ids. + $counters = (Get-Counter ("\Process(*)\% Processor Time", "\Process(*)\ID Process") -ErrorAction SilentlyContinue).CounterSamples + $processKey2Id = @{} + foreach ($counter in $counters) { + if ($counter.Status -ne 0) { + continue + } + $path = $counter.path; + $segments = $path.Split("\"); + $kind = $segments[4]; + $processKey = $segments[3].Substring($processLength, $segments[3].Length - $processLength - 1) + if ($kind -eq "id process") { + $processKey2Id[$processKey] = [uint32]$counter.CookedValue + } + } + foreach ($counter in $counters) { + if ($counter.Status -ne 0) { + continue + } + $path = $counter.path; + $segments = $path.Split("\"); + $kind = $segments[4]; + $processKey = $segments[3].Substring($processLength, $segments[3].Length - $processLength - 1) + if ($kind -eq "% processor time") { + $array = New-Object double[] ($MaxSamples + 1) + $array[0] = ($counter.CookedValue / $logicalProcessors) + $processId = $processKey2Id[$processKey] + if ($processId) { + $processId2CpuLoad[$processId] = $array + } + } + } + # Now lets sample another 10 times but only the processor time + $samples = Get-Counter "\Process(*)\% Processor Time" -SampleInterval 1 -MaxSamples $MaxSamples -ErrorAction SilentlyContinue + for ($s = 0; $s -lt $samples.Count; $s++) { + $counters = $samples[$s].CounterSamples; + foreach ($counter in $counters) { + if ($counter.Status -ne 0) { + continue + } + $path = $counter.path; + $segments = $path.Split("\"); + $processKey = $segments[3].Substring($processLength, $segments[3].Length - $processLength - 1) + $processKey = $processKey2Id[$processKey]; + if ($processKey) { + $processId2CpuLoad[$processKey][$s + 1] = ($counter.CookedValue / $logicalProcessors) + } + } + } +} +Get-PerformanceCounters -logicalProcessors $machineInfo.logicalProcessors + +$topElements = New-Object PSObject[] $processId2CpuLoad.Keys.Count; +$index = 0; +foreach ($key in $processId2CpuLoad.Keys) { + $obj = [PSCustomObject]@{ + ProcessId = $key + Load = ($processId2CpuLoad[$key] | Measure-Object -Sum).Sum / ($MaxSamples + 1) + } + $topElements[$index] = $obj + $index++ +} +$topElements = $topElements | Sort-Object Load -Descending + +# Get all code processes +$codeProcesses = @{} +foreach ($item in Get-WmiObject Win32_Process -Filter "name = '$ProcessName'") { + $codeProcesses[$item.ProcessId] = $item +} +foreach ($item in Get-WmiObject Win32_Process -Filter "name = 'codeHelper.exe'") { + $codeProcesses[$item.ProcessId] = $item +} +$otherProcesses = @{} +foreach ($item in Get-WmiObject Win32_Process -Filter "name Like '%'") { + if (!($codeProcesses.Contains($item.ProcessId))) { + $otherProcesses[$item.ProcessId] = $item + } +} +$modified = $false +do { + $toDelete = @() + $modified = $false + foreach ($item in $otherProcesses.Values) { + if ($codeProcesses.Contains([uint32]$item.ParentProcessId)) { + $codeProcesses[$item.ProcessId] = $item; + $toDelete += $item + } + } + foreach ($item in $toDelete) { + $otherProcesses.Remove([uint32]$item.ProcessId) + $modified = $true + } +} while ($modified) + +$result = New-Object PSObject[] (2 + [math]::Min(5, $topElements.Count) + $codeProcesses.Count) +$result[0] = $machineInfo +$result[1] = $machineState +$index = 2; +for($i = 0; $i -lt 5 -and $i -lt $topElements.Count; $i++) { + $element = $topElements[$i] + $item = $codeProcesses[[uint32]$element.ProcessId] + if (!$item) { + $item = $otherProcesses[[uint32]$element.ProcessId] + } + if ($item) { + $cpuLoad = $processId2CpuLoad[[uint32]$item.ProcessId] | % { [pscustomobject] $_ } + $result[$index] = [pscustomobject]@{ + "type" = "topProcess" + "name" = $item.Name + "processId" = $item.ProcessId + "parentProcessId" = $item.ParentProcessId + "commandLine" = $item.CommandLine + "handles" = $item.HandleCount + "cpuLoad" = $cpuLoad + "workingSetSize" = $item.WorkingSetSize + } + $index++ + } +} +foreach ($item in $codeProcesses.Values) { + # we need to convert this otherwise to JSON with create a value, count object and not an inline array + $cpuLoad = $processId2CpuLoad[[uint32]$item.ProcessId] | % { [pscustomobject] $_ } + $result[$index] = [pscustomobject]@{ + "type" = "processInfo" + "name" = $item.Name + "processId" = $item.ProcessId + "parentProcessId" = $item.ParentProcessId + "commandLine" = $item.CommandLine + "handles" = $item.HandleCount + "cpuLoad" = $cpuLoad + "workingSetSize" = $item.WorkingSetSize + } + $index++ +} + +$result | ConvertTo-Json -Depth 99 diff --git a/src/vs/base/node/ps.ts b/src/vs/base/node/ps.ts new file mode 100644 index 00000000000..4fae9b9466d --- /dev/null +++ b/src/vs/base/node/ps.ts @@ -0,0 +1,253 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { spawn, exec } from 'child_process'; +import * as path from 'path'; +import URI from 'vs/base/common/uri'; + +export interface ProcessItem { + name: string; + cmd: string; + pid: number; + ppid: number; + load: number; + mem: number; + + children?: ProcessItem[]; +} + +export function listProcesses(rootPid: number): Promise { + + return new Promise((resolve, reject) => { + + let rootItem: ProcessItem; + const map = new Map(); + + function addToTree(pid: number, ppid: number, cmd: string, load: number, mem: number) { + + const parent = map.get(ppid); + if (pid === rootPid || parent) { + + const item: ProcessItem = { + name: findName(cmd), + cmd, + pid, + ppid, + load, + mem + }; + map.set(pid, item); + + if (pid === rootPid) { + rootItem = item; + } + + if (parent) { + if (!parent.children) { + parent.children = []; + } + parent.children.push(item); + if (parent.children.length > 1) { + parent.children = parent.children.sort((a, b) => a.pid - b.pid); + } + } + } + } + + function findName(cmd: string): string { + + const RENDERER_PROCESS_HINT = /--disable-blink-features=Auxclick/; + const WINDOWS_WATCHER_HINT = /\\watcher\\win32\\CodeHelper\.exe/; + const WINDOWS_CRASH_REPORTER = /--crashes-directory/; + const WINDOWS_PTY = /\\pipe\\winpty-control/; + const WINDOWS_CONSOLE_HOST = /conhost\.exe/; + const TYPE = /--type=([a-zA-Z-]+)/; + + // find windows file watcher + if (WINDOWS_WATCHER_HINT.exec(cmd)) { + return 'watcherService '; + } + + // find windows crash reporter + if (WINDOWS_CRASH_REPORTER.exec(cmd)) { + return 'electron-crash-reporter'; + } + + // find windows pty process + if (WINDOWS_PTY.exec(cmd)) { + return 'winpty-process'; + } + + //find windows console host process + if (WINDOWS_CONSOLE_HOST.exec(cmd)) { + return 'console-window-host (Windows internal process)'; + } + + // find "--type=xxxx" + let matches = TYPE.exec(cmd); + if (matches && matches.length === 2) { + if (matches[1] === 'renderer') { + if (!RENDERER_PROCESS_HINT.exec(cmd)) { + return 'shared-process'; + } + + return `window`; + } + return matches[1]; + } + + // find all xxxx.js + const JS = /[a-zA-Z-]+\.js/g; + let result = ''; + do { + matches = JS.exec(cmd); + if (matches) { + result += matches + ' '; + } + } while (matches); + + if (result) { + if (cmd.indexOf('node ') !== 0) { + return `electron_node ${result}`; + } + } + return cmd; + } + + if (process.platform === 'win32') { + + interface ProcessInfo { + type: 'processInfo'; + name: string; + processId: number; + parentProcessId: number; + commandLine: string; + handles: number; + cpuLoad: number[]; + workingSetSize: number; + } + + interface TopProcess { + type: 'topProcess'; + name: string; + processId: number; + parentProcessId: number; + commandLine: string; + handles: number; + cpuLoad: number[]; + workingSetSize: number; + } + + type Item = ProcessInfo | TopProcess; + + const cleanUNCPrefix = (value: string): string => { + if (value.indexOf('\\\\?\\') === 0) { + return value.substr(4); + } else if (value.indexOf('\\??\\') === 0) { + return value.substr(4); + } else if (value.indexOf('"\\\\?\\') === 0) { + return '"' + value.substr(5); + } else if (value.indexOf('"\\??\\') === 0) { + return '"' + value.substr(5); + } else { + return value; + } + }; + + const execMain = path.basename(process.execPath).replace(/ /g, '` '); + const script = URI.parse(require.toUrl('vs/base/node/ps-win.ps1')).fsPath.replace(/ /g, '` '); + const commandLine = `${script} -ProcessName ${execMain} -MaxSamples 3`; + const cmd = spawn('powershell.exe', ['-ExecutionPolicy', 'Bypass', '-Command', commandLine]); + + let stdout = ''; + let stderr = ''; + cmd.stdout.on('data', data => { + stdout += data.toString(); + }); + + cmd.stderr.on('data', data => { + stderr += data.toString(); + }); + + cmd.on('exit', () => { + if (stderr.length > 0) { + reject(stderr); + } + let processItems: Map = new Map(); + try { + const items: Item[] = JSON.parse(stdout); + for (const item of items) { + if (item.type === 'processInfo') { + let load = 0; + if (item.cpuLoad) { + for (let value of item.cpuLoad) { + load += value; + } + load = load / item.cpuLoad.length; + } else { + load = -1; + } + let commandLine = cleanUNCPrefix(item.commandLine); + processItems.set(item.processId, { + name: findName(commandLine), + cmd: commandLine, + pid: item.processId, + ppid: item.parentProcessId, + load: load, + mem: item.workingSetSize + }); + } + } + rootItem = processItems.get(rootPid); + if (rootItem) { + processItems.forEach(item => { + let parent = processItems.get(item.ppid); + if (parent) { + if (!parent.children) { + parent.children = []; + } + parent.children.push(item); + } + }); + processItems.forEach(item => { + if (item.children) { + item.children = item.children.sort((a, b) => a.pid - b.pid); + } + }); + resolve(rootItem); + } else { + reject(new Error(`Root process ${rootPid} not found`)); + } + } catch (error) { + reject(error); + } + }); + } else { // OS X & Linux + + const CMD = 'ps -ax -o pid=,ppid=,pcpu=,pmem=,command='; + const PID_CMD = /^\s*([0-9]+)\s+([0-9]+)\s+([0-9]+\.[0-9]+)\s+([0-9]+\.[0-9]+)\s+(.+)$/; + + exec(CMD, { maxBuffer: 1000 * 1024 }, (err, stdout, stderr) => { + + if (err || stderr) { + reject(err || stderr.toString()); + } else { + + const lines = stdout.toString().split('\n'); + for (const line of lines) { + let matches = PID_CMD.exec(line.trim()); + if (matches && matches.length === 6) { + addToTree(parseInt(matches[1]), parseInt(matches[2]), matches[5], parseFloat(matches[3]), parseFloat(matches[4])); + } + } + + resolve(rootItem); + } + }); + } + }); +} diff --git a/src/vs/base/node/stats.ts b/src/vs/base/node/stats.ts new file mode 100644 index 00000000000..5a802cbd0c2 --- /dev/null +++ b/src/vs/base/node/stats.ts @@ -0,0 +1,152 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { readdirSync, statSync, existsSync, readFileSync } from 'fs'; +import { join } from 'path'; + +export interface WorkspaceStatItem { + name: string; + count: number; +} + +export interface WorkspaceStats { + fileTypes: WorkspaceStatItem[]; + configFiles: WorkspaceStatItem[]; + fileCount: number; + maxFilesReached: boolean; +} + +function asSortedItems(map: Map): WorkspaceStatItem[] { + let a: WorkspaceStatItem[] = []; + map.forEach((value, index) => a.push({ name: index, count: value })); + return a.sort((a, b) => b.count - a.count); +} + +export function collectLaunchConfigs(folder: string): WorkspaceStatItem[] { + let launchConfigs = new Map(); + + let launchConfig = join(folder, '.vscode', 'launch.json'); + if (existsSync(launchConfig)) { + try { + const contents = readFileSync(launchConfig).toString(); + const json = JSON.parse(contents); + if (json['configurations']) { + for (const each of json['configurations']) { + const type = each['type']; + if (type) { + if (launchConfigs.has(type)) { + launchConfigs.set(type, launchConfigs.get(type) + 1); + } + else { + launchConfigs.set(type, 1); + } + } + } + } + } catch { + } + } + return asSortedItems(launchConfigs); +} + +export function collectWorkspaceStats(folder: string, filter: string[]): WorkspaceStats { + const configFilePatterns = [ + { 'tag': 'grunt.js', 'pattern': /^gruntfile\.js$/i }, + { 'tag': 'gulp.js', 'pattern': /^gulpfile\.js$/i }, + { 'tag': 'tsconfig.json', 'pattern': /^tsconfig\.json$/i }, + { 'tag': 'package.json', 'pattern': /^package\.json$/i }, + { 'tag': 'jsconfig.json', 'pattern': /^jsconfig\.json$/i }, + { 'tag': 'tslint.json', 'pattern': /^tslint\.json$/i }, + { 'tag': 'eslint.json', 'pattern': /^eslint\.json$/i }, + { 'tag': 'tasks.json', 'pattern': /^tasks\.json$/i }, + { 'tag': 'launch.json', 'pattern': /^launch\.json$/i }, + { 'tag': 'settings.json', 'pattern': /^settings\.json$/i }, + { 'tag': 'webpack.config.js', 'pattern': /^webpack\.config\.js$/i }, + { 'tag': 'project.json', 'pattern': /^project\.json$/i }, + { 'tag': 'makefile', 'pattern': /^makefile$/i }, + { 'tag': 'sln', 'pattern': /^.+\.sln$/i }, + { 'tag': 'csproj', 'pattern': /^.+\.csproj$/i }, + { 'tag': 'cmake', 'pattern': /^.+\.cmake$/i } + ]; + + let fileTypes = new Map(); + let configFiles = new Map(); + + const MAX_FILES = 20000; + + let walkSync = (dir: string, acceptFile: (fileName: string) => void, filter: string[], token) => { + try { + let files = readdirSync(dir); + for (const file of files) { + if (token.maxReached) { + return; + } + try { + if (statSync(join(dir, file)).isDirectory()) { + if (filter.indexOf(file) === -1) { + walkSync(join(dir, file), acceptFile, filter, token); + } + } + else { + if (token.count >= MAX_FILES) { + token.maxReached = true; + return; + } + token.count++; + acceptFile(file); + } + } catch { + // skip over files for which stat fails + } + } + } catch { + // skip over folders that cannot be read + } + }; + + let addFileType = (fileType: string) => { + if (fileTypes.has(fileType)) { + fileTypes.set(fileType, fileTypes.get(fileType) + 1); + } + else { + fileTypes.set(fileType, 1); + } + }; + + let addConfigFiles = (fileName: string) => { + for (const each of configFilePatterns) { + if (each.pattern.test(fileName)) { + if (configFiles.has(each.tag)) { + configFiles.set(each.tag, configFiles.get(each.tag) + 1); + } else { + configFiles.set(each.tag, 1); + } + } + } + }; + + let acceptFile = (name: string) => { + if (name.lastIndexOf('.') >= 0) { + let suffix: string | undefined = name.split('.').pop(); + if (suffix) { + addFileType(suffix); + } + } + addConfigFiles(name); + }; + + let token: { count: number, maxReached: boolean } = { count: 0, maxReached: false }; + walkSync(folder, acceptFile, filter, token); + + return { + configFiles: asSortedItems(configFiles), + fileTypes: asSortedItems(fileTypes), + fileCount: token.count, + maxFilesReached: token.maxReached + + }; +} \ No newline at end of file diff --git a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts index 773a4b79b4d..914878e5454 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts @@ -171,8 +171,13 @@ export class QuickOpenEntry { return false; } - public isFile(): boolean { - return false; // TODO@Ben debt with editor history merging + /** + * Determines if this quick open entry should merge with the editor history in quick open. If set to true + * and the resource of this entry is the same as the resource for an editor history, it will not show up + * because it is considered to be a duplicate of an editor history. + */ + public mergeWithEditorHistory(): boolean { + return false; } } @@ -412,8 +417,6 @@ class Renderer implements IRenderer { data.actionBar.context = entry; // make sure the context is the current element this.actionProvider.getActions(null, entry).then((actions) => { - // TODO@Ben this will not work anymore as soon as quick open has more actions - // but as long as there is only one are ok if (data.actionBar.isEmpty() && actions && actions.length > 0) { data.actionBar.push(actions, { icon: true, label: false }); } else if (!data.actionBar.isEmpty() && (!actions || actions.length === 0)) { diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts index 0fa4964c675..4804d0c7b46 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts @@ -10,10 +10,10 @@ import { TPromise } from 'vs/base/common/winjs.base'; import platform = require('vs/base/common/platform'); import types = require('vs/base/common/types'); import errors = require('vs/base/common/errors'); -import { IQuickNavigateConfiguration, IAutoFocus, IEntryRunContext, IModel, Mode } from 'vs/base/parts/quickopen/common/quickOpen'; +import { IQuickNavigateConfiguration, IAutoFocus, IEntryRunContext, IModel, Mode, IKeyMods } from 'vs/base/parts/quickopen/common/quickOpen'; import { Filter, Renderer, DataSource, IModelProvider, AccessibilityProvider } from 'vs/base/parts/quickopen/browser/quickOpenViewer'; import { Dimension, Builder, $ } from 'vs/base/browser/builder'; -import { ISelectionEvent, IFocusEvent, ITree, ContextMenuEvent, IActionProvider, ITreeStyles } from 'vs/base/parts/tree/browser/tree'; +import { ISelectionEvent, IFocusEvent, ITree, ContextMenuEvent, IActionProvider, ITreeStyles, ITreeOptions, ITreeConfiguration } from 'vs/base/parts/tree/browser/tree'; import { InputBox, MessageType, IInputBoxStyles, IRange } from 'vs/base/browser/ui/inputbox/inputBox'; import Severity from 'vs/base/common/severity'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; @@ -21,7 +21,7 @@ import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { DefaultController, ClickBehavior } from 'vs/base/parts/tree/browser/treeDefaults'; import DOM = require('vs/base/browser/dom'); -import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; +import { KeyCode } from 'vs/base/common/keyCodes'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { Color } from 'vs/base/common/color'; @@ -43,6 +43,7 @@ export interface IQuickOpenOptions extends IQuickOpenStyles { inputAriaLabel?: string; actionProvider?: IActionProvider; keyboardSupport?: boolean; + treeCreator?: (container: HTMLElement, configuration: ITreeConfiguration, options?: ITreeOptions) => ITree; } export interface IQuickOpenStyles extends IInputBoxStyles, ITreeStyles { @@ -61,10 +62,6 @@ export interface IShowOptions { inputSelection?: IRange; } -export interface IQuickOpenUsageLogger { - publicLog(eventName: string, data?: any): void; -} - export class QuickOpenController extends DefaultController { public onContextMenu(tree: ITree, element: any, event: ContextMenuEvent): boolean { @@ -115,14 +112,13 @@ export class QuickOpenWidget implements IModelProvider { private container: HTMLElement; private treeElement: HTMLElement; private inputElement: HTMLElement; - private usageLogger: IQuickOpenUsageLogger; private layoutDimensions: Dimension; private model: IModel; private inputChangingTimeoutHandle: number; private styles: IQuickOpenStyles; private renderer: Renderer; - constructor(container: HTMLElement, callbacks: IQuickOpenCallbacks, options: IQuickOpenOptions, usageLogger?: IQuickOpenUsageLogger) { + constructor(container: HTMLElement, callbacks: IQuickOpenCallbacks, options: IQuickOpenOptions) { this.isDisposed = false; this.toUnbind = []; this.container = container; @@ -130,7 +126,6 @@ export class QuickOpenWidget implements IModelProvider { this.options = options; this.styles = options || Object.create(null); mixin(this.styles, defaultStyles, false); - this.usageLogger = usageLogger; this.model = null; } @@ -231,7 +226,9 @@ export class QuickOpenWidget implements IModelProvider { this.treeContainer = div.div({ 'class': 'quick-open-tree' }, (div: Builder) => { - this.tree = new Tree(div.getHTMLElement(), { + const createTree = this.options.treeCreator || ((container, config, opts) => new Tree(container, config, opts)); + + this.tree = createTree(div.getHTMLElement(), { dataSource: new DataSource(this), controller: new QuickOpenController({ clickBehavior: ClickBehavior.ON_MOUSE_UP, keyboardSupport: this.options.keyboardSupport }), renderer: (this.renderer = new Renderer(this, this.styles)), @@ -393,7 +390,7 @@ export class QuickOpenWidget implements IModelProvider { }); } - if (this.tree) { + if (this.tree && !this.options.treeCreator) { this.tree.style(this.styles); } @@ -526,31 +523,17 @@ export class QuickOpenWidget implements IModelProvider { hide = this.model.runner.run(value, mode, context); } - // add telemetry when an item is accepted, logging the index of the item in the list and the length of the list - // to measure the rate of the success and the relevance of the order - if (this.usageLogger) { - const indexOfAcceptedElement = this.model.entries.indexOf(value); - const entriesCount = this.model.entries.length; - /* __GDPR__ - "quickOpenWidgetItemAccepted" : { - "index" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "count": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "isQuickNavigate": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.usageLogger.publicLog('quickOpenWidgetItemAccepted', { index: indexOfAcceptedElement, count: entriesCount, isQuickNavigate: this.quickNavigateConfiguration ? true : false }); - } - // Hide if command was run successfully if (hide) { this.hide(HideReason.ELEMENT_SELECTED); } } - private extractKeyMods(event: any): number[] { - const isCtrlCmd = event && (event.ctrlKey || event.metaKey || (event.payload && event.payload.originalEvent && (event.payload.originalEvent.ctrlKey || event.payload.originalEvent.metaKey))); - - return isCtrlCmd ? [KeyMod.CtrlCmd] : []; + private extractKeyMods(event: any): IKeyMods { + return { + ctrlCmd: event && (event.ctrlKey || event.metaKey || (event.payload && event.payload.originalEvent && (event.payload.originalEvent.ctrlKey || event.payload.originalEvent.metaKey))), + alt: event && (event.altKey || (event.payload && event.payload.originalEvent && event.payload.originalEvent.altKey)) + }; } public show(prefix: string, options?: IShowOptions): void; @@ -774,22 +757,6 @@ export class QuickOpenWidget implements IModelProvider { this.builder.hide(); this.builder.domBlur(); - // report failure cases - if (reason === HideReason.CANCELED) { - if (this.model) { - const entriesCount = this.model.entries.filter(e => this.isElementVisible(this.model, e)).length; - if (this.usageLogger) { - /* __GDPR__ - "quickOpenWidgetCancelled" : { - "count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "isQuickNavigate": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.usageLogger.publicLog('quickOpenWidgetCancelled', { count: entriesCount, isQuickNavigate: this.quickNavigateConfiguration ? true : false }); - } - } - } - // Clear input field and clear tree this.inputBox.value = ''; this.tree.setInput(null); @@ -887,10 +854,6 @@ export class QuickOpenWidget implements IModelProvider { return this.tree.getInput(); } - public getTree(): ITree { - return this.tree; - } - public showInputDecoration(decoration: Severity): void { if (this.inputBox) { this.inputBox.showMessage({ type: decoration === Severity.Info ? MessageType.INFO : decoration === Severity.Warning ? MessageType.WARNING : MessageType.ERROR, content: '' }); diff --git a/src/vs/base/parts/quickopen/common/quickOpen.ts b/src/vs/base/parts/quickopen/common/quickOpen.ts index 1efef91896c..70be0054a75 100644 --- a/src/vs/base/parts/quickopen/common/quickOpen.ts +++ b/src/vs/base/parts/quickopen/common/quickOpen.ts @@ -6,11 +6,6 @@ import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; -/* __GDPR__FRAGMENT__ - "IQuickNavigateConfiguration" : { - "keybindings" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } -*/ export interface IQuickNavigateConfiguration { keybindings: ResolvedKeybinding[]; } @@ -54,10 +49,15 @@ export enum Mode { export interface IEntryRunContext { event: any; - keymods: number[]; + keymods: IKeyMods; quickNavigateConfiguration: IQuickNavigateConfiguration; } +export interface IKeyMods { + ctrlCmd: boolean; + alt: boolean; +} + export interface IDataSource { getId(entry: T): string; getLabel(entry: T): string; diff --git a/src/vs/base/parts/quickopen/common/quickOpenScorer.ts b/src/vs/base/parts/quickopen/common/quickOpenScorer.ts index b144e1a8ef1..4d151a7c217 100644 --- a/src/vs/base/parts/quickopen/common/quickOpenScorer.ts +++ b/src/vs/base/parts/quickopen/common/quickOpenScorer.ts @@ -52,20 +52,6 @@ export function score(target: string, query: string, queryLower: string, fuzzy: } } - // When searching fuzzy, we require the query to be contained fully - // in the target string as separate substrings - else { - let targetOffset = 0; - for (let queryIndex = 0; queryIndex < queryLength; queryIndex++) { - targetOffset = targetLower.indexOf(queryLower[queryIndex], targetOffset); - if (targetOffset === -1) { - return NO_SCORE; - } - - targetOffset++; - } - } - const res = doScore(query, queryLower, queryLength, target, targetLower, targetLength); // if (DEBUG) { @@ -81,7 +67,8 @@ function doScore(query: string, queryLower: string, queryLength: number, target: const matches = []; // - // Build Scorer Matrix + // Build Scorer Matrix: + // // The matrix is composed of query q and target t. For each index we score // q[i] with t[i] and compare that with the previous score. If the score is // equal or larger, we keep the match. In addition to the score, we also keep @@ -105,7 +92,17 @@ function doScore(query: string, queryLower: string, queryLength: number, target: const matchesSequenceLength = queryIndex > 0 && targetIndex > 0 ? matches[diagIndex] : 0; - const score = computeCharScore(query, queryLower, queryIndex, target, targetLower, targetIndex, matchesSequenceLength); + // If we are not matching on the first query character any more, we only produce a + // score if we had a score previously for the last query index (by looking at the diagScore). + // This makes sure that the query always matches in sequence on the target. For example + // given a target of "ede" and a query of "de", we would otherwise produce a wrong high score + // for query[1] ("e") matching on target[0] ("e") because of the "beginning of word" boost. + let score: number; + if (!diagScore && queryIndex > 0) { + score = 0; + } else { + score = computeCharScore(query, queryLower, queryIndex, target, targetLower, targetIndex, matchesSequenceLength); + } // We have a score and its equal or larger than the left score // Match: sequence continues growing from previous diag value @@ -145,7 +142,7 @@ function doScore(query: string, queryLower: string, queryLength: number, target: // Print matrix // if (DEBUG_MATRIX) { - // printMatrix(query, target, matches, scores); + // printMatrix(query, target, matches, scores); // } return [scores[queryLength * targetLength - 1], positions.reverse()]; diff --git a/src/vs/base/parts/quickopen/test/common/quickOpenScorer.test.ts b/src/vs/base/parts/quickopen/test/common/quickOpenScorer.test.ts index cc33d36270c..29e70e70ca1 100644 --- a/src/vs/base/parts/quickopen/test/common/quickOpenScorer.test.ts +++ b/src/vs/base/parts/quickopen/test/common/quickOpenScorer.test.ts @@ -244,6 +244,43 @@ suite('Quick Open Scorer', () => { assert.ok(!res.score); }); + test('scoreItem - proper target offset #2', function () { + const resource = URI.file('ede'); + + const res = scoreItem(resource, 'de', true, ResourceAccessor, cache); + + assert.equal(res.labelMatch.length, 1); + assert.equal(res.labelMatch[0].start, 1); + assert.equal(res.labelMatch[0].end, 3); + }); + + test('scoreItem - proper target offset #3', function () { + const resource = URI.file('/src/vs/editor/browser/viewParts/lineNumbers/flipped-cursor-2x.svg'); + + const res = scoreItem(resource, 'debug', true, ResourceAccessor, cache); + + assert.equal(res.descriptionMatch.length, 3); + assert.equal(res.descriptionMatch[0].start, 9); + assert.equal(res.descriptionMatch[0].end, 10); + assert.equal(res.descriptionMatch[1].start, 36); + assert.equal(res.descriptionMatch[1].end, 37); + assert.equal(res.descriptionMatch[2].start, 40); + assert.equal(res.descriptionMatch[2].end, 41); + + assert.equal(res.labelMatch.length, 2); + assert.equal(res.labelMatch[0].start, 9); + assert.equal(res.labelMatch[0].end, 10); + assert.equal(res.labelMatch[1].start, 20); + assert.equal(res.labelMatch[1].end, 21); + }); + + test('scoreItem - no match unless query contained in sequence', function () { + const resource = URI.file('abcde'); + + const res = scoreItem(resource, 'edcda', true, ResourceAccessor, cache); + assert.ok(!res.score); + }); + test('compareItemsByScore - identity', function () { const resourceA = URI.file('/some/path/fileA.txt'); const resourceB = URI.file('/some/path/other/fileB.txt'); diff --git a/src/vs/base/parts/tree/browser/treeDnd.ts b/src/vs/base/parts/tree/browser/treeDnd.ts index abae2bcfd18..7b2fa8c4b1a 100644 --- a/src/vs/base/parts/tree/browser/treeDnd.ts +++ b/src/vs/base/parts/tree/browser/treeDnd.ts @@ -10,6 +10,7 @@ import { DefaultDragAndDrop } from 'vs/base/parts/tree/browser/treeDefaults'; import URI from 'vs/base/common/uri'; import { basename } from 'vs/base/common/paths'; import { getPathLabel } from 'vs/base/common/labels'; +import { DataTransfers } from 'vs/base/browser/dnd'; export class ElementsDragAndDropData implements _.IDragAndDropData { @@ -116,7 +117,7 @@ export class SimpleFileResourceDragAndDrop extends DefaultDragAndDrop { // Apply some datatransfer types to allow for dragging the element outside of the application const resource = this.toResource(source); if (resource) { - originalEvent.dataTransfer.setData('text/plain', getPathLabel(resource)); + originalEvent.dataTransfer.setData(DataTransfers.TEXT, getPathLabel(resource)); } } } \ No newline at end of file diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 76b81d40038..041c4285a43 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -23,6 +23,8 @@ import { HeightMap, IViewItem } from 'vs/base/parts/tree/browser/treeViewModel'; import _ = require('vs/base/parts/tree/browser/tree'); import { KeyCode } from 'vs/base/common/keyCodes'; import Event, { Emitter } from 'vs/base/common/event'; +import { IDomNodePagePosition } from 'vs/base/browser/dom'; +import { DataTransfers } from 'vs/base/browser/dnd'; export interface IRow { element: HTMLElement; @@ -378,7 +380,6 @@ export class TreeView extends HeightMap { private styleElement: HTMLStyleElement; private rowsContainer: HTMLElement; private scrollableElement: ScrollableElement; - private wrapperGesture: Touch.Gesture; private msGesture: MSGesture; private lastPointerType: string; private lastClickTimeStamp: number = 0; @@ -475,7 +476,7 @@ export class TreeView extends HeightMap { this.wrapper.style.msTouchAction = 'none'; this.wrapper.style.msContentZooming = 'none'; } else { - this.wrapperGesture = new Touch.Gesture(this.wrapper); + Touch.Gesture.addTarget(this.wrapper); } this.rowsContainer = document.createElement('div'); @@ -1221,13 +1222,16 @@ export class TreeView extends HeightMap { var keyboardEvent = new Keyboard.StandardKeyboardEvent(event); element = this.model.getFocus(); - if (!element) { - return; - } + var position: IDomNodePagePosition; - var id = this.context.dataSource.getId(this.context.tree, element); - var viewItem = this.items[id]; - var position = DOM.getDomNodePagePosition(viewItem.element); + if (!element) { + element = this.model.getInput(); + position = DOM.getDomNodePagePosition(this.inputItem.element); + } else { + var id = this.context.dataSource.getId(this.context.tree, element); + var viewItem = this.items[id]; + position = DOM.getDomNodePagePosition(viewItem.element); + } resultEvent = new _.KeyboardContextMenuEvent(position.left + position.width, position.top, keyboardEvent); @@ -1288,7 +1292,7 @@ export class TreeView extends HeightMap { } e.dataTransfer.effectAllowed = 'copyMove'; - e.dataTransfer.setData('URL', item.uri); + e.dataTransfer.setData(DataTransfers.URL, item.uri); if (e.dataTransfer.setDragImage) { let label: string; @@ -1642,11 +1646,6 @@ export class TreeView extends HeightMap { } this.domNode = null; - if (this.wrapperGesture) { - this.wrapperGesture.dispose(); - this.wrapperGesture = null; - } - if (this.context.cache) { this.context.cache.dispose(); this.context.cache = null; diff --git a/src/vs/base/test/browser/builder.test.ts b/src/vs/base/test/browser/builder.test.ts index 76d1221c780..717b5a37ccf 100644 --- a/src/vs/base/test/browser/builder.test.ts +++ b/src/vs/base/test/browser/builder.test.ts @@ -5,7 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { Build, Builder, MultiBuilder, Binding, Dimension, Position, Box, $ } from 'vs/base/browser/builder'; +import { Build, Builder, MultiBuilder, $, bindElement, withElement, setPropertyOnElement, getPropertyFromElement } from 'vs/base/browser/builder'; import * as Types from 'vs/base/common/types'; import * as DomUtils from 'vs/base/browser/dom'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -30,6 +30,17 @@ let withBuilder = function (builder: Builder, offdom: boolean) { return new Builder(builder.getHTMLElement(), offdom); }; +function select(builder: Builder, selector: string, offdom?: boolean): MultiBuilder { + let elements = builder.getHTMLElement().querySelectorAll(selector); + + let builders: Builder[] = []; + for (let i = 0; i < elements.length; i++) { + builders.push(withElement(elements.item(i), offdom)); + } + + return new MultiBuilder(builders); +} + suite('Builder', () => { let fixture: HTMLElement; let fixtureId = 'builder-fixture'; @@ -44,19 +55,6 @@ suite('Builder', () => { document.body.removeChild(fixture); }); - test('Dimension.substract()', function () { - let d1 = new Dimension(200, 100); - let d2 = new Box(10, 20, 30, 40); - - assert.deepEqual(d1.substract(d2), new Dimension(140, 60)); - }); - - test('Position', function () { - let p = new Position(200, 100); - assert.strictEqual(p.x, 200); - assert.strictEqual(p.y, 100); - }); - test('Binding', function () { let b = Build.withElementById(fixtureId, false); let element = b.getHTMLElement(); @@ -64,34 +62,17 @@ suite('Builder', () => { assert(element); // Properties - Binding.setPropertyOnElement(element, 'foo', 'bar'); - assert.strictEqual(Binding.getPropertyFromElement(element, 'foo'), 'bar'); + setPropertyOnElement(element, 'foo', 'bar'); + assert.strictEqual(getPropertyFromElement(element, 'foo'), 'bar'); - Binding.setPropertyOnElement(element, 'foo', { foo: 'bar' }); - assert.deepEqual(Binding.getPropertyFromElement(element, 'foo'), { foo: 'bar' }); + setPropertyOnElement(element, 'foo', { foo: 'bar' }); + assert.deepEqual(getPropertyFromElement(element, 'foo'), { foo: 'bar' }); - Binding.removePropertyFromElement(element, 'foo'); + setPropertyOnElement(element, 'bar', 'bar'); + assert.strictEqual(getPropertyFromElement(element, 'bar'), 'bar'); - Binding.setPropertyOnElement(element, 'bar', 'bar'); - assert.strictEqual(Binding.getPropertyFromElement(element, 'bar'), 'bar'); - - Binding.setPropertyOnElement(element, 'bar', { foo: 'bar' }); - assert.deepEqual(Binding.getPropertyFromElement(element, 'bar'), { foo: 'bar' }); - - Binding.removePropertyFromElement(element, 'bar'); - - assert(!Binding.getPropertyFromElement(element, 'foo')); - assert(!Binding.getPropertyFromElement(element, 'bar')); - - // Binding - Binding.bindElement(element, 'bar'); - assert.strictEqual(Binding.getBindingFromElement(element), 'bar'); - - Binding.bindElement(element, { foo: 'bar' }); - assert.deepEqual(Binding.getBindingFromElement(element), { foo: 'bar' }); - - Binding.unbindElement(element); - assert(!Binding.getBindingFromElement(element)); + setPropertyOnElement(element, 'bar', { foo: 'bar' }); + assert.deepEqual(getPropertyFromElement(element, 'bar'), { foo: 'bar' }); }); test('Select', function () { @@ -103,7 +84,6 @@ suite('Builder', () => { assert(allDivs); assert(allDivs.length >= 1); assert(Types.isFunction(allDivs.push)); - assert(Types.isFunction(allDivs.pop)); assert(allDivs instanceof MultiBuilder); for (let key in b) { @@ -117,7 +97,6 @@ suite('Builder', () => { assert(noElement); assert(noElement.length === 0); assert(Types.isFunction(noElement.push)); - assert(Types.isFunction(noElement.pop)); assert(noElement instanceof MultiBuilder); for (let key in b) { @@ -267,7 +246,7 @@ suite('Builder', () => { b.build(Build.withElementById(fixtureId), 0); b = Build.withElementById(fixtureId); - let divs = b.select('div'); + let divs = select(b, 'div'); assert.strictEqual(divs.length, 4); let ids = divs.attr('id'); @@ -282,7 +261,7 @@ suite('Builder', () => { b.build(Build.withElementById(fixtureId), 2); b = Build.withElementById(fixtureId); - divs = b.select('div'); + divs = select(b, 'div'); assert.strictEqual(divs.length, 5); ids = divs.attr('id'); @@ -304,8 +283,6 @@ suite('Builder', () => { divBuilder.span({ innerHtml: 'see man' }); - - assert.strictEqual(divBuilder.parent().attr('id'), 'foobar'); }); test('Builder.clone()', function () { @@ -337,10 +314,8 @@ suite('Builder', () => { div.span(); }); - let multiBuilder = Build.withElementById(fixtureId).select('div'); + let multiBuilder = select(Build.withElementById(fixtureId), 'div'); assert(multiBuilder.length === 3); - - assert(multiBuilder.select('span').length === 3); }); test('Builder.p() and other elements', function () { @@ -381,8 +356,8 @@ suite('Builder', () => { assert.strictEqual('p', div.getHTMLElement().nodeName.toLowerCase()); }); - assert.strictEqual(Build.withElementById(fixtureId).select('div').length, 1); - assert.strictEqual(Build.withElementById(fixtureId).select('*').length, 7); + assert.strictEqual(select(Build.withElementById(fixtureId), 'div').length, 1); + assert.strictEqual(select(Build.withElementById(fixtureId), '*').length, 7); assert.strictEqual(Build.withElementById('builderspan').getHTMLElement().innerHTML, 'Foo Bar'); assert.strictEqual(Build.withElementById('builderimg').attr('src'), '#'); @@ -390,7 +365,6 @@ suite('Builder', () => { // Assert HTML through DOM let root = document.getElementById(fixtureId); - assert.strictEqual(b.parent().getHTMLElement(), root); assert.strictEqual(root.childNodes.length, 1); let div = root.childNodes[0]; @@ -453,8 +427,8 @@ suite('Builder', () => { }); }); - assert.strictEqual(Build.withElementById(fixtureId).select('div').length, 1); - assert.strictEqual(Build.withElementById(fixtureId).select('*').length, 7); + assert.strictEqual(select(Build.withElementById(fixtureId), 'div').length, 1); + assert.strictEqual(select(Build.withElementById(fixtureId), '*').length, 7); assert.strictEqual(Build.withElementById('builderspan').getHTMLElement().innerHTML, 'Foo Bar'); assert.strictEqual(Build.withElementById('builderimg').attr('src'), '#'); @@ -550,36 +524,21 @@ suite('Builder', () => { b.div(); b.id('foobar'); - b.src('foobar'); - b.href('foobar'); b.title('foobar'); - b.name('foobar'); b.type('foobar'); b.value('foobar'); - b.alt('foobar'); - b.draggable(true); b.tabindex(0); assert.strictEqual(b.attr('id'), 'foobar'); - assert.strictEqual(b.attr('src'), 'foobar'); - assert.strictEqual(b.attr('href'), 'foobar'); assert.strictEqual(b.attr('title'), 'foobar'); - assert.strictEqual(b.attr('name'), 'foobar'); assert.strictEqual(b.attr('type'), 'foobar'); assert.strictEqual(b.attr('value'), 'foobar'); - assert.strictEqual(b.attr('alt'), 'foobar'); - assert.strictEqual(b.attr('draggable'), 'true'); assert.strictEqual(b.attr('tabindex'), '0'); assert.strictEqual(b.getHTMLElement().getAttribute('id'), 'foobar'); - assert.strictEqual(b.getHTMLElement().getAttribute('src'), 'foobar'); - assert.strictEqual(b.getHTMLElement().getAttribute('href'), 'foobar'); assert.strictEqual(b.getHTMLElement().getAttribute('title'), 'foobar'); - assert.strictEqual(b.getHTMLElement().getAttribute('name'), 'foobar'); assert.strictEqual(b.getHTMLElement().getAttribute('type'), 'foobar'); assert.strictEqual(b.getHTMLElement().getAttribute('value'), 'foobar'); - assert.strictEqual(b.getHTMLElement().getAttribute('alt'), 'foobar'); - assert.strictEqual(b.getHTMLElement().getAttribute('draggable'), 'true'); assert.strictEqual(b.getHTMLElement().getAttribute('tabindex'), '0'); }); @@ -612,35 +571,6 @@ suite('Builder', () => { assert(!b.hasClass('barfoo')); assert(!b.hasClass('foobar')); assert(!b.getHTMLElement().className); - - b.addClass('foobar'); - b.swapClass('foobar', 'barfoo'); - assert(b.hasClass('barfoo')); - b.swapClass('foobar', 'barfoo'); - assert(b.hasClass('foobar')); - - b.toggleClass('foobar'); - assert(!b.hasClass('foobar')); - - b.toggleClass('barfoo'); - assert(b.hasClass('barfoo')); - - b.setClass('helloworld'); - assert(!b.hasClass('barfoo')); - assert(b.hasClass('helloworld')); - b.setClass(''); - assert(!b.hasClass('helloworld')); - }); - - test('Builder.color() and .background()', function () { - let b = Build.withElementById(fixtureId); - b.div(); - - b.color('red').background('blue'); - - assert.strictEqual(b.style('color'), 'red'); - assert.strictEqual(b.style('background-color'), 'blue'); - assert(b.getComputedStyle()); }); test('Builder.padding() and .margin()', function () { @@ -692,45 +622,6 @@ suite('Builder', () => { assert.strictEqual(b.style('maxHeight'), '600px'); }); - test('Builder.float() and .clear()', function () { - let b = Build.withElementById(fixtureId); - b.div(); - - b.float('left'); - b.clear('right'); - - assert.strictEqual(b.style('float'), 'left'); - assert.strictEqual(b.style('clear'), 'right'); - }); - - test('Builder.normal(), .italic(), .bold() and underline()', function () { - let b = Build.withElementById(fixtureId); - b.div(); - - b.italic().underline().bold(); - - assert(b.style('font-weight') === 'bold' || b.style('font-weight') === '700'); // For Opera - assert.strictEqual(b.style('text-decoration'), 'underline'); - assert.strictEqual(b.style('font-style'), 'italic'); - - b.normal(); - - assert(b.style('font-weight') === 'normal' || b.style('font-weight') === '400'); // For Opera - assert(b.style('text-decoration') === 'none' || b.style('text-decoration') === 'initial'); - assert.strictEqual(b.style('font-style'), 'normal'); - }); - - test('Builder.display() and .overflow()', function () { - let b = Build.withElementById(fixtureId); - b.div(); - - b.display('inline'); - b.overflow('hidden'); - - assert.strictEqual(b.style('display'), 'inline'); - assert.strictEqual(b.style('overflow'), 'hidden'); - }); - test('Builder.show() and .hide()', function () { let b = Build.withElementById(fixtureId); b.div(); @@ -810,17 +701,6 @@ suite('Builder', () => { assert.strictEqual(b.style('border-left-style'), 'dashed'); }); - test('Builder.textAlign() and .verticalAlign()', function () { - let b = Build.withElementById(fixtureId); - b.div(); - - b.textAlign('center'); - b.verticalAlign('top'); - - assert.strictEqual(b.style('textAlign'), 'center'); - assert.strictEqual(b.style('verticalAlign'), 'top'); - }); - test('Builder.innerHtml()', function () { let b = Build.withElementById(fixtureId); b.div(); @@ -843,30 +723,6 @@ suite('Builder', () => { assert.strictEqual(b.getHTMLElement().innerHTML, 'Foo Bar'); }); - test('Builder.parent(), .children(), .removeChild() and isEmpty()', function () { - let b = Build.withElementById(fixtureId); - b.empty(); - - assert(b.isEmpty()); - assert.strictEqual(b.parent().getHTMLElement(), b.getHTMLElement().parentNode); - assert(b.children().length === 0); - - let divB; - b.div(function (div: Builder) { - divB = div.clone(); - div.span(); - }); - b.span(); - - b = Build.withElementById(fixtureId); - assert(!b.isEmpty()); - assert.strictEqual(b.parent().getHTMLElement(), b.getHTMLElement().parentNode); - assert.equal(b.children().length, 2); - - b.removeChild(divB); - assert.equal(b.children().length, 1); - }); - test('Build Client Area', function () { // Global @@ -881,49 +737,6 @@ suite('Builder', () => { // assert(dimensions.height >= 0); }); - // test('Builder.select() and .matches()', function () { - // let b = Build.withElementById(fixtureId); - - // assert(b.matches('#' + fixtureId)); - - // let divs = withElementsBySelector('div'); - // for (let i = 0; i < divs.length; i++) { - // assert (divs.item(i).matches('div')); - // } - - // assert(b.select('div').length === 0); - - // b.clone().div(); - - // assert(b.select('div').length === 1); - // }); - - test('Builder.select() and .matches()', function () { - let b = Build.withElementById(fixtureId); - - assert(b.getTotalSize()); - assert(b.getContentSize()); - }); - - test('Builder.preventDefault()', function () { - let b = Build.withElementById(fixtureId); - b.element('input', { - type: 'button' - }); - - b.preventDefault(DomUtils.EventType.CLICK, true); - - b.once(DomUtils.EventType.CLICK, function (e) { - if (e.defaultPrevented) { - assert.strictEqual(e.defaultPrevented, true); - } else if (e.cancelBubble) { - assert.strictEqual(e.cancelBubble, true); - } - }); - - b.domClick(); - }); - test('Builder.once()', function () { let b = Build.withElementById(fixtureId); b.element('input', { @@ -936,8 +749,8 @@ suite('Builder', () => { assert(counter <= 1); }); - b.domClick(); - b.domClick(); + b.getHTMLElement().click(); + b.getHTMLElement().click(); }); test('Builder.once() with capture', function () { @@ -952,8 +765,8 @@ suite('Builder', () => { assert(counter <= 1); }, null, true); - b.domClick(); - b.domClick(); + b.getHTMLElement().click(); + b.getHTMLElement().click(); }); test('Builder.on() and .off()', function () { @@ -970,12 +783,12 @@ suite('Builder', () => { assert(listeners.length === 1); - b.domClick(); + b.getHTMLElement().click(); b.off(DomUtils.EventType.BLUR); - b.domClick(); + b.getHTMLElement().click(); b.off(DomUtils.EventType.CLICK); - b.domClick(); - b.domClick(); + b.getHTMLElement().click(); + b.getHTMLElement().click(); assert.equal(counter, 2); }); @@ -994,16 +807,16 @@ suite('Builder', () => { assert(listeners.length === 1); - b.domClick(); + b.getHTMLElement().click(); b.off(DomUtils.EventType.BLUR); - b.domClick(); + b.getHTMLElement().click(); b.off(DomUtils.EventType.BLUR, true); - b.domClick(); + b.getHTMLElement().click(); b.off(DomUtils.EventType.CLICK); - b.domClick(); + b.getHTMLElement().click(); b.off(DomUtils.EventType.CLICK, true); - b.domClick(); - b.domClick(); + b.getHTMLElement().click(); + b.getHTMLElement().click(); assert(counter === 4); }); @@ -1021,7 +834,7 @@ suite('Builder', () => { let counter7 = 0; b.div(function (div: Builder) { - div.bind('Foo Bar'); + bindElement(div.getHTMLElement(), 'Foo Bar'); div.setProperty('Foo', 'Bar'); bindings.push(div.clone()); @@ -1034,7 +847,7 @@ suite('Builder', () => { inputs.push(div.clone()); div.p(function (p: Builder) { - p.bind('Foo Bar'); + bindElement(p.getHTMLElement(), 'Foo Bar'); p.setProperty('Foo', 'Bar'); bindings.push(p.clone()); @@ -1047,7 +860,7 @@ suite('Builder', () => { inputs.push(p.clone()); p.ul(function (ul: Builder) { - ul.bind('Foo Bar'); + bindElement(ul.getHTMLElement(), 'Foo Bar'); ul.setProperty('Foo', 'Bar'); bindings.push(ul.clone()); @@ -1060,7 +873,7 @@ suite('Builder', () => { inputs.push(ul.clone()); ul.li(function (li: Builder) { - li.bind('Foo Bar'); + bindElement(li.getHTMLElement(), 'Foo Bar'); li.setProperty('Foo', 'Bar'); bindings.push(li.clone()); @@ -1076,7 +889,7 @@ suite('Builder', () => { id: 'builderspan', innerHtml: 'Foo Bar' }, function (span) { - span.bind('Foo Bar'); + bindElement(span.getHTMLElement(), 'Foo Bar'); span.setProperty('Foo', 'Bar'); bindings.push(span.clone()); @@ -1093,7 +906,7 @@ suite('Builder', () => { id: 'builderimg', src: '#' }, function (img) { - img.bind('Foo Bar'); + bindElement(img.getHTMLElement(), 'Foo Bar'); img.setProperty('Foo', 'Bar'); bindings.push(img.clone()); @@ -1111,7 +924,7 @@ suite('Builder', () => { href: '#', innerHtml: 'Link' }, function (a) { - a.bind('Foo Bar'); + bindElement(a.getHTMLElement(), 'Foo Bar'); a.setProperty('Foo', 'Bar'); bindings.push(a.clone()); @@ -1129,23 +942,21 @@ suite('Builder', () => { }); inputs.forEach(function (input) { - input.domClick(); + input.getHTMLElement().click(); }); for (let i = 0; i < bindings.length; i++) { - assert(bindings[i].getBinding()); assert(bindings[i].getProperty('Foo')); } Build.withElementById(fixtureId).empty(); - assert(Build.withElementById(fixtureId).select('*').length === 0); + assert(select(Build.withElementById(fixtureId), '*').length === 0); inputs.forEach(function (input) { - input.domClick(); + input.getHTMLElement().click(); }); for (let i = 0; i < bindings.length; i++) { - assert(!bindings[i].getBinding()); assert(!bindings[i].getProperty('Foo')); } @@ -1208,7 +1019,7 @@ suite('Builder', () => { let counter7 = 0; b.div(function (div: Builder) { - div.bind('Foo Bar'); + bindElement(div.getHTMLElement(), 'Foo Bar'); div.setProperty('Foo', 'Bar'); bindings.push(div.clone()); @@ -1221,7 +1032,7 @@ suite('Builder', () => { inputs.push(div.clone()); div.p(function (p: Builder) { - p.bind('Foo Bar'); + bindElement(p.getHTMLElement(), 'Foo Bar'); p.setProperty('Foo', 'Bar'); bindings.push(p.clone()); @@ -1234,7 +1045,7 @@ suite('Builder', () => { inputs.push(p.clone()); p.ul(function (ul: Builder) { - ul.bind('Foo Bar'); + bindElement(ul.getHTMLElement(), 'Foo Bar'); ul.setProperty('Foo', 'Bar'); bindings.push(ul.clone()); @@ -1247,7 +1058,7 @@ suite('Builder', () => { inputs.push(ul.clone()); ul.li(function (li: Builder) { - li.bind('Foo Bar'); + bindElement(li.getHTMLElement(), 'Foo Bar'); li.setProperty('Foo', 'Bar'); bindings.push(li.clone()); @@ -1263,7 +1074,7 @@ suite('Builder', () => { id: 'builderspan', innerHtml: 'Foo Bar' }, function (span) { - span.bind('Foo Bar'); + bindElement(span.getHTMLElement(), 'Foo Bar'); span.setProperty('Foo', 'Bar'); bindings.push(span.clone()); @@ -1280,7 +1091,7 @@ suite('Builder', () => { id: 'builderimg', src: '#' }, function (img) { - img.bind('Foo Bar'); + bindElement(img.getHTMLElement(), 'Foo Bar'); img.setProperty('Foo', 'Bar'); bindings.push(img.clone()); @@ -1298,7 +1109,7 @@ suite('Builder', () => { href: '#', innerHtml: 'Link' }, function (a) { - a.bind('Foo Bar'); + bindElement(a.getHTMLElement(), 'Foo Bar'); a.setProperty('Foo', 'Bar'); bindings.push(a.clone()); @@ -1316,23 +1127,21 @@ suite('Builder', () => { }); inputs.forEach(function (input) { - input.domClick(); + input.getHTMLElement().click(); }); for (let i = 0; i < bindings.length; i++) { - assert(bindings[i].getBinding()); assert(bindings[i].getProperty('Foo')); } - Build.withElementById(fixtureId).select('div').destroy(); - assert(Build.withElementById(fixtureId).select('*').length === 0); + select(Build.withElementById(fixtureId), 'div').destroy(); + assert(select(Build.withElementById(fixtureId), '*').length === 0); inputs.forEach(function (input) { - input.domClick(); + input.getHTMLElement().click(); }); for (let i = 0; i < bindings.length; i++) { - assert(!bindings[i].getBinding()); assert(!bindings[i].getProperty('Foo')); } @@ -1383,92 +1192,6 @@ suite('Builder', () => { } }); - test('Builder.empty() MultiBuilder', function () { - let b = Build.withElementById(fixtureId); - let inputs: Builder[] = []; - - let firstCounter = 0; - b.div(function (div: Builder) { - div.element('input', { - type: 'button' - }).on(DomUtils.EventType.CLICK, function () { - firstCounter++; - }); - - inputs.push(div.clone()); - }); - - let secondCounter = 0; - b.div(function (div: Builder) { - div.element('input', { - type: 'button' - }).on(DomUtils.EventType.CLICK, function () { - secondCounter++; - }); - - inputs.push(div.clone()); - }); - - let thirdCounter = 0; - b.div(function (div: Builder) { - div.element('input', { - type: 'button' - }).on(DomUtils.EventType.CLICK, function () { - thirdCounter++; - }); - - inputs.push(div.clone()); - }); - - Build.withElementById(fixtureId).select('div > input').domClick(); - - Build.withElementById(fixtureId).select('div').empty(); - - inputs.forEach(function (input) { - input.domClick(); - }); - - assert.equal(firstCounter, 1); - assert.equal(secondCounter, 1); - assert.equal(thirdCounter, 1); - }); - - test('Builder .domFocus(), .domBlur(), .hasFocus()', function () { - let b = Build.withElementById(fixtureId); - - b.element('input', { type: 'text' }); - assert(!b.hasFocus()); - b.domFocus().domSelect(); - assert(b.hasFocus()); - b.domBlur(); - assert(!b.hasFocus()); - }); - - test('Builder misc', function () { - let b = Build.withElementById(fixtureId); - b.div(); - - b.on([DomUtils.EventType.CLICK, DomUtils.EventType.MOUSE_DOWN, DomUtils.EventType.MOUSE_UP], function (e, b) { - }); - b.off([DomUtils.EventType.CLICK, DomUtils.EventType.MOUSE_DOWN, DomUtils.EventType.MOUSE_UP]); - - b.once([DomUtils.EventType.CLICK, DomUtils.EventType.MOUSE_DOWN, DomUtils.EventType.MOUSE_UP], function (e, b) { - }); - b.off([DomUtils.EventType.CLICK, DomUtils.EventType.MOUSE_DOWN, DomUtils.EventType.MOUSE_UP]); - - b.preventDefault(DomUtils.EventType.CLICK, true); - - b.bind('foo'); - assert.strictEqual(b.getBinding(), 'foo'); - b.unbind(); - assert(!b.getBinding()); - - b.setProperty('foo', 'bar'); - assert.strictEqual(b.getProperty('foo'), 'bar'); - b.removeProperty('foo'); - assert(!b.getProperty('foo')); - }); - test('Builder.offDOM()', function () { let b = Build.withElementById(fixtureId); b.div({ id: '1' }); @@ -1630,4 +1353,4 @@ suite('Builder', () => { assert.equal((obj.firstChild).tagName.toLowerCase(), 'span'); assert.equal((obj.firstChild).className, 'core'); }); -}); \ No newline at end of file +}); diff --git a/src/vs/base/test/common/color.test.ts b/src/vs/base/test/common/color.test.ts index 7ccee7a4d51..359bc6c398e 100644 --- a/src/vs/base/test/common/color.test.ts +++ b/src/vs/base/test/common/color.test.ts @@ -153,6 +153,7 @@ suite('Color', () => { assert.deepEqual(HSVA.toRGBA(new HSVA(300, 1, 0.502, 1)), new RGBA(128, 0, 128, 1)); assert.deepEqual(HSVA.toRGBA(new HSVA(180, 1, 0.502, 1)), new RGBA(0, 128, 128, 1)); assert.deepEqual(HSVA.toRGBA(new HSVA(240, 1, 0.502, 1)), new RGBA(0, 0, 128, 1)); + }); test('HSVA.fromRGBA', () => { @@ -185,6 +186,11 @@ suite('Color', () => { assert.deepEqual(new Color(new HSVA(10, 0, 0, 0)).rgba, new Color(new HSVA(20, 0, 0, 0)).rgba); assert.notDeepEqual(new Color(new HSVA(10, 0, 0, 0)).hsva, new Color(new HSVA(20, 0, 0, 0)).hsva); }); + + test('bug#36240', () => { + assert.deepEqual(HSVA.fromRGBA(new RGBA(92, 106, 196, 1)), new HSVA(232, .531, .769, 1)); + assert.deepEqual(HSVA.toRGBA(HSVA.fromRGBA(new RGBA(92, 106, 196, 1))), new RGBA(92, 106, 196, 1)); + }); }); suite('Format', () => { diff --git a/src/vs/base/test/common/filters.perf.test.ts b/src/vs/base/test/common/filters.perf.test.ts index 82df853e427..28ee9b43626 100644 --- a/src/vs/base/test/common/filters.perf.test.ts +++ b/src/vs/base/test/common/filters.perf.test.ts @@ -19,7 +19,7 @@ function perfSuite(name: string, callback: (this: Mocha.ISuiteCallbackContext) = perfSuite('Performance - fuzzyMatch', function () { - console.log(`Matching ${data.length} items against ${patterns.length} patterns...`); + console.log(`Matching ${data.length} items against ${patterns.length} patterns (${data.length * patterns.length} operations) `); function perfTest(name: string, match: (pattern: string, word: string) => any) { test(name, function () { @@ -32,12 +32,15 @@ perfSuite('Performance - fuzzyMatch', function () { match(pattern, item); } } - console.log(name, Date.now() - t1, `${(count / (Date.now() - t1)).toPrecision(6)}/ms`); + const d = Date.now() - t1; + console.log(name, `${d}ms, ${Math.round(count / d) * 15}ops/15ms`); }); } perfTest('matchesFuzzy', filters.matchesFuzzy); perfTest('fuzzyContiguousFilter', filters.fuzzyContiguousFilter); perfTest('fuzzyScore', filters.fuzzyScore); + perfTest('fuzzyScoreGraceful', filters.fuzzyScoreGraceful); + perfTest('fuzzyScoreGracefulAggressive', filters.fuzzyScoreGracefulAggressive); }); diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index 6aea42f4915..a6fe1a58b1a 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -5,7 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { IFilter, or, matchesPrefix, matchesStrictPrefix, matchesCamelCase, matchesSubString, matchesContiguousSubString, matchesWords, fuzzyScore, nextTypoPermutation, IMatch } from 'vs/base/common/filters'; +import { IFilter, or, matchesPrefix, matchesStrictPrefix, matchesCamelCase, matchesSubString, matchesContiguousSubString, matchesWords, fuzzyScore, IMatch, fuzzyScoreGraceful, fuzzyScoreGracefulAggressive } from 'vs/base/common/filters'; function filterOk(filter: IFilter, word: string, wordToMatchAgainst: string, highlights?: { start: number; end: number; }[]) { let r = filter(word, wordToMatchAgainst); @@ -423,19 +423,21 @@ suite('Filters', () => { assertTopScore(fuzzyScore, '_lineS', 0, '_lineS', '_lines'); }); - test('nextTypoPermutation', function () { + test('HTML closing tag proposal filtered out #38880', function () { + assertMatches('\t\t<', '\t\t', '^\t^\t^', (pattern, word) => fuzzyScore(pattern, word, 0)); + assertMatches('\t\t<', '\t\t', '\t\t^', (pattern, word) => fuzzyScore(pattern, word, 3)); + assertMatches('\t<', '\t', '\t^', (pattern, word) => fuzzyScore(pattern, word, 2)); + }); - function assertTypos(pattern: string, ...variants: string[]) { - let pos = 1; - for (const expected of variants) { - const actual = nextTypoPermutation(pattern, pos); - assert.equal(actual, expected); - pos += 1; - } - assert.equal(nextTypoPermutation(pattern, pos), undefined); - } + test('fuzzyScoreGraceful', function () { - assertTypos('abc', 'acb'); - assertTypos('foboar', 'fbooar', 'foobar', 'fobaor', 'fobora'); + assertMatches('rlut', 'result', undefined, fuzzyScore); + assertMatches('rlut', 'result', '^res^u^l^t', fuzzyScoreGraceful); + + assertMatches('cno', 'console', '^co^ns^ole', fuzzyScore); + assertMatches('cno', 'console', '^co^ns^ole', fuzzyScoreGraceful); + assertMatches('cno', 'console', '^c^o^nsole', fuzzyScoreGracefulAggressive); + assertMatches('cno', 'co_new', '^c^o_^new', fuzzyScoreGraceful); + assertMatches('cno', 'co_new', '^c^o_^new', fuzzyScoreGracefulAggressive); }); }); diff --git a/src/vs/base/test/common/json.test.ts b/src/vs/base/test/common/json.test.ts index 065becde008..2551f00fde3 100644 --- a/src/vs/base/test/common/json.test.ts +++ b/src/vs/base/test/common/json.test.ts @@ -234,6 +234,7 @@ suite('JSON', () => { assertValidParse('{ "hello": [] }', { hello: [] }, options); assertValidParse('{ "hello": [], "world": {}, }', { hello: [], world: {} }, options); assertValidParse('{ "hello": [], "world": {} }', { hello: [], world: {} }, options); + assertValidParse('{ "hello": [1,] }', { hello: [1] }, options); assertInvalidParse('{ "hello": [], }', { hello: [] }); assertInvalidParse('{ "hello": [], "world": {}, }', { hello: [], world: {} }); diff --git a/src/vs/base/test/node/encoding/encoding.test.ts b/src/vs/base/test/node/encoding/encoding.test.ts index ce229da6f90..7c5c56f7a9f 100644 --- a/src/vs/base/test/node/encoding/encoding.test.ts +++ b/src/vs/base/test/node/encoding/encoding.test.ts @@ -8,6 +8,7 @@ import assert = require('assert'); import encoding = require('vs/base/node/encoding'); +import { encodingExists } from 'vs/base/node/encoding'; suite('Encoding', () => { test('detectBOM UTF-8', (done: (err?: any) => void) => { @@ -54,4 +55,21 @@ suite('Encoding', () => { done(); }, done); }); + + test('resolve terminal encoding (detect)', function (done: (err?: any) => void) { + encoding.resolveTerminalEncoding().then(encoding => { + assert.ok(encodingExists(encoding)); + done(); + }, done); + }); + + test('resolve terminal encoding (environment)', function (done: (err?: any) => void) { + process.env['VSCODE_CLI_ENCODING'] = 'utf16le'; + + encoding.resolveTerminalEncoding().then(encoding => { + assert.ok(encodingExists(encoding)); + assert.equal(encoding, 'utf16le'); + done(); + }, done); + }); }); diff --git a/src/vs/base/test/node/extfs/extfs.test.ts b/src/vs/base/test/node/extfs/extfs.test.ts index fb3308f9a4a..06ecf0b8ba0 100644 --- a/src/vs/base/test/node/extfs/extfs.test.ts +++ b/src/vs/base/test/node/extfs/extfs.test.ts @@ -209,6 +209,31 @@ suite('Extfs', () => { }); }); + test('writeFileAndFlushSync', function (done: () => void) { + const id = uuid.generateUuid(); + const parentDir = path.join(os.tmpdir(), 'vsctests', id); + const newDir = path.join(parentDir, 'extfs', id); + const testFile = path.join(newDir, 'flushed.txt'); + + mkdirp(newDir, 493, error => { + if (error) { + return onError(error, done); + } + + assert.ok(fs.existsSync(newDir)); + + extfs.writeFileAndFlushSync(testFile, 'Hello World', null); + assert.equal(fs.readFileSync(testFile), 'Hello World'); + + const largeString = (new Array(100 * 1024)).join('Large String\n'); + + extfs.writeFileAndFlushSync(testFile, largeString, null); + assert.equal(fs.readFileSync(testFile), largeString); + + extfs.del(parentDir, os.tmpdir(), done, ignore); + }); + }); + test('realcase', (done) => { const id = uuid.generateUuid(); const parentDir = path.join(os.tmpdir(), 'vsctests', id); diff --git a/src/vs/base/test/node/id.test.ts b/src/vs/base/test/node/id.test.ts new file mode 100644 index 00000000000..3c01f23d8c1 --- /dev/null +++ b/src/vs/base/test/node/id.test.ts @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { getMachineId } from 'vs/base/node/id'; + +suite('ID', () => { + + test('getMachineId', function () { + return getMachineId().then(id => { + assert.ok(id); + }); + }); +}); \ No newline at end of file diff --git a/src/vs/base/test/node/port.test.ts b/src/vs/base/test/node/port.test.ts index 24906c66662..7c2d3678d11 100644 --- a/src/vs/base/test/node/port.test.ts +++ b/src/vs/base/test/node/port.test.ts @@ -18,7 +18,7 @@ suite('Ports', () => { } // get an initial freeport >= 7000 - ports.findFreePort(7000, 100, 300000, (initialPort) => { + ports.findFreePort(7000, 100, 300000).then(initialPort => { assert.ok(initialPort >= 7000); // create a server to block this port @@ -26,7 +26,7 @@ suite('Ports', () => { server.listen(initialPort, null, null, () => { // once listening, find another free port and assert that the port is different from the opened one - ports.findFreePort(7000, 50, 300000, (freePort) => { + ports.findFreePort(7000, 50, 300000).then(freePort => { assert.ok(freePort >= 7000 && freePort !== initialPort); server.close(); diff --git a/src/vs/code/electron-browser/sharedProcess.js b/src/vs/code/electron-browser/sharedProcess.js index 9b216f89622..2e39f94b2e5 100644 --- a/src/vs/code/electron-browser/sharedProcess.js +++ b/src/vs/code/electron-browser/sharedProcess.js @@ -89,7 +89,11 @@ function main() { }); } - require(['vs/code/electron-browser/sharedProcessMain'], function () { }); + require(['vs/code/electron-browser/sharedProcessMain'], function (sharedProcess) { + sharedProcess.startup({ + machineId: configuration.machineId + }); + }); }); } diff --git a/src/vs/code/electron-browser/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcessMain.ts index 65d951ef245..f28c43680c1 100644 --- a/src/vs/code/electron-browser/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcessMain.ts @@ -24,7 +24,7 @@ import { IRequestService } from 'vs/platform/request/node/request'; import { RequestService } from 'vs/platform/request/electron-browser/requestService'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { combinedAppender, NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; -import { resolveCommonProperties, machineIdStorageKey } from 'vs/platform/telemetry/node/commonProperties'; +import { resolveCommonProperties } from 'vs/platform/telemetry/node/commonProperties'; import { TelemetryAppenderChannel } from 'vs/platform/telemetry/common/telemetryIpc'; import { TelemetryService, ITelemetryServiceConfig } from 'vs/platform/telemetry/common/telemetryService'; import { AppInsightsAppender } from 'vs/platform/telemetry/node/appInsightsAppender'; @@ -34,8 +34,17 @@ import { IWindowsService } from 'vs/platform/windows/common/windows'; import { WindowsChannelClient } from 'vs/platform/windows/common/windowsIpc'; import { ipcRenderer } from 'electron'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { StorageService, inMemoryLocalStorageInstance } from 'vs/platform/storage/common/storageService'; import { createSharedProcessContributions } from 'vs/code/electron-browser/contrib/contributions'; +import { createLogService } from 'vs/platform/log/node/spdlogService'; +import { ILogService } from 'vs/platform/log/common/log'; + +export interface ISharedProcessConfiguration { + readonly machineId: string; +} + +export function startup(configuration: ISharedProcessConfiguration) { + handshake(configuration); +} interface ISharedProcessInitData { sharedIPCHandle: string; @@ -66,10 +75,17 @@ class ActiveWindowManager implements IDisposable { const eventPrefix = 'monacoworkbench'; -function main(server: Server, initData: ISharedProcessInitData): void { +function main(server: Server, initData: ISharedProcessInitData, configuration: ISharedProcessConfiguration): void { const services = new ServiceCollection(); - services.set(IEnvironmentService, new SyncDescriptor(EnvironmentService, initData.args, process.execPath)); + const environmentService = new EnvironmentService(initData.args, process.execPath); + const logService = createLogService('sharedprocess', environmentService); + process.once('exit', () => logService.dispose()); + + logService.info('main', JSON.stringify(configuration)); + + services.set(IEnvironmentService, environmentService); + services.set(ILogService, logService); services.set(IConfigurationService, new SyncDescriptor(ConfigurationService)); services.set(IRequestService, new SyncDescriptor(RequestService)); @@ -100,21 +116,12 @@ function main(server: Server, initData: ISharedProcessInitData): void { const services = new ServiceCollection(); const environmentService = accessor.get(IEnvironmentService); - const { appRoot, extensionsPath, extensionDevelopmentPath, isBuilt, extensionTestsPath, installSource } = environmentService; + const { appRoot, extensionsPath, extensionDevelopmentPath, isBuilt, installSourcePath } = environmentService; if (isBuilt && !extensionDevelopmentPath && !environmentService.args['disable-telemetry'] && product.enableTelemetry) { - const disableStorage = !!extensionTestsPath; // never keep any state when running extension tests! - const storage = disableStorage ? inMemoryLocalStorageInstance : window.localStorage; - const storageService = new StorageService(storage, storage); - const config: ITelemetryServiceConfig = { appender, - commonProperties: resolveCommonProperties(product.commit, pkg.version, installSource) - // __GDPR__COMMON__ "common.machineId" : { "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } - .then(result => Object.defineProperty(result, 'common.machineId', { - get: () => storageService.get(machineIdStorageKey), - enumerable: true - })), + commonProperties: resolveCommonProperties(product.commit, pkg.version, configuration.machineId, installSourcePath), piiPaths: [appRoot, extensionsPath] }; @@ -182,10 +189,8 @@ function startHandshake(): TPromise { }); } -function handshake(): TPromise { +function handshake(configuration: ISharedProcessConfiguration): TPromise { return startHandshake() - .then((data) => setupIPC(data.sharedIPCHandle).then(server => main(server, data))) + .then(data => setupIPC(data.sharedIPCHandle).then(server => main(server, data, configuration))) .then(() => ipcRenderer.send('handshake:im ready')); -} - -handshake(); +} \ No newline at end of file diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 71b1557292d..c16afdc0796 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -26,7 +26,7 @@ import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiati import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { ILogService } from 'vs/platform/log/common/log'; -import { IStorageService } from 'vs/platform/storage/node/storage'; +import { IStateService } from 'vs/platform/state/common/state'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IURLService } from 'vs/platform/url/common/url'; @@ -35,7 +35,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; import { ITelemetryAppenderChannel, TelemetryAppenderClient } from 'vs/platform/telemetry/common/telemetryIpc'; import { TelemetryService, ITelemetryServiceConfig } from 'vs/platform/telemetry/common/telemetryService'; -import { resolveCommonProperties, machineIdStorageKey, machineIdIpcChannel } from 'vs/platform/telemetry/node/commonProperties'; +import { resolveCommonProperties } from 'vs/platform/telemetry/node/commonProperties'; import { getDelayedChannel } from 'vs/base/parts/ipc/common/ipc'; import product from 'vs/platform/node/product'; import pkg from 'vs/platform/node/package'; @@ -53,10 +53,12 @@ import { WorkspacesChannel } from 'vs/platform/workspaces/common/workspacesIpc'; import { IWorkspacesMainService } from 'vs/platform/workspaces/common/workspaces'; import { dirname, join } from 'path'; import { touch } from 'vs/base/node/pfs'; +import { getMachineId } from 'vs/base/node/id'; export class CodeApplication { private static readonly APP_ICON_REFRESH_KEY = 'macOSAppIconRefresh3'; + private static readonly MACHINE_ID_KEY = 'telemetry.machineId'; private toDispose: IDisposable[]; private windowsMainService: IWindowsMainService; @@ -74,8 +76,8 @@ export class CodeApplication { @IEnvironmentService private environmentService: IEnvironmentService, @ILifecycleService private lifecycleService: ILifecycleService, @IConfigurationService configurationService: ConfigurationService, - @IStorageService private storageService: IStorageService, - @IHistoryMainService private historyService: IHistoryMainService + @IStateService private stateService: IStateService, + @IHistoryMainService private historyMainService: IHistoryMainService ) { this.toDispose = [mainIpcServer, configurationService]; @@ -107,7 +109,7 @@ export class CodeApplication { }); app.on('will-quit', () => { - this.logService.log('App#will-quit: disposing resources'); + this.logService.trace('App#will-quit: disposing resources'); this.dispose(); }); @@ -119,7 +121,7 @@ export class CodeApplication { }); app.on('activate', (event: Event, hasVisibleWindows: boolean) => { - this.logService.log('App#activate'); + this.logService.trace('App#activate'); // Mac only event: open new window when we get activated if (!hasVisibleWindows && this.windowsMainService) { @@ -154,7 +156,7 @@ export class CodeApplication { let macOpenFiles: string[] = []; let runningTimeout: number = null; app.on('open-file', (event: Event, path: string) => { - this.logService.log('App#open-file: ', path); + this.logService.trace('App#open-file: ', path); event.preventDefault(); // Keep in array because more might come! @@ -186,17 +188,12 @@ export class CodeApplication { }); ipc.on('vscode:exit', (_event: any, code: number) => { - this.logService.log('IPC#vscode:exit', code); + this.logService.trace('IPC#vscode:exit', code); this.dispose(); this.lifecycleService.kill(code); }); - ipc.on(machineIdIpcChannel, (_event: any, machineId: string) => { - this.logService.log('IPC#vscode-machineId'); - this.storageService.setItem(machineIdStorageKey, machineId); - }); - ipc.on('vscode:fetchShellEnv', (_event: any, windowId: number) => { const { webContents } = BrowserWindow.fromId(windowId); getShellEnvironment().then(shellEnv => { @@ -214,7 +211,7 @@ export class CodeApplication { ipc.on('vscode:broadcast', (_event: any, windowId: number, broadcast: { channel: string; payload: any; }) => { if (this.windowsMainService && broadcast.channel && !isUndefinedOrNull(broadcast.payload)) { - this.logService.log('IPC#vscode:broadcast', broadcast.channel, broadcast.payload); + this.logService.trace('IPC#vscode:broadcast', broadcast.channel, broadcast.payload); // Handle specific events on main side this.onBroadcast(broadcast.channel, broadcast.payload); @@ -238,15 +235,15 @@ export class CodeApplication { if (event === 'vscode:changeColorTheme' && typeof payload === 'string') { let data = JSON.parse(payload); - this.storageService.setItem(CodeWindow.themeStorageKey, data.id); - this.storageService.setItem(CodeWindow.themeBackgroundStorageKey, data.background); + this.stateService.setItem(CodeWindow.themeStorageKey, data.id); + this.stateService.setItem(CodeWindow.themeBackgroundStorageKey, data.background); } } - public startup(): void { - this.logService.log('Starting VS Code in verbose mode'); - this.logService.log(`from: ${this.environmentService.appRoot}`); - this.logService.log('args:', this.environmentService.args); + public startup(): TPromise { + this.logService.debug('Starting VS Code'); + this.logService.debug(`from: ${this.environmentService.appRoot}`); + this.logService.debug('args:', this.environmentService.args); // Make sure we associate the program with the app user model id // This will help Windows to associate the running program with @@ -259,30 +256,51 @@ export class CodeApplication { // Create Electron IPC Server this.electronIpcServer = new ElectronIPCServer(); - // Spawn shared process - this.sharedProcess = new SharedProcess(this.environmentService, this.userEnv); - this.toDispose.push(this.sharedProcess); - this.sharedProcessClient = this.sharedProcess.whenReady().then(() => connect(this.environmentService.sharedIPCHandle, 'main')); + // Resolve unique machine ID + this.logService.trace('Resolving machine identifier...'); + return this.resolveMachineId().then(machineId => { + this.logService.trace(`Resolved machine identifier: ${machineId}`); - // Services - const appInstantiationService = this.initServices(); + // Spawn shared process + this.sharedProcess = new SharedProcess(this.environmentService, machineId, this.userEnv); + this.toDispose.push(this.sharedProcess); + this.sharedProcessClient = TPromise.timeout(5000).then(() => this.sharedProcess.whenReady()).then(() => connect(this.environmentService.sharedIPCHandle, 'main')); - // Setup Auth Handler - const authHandler = appInstantiationService.createInstance(ProxyAuthHandler); - this.toDispose.push(authHandler); + // Services + const appInstantiationService = this.initServices(machineId); - // Open Windows - appInstantiationService.invokeFunction(accessor => this.openFirstWindow(accessor)); + // Setup Auth Handler + const authHandler = appInstantiationService.createInstance(ProxyAuthHandler); + this.toDispose.push(authHandler); - // Post Open Windows Tasks - appInstantiationService.invokeFunction(accessor => this.afterWindowOpen(accessor)); + // Open Windows + appInstantiationService.invokeFunction(accessor => this.openFirstWindow(accessor)); + + // Post Open Windows Tasks + appInstantiationService.invokeFunction(accessor => this.afterWindowOpen(accessor)); + }); } - private initServices(): IInstantiationService { + private resolveMachineId(): TPromise { + const machineId = this.stateService.getItem(CodeApplication.MACHINE_ID_KEY); + if (machineId) { + return TPromise.wrap(machineId); + } + + return getMachineId().then(machineId => { + + // Remember in global storage + this.stateService.setItem(CodeApplication.MACHINE_ID_KEY, machineId); + + return machineId; + }); + } + + private initServices(machineId: string): IInstantiationService { const services = new ServiceCollection(); services.set(IUpdateService, new SyncDescriptor(UpdateService)); - services.set(IWindowsMainService, new SyncDescriptor(WindowsManager)); + services.set(IWindowsMainService, new SyncDescriptor(WindowsManager, machineId)); services.set(IWindowsService, new SyncDescriptor(WindowsService, this.sharedProcess)); services.set(ILaunchService, new SyncDescriptor(LaunchService)); @@ -290,14 +308,10 @@ export class CodeApplication { if (this.environmentService.isBuilt && !this.environmentService.isExtensionDevelopment && !this.environmentService.args['disable-telemetry'] && !!product.enableTelemetry) { const channel = getDelayedChannel(this.sharedProcessClient.then(c => c.getChannel('telemetryAppender'))); const appender = new TelemetryAppenderClient(channel); - const commonProperties = resolveCommonProperties(product.commit, pkg.version, this.environmentService.installSource) - // __GDPR__COMMON__ "common.machineId" : { "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } - .then(result => Object.defineProperty(result, 'common.machineId', { - get: () => this.storageService.getItem(machineIdStorageKey), - enumerable: true - })); + const commonProperties = resolveCommonProperties(product.commit, pkg.version, machineId, this.environmentService.installSourcePath); const piiPaths = [this.environmentService.appRoot, this.environmentService.extensionsPath]; const config: ITelemetryServiceConfig = { appender, commonProperties, piiPaths }; + services.set(ITelemetryService, new SyncDescriptor(TelemetryService, config)); } else { services.set(ITelemetryService, NullTelemetryService); @@ -342,7 +356,6 @@ export class CodeApplication { this.electronIpcServer.registerChannel('windows', windowsChannel); this.sharedProcessClient.done(client => client.registerChannel('windows', windowsChannel)); - // Lifecycle this.lifecycleService.ready(); @@ -405,8 +418,8 @@ export class CodeApplication { appInstantiationService.createInstance(CodeMenu); // Jump List - this.historyService.updateWindowsJumpList(); - this.historyService.onRecentlyOpenedChange(() => this.historyService.updateWindowsJumpList()); + this.historyMainService.updateWindowsJumpList(); + this.historyMainService.onRecentlyOpenedChange(() => this.historyMainService.updateWindowsJumpList()); // Start shared process here this.sharedProcess.spawn(); @@ -414,8 +427,8 @@ export class CodeApplication { // Helps application icon refresh after an update with new icon is installed (macOS) // TODO@Ben remove after a couple of releases if (platform.isMacintosh) { - if (!this.storageService.getItem(CodeApplication.APP_ICON_REFRESH_KEY)) { - this.storageService.setItem(CodeApplication.APP_ICON_REFRESH_KEY, true); + if (!this.stateService.getItem(CodeApplication.APP_ICON_REFRESH_KEY)) { + this.stateService.setItem(CodeApplication.APP_ICON_REFRESH_KEY, true); // 'exe' => /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron const appPath = dirname(dirname(dirname(app.getPath('exe')))); diff --git a/src/vs/code/electron-main/auth.ts b/src/vs/code/electron-main/auth.ts index 6434cfd557c..45985c3f4d6 100644 --- a/src/vs/code/electron-main/auth.ts +++ b/src/vs/code/electron-main/auth.ts @@ -32,7 +32,7 @@ export class ProxyAuthHandler { private disposables: IDisposable[] = []; constructor( - @IWindowsMainService private windowsService: IWindowsMainService + @IWindowsMainService private windowsMainService: IWindowsMainService ) { const onLogin = fromNodeEventEmitter(app, 'login', (event, webContents, req, authInfo, cb) => ({ event, webContents, req, authInfo, cb })); onLogin(this.onLogin, this, this.disposables); @@ -59,7 +59,7 @@ export class ProxyAuthHandler { title: 'VS Code' }; - const focusedWindow = this.windowsService.getFocusedWindow(); + const focusedWindow = this.windowsMainService.getFocusedWindow(); if (focusedWindow) { opts.parent = focusedWindow.win; diff --git a/src/vs/code/electron-main/diagnostics.ts b/src/vs/code/electron-main/diagnostics.ts new file mode 100644 index 00000000000..82673450fe9 --- /dev/null +++ b/src/vs/code/electron-main/diagnostics.ts @@ -0,0 +1,178 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { WorkspaceStats, collectWorkspaceStats, collectLaunchConfigs, WorkspaceStatItem } from 'vs/base/node/stats'; +import { IMainProcessInfo } from 'vs/code/electron-main/launch'; +import { ProcessItem, listProcesses } from 'vs/base/node/ps'; +import product from 'vs/platform/node/product'; +import pkg from 'vs/platform/node/package'; +import * as os from 'os'; +import { virtualMachineHint } from 'vs/base/node/id'; +import { repeat, pad } from 'vs/base/common/strings'; +import { isWindows } from 'vs/base/common/platform'; +import { app } from 'electron'; +import { basename } from 'path'; + +export function printDiagnostics(info: IMainProcessInfo): Promise { + return listProcesses(info.mainPID).then(rootProcess => { + + // Environment Info + console.log(''); + console.log(formatEnvironment(info)); + + // Process List + console.log(''); + console.log(formatProcessList(info, rootProcess)); + + // Workspace Stats + if (info.windows.some(window => window.folders && window.folders.length > 0)) { + console.log(''); + console.log('Workspace Stats: '); + info.windows.forEach(window => { + if (window.folders.length === 0) { + return; + } + + console.log(`| Window (${window.title})`); + + window.folders.forEach(folder => { + try { + const stats = collectWorkspaceStats(folder, ['node_modules', '.git']); + let countMessage = `${stats.fileCount} files`; + if (stats.maxFilesReached) { + countMessage = `more than ${countMessage}`; + } + console.log(`| Folder (${basename(folder)}): ${countMessage}`); + console.log(formatWorkspaceStats(stats)); + + const launchConfigs = collectLaunchConfigs(folder); + if (launchConfigs.length > 0) { + console.log(formatLaunchConfigs(launchConfigs)); + } + } catch (error) { + console.log(`| Error: Unable to collect workpsace stats for folder ${folder} (${error.toString()})`); + } + }); + }); + } + console.log(''); + console.log(''); + }); +} + +function formatWorkspaceStats(workspaceStats: WorkspaceStats): string { + const output: string[] = []; + const lineLength = 60; + let col = 0; + + const appendAndWrap = (name: string, count: number) => { + const item = ` ${name}(${count})`; + + if (col + item.length > lineLength) { + output.push(line); + line = '| '; + col = line.length; + } + else { + col += item.length; + } + line += item; + }; + + + // File Types + let line = '| File types:'; + const maxShown = 10; + let max = workspaceStats.fileTypes.length > maxShown ? maxShown : workspaceStats.fileTypes.length; + for (let i = 0; i < max; i++) { + const item = workspaceStats.fileTypes[i]; + appendAndWrap(item.name, item.count); + } + output.push(line); + + // Conf Files + if (workspaceStats.configFiles.length >= 0) { + line = '| Conf files:'; + col = 0; + workspaceStats.configFiles.forEach((item) => { + appendAndWrap(item.name, item.count); + }); + output.push(line); + } + + return output.join('\n'); +} + +function formatLaunchConfigs(configs: WorkspaceStatItem[]): string { + const output: string[] = []; + let line = '| Launch Configs:'; + configs.forEach(each => { + const item = each.count > 1 ? ` ${each.name}(${each.count})` : ` ${each.name}`; + line += item; + }); + output.push(line); + return output.join('\n'); +} + +function formatEnvironment(info: IMainProcessInfo): string { + const MB = 1024 * 1024; + const GB = 1024 * MB; + + const output: string[] = []; + output.push(`Version: ${pkg.name} ${pkg.version} (${product.commit || 'Commit unknown'}, ${product.date || 'Date unknown'})`); + output.push(`OS Version: ${os.type()} ${os.arch()} ${os.release()})`); + const cpus = os.cpus(); + if (cpus && cpus.length > 0) { + output.push(`CPUs: ${cpus[0].model} (${cpus.length} x ${cpus[0].speed})`); + } + output.push(`Memory (System): ${(os.totalmem() / GB).toFixed(2)}GB (${(os.freemem() / GB).toFixed(2)}GB free)`); + if (!isWindows) { + output.push(`Load (avg): ${os.loadavg().map(l => Math.round(l)).join(', ')}`); // only provided on Linux/macOS + } + output.push(`VM: ${Math.round((virtualMachineHint.value() * 100))}%`); + output.push(`Screen Reader: ${app.isAccessibilitySupportEnabled() ? 'yes' : 'no'}`); + + return output.join('\n'); +} + +function formatProcessList(info: IMainProcessInfo, rootProcess: ProcessItem): string { + const mapPidToWindowTitle = new Map(); + info.windows.forEach(window => mapPidToWindowTitle.set(window.pid, window.title)); + + const output: string[] = []; + + output.push('CPU %\tMem MB\tProcess'); + + formatProcessItem(mapPidToWindowTitle, output, rootProcess, 0); + + return output.join('\n'); +} + +function formatProcessItem(mapPidToWindowTitle: Map, output: string[], item: ProcessItem, indent: number): void { + const isRoot = (indent === 0); + + const MB = 1024 * 1024; + + // Format name with indent + let name: string; + if (isRoot) { + name = `${product.applicationName} main`; + } else { + name = `${repeat(' ', indent)} ${item.name}`; + + if (item.name === 'window') { + name = `${name} (${mapPidToWindowTitle.get(item.pid)})`; + } + } + const memory = process.platform === 'win32' ? item.mem : (os.totalmem() * (item.mem / 100)); + output.push(`${pad(Number(item.load.toFixed(0)), 5, ' ')}\t${pad(Number((memory / MB).toFixed(0)), 6, ' ')}\t${name}`); + + // Recurse into children if any + if (Array.isArray(item.children)) { + item.children.forEach(child => formatProcessItem(mapPidToWindowTitle, output, child, indent + 1)); + } +} \ No newline at end of file diff --git a/src/vs/code/electron-main/keyboard.ts b/src/vs/code/electron-main/keyboard.ts index fbec79fd50f..0d53eb2146c 100644 --- a/src/vs/code/electron-main/keyboard.ts +++ b/src/vs/code/electron-main/keyboard.ts @@ -7,7 +7,7 @@ import * as nativeKeymap from 'native-keymap'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { IStorageService } from 'vs/platform/storage/node/storage'; +import { IStateService } from 'vs/platform/state/common/state'; import Event, { Emitter, once } from 'vs/base/common/event'; import { ConfigWatcher } from 'vs/base/node/config'; import { IUserFriendlyKeybinding } from 'vs/platform/keybinding/common/keybinding'; @@ -58,13 +58,13 @@ export class KeybindingsResolver { onKeybindingsChanged: Event = this._onKeybindingsChanged.event; constructor( - @IStorageService private storageService: IStorageService, + @IStateService private stateService: IStateService, @IEnvironmentService environmentService: IEnvironmentService, - @IWindowsMainService private windowsService: IWindowsMainService, + @IWindowsMainService private windowsMainService: IWindowsMainService, @ILogService private logService: ILogService ) { this.commandIds = new Set(); - this.keybindings = this.storageService.getItem<{ [id: string]: string; }>(KeybindingsResolver.lastKnownKeybindingsMapStorageKey) || Object.create(null); + this.keybindings = this.stateService.getItem<{ [id: string]: string; }>(KeybindingsResolver.lastKnownKeybindingsMapStorageKey) || Object.create(null); this.keybindingsWatcher = new ConfigWatcher(environmentService.appKeybindingsPath, { changeBufferDelay: 100, onError: error => this.logService.error(error) }); this.registerListeners(); @@ -102,24 +102,24 @@ export class KeybindingsResolver { if (keybindingsChanged) { this.keybindings = resolvedKeybindings; - this.storageService.setItem(KeybindingsResolver.lastKnownKeybindingsMapStorageKey, this.keybindings); // keep to restore instantly after restart + this.stateService.setItem(KeybindingsResolver.lastKnownKeybindingsMapStorageKey, this.keybindings); // keep to restore instantly after restart this._onKeybindingsChanged.fire(); } }); // Resolve keybindings when any first window is loaded - const onceOnWindowReady = once(this.windowsService.onWindowReady); + const onceOnWindowReady = once(this.windowsMainService.onWindowReady); onceOnWindowReady(win => this.resolveKeybindings(win)); // Resolve keybindings again when keybindings.json changes this.keybindingsWatcher.onDidUpdateConfiguration(() => this.resolveKeybindings()); // Resolve keybindings when window reloads because an installed extension could have an impact - this.windowsService.onWindowReload(() => this.resolveKeybindings()); + this.windowsMainService.onWindowReload(() => this.resolveKeybindings()); } - private resolveKeybindings(win = this.windowsService.getLastActiveWindow()): void { + private resolveKeybindings(win = this.windowsMainService.getLastActiveWindow()): void { if (this.commandIds.size && win) { const commandIds: string[] = []; this.commandIds.forEach(id => commandIds.push(id)); diff --git a/src/vs/code/electron-main/launch.ts b/src/vs/code/electron-main/launch.ts index 189224ef9c6..31125cac105 100644 --- a/src/vs/code/electron-main/launch.ts +++ b/src/vs/code/electron-main/launch.ts @@ -15,6 +15,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' import { OpenContext } from 'vs/platform/windows/common/windows'; import { IWindowsMainService, ICodeWindow } from 'vs/platform/windows/electron-main/windows'; import { whenDeleted } from 'vs/base/node/pfs'; +import { IWorkspacesMainService } from 'vs/platform/workspaces/common/workspaces'; export const ID = 'launchService'; export const ILaunchService = createDecorator(ID); @@ -24,15 +25,28 @@ export interface IStartArguments { userEnv: IProcessEnvironment; } +export interface IWindowInfo { + pid: number; + title: string; + folders: string[]; +} + +export interface IMainProcessInfo { + mainPID: number; + windows: IWindowInfo[]; +} + export interface ILaunchService { _serviceBrand: any; start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise; getMainProcessId(): TPromise; + getMainProcessInfo(): TPromise; } export interface ILaunchChannel extends IChannel { call(command: 'start', arg: IStartArguments): TPromise; call(command: 'get-main-process-id', arg: null): TPromise; + call(command: 'get-main-process-info', arg: null): TPromise; call(command: string, arg: any): TPromise; } @@ -48,6 +62,9 @@ export class LaunchChannel implements ILaunchChannel { case 'get-main-process-id': return this.service.getMainProcessId(); + + case 'get-main-process-info': + return this.service.getMainProcessInfo(); } return undefined; @@ -67,6 +84,10 @@ export class LaunchChannelClient implements ILaunchService { public getMainProcessId(): TPromise { return this.channel.call('get-main-process-id', null); } + + public getMainProcessInfo(): TPromise { + return this.channel.call('get-main-process-info', null); + } } export class LaunchService implements ILaunchService { @@ -75,12 +96,13 @@ export class LaunchService implements ILaunchService { constructor( @ILogService private logService: ILogService, - @IWindowsMainService private windowsService: IWindowsMainService, - @IURLService private urlService: IURLService + @IWindowsMainService private windowsMainService: IWindowsMainService, + @IURLService private urlService: IURLService, + @IWorkspacesMainService private workspacesMainService: IWorkspacesMainService ) { } public start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise { - this.logService.log('Received data from other instance: ', args, userEnv); + this.logService.trace('Received data from other instance: ', args, userEnv); // Check early for open-url which is handled in URL service const openUrlArg = args['open-url'] || []; @@ -95,13 +117,13 @@ export class LaunchService implements ILaunchService { const context = !!userEnv['VSCODE_CLI'] ? OpenContext.CLI : OpenContext.DESKTOP; let usedWindows: ICodeWindow[]; if (!!args.extensionDevelopmentPath) { - this.windowsService.openExtensionDevelopmentHostWindow({ context, cli: args, userEnv }); + this.windowsMainService.openExtensionDevelopmentHostWindow({ context, cli: args, userEnv }); } else if (args._.length === 0 && (args['new-window'] || args['unity-launch'])) { - usedWindows = this.windowsService.open({ context, cli: args, userEnv, forceNewWindow: true, forceEmpty: true }); + usedWindows = this.windowsMainService.open({ context, cli: args, userEnv, forceNewWindow: true, forceEmpty: true }); } else if (args._.length === 0) { - usedWindows = [this.windowsService.focusLastActive(args, context)]; + usedWindows = [this.windowsMainService.focusLastActive(args, context)]; } else { - usedWindows = this.windowsService.open({ + usedWindows = this.windowsMainService.open({ context, cli: args, userEnv, @@ -118,7 +140,7 @@ export class LaunchService implements ILaunchService { // In addition, we poll for the wait marker file to be deleted to return. if (args.wait && usedWindows.length === 1 && usedWindows[0]) { return TPromise.any([ - this.windowsService.waitForWindowCloseOrLoad(usedWindows[0].id), + this.windowsMainService.waitForWindowCloseOrLoad(usedWindows[0].id), whenDeleted(args.waitMarkerFilePath) ]).then(() => void 0, () => void 0); } @@ -127,8 +149,40 @@ export class LaunchService implements ILaunchService { } public getMainProcessId(): TPromise { - this.logService.log('Received request for process ID from other instance.'); + this.logService.trace('Received request for process ID from other instance.'); return TPromise.as(process.pid); } + + public getMainProcessInfo(): TPromise { + this.logService.trace('Received request for main process info from other instance.'); + + return TPromise.wrap({ + mainPID: process.pid, + windows: this.windowsMainService.getWindows().map(window => { + return this.getWindowInfo(window); + }) + } as IMainProcessInfo); + } + + private getWindowInfo(window: ICodeWindow): IWindowInfo { + const folders: string[] = []; + + if (window.openedFolderPath) { + folders.push(window.openedFolderPath); + } else if (window.openedWorkspace) { + const rootFolders = this.workspacesMainService.resolveWorkspaceSync(window.openedWorkspace.configPath).folders; + rootFolders.forEach(root => { + if (root.uri.scheme === 'file') { + folders.push(root.uri.fsPath); + } + }); + } + + return { + pid: window.win.webContents.getOSProcessId(), + title: window.win.getTitle(), + folders + } as IWindowInfo; + } } \ No newline at end of file diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index 550ab41f174..d9f1c0b0081 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -9,19 +9,21 @@ import { app, dialog } from 'electron'; import { assign } from 'vs/base/common/objects'; import * as platform from 'vs/base/common/platform'; import product from 'vs/platform/node/product'; +import * as path from 'path'; import { parseMainProcessArgv } from 'vs/platform/environment/node/argv'; -import { mkdirp } from 'vs/base/node/pfs'; +import { mkdirp, readdir, rimraf } from 'vs/base/node/pfs'; import { validatePaths } from 'vs/code/node/paths'; import { LifecycleService, ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { Server, serve, connect } from 'vs/base/parts/ipc/node/ipc.net'; import { TPromise } from 'vs/base/common/winjs.base'; -import { ILaunchChannel, LaunchChannelClient } from './launch'; +import { ILaunchChannel, LaunchChannelClient } from 'vs/code/electron-main/launch'; import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { ILogService, LogMainService } from 'vs/platform/log/common/log'; -import { IStorageService, StorageService } from 'vs/platform/storage/node/storage'; +import { ILogService, ConsoleLogMainService, MultiplexLogService } from 'vs/platform/log/common/log'; +import { StateService } from 'vs/platform/state/node/stateService'; +import { IStateService } from 'vs/platform/state/common/state'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { BackupMainService } from 'vs/platform/backup/electron-main/backupMainService'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; @@ -40,16 +42,28 @@ import { WorkspacesMainService } from 'vs/platform/workspaces/electron-main/work import { IWorkspacesMainService } from 'vs/platform/workspaces/common/workspaces'; import { localize } from 'vs/nls'; import { mnemonicButtonLabel } from 'vs/base/common/labels'; +import { createLogService } from 'vs/platform/log/node/spdlogService'; +import { printDiagnostics } from 'vs/code/electron-main/diagnostics'; function createServices(args: ParsedArgs): IInstantiationService { const services = new ServiceCollection(); - services.set(IEnvironmentService, new SyncDescriptor(EnvironmentService, args, process.execPath)); - services.set(ILogService, new SyncDescriptor(LogMainService)); + const environmentService = new EnvironmentService(args, process.execPath); + const spdlogService = createLogService('main', environmentService); + const consoleLogService = new ConsoleLogMainService(environmentService); + const logService = new MultiplexLogService([consoleLogService, spdlogService]); + + process.once('exit', () => logService.dispose()); + + // Eventually cleanup + setTimeout(() => cleanupOlderLogs(environmentService).then(null, err => console.error(err)), 10000); + + services.set(IEnvironmentService, environmentService); + services.set(ILogService, logService); services.set(IWorkspacesMainService, new SyncDescriptor(WorkspacesMainService)); services.set(IHistoryMainService, new SyncDescriptor(HistoryMainService)); services.set(ILifecycleService, new SyncDescriptor(LifecycleService)); - services.set(IStorageService, new SyncDescriptor(StorageService)); + services.set(IStateService, new SyncDescriptor(StateService)); services.set(IConfigurationService, new SyncDescriptor(ConfigurationService)); services.set(IRequestService, new SyncDescriptor(RequestService)); services.set(IURLService, new SyncDescriptor(URLService, args['open-url'])); @@ -58,12 +72,28 @@ function createServices(args: ParsedArgs): IInstantiationService { return new InstantiationService(services, true); } +/** + * Cleans up older logs, while keeping the 10 most recent ones. +*/ +async function cleanupOlderLogs(environmentService: EnvironmentService): TPromise { + const currentLog = path.basename(environmentService.logsPath); + const logsRoot = path.dirname(environmentService.logsPath); + const children = await readdir(logsRoot); + const allSessions = children.filter(name => /^\d{8}T\d{6}$/.test(name)); + const oldSessions = allSessions.sort().filter((d, i) => d !== currentLog); + const toDelete = oldSessions.slice(0, Math.max(0, oldSessions.length - 9)); + + await TPromise.join(toDelete.map(name => rimraf(path.join(logsRoot, name)))); +} + function createPaths(environmentService: IEnvironmentService): TPromise { const paths = [ environmentService.appSettingsHome, environmentService.extensionsPath, - environmentService.nodeCachedDataDir + environmentService.nodeCachedDataDir, + environmentService.logsPath ]; + return TPromise.join(paths.map(p => p && mkdirp(p))) as TPromise; } @@ -80,7 +110,7 @@ function setupIPC(accessor: ServicesAccessor): TPromise { if (platform.isWindows) { promise = service.getMainProcessId() .then(processId => { - logService.log('Sending some foreground love to the running instance:', processId); + logService.trace('Sending some foreground love to the running instance:', processId); try { const { allowSetForegroundWindow } = require.__$__nodeRequire('windows-foreground-love'); @@ -96,10 +126,22 @@ function setupIPC(accessor: ServicesAccessor): TPromise { function setup(retry: boolean): TPromise { return serve(environmentService.mainIPCHandle).then(server => { - if (platform.isMacintosh) { - app.dock.show(); // dock might be hidden at this case due to a retry + + // Print --status usage info + if (environmentService.args.status) { + logService.warn('Warning: The --status argument can only be used if Code is already running. Please run it again after Code has started.'); + throw new ExpectedError('Terminating...'); } + // dock might be hidden at this case due to a retry + if (platform.isMacintosh) { + app.dock.show(); + } + + // Set the VSCODE_PID variable here when we are sure we are the first + // instance to startup. Otherwise we would wrongly overwrite the PID + process.env['VSCODE_PID'] = String(process.pid); + return server; }, err => { if (err.code !== 'EADDRINUSE') { @@ -124,12 +166,11 @@ function setupIPC(accessor: ServicesAccessor): TPromise { return TPromise.wrapError(new Error(msg)); } - logService.log('Sending env to running instance...'); - // Show a warning dialog after some timeout if it takes long to talk to the other instance - // Skip this if we are running with --wait where it is expected that we wait for a while + // Skip this if we are running with --wait where it is expected that we wait for a while. + // Also skip when gathering diagnostics (--status) which can take a longer time. let startupWarningDialogHandle: number; - if (!environmentService.wait) { + if (!environmentService.wait && !environmentService.status) { startupWarningDialogHandle = setTimeout(() => { showStartupWarningDialog( localize('secondInstanceNoResponse', "Another instance of {0} is running but not responding", product.nameShort), @@ -141,6 +182,15 @@ function setupIPC(accessor: ServicesAccessor): TPromise { const channel = client.getChannel('launch'); const service = new LaunchChannelClient(channel); + // Process Info + if (environmentService.args.status) { + return service.getMainProcessInfo().then(info => { + return printDiagnostics(info).then(() => TPromise.wrapError(new ExpectedError())); + }); + } + + logService.trace('Sending env to running instance...'); + return allowSetForegroundWindow(service) .then(() => service.start(environmentService.args, process.env)) .then(() => client.dispose()) @@ -172,7 +222,7 @@ function setupIPC(accessor: ServicesAccessor): TPromise { try { fs.unlinkSync(environmentService.mainIPCHandle); } catch (e) { - logService.log('Fatal error deleting obsolete instance handle', e); + logService.warn('Could not delete obsolete instance handle', e); return TPromise.wrapError(e); } @@ -204,14 +254,16 @@ function quit(accessor: ServicesAccessor, reason?: ExpectedError | Error): void if (reason) { if ((reason as ExpectedError).isExpected) { - logService.log(reason.message); + if (reason.message) { + logService.trace(reason.message); + } } else { exitCode = 1; // signal error to the outside if (reason.stack) { - console.error(reason.stack); + logService.error(reason.stack); } else { - console.error(`Startup error: ${reason.toString()}`); + logService.error(`Startup error: ${reason.toString()}`); } } } @@ -239,19 +291,16 @@ function main() { // Patch `process.env` with the instance's environment const environmentService = accessor.get(IEnvironmentService); const instanceEnv: typeof process.env = { - VSCODE_PID: String(process.pid), VSCODE_IPC_HOOK: environmentService.mainIPCHandle, - VSCODE_NLS_CONFIG: process.env['VSCODE_NLS_CONFIG'] + VSCODE_NLS_CONFIG: process.env['VSCODE_NLS_CONFIG'], + VSCODE_LOGS: process.env['VSCODE_LOGS'] }; assign(process.env, instanceEnv); // Startup return instantiationService.invokeFunction(a => createPaths(a.get(IEnvironmentService))) .then(() => instantiationService.invokeFunction(setupIPC)) - .then(mainIpcServer => { - const app = instantiationService.createInstance(CodeApplication, mainIpcServer, instanceEnv); - app.startup(); - }); + .then(mainIpcServer => instantiationService.createInstance(CodeApplication, mainIpcServer, instanceEnv).startup()); }).done(null, err => instantiationService.invokeFunction(quit, err)); } diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 2523bd85030..a3207fa5aa6 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -68,10 +68,10 @@ export class CodeMenu { @IUpdateService private updateService: IUpdateService, @IInstantiationService instantiationService: IInstantiationService, @IConfigurationService private configurationService: IConfigurationService, - @IWindowsMainService private windowsService: IWindowsMainService, + @IWindowsMainService private windowsMainService: IWindowsMainService, @IEnvironmentService private environmentService: IEnvironmentService, @ITelemetryService private telemetryService: ITelemetryService, - @IHistoryMainService private historyService: IHistoryMainService + @IHistoryMainService private historyMainService: IHistoryMainService ) { this.extensionViewlets = []; this.nativeTabMenuItems = []; @@ -92,11 +92,11 @@ export class CodeMenu { }); // Listen to some events from window service to update menu - this.historyService.onRecentlyOpenedChange(() => this.updateMenu()); - this.windowsService.onWindowsCountChanged(e => this.onWindowsCountChanged(e)); - this.windowsService.onActiveWindowChanged(() => this.updateWorkspaceMenuItems()); - this.windowsService.onWindowReady(() => this.updateWorkspaceMenuItems()); - this.windowsService.onWindowClose(() => this.updateWorkspaceMenuItems()); + this.historyMainService.onRecentlyOpenedChange(() => this.updateMenu()); + this.windowsMainService.onWindowsCountChanged(e => this.onWindowsCountChanged(e)); + this.windowsMainService.onActiveWindowChanged(() => this.updateWorkspaceMenuItems()); + this.windowsMainService.onWindowReady(() => this.updateWorkspaceMenuItems()); + this.windowsMainService.onWindowClose(() => this.updateWorkspaceMenuItems()); // Listen to extension viewlets ipc.on('vscode:extensionViewlets', (_event: any, rawExtensionViewlets: string) => { @@ -214,7 +214,7 @@ export class CodeMenu { } private updateWorkspaceMenuItems(): void { - const window = this.windowsService.getLastActiveWindow(); + const window = this.windowsMainService.getLastActiveWindow(); const isInWorkspaceContext = window && !!window.openedWorkspace; const isInFolderContext = window && !!window.openedFolderPath; @@ -310,7 +310,7 @@ export class CodeMenu { this.appMenuInstalled = true; const dockMenu = new Menu(); - dockMenu.append(new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsService.openNewWindow(OpenContext.DOCK) })); + dockMenu.append(new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsMainService.openNewWindow(OpenContext.DOCK) })); app.dock.setMenu(dockMenu); } @@ -325,7 +325,13 @@ export class CodeMenu { const hide = new MenuItem({ label: nls.localize('mHide', "Hide {0}", product.nameLong), role: 'hide', accelerator: 'Command+H' }); const hideOthers = new MenuItem({ label: nls.localize('mHideOthers', "Hide Others"), role: 'hideothers', accelerator: 'Command+Alt+H' }); const showAll = new MenuItem({ label: nls.localize('mShowAll', "Show All"), role: 'unhide' }); - const quit = new MenuItem(this.likeAction('workbench.action.quit', { label: nls.localize('miQuit', "Quit {0}", product.nameLong), click: () => this.windowsService.quit() })); + const quit = new MenuItem(this.likeAction('workbench.action.quit', { + label: nls.localize('miQuit', "Quit {0}", product.nameLong), click: () => { + if (this.windowsMainService.getWindowCount() === 0 || !!this.windowsMainService.getFocusedWindow()) { + this.windowsMainService.quit(); // fix for https://github.com/Microsoft/vscode/issues/39191 + } + } + })); const actions = [about]; actions.push(...checkForUpdates); @@ -346,39 +352,39 @@ export class CodeMenu { } private setFileMenu(fileMenu: Electron.Menu): void { - const hasNoWindows = (this.windowsService.getWindowCount() === 0); + const hasNoWindows = (this.windowsMainService.getWindowCount() === 0); let newFile: Electron.MenuItem; if (hasNoWindows) { - newFile = new MenuItem(this.likeAction('workbench.action.files.newUntitledFile', { label: this.mnemonicLabel(nls.localize({ key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "&&New File")), click: () => this.windowsService.openNewWindow(OpenContext.MENU) })); + newFile = new MenuItem(this.likeAction('workbench.action.files.newUntitledFile', { label: this.mnemonicLabel(nls.localize({ key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "&&New File")), click: () => this.windowsMainService.openNewWindow(OpenContext.MENU) })); } else { newFile = this.createMenuItem(nls.localize({ key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "&&New File"), 'workbench.action.files.newUntitledFile'); } let open: Electron.MenuItem; if (hasNoWindows) { - open = new MenuItem(this.likeAction('workbench.action.files.openFileFolder', { label: this.mnemonicLabel(nls.localize({ key: 'miOpen', comment: ['&& denotes a mnemonic'] }, "&&Open...")), click: (menuItem, win, event) => this.windowsService.pickFileFolderAndOpen({ forceNewWindow: this.isOptionClick(event), telemetryExtraData: { from: telemetryFrom } }) })); + open = new MenuItem(this.likeAction('workbench.action.files.openFileFolder', { label: this.mnemonicLabel(nls.localize({ key: 'miOpen', comment: ['&& denotes a mnemonic'] }, "&&Open...")), click: (menuItem, win, event) => this.windowsMainService.pickFileFolderAndOpen({ forceNewWindow: this.isOptionClick(event), telemetryExtraData: { from: telemetryFrom } }) })); } else { open = this.createMenuItem(nls.localize({ key: 'miOpen', comment: ['&& denotes a mnemonic'] }, "&&Open..."), ['workbench.action.files.openFileFolder', 'workbench.action.files.openFileFolderInNewWindow']); } let openWorkspace: Electron.MenuItem; if (hasNoWindows) { - openWorkspace = new MenuItem(this.likeAction('workbench.action.openWorkspace', { label: this.mnemonicLabel(nls.localize({ key: 'miOpenWorkspace', comment: ['&& denotes a mnemonic'] }, "Open Wor&&kspace...")), click: (menuItem, win, event) => this.windowsService.pickWorkspaceAndOpen({ forceNewWindow: this.isOptionClick(event), telemetryExtraData: { from: telemetryFrom } }) })); + openWorkspace = new MenuItem(this.likeAction('workbench.action.openWorkspace', { label: this.mnemonicLabel(nls.localize({ key: 'miOpenWorkspace', comment: ['&& denotes a mnemonic'] }, "Open Wor&&kspace...")), click: (menuItem, win, event) => this.windowsMainService.pickWorkspaceAndOpen({ forceNewWindow: this.isOptionClick(event), telemetryExtraData: { from: telemetryFrom } }) })); } else { openWorkspace = this.createMenuItem(nls.localize({ key: 'miOpenWorkspace', comment: ['&& denotes a mnemonic'] }, "Open Wor&&kspace..."), ['workbench.action.openWorkspace', 'workbench.action.openWorkspaceInNewWindow']); } let openFolder: Electron.MenuItem; if (hasNoWindows) { - openFolder = new MenuItem(this.likeAction('workbench.action.files.openFolder', { label: this.mnemonicLabel(nls.localize({ key: 'miOpenFolder', comment: ['&& denotes a mnemonic'] }, "Open &&Folder...")), click: (menuItem, win, event) => this.windowsService.pickFolderAndOpen({ forceNewWindow: this.isOptionClick(event), telemetryExtraData: { from: telemetryFrom } }) })); + openFolder = new MenuItem(this.likeAction('workbench.action.files.openFolder', { label: this.mnemonicLabel(nls.localize({ key: 'miOpenFolder', comment: ['&& denotes a mnemonic'] }, "Open &&Folder...")), click: (menuItem, win, event) => this.windowsMainService.pickFolderAndOpen({ forceNewWindow: this.isOptionClick(event), telemetryExtraData: { from: telemetryFrom } }) })); } else { openFolder = this.createMenuItem(nls.localize({ key: 'miOpenFolder', comment: ['&& denotes a mnemonic'] }, "Open &&Folder..."), ['workbench.action.files.openFolder', 'workbench.action.files.openFolderInNewWindow']); } let openFile: Electron.MenuItem; if (hasNoWindows) { - openFile = new MenuItem(this.likeAction('workbench.action.files.openFile', { label: this.mnemonicLabel(nls.localize({ key: 'miOpenFile', comment: ['&& denotes a mnemonic'] }, "&&Open File...")), click: (menuItem, win, event) => this.windowsService.pickFileAndOpen({ forceNewWindow: this.isOptionClick(event), telemetryExtraData: { from: telemetryFrom } }) })); + openFile = new MenuItem(this.likeAction('workbench.action.files.openFile', { label: this.mnemonicLabel(nls.localize({ key: 'miOpenFile', comment: ['&& denotes a mnemonic'] }, "&&Open File...")), click: (menuItem, win, event) => this.windowsMainService.pickFileAndOpen({ forceNewWindow: this.isOptionClick(event), telemetryExtraData: { from: telemetryFrom } }) })); } else { openFile = this.createMenuItem(nls.localize({ key: 'miOpenFile', comment: ['&& denotes a mnemonic'] }, "&&Open File..."), ['workbench.action.files.openFile', 'workbench.action.files.openFileInNewWindow']); } @@ -395,20 +401,20 @@ export class CodeMenu { const saveAllFiles = this.createMenuItem(nls.localize({ key: 'miSaveAll', comment: ['&& denotes a mnemonic'] }, "Save A&&ll"), 'workbench.action.files.saveAll'); const autoSaveEnabled = [AutoSaveConfiguration.AFTER_DELAY, AutoSaveConfiguration.ON_FOCUS_CHANGE, AutoSaveConfiguration.ON_WINDOW_CHANGE].some(s => this.currentAutoSaveSetting === s); - const autoSave = new MenuItem(this.likeAction('vscode.toggleAutoSave', { label: this.mnemonicLabel(nls.localize('miAutoSave', "Auto Save")), type: 'checkbox', checked: autoSaveEnabled, enabled: this.windowsService.getWindowCount() > 0, click: () => this.windowsService.sendToFocused('vscode.toggleAutoSave') }, false)); + const autoSave = new MenuItem(this.likeAction('vscode.toggleAutoSave', { label: this.mnemonicLabel(nls.localize('miAutoSave', "Auto Save")), type: 'checkbox', checked: autoSaveEnabled, enabled: this.windowsMainService.getWindowCount() > 0, click: () => this.windowsMainService.sendToFocused('vscode.toggleAutoSave') }, false)); const preferences = this.getPreferencesMenu(); - const newWindow = new MenuItem(this.likeAction('workbench.action.newWindow', { label: this.mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsService.openNewWindow(OpenContext.MENU) })); + const newWindow = new MenuItem(this.likeAction('workbench.action.newWindow', { label: this.mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsMainService.openNewWindow(OpenContext.MENU) })); const revertFile = this.createMenuItem(nls.localize({ key: 'miRevert', comment: ['&& denotes a mnemonic'] }, "Re&&vert File"), 'workbench.action.files.revert'); - const closeWindow = new MenuItem(this.likeAction('workbench.action.closeWindow', { label: this.mnemonicLabel(nls.localize({ key: 'miCloseWindow', comment: ['&& denotes a mnemonic'] }, "Clos&&e Window")), click: () => this.windowsService.getLastActiveWindow().win.close(), enabled: this.windowsService.getWindowCount() > 0 })); + const closeWindow = new MenuItem(this.likeAction('workbench.action.closeWindow', { label: this.mnemonicLabel(nls.localize({ key: 'miCloseWindow', comment: ['&& denotes a mnemonic'] }, "Clos&&e Window")), click: () => this.windowsMainService.getLastActiveWindow().win.close(), enabled: this.windowsMainService.getWindowCount() > 0 })); this.closeWorkspace = this.createMenuItem(nls.localize({ key: 'miCloseWorkspace', comment: ['&& denotes a mnemonic'] }, "Close &&Workspace"), 'workbench.action.closeFolder'); this.closeFolder = this.createMenuItem(nls.localize({ key: 'miCloseFolder', comment: ['&& denotes a mnemonic'] }, "Close &&Folder"), 'workbench.action.closeFolder'); const closeEditor = this.createMenuItem(nls.localize({ key: 'miCloseEditor', comment: ['&& denotes a mnemonic'] }, "&&Close Editor"), 'workbench.action.closeActiveEditor'); - const exit = new MenuItem(this.likeAction('workbench.action.quit', { label: this.mnemonicLabel(nls.localize({ key: 'miExit', comment: ['&& denotes a mnemonic'] }, "E&&xit")), click: () => this.windowsService.quit() })); + const exit = new MenuItem(this.likeAction('workbench.action.quit', { label: this.mnemonicLabel(nls.localize({ key: 'miExit', comment: ['&& denotes a mnemonic'] }, "E&&xit")), click: () => this.windowsMainService.quit() })); this.updateWorkspaceMenuItems(); @@ -468,7 +474,7 @@ export class CodeMenu { private setOpenRecentMenu(openRecentMenu: Electron.Menu): void { openRecentMenu.append(this.createMenuItem(nls.localize({ key: 'miReopenClosedEditor', comment: ['&& denotes a mnemonic'] }, "&&Reopen Closed Editor"), 'workbench.action.reopenClosedEditor')); - const { workspaces, files } = this.historyService.getRecentlyOpened(); + const { workspaces, files } = this.historyMainService.getRecentlyOpened(); // Workspaces if (workspaces.length > 0) { @@ -492,7 +498,7 @@ export class CodeMenu { openRecentMenu.append(__separator__()); openRecentMenu.append(this.createMenuItem(nls.localize({ key: 'miMore', comment: ['&& denotes a mnemonic'] }, "&&More..."), 'workbench.action.openRecent')); openRecentMenu.append(__separator__()); - openRecentMenu.append(new MenuItem(this.likeAction('workbench.action.clearRecentFiles', { label: this.mnemonicLabel(nls.localize({ key: 'miClearRecentOpen', comment: ['&& denotes a mnemonic'] }, "&&Clear Recently Opened")), click: () => this.historyService.clearRecentlyOpened() }))); + openRecentMenu.append(new MenuItem(this.likeAction('workbench.action.clearRecentFiles', { label: this.mnemonicLabel(nls.localize({ key: 'miClearRecentOpen', comment: ['&& denotes a mnemonic'] }, "&&Clear Recently Opened")), click: () => this.historyMainService.clearRecentlyOpened() }))); } } @@ -511,7 +517,7 @@ export class CodeMenu { label, click: (menuItem, win, event) => { const openInNewWindow = this.isOptionClick(event); - const success = this.windowsService.open({ + const success = this.windowsMainService.open({ context: OpenContext.MENU, cli: this.environmentService.args, pathsToOpen: [path], forceNewWindow: openInNewWindow, @@ -519,7 +525,7 @@ export class CodeMenu { }).length > 0; if (!success) { - this.historyService.removeFromRecentlyOpened([isSingleFolderWorkspaceIdentifier(workspace) ? workspace : workspace.configPath]); + this.historyMainService.removeFromRecentlyOpened([isSingleFolderWorkspaceIdentifier(workspace) ? workspace : workspace.configPath]); } } }, false)); @@ -678,7 +684,7 @@ export class CodeMenu { const commands = this.createMenuItem(nls.localize({ key: 'miCommandPalette', comment: ['&& denotes a mnemonic'] }, "&&Command Palette..."), 'workbench.action.showCommands'); - const fullscreen = new MenuItem(this.withKeybinding('workbench.action.toggleFullScreen', { label: this.mnemonicLabel(nls.localize({ key: 'miToggleFullScreen', comment: ['&& denotes a mnemonic'] }, "Toggle &&Full Screen")), click: () => this.windowsService.getLastActiveWindow().toggleFullScreen(), enabled: this.windowsService.getWindowCount() > 0 })); + const fullscreen = new MenuItem(this.withKeybinding('workbench.action.toggleFullScreen', { label: this.mnemonicLabel(nls.localize({ key: 'miToggleFullScreen', comment: ['&& denotes a mnemonic'] }, "Toggle &&Full Screen")), click: () => this.windowsMainService.getLastActiveWindow().toggleFullScreen(), enabled: this.windowsMainService.getWindowCount() > 0 })); const toggleZenMode = this.createMenuItem(nls.localize('miToggleZenMode', "Toggle Zen Mode"), 'workbench.action.toggleZenMode'); const toggleMenuBar = this.createMenuItem(nls.localize({ key: 'miToggleMenuBar', comment: ['&& denotes a mnemonic'] }, "Toggle Menu &&Bar"), 'workbench.action.toggleMenuBar'); const splitEditor = this.createMenuItem(nls.localize({ key: 'miSplitEditor', comment: ['&& denotes a mnemonic'] }, "Split &&Editor"), 'workbench.action.splitEditor'); @@ -874,15 +880,15 @@ export class CodeMenu { } private setMacWindowMenu(macWindowMenu: Electron.Menu): void { - const minimize = new MenuItem({ label: nls.localize('mMinimize', "Minimize"), role: 'minimize', accelerator: 'Command+M', enabled: this.windowsService.getWindowCount() > 0 }); - const zoom = new MenuItem({ label: nls.localize('mZoom', "Zoom"), role: 'zoom', enabled: this.windowsService.getWindowCount() > 0 }); - const bringAllToFront = new MenuItem({ label: nls.localize('mBringToFront', "Bring All to Front"), role: 'front', enabled: this.windowsService.getWindowCount() > 0 }); + const minimize = new MenuItem({ label: nls.localize('mMinimize', "Minimize"), role: 'minimize', accelerator: 'Command+M', enabled: this.windowsMainService.getWindowCount() > 0 }); + const zoom = new MenuItem({ label: nls.localize('mZoom', "Zoom"), role: 'zoom', enabled: this.windowsMainService.getWindowCount() > 0 }); + const bringAllToFront = new MenuItem({ label: nls.localize('mBringToFront', "Bring All to Front"), role: 'front', enabled: this.windowsMainService.getWindowCount() > 0 }); const switchWindow = this.createMenuItem(nls.localize({ key: 'miSwitchWindow', comment: ['&& denotes a mnemonic'] }, "Switch &&Window..."), 'workbench.action.switchWindow'); this.nativeTabMenuItems = []; const nativeTabMenuItems: Electron.MenuItem[] = []; if (this.currentEnableNativeTabs) { - const hasMultipleWindows = this.windowsService.getWindowCount() > 1; + const hasMultipleWindows = this.windowsMainService.getWindowCount() > 1; this.nativeTabMenuItems.push(this.createMenuItem(nls.localize('mShowPreviousTab', "Show Previous Tab"), 'workbench.action.showPreviousWindowTab', hasMultipleWindows)); this.nativeTabMenuItems.push(this.createMenuItem(nls.localize('mShowNextTab', "Show Next Tab"), 'workbench.action.showNextWindowTab', hasMultipleWindows)); @@ -905,7 +911,7 @@ export class CodeMenu { } private toggleDevTools(): void { - const w = this.windowsService.getFocusedWindow(); + const w = this.windowsMainService.getFocusedWindow(); if (w && w.win) { const contents = w.win.webContents; if (w.hasHiddenTitleBarStyle() && !w.win.isFullScreen() && !contents.isDevToolsOpened()) { @@ -920,7 +926,7 @@ export class CodeMenu { const toggleDevToolsItem = new MenuItem(this.likeAction('workbench.action.toggleDevTools', { label: this.mnemonicLabel(nls.localize({ key: 'miToggleDevTools', comment: ['&& denotes a mnemonic'] }, "&&Toggle Developer Tools")), click: () => this.toggleDevTools(), - enabled: (this.windowsService.getWindowCount() > 0) + enabled: (this.windowsMainService.getWindowCount() > 0) })); const showAccessibilityOptions = new MenuItem(this.likeAction('accessibilityOptions', { @@ -933,9 +939,9 @@ export class CodeMenu { let reportIssuesItem: Electron.MenuItem = null; if (product.reportIssueUrl) { - const label = nls.localize({ key: 'miReportIssues', comment: ['&& denotes a mnemonic'] }, "Report &&Issues"); + const label = nls.localize({ key: 'miReportIssue', comment: ['&& denotes a mnemonic', 'Translate this to "Report Issue in English" in all languages please!'] }, "Report &&Issue"); - if (this.windowsService.getWindowCount() > 0) { + if (this.windowsMainService.getWindowCount() > 0) { reportIssuesItem = this.createMenuItem(label, 'workbench.action.reportIssues'); } else { reportIssuesItem = new MenuItem({ label: this.mnemonicLabel(label), click: () => this.openUrl(product.reportIssueUrl, 'openReportIssues') }); @@ -944,14 +950,14 @@ export class CodeMenu { const keyboardShortcutsUrl = isLinux ? product.keyboardShortcutsUrlLinux : isMacintosh ? product.keyboardShortcutsUrlMac : product.keyboardShortcutsUrlWin; arrays.coalesce([ - new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miWelcome', comment: ['&& denotes a mnemonic'] }, "&&Welcome")), click: () => this.runActionInRenderer('workbench.action.showWelcomePage'), enabled: (this.windowsService.getWindowCount() > 0) }), - new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miInteractivePlayground', comment: ['&& denotes a mnemonic'] }, "&&Interactive Playground")), click: () => this.runActionInRenderer('workbench.action.showInteractivePlayground'), enabled: (this.windowsService.getWindowCount() > 0) }), - product.documentationUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miDocumentation', comment: ['&& denotes a mnemonic'] }, "&&Documentation")), click: () => this.runActionInRenderer('workbench.action.openDocumentationUrl'), enabled: (this.windowsService.getWindowCount() > 0) }) : null, - product.releaseNotesUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miReleaseNotes', comment: ['&& denotes a mnemonic'] }, "&&Release Notes")), click: () => this.runActionInRenderer('update.showCurrentReleaseNotes'), enabled: (this.windowsService.getWindowCount() > 0) }) : null, + new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miWelcome', comment: ['&& denotes a mnemonic'] }, "&&Welcome")), click: () => this.runActionInRenderer('workbench.action.showWelcomePage'), enabled: (this.windowsMainService.getWindowCount() > 0) }), + new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miInteractivePlayground', comment: ['&& denotes a mnemonic'] }, "&&Interactive Playground")), click: () => this.runActionInRenderer('workbench.action.showInteractivePlayground'), enabled: (this.windowsMainService.getWindowCount() > 0) }), + product.documentationUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miDocumentation', comment: ['&& denotes a mnemonic'] }, "&&Documentation")), click: () => this.runActionInRenderer('workbench.action.openDocumentationUrl'), enabled: (this.windowsMainService.getWindowCount() > 0) }) : null, + product.releaseNotesUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miReleaseNotes', comment: ['&& denotes a mnemonic'] }, "&&Release Notes")), click: () => this.runActionInRenderer('update.showCurrentReleaseNotes'), enabled: (this.windowsMainService.getWindowCount() > 0) }) : null, __separator__(), - keyboardShortcutsUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miKeyboardShortcuts', comment: ['&& denotes a mnemonic'] }, "&&Keyboard Shortcuts Reference")), click: () => this.runActionInRenderer('workbench.action.keybindingsReference'), enabled: (this.windowsService.getWindowCount() > 0) }) : null, - product.introductoryVideosUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miIntroductoryVideos', comment: ['&& denotes a mnemonic'] }, "Introductory &&Videos")), click: () => this.runActionInRenderer('workbench.action.openIntroductoryVideosUrl'), enabled: (this.windowsService.getWindowCount() > 0) }) : null, - product.tipsAndTricksUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miTipsAndTricks', comment: ['&& denotes a mnemonic'] }, "&&Tips and Tricks")), click: () => this.runActionInRenderer('workbench.action.openTipsAndTricksUrl'), enabled: (this.windowsService.getWindowCount() > 0) }) : null, + keyboardShortcutsUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miKeyboardShortcuts', comment: ['&& denotes a mnemonic'] }, "&&Keyboard Shortcuts Reference")), click: () => this.runActionInRenderer('workbench.action.keybindingsReference'), enabled: (this.windowsMainService.getWindowCount() > 0) }) : null, + product.introductoryVideosUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miIntroductoryVideos', comment: ['&& denotes a mnemonic'] }, "Introductory &&Videos")), click: () => this.runActionInRenderer('workbench.action.openIntroductoryVideosUrl'), enabled: (this.windowsMainService.getWindowCount() > 0) }) : null, + product.tipsAndTricksUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miTipsAndTricks', comment: ['&& denotes a mnemonic'] }, "&&Tips and Tricks")), click: () => this.runActionInRenderer('workbench.action.openTipsAndTricksUrl'), enabled: (this.windowsMainService.getWindowCount() > 0) }) : null, (product.introductoryVideosUrl || keyboardShortcutsUrl) ? __separator__() : null, product.twitterUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miTwitter', comment: ['&& denotes a mnemonic'] }, "&&Join us on Twitter")), click: () => this.openUrl(product.twitterUrl, 'openTwitterUrl') }) : null, product.requestFeatureUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miUserVoice', comment: ['&& denotes a mnemonic'] }, "&&Search Feature Requests")), click: () => this.openUrl(product.requestFeatureUrl, 'openUserVoiceUrl') }) : null, @@ -1088,7 +1094,7 @@ export class CodeMenu { this.runActionInRenderer(commandId); }; - const enabled = typeof arg3 === 'boolean' ? arg3 : this.windowsService.getWindowCount() > 0; + const enabled = typeof arg3 === 'boolean' ? arg3 : this.windowsMainService.getWindowCount() > 0; const checked = typeof arg4 === 'boolean' ? arg4 : false; let commandId: string; @@ -1113,11 +1119,11 @@ export class CodeMenu { private createContextAwareMenuItem(label: string, commandId: string, clickHandler: IMenuItemClickHandler): Electron.MenuItem { return new MenuItem(this.withKeybinding(commandId, { label: this.mnemonicLabel(label), - enabled: this.windowsService.getWindowCount() > 0, + enabled: this.windowsMainService.getWindowCount() > 0, click: () => { // No Active Window - const activeWindow = this.windowsService.getFocusedWindow(); + const activeWindow = this.windowsMainService.getFocusedWindow(); if (!activeWindow) { return clickHandler.inNoWindow(); } @@ -1137,9 +1143,9 @@ export class CodeMenu { // We make sure to not run actions when the window has no focus, this helps // for https://github.com/Microsoft/vscode/issues/25907 and specifically for // https://github.com/Microsoft/vscode/issues/11928 - const activeWindow = this.windowsService.getFocusedWindow(); + const activeWindow = this.windowsMainService.getFocusedWindow(); if (activeWindow) { - this.windowsService.sendToFocused('vscode:runAction', { id, from: 'menu' } as IRunActionInWindowRequest); + this.windowsMainService.sendToFocused('vscode:runAction', { id, from: 'menu' } as IRunActionInWindowRequest); } } @@ -1191,7 +1197,7 @@ export class CodeMenu { } private openAboutDialog(): void { - const lastActiveWindow = this.windowsService.getFocusedWindow() || this.windowsService.getLastActiveWindow(); + const lastActiveWindow = this.windowsMainService.getFocusedWindow() || this.windowsMainService.getLastActiveWindow(); const detail = nls.localize('aboutDetail', "Version {0}\nCommit {1}\nDate {2}\nShell {3}\nRenderer {4}\nNode {5}\nArchitecture {6}", @@ -1209,19 +1215,19 @@ export class CodeMenu { buttons.push(mnemonicButtonLabel(nls.localize({ key: 'copy', comment: ['&& denotes a mnemonic'] }, "&&Copy"))); // https://github.com/Microsoft/vscode/issues/37608 } - dialog.showMessageBox(lastActiveWindow && lastActiveWindow.win, { + const result = dialog.showMessageBox(lastActiveWindow && lastActiveWindow.win, { title: product.nameLong, type: 'info', message: product.nameLong, detail: `\n${detail}`, buttons, noLink: true - }, result => { - if (isWindows && result === 1) { - clipboard.writeText(detail); - } }); + if (isWindows && result === 1) { + clipboard.writeText(detail); + } + this.reportMenuActionTelemetry('showAboutDialog'); } diff --git a/src/vs/code/electron-main/sharedProcess.ts b/src/vs/code/electron-main/sharedProcess.ts index e37c9db7df5..7c1edf75906 100644 --- a/src/vs/code/electron-main/sharedProcess.ts +++ b/src/vs/code/electron-main/sharedProcess.ts @@ -20,6 +20,12 @@ export class SharedProcess implements ISharedProcess { private window: Electron.BrowserWindow; private disposables: IDisposable[] = []; + constructor( + private environmentService: IEnvironmentService, + private readonly machineId: string, + private readonly userEnv: IProcessEnvironment + ) { } + @memoize private get _whenReady(): TPromise { this.window = new BrowserWindow({ @@ -32,6 +38,7 @@ export class SharedProcess implements ISharedProcess { }); const config = assign({ appRoot: this.environmentService.appRoot, + machineId: this.machineId, nodeCachedDataDir: this.environmentService.nodeCachedDataDir, userEnv: this.userEnv }); @@ -76,11 +83,6 @@ export class SharedProcess implements ISharedProcess { }); } - constructor( - private environmentService: IEnvironmentService, - private userEnv: IProcessEnvironment - ) { } - spawn(): void { this.barrier.open(); } diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index f89884a9179..bdf16efb1f5 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -7,10 +7,9 @@ import * as path from 'path'; import * as objects from 'vs/base/common/objects'; -import { stopProfiling } from 'vs/base/node/profiler'; import nls = require('vs/nls'); import URI from 'vs/base/common/uri'; -import { IStorageService } from 'vs/platform/storage/node/storage'; +import { IStateService } from 'vs/platform/state/common/state'; import { shell, screen, BrowserWindow, systemPreferences, app, TouchBar, nativeImage } from 'electron'; import { TPromise, TValueCallback } from 'vs/base/common/winjs.base'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; @@ -18,7 +17,6 @@ import { ILogService } from 'vs/platform/log/common/log'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { parseArgs } from 'vs/platform/environment/node/argv'; import product from 'vs/platform/node/product'; -import pkg from 'vs/platform/node/package'; import { IWindowSettings, MenuBarVisibility, IWindowConfiguration, ReadyState, IRunActionInWindowRequest } from 'vs/platform/windows/common/windows'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform'; @@ -27,6 +25,7 @@ import { IWorkspaceIdentifier, IWorkspacesMainService } from 'vs/platform/worksp import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { ICommandAction } from 'vs/platform/actions/common/actions'; import { mark, exportEntries } from 'vs/base/common/performance'; +import { resolveMarketplaceHeaders } from 'vs/platform/extensionManagement/node/extensionGalleryService'; export interface IWindowState { width?: number; @@ -98,6 +97,8 @@ export class CodeWindow implements ICodeWindow { private currentConfig: IWindowConfiguration; private pendingLoadConfig: IWindowConfiguration; + private marketplaceHeadersPromise: TPromise; + private touchBarGroups: Electron.TouchBarSegmentedControl[]; constructor( @@ -105,9 +106,9 @@ export class CodeWindow implements ICodeWindow { @ILogService private logService: ILogService, @IEnvironmentService private environmentService: IEnvironmentService, @IConfigurationService private configurationService: IConfigurationService, - @IStorageService private storageService: IStorageService, - @IWorkspacesMainService private workspaceService: IWorkspacesMainService, - @IBackupMainService private backupService: IBackupMainService + @IStateService private stateService: IStateService, + @IWorkspacesMainService private workspacesMainService: IWorkspacesMainService, + @IBackupMainService private backupMainService: IBackupMainService ) { this.touchBarGroups = []; this._lastFocusTime = -1; @@ -124,6 +125,9 @@ export class CodeWindow implements ICodeWindow { // macOS: touch bar support this.createTouchBar(); + // Request handling + this.handleMarketplaceRequests(); + // Eventing this.registerListeners(); } @@ -190,7 +194,7 @@ export class CodeWindow implements ICodeWindow { this._win = new BrowserWindow(options); this._id = this._win.id; - // TODO@Ben Bug in Electron (https://github.com/electron/electron/issues/10862). On multi-monitor setups, + // Bug in Electron (https://github.com/electron/electron/issues/10862). On multi-monitor setups, // it can happen that the position we set to the window is not the correct one on the display. // To workaround, we ask the window for its position and set it again if not matching. // This only applies if the window is not fullscreen or maximized and multiple monitors are used. @@ -203,7 +207,7 @@ export class CodeWindow implements ICodeWindow { } } } catch (err) { - this.logService.log(`Unexpected error fixing window position on windows with multiple windows: ${err}\n${err.stack}`); + this.logService.warn(`Unexpected error fixing window position on windows with multiple windows: ${err}\n${err.stack}`); } } @@ -331,17 +335,21 @@ export class CodeWindow implements ICodeWindow { return this._readyState; } - private registerListeners(): void { - const urls = ['https://marketplace.visualstudio.com/*', 'https://*.vsassets.io/*']; - const headers = { - 'X-Market-Client-Id': `VSCode ${pkg.version}`, - 'User-Agent': `VSCode ${pkg.version}`, - 'X-Market-User-Id': this.environmentService.machineUUID - }; + private handleMarketplaceRequests(): void { + // Resolve marketplace headers + this.marketplaceHeadersPromise = resolveMarketplaceHeaders(this.environmentService); + + // Inject headers when requests are incoming + const urls = ['https://marketplace.visualstudio.com/*', 'https://*.vsassets.io/*']; this._win.webContents.session.webRequest.onBeforeSendHeaders({ urls }, (details: any, cb: any) => { - cb({ cancel: false, requestHeaders: objects.assign(details.requestHeaders, headers) }); + this.marketplaceHeadersPromise.done(headers => { + cb({ cancel: false, requestHeaders: objects.assign(details.requestHeaders, headers) }); + }); }); + } + + private registerListeners(): void { // Prevent loading of svgs this._win.webContents.session.webRequest.onBeforeRequest(null, (details, callback) => { @@ -430,7 +438,7 @@ export class CodeWindow implements ICodeWindow { this.toDispose.push(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated())); // Handle Workspace events - this.toDispose.push(this.workspaceService.onUntitledWorkspaceDeleted(e => this.onUntitledWorkspaceDeleted(e))); + this.toDispose.push(this.workspacesMainService.onUntitledWorkspaceDeleted(e => this.onUntitledWorkspaceDeleted(e))); } private onUntitledWorkspaceDeleted(workspace: IWorkspaceIdentifier): void { @@ -493,7 +501,7 @@ export class CodeWindow implements ICodeWindow { // Clear Document Edited if needed if (isMacintosh && this._win.isDocumentEdited()) { - if (!isReload || !this.backupService.isHotExitEnabled()) { + if (!isReload || !this.backupMainService.isHotExitEnabled()) { this._win.setDocumentEdited(false); } } @@ -522,12 +530,6 @@ export class CodeWindow implements ICodeWindow { } }, 10000); } - - // (--prof-startup) save profile to disk - const { profileStartup } = this.environmentService; - if (profileStartup) { - stopProfiling(profileStartup.dir, profileStartup.prefix).done(undefined, err => this.logService.error(err)); - } } public reload(configuration?: IWindowConfiguration, cli?: ParsedArgs): void { @@ -561,6 +563,9 @@ export class CodeWindow implements ICodeWindow { private getUrl(windowConfiguration: IWindowConfiguration): string { + // Set window ID + windowConfiguration.windowId = this._win.id; + // Set zoomlevel const windowConfig = this.configurationService.getValue('window'); const zoomLevel = windowConfig && windowConfig.zoomLevel; @@ -602,7 +607,7 @@ export class CodeWindow implements ICodeWindow { return 'hc-black'; } - const theme = this.storageService.getItem(CodeWindow.themeStorageKey, 'vs-dark'); + const theme = this.stateService.getItem(CodeWindow.themeStorageKey, 'vs-dark'); return theme.split(' ')[0]; } @@ -612,7 +617,7 @@ export class CodeWindow implements ICodeWindow { return CodeWindow.DEFAULT_BG_HC_BLACK; } - const background = this.storageService.getItem(CodeWindow.themeBackgroundStorageKey, null); + const background = this.stateService.getItem(CodeWindow.themeBackgroundStorageKey, null); if (!background) { const baseTheme = this.getBaseTheme(); @@ -678,7 +683,7 @@ export class CodeWindow implements ICodeWindow { try { state = this.validateWindowState(state); } catch (err) { - this.logService.log(`Unexpected error validating window state: ${err}\n${err.stack}`); // somehow display API can be picky about the state to validate + this.logService.warn(`Unexpected error validating window state: ${err}\n${err.stack}`); // somehow display API can be picky about the state to validate } } diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 14825f0daf4..2dab6f94941 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -12,7 +12,7 @@ import * as arrays from 'vs/base/common/arrays'; import { assign, mixin, equals } from 'vs/base/common/objects'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; -import { IStorageService } from 'vs/platform/storage/node/storage'; +import { IStateService } from 'vs/platform/state/common/state'; import { CodeWindow, IWindowState as ISingleWindowState, defaultWindowState, WindowMode } from 'vs/code/electron-main/window'; import { ipcMain as ipc, screen, BrowserWindow, dialog, systemPreferences, app } from 'electron'; import { IPathWithLineAndColumn, parseLineAndColumnAware } from 'vs/code/node/paths'; @@ -45,10 +45,6 @@ interface INewWindowState extends ISingleWindowState { hasDefaultState?: boolean; } -interface ILegacyWindowState extends IWindowState { - workspacePath?: string; -} - interface IWindowState { workspace?: IWorkspaceIdentifier; folderPath?: string; @@ -56,10 +52,6 @@ interface IWindowState { uiState: ISingleWindowState; } -interface ILegacyWindowsState extends IWindowsState { - openedFolders?: IWindowState[]; -} - interface IWindowsState { lastActiveWindow?: IWindowState; lastPluginDevelopmentHostWindow?: IWindowState; @@ -138,51 +130,25 @@ export class WindowsManager implements IWindowsMainService { onWindowsCountChanged: CommonEvent = this._onWindowsCountChanged.event; constructor( + private readonly machineId: string, @ILogService private logService: ILogService, - @IStorageService private storageService: IStorageService, + @IStateService private stateService: IStateService, @IEnvironmentService private environmentService: IEnvironmentService, @ILifecycleService private lifecycleService: ILifecycleService, - @IBackupMainService private backupService: IBackupMainService, + @IBackupMainService private backupMainService: IBackupMainService, @ITelemetryService telemetryService: ITelemetryService, @IConfigurationService private configurationService: IConfigurationService, - @IHistoryMainService private historyService: IHistoryMainService, - @IWorkspacesMainService private workspacesService: IWorkspacesMainService, + @IHistoryMainService private historyMainService: IHistoryMainService, + @IWorkspacesMainService private workspacesMainService: IWorkspacesMainService, @IInstantiationService private instantiationService: IInstantiationService ) { - this.windowsState = this.storageService.getItem(WindowsManager.windowsStateStorageKey) || { openedWindows: [] }; - - this.fileDialog = new FileDialog(environmentService, telemetryService, storageService, this); - this.workspacesManager = new WorkspacesManager(workspacesService, backupService, environmentService, this); - - this.migrateLegacyWindowState(); - } - - private migrateLegacyWindowState(): void { - const state: ILegacyWindowsState = this.windowsState; - - // TODO@Ben migration from previous openedFolders to new openedWindows property - if (Array.isArray(state.openedFolders) && state.openedFolders.length > 0) { - state.openedWindows = state.openedFolders; - state.openedFolders = void 0; - } else if (!state.openedWindows) { - state.openedWindows = []; + this.windowsState = this.stateService.getItem(WindowsManager.windowsStateStorageKey) || { openedWindows: [] }; + if (!Array.isArray(this.windowsState.openedWindows)) { + this.windowsState.openedWindows = []; } - // TODO@Ben migration from previous workspacePath in window state to folderPath - const states: ILegacyWindowState[] = []; - states.push(state.lastActiveWindow); - states.push(state.lastPluginDevelopmentHostWindow); - states.push(...state.openedWindows); - states.forEach(state => { - if (!state) { - return; - } - - if (typeof state.workspacePath === 'string') { - state.folderPath = state.workspacePath; - state.workspacePath = void 0; - } - }); + this.fileDialog = new FileDialog(environmentService, telemetryService, stateService, this); + this.workspacesManager = new WorkspacesManager(workspacesMainService, backupMainService, environmentService, this); } public ready(initialUserEnv: IProcessEnvironment): void { @@ -202,7 +168,7 @@ export class WindowsManager implements IWindowsMainService { // React to workbench loaded events from windows ipc.on('vscode:workbenchLoaded', (_event: any, windowId: number) => { - this.logService.log('IPC#vscode-workbenchLoaded'); + this.logService.trace('IPC#vscode-workbenchLoaded'); const win = this.getWindowById(windowId); if (win) { @@ -276,7 +242,7 @@ export class WindowsManager implements IWindowsMainService { // - closeAll(2): onBeforeWindowClose(2, false), onBeforeWindowClose(2, false), onBeforeQuit(0) // private onBeforeQuit(): void { - const currentWindowsState: ILegacyWindowsState = { + const currentWindowsState: IWindowsState = { openedWindows: [], lastPluginDevelopmentHostWindow: this.windowsState.lastPluginDevelopmentHostWindow, lastActiveWindow: this.lastClosedWindowState @@ -310,7 +276,7 @@ export class WindowsManager implements IWindowsMainService { } // Persist - this.storageService.setItem(WindowsManager.windowsStateStorageKey, currentWindowsState); + this.stateService.setItem(WindowsManager.windowsStateStorageKey, currentWindowsState); } // See note on #onBeforeQuit() for details how these events are flowing @@ -403,12 +369,12 @@ export class WindowsManager implements IWindowsMainService { let workspacesToRestore: IWorkspaceIdentifier[] = []; let emptyToRestore: string[] = []; if (openConfig.initialStartup && !openConfig.cli.extensionDevelopmentPath) { - foldersToRestore = this.backupService.getFolderBackupPaths(); + foldersToRestore = this.backupMainService.getFolderBackupPaths(); - workspacesToRestore = this.backupService.getWorkspaceBackups(); // collect from workspaces with hot-exit backups - workspacesToRestore.push(...this.workspacesService.getUntitledWorkspacesSync()); // collect from previous window session + workspacesToRestore = this.backupMainService.getWorkspaceBackups(); // collect from workspaces with hot-exit backups + workspacesToRestore.push(...this.workspacesMainService.getUntitledWorkspacesSync()); // collect from previous window session - emptyToRestore = this.backupService.getEmptyWindowBackupPaths(); + emptyToRestore = this.backupMainService.getEmptyWindowBackupPaths(); emptyToRestore.push(...pathsToOpen.filter(w => !w.workspace && !w.folderPath && w.backupPath).map(w => basename(w.backupPath))); // add empty windows with backupPath emptyToRestore = arrays.distinct(emptyToRestore); // prevent duplicates } @@ -475,7 +441,9 @@ export class WindowsManager implements IWindowsMainService { } }); - this.historyService.addRecentlyOpened(recentlyOpenedWorkspaces, recentlyOpenedFiles); + if (!this.environmentService.skipAddToRecentlyOpened) { + this.historyMainService.addRecentlyOpened(recentlyOpenedWorkspaces, recentlyOpenedFiles); + } } // If we got started with --wait from the CLI, we need to signal to the outside when the window @@ -541,7 +509,7 @@ export class WindowsManager implements IWindowsMainService { context: openConfig.context, filePath: fileToCheck && fileToCheck.filePath, userHome: this.environmentService.userHome, - workspaceResolver: workspace => this.workspacesService.resolveWorkspaceSync(workspace.configPath) + workspaceResolver: workspace => this.workspacesMainService.resolveWorkspaceSync(workspace.configPath) }); // Special case: we started with --wait and we got back a folder to open. In this case @@ -796,7 +764,7 @@ export class WindowsManager implements IWindowsMainService { if (!openConfig.addMode && isCommandLineOrAPICall) { const foldersToOpen = windowsToOpen.filter(path => !!path.folderPath); if (foldersToOpen.length > 1) { - const workspace = this.workspacesService.createWorkspaceSync(foldersToOpen.map(folder => ({ uri: URI.file(folder.folderPath) }))); + const workspace = this.workspacesMainService.createWorkspaceSync(foldersToOpen.map(folder => ({ uri: URI.file(folder.folderPath) }))); // Add workspace and remove folders thereby windowsToOpen.push({ workspace }); @@ -937,10 +905,6 @@ export class WindowsManager implements IWindowsMainService { const windowConfig = this.configurationService.getValue('window'); restoreWindows = ((windowConfig && windowConfig.restoreWindows) || 'one') as RestoreWindowsSetting; - if (restoreWindows === 'one' /* default */ && windowConfig && windowConfig.reopenFolders) { - restoreWindows = windowConfig.reopenFolders; // TODO@Ben migration from deprecated window.reopenFolders setting - } - if (['all', 'folders', 'one', 'none'].indexOf(restoreWindows) === -1) { restoreWindows = 'one'; } @@ -970,7 +934,7 @@ export class WindowsManager implements IWindowsMainService { // Workspace (unless disabled via flag) if (!options || !options.forceOpenWorkspaceAsFile) { - const workspace = this.workspacesService.resolveWorkspaceSync(candidate); + const workspace = this.workspacesMainService.resolveWorkspaceSync(candidate); if (workspace) { return { workspace: { id: workspace.id, configPath: workspace.configPath } }; } @@ -990,7 +954,7 @@ export class WindowsManager implements IWindowsMainService { }; } } catch (error) { - this.historyService.removeFromRecentlyOpened([candidate]); // since file does not seem to exist anymore, remove from recent + this.historyMainService.removeFromRecentlyOpened([candidate]); // since file does not seem to exist anymore, remove from recent if (options && options.ignoreFileNotFound) { return { filePath: candidate, createFilePath: true }; // assume this is a file that does not yet exist @@ -1065,6 +1029,7 @@ export class WindowsManager implements IWindowsMainService { // Build IWindowConfiguration from config and options const configuration: IWindowConfiguration = mixin({}, options.cli); // inherit all properties from CLI configuration.appRoot = this.environmentService.appRoot; + configuration.machineId = this.machineId; configuration.execPath = process.execPath; configuration.userEnv = assign({}, this.initialUserEnv, options.userEnv || {}); configuration.isInitialStartup = options.initialStartup; @@ -1158,11 +1123,11 @@ export class WindowsManager implements IWindowsMainService { // Register window for backups if (!configuration.extensionDevelopmentPath) { if (configuration.workspace) { - configuration.backupPath = this.backupService.registerWorkspaceBackupSync(configuration.workspace); + configuration.backupPath = this.backupMainService.registerWorkspaceBackupSync(configuration.workspace); } else if (configuration.folderPath) { - configuration.backupPath = this.backupService.registerFolderBackupSync(configuration.folderPath); + configuration.backupPath = this.backupMainService.registerFolderBackupSync(configuration.folderPath); } else { - configuration.backupPath = this.backupService.registerEmptyWindowBackupSync(options.emptyWindowBackupFolder); + configuration.backupPath = this.backupMainService.registerEmptyWindowBackupSync(options.emptyWindowBackupFolder); } } @@ -1332,7 +1297,7 @@ export class WindowsManager implements IWindowsMainService { private doEnterWorkspace(win: CodeWindow, result: IEnterWorkspaceResult): IEnterWorkspaceResult { // Mark as recently opened - this.historyService.addRecentlyOpened([result.workspace], []); + this.historyMainService.addRecentlyOpened([result.workspace], []); // Trigger Eevent to indicate load of workspace into window this._onWindowReady.fire(win); @@ -1352,7 +1317,7 @@ export class WindowsManager implements IWindowsMainService { } const workspace = e.window.openedWorkspace; - if (!workspace || !this.workspacesService.isUntitledWorkspace(workspace)) { + if (!workspace || !this.workspacesMainService.isUntitledWorkspace(workspace)) { return; // only care about untitled workspaces to ask for saving } @@ -1453,48 +1418,48 @@ export class WindowsManager implements IWindowsMainService { // Unresponsive if (error === WindowError.UNRESPONSIVE) { - dialog.showMessageBox(window.win, { + const result = dialog.showMessageBox(window.win, { title: product.nameLong, type: 'warning', buttons: [mnemonicButtonLabel(localize({ key: 'reopen', comment: ['&& denotes a mnemonic'] }, "&&Reopen")), mnemonicButtonLabel(localize({ key: 'wait', comment: ['&& denotes a mnemonic'] }, "&&Keep Waiting")), mnemonicButtonLabel(localize({ key: 'close', comment: ['&& denotes a mnemonic'] }, "&&Close"))], message: localize('appStalled', "The window is no longer responding"), detail: localize('appStalledDetail', "You can reopen or close the window or keep waiting."), noLink: true - }, result => { - if (!window.win) { - return; // Return early if the window has been going down already - } - - if (result === 0) { - window.reload(); - } else if (result === 2) { - this.onBeforeWindowClose(window); // 'close' event will not be fired on destroy(), so run it manually - window.win.destroy(); // make sure to destroy the window as it is unresponsive - } }); + + if (!window.win) { + return; // Return early if the window has been going down already + } + + if (result === 0) { + window.reload(); + } else if (result === 2) { + this.onBeforeWindowClose(window); // 'close' event will not be fired on destroy(), so run it manually + window.win.destroy(); // make sure to destroy the window as it is unresponsive + } } // Crashed else { - dialog.showMessageBox(window.win, { + const result = dialog.showMessageBox(window.win, { title: product.nameLong, type: 'warning', buttons: [mnemonicButtonLabel(localize({ key: 'reopen', comment: ['&& denotes a mnemonic'] }, "&&Reopen")), mnemonicButtonLabel(localize({ key: 'close', comment: ['&& denotes a mnemonic'] }, "&&Close"))], message: localize('appCrashed', "The window has crashed"), detail: localize('appCrashedDetail', "We are sorry for the inconvenience! You can reopen the window to continue where you left off."), noLink: true - }, result => { - if (!window.win) { - return; // Return early if the window has been going down already - } - - if (result === 0) { - window.reload(); - } else if (result === 1) { - this.onBeforeWindowClose(window); // 'close' event will not be fired on destroy(), so run it manually - window.win.destroy(); // make sure to destroy the window as it has crashed - } }); + + if (!window.win) { + return; // Return early if the window has been going down already + } + + if (result === 0) { + window.reload(); + } else if (result === 1) { + this.onBeforeWindowClose(window); // 'close' event will not be fired on destroy(), so run it manually + window.win.destroy(); // make sure to destroy the window as it has crashed + } } } @@ -1587,7 +1552,7 @@ class FileDialog { constructor( private environmentService: IEnvironmentService, private telemetryService: ITelemetryService, - private storageService: IStorageService, + private stateService: IStateService, private windowsMainService: IWindowsMainService ) { } @@ -1628,7 +1593,7 @@ class FileDialog { // Ensure defaultPath if (!options.dialogOptions.defaultPath) { - options.dialogOptions.defaultPath = this.storageService.getItem(FileDialog.workingDirPickerStorageKey); + options.dialogOptions.defaultPath = this.stateService.getItem(FileDialog.workingDirPickerStorageKey); } // Ensure properties @@ -1650,21 +1615,20 @@ class FileDialog { // Show Dialog const focusedWindow = this.windowsMainService.getWindowById(options.windowId) || this.windowsMainService.getFocusedWindow(); - dialog.showOpenDialog(focusedWindow && focusedWindow.win, options.dialogOptions, paths => { - if (paths && paths.length > 0) { - if (isMacintosh) { - paths = paths.map(path => normalizeNFC(path)); // normalize paths returned from the OS - } - - // Remember path in storage for next time - this.storageService.setItem(FileDialog.workingDirPickerStorageKey, dirname(paths[0])); - - // Return - return clb(paths); + let paths = dialog.showOpenDialog(focusedWindow && focusedWindow.win, options.dialogOptions); + if (paths && paths.length > 0) { + if (isMacintosh) { + paths = paths.map(path => normalizeNFC(path)); // normalize paths returned from the OS } - return clb(void (0)); - }); + // Remember path in storage for next time + this.stateService.setItem(FileDialog.workingDirPickerStorageKey, dirname(paths[0])); + + // Return + return clb(paths); + } + + return clb(void (0)); } } diff --git a/src/vs/code/node/cli.ts b/src/vs/code/node/cli.ts index bbad96d8893..fe645ff4e0d 100644 --- a/src/vs/code/node/cli.ts +++ b/src/vs/code/node/cli.ts @@ -3,18 +3,20 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { spawn } from 'child_process'; +import { spawn, ChildProcess } from 'child_process'; import { TPromise } from 'vs/base/common/winjs.base'; import { assign } from 'vs/base/common/objects'; import { parseCLIProcessArgv, buildHelpMessage } from 'vs/platform/environment/node/argv'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import product from 'vs/platform/node/product'; import pkg from 'vs/platform/node/package'; - -import * as fs from 'fs'; import * as paths from 'path'; import * as os from 'os'; +import * as fs from 'fs'; import { whenDeleted } from 'vs/base/node/pfs'; +import { findFreePort } from 'vs/base/node/ports'; +import { resolveTerminalEncoding } from 'vs/base/node/encoding'; +import * as iconv from 'iconv-lite'; function shouldSpawnCliProcess(argv: ParsedArgs): boolean { return !!argv['install-source'] @@ -27,7 +29,7 @@ interface IMainCli { main: (argv: ParsedArgs) => TPromise; } -export function main(argv: string[]): TPromise { +export async function main(argv: string[]): TPromise { let args: ParsedArgs; try { @@ -37,14 +39,24 @@ export function main(argv: string[]): TPromise { return TPromise.as(null); } + // Help if (args.help) { console.log(buildHelpMessage(product.nameLong, product.applicationName, pkg.version)); - } else if (args.version) { + } + + // Version Info + else if (args.version) { console.log(`${pkg.version}\n${product.commit}\n${process.arch}`); - } else if (shouldSpawnCliProcess(args)) { + } + + // Extensions Management + else if (shouldSpawnCliProcess(args)) { const mainCli = new TPromise(c => require(['vs/code/node/cliProcessMain'], c)); return mainCli.then(cli => cli.main(args)); - } else { + } + + // Just Code + else { const env = assign({}, process.env, { // this will signal Code that it was spawned from this module 'VSCODE_CLI': '1', @@ -53,8 +65,62 @@ export function main(argv: string[]): TPromise { delete env['ELECTRON_RUN_AS_NODE']; - if (args.verbose) { + let processCallbacks: ((child: ChildProcess) => Thenable)[] = []; + + const verbose = args.verbose || args.status; + + if (verbose) { env['ELECTRON_ENABLE_LOGGING'] = '1'; + + processCallbacks.push(child => { + child.stdout.on('data', (data: Buffer) => console.log(data.toString('utf8').trim())); + child.stderr.on('data', (data: Buffer) => console.log(data.toString('utf8').trim())); + + return new TPromise(c => child.once('exit', () => c(null))); + }); + } + + // If we are running with input from stdin, pipe that into a file and + // open this file via arguments. Ignore this when we are passed with + // paths to open. + let isReadingFromStdin: boolean; + try { + isReadingFromStdin = args._.length === 0 && !process.stdin.isTTY; // Via https://twitter.com/MylesBorins/status/782009479382626304 + } catch (error) { + // Windows workaround for https://github.com/nodejs/node/issues/11656 + } + + let stdinFilePath: string; + if (isReadingFromStdin) { + let stdinFileError: Error; + stdinFilePath = paths.join(os.tmpdir(), `code-stdin-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 3)}.txt`); + try { + const stdinFileStream = fs.createWriteStream(stdinFilePath); + resolveTerminalEncoding(verbose).done(encoding => { + + // Pipe into tmp file using terminals encoding + const converterStream = iconv.decodeStream(encoding); + process.stdin.pipe(converterStream).pipe(stdinFileStream); + }); + + // Make sure to open tmp file + argv.push(stdinFilePath); + + // Enable --wait to get all data and ignore adding this to history + argv.push('--wait'); + argv.push('--skip-add-to-recently-opened'); + args.wait = true; + } catch (error) { + stdinFileError = error; + } + + if (verbose) { + if (stdinFileError) { + console.error(`Failed to create file to read via stdin: ${stdinFileError.toString()}`); + } else { + console.log(`Reading from stdin via: ${stdinFilePath}`); + } + } } // If we are started with --wait create a random temporary file @@ -73,7 +139,7 @@ export function main(argv: string[]): TPromise { waitMarkerError = error; } - if (args.verbose) { + if (verbose) { if (waitMarkerError) { console.error(`Failed to create marker file for --wait: ${waitMarkerError.toString()}`); } else { @@ -82,26 +148,76 @@ export function main(argv: string[]): TPromise { } } + // If we have been started with `--prof-startup` we need to find free ports to profile + // the main process, the renderer, and the extension host. We also disable v8 cached data + // to get better profile traces. Last, we listen on stdout for a signal that tells us to + // stop profiling. + if (args['prof-startup']) { + const portMain = await findFreePort(9222, 10, 6000); + const portRenderer = await findFreePort(portMain + 1, 10, 6000); + const portExthost = await findFreePort(portRenderer + 1, 10, 6000); + + if (!portMain || !portRenderer || !portExthost) { + console.error('Failed to find free ports for profiler to connect to do.'); + return; + } + + const filenamePrefix = paths.join(os.homedir(), Math.random().toString(16).slice(-4)); + + argv.push(`--inspect-brk=${portMain}`); + argv.push(`--remote-debugging-port=${portRenderer}`); + argv.push(`--inspect-brk-extensions=${portExthost}`); + argv.push(`--prof-startup-prefix`, filenamePrefix); + argv.push(`--no-cached-data`); + + fs.writeFileSync(filenamePrefix, argv.slice(-6).join('|')); + + processCallbacks.push(async child => { + + // load and start profiler + const profiler = await import('v8-inspect-profiler'); + const main = await profiler.startProfiling({ port: portMain }); + const renderer = await profiler.startProfiling({ port: portRenderer, tries: 200 }); + const extHost = await profiler.startProfiling({ port: portExthost, tries: 300 }); + + // wait for the renderer to delete the + // marker file + whenDeleted(filenamePrefix); + + let profileMain = await main.stop(); + let profileRenderer = await renderer.stop(); + let profileExtHost = await extHost.stop(); + let suffix = ''; + + if (!process.env['VSCODE_DEV']) { + // when running from a not-development-build we remove + // absolute filenames because we don't want to reveal anything + // about users. We also append the `.txt` suffix to make it + // easier to attach these files to GH issues + profileMain = profiler.rewriteAbsolutePaths(profileMain, 'piiRemoved'); + profileRenderer = profiler.rewriteAbsolutePaths(profileRenderer, 'piiRemoved'); + profileExtHost = profiler.rewriteAbsolutePaths(profileExtHost, 'piiRemoved'); + suffix = '.txt'; + } + + // finally stop profiling and save profiles to disk + await profiler.writeProfile(profileMain, `${filenamePrefix}-main.cpuprofile${suffix}`); + await profiler.writeProfile(profileRenderer, `${filenamePrefix}-renderer.cpuprofile${suffix}`); + await profiler.writeProfile(profileExtHost, `${filenamePrefix}-exthost.cpuprofile${suffix}`); + }); + } + const options = { detached: true, env }; - if (!args.verbose) { + if (!verbose) { options['stdio'] = 'ignore'; } const child = spawn(process.execPath, argv.slice(2), options); - if (args.verbose) { - child.stdout.on('data', (data: Buffer) => console.log(data.toString('utf8').trim())); - child.stderr.on('data', (data: Buffer) => console.log(data.toString('utf8').trim())); - } - - if (args.verbose) { - return new TPromise(c => child.once('exit', () => c(null))); - } - if (args.wait && waitMarkerFilePath) { return new TPromise(c => { @@ -110,8 +226,16 @@ export function main(argv: string[]): TPromise { // Complete when wait marker file is deleted whenDeleted(waitMarkerFilePath).done(c, c); + }).then(() => { + + // Make sure to delete the tmp stdin file if we have any + if (stdinFilePath) { + fs.unlinkSync(stdinFilePath); + } }); } + + return TPromise.join(processCallbacks.map(callback => callback(child))); } return TPromise.as(null); diff --git a/src/vs/code/node/cliProcessMain.ts b/src/vs/code/node/cliProcessMain.ts index 288dba2a9af..dfdaf922741 100644 --- a/src/vs/code/node/cliProcessMain.ts +++ b/src/vs/code/node/cliProcessMain.ts @@ -7,7 +7,6 @@ import { localize } from 'vs/nls'; import product from 'vs/platform/node/product'; import pkg from 'vs/platform/node/package'; import * as path from 'path'; -import * as fs from 'fs'; import { TPromise } from 'vs/base/common/winjs.base'; import { sequence } from 'vs/base/common/async'; @@ -17,7 +16,7 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; -import { EnvironmentService, getInstallSourcePath } from 'vs/platform/environment/node/environmentService'; +import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import { IExtensionManagementService, IExtensionGalleryService, IExtensionManifest, IGalleryExtension, LocalExtensionType } from 'vs/platform/extensionManagement/common/extensionManagement'; import { ExtensionManagementService, validateLocalExtension } from 'vs/platform/extensionManagement/node/extensionManagementService'; import { ExtensionGalleryService } from 'vs/platform/extensionManagement/node/extensionGalleryService'; @@ -30,10 +29,15 @@ import { RequestService } from 'vs/platform/request/node/requestService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ConfigurationService } from 'vs/platform/configuration/node/configurationService'; import { AppInsightsAppender } from 'vs/platform/telemetry/node/appInsightsAppender'; -import { mkdirp } from 'vs/base/node/pfs'; +import { mkdirp, writeFile } from 'vs/base/node/pfs'; import { IChoiceService } from 'vs/platform/message/common/message'; import { ChoiceCliService } from 'vs/platform/message/node/messageCli'; import { getBaseLabel } from 'vs/base/common/labels'; +import { IStateService } from 'vs/platform/state/common/state'; +import { StateService } from 'vs/platform/state/node/stateService'; +import { createLogService } from 'vs/platform/log/node/spdlogService'; +import { ILogService } from 'vs/platform/log/common/log'; +import { isPromiseCanceledError } from 'vs/base/common/errors'; const notFound = (id: string) => localize('notFound', "Extension '{0}' not found.", id); const notInstalled = (id: string) => localize('notInstalled', "Extension '{0}' is not installed.", id); @@ -77,10 +81,7 @@ class Main { } private setInstallSource(installSource: string): TPromise { - return new TPromise((c, e) => { - const path = getInstallSourcePath(this.environmentService.userDataPath); - fs.writeFile(path, installSource.slice(0, 30), 'utf8', err => err ? e(err) : c(null)); - }); + return writeFile(this.environmentService.installSourcePath, installSource.slice(0, 30)); } private listExtensions(showVersions: boolean): TPromise { @@ -97,6 +98,13 @@ class Main { return this.extensionManagementService.install(extension).then(() => { console.log(localize('successVsixInstall', "Extension '{0}' was successfully installed!", getBaseLabel(extension))); + }, error => { + if (isPromiseCanceledError(error)) { + console.log(localize('cancelVsixInstall', "Cancelled installing Extension '{0}'.", getBaseLabel(extension))); + return null; + } else { + return TPromise.wrapError(error); + } }); }); @@ -135,7 +143,16 @@ class Main { console.log(localize('installing', "Installing...")); return this.extensionManagementService.installFromGallery(extension) - .then(() => console.log(localize('successInstall', "Extension '{0}' v{1} was successfully installed!", id, extension.version))); + .then( + () => console.log(localize('successInstall', "Extension '{0}' v{1} was successfully installed!", id, extension.version)), + error => { + if (isPromiseCanceledError(error)) { + console.log(localize('cancelVsixInstall', "Cancelled installing Extension '{0}'.", id)); + return null; + } else { + return TPromise.wrapError(error); + } + }); }); }); }); @@ -177,15 +194,25 @@ const eventPrefix = 'monacoworkbench'; export function main(argv: ParsedArgs): TPromise { const services = new ServiceCollection(); - services.set(IEnvironmentService, new SyncDescriptor(EnvironmentService, argv, process.execPath)); + + const environmentService = new EnvironmentService(argv, process.execPath); + const logService = createLogService('cli', environmentService); + process.once('exit', () => logService.dispose()); + + logService.info('main', argv); + + services.set(IEnvironmentService, environmentService); + services.set(ILogService, logService); + services.set(IStateService, new SyncDescriptor(StateService)); const instantiationService: IInstantiationService = new InstantiationService(services); return instantiationService.invokeFunction(accessor => { const envService = accessor.get(IEnvironmentService); + const stateService = accessor.get(IStateService); return TPromise.join([envService.appSettingsHome, envService.extensionsPath].map(p => mkdirp(p))).then(() => { - const { appRoot, extensionsPath, extensionDevelopmentPath, isBuilt, installSource } = envService; + const { appRoot, extensionsPath, extensionDevelopmentPath, isBuilt, installSourcePath } = envService; const services = new ServiceCollection(); services.set(IConfigurationService, new SyncDescriptor(ConfigurationService)); @@ -207,7 +234,7 @@ export function main(argv: ParsedArgs): TPromise { const config: ITelemetryServiceConfig = { appender: combinedAppender(...appenders), - commonProperties: resolveCommonProperties(product.commit, pkg.version, installSource), + commonProperties: resolveCommonProperties(product.commit, pkg.version, stateService.getItem('telemetry.machineId'), installSourcePath), piiPaths: [appRoot, extensionsPath] }; diff --git a/src/vs/editor/browser/controller/coreCommands.ts b/src/vs/editor/browser/controller/coreCommands.ts index 4d00a70ec19..313479b1766 100644 --- a/src/vs/editor/browser/controller/coreCommands.ts +++ b/src/vs/editor/browser/controller/coreCommands.ts @@ -32,7 +32,12 @@ const CORE_WEIGHT = KeybindingsRegistry.WEIGHT.editorCore(); export abstract class CoreEditorCommand extends EditorCommand { public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void { - this.runCoreEditorCommand(editor._getCursors(), args || {}); + const cursors = editor._getCursors(); + if (!cursors) { + // the editor has no view => has no cursors + return; + } + this.runCoreEditorCommand(cursors, args || {}); } public abstract runCoreEditorCommand(cursors: ICursors, args: any): void; diff --git a/src/vs/editor/browser/controller/pointerHandler.ts b/src/vs/editor/browser/controller/pointerHandler.ts index 2c7548ff84b..d8a44df6837 100644 --- a/src/vs/editor/browser/controller/pointerHandler.ts +++ b/src/vs/editor/browser/controller/pointerHandler.ts @@ -188,12 +188,10 @@ class StandardPointerHandler extends MouseHandler implements IDisposable { class TouchHandler extends MouseHandler { - private gesture: Gesture; - constructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) { super(context, viewController, viewHelper); - this.gesture = new Gesture(this.viewHelper.linesContentDomNode); + Gesture.addTarget(this.viewHelper.linesContentDomNode); this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e))); this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e))); @@ -202,7 +200,6 @@ class TouchHandler extends MouseHandler { } public dispose(): void { - this.gesture.dispose(); super.dispose(); } diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index 1a5b5219870..5dfe1c8c4c5 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -35,7 +35,7 @@ export class CodeEditorServiceImpl extends AbstractCodeEditorService { styleSheet: this._styleSheet, key: key, parentTypeKey: parentTypeKey, - options: options + options: options || Object.create(null) }; if (!parentTypeKey) { provider = new DecorationTypeOptionsProvider(this._themeService, providerArgs); diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index d1f2e969b29..34eb4d6e194 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -31,6 +31,7 @@ import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/com import { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder, editorInfoBorder, editorInfoForeground } from 'vs/editor/common/view/editorColorRegistry'; import { Color } from 'vs/base/common/color'; import { IMouseEvent } from 'vs/base/browser/mouseEvent'; +import { ClassName } from 'vs/editor/common/model/intervalTree'; export abstract class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.ICodeEditor { @@ -477,28 +478,28 @@ function getSquigglySVGData(color: Color) { registerThemingParticipant((theme, collector) => { let errorBorderColor = theme.getColor(editorErrorBorder); if (errorBorderColor) { - collector.addRule(`.monaco-editor .squiggly-c-error { border-bottom: 4px double ${errorBorderColor}; }`); + collector.addRule(`.monaco-editor .${ClassName.EditorErrorDecoration} { border-bottom: 4px double ${errorBorderColor}; }`); } let errorForeground = theme.getColor(editorErrorForeground); if (errorForeground) { - collector.addRule(`.monaco-editor .squiggly-c-error { background: url("data:image/svg+xml;utf8,${getSquigglySVGData(errorForeground)}") repeat-x bottom left; }`); + collector.addRule(`.monaco-editor .${ClassName.EditorErrorDecoration} { background: url("data:image/svg+xml;utf8,${getSquigglySVGData(errorForeground)}") repeat-x bottom left; }`); } let warningBorderColor = theme.getColor(editorWarningBorder); if (warningBorderColor) { - collector.addRule(`.monaco-editor .squiggly-b-warning { border-bottom: 4px double ${warningBorderColor}; }`); + collector.addRule(`.monaco-editor .${ClassName.EditorWarningDecoration} { border-bottom: 4px double ${warningBorderColor}; }`); } let warningForeground = theme.getColor(editorWarningForeground); if (warningForeground) { - collector.addRule(`.monaco-editor .squiggly-b-warning { background: url("data:image/svg+xml;utf8,${getSquigglySVGData(warningForeground)}") repeat-x bottom left; }`); + collector.addRule(`.monaco-editor .${ClassName.EditorWarningDecoration} { background: url("data:image/svg+xml;utf8,${getSquigglySVGData(warningForeground)}") repeat-x bottom left; }`); } let infoBorderColor = theme.getColor(editorInfoBorder); - if (warningBorderColor) { - collector.addRule(`.monaco-editor .squiggly-c-info { border-bottom: 4px double ${infoBorderColor}; }`); + if (infoBorderColor) { + collector.addRule(`.monaco-editor .${ClassName.EditorInfoDecoration} { border-bottom: 4px double ${infoBorderColor}; }`); } let infoForeground = theme.getColor(editorInfoForeground); - if (warningForeground) { - collector.addRule(`.monaco-editor .squiggly-c-info { background: url("data:image/svg+xml;utf8,${getSquigglySVGData(infoForeground)}") repeat-x bottom left; }`); + if (infoForeground) { + collector.addRule(`.monaco-editor .${ClassName.EditorInfoDecoration} { background: url("data:image/svg+xml;utf8,${getSquigglySVGData(infoForeground)}") repeat-x bottom left; }`); } }); diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 8593c6e4677..0eef59e694f 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -290,6 +290,11 @@ const editorConfiguration: IConfigurationNode = { 'default': EDITOR_DEFAULTS.contribInfo.find.autoFindInSelection, 'description': nls.localize('find.autoFindInSelection', "Controls if Find in Selection flag is turned on when multiple characters or lines of text are selected in the editor") }, + 'editor.find.globalFindClipboard': { + 'type': 'boolean', + 'default': EDITOR_DEFAULTS.contribInfo.find.globalFindClipboard, + 'description': nls.localize('find.globalFindClipboard', "Controls if the Find Widget should read or modify the shared find clipboard on macOS") + }, 'editor.wordWrap': { 'type': 'string', 'enum': ['off', 'on', 'wordWrapColumn', 'bounded'], @@ -609,6 +614,12 @@ const editorConfiguration: IConfigurationNode = { 'default': EDITOR_DEFAULTS.contribInfo.lightbulbEnabled, 'description': nls.localize('codeActions', "Enables the code action lightbulb") }, + 'editor.selectionClipboard': { + 'type': 'boolean', + 'default': EDITOR_DEFAULTS.contribInfo.selectionClipboard, + 'description': nls.localize('selectionClipboard', "Controls if the Linux primary clipboard should be supported."), + 'included': platform.isLinux + }, 'diffEditor.renderSideBySide': { 'type': 'boolean', 'default': true, @@ -627,12 +638,4 @@ const editorConfiguration: IConfigurationNode = { } }; -if (platform.isLinux) { - editorConfiguration['properties']['editor.selectionClipboard'] = { - 'type': 'boolean', - 'default': EDITOR_DEFAULTS.contribInfo.selectionClipboard, - 'description': nls.localize('selectionClipboard', "Controls if the Linux primary clipboard should be supported.") - }; -} - configurationRegistry.registerConfiguration(editorConfiguration); diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index b5f0638c189..0b49b501f24 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -86,6 +86,11 @@ export interface IEditorFindOptions { * Controls if Find in Selection flag is turned on when multiple lines of text are selected in the editor. */ autoFindInSelection: boolean; + /** + * @internal + * Controls if the Find Widget should read or modify the shared find clipboard on macOS + */ + globalFindClipboard: boolean; } /** @@ -739,6 +744,10 @@ export interface InternalEditorMinimapOptions { export interface InternalEditorFindOptions { readonly seedSearchStringFromSelection: boolean; readonly autoFindInSelection: boolean; + /** + * @internal + */ + readonly globalFindClipboard: boolean; } export interface EditorWrappingInfo { @@ -1112,6 +1121,7 @@ export class InternalEditorOptions { return ( a.seedSearchStringFromSelection === b.seedSearchStringFromSelection && a.autoFindInSelection === b.autoFindInSelection + && a.globalFindClipboard === b.globalFindClipboard ); } @@ -1550,7 +1560,8 @@ export class EditorOptionsValidator { return { seedSearchStringFromSelection: _boolean(opts.seedSearchStringFromSelection, defaults.seedSearchStringFromSelection), - autoFindInSelection: _boolean(opts.autoFindInSelection, defaults.autoFindInSelection) + autoFindInSelection: _boolean(opts.autoFindInSelection, defaults.autoFindInSelection), + globalFindClipboard: _boolean(opts.globalFindClipboard, defaults.globalFindClipboard) }; } @@ -2219,7 +2230,8 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { matchBrackets: true, find: { seedSearchStringFromSelection: true, - autoFindInSelection: false + autoFindInSelection: false, + globalFindClipboard: true }, colorDecorators: true, lightbulbEnabled: true diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index 5e31a05368d..65743dc7253 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -82,7 +82,9 @@ export class CursorConfiguration { public readonly autoClosingPairsOpen: CharacterMap; public readonly autoClosingPairsClose: CharacterMap; public readonly surroundingPairs: CharacterMap; - public readonly electricChars: { [key: string]: boolean; }; + + private readonly _languageIdentifier: LanguageIdentifier; + private _electricChars: { [key: string]: boolean; }; public static shouldRecreate(e: IConfigurationChangedEvent): boolean { return ( @@ -102,6 +104,8 @@ export class CursorConfiguration { modelOptions: TextModelResolvedOptions, configuration: IConfiguration ) { + this._languageIdentifier = languageIdentifier; + let c = configuration.editor; this.readOnly = c.readOnly; @@ -119,14 +123,7 @@ export class CursorConfiguration { this.autoClosingPairsOpen = {}; this.autoClosingPairsClose = {}; this.surroundingPairs = {}; - this.electricChars = {}; - - let electricChars = CursorConfiguration._getElectricCharacters(languageIdentifier); - if (electricChars) { - for (let i = 0; i < electricChars.length; i++) { - this.electricChars[electricChars[i]] = true; - } - } + this._electricChars = null; let autoClosingPairs = CursorConfiguration._getAutoClosingPairs(languageIdentifier); if (autoClosingPairs) { @@ -144,6 +141,19 @@ export class CursorConfiguration { } } + public get electricChars() { + if (!this._electricChars) { + this._electricChars = {}; + let electricChars = CursorConfiguration._getElectricCharacters(this._languageIdentifier); + if (electricChars) { + for (let i = 0; i < electricChars.length; i++) { + this._electricChars[electricChars[i]] = true; + } + } + } + return this._electricChars; + } + public normalizeIndentation(str: string): string { return TextModel.normalizeIndentation(str, this.tabSize, this.insertSpaces); } diff --git a/src/vs/editor/common/core/lineTokens.ts b/src/vs/editor/common/core/lineTokens.ts index 16c70ef5215..c4c5eda5e37 100644 --- a/src/vs/editor/common/core/lineTokens.ts +++ b/src/vs/editor/common/core/lineTokens.ts @@ -12,61 +12,72 @@ export class LineToken { _lineTokenBrand: void; private readonly _source: LineTokens; - private readonly _tokenIndex: number; - private readonly _metadata: number; + private readonly _tokenCount: number; - public readonly startOffset: number; - public readonly endOffset: number; - - public readonly hasPrev: boolean; - public readonly hasNext: boolean; + private _tokenIndex: number; + private _metadata: number; + private _startOffset: number; + private _endOffset: number; + public get startOffset(): number { + return this._startOffset; + } + public get endOffset(): number { + return this._endOffset; + } + public get hasPrev(): boolean { + return (this._tokenIndex > 0); + } + public get hasNext(): boolean { + return (this._tokenIndex + 1 < this._tokenCount); + } public get languageId(): LanguageId { return TokenMetadata.getLanguageId(this._metadata); } - public get tokenType(): StandardTokenType { return TokenMetadata.getTokenType(this._metadata); } - public get fontStyle(): FontStyle { return TokenMetadata.getFontStyle(this._metadata); } - public get foregroundId(): ColorId { return TokenMetadata.getForeground(this._metadata); } - public get backgroundId(): ColorId { return TokenMetadata.getBackground(this._metadata); } constructor(source: LineTokens, tokenIndex: number, tokenCount: number, startOffset: number, endOffset: number, metadata: number) { this._source = source; + this._tokenCount = tokenCount; + this._set(tokenIndex, startOffset, endOffset, metadata); + } + + public clone(): LineToken { + return new LineToken(this._source, this._tokenIndex, this._tokenCount, this._startOffset, this._endOffset, this._metadata); + } + + _set(tokenIndex: number, startOffset: number, endOffset: number, metadata: number): void { this._tokenIndex = tokenIndex; this._metadata = metadata; - - this.startOffset = startOffset; - this.endOffset = endOffset; - - this.hasPrev = (this._tokenIndex > 0); - this.hasNext = (this._tokenIndex + 1 < tokenCount); + this._startOffset = startOffset; + this._endOffset = endOffset; } public prev(): LineToken { if (!this.hasPrev) { return null; } - - return this._source.tokenAt(this._tokenIndex - 1); + this._source.tokenAt(this._tokenIndex - 1, this); + return this; } public next(): LineToken { if (!this.hasNext) { return null; } - - return this._source.tokenAt(this._tokenIndex + 1); + this._source.tokenAt(this._tokenIndex + 1, this); + return this; } } @@ -134,7 +145,7 @@ export class LineTokens { return this.tokenAt(tokenIndex); } - public tokenAt(tokenIndex: number): LineToken { + public tokenAt(tokenIndex: number, dest?: LineToken): LineToken { let startOffset = this._tokens[(tokenIndex << 1)]; let endOffset: number; if (tokenIndex + 1 < this._tokensCount) { @@ -143,6 +154,11 @@ export class LineTokens { endOffset = this._textLength; } let metadata = this._tokens[(tokenIndex << 1) + 1]; + + if (dest) { + dest._set(tokenIndex, startOffset, endOffset, metadata); + return dest; + } return new LineToken(this, tokenIndex, this._tokensCount, startOffset, endOffset, metadata); } diff --git a/src/vs/editor/common/model/textModelWithTokens.ts b/src/vs/editor/common/model/textModelWithTokens.ts index 4e1404c0fa5..00985a04564 100644 --- a/src/vs/editor/common/model/textModelWithTokens.ts +++ b/src/vs/editor/common/model/textModelWithTokens.ts @@ -417,10 +417,10 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke public getWordAtPosition(_position: IPosition): editorCommon.IWordAtPosition { this._assertNotDisposed(); - let position = this.validatePosition(_position); - let lineContent = this.getLineContent(position.lineNumber); + const position = this.validatePosition(_position); + const lineContent = this.getLineContent(position.lineNumber); - if (this._invalidLineStartIndex <= position.lineNumber) { + if (this._invalidLineStartIndex <= position.lineNumber - 1) { // this line is not tokenized return getWordAtText( position.column, @@ -430,30 +430,29 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke ); } - let lineTokens = this._getLineTokens(position.lineNumber); - let offset = position.column - 1; - let token = lineTokens.findTokenAtOffset(offset); + const lineTokens = this._getLineTokens(position.lineNumber); + const offset = position.column - 1; + const token = lineTokens.findTokenAtOffset(offset); + const languageId = token.languageId; - let result = getWordAtText( - position.column, - LanguageConfigurationRegistry.getWordDefinition(token.languageId), - lineContent.substring(token.startOffset, token.endOffset), - token.startOffset - ); - - if (!result && token.hasPrev && token.startOffset === offset) { - // The position is right at the beginning of `modeIndex`, so try looking at `modeIndex` - 1 too - - let prevToken = token.prev(); - result = getWordAtText( - position.column, - LanguageConfigurationRegistry.getWordDefinition(prevToken.languageId), - lineContent.substring(prevToken.startOffset, prevToken.endOffset), - prevToken.startOffset - ); + // go left until a different language is hit + let startOffset: number; + for (let leftToken = token.clone(); leftToken !== null && leftToken.languageId === languageId; leftToken = leftToken.prev()) { + startOffset = leftToken.startOffset; } - return result; + // go right until a different language is hit + let endOffset: number; + for (let rightToken = token.clone(); rightToken !== null && rightToken.languageId === languageId; rightToken = rightToken.next()) { + endOffset = rightToken.endOffset; + } + + return getWordAtText( + position.column, + LanguageConfigurationRegistry.getWordDefinition(languageId), + lineContent.substring(startOffset, endOffset), + startOffset + ); } public getWordUntilPosition(position: IPosition): editorCommon.IWordAtPosition { @@ -502,7 +501,7 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke let lineTokens = this._getLineTokens(lineNumber); const lineText = this._lines[lineNumber - 1].text; - const currentToken = lineTokens.findTokenAtOffset(position.column - 1); + let currentToken = lineTokens.findTokenAtOffset(position.column - 1); if (!currentToken) { return null; } @@ -556,14 +555,14 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke // If position is in between two tokens, try also looking in the previous token if (currentToken.hasPrev && currentToken.startOffset === position.column - 1) { - const prevToken = currentToken.prev(); - const prevModeBrackets = LanguageConfigurationRegistry.getBracketsSupport(prevToken.languageId); + const searchEndOffset = currentToken.startOffset; + currentToken = currentToken.prev(); + const prevModeBrackets = LanguageConfigurationRegistry.getBracketsSupport(currentToken.languageId); // check that previous token is not to be ignored - if (prevModeBrackets && !ignoreBracketsInToken(prevToken.tokenType)) { + if (prevModeBrackets && !ignoreBracketsInToken(currentToken.tokenType)) { // limit search in case previous token is very large, there's no need to go beyond `maxBracketLength` - const searchStartOffset = Math.max(prevToken.startOffset, position.column - 1 - prevModeBrackets.maxBracketLength); - const searchEndOffset = currentToken.startOffset; + const searchStartOffset = Math.max(currentToken.startOffset, position.column - 1 - prevModeBrackets.maxBracketLength); const foundBracket = BracketsUtils.findPrevBracketInToken(prevModeBrackets.reversedRegex, lineNumber, lineText, searchStartOffset, searchEndOffset); // check that we didn't hit a bracket too far away from position diff --git a/src/vs/editor/common/modes.ts b/src/vs/editor/common/modes.ts index 1d0de01715a..2fc0420eef8 100644 --- a/src/vs/editor/common/modes.ts +++ b/src/vs/editor/common/modes.ts @@ -292,7 +292,7 @@ export interface CodeActionProvider { /** * Provide commands for the given document and range. */ - provideCodeActions(model: editorCommon.IReadOnlyModel, range: Range, token: CancellationToken): (CodeAction | Command)[] | Thenable<(Command | CodeAction)[]>; + provideCodeActions(model: editorCommon.IReadOnlyModel, range: Range, token: CancellationToken): CodeAction[] | Thenable; } /** diff --git a/src/vs/editor/common/modes/languageConfigurationRegistry.ts b/src/vs/editor/common/modes/languageConfigurationRegistry.ts index af92f8219b4..4d15e0f504b 100644 --- a/src/vs/editor/common/modes/languageConfigurationRegistry.ts +++ b/src/vs/editor/common/modes/languageConfigurationRegistry.ts @@ -18,7 +18,7 @@ import { DEFAULT_WORD_REGEXP, ensureValidWordDefinition } from 'vs/editor/common import { createScopedLineTokens } from 'vs/editor/common/modes/supports'; import { LineTokens } from 'vs/editor/common/core/lineTokens'; import { Range } from 'vs/editor/common/core/range'; -import { IndentAction, EnterAction, IAutoClosingPair, LanguageConfiguration, IndentationRule, FoldingRules } from 'vs/editor/common/modes/languageConfiguration'; +import { IndentAction, EnterAction, IAutoClosingPair, LanguageConfiguration, IndentationRule, FoldingRules, IAutoClosingPairConditional } from 'vs/editor/common/modes/languageConfiguration'; import { LanguageIdentifier, LanguageId } from 'vs/editor/common/modes'; /** @@ -46,18 +46,23 @@ export interface IIndentConverter { export class RichEditSupport { private readonly _conf: LanguageConfiguration; + private readonly _languageIdentifier: LanguageIdentifier; + private _brackets: RichEditBrackets; + private _electricCharacter: BracketElectricCharacterSupport; - public readonly electricCharacter: BracketElectricCharacterSupport; public readonly comments: ICommentsConfiguration; public readonly characterPair: CharacterPairSupport; public readonly wordDefinition: RegExp; public readonly onEnter: OnEnterSupport; public readonly indentRulesSupport: IndentRulesSupport; - public readonly brackets: RichEditBrackets; public readonly indentationRules: IndentationRule; public readonly foldingRules: FoldingRules; constructor(languageIdentifier: LanguageIdentifier, previous: RichEditSupport, rawConf: LanguageConfiguration) { + this._languageIdentifier = languageIdentifier; + + this._brackets = null; + this._electricCharacter = null; let prev: LanguageConfiguration = null; if (previous) { @@ -66,16 +71,11 @@ export class RichEditSupport { this._conf = RichEditSupport._mergeConf(prev, rawConf); - if (this._conf.brackets) { - this.brackets = new RichEditBrackets(languageIdentifier, this._conf.brackets); - } - this.onEnter = RichEditSupport._handleOnEnter(this._conf); this.comments = RichEditSupport._handleComments(this._conf); this.characterPair = new CharacterPairSupport(this._conf); - this.electricCharacter = new BracketElectricCharacterSupport(this.brackets, this.characterPair.getAutoClosingPairs(), this._conf.__electricCharacterSupport); this.wordDefinition = this._conf.wordPattern || DEFAULT_WORD_REGEXP; @@ -87,6 +87,29 @@ export class RichEditSupport { this.foldingRules = this._conf.folding || {}; } + public get brackets(): RichEditBrackets { + if (!this._brackets && this._conf.brackets) { + this._brackets = new RichEditBrackets(this._languageIdentifier, this._conf.brackets); + } + return this._brackets; + } + + public get electricCharacter(): BracketElectricCharacterSupport { + if (!this._electricCharacter) { + let autoClosingPairs: IAutoClosingPairConditional[] = []; + if (this._conf.autoClosingPairs) { + autoClosingPairs = this._conf.autoClosingPairs; + } else if (this._conf.brackets) { + autoClosingPairs = this._conf.brackets.map(b => { + return { open: b[0], close: b[1] }; + }); + } + + this._electricCharacter = new BracketElectricCharacterSupport(this.brackets, autoClosingPairs, this._conf.__electricCharacterSupport); + } + return this._electricCharacter; + } + private static _mergeConf(prev: LanguageConfiguration, current: LanguageConfiguration): LanguageConfiguration { return { comments: (prev ? current.comments || prev.comments : current.comments), diff --git a/src/vs/editor/common/viewLayout/viewLineRenderer.ts b/src/vs/editor/common/viewLayout/viewLineRenderer.ts index cd1cc17d451..8f1696f969b 100644 --- a/src/vs/editor/common/viewLayout/viewLineRenderer.ts +++ b/src/vs/editor/common/viewLayout/viewLineRenderer.ts @@ -569,8 +569,14 @@ function _applyInlineDecorations(lineContent: string, len: number, tokens: LineP } } - if (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === tokens[tokens.length - 1].endIndex) { - result[resultLen++] = new LinePart(lastResultEndIndex, lineDecorations[lineDecorationIndex].className); + const lastTokenEndIndex = tokens[tokens.length - 1].endIndex; + if (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === lastTokenEndIndex) { + let classNames: string[] = []; + while (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === lastTokenEndIndex) { + classNames.push(lineDecorations[lineDecorationIndex].className); + lineDecorationIndex++; + } + result[resultLen++] = new LinePart(lastResultEndIndex, classNames.join(' ')); } return result; diff --git a/src/vs/editor/contrib/codelens/codelensController.ts b/src/vs/editor/contrib/codelens/codelensController.ts index e38293a1d12..45fc1d5d584 100644 --- a/src/vs/editor/contrib/codelens/codelensController.ts +++ b/src/vs/editor/contrib/codelens/codelensController.ts @@ -129,12 +129,18 @@ export class CodeLensContribution implements editorCommon.IEditorContribution { this._localToDispose.push(this._editor.onDidChangeModelContent((e) => { this._editor.changeDecorations((changeAccessor) => { this._editor.changeViewZones((viewAccessor) => { - const toDispose: CodeLens[] = []; + let toDispose: CodeLens[] = []; + let lastLensLineNumber: number = -1; + this._lenses.forEach((lens) => { - if (lens.isValid()) { - lens.update(viewAccessor); - } else { + if (!lens.isValid() || lastLensLineNumber === lens.getLineNumber()) { + // invalid -> lens collapsed, attach range doesn't exist anymore + // line_number -> lenses should never be on the same line toDispose.push(lens); + + } else { + lens.update(viewAccessor); + lastLensLineNumber = lens.getLineNumber(); } }); diff --git a/src/vs/editor/contrib/dnd/dnd.ts b/src/vs/editor/contrib/dnd/dnd.ts index 19189da8f19..dcbc3023c76 100644 --- a/src/vs/editor/contrib/dnd/dnd.ts +++ b/src/vs/editor/contrib/dnd/dnd.ts @@ -129,14 +129,20 @@ export class DragAndDropController implements editorCommon.IEditorContribution { let newCursorPosition = new Position(mouseEvent.target.position.lineNumber, mouseEvent.target.position.column); if (this._dragSelection === null) { - let newSelections = this._editor.getSelections().map(selection => { - if (selection.containsPosition(newCursorPosition)) { - return new Selection(newCursorPosition.lineNumber, newCursorPosition.column, newCursorPosition.lineNumber, newCursorPosition.column); - } else { - return selection; - } - }); - this._editor.setSelections(newSelections); + if (mouseEvent.event.shiftKey) { + let primarySelection = this._editor.getSelection(); + let { startLineNumber, startColumn } = primarySelection; + this._editor.setSelections([new Selection(startLineNumber, startColumn, newCursorPosition.lineNumber, newCursorPosition.column)]); + } else { + let newSelections = this._editor.getSelections().map(selection => { + if (selection.containsPosition(newCursorPosition)) { + return new Selection(newCursorPosition.lineNumber, newCursorPosition.column, newCursorPosition.lineNumber, newCursorPosition.column); + } else { + return selection; + } + }); + this._editor.setSelections(newSelections); + } } else if (!this._dragSelection.containsPosition(newCursorPosition) || ( ( diff --git a/src/vs/editor/contrib/find/findController.ts b/src/vs/editor/contrib/find/findController.ts index 1b6a27ea6f0..aea6fb8abbc 100644 --- a/src/vs/editor/contrib/find/findController.ts +++ b/src/vs/editor/contrib/find/findController.ts @@ -17,6 +17,7 @@ import { FindReplaceState, FindReplaceStateChangedEvent, INewFindReplaceState } import { Delayer } from 'vs/base/common/async'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; @@ -24,6 +25,7 @@ import { FindWidget, IFindController } from 'vs/editor/contrib/find/findWidget'; import { FindOptionsWidget } from 'vs/editor/contrib/find/findOptionsWidget'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; +import { optional } from 'vs/platform/instantiation/common/instantiation'; export function getSelectionSearchString(editor: ICodeEditor): string { let selection = editor.getSelection(); @@ -52,6 +54,7 @@ export const enum FindStartFocusAction { export interface IFindStartOptions { forceRevealReplace: boolean; seedSearchStringFromSelection: boolean; + seedSearchStringFromGlobalClipboard: boolean; shouldFocus: FindStartFocusAction; shouldAnimate: boolean; } @@ -67,16 +70,23 @@ export class CommonFindController extends Disposable implements editorCommon.IEd protected _updateHistoryDelayer: Delayer; private _model: FindModelBoundToEditorModel; private _storageService: IStorageService; + private _clipboardService: IClipboardService; public static get(editor: ICodeEditor): CommonFindController { return editor.getContribution(CommonFindController.ID); } - constructor(editor: ICodeEditor, @IContextKeyService contextKeyService: IContextKeyService, @IStorageService storageService: IStorageService) { + constructor( + editor: ICodeEditor, + @IContextKeyService contextKeyService: IContextKeyService, + @IStorageService storageService: IStorageService, + @IClipboardService clipboardService: IClipboardService + ) { super(); this._editor = editor; this._findWidgetVisible = CONTEXT_FIND_WIDGET_VISIBLE.bindTo(contextKeyService); this._storageService = storageService; + this._clipboardService = clipboardService; this._updateHistoryDelayer = new Delayer(500); this._currentHistoryNavigator = new HistoryNavigator(); @@ -102,6 +112,7 @@ export class CommonFindController extends Disposable implements editorCommon.IEd this._start({ forceRevealReplace: false, seedSearchStringFromSelection: false && this._editor.getConfiguration().contribInfo.find.seedSearchStringFromSelection, + seedSearchStringFromGlobalClipboard: false, shouldFocus: FindStartFocusAction.NoFocusChange, shouldAnimate: false, }); @@ -139,17 +150,20 @@ export class CommonFindController extends Disposable implements editorCommon.IEd this.disposeModel(); } } + if (e.searchString) { + this.setGlobalBufferTerm(this._state.searchString); + } } private saveQueryState(e: FindReplaceStateChangedEvent) { - if (e.isRegex && typeof this._state.isRegex !== 'undefined') { - this._storageService.store('editor.isRegex', this._state.isRegex, StorageScope.WORKSPACE); + if (e.isRegex) { + this._storageService.store('editor.isRegex', this._state.actualIsRegex, StorageScope.WORKSPACE); } - if (e.wholeWord && typeof this._state.wholeWord !== 'undefined') { - this._storageService.store('editor.wholeWord', this._state.wholeWord, StorageScope.WORKSPACE); + if (e.wholeWord) { + this._storageService.store('editor.wholeWord', this._state.actualWholeWord, StorageScope.WORKSPACE); } - if (e.matchCase && typeof this._state.matchCase !== 'undefined') { - this._storageService.store('editor.matchCase', this._state.matchCase, StorageScope.WORKSPACE); + if (e.matchCase) { + this._storageService.store('editor.matchCase', this._state.actualMatchCase, StorageScope.WORKSPACE); } } @@ -244,6 +258,13 @@ export class CommonFindController extends Disposable implements editorCommon.IEd } } + if (!stateChanges.searchString && opts.seedSearchStringFromGlobalClipboard) { + let selectionSearchString = this.getGlobalBufferTerm(); + if (selectionSearchString) { + stateChanges.searchString = selectionSearchString; + } + } + // Overwrite isReplaceRevealed if (opts.forceRevealReplace) { stateChanges.isReplaceRevealed = true; @@ -319,6 +340,19 @@ export class CommonFindController extends Disposable implements editorCommon.IEd } return true; } + + public getGlobalBufferTerm(): string { + if (this._editor.getConfiguration().contribInfo.find.globalFindClipboard && this._clipboardService) { + return this._clipboardService.readFindText(); + } + return ''; + } + + public setGlobalBufferTerm(text: string) { + if (this._editor.getConfiguration().contribInfo.find.globalFindClipboard && this._clipboardService) { + this._clipboardService.writeFindText(text); + } + } } export class FindController extends CommonFindController implements IFindController { @@ -332,9 +366,10 @@ export class FindController extends CommonFindController implements IFindControl @IContextKeyService private _contextKeyService: IContextKeyService, @IKeybindingService private _keybindingService: IKeybindingService, @IThemeService private _themeService: IThemeService, - @IStorageService storageService: IStorageService + @IStorageService storageService: IStorageService, + @optional(IClipboardService) clipboardService: IClipboardService ) { - super(editor, _contextKeyService, storageService); + super(editor, _contextKeyService, storageService, clipboardService); } protected _start(opts: IFindStartOptions): void { @@ -389,6 +424,7 @@ export class StartFindAction extends EditorAction { controller.start({ forceRevealReplace: false, seedSearchStringFromSelection: editor.getConfiguration().contribInfo.find.seedSearchStringFromSelection, + seedSearchStringFromGlobalClipboard: editor.getConfiguration().contribInfo.find.globalFindClipboard, shouldFocus: FindStartFocusAction.FocusFindInput, shouldAnimate: true }); @@ -420,9 +456,12 @@ export class StartFindWithSelectionAction extends EditorAction { controller.start({ forceRevealReplace: false, seedSearchStringFromSelection: true, + seedSearchStringFromGlobalClipboard: false, shouldFocus: FindStartFocusAction.FocusFindInput, shouldAnimate: true }); + + controller.setGlobalBufferTerm(controller.getState().searchString); } } } @@ -433,6 +472,7 @@ export abstract class MatchFindAction extends EditorAction { controller.start({ forceRevealReplace: false, seedSearchStringFromSelection: (controller.getState().searchString.length === 0) && editor.getConfiguration().contribInfo.find.seedSearchStringFromSelection, + seedSearchStringFromGlobalClipboard: true, shouldFocus: FindStartFocusAction.NoFocusChange, shouldAnimate: true }); @@ -499,6 +539,7 @@ export abstract class SelectionMatchFindAction extends EditorAction { controller.start({ forceRevealReplace: false, seedSearchStringFromSelection: false, + seedSearchStringFromGlobalClipboard: false, shouldFocus: FindStartFocusAction.NoFocusChange, shouldAnimate: true }); @@ -585,6 +626,7 @@ export class StartFindReplaceAction extends EditorAction { controller.start({ forceRevealReplace: true, seedSearchStringFromSelection: seedSearchStringFromSelection, + seedSearchStringFromGlobalClipboard: editor.getConfiguration().contribInfo.find.seedSearchStringFromSelection, shouldFocus: shouldFocus, shouldAnimate: true }); diff --git a/src/vs/editor/contrib/find/findState.ts b/src/vs/editor/contrib/find/findState.ts index 0c6533d0374..21d2d0f5399 100644 --- a/src/vs/editor/contrib/find/findState.ts +++ b/src/vs/editor/contrib/find/findState.ts @@ -79,6 +79,11 @@ export class FindReplaceState implements IDisposable { public get isRegex(): boolean { return effectiveOptionValue(this._isRegexOverride, this._isRegex); } public get wholeWord(): boolean { return effectiveOptionValue(this._wholeWordOverride, this._wholeWord); } public get matchCase(): boolean { return effectiveOptionValue(this._matchCaseOverride, this._matchCase); } + + public get actualIsRegex(): boolean { return this._isRegex; } + public get actualWholeWord(): boolean { return this._wholeWord; } + public get actualMatchCase(): boolean { return this._matchCase; } + public get searchScope(): Range { return this._searchScope; } public get matchesPosition(): number { return this._matchesPosition; } public get matchesCount(): number { return this._matchesCount; } diff --git a/src/vs/editor/contrib/find/findWidget.ts b/src/vs/editor/contrib/find/findWidget.ts index 2d023dd3903..19faa63f3b0 100644 --- a/src/vs/editor/contrib/find/findWidget.ts +++ b/src/vs/editor/contrib/find/findWidget.ts @@ -34,6 +34,7 @@ import { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, ac export interface IFindController { replace(): void; replaceAll(): void; + getGlobalBufferTerm(): string; } const NLS_FIND_INPUT_LABEL = nls.localize('label.find', "Find"); @@ -109,6 +110,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas private _viewZoneId: number; private _resizeSash: Sash; + private _resized: boolean; constructor( codeEditor: ICodeEditor, @@ -132,47 +134,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))); this._buildDomNode(); this._updateButtons(); - - let checkEditorWidth = () => { - let editorWidth = this._codeEditor.getConfiguration().layoutInfo.width; - let minimapWidth = this._codeEditor.getConfiguration().layoutInfo.minimapWidth; - let collapsedFindWidget = false; - let reducedFindWidget = false; - let narrowFindWidget = false; - let widgetWidth = dom.getTotalWidth(this._domNode); - - if (widgetWidth > FIND_WIDGET_INITIAL_WIDTH) { - // as the widget is resized by users, we may need to change the max width of the widget as the editor width changes. - this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; - this._replaceInputBox.inputElement.style.width = `${dom.getTotalWidth(this._findInput.inputBox.inputElement)}px`; - return; - } - - if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth >= editorWidth) { - reducedFindWidget = true; - } - if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth) { - narrowFindWidget = true; - } - if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth + 50) { - collapsedFindWidget = true; - } - dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); - dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); - dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); - - if (!narrowFindWidget && !collapsedFindWidget) { - // the minimal left offset of findwidget is 15px. - this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; - } - - let findInputWidth = dom.getTotalWidth(this._findInput.inputBox.inputElement); - if (findInputWidth > 0) { - this._replaceInputBox.inputElement.style.width = `${findInputWidth}px`; - } - - }; - checkEditorWidth(); + this._tryUpdateWidgetWidth(); this._register(this._codeEditor.onDidChangeConfiguration((e: IConfigurationChangedEvent) => { if (e.readOnly) { @@ -183,7 +145,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._updateButtons(); } if (e.layoutInfo) { - checkEditorWidth(); + this._tryUpdateWidgetWidth(); } })); this._register(this._codeEditor.onDidChangeCursorSelection(() => { @@ -191,6 +153,15 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._updateToggleSelectionFindButton(); } })); + this._register(this._codeEditor.onDidFocusEditor(() => { + if (this._isVisible) { + let globalBufferTerm = this._controller.getGlobalBufferTerm(); + if (globalBufferTerm && globalBufferTerm !== this._state.searchString) { + this._state.change({ searchString: globalBufferTerm }, true); + this._findInput.select(); + } + } + })); this._findInputFocused = CONTEXT_FIND_INPUT_FOCUSED.bindTo(contextKeyService); this._focusTracker = this._register(dom.trackFocus(this._findInput.inputBox.inputElement)); this._register(this._focusTracker.onDidFocus(() => { @@ -289,6 +260,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas if (this._state.isReplaceRevealed) { if (!this._codeEditor.getConfiguration().readOnly && !this._isReplaceVisible) { this._isReplaceVisible = true; + this._replaceInputBox.width = this._findInput.inputBox.width; this._updateButtons(); } } else { @@ -404,6 +376,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas } else { this._toggleSelectionFind.checked = false; } + this._tryUpdateWidgetWidth(); this._updateButtons(); setTimeout(() => { @@ -534,6 +507,53 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._replaceInputBox.style(inputStyles); } + private _tryUpdateWidgetWidth() { + if (!this._isVisible) { + return; + } + let editorWidth = this._codeEditor.getConfiguration().layoutInfo.width; + let minimapWidth = this._codeEditor.getConfiguration().layoutInfo.minimapWidth; + let collapsedFindWidget = false; + let reducedFindWidget = false; + let narrowFindWidget = false; + + if (this._resized) { + let widgetWidth = dom.getTotalWidth(this._domNode); + + if (widgetWidth > FIND_WIDGET_INITIAL_WIDTH) { + // as the widget is resized by users, we may need to change the max width of the widget as the editor width changes. + this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; + this._replaceInputBox.inputElement.style.width = `${dom.getTotalWidth(this._findInput.inputBox.inputElement)}px`; + return; + } + } + + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth >= editorWidth) { + reducedFindWidget = true; + } + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth) { + narrowFindWidget = true; + } + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth + 50) { + collapsedFindWidget = true; + } + dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); + dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); + dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); + + if (!narrowFindWidget && !collapsedFindWidget) { + // the minimal left offset of findwidget is 15px. + this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; + } + + if (this._resized) { + let findInputWidth = dom.getTotalWidth(this._findInput.inputBox.inputElement); + if (findInputWidth > 0) { + this._replaceInputBox.inputElement.style.width = `${findInputWidth}px`; + } + } + } + // ----- Public public focusFindInput(): void { @@ -861,6 +881,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas private _buildSash() { this._resizeSash = new Sash(this._domNode, this, { orientation: Orientation.VERTICAL }); + this._resized = false; let originalWidth = FIND_WIDGET_INITIAL_WIDTH; this._register(this._resizeSash.onDidStart((e: ISashEvent) => { @@ -868,6 +889,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas })); this._register(this._resizeSash.onDidChange((evt: ISashEvent) => { + this._resized = true; let width = originalWidth + evt.startX - evt.currentX; if (width < FIND_WIDGET_INITIAL_WIDTH) { diff --git a/src/vs/editor/contrib/find/test/findController.test.ts b/src/vs/editor/contrib/find/test/findController.test.ts index 59e8681a1cb..7eb0243f2c1 100644 --- a/src/vs/editor/contrib/find/test/findController.test.ts +++ b/src/vs/editor/contrib/find/test/findController.test.ts @@ -11,10 +11,12 @@ import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; import { Selection } from 'vs/editor/common/core/selection'; import { Range } from 'vs/editor/common/core/range'; +import * as platform from 'vs/base/common/platform'; import { CommonFindController, FindStartFocusAction, IFindStartOptions, NextMatchFindAction, StartFindAction } from 'vs/editor/contrib/find/findController'; import { withTestCodeEditor } from 'vs/editor/test/browser/testCodeEditor'; import { HistoryNavigator } from 'vs/base/common/history'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { Delayer } from 'vs/base/common/async'; @@ -28,8 +30,13 @@ export class TestFindController extends CommonFindController { private _delayedUpdateHistoryEvent: Emitter = new Emitter(); - constructor(editor: ICodeEditor, @IContextKeyService contextKeyService: IContextKeyService, @IStorageService storageService: IStorageService) { - super(editor, contextKeyService, storageService); + constructor( + editor: ICodeEditor, + @IContextKeyService contextKeyService: IContextKeyService, + @IStorageService storageService: IStorageService, + @IClipboardService clipboardService: IClipboardService + ) { + super(editor, contextKeyService, storageService, clipboardService); this._updateHistoryDelayer = new Delayer(50); } @@ -70,6 +77,7 @@ function fromRange(rng: Range): number[] { suite('FindController', () => { let queryState: { [key: string]: any; } = {}; + let clipboardState = ''; let serviceCollection = new ServiceCollection(); serviceCollection.set(IStorageService, { get: (key: string) => queryState[key], @@ -77,6 +85,88 @@ suite('FindController', () => { store: (key: string, value: any) => { queryState[key] = value; } } as IStorageService); + if (platform.isMacintosh) { + serviceCollection.set(IClipboardService, { + readFindText: _ => clipboardState, + writeFindText: (value: any) => { clipboardState = value; } + }); + } + + test('stores to the global clipboard buffer on start find action', () => { + withTestCodeEditor([ + 'ABC', + 'ABC', + 'XYZ', + 'ABC' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + clipboardState = ''; + if (!platform.isMacintosh) { + assert.ok(true); + return; + } + let findController = editor.registerAndInstantiateContribution(TestFindController); + let startFindAction = new StartFindAction(); + // I select ABC on the first line + editor.setSelection(new Selection(1, 1, 1, 4)); + // I hit Ctrl+F to show the Find dialog + startFindAction.run(null, editor); + + assert.deepEqual(findController.getGlobalBufferTerm(), findController.getState().searchString); + findController.dispose(); + }); + }); + + test('reads from the global clipboard buffer on next find action if buffer exists', () => { + withTestCodeEditor([ + 'ABC', + 'ABC', + 'XYZ', + 'ABC' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + clipboardState = 'ABC'; + + if (!platform.isMacintosh) { + assert.ok(true); + return; + } + + let findController = editor.registerAndInstantiateContribution(TestFindController); + let findState = findController.getState(); + let nextMatchFindAction = new NextMatchFindAction(); + + nextMatchFindAction.run(null, editor); + assert.equal(findState.searchString, 'ABC'); + + assert.deepEqual(fromRange(editor.getSelection()), [1, 1, 1, 4]); + + findController.dispose(); + }); + }); + + test('writes to the global clipboard buffer when text changes', () => { + withTestCodeEditor([ + 'ABC', + 'ABC', + 'XYZ', + 'ABC' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + clipboardState = ''; + if (!platform.isMacintosh) { + assert.ok(true); + return; + } + + let findController = editor.registerAndInstantiateContribution(TestFindController); + let findState = findController.getState(); + + findState.change({ searchString: 'ABC' }, true); + + assert.deepEqual(findController.getGlobalBufferTerm(), 'ABC'); + + findController.dispose(); + }); + }); + test('issue #1857: F3, Find Next, acts like "Find Under Cursor"', () => { withTestCodeEditor([ 'ABC', @@ -84,7 +174,7 @@ suite('FindController', () => { 'XYZ', 'ABC' ], { serviceCollection: serviceCollection }, (editor, cursor) => { - + clipboardState = ''; // The cursor is at the very top, of the file, at the first ABC let findController = editor.registerAndInstantiateContribution(TestFindController); let findState = findController.getState(); @@ -139,7 +229,7 @@ suite('FindController', () => { withTestCodeEditor([ 'import nls = require(\'vs/nls\');' ], { serviceCollection: serviceCollection }, (editor, cursor) => { - + clipboardState = ''; let findController = editor.registerAndInstantiateContribution(TestFindController); let nextMatchFindAction = new NextMatchFindAction(); @@ -164,7 +254,7 @@ suite('FindController', () => { 'var y = (3 * 5)', 'var z = (3 * 5)', ], { serviceCollection: serviceCollection }, (editor, cursor) => { - + clipboardState = ''; let findController = editor.registerAndInstantiateContribution(TestFindController); let startFindAction = new StartFindAction(); let nextMatchFindAction = new NextMatchFindAction(); @@ -190,11 +280,12 @@ suite('FindController', () => { 'var y = (3 * 5)', 'var z = (3 * 5)', ], { serviceCollection: serviceCollection }, (editor, cursor) => { - + clipboardState = ''; let findController = editor.registerAndInstantiateContribution(TestFindController); findController.start({ forceRevealReplace: false, seedSearchStringFromSelection: false, + seedSearchStringFromGlobalClipboard: false, shouldFocus: FindStartFocusAction.NoFocusChange, shouldAnimate: false }); @@ -218,7 +309,7 @@ suite('FindController', () => { 'var y = (3 * 5)', 'var z = (3 * 5)', ], { serviceCollection: serviceCollection }, (editor, cursor) => { - + clipboardState = ''; let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); findController.getState().change({ searchString: '2' }, false); @@ -234,7 +325,7 @@ suite('FindController', () => { 'var y = (3 * 5)', 'var z = (3 * 5)', ], { serviceCollection: serviceCollection }, (editor, cursor) => { - + clipboardState = ''; let findController = editor.registerAndInstantiateContribution(TestFindController); findController.delayUpdateHistory = true; findController.getState().change({ searchString: '1' }, false); @@ -254,7 +345,7 @@ suite('FindController', () => { 'var y = (3 * 5)', 'var z = (3 * 5)', ], { serviceCollection: serviceCollection }, (editor, cursor) => { - + clipboardState = ''; let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); findController.getState().change({ searchString: '2' }, false); @@ -271,7 +362,7 @@ suite('FindController', () => { 'var y = (3 * 5)', 'var z = (3 * 5)', ], { serviceCollection: serviceCollection }, (editor, cursor) => { - + clipboardState = ''; let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); findController.getState().change({ searchString: '2' }, false); @@ -288,7 +379,7 @@ suite('FindController', () => { 'var y = (3 * 5)', 'var z = (3 * 5)', ], { serviceCollection: serviceCollection }, (editor, cursor) => { - + clipboardState = ''; let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); findController.getState().change({ searchString: '2' }, false); @@ -308,7 +399,7 @@ suite('FindController', () => { 'var y = (3 * 5)', 'var z = (3 * 5)', ], { serviceCollection: serviceCollection }, (editor, cursor) => { - + clipboardState = ''; let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); findController.getState().change({ searchString: '2' }, false); @@ -326,7 +417,7 @@ suite('FindController', () => { withTestCodeEditor([ 'HRESULT OnAmbientPropertyChange(DISPID dispid);' ], { serviceCollection: serviceCollection }, (editor, cursor) => { - + clipboardState = ''; let findController = editor.registerAndInstantiateContribution(TestFindController); let startFindAction = new StartFindAction(); @@ -353,7 +444,7 @@ suite('FindController', () => { 'line2', 'line3' ], { serviceCollection: serviceCollection }, (editor, cursor) => { - + clipboardState = ''; let findController = editor.registerAndInstantiateContribution(TestFindController); let startFindAction = new StartFindAction(); diff --git a/src/vs/editor/contrib/folding/folding.ts b/src/vs/editor/contrib/folding/folding.ts index 7f1d4e94571..b7c02090042 100644 --- a/src/vs/editor/contrib/folding/folding.ts +++ b/src/vs/editor/contrib/folding/folding.ts @@ -8,6 +8,7 @@ import * as nls from 'vs/nls'; import * as types from 'vs/base/common/types'; +import { escapeRegExpCharacters } from 'vs/base/common/strings'; import { RunOnceScheduler, Delayer } from 'vs/base/common/async'; import { KeyCode, KeyMod, KeyChord } from 'vs/base/common/keyCodes'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -15,7 +16,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { ScrollType, IModel, IEditorContribution } from 'vs/editor/common/editorCommon'; import { registerEditorAction, registerEditorContribution, ServicesAccessor, EditorAction, registerInstantiatedEditorAction } from 'vs/editor/browser/editorExtensions'; import { ICodeEditor, IEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser'; -import { FoldingModel, setCollapseStateAtLevel, CollapseMemento, setCollapseStateLevelsDown, setCollapseStateLevelsUp } from 'vs/editor/contrib/folding/foldingModel'; +import { FoldingModel, setCollapseStateAtLevel, CollapseMemento, setCollapseStateLevelsDown, setCollapseStateLevelsUp, setCollapseStateForMatchingLines } from 'vs/editor/contrib/folding/foldingModel'; import { FoldingDecorationProvider } from './foldingDecorations'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; @@ -180,7 +181,10 @@ export class FoldingController implements IEditorContribution { if (this.updateScheduler) { this.foldingModelPromise = this.updateScheduler.trigger(() => { if (this.foldingModel) { // null if editor has been disposed, or folding turned off - this.foldingModel.update(this.computeRanges(this.foldingModel.textModel)); + // some cursors might have moved into hidden regions, make sure they are in expanded regions + let selections = this.editor.getSelections(); + let selectionLineNumbers = selections ? selections.map(s => s.startLineNumber) : []; + this.foldingModel.update(this.computeRanges(this.foldingModel.textModel), selectionLineNumbers); } return this.foldingModel; }); @@ -508,6 +512,78 @@ class FoldRecursivelyAction extends FoldingAction { } } +class FoldAllBlockCommentsAction extends FoldingAction { + + constructor() { + super({ + id: 'editor.foldAllBlockComments', + label: nls.localize('foldAllBlockComments.label', "Fold All Block Comments"), + alias: 'Fold All Block Comments', + precondition: null, + kbOpts: { + kbExpr: EditorContextKeys.textFocus, + primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_SLASH) + } + }); + } + + invoke(foldingController: FoldingController, foldingModel: FoldingModel, editor: ICodeEditor): void { + let comments = LanguageConfigurationRegistry.getComments(editor.getModel().getLanguageIdentifier().id); + if (comments && comments.blockCommentStartToken) { + let regExp = new RegExp('^\\s*' + escapeRegExpCharacters(comments.blockCommentStartToken)); + setCollapseStateForMatchingLines(foldingModel, regExp, true); + } + } +} + +class FoldAllRegionsAction extends FoldingAction { + + constructor() { + super({ + id: 'editor.foldAllMarkerRegions', + label: nls.localize('foldAllMarkerRegions.label', "Fold All Regions"), + alias: 'Fold All Regions', + precondition: null, + kbOpts: { + kbExpr: EditorContextKeys.textFocus, + primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_8) + } + }); + } + + invoke(foldingController: FoldingController, foldingModel: FoldingModel, editor: ICodeEditor): void { + let foldingRules = LanguageConfigurationRegistry.getFoldingRules(editor.getModel().getLanguageIdentifier().id); + if (foldingRules && foldingRules.markers && foldingRules.markers.start) { + let regExp = new RegExp(foldingRules.markers.start); + setCollapseStateForMatchingLines(foldingModel, regExp, true); + } + } +} + +class UnfoldAllRegionsAction extends FoldingAction { + + constructor() { + super({ + id: 'editor.unfoldAllMarkerRegions', + label: nls.localize('unfoldAllMarkerRegions.label', "Unfold All Regions"), + alias: 'Unfold All Regions', + precondition: null, + kbOpts: { + kbExpr: EditorContextKeys.textFocus, + primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_9) + } + }); + } + + invoke(foldingController: FoldingController, foldingModel: FoldingModel, editor: ICodeEditor): void { + let foldingRules = LanguageConfigurationRegistry.getFoldingRules(editor.getModel().getLanguageIdentifier().id); + if (foldingRules && foldingRules.markers && foldingRules.markers.start) { + let regExp = new RegExp(foldingRules.markers.start); + setCollapseStateForMatchingLines(foldingModel, regExp, false); + } + } +} + class FoldAllAction extends FoldingAction { constructor() { @@ -568,8 +644,11 @@ registerEditorAction(FoldAction); registerEditorAction(FoldRecursivelyAction); registerEditorAction(FoldAllAction); registerEditorAction(UnfoldAllAction); +registerEditorAction(FoldAllBlockCommentsAction); +registerEditorAction(FoldAllRegionsAction); +registerEditorAction(UnfoldAllRegionsAction); -for (let i = 1; i <= 9; i++) { +for (let i = 1; i <= 7; i++) { registerInstantiatedEditorAction( new FoldLevelAction({ id: FoldLevelAction.ID(i), diff --git a/src/vs/editor/contrib/folding/foldingModel.ts b/src/vs/editor/contrib/folding/foldingModel.ts index 63c883a5857..8c39fd86c30 100644 --- a/src/vs/editor/contrib/folding/foldingModel.ts +++ b/src/vs/editor/contrib/folding/foldingModel.ts @@ -5,7 +5,7 @@ import { IModel, IModelDecorationOptions, IModelDeltaDecoration, IModelDecorationsChangeAccessor } from 'vs/editor/common/editorCommon'; import Event, { Emitter } from 'vs/base/common/event'; -import { FoldingRanges, ILineRange } from './foldingRanges'; +import { FoldingRanges, ILineRange, FoldingRegion } from './foldingRanges'; export interface IDecorationProvider { getDecorationOption(isCollapsed: boolean): IModelDecorationOptions; @@ -60,12 +60,24 @@ export class FoldingModel { this._updateEventEmitter.fire({ model: this, collapseStateChanged: regions }); } - public update(newRanges: FoldingRanges): void { + public update(newRanges: FoldingRanges, blockedLineNumers: number[] = []): void { let newEditorDecorations = []; + let isBlocked = (startLineNumber, endLineNumber) => { + for (let blockedLineNumber of blockedLineNumers) { + if (startLineNumber < blockedLineNumber && blockedLineNumber <= endLineNumber) { // first line is visible + return true; + } + } + return false; + }; + let initRange = (index: number, isCollapsed: boolean) => { - newRanges.setCollapsed(index, isCollapsed); let startLineNumber = newRanges.getStartLineNumber(index); + if (isCollapsed && isBlocked(startLineNumber, newRanges.getEndLineNumber(index))) { + isCollapsed = false; + } + newRanges.setCollapsed(index, isCollapsed); let maxColumn = this._textModel.getLineMaxColumn(startLineNumber); let decorationRange = { startLineNumber: startLineNumber, @@ -167,7 +179,7 @@ export class FoldingModel { let index = this._ranges.findRange(lineNumber); let level = 1; while (index >= 0) { - let current = new FoldingRegion(this._ranges, index); + let current = this._ranges.toRegion(index); if (!filter || filter(current, level)) { result.push(current); } @@ -182,7 +194,7 @@ export class FoldingModel { if (this._ranges) { let index = this._ranges.findRange(lineNumber); if (index >= 0) { - return new FoldingRegion(this._ranges, index); + return this._ranges.toRegion(index); } } return null; @@ -195,7 +207,7 @@ export class FoldingModel { let index = region ? region.regionIndex + 1 : 0; let endLineNumber = region ? region.endLineNumber : Number.MAX_VALUE; for (let i = index, len = this._ranges.length; i < len; i++) { - let current = new FoldingRegion(this._ranges, i); + let current = this._ranges.toRegion(i); if (this._ranges.getStartLineNumber(i) < endLineNumber) { if (trackLevel) { while (levelStack.length > 0 && !current.containedBy(levelStack[levelStack.length - 1])) { @@ -217,41 +229,7 @@ export class FoldingModel { } -export class FoldingRegion { - constructor(private ranges: FoldingRanges, private index: number) { - } - - public get startLineNumber() { - return this.ranges.getStartLineNumber(this.index); - } - - public get endLineNumber() { - return this.ranges.getEndLineNumber(this.index); - } - - public get regionIndex() { - return this.index; - } - - public get parentIndex() { - return this.ranges.getParentIndex(this.index); - } - - public get isCollapsed() { - return this.ranges.isCollapsed(this.index); - } - - containedBy(range: ILineRange): boolean { - return range.startLineNumber <= this.startLineNumber && range.endLineNumber >= this.endLineNumber; - } - containsLine(lineNumber: number) { - return this.startLineNumber <= lineNumber && lineNumber <= this.endLineNumber; - } - hidesLine(lineNumber: number) { - return this.startLineNumber < lineNumber && lineNumber <= this.endLineNumber; - } -} /** * Collapse or expand the regions at the given locations including all children. @@ -306,4 +284,23 @@ export function setCollapseStateAtLevel(foldingModel: FoldingModel, foldLevel: n let filter = (region: FoldingRegion, level: number) => level === foldLevel && region.isCollapsed !== doCollapse && !blockedLineNumbers.some(line => region.containsLine(line)); let toToggle = foldingModel.getRegionsInside(null, filter); foldingModel.toggleCollapseState(toToggle); +} + +/** + * Folds all regions for which the lines start with a given regex + * @param foldingModel the folding model + */ +export function setCollapseStateForMatchingLines(foldingModel: FoldingModel, regExp: RegExp, doCollapse: boolean): void { + let editorModel = foldingModel.textModel; + let ranges = foldingModel.ranges; + let toToggle = []; + for (let i = ranges.length - 1; i >= 0; i--) { + if (doCollapse !== ranges.isCollapsed(i)) { + let startLineNumber = ranges.getStartLineNumber(i); + if (regExp.test(editorModel.getLineContent(startLineNumber))) { + toToggle.push(ranges.toRegion(i)); + } + } + } + foldingModel.toggleCollapseState(toToggle); } \ No newline at end of file diff --git a/src/vs/editor/contrib/folding/foldingRanges.ts b/src/vs/editor/contrib/folding/foldingRanges.ts index bbe244de30a..666e174f1b2 100644 --- a/src/vs/editor/contrib/folding/foldingRanges.ts +++ b/src/vs/editor/contrib/folding/foldingRanges.ts @@ -84,6 +84,10 @@ export class FoldingRanges { } } + public toRegion(index: number): FoldingRegion { + return new FoldingRegion(this, index); + } + public getParentIndex(index: number) { this.ensureParentIndices(); let parent = ((this._startIndexes[index] & MASK_INDENT) >>> 24) + ((this._endIndexes[index] & MASK_INDENT) >>> 16); @@ -130,4 +134,40 @@ export class FoldingRanges { } return -1; } +} + +export class FoldingRegion { + + constructor(private ranges: FoldingRanges, private index: number) { + } + + public get startLineNumber() { + return this.ranges.getStartLineNumber(this.index); + } + + public get endLineNumber() { + return this.ranges.getEndLineNumber(this.index); + } + + public get regionIndex() { + return this.index; + } + + public get parentIndex() { + return this.ranges.getParentIndex(this.index); + } + + public get isCollapsed() { + return this.ranges.isCollapsed(this.index); + } + + containedBy(range: ILineRange): boolean { + return range.startLineNumber <= this.startLineNumber && range.endLineNumber >= this.endLineNumber; + } + containsLine(lineNumber: number) { + return this.startLineNumber <= lineNumber && lineNumber <= this.endLineNumber; + } + hidesLine(lineNumber: number) { + return this.startLineNumber < lineNumber && lineNumber <= this.endLineNumber; + } } \ No newline at end of file diff --git a/src/vs/editor/contrib/folding/test/foldingModel.test.ts b/src/vs/editor/contrib/folding/test/foldingModel.test.ts index a00ef95b045..287baab9c2d 100644 --- a/src/vs/editor/contrib/folding/test/foldingModel.test.ts +++ b/src/vs/editor/contrib/folding/test/foldingModel.test.ts @@ -5,7 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { FoldingModel, FoldingRegion, setCollapseStateAtLevel, setCollapseStateLevelsDown, setCollapseStateLevelsUp } from 'vs/editor/contrib/folding/foldingModel'; +import { FoldingModel, setCollapseStateAtLevel, setCollapseStateLevelsDown, setCollapseStateLevelsUp, setCollapseStateForMatchingLines } from 'vs/editor/contrib/folding/foldingModel'; import { Model } from 'vs/editor/common/model/model'; import { computeRanges } from 'vs/editor/contrib/folding/indentRangeProvider'; import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; @@ -13,6 +13,8 @@ import { TrackedRangeStickiness, IModelDeltaDecoration, IModel, IModelDecoration import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; +import { FoldingRegion } from 'vs/editor/contrib/folding/foldingRanges'; +import { escapeRegExpCharacters } from 'vs/base/common/strings'; interface ExpectedRegion { @@ -588,4 +590,44 @@ suite('Folding Model', () => { }); + + test('setCollapseStateForMatchingLines', () => { + let lines = [ + /* 1*/ '/**', + /* 2*/ ' * the class', + /* 3*/ ' */', + /* 4*/ 'class A {', + /* 5*/ ' /**', + /* 6*/ ' * the foo', + /* 7*/ ' */', + /* 8*/ ' void foo() {', + /* 9*/ ' /*', + /* 10*/ ' * the comment', + /* 11*/ ' */', + /* 12*/ ' }', + /* 13*/ '}']; + + let textModel = Model.createFromString(lines.join('\n')); + try { + let foldingModel = new FoldingModel(textModel, new TestDecorationProvider(textModel)); + + let ranges = computeRanges(textModel, false, { start: /^\/\/#region$/, end: /^\/\/#endregion$/ }); + foldingModel.update(ranges); + + let r1 = r(1, 3, false); + let r2 = r(4, 12, false); + let r3 = r(5, 7, false); + let r4 = r(8, 11, false); + let r5 = r(9, 11, false); + assertRanges(foldingModel, [r1, r2, r3, r4, r5]); + + let regExp = new RegExp('^\\s*' + escapeRegExpCharacters('/*')); + setCollapseStateForMatchingLines(foldingModel, regExp, true); + assertFoldedRanges(foldingModel, [r1, r3, r5], '1'); + } finally { + textModel.dispose(); + } + + }); + }); \ No newline at end of file diff --git a/src/vs/editor/contrib/gotoError/gotoError.ts b/src/vs/editor/contrib/gotoError/gotoError.ts index 758634a1f00..f60bc6af83d 100644 --- a/src/vs/editor/contrib/gotoError/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/gotoError.ts @@ -15,7 +15,6 @@ import URI from 'vs/base/common/uri'; import * as dom from 'vs/base/browser/dom'; import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IMarker, IMarkerService } from 'vs/platform/markers/common/markers'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; @@ -398,23 +397,12 @@ class MarkerNavigationAction extends EditorAction { } public run(accessor: ServicesAccessor, editor: ICodeEditor): void { - const telemetryService = accessor.get(ITelemetryService); - const controller = MarkerController.get(editor); if (!controller) { return; } let model = controller.getOrCreateModel(); - /* __GDPR__ - "zoneWidgetShown" : { - "mode" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "${include}": [ - "${EditorTelemetryData}" - ] - } - */ - telemetryService.publicLog('zoneWidgetShown', { mode: 'go to error', ...editor.getTelemetryData() }); if (model) { if (this._isNext) { model.next(); diff --git a/src/vs/editor/contrib/hover/hover.css b/src/vs/editor/contrib/hover/hover.css index 47f30d4d07e..3c1349d47fc 100644 --- a/src/vs/editor/contrib/hover/hover.css +++ b/src/vs/editor/contrib/hover/hover.css @@ -27,14 +27,6 @@ max-width: 500px; } -/* - * https://github.com/Microsoft/monaco-editor/issues/417 - * Safari 10.1, fails inherit correct visibility from parent when we change the visibility of parent element from hidden to inherit, in this particular case. - */ -.monaco-editor-hover .monaco-scrollable-element { - visibility: visible; -} - .monaco-editor-hover .hover-row { padding: 4px 5px; } @@ -74,4 +66,4 @@ .monaco-editor-hover .monaco-tokenized-source { white-space: pre-wrap; word-break: break-all; -} \ No newline at end of file +} diff --git a/src/vs/editor/contrib/hover/modesContentHover.ts b/src/vs/editor/contrib/hover/modesContentHover.ts index 00ec6881e85..4e93efdcb96 100644 --- a/src/vs/editor/contrib/hover/modesContentHover.ts +++ b/src/vs/editor/contrib/hover/modesContentHover.ts @@ -295,7 +295,8 @@ export class ModesContentHoverWidget extends ContentHoverWidget { // update column from which to show var renderColumn = Number.MAX_VALUE, highlightRange = messages[0].range, - fragment = document.createDocumentFragment(); + fragment = document.createDocumentFragment(), + isEmptyHoverContent = true; let containColorPicker = false; messages.forEach((msg) => { @@ -312,6 +313,7 @@ export class ModesContentHoverWidget extends ContentHoverWidget { .forEach(contents => { const renderedContents = this._markdownRenderer.render(contents); fragment.appendChild($('div.hover-row', null, renderedContents)); + isEmptyHoverContent = false; }); } else { containColorPicker = true; @@ -392,7 +394,7 @@ export class ModesContentHoverWidget extends ContentHoverWidget { // show - if (!containColorPicker) { + if (!containColorPicker && !isEmptyHoverContent) { this.showAt(new Position(renderRange.startLineNumber, renderColumn), this._shouldFocus); this.updateContents(fragment); } diff --git a/src/vs/editor/contrib/indentation/indentation.ts b/src/vs/editor/contrib/indentation/indentation.ts index 0ff2954e47b..427ef548b30 100644 --- a/src/vs/editor/contrib/indentation/indentation.ts +++ b/src/vs/editor/contrib/indentation/indentation.ts @@ -21,6 +21,7 @@ import { ShiftCommand } from 'vs/editor/common/commands/shiftCommand'; import { TextEdit, StandardTokenType } from 'vs/editor/common/modes'; import * as IndentUtil from './indentUtils'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import { IndentConsts } from 'vs/editor/common/modes/supports/indentRules'; export function shiftIndent(tabSize: number, indentation: string, count?: number): string { count = count || 1; @@ -472,10 +473,31 @@ export class AutoIndentOnPaste implements IEditorContribution { text: newIndent }); firstLineText = newIndent + firstLineText.substr(oldIndentation.length); + } else { + let indentMetadata = LanguageConfigurationRegistry.getIndentMetadata(model, startLineNumber); + + if (indentMetadata === 0 || indentMetadata === IndentConsts.UNINDENT_MASK) { + // we paste content into a line where only contains whitespaces + // after pasting, the indentation of the first line is already correct + // the first line doesn't match any indentation rule + // then no-op. + return; + } } } } + const firstLineNumber = startLineNumber; + + // ignore empty or ignored lines + while (startLineNumber < range.endLineNumber) { + if (!/\S/.test(model.getLineContent(startLineNumber + 1))) { + startLineNumber++; + continue; + } + break; + } + if (startLineNumber !== range.endLineNumber) { let virtualModel = { getLineTokens: (lineNumber: number) => { @@ -488,7 +510,7 @@ export class AutoIndentOnPaste implements IEditorContribution { return model.getLanguageIdAtPosition(lineNumber, column); }, getLineContent: (lineNumber: number) => { - if (lineNumber === startLineNumber) { + if (lineNumber === firstLineNumber) { return firstLineText; } else { return model.getLineContent(lineNumber); diff --git a/src/vs/editor/contrib/links/links.css b/src/vs/editor/contrib/links/links.css index 9e0a5218571..7516dac36ed 100644 --- a/src/vs/editor/contrib/links/links.css +++ b/src/vs/editor/contrib/links/links.css @@ -5,6 +5,7 @@ .monaco-editor .detected-link, .monaco-editor .detected-link-active { text-decoration: underline; + text-underline-position: under; } .monaco-editor .detected-link-active { diff --git a/src/vs/editor/contrib/quickFix/quickFix.ts b/src/vs/editor/contrib/quickFix/quickFix.ts index 7c9eaf759c0..3a13fc98684 100644 --- a/src/vs/editor/contrib/quickFix/quickFix.ts +++ b/src/vs/editor/contrib/quickFix/quickFix.ts @@ -7,16 +7,16 @@ import URI from 'vs/base/common/uri'; import { IReadOnlyModel } from 'vs/editor/common/editorCommon'; import { Range } from 'vs/editor/common/core/range'; -import { CodeActionProviderRegistry, CodeAction, Command } from 'vs/editor/common/modes'; +import { CodeActionProviderRegistry, CodeAction } from 'vs/editor/common/modes'; import { asWinJsPromise } from 'vs/base/common/async'; import { TPromise } from 'vs/base/common/winjs.base'; import { onUnexpectedExternalError, illegalArgument } from 'vs/base/common/errors'; import { IModelService } from 'vs/editor/common/services/modelService'; import { registerLanguageCommand } from 'vs/editor/browser/editorExtensions'; -export function getCodeActions(model: IReadOnlyModel, range: Range): TPromise<(CodeAction | Command)[]> { +export function getCodeActions(model: IReadOnlyModel, range: Range): TPromise { - const allResults: (CodeAction | Command)[] = []; + const allResults: CodeAction[] = []; const promises = CodeActionProviderRegistry.all(model).map(support => { return asWinJsPromise(token => support.provideCodeActions(model, range, token)).then(result => { if (Array.isArray(result)) { diff --git a/src/vs/editor/contrib/quickFix/quickFixCommands.ts b/src/vs/editor/contrib/quickFix/quickFixCommands.ts index 6f16b6e1610..7de263a3863 100644 --- a/src/vs/editor/contrib/quickFix/quickFixCommands.ts +++ b/src/vs/editor/contrib/quickFix/quickFixCommands.ts @@ -11,6 +11,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { optional } from 'vs/platform/instantiation/common/instantiation'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IEditorContribution } from 'vs/editor/common/editorCommon'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; @@ -46,7 +47,7 @@ export class QuickFixController implements IEditorContribution { @IContextMenuService contextMenuService: IContextMenuService, @IKeybindingService private readonly _keybindingService: IKeybindingService, @ITextModelService private readonly _textModelService: ITextModelService, - @IFileService private _fileService: IFileService + @optional(IFileService) private _fileService: IFileService ) { this._editor = editor; this._model = new QuickFixModel(this._editor, markerService); diff --git a/src/vs/editor/contrib/quickFix/quickFixModel.ts b/src/vs/editor/contrib/quickFix/quickFixModel.ts index fa61f6e256d..e2ff0dcd2a1 100644 --- a/src/vs/editor/contrib/quickFix/quickFixModel.ts +++ b/src/vs/editor/contrib/quickFix/quickFixModel.ts @@ -11,7 +11,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; -import { CodeActionProviderRegistry, CodeAction, Command } from 'vs/editor/common/modes'; +import { CodeActionProviderRegistry, CodeAction } from 'vs/editor/common/modes'; import { getCodeActions } from './quickFix'; import { Position } from 'vs/editor/common/core/position'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; @@ -112,16 +112,7 @@ export class QuickFixOracle { const model = this._editor.getModel(); const range = model.validateRange(rangeOrSelection); const position = rangeOrSelection instanceof Selection ? rangeOrSelection.getPosition() : rangeOrSelection.getStartPosition(); - - const fixes = getCodeActions(model, range).then(actions => - actions.map(action => { - if ('id' in action) { - // must be a command - const command = action as Command; - return { title: command.title, command: command } as CodeAction; - } - return action; - })); + const fixes = getCodeActions(model, range); this._signalChange({ type, diff --git a/src/vs/editor/contrib/quickFix/test/quickFix.test.ts b/src/vs/editor/contrib/quickFix/test/quickFix.test.ts new file mode 100644 index 00000000000..315d5b56e31 --- /dev/null +++ b/src/vs/editor/contrib/quickFix/test/quickFix.test.ts @@ -0,0 +1,58 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import URI from 'vs/base/common/uri'; +import Severity from 'vs/base/common/severity'; +import { Model } from 'vs/editor/common/model/model'; +import { CodeActionProviderRegistry, LanguageIdentifier, CodeActionProvider } from 'vs/editor/common/modes'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { Range } from 'vs/editor/common/core/range'; +import { getCodeActions } from 'vs/editor/contrib/quickFix/quickFix'; + +suite('QuickFix', () => { + + let langId = new LanguageIdentifier('fooLang', 17); + let uri = URI.parse('untitled:path'); + let model: Model; + let disposables: IDisposable[] = []; + + setup(function () { + model = Model.createFromString('test1\ntest2\ntest3', undefined, langId, uri); + disposables = [model]; + }); + + teardown(function () { + dispose(disposables); + }); + + test('basics', async function () { + + const provider = new class implements CodeActionProvider { + provideCodeActions() { + return [{ + title: 'Testing1', + diagnostics: [{ + startLineNumber: 1, + startColumn: 1, + endLineNumber: 2, + endColumn: 1, + severity: Severity.Error, + message: 'some error' + }] + }, { + title: 'Testing2' + }]; + } + }; + + disposables.push(CodeActionProviderRegistry.register('fooLang', provider)); + + const actions = await getCodeActions(model, new Range(1, 1, 2, 1)); + assert.equal(actions.length, 2); + }); + +}); diff --git a/src/vs/editor/contrib/referenceSearch/media/referencesWidget.css b/src/vs/editor/contrib/referenceSearch/media/referencesWidget.css index 5c8996336c3..cc49758d1dd 100644 --- a/src/vs/editor/contrib/referenceSearch/media/referencesWidget.css +++ b/src/vs/editor/contrib/referenceSearch/media/referencesWidget.css @@ -27,8 +27,7 @@ } .monaco-editor .reference-zone-widget .ref-tree { - line-height: 22px; - font-size: 13px; + line-height: 23px; } .monaco-editor .reference-zone-widget .ref-tree .reference { diff --git a/src/vs/editor/contrib/referenceSearch/referencesController.ts b/src/vs/editor/contrib/referenceSearch/referencesController.ts index f4c10cdbb60..fac06e8beb0 100644 --- a/src/vs/editor/contrib/referenceSearch/referencesController.ts +++ b/src/vs/editor/contrib/referenceSearch/referencesController.ts @@ -10,11 +10,9 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; import { IEditorService } from 'vs/platform/editor/common/editor'; -import { fromPromise, stopwatch } from 'vs/base/common/event'; import { IInstantiationService, optional } from 'vs/platform/instantiation/common/instantiation'; import { IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IMessageService } from 'vs/platform/message/common/message'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IStorageService } from 'vs/platform/storage/common/storage'; @@ -58,7 +56,6 @@ export class ReferencesController implements editorCommon.IEditorContribution { @IContextKeyService contextKeyService: IContextKeyService, @IEditorService private _editorService: IEditorService, @ITextModelService private _textModelResolverService: ITextModelService, - @ITelemetryService private _telemetryService: ITelemetryService, @IMessageService private _messageService: IMessageService, @IInstantiationService private _instantiationService: IInstantiationService, @IWorkspaceContextService private _contextService: IWorkspaceContextService, @@ -143,7 +140,7 @@ export class ReferencesController implements editorCommon.IEditorContribution { const requestId = ++this._requestIdPool; - const promise = modelPromise.then(model => { + modelPromise.then(model => { // still current request? widget still open? if (requestId !== this._requestIdPool || !this._widget) { @@ -156,23 +153,6 @@ export class ReferencesController implements editorCommon.IEditorContribution { this._model = model; - // measure time it stays open - const startTime = Date.now(); - this._disposables.push({ - dispose: () => { - /* __GDPR__ - "zoneWidgetShown" : { - "mode" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "elapsedTime": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this._telemetryService.publicLog('zoneWidgetShown', { - mode: 'reference search', - elapsedTime: Date.now() - startTime - }); - } - }); - // show widget return this._widget.setModel(this._model).then(() => { @@ -192,20 +172,6 @@ export class ReferencesController implements editorCommon.IEditorContribution { }, error => { this._messageService.show(Severity.Error, error); }); - - const onDone = stopwatch(fromPromise(promise)); - const mode = this._editor.getModel().getLanguageIdentifier().language; - - /* __GDPR__ - "findReferences" : { - "durarion" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "mode": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - onDone(duration => this._telemetryService.publicLog('findReferences', { - duration, - mode - })); } public closeWidget(): void { diff --git a/src/vs/editor/contrib/referenceSearch/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/referencesWidget.ts index 4b2d75c1b2d..a1b758e7844 100644 --- a/src/vs/editor/contrib/referenceSearch/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/referencesWidget.ts @@ -433,7 +433,7 @@ class Renderer implements tree.IRenderer { } getHeight(tree: tree.ITree, element: FileReferences | OneReference): number { - return 22; + return 23; } getTemplateId(tree: tree.ITree, element: FileReferences | OneReference): string { diff --git a/src/vs/editor/contrib/snippet/snippetController2.ts b/src/vs/editor/contrib/snippet/snippetController2.ts index 8752b20a8ec..eda1c4e1509 100644 --- a/src/vs/editor/contrib/snippet/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/snippetController2.ts @@ -19,6 +19,7 @@ import { repeat } from 'vs/base/common/strings'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { IEditorContribution } from 'vs/editor/common/editorCommon'; +import { ILogService } from 'vs/platform/log/common/log'; export class SnippetController2 implements IEditorContribution { @@ -41,6 +42,7 @@ export class SnippetController2 implements IEditorContribution { constructor( private readonly _editor: ICodeEditor, + @ILogService private _logService: ILogService, @IContextKeyService contextKeyService: IContextKeyService ) { this._inSnippet = SnippetController2.InSnippetMode.bindTo(contextKeyService); @@ -64,6 +66,26 @@ export class SnippetController2 implements IEditorContribution { overwriteBefore: number = 0, overwriteAfter: number = 0, undoStopBefore: boolean = true, undoStopAfter: boolean = true ): void { + // this is here to find out more about the yet-not-understood + // error that sometimes happens when we fail to inserted a nested + // snippet + try { + this._doInsert(template, overwriteBefore, overwriteAfter, undoStopBefore, undoStopAfter); + + } catch (e) { + this.cancel(); + this._logService.error(e); + this._logService.error('snippet_error'); + this._logService.error('insert_template=', template); + this._logService.error('existing_template=', this._session ? this._session._logInfo() : ''); + } + } + + private _doInsert( + template: string, + overwriteBefore: number = 0, overwriteAfter: number = 0, + undoStopBefore: boolean = true, undoStopAfter: boolean = true + ): void { // don't listen while inserting the snippet // as that is the inflight state causing cancelation diff --git a/src/vs/editor/contrib/snippet/snippetSession.css b/src/vs/editor/contrib/snippet/snippetSession.css index b6c7d72adda..e6c549bb760 100644 --- a/src/vs/editor/contrib/snippet/snippetSession.css +++ b/src/vs/editor/contrib/snippet/snippetSession.css @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -.monaco-editor.vs .snippet-placeholder { background-color: rgba(10, 50, 100, 0.1); } -.monaco-editor.vs-dark .snippet-placeholder { background-color: rgba(124, 124, 124, 0.1); } -.monaco-editor.hc-black .snippet-placeholder { background-color: rgba(124, 124, 124, 0.1); } +.monaco-editor.vs .snippet-placeholder { background-color: rgba(10, 50, 100, 0.2); min-width: 2px; } +.monaco-editor.vs-dark .snippet-placeholder { background-color: rgba(124, 124, 124, 0.3); min-width: 2px; } +.monaco-editor.hc-black .snippet-placeholder { background-color: rgba(124, 124, 124, 0.3); min-width: 2px; } .monaco-editor.vs .finish-snippet-placeholder { outline: rgba(10, 50, 100, 0.5) solid 1px; } .monaco-editor.vs-dark .finish-snippet-placeholder { outline: #525252 solid 1px; } diff --git a/src/vs/editor/contrib/snippet/snippetSession.ts b/src/vs/editor/contrib/snippet/snippetSession.ts index a63d8c9f599..0764236fae9 100644 --- a/src/vs/editor/contrib/snippet/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/snippetSession.ts @@ -27,8 +27,8 @@ export class OneSnippet { private _placeholderDecorations: Map; private _placeholderGroups: Placeholder[][]; - private _placeholderGroupsIdx: number; - private _nestingLevel: number = 1; + _placeholderGroupsIdx: number; + _nestingLevel: number = 1; private static readonly _decor = { active: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges, className: 'snippet-placeholder' }), @@ -143,17 +143,28 @@ export class OneSnippet { return this._snippet.placeholders.length > 0; } - get placeholderRanges() { - const ret: Range[] = []; - this._placeholderDecorations.forEach((id, placeholder) => { - if (!placeholder.isFinalTabstop) { - const range = this._editor.getModel().getDecorationRange(id); - if (range) { - ret.push(range); + computePossibleSelections() { + const result = new Map(); + for (const placeholdersWithEqualIndex of this._placeholderGroups) { + let ranges: Range[]; + + for (const placeholder of placeholdersWithEqualIndex) { + if (placeholder.isFinalTabstop) { + // ignore those + break; } + + if (!ranges) { + ranges = []; + result.set(placeholder.index, ranges); + } + + const id = this._placeholderDecorations.get(placeholder); + const range = this._editor.getModel().getDecorationRange(id); + ranges.push(range); } - }); - return ret; + } + return result; } get choice(): Choice { @@ -316,6 +327,7 @@ export class SnippetSession { private readonly _editor: ICodeEditor; private readonly _template: string; + private readonly _templateMerges: [number, number, string][] = []; private readonly _overwriteBefore: number; private readonly _overwriteAfter: number; private _snippets: OneSnippet[] = []; @@ -331,6 +343,10 @@ export class SnippetSession { dispose(this._snippets); } + _logInfo(): string { + return `template="${this._template}", merged_templates="${this._templateMerges.join(' -> ')}"`; + } + insert(): void { const model = this._editor.getModel(); @@ -349,6 +365,7 @@ export class SnippetSession { } merge(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { + this._templateMerges.push([this._snippets[0]._nestingLevel, this._snippets[0]._placeholderGroupsIdx, template]); const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, template, overwriteBefore, overwriteAfter, true); this._editor.setSelections(this._editor.getModel().pushEditOperations(this._editor.getSelections(), edits, undoEdits => { @@ -369,11 +386,13 @@ export class SnippetSession { next(): void { const newSelections = this._move(true); this._editor.setSelections(newSelections); + this._editor.revealPositionInCenterIfOutsideViewport(newSelections[0].getPosition()); } prev(): void { const newSelections = this._move(false); this._editor.setSelections(newSelections); + this._editor.revealPositionInCenterIfOutsideViewport(newSelections[0].getPosition()); } private _move(fwd: boolean | undefined): Selection[] { @@ -415,29 +434,56 @@ export class SnippetSession { return false; } - const ranges: Range[] = []; + let ranges: Range[] = []; + let placeholderIndex: number = -1; for (const snippet of this._snippets) { - ranges.push(...snippet.placeholderRanges); + + const possibleSelections = snippet.computePossibleSelections(); + + // for the first snippet find the placeholder (and its ranges) + // that contain at least one selection. for all remaining snippets + // the same placeholder (and their ranges) must be used. + if (placeholderIndex < 0) { + possibleSelections.forEach((ranges, index) => { + if (placeholderIndex >= 0) { + return; + } + ranges.sort(Range.compareRangesUsingStarts); + for (const selection of selections) { + if (ranges[0].containsRange(selection)) { + placeholderIndex = index; + break; + } + } + }); + } + + if (placeholderIndex < 0) { + // return false if we couldn't associate a selection to + // this (the first) snippet + return false; + } + + ranges.push(...possibleSelections.get(placeholderIndex)); } - if (selections.length > ranges.length) { + if (selections.length !== ranges.length) { + // this means we started at a placeholder with N + // ranges and new have M (N > M) selections. + // So (at least) one placeholder is without selection -> cancel return false; } - // sort selections and ranges by their start position - // and then make sure each selection is contained by - // a placeholder range + // also sort (placeholder)-ranges. then walk both arrays and + // make sure the placeholder-ranges contain the corresponding + // selection selections.sort(Range.compareRangesUsingStarts); ranges.sort(Range.compareRangesUsingStarts); - outer: for (const selection of selections) { - let range: Range; - while (range = ranges.shift()) { - if (range.containsRange(selection)) { - continue outer; - } + for (let i = 0; i < ranges.length; i++) { + if (!ranges[i].containsRange(selections[i])) { + return false; } - return false; } return true; diff --git a/src/vs/editor/contrib/snippet/test/snippetController2.old.test.ts b/src/vs/editor/contrib/snippet/test/snippetController2.old.test.ts index a7372523874..4ad7e0dec05 100644 --- a/src/vs/editor/contrib/snippet/test/snippetController2.old.test.ts +++ b/src/vs/editor/contrib/snippet/test/snippetController2.old.test.ts @@ -12,6 +12,7 @@ import { TestCodeEditor, withTestCodeEditor } from 'vs/editor/test/browser/testC import { Cursor } from 'vs/editor/common/controller/cursor'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import { NoopLogService } from 'vs/platform/log/common/log'; class TestSnippetController extends SnippetController2 { @@ -19,7 +20,7 @@ class TestSnippetController extends SnippetController2 { editor: ICodeEditor, @IContextKeyService private _contextKeyService: IContextKeyService ) { - super(editor, _contextKeyService); + super(editor, new NoopLogService(), _contextKeyService); } isInSnippetMode(): boolean { diff --git a/src/vs/editor/contrib/snippet/test/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/snippetController2.test.ts index 53278154130..638047b4f7c 100644 --- a/src/vs/editor/contrib/snippet/test/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/snippetController2.test.ts @@ -11,6 +11,7 @@ import { createTestCodeEditor } from 'vs/editor/test/browser/testCodeEditor'; import { Model } from 'vs/editor/common/model/model'; import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import { NoopLogService } from 'vs/platform/log/common/log'; suite('SnippetController2', function () { @@ -31,6 +32,7 @@ suite('SnippetController2', function () { let editor: ICodeEditor; let model: Model; let contextKeys: MockContextKeyService; + let logService = new NoopLogService(); setup(function () { contextKeys = new MockContextKeyService(); @@ -45,13 +47,13 @@ suite('SnippetController2', function () { }); test('creation', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); assertContextKeys(contextKeys, false, false, false); ctrl.dispose(); }); test('insert, insert -> abort', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); ctrl.insert('foo${1:bar}foo$0'); assertContextKeys(contextKeys, true, false, true); @@ -63,7 +65,7 @@ suite('SnippetController2', function () { }); test('insert, insert -> tab, tab, done', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); ctrl.insert('${1:one}${2:two}$0'); assertContextKeys(contextKeys, true, false, true); @@ -81,7 +83,7 @@ suite('SnippetController2', function () { }); test('insert, insert -> cursor moves out (left/right)', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); ctrl.insert('foo${1:bar}foo$0'); assertContextKeys(contextKeys, true, false, true); @@ -93,7 +95,7 @@ suite('SnippetController2', function () { }); test('insert, insert -> cursor moves out (up/down)', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); ctrl.insert('foo${1:bar}foo$0'); assertContextKeys(contextKeys, true, false, true); @@ -105,7 +107,7 @@ suite('SnippetController2', function () { }); test('insert, insert -> cursors collapse', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); ctrl.insert('foo${1:bar}foo$0'); assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); @@ -117,7 +119,7 @@ suite('SnippetController2', function () { }); test('insert, insert plain text -> no snippet mode', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); ctrl.insert('foobar'); assertContextKeys(contextKeys, false, false, false); @@ -125,7 +127,7 @@ suite('SnippetController2', function () { }); test('insert, delete snippet text', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); ctrl.insert('${1:foobar}$0'); assertContextKeys(contextKeys, true, false, true); @@ -149,7 +151,7 @@ suite('SnippetController2', function () { }); test('insert, nested snippet', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); ctrl.insert('${1:foobar}$0'); assertContextKeys(contextKeys, true, false, true); assertSelections(editor, new Selection(1, 1, 1, 7), new Selection(2, 5, 2, 11)); @@ -168,7 +170,7 @@ suite('SnippetController2', function () { }); test('insert, nested plain text', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); ctrl.insert('${1:foobar}$0'); assertContextKeys(contextKeys, true, false, true); assertSelections(editor, new Selection(1, 1, 1, 7), new Selection(2, 5, 2, 11)); @@ -183,7 +185,7 @@ suite('SnippetController2', function () { }); test('Nested snippets without final placeholder jumps to next outer placeholder, #27898', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); ctrl.insert('for(const ${1:element} of ${2:array}) {$0}'); assertContextKeys(contextKeys, true, false, true); @@ -202,7 +204,7 @@ suite('SnippetController2', function () { }); test('Inconsistent tab stop behaviour with recursive snippets and tab / shift tab, #27543', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); ctrl.insert('1_calize(${1:nl}, \'${2:value}\')$0'); assertContextKeys(contextKeys, true, false, true); @@ -226,7 +228,7 @@ suite('SnippetController2', function () { }); test('Snippet tabstop selecting content of previously entered variable only works when separated by space, #23728', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); model.setValue(''); editor.setSelection(new Selection(1, 1, 1, 1)); @@ -244,7 +246,7 @@ suite('SnippetController2', function () { }); test('HTML Snippets Combine, #32211', function () { - const ctrl = new SnippetController2(editor, contextKeys); + const ctrl = new SnippetController2(editor, logService, contextKeys); model.setValue(''); model.updateOptions({ insertSpaces: false, tabSize: 4, trimAutoWhitespace: false }); @@ -274,4 +276,31 @@ suite('SnippetController2', function () { assertSelections(editor, new Selection(11, 18, 11, 22)); }); + test('Problems with nested snippet insertion #39594', function () { + const ctrl = new SnippetController2(editor, logService, contextKeys); + + model.setValue(''); + editor.setSelection(new Selection(1, 1, 1, 1)); + + ctrl.insert('$1 = ConvertTo-Json $1'); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(1, 19, 1, 19)); + + editor.setSelection(new Selection(1, 19, 1, 19)); + + // snippet mode should stop because $1 has two occurrences + // and we only have one selection left + assertContextKeys(contextKeys, false, false, false); + }); + + test('Problems with nested snippet insertion #39594', function () { + // ensure selection-change-to-cancel logic isn't too aggressive + const ctrl = new SnippetController2(editor, logService, contextKeys); + + model.setValue('a-\naaa-'); + editor.setSelections([new Selection(2, 5, 2, 5), new Selection(1, 3, 1, 3)]); + + ctrl.insert('log($1);$0'); + assertSelections(editor, new Selection(2, 9, 2, 9), new Selection(1, 7, 1, 7)); + assertContextKeys(contextKeys, true, false, true); + }); }); diff --git a/src/vs/editor/contrib/suggest/completionModel.ts b/src/vs/editor/contrib/suggest/completionModel.ts index 45ca3b876a9..21cc4b1f13a 100644 --- a/src/vs/editor/contrib/suggest/completionModel.ts +++ b/src/vs/editor/contrib/suggest/completionModel.ts @@ -5,7 +5,7 @@ 'use strict'; -import { fuzzyScore } from 'vs/base/common/filters'; +import { fuzzyScore, fuzzyScoreGracefulAggressive } from 'vs/base/common/filters'; import { ISuggestSupport, ISuggestResult } from 'vs/editor/common/modes'; import { ISuggestionItem, SnippetConfig } from './suggest'; import { isDisposable } from 'vs/base/common/lifecycle'; @@ -14,6 +14,7 @@ export interface ICompletionItem extends ISuggestionItem { matches?: number[]; score?: number; idx?: number; + word?: string; } @@ -37,13 +38,20 @@ export class LineContext { characterCountDelta: number; } +const enum Refilter { + Nothing = 0, + All = 1, + Incr = 2 +} + export class CompletionModel { private readonly _column: number; - private readonly _items: ISuggestionItem[]; + private readonly _items: ICompletionItem[]; private readonly _snippetCompareFn = CompletionModel._compareCompletionItems; private _lineContext: LineContext; + private _refilterKind: Refilter; private _filteredItems: ICompletionItem[]; private _isIncomplete: boolean; private _stats: ICompletionStats; @@ -51,6 +59,7 @@ export class CompletionModel { constructor(items: ISuggestionItem[], column: number, lineContext: LineContext, snippetConfig?: SnippetConfig) { this._items = items; this._column = column; + this._refilterKind = Refilter.All; this._lineContext = lineContext; if (snippetConfig === 'top') { @@ -78,10 +87,10 @@ export class CompletionModel { set lineContext(value: LineContext) { if (this._lineContext.leadingLineContent !== value.leadingLineContent - || this._lineContext.characterCountDelta !== value.characterCountDelta) { - + || this._lineContext.characterCountDelta !== value.characterCountDelta + ) { + this._refilterKind = this._lineContext.characterCountDelta < value.characterCountDelta && this._filteredItems ? Refilter.Incr : Refilter.All; this._lineContext = value; - this._filteredItems = undefined; } } @@ -116,22 +125,30 @@ export class CompletionModel { } private _ensureCachedState(): void { - if (!this._filteredItems) { + if (this._refilterKind !== Refilter.Nothing) { this._createCachedState(); } } private _createCachedState(): void { - this._filteredItems = []; + this._isIncomplete = false; this._stats = { suggestionCount: 0, snippetCount: 0, textCount: 0 }; const { leadingLineContent, characterCountDelta } = this._lineContext; let word = ''; - for (let i = 0; i < this._items.length; i++) { + // incrementally filter less + const source = this._refilterKind === Refilter.All ? this._items : this._filteredItems; + const target: typeof source = []; - const item = this._items[i]; + // picks a score function based on the number of + // items that we have to score/filter + const scoreFn = source.length > 2000 ? fuzzyScore : fuzzyScoreGracefulAggressive; + + for (let i = 0; i < source.length; i++) { + + const item = source[i]; const { suggestion, container } = item; // collect those supports that signaled having @@ -140,12 +157,16 @@ export class CompletionModel { // 'word' is that remainder of the current line that we // filter and score against. In theory each suggestion uses a - // differnet word, but in practice not - that's why we cache + // different word, but in practice not - that's why we cache const wordLen = suggestion.overwriteBefore + characterCountDelta - (item.position.column - this._column); if (word.length !== wordLen) { word = wordLen === 0 ? '' : leadingLineContent.slice(-wordLen); } + // remember the word against which this item was + // scored + item.word = word; + if (wordLen === 0) { // when there is nothing to score against, don't // event try to do. Use a const rank and rely on @@ -159,19 +180,19 @@ export class CompletionModel { // if it matches we check with the label to compute highlights // and if that doesn't yield a result we have no highlights, // despite having the match - let match = fuzzyScore(word, suggestion.filterText, suggestion.overwriteBefore); + let match = scoreFn(word, suggestion.filterText, suggestion.overwriteBefore); if (!match) { continue; } item.score = match[0]; item.matches = []; - match = fuzzyScore(word, suggestion.label, suggestion.overwriteBefore); + match = scoreFn(word, suggestion.label, suggestion.overwriteBefore); if (match) { item.matches = match[1]; } } else { // by default match `word` against the `label` - let match = fuzzyScore(word, suggestion.label, suggestion.overwriteBefore); + let match = scoreFn(word, suggestion.label, suggestion.overwriteBefore); if (match) { item.score = match[0]; item.matches = match[1]; @@ -182,7 +203,7 @@ export class CompletionModel { item.idx = i; - this._filteredItems.push(item); + target.push(item); // update stats this._stats.suggestionCount++; @@ -192,7 +213,8 @@ export class CompletionModel { } } - this._filteredItems.sort(this._snippetCompareFn); + this._filteredItems = target.sort(this._snippetCompareFn); + this._refilterKind = Refilter.Nothing; } private static _compareCompletionItems(a: ICompletionItem, b: ICompletionItem): number { diff --git a/src/vs/editor/contrib/suggest/suggestController.ts b/src/vs/editor/contrib/suggest/suggestController.ts index 3b08962d4f7..7d7013aaa1a 100644 --- a/src/vs/editor/contrib/suggest/suggestController.ts +++ b/src/vs/editor/contrib/suggest/suggestController.ts @@ -10,7 +10,6 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IEditorContribution, ScrollType } from 'vs/editor/common/editorCommon'; @@ -28,6 +27,7 @@ import { SuggestModel, State } from './suggestModel'; import { ICompletionItem } from './completionModel'; import { SuggestWidget } from './suggestWidget'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; +import { SuggestMemories } from 'vs/editor/contrib/suggest/suggestMemory'; class AcceptOnCharacterOracle { @@ -85,16 +85,17 @@ export class SuggestController implements IEditorContribution { private _model: SuggestModel; private _widget: SuggestWidget; + private _memory: SuggestMemories; private _toDispose: IDisposable[] = []; constructor( private _editor: ICodeEditor, @ICommandService private _commandService: ICommandService, - @ITelemetryService private _telemetryService: ITelemetryService, @IContextKeyService private _contextKeyService: IContextKeyService, @IInstantiationService private _instantiationService: IInstantiationService, ) { this._model = new SuggestModel(this._editor); + this._memory = _instantiationService.createInstance(SuggestMemories); this._toDispose.push(this._model.onDidTrigger(e => { if (!this._widget) { @@ -102,14 +103,23 @@ export class SuggestController implements IEditorContribution { } this._widget.showTriggered(e.auto); })); + let lastSelectedItem: ICompletionItem; + this._toDispose.push(this._model.onDidSuggest(e => { + let index = this._memory.select(this._editor.getModel().getLanguageIdentifier(), e.completionModel.items, lastSelectedItem); + if (index >= 0) { + lastSelectedItem = e.completionModel.items[index]; + } else { + index = 0; + lastSelectedItem = undefined; + } + this._widget.showSuggestions(e.completionModel, index, e.isFrozen, e.auto); + })); this._toDispose.push(this._model.onDidCancel(e => { if (this._widget && !e.retrigger) { this._widget.hideWidget(); + lastSelectedItem = undefined; } })); - this._toDispose.push(this._model.onDidSuggest(e => { - this._widget.showSuggestions(e.completionModel, e.isFrozen, e.auto); - })); // Manage the acceptSuggestionsOnEnter context key let acceptSuggestionsOnEnter = SuggestContext.AcceptSuggestionsOnEnter.bindTo(_contextKeyService); @@ -183,14 +193,15 @@ export class SuggestController implements IEditorContribution { } } - private _onDidSelectItem(item: ICompletionItem): void { + protected _onDidSelectItem(item: ICompletionItem): void { if (!item) { this._model.cancel(); return; } const { suggestion, position } = item; - const columnDelta = this._editor.getPosition().column - position.column; + const editorColumn = this._editor.getPosition().column; + const columnDelta = editorColumn - position.column; if (Array.isArray(suggestion.additionalTextEdits)) { this._editor.pushUndoStop(); @@ -198,6 +209,9 @@ export class SuggestController implements IEditorContribution { this._editor.pushUndoStop(); } + // remember this word for future invocations + this._memory.remember(this._editor.getModel().getLanguageIdentifier(), item); + let { insertText } = suggestion; if (suggestion.snippetType !== 'textmate') { insertText = SnippetParser.escape(insertText); @@ -224,15 +238,6 @@ export class SuggestController implements IEditorContribution { } this._alertCompletionItem(item); - /* __GDPR__ - "suggestSnippetInsert" : { - "suggestionType" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "${include}": [ - "${EditorTelemetryData}" - ] - } - */ - this._telemetryService.publicLog('suggestSnippetInsert', { ...this._editor.getTelemetryData(), suggestionType: suggestion.type }); } private _alertCompletionItem({ suggestion }: ICompletionItem): void { diff --git a/src/vs/editor/contrib/suggest/suggestMemory.ts b/src/vs/editor/contrib/suggest/suggestMemory.ts new file mode 100644 index 00000000000..1d4c32c0281 --- /dev/null +++ b/src/vs/editor/contrib/suggest/suggestMemory.ts @@ -0,0 +1,107 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { ICompletionItem } from 'vs/editor/contrib/suggest/completionModel'; +import { LRUCache } from 'vs/base/common/map'; +import { LanguageIdentifier } from 'vs/editor/common/modes'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; + +export class SuggestMemories { + + private readonly _storagePrefix = 'suggest/memories'; + private readonly _data = new Map(); + + constructor( + @IStorageService private _storageService: IStorageService + ) { + // + } + + remember({ language }: LanguageIdentifier, item: ICompletionItem): void { + let memory = this._data.get(language); + if (!memory) { + memory = new SuggestMemory(); + this._data.set(language, memory); + } + memory.remember(item); + this._storageService.store(`${this._storagePrefix}/${language}`, JSON.stringify(memory), StorageScope.WORKSPACE); + } + + select({ language }: LanguageIdentifier, items: ICompletionItem[], last: ICompletionItem): number { + let memory = this._data.get(language); + if (!memory) { + const key: string = `${this._storagePrefix}/${language}`; + const raw = this._storageService.get(key, StorageScope.WORKSPACE); + if (raw) { + try { + const tuples = <[string, MemoryItem][]>JSON.parse(raw); + memory = new SuggestMemory(tuples); + last = undefined; + this._data.set(language, memory); + } catch (e) { + this._storageService.remove(key, StorageScope.WORKSPACE); + } + } + } + if (memory) { + return memory.select(items, last); + } else { + return -1; + } + } +} + + +export interface MemoryItem { + type: string; + insertText: string; +} + +export class SuggestMemory { + + private readonly _memory = new LRUCache(400, 0.75); + + constructor(tuples?: [string, MemoryItem][]) { + if (tuples) { + for (const [word, item] of tuples) { + this._memory.set(word, item); + } + } + } + + remember(item: ICompletionItem): void { + if (item.word) { + this._memory.set(item.word, { insertText: item.suggestion.insertText, type: item.suggestion.type }); + } + } + + select(items: ICompletionItem[], last: ICompletionItem): number { + for (let i = 0; i < items.length; i++) { + if (items[i] === last) { + // prefer the last selected item when + // there is one + return i; + } + if (items[i].word) { + const item = this._memory.get(items[i].word); + if (this._matches(item, items[i])) { + return i; + } + } + } + return -1; + } + + private _matches(item: MemoryItem, candidate: ICompletionItem): boolean { + return item && item.insertText === candidate.suggestion.insertText && item.type === candidate.suggestion.type; + } + + toJSON(): [string, MemoryItem][] { + const tuples: [string, MemoryItem][] = []; + this._memory.forEach((value, key) => tuples.push([key, value])); + return tuples; + } +} diff --git a/src/vs/editor/contrib/suggest/suggestModel.ts b/src/vs/editor/contrib/suggest/suggestModel.ts index c1643a4bfe2..6e3f371d09f 100644 --- a/src/vs/editor/contrib/suggest/suggestModel.ts +++ b/src/vs/editor/contrib/suggest/suggestModel.ts @@ -259,17 +259,14 @@ export class SuggestModel implements IDisposable { this._currentPosition = this._editor.getPosition(); if (!e.selection.isEmpty() - || e.source !== 'keyboard' || e.reason !== CursorChangeReason.NotSet + || (e.source !== 'keyboard' && e.source !== 'deleteLeft') ) { - - if (this._state === State.Idle) { - // Early exit if nothing needs to be done! - // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;) - return; + // Early exit if nothing needs to be done! + // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;) + if (this._state !== State.Idle) { + this.cancel(); } - - this.cancel(); return; } @@ -292,9 +289,9 @@ export class SuggestModel implements IDisposable { this.cancel(); - if (LineContext.shouldAutoTrigger(this._editor)) { - this._triggerAutoSuggestPromise = TPromise.timeout(this._quickSuggestDelay); - this._triggerAutoSuggestPromise.then(() => { + this._triggerAutoSuggestPromise = TPromise.timeout(this._quickSuggestDelay); + this._triggerAutoSuggestPromise.then(() => { + if (LineContext.shouldAutoTrigger(this._editor)) { const model = this._editor.getModel(); const pos = this._editor.getPosition(); @@ -322,10 +319,10 @@ export class SuggestModel implements IDisposable { } } - this._triggerAutoSuggestPromise = null; this.trigger({ auto: true }); - }); - } + } + this._triggerAutoSuggestPromise = null; + }); } } } diff --git a/src/vs/editor/contrib/suggest/suggestWidget.ts b/src/vs/editor/contrib/suggest/suggestWidget.ts index 4859f189045..1742ab97781 100644 --- a/src/vs/editor/contrib/suggest/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/suggestWidget.ts @@ -34,7 +34,7 @@ import { MarkdownRenderer } from 'vs/editor/contrib/markdown/markdownRenderer'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IOpenerService } from 'vs/platform/opener/common/opener'; -const sticky = true; // for development purposes +const sticky = false; // for development purposes const expandSuggestionDocsByDefault = false; const maxSuggestionsToShow = 12; @@ -153,6 +153,7 @@ class Renderer implements IRenderer { } data.highlightedLabel.set(suggestion.label, createMatches(element.matches)); + // data.highlightedLabel.set(`${suggestion.label} <${element.score}=score(${element.word}, ${suggestion.filterText || suggestion.label})>`, createMatches(element.matches)); data.typeLabel.textContent = (suggestion.detail || '').replace(/\n.*$/m, ''); if (canExpandCompletionItem(element)) { @@ -693,7 +694,7 @@ export class SuggestWidget implements IContentWidget, IDelegate } } - showSuggestions(completionModel: CompletionModel, isFrozen: boolean, isAuto: boolean): void { + showSuggestions(completionModel: CompletionModel, selectionIndex: number, isFrozen: boolean, isAuto: boolean): void { if (this.loadingTimeout) { clearTimeout(this.loadingTimeout); this.loadingTimeout = null; @@ -737,8 +738,8 @@ export class SuggestWidget implements IContentWidget, IDelegate this.focusedItem = null; this.focusedItemIndex = null; this.list.splice(0, this.list.length, this.completionModel.items); - this.list.setFocus([0]); - this.list.reveal(0, 0); + this.list.setFocus([selectionIndex]); + this.list.reveal(selectionIndex, selectionIndex); if (isFrozen) { this.setState(State.Frozen); diff --git a/src/vs/editor/contrib/suggest/test/completionModel.test.ts b/src/vs/editor/contrib/suggest/test/completionModel.test.ts index ac54e0244bc..7d78bfe1451 100644 --- a/src/vs/editor/contrib/suggest/test/completionModel.test.ts +++ b/src/vs/editor/contrib/suggest/test/completionModel.test.ts @@ -225,7 +225,74 @@ suite('CompletionModel', function () { const [first, second] = model.items; assert.equal(first.suggestion.label, 'source'); assert.equal(second.suggestion.label, '<- groups'); - }); + test('Score only filtered items when typing more, score all when typing less', function () { + model = new CompletionModel([ + createSuggestItem('console', 0, 'property'), + createSuggestItem('co_new', 0, 'property'), + createSuggestItem('bar', 0, 'property'), + createSuggestItem('car', 0, 'property'), + createSuggestItem('foo', 0, 'property'), + ], 1, { + leadingLineContent: '', + characterCountDelta: 0 + }, 'inline'); + + assert.equal(model.items.length, 5); + + // narrow down once + model.lineContext = { leadingLineContent: 'c', characterCountDelta: 1 }; + assert.equal(model.items.length, 3); + + // query gets longer, narrow down the narrow-down'ed-set from before + model.lineContext = { leadingLineContent: 'cn', characterCountDelta: 2 }; + assert.equal(model.items.length, 2); + + // query gets shorter, refilter everything + model.lineContext = { leadingLineContent: '', characterCountDelta: 0 }; + assert.equal(model.items.length, 5); + }); + + test('Have more relaxed suggest matching algorithm #15419', function () { + model = new CompletionModel([ + createSuggestItem('result', 0, 'property'), + createSuggestItem('replyToUser', 0, 'property'), + createSuggestItem('randomLolut', 0, 'property'), + createSuggestItem('car', 0, 'property'), + createSuggestItem('foo', 0, 'property'), + ], 1, { + leadingLineContent: '', + characterCountDelta: 0 + }, 'inline'); + + // query gets longer, narrow down the narrow-down'ed-set from before + model.lineContext = { leadingLineContent: 'rlut', characterCountDelta: 4 }; + assert.equal(model.items.length, 3); + + const [first, second, third] = model.items; + assert.equal(first.suggestion.label, 'result'); // best with `rult` + assert.equal(second.suggestion.label, 'replyToUser'); // best with `rltu` + assert.equal(third.suggestion.label, 'randomLolut'); // best with `rlut` + }); + + test('Emmet suggestion not appearing at the top of the list in jsx files, #39518', function () { + model = new CompletionModel([ + createSuggestItem('from', 0, 'property'), + createSuggestItem('form', 0, 'property'), + createSuggestItem('form:get', 0, 'property'), + createSuggestItem('testForeignMeasure', 0, 'property'), + createSuggestItem('fooRoom', 0, 'property'), + ], 1, { + leadingLineContent: '', + characterCountDelta: 0 + }, 'inline'); + + model.lineContext = { leadingLineContent: 'form', characterCountDelta: 4 }; + assert.equal(model.items.length, 5); + const [first, second, third] = model.items; + assert.equal(first.suggestion.label, 'form'); // best with `form` + assert.equal(second.suggestion.label, 'form:get'); // best with `form` + assert.equal(third.suggestion.label, 'from'); // best with `from` + }); }); diff --git a/src/vs/editor/contrib/suggest/test/suggestModel.test.ts b/src/vs/editor/contrib/suggest/test/suggestModel.test.ts index cb8c0886462..d0c081f90a5 100644 --- a/src/vs/editor/contrib/suggest/test/suggestModel.test.ts +++ b/src/vs/editor/contrib/suggest/test/suggestModel.test.ts @@ -22,14 +22,18 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Range } from 'vs/editor/common/core/range'; -import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import { CoreEditingCommands } from 'vs/editor/browser/controller/coreCommands'; +import { SuggestController } from 'vs/editor/contrib/suggest/suggestController'; +import { IStorageService, NullStorageService } from 'vs/platform/storage/common/storage'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/snippetController2'; function createMockEditor(model: Model): TestCodeEditor { const contextKeyService = new MockContextKeyService(); const telemetryService = NullTelemetryService; const instantiationService = new InstantiationService(new ServiceCollection( [IContextKeyService, contextKeyService], - [ITelemetryService, telemetryService] + [ITelemetryService, telemetryService], + [IStorageService, NullStorageService] )); const editor = new TestCodeEditor(new MockScopeLocation(), {}, instantiationService, contextKeyService); @@ -101,7 +105,7 @@ suite('SuggestModel - TriggerAndCancelOracle', function () { disposables.push(model); }); - function withOracle(callback: (model: SuggestModel, editor: ICodeEditor) => any): TPromise { + function withOracle(callback: (model: SuggestModel, editor: TestCodeEditor) => any): TPromise { return new TPromise((resolve, reject) => { const editor = createMockEditor(model); @@ -534,4 +538,82 @@ suite('SuggestModel - TriggerAndCancelOracle', function () { }); }); }); + + test('Backspace should not always cancel code completion, #36491', function () { + disposables.push(SuggestRegistry.register({ scheme: 'test' }, alwaysSomethingSupport)); + + return withOracle(async (model, editor) => { + await assertEvent(model.onDidSuggest, () => { + editor.setPosition({ lineNumber: 1, column: 4 }); + editor.trigger('keyboard', Handler.Type, { text: 'd' }); + + }, event => { + assert.equal(event.auto, true); + assert.equal(event.completionModel.items.length, 1); + const [first] = event.completionModel.items; + + assert.equal(first.support, alwaysSomethingSupport); + }); + + await assertEvent(model.onDidSuggest, () => { + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); + + }, event => { + assert.equal(event.auto, true); + assert.equal(event.completionModel.items.length, 1); + const [first] = event.completionModel.items; + + assert.equal(first.support, alwaysSomethingSupport); + }); + }); + }); + + test('Text changes for completion CodeAction are affected by the completion #39893', function () { + disposables.push(SuggestRegistry.register({ scheme: 'test' }, { + provideCompletionItems(doc, pos): ISuggestResult { + return { + incomplete: true, + suggestions: [{ + label: 'bar', + type: 'property', + insertText: 'bar', + overwriteBefore: 2, + additionalTextEdits: [{ + text: ', bar', + range: { startLineNumber: 1, endLineNumber: 1, startColumn: 17, endColumn: 17 } + }] + }] + }; + } + })); + + model.setValue('ba; import { foo } from "./b"'); + + return withOracle(async (sugget, editor) => { + class TestCtrl extends SuggestController { + _onDidSelectItem(item) { + super._onDidSelectItem(item); + } + } + const ctrl = editor.registerAndInstantiateContribution(TestCtrl); + editor.registerAndInstantiateContribution(SnippetController2); + + await assertEvent(sugget.onDidSuggest, () => { + editor.setPosition({ lineNumber: 1, column: 3 }); + sugget.trigger({ auto: false }); + }, event => { + + assert.equal(event.completionModel.items.length, 1); + const [first] = event.completionModel.items; + assert.equal(first.suggestion.label, 'bar'); + + ctrl._onDidSelectItem(first); + }); + + assert.equal( + model.getValue(), + 'bar; import { foo, bar } from "./b"' + ); + }); + }); }); diff --git a/src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts index e833c79b7df..9f31985a37e 100644 --- a/src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts @@ -159,7 +159,7 @@ class WordHighlighter { try { this._ignorePositionChangeEvent = true; this.editor.setPosition(dest.getStartPosition()); - this.editor.revealRangeInCenter(dest); + this.editor.revealRangeInCenterIfOutsideViewport(dest); } finally { this._ignorePositionChangeEvent = false; } @@ -173,7 +173,7 @@ class WordHighlighter { try { this._ignorePositionChangeEvent = true; this.editor.setPosition(dest.getStartPosition()); - this.editor.revealRangeInCenter(dest); + this.editor.revealRangeInCenterIfOutsideViewport(dest); } finally { this._ignorePositionChangeEvent = false; } @@ -330,7 +330,7 @@ class WordHighlighter { this.renderDecorationsTimer = -1; this.renderDecorations(); } else { - // Asyncrhonous + // Asynchronous this.renderDecorationsTimer = setTimeout(() => { this.renderDecorations(); }, (minimumRenderTime - currentTime)); diff --git a/src/vs/editor/contrib/zoneWidget/zoneWidget.ts b/src/vs/editor/contrib/zoneWidget/zoneWidget.ts index dca1d69a836..a2a990f46e8 100644 --- a/src/vs/editor/contrib/zoneWidget/zoneWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/zoneWidget.ts @@ -28,6 +28,7 @@ export interface IOptions { isResizeable?: boolean; frameColor?: Color; arrowColor?: Color; + keepEditorSelection?: boolean; } export interface IStyles { @@ -42,7 +43,8 @@ const defaultOptions: IOptions = { showFrame: true, className: '', frameColor: defaultColor, - arrowColor: defaultColor + arrowColor: defaultColor, + keepEditorSelection: false }; const WIDGET_ID = 'vs.editor.contrib.zoneWidget'; @@ -391,7 +393,9 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider { this._doLayout(containerHeight, width); - this.editor.setSelection(where); + if (!this.options.keepEditorSelection) { + this.editor.setSelection(where); + } // Reveal the line above or below the zone widget, to get the zone widget in the viewport const revealLineNumber = Math.min(this.editor.getModel().getLineCount(), Math.max(1, where.endLineNumber + 1)); diff --git a/src/vs/editor/standalone/browser/quickOpen/quickOpenEditorWidget.ts b/src/vs/editor/standalone/browser/quickOpen/quickOpenEditorWidget.ts index ea3d4dcc5c2..07cd17c01af 100644 --- a/src/vs/editor/standalone/browser/quickOpen/quickOpenEditorWidget.ts +++ b/src/vs/editor/standalone/browser/quickOpen/quickOpenEditorWidget.ts @@ -48,8 +48,7 @@ export class QuickOpenEditorWidget implements IOverlayWidget { inputPlaceHolder: null, inputAriaLabel: configuration.inputAriaLabel, keyboardSupport: true - }, - null + } ); this.styler = attachQuickOpenStyler(this.quickOpenWidget, this.themeService); diff --git a/src/vs/editor/standalone/browser/simpleServices.ts b/src/vs/editor/standalone/browser/simpleServices.ts index c316839a206..44dd3f9f46f 100644 --- a/src/vs/editor/standalone/browser/simpleServices.ts +++ b/src/vs/editor/standalone/browser/simpleServices.ts @@ -260,7 +260,7 @@ export class SimpleMessageService implements IMessageService { // No-op } - public confirmSync(confirmation: IConfirmation): boolean { + public confirm(confirmation: IConfirmation): boolean { let messageText = confirmation.message; if (confirmation.detail) { messageText = messageText + '\n\n' + confirmation.detail; @@ -269,8 +269,8 @@ export class SimpleMessageService implements IMessageService { return window.confirm(messageText); } - public confirm(confirmation: IConfirmation): TPromise { - return TPromise.as({ confirmed: this.confirmSync(confirmation) } as IConfirmationResult); + public confirmWithCheckbox(confirmation: IConfirmation): TPromise { + return TPromise.as({ confirmed: this.confirm(confirmation), checkboxChecked: false /* unsupported */ } as IConfirmationResult); } } diff --git a/src/vs/editor/test/common/viewLayout/viewLineRenderer.test.ts b/src/vs/editor/test/common/viewLayout/viewLineRenderer.test.ts index a186bfba28b..bd45bf98e97 100644 --- a/src/vs/editor/test/common/viewLayout/viewLineRenderer.test.ts +++ b/src/vs/editor/test/common/viewLayout/viewLineRenderer.test.ts @@ -1167,6 +1167,36 @@ suite('viewLineRenderer.renderLine 2', () => { assert.deepEqual(actual.html, expected); }); + test('issue #38935: GitLens end-of-line blame no longer rendering', () => { + + let actual = renderViewLine(new RenderLineInput( + true, + '\t}', + false, + 0, + [createPart(2, 3)], + [ + new LineDecoration(3, 3, 'ced-TextEditorDecorationType2-5e9b9b3f-3 ced-TextEditorDecorationType2-3', InlineDecorationType.Before), + new LineDecoration(3, 3, 'ced-TextEditorDecorationType2-5e9b9b3f-4 ced-TextEditorDecorationType2-4', InlineDecorationType.After), + ], + 4, + 10, + 10000, + 'none', + false, + false + )); + + let expected = [ + '', + '\u00a0\u00a0\u00a0\u00a0}', + '', + '' + ].join(''); + + assert.deepEqual(actual.html, expected); + }); + function createTestGetColumnOfLinePartOffset(lineContent: string, tabSize: number, parts: ViewLineToken[], expectedPartLengths: number[]): (partIndex: number, partLength: number, offset: number, expected: number) => void { let renderLineOutput = renderViewLine(new RenderLineInput( false, diff --git a/src/vs/platform/actions/test/common/menuService.test.ts b/src/vs/platform/actions/test/common/menuService.test.ts index 322e87f44a2..40ecb80f1ff 100644 --- a/src/vs/platform/actions/test/common/menuService.test.ts +++ b/src/vs/platform/actions/test/common/menuService.test.ts @@ -12,12 +12,13 @@ import { NullCommandService } from 'vs/platform/commands/common/commands'; import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService'; import { IExtensionPoint } from 'vs/platform/extensions/common/extensionsRegistry'; import { TPromise } from 'vs/base/common/winjs.base'; -import { ExtensionPointContribution, IExtensionDescription, IExtensionsStatus, IExtensionService, ActivationTimes } from 'vs/platform/extensions/common/extensions'; +import { ExtensionPointContribution, IExtensionDescription, IExtensionsStatus, IExtensionService, ProfileSession } from 'vs/platform/extensions/common/extensions'; import Event, { Emitter } from 'vs/base/common/event'; // --- service instances class MockExtensionService implements IExtensionService { + public _serviceBrand: any; private _onDidRegisterExtensions = new Emitter(); @@ -25,6 +26,8 @@ class MockExtensionService implements IExtensionService { return this._onDidRegisterExtensions.event; } + onDidChangeExtensionsStatus = null; + public activateByEvent(activationEvent: string): TPromise { throw new Error('Not implemented'); } @@ -45,7 +48,7 @@ class MockExtensionService implements IExtensionService { throw new Error('Not implemented'); } - public getExtensionsActivationTimes(): { [id: string]: ActivationTimes; } { + public startExtensionHostProfile(): TPromise { throw new Error('Not implemented'); } @@ -60,6 +63,10 @@ class MockExtensionService implements IExtensionService { public stopExtensionHost(): void { throw new Error('Method not implemented.'); } + + public getExtensionHostInformation(): any { + throw new Error('Method not implemented.'); + } } const extensionService = new MockExtensionService(); diff --git a/src/vs/platform/backup/electron-main/backupMainService.ts b/src/vs/platform/backup/electron-main/backupMainService.ts index b36a581d93c..9201f86adb9 100644 --- a/src/vs/platform/backup/electron-main/backupMainService.ts +++ b/src/vs/platform/backup/electron-main/backupMainService.ts @@ -309,7 +309,7 @@ export class BackupMainService implements IBackupMainService { fs.mkdirSync(this.backupHome); } - fs.writeFileSync(this.workspacesJsonPath, JSON.stringify(this.backups)); + extfs.writeFileAndFlushSync(this.workspacesJsonPath, JSON.stringify(this.backups)); } catch (ex) { this.logService.error(`Backup: Could not save workspaces.json: ${ex.toString()}`); } diff --git a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts index ae7618cefd3..0fae04bac59 100644 --- a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts +++ b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts @@ -19,7 +19,7 @@ import { BackupMainService } from 'vs/platform/backup/electron-main/backupMainSe import { IBackupWorkspacesFormat } from 'vs/platform/backup/common/backup'; import { HotExitConfiguration } from 'vs/platform/files/common/files'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; -import { LogMainService } from 'vs/platform/log/common/log'; +import { ConsoleLogMainService } from 'vs/platform/log/common/log'; import { IWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; import { createHash } from 'crypto'; import { getRandomTestPath } from 'vs/workbench/test/workbenchTestServices'; @@ -34,7 +34,7 @@ suite('BackupMainService', () => { class TestBackupMainService extends BackupMainService { constructor(backupHome: string, backupWorkspacesPath: string, configService: TestConfigurationService) { - super(environmentService, configService, new LogMainService(environmentService)); + super(environmentService, configService, new ConsoleLogMainService(environmentService)); this.backupHome = backupHome; this.workspacesJsonPath = backupWorkspacesPath; diff --git a/src/vs/platform/clipboard/common/clipboardService.ts b/src/vs/platform/clipboard/common/clipboardService.ts index efa0e681a6a..ea350cacae3 100644 --- a/src/vs/platform/clipboard/common/clipboardService.ts +++ b/src/vs/platform/clipboard/common/clipboardService.ts @@ -22,4 +22,14 @@ export interface IClipboardService { * Reads the content of the clipboard in plain text */ readText(): string; -} \ No newline at end of file + + /** + * Reads text from the system find pasteboard. + */ + readFindText(): string; + + /** + * Writes text to the system find pasteboard. + */ + writeFindText(text: string): void; +} diff --git a/src/vs/platform/clipboard/electron-browser/clipboardService.ts b/src/vs/platform/clipboard/electron-browser/clipboardService.ts index dfec48de0fa..d779be48e6c 100644 --- a/src/vs/platform/clipboard/electron-browser/clipboardService.ts +++ b/src/vs/platform/clipboard/electron-browser/clipboardService.ts @@ -7,6 +7,7 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { clipboard } from 'electron'; +import * as platform from 'vs/base/common/platform'; export class ClipboardService implements IClipboardService { @@ -19,4 +20,17 @@ export class ClipboardService implements IClipboardService { public readText(): string { return clipboard.readText(); } -} \ No newline at end of file + + public readFindText(): string { + if (platform.isMacintosh) { + return clipboard.readFindText(); + } + return ''; + } + + public writeFindText(text: string): void { + if (platform.isMacintosh) { + clipboard.writeFindText(text); + } + } +} diff --git a/src/vs/platform/commands/common/commandService.ts b/src/vs/platform/commands/common/commandService.ts index 570d8e6df19..6acdb78a4ef 100644 --- a/src/vs/platform/commands/common/commandService.ts +++ b/src/vs/platform/commands/common/commandService.ts @@ -11,6 +11,7 @@ import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import Event, { Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { ILogService } from 'vs/platform/log/common/log'; export class CommandService extends Disposable implements ICommandService { @@ -24,13 +25,16 @@ export class CommandService extends Disposable implements ICommandService { constructor( @IInstantiationService private _instantiationService: IInstantiationService, @IExtensionService private _extensionService: IExtensionService, - @IContextKeyService private _contextKeyService: IContextKeyService + @IContextKeyService private _contextKeyService: IContextKeyService, + @ILogService private _logService: ILogService ) { super(); this._extensionService.whenInstalledExtensionsRegistered().then(value => this._extensionHostIsReady = value); } executeCommand(id: string, ...args: any[]): TPromise { + this._logService.trace('CommandService#executeCommand', id); + // we always send an activation event, but // we don't wait for it when the extension // host didn't yet start and the command is already registered diff --git a/src/vs/platform/commands/test/commandService.test.ts b/src/vs/platform/commands/test/commandService.test.ts index 4d262f8b2d8..78207993cb0 100644 --- a/src/vs/platform/commands/test/commandService.test.ts +++ b/src/vs/platform/commands/test/commandService.test.ts @@ -9,13 +9,14 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { TPromise } from 'vs/base/common/winjs.base'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { CommandService } from 'vs/platform/commands/common/commandService'; -import { IExtensionService, ExtensionPointContribution, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; +import { IExtensionService, ExtensionPointContribution, IExtensionDescription, IExtensionHostInformation, ProfileSession } from 'vs/platform/extensions/common/extensions'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IExtensionPoint } from 'vs/platform/extensions/common/extensionsRegistry'; import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService'; import { SimpleConfigurationService } from 'vs/editor/standalone/browser/simpleServices'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import Event, { Emitter } from 'vs/base/common/event'; +import { NoopLogService } from 'vs/platform/log/common/log'; class SimpleExtensionService implements IExtensionService { _serviceBrand: any; @@ -23,6 +24,7 @@ class SimpleExtensionService implements IExtensionService { get onDidRegisterExtensions(): Event { return this._onDidRegisterExtensions.event; } + onDidChangeExtensionsStatus = null; activateByEvent(activationEvent: string): TPromise { return this.whenInstalledExtensionsRegistered().then(() => { }); } @@ -35,12 +37,15 @@ class SimpleExtensionService implements IExtensionService { getExtensionsStatus() { return undefined; } - getExtensionsActivationTimes() { + getExtensionHostInformation(): IExtensionHostInformation { return undefined; } getExtensions(): TPromise { return TPromise.wrap([]); } + startExtensionHostProfile(): TPromise { + throw new Error('Not implemented'); + } restartExtensionHost(): void { } startExtensionHost(): void { @@ -70,7 +75,7 @@ suite('CommandService', function () { lastEvent = activationEvent; return super.activateByEvent(activationEvent); } - }, new ContextKeyService(new SimpleConfigurationService())); + }, new ContextKeyService(new SimpleConfigurationService()), new NoopLogService()); return service.executeCommand('foo').then(() => { assert.ok(lastEvent, 'onCommand:foo'); @@ -88,7 +93,7 @@ suite('CommandService', function () { activateByEvent(activationEvent: string): TPromise { return TPromise.wrapError(new Error('bad_activate')); } - }, new ContextKeyService(new SimpleConfigurationService())); + }, new ContextKeyService(new SimpleConfigurationService()), new NoopLogService()); return service.executeCommand('foo').then(() => assert.ok(false), err => { assert.equal(err.message, 'bad_activate'); @@ -104,7 +109,7 @@ suite('CommandService', function () { whenInstalledExtensionsRegistered() { return new TPromise(_resolve => { /*ignore*/ }); } - }, new ContextKeyService(new SimpleConfigurationService())); + }, new ContextKeyService(new SimpleConfigurationService()), new NoopLogService()); service.executeCommand('bar'); assert.equal(callCounter, 1); @@ -121,7 +126,7 @@ suite('CommandService', function () { whenInstalledExtensionsRegistered() { return new TPromise(_resolve => { resolveFunc = _resolve; }); } - }, new ContextKeyService(new SimpleConfigurationService())); + }, new ContextKeyService(new SimpleConfigurationService()), new NoopLogService()); let r = service.executeCommand('bar'); assert.equal(callCounter, 0); @@ -140,7 +145,8 @@ suite('CommandService', function () { let commandService = new CommandService( new InstantiationService(), new SimpleExtensionService(), - contextKeyService + contextKeyService, + new NoopLogService() ); let counter = 0; diff --git a/src/vs/platform/configuration/common/configurationRegistry.ts b/src/vs/platform/configuration/common/configurationRegistry.ts index 1b7623c2d5e..033f4501766 100644 --- a/src/vs/platform/configuration/common/configurationRegistry.ts +++ b/src/vs/platform/configuration/common/configurationRegistry.ts @@ -51,6 +51,11 @@ export interface IConfigurationRegistry { */ getConfigurationProperties(): { [qualifiedKey: string]: IConfigurationPropertySchema }; + /** + * Returns all excluded configurations settings of all configuration nodes contributed to this registry. + */ + getExcludedConfigurationProperties(): { [qualifiedKey: string]: IConfigurationPropertySchema }; + /** * Register the identifiers for editor configurations */ @@ -67,6 +72,7 @@ export interface IConfigurationPropertySchema extends IJSONSchema { isExecutable?: boolean; scope?: ConfigurationScope; notMultiRootAdopted?: boolean; + included?: boolean; } export interface IConfigurationNode { @@ -97,6 +103,7 @@ class ConfigurationRegistry implements IConfigurationRegistry { private configurationContributors: IConfigurationNode[]; private configurationProperties: { [qualifiedKey: string]: IJSONSchema }; + private excludedConfigurationProperties: { [qualifiedKey: string]: IJSONSchema }; private editorConfigurationSchema: IJSONSchema; private overrideIdentifiers: string[] = []; private overridePropertyPattern: string; @@ -108,6 +115,7 @@ class ConfigurationRegistry implements IConfigurationRegistry { this.configurationContributors = []; this.editorConfigurationSchema = { properties: {}, patternProperties: {}, additionalProperties: false, errorMessage: 'Unknown editor configuration setting' }; this.configurationProperties = {}; + this.excludedConfigurationProperties = {}; this.computeOverridePropertyPattern(); contributionRegistry.registerSchema(editorConfigurationSchemaId, this.editorConfigurationSchema); @@ -191,8 +199,17 @@ class ConfigurationRegistry implements IConfigurationRegistry { if (property.scope === void 0) { property.scope = scope; } - // add to properties map - this.configurationProperties[key] = properties[key]; + + // Add to properties maps + // Property is included by default if 'included' is unspecified + if (properties[key].hasOwnProperty('included') && !properties[key].included) { + this.excludedConfigurationProperties[key] = properties[key]; + delete properties[key]; + continue; + } else { + this.configurationProperties[key] = properties[key]; + } + propertyKeys.push(key); } } @@ -213,6 +230,10 @@ class ConfigurationRegistry implements IConfigurationRegistry { return this.configurationProperties; } + getExcludedConfigurationProperties(): { [qualifiedKey: string]: IConfigurationPropertySchema } { + return this.excludedConfigurationProperties; + } + private registerJSONConfiguration(configuration: IConfigurationNode) { function register(configuration: IConfigurationNode) { let properties = configuration.properties; diff --git a/src/vs/platform/contextkey/browser/contextKeyService.ts b/src/vs/platform/contextkey/browser/contextKeyService.ts index ea163d70cc6..a0dd9ebd4a1 100644 --- a/src/vs/platform/contextkey/browser/contextKeyService.ts +++ b/src/vs/platform/contextkey/browser/contextKeyService.ts @@ -235,7 +235,11 @@ export abstract class AbstractContextKeyService implements IContextKeyService { } public setContext(key: string, value: any): void { - if (this.getContextValuesContainer(this._myContextId).setValue(key, value)) { + const myContext = this.getContextValuesContainer(this._myContextId); + if (!myContext) { + return; + } + if (myContext.setValue(key, value)) { this._onDidChangeContextKey.fire(key); } } diff --git a/src/vs/platform/editor/common/editor.ts b/src/vs/platform/editor/common/editor.ts index be03bb99677..98d63a1977b 100644 --- a/src/vs/platform/editor/common/editor.ts +++ b/src/vs/platform/editor/common/editor.ts @@ -192,6 +192,19 @@ export enum Verbosity { LONG } +export interface IRevertOptions { + + /** + * Forces to load the contents of the editor again even if the editor is not dirty. + */ + force?: boolean; + + /** + * A soft revert will clear dirty state of an editor but will not attempt to load it. + */ + soft?: boolean; +} + export interface IEditorInput extends IDisposable { /** @@ -232,7 +245,7 @@ export interface IEditorInput extends IDisposable { /** * Reverts this input. */ - revert(): TPromise; + revert(options?: IRevertOptions): TPromise; /** * Returns if the other object matches this input. diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts index 8783ac3a2ce..932af88fa1e 100644 --- a/src/vs/platform/environment/common/environment.ts +++ b/src/vs/platform/environment/common/environment.ts @@ -4,12 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { LogLevel } from 'vs/platform/log/common/log'; export interface ParsedArgs { [arg: string]: any; _: string[]; help?: boolean; version?: boolean; + status?: boolean; wait?: boolean; waitMarkerFilePath?: string; diff?: boolean; @@ -22,7 +24,9 @@ export interface ParsedArgs { 'user-data-dir'?: string; performance?: boolean; 'prof-startup'?: string; + 'prof-startup-prefix'?: string; verbose?: boolean; + log?: string; logExtensionHostCommunication?: boolean; 'disable-extensions'?: boolean; 'extensions-dir'?: string; @@ -40,12 +44,14 @@ export interface ParsedArgs { 'enable-proposed-api'?: string | string[]; 'open-url'?: string | string[]; 'skip-getting-started'?: boolean; + 'skip-release-notes'?: boolean; 'sticky-quickopen'?: boolean; 'disable-telemetry'?: boolean; 'export-default-configuration'?: string; 'install-source'?: string; 'disable-updates'?: string; 'disable-crash-reporter'?: string; + 'skip-add-to-recently-opened'?: boolean; } export const IEnvironmentService = createDecorator('environmentService'); @@ -75,7 +81,7 @@ export interface IEnvironmentService { appSettingsHome: string; appSettingsPath: string; appKeybindingsPath: string; - machineUUID: string; + settingsSearchBuildId: number; settingsSearchUrl: string; @@ -97,19 +103,26 @@ export interface IEnvironmentService { logExtensionHostCommunication: boolean; isBuilt: boolean; - verbose: boolean; wait: boolean; + status: boolean; performance: boolean; - profileStartup: { prefix: string, dir: string } | undefined; + + // logging + logsPath: string; + verbose: boolean; + logLevel: LogLevel; skipGettingStarted: boolean | undefined; + skipReleaseNotes: boolean | undefined; + + skipAddToRecentlyOpened: boolean; mainIPCHandle: string; sharedIPCHandle: string; nodeCachedDataDir: string; - installSource: string; + installSourcePath: string; disableUpdates: boolean; disableCrashReporter: boolean; } diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index d276878d788..5de73213eff 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -48,10 +48,13 @@ const options: minimist.Opts = { 'show-versions', 'nolazy', 'skip-getting-started', + 'skip-release-notes', 'sticky-quickopen', 'disable-telemetry', 'disable-updates', - 'disable-crash-reporter' + 'disable-crash-reporter', + 'skip-add-to-recently-opened', + 'status' ], alias: { add: 'a', @@ -60,6 +63,7 @@ const options: minimist.Opts = { wait: 'w', diff: 'd', goto: 'g', + status: 's', 'new-window': 'n', 'reuse-window': 'r', performance: 'p', @@ -135,6 +139,7 @@ export const optionsHelp: { [name: string]: string; } = { '--inspect-brk-extensions': localize('inspect-brk-extensions', "Allow debugging and profiling of extensions with the extension host being paused after start. Check the developer tools for the connection uri."), '-r, --reuse-window': localize('reuseWindow', "Force opening a file or folder in the last active window."), '--user-data-dir ': localize('userDataDir', "Specifies the directory that user data is kept in, useful when running as root."), + '--log ': localize('log', "Log level to use. Default is 'info'. Allowed values are 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'."), '--verbose': localize('verbose', "Print verbose output (implies --wait)."), '-w, --wait': localize('wait', "Wait for the files to be closed before returning."), '--extensions-dir ': localize('extensionHomePath', "Set the root path for extensions."), @@ -145,6 +150,7 @@ export const optionsHelp: { [name: string]: string; } = { '--enable-proposed-api ': localize('experimentalApis', "Enables proposed api features for an extension."), '--disable-extensions': localize('disableExtensions', "Disable all installed extensions."), '--disable-gpu': localize('disableGPU', "Disable GPU hardware acceleration."), + '-s, --status': localize('status', "Print process usage and diagnostics information."), '-v, --version': localize('version', "Print version."), '-h, --help': localize('help', "Print usage.") }; diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts index d674d6af54f..4e7728abac0 100644 --- a/src/vs/platform/environment/node/environmentService.ts +++ b/src/vs/platform/environment/node/environmentService.ts @@ -8,12 +8,12 @@ import * as crypto from 'crypto'; import * as paths from 'vs/base/node/paths'; import * as os from 'os'; import * as path from 'path'; -import * as fs from 'fs'; import URI from 'vs/base/common/uri'; -import { generateUuid, isUUID } from 'vs/base/common/uuid'; import { memoize } from 'vs/base/common/decorators'; import pkg from 'vs/platform/node/package'; import product from 'vs/platform/node/product'; +import { LogLevel } from 'vs/platform/log/common/log'; +import { toLocalISOString } from 'vs/base/common/date'; // Read this before there's any chance it is overwritten // Related to https://github.com/Microsoft/vscode/issues/30624 @@ -40,10 +40,6 @@ function getIPCHandle(userDataPath: string, type: string): string { } } -export function getInstallSourcePath(userDataPath: string): string { - return path.join(userDataPath, 'installSource'); -} - export class EnvironmentService implements IEnvironmentService { _serviceBrand: any; @@ -55,6 +51,8 @@ export class EnvironmentService implements IEnvironmentService { get execPath(): string { return this._execPath; } + readonly logsPath: string; + @memoize get userHome(): string { return os.homedir(); } @@ -92,6 +90,9 @@ export class EnvironmentService implements IEnvironmentService { @memoize get workspacesHome(): string { return path.join(this.userDataPath, 'Workspaces'); } + @memoize + get installSourcePath(): string { return path.join(this.userDataPath, 'installSource'); } + @memoize get extensionsPath(): string { return parsePathArg(this._args['extensions-dir'], process) || process.env['VSCODE_EXTENSIONS'] || path.join(this.userHome, product.dataFolderName, 'extensions'); } @@ -105,6 +106,10 @@ export class EnvironmentService implements IEnvironmentService { get skipGettingStarted(): boolean { return this._args['skip-getting-started']; } + get skipReleaseNotes(): boolean { return this._args['skip-release-notes']; } + + get skipAddToRecentlyOpened(): boolean { return this._args['skip-add-to-recently-opened']; } + @memoize get debugExtensionHost(): IExtensionHostDebugParams { return parseExtensionHostPort(this._args, this.isBuilt); } @@ -113,22 +118,39 @@ export class EnvironmentService implements IEnvironmentService { get isBuilt(): boolean { return !process.env['VSCODE_DEV']; } get verbose(): boolean { return this._args.verbose; } + + @memoize + get logLevel(): LogLevel { + if (this.verbose) { + return LogLevel.Trace; + } + if (typeof this._args.log === 'string') { + const logLevel = this._args.log.toLowerCase(); + switch (logLevel) { + case 'trace': + return LogLevel.Trace; + case 'debug': + return LogLevel.Debug; + case 'info': + return LogLevel.Info; + case 'warn': + return LogLevel.Warning; + case 'error': + return LogLevel.Error; + case 'critical': + return LogLevel.Critical; + case 'off': + return LogLevel.Off; + } + } + return LogLevel.Info; + } + get wait(): boolean { return this._args.wait; } get logExtensionHostCommunication(): boolean { return this._args.logExtensionHostCommunication; } get performance(): boolean { return this._args.performance; } - - @memoize - get profileStartup(): { prefix: string, dir: string } | undefined { - if (this._args['prof-startup']) { - return { - prefix: process.env.VSCODE_PROFILES_PREFIX, - dir: os.homedir() - }; - } else { - return undefined; - } - } + get status(): boolean { return this._args.status; } @memoize get mainIPCHandle(): string { return getIPCHandle(this.userDataPath, 'main'); } @@ -142,34 +164,13 @@ export class EnvironmentService implements IEnvironmentService { get disableUpdates(): boolean { return !!this._args['disable-updates']; } get disableCrashReporter(): boolean { return !!this._args['disable-crash-reporter']; } - readonly machineUUID: string; - - readonly installSource: string; - constructor(private _args: ParsedArgs, private _execPath: string) { - const machineIdPath = path.join(this.userDataPath, 'machineid'); - - try { - this.machineUUID = fs.readFileSync(machineIdPath, 'utf8'); - - if (!isUUID(this.machineUUID)) { - throw new Error('Not a UUID'); - } - } catch (err) { - this.machineUUID = generateUuid(); - - try { - fs.writeFileSync(machineIdPath, this.machineUUID, 'utf8'); - } catch (err) { - // noop - } + if (!process.env['VSCODE_LOGS']) { + const key = toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, ''); + process.env['VSCODE_LOGS'] = path.join(this.userDataPath, 'logs', key); } - try { - this.installSource = fs.readFileSync(getInstallSourcePath(this.userDataPath), 'utf8').slice(0, 30); - } catch (err) { - this.installSource = ''; - } + this.logsPath = process.env['VSCODE_LOGS']; } } diff --git a/src/vs/platform/environment/test/node/environmentService.test.ts b/src/vs/platform/environment/test/node/environmentService.test.ts index 792a248e70c..928f8b5b236 100644 --- a/src/vs/platform/environment/test/node/environmentService.test.ts +++ b/src/vs/platform/environment/test/node/environmentService.test.ts @@ -41,4 +41,4 @@ suite('EnvironmentService', () => { assert.equal(parse(['--user-data-dir', './dir'], { cwd: () => '/foo', env: { 'VSCODE_CWD': '/bar' } }), path.resolve('/bar/dir'), 'should use VSCODE_CWD as the cwd when --user-data-dir is specified'); }); -}); \ No newline at end of file +}); diff --git a/src/vs/platform/extensionManagement/common/extensionEnablementService.ts b/src/vs/platform/extensionManagement/common/extensionEnablementService.ts index 455a941edc4..1f475504c98 100644 --- a/src/vs/platform/extensionManagement/common/extensionEnablementService.ts +++ b/src/vs/platform/extensionManagement/common/extensionEnablementService.ts @@ -9,7 +9,7 @@ import { distinct, coalesce } from 'vs/base/common/arrays'; import Event, { Emitter } from 'vs/base/common/event'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IExtensionManagementService, DidUninstallExtensionEvent, IExtensionEnablementService, IExtensionIdentifier, EnablementState } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { adoptToGalleryExtensionId, getIdAndVersionFromLocalExtensionId, areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; +import { adoptToGalleryExtensionId, getIdFromLocalExtensionId, areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -59,6 +59,9 @@ export class ExtensionEnablementService implements IExtensionEnablementService { } getEnablementState(identifier: IExtensionIdentifier): EnablementState { + if (this.environmentService.disableExtensions) { + return EnablementState.Disabled; + } if (this.hasWorkspace) { if (this._getEnabledExtensions(StorageScope.WORKSPACE).filter(e => areSameExtensions(e, identifier))[0]) { return EnablementState.WorkspaceEnabled; @@ -258,7 +261,7 @@ export class ExtensionEnablementService implements IExtensionEnablementService { private _onDidUninstallExtension({ identifier, error }: DidUninstallExtensionEvent): void { if (!error) { - const id = getIdAndVersionFromLocalExtensionId(identifier.id).id; + const id = getIdFromLocalExtensionId(identifier.id); if (id) { const extension = { id, uuid: identifier.uuid }; this._removeFromDisabledExtensions(extension, StorageScope.WORKSPACE); diff --git a/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts b/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts index 94872199ae5..3b60c27a367 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts @@ -25,21 +25,41 @@ export function getGalleryExtensionIdFromLocal(local: ILocalExtension): string { return getGalleryExtensionId(local.manifest.publisher, local.manifest.name); } -export function getIdAndVersionFromLocalExtensionId(localExtensionId: string): { id: string, version: string } { - const matches = /^([^.]+\..+)-(\d+\.\d+\.\d+)$/.exec(localExtensionId); - if (matches && matches[1] && matches[2]) { - return { id: adoptToGalleryExtensionId(matches[1]), version: matches[2] }; +export const LOCAL_EXTENSION_ID_REGEX = /^([^.]+\..+)-(\d+\.\d+\.\d+(-.*)?)$/; + +export function getIdFromLocalExtensionId(localExtensionId: string): string { + const matches = LOCAL_EXTENSION_ID_REGEX.exec(localExtensionId); + if (matches && matches[1]) { + return adoptToGalleryExtensionId(matches[1]); } - return { - id: adoptToGalleryExtensionId(localExtensionId), - version: null - }; + return adoptToGalleryExtensionId(localExtensionId); } export function adoptToGalleryExtensionId(id: string): string { return id.replace(EXTENSION_IDENTIFIER_REGEX, (match, publisher: string, name: string) => getGalleryExtensionId(publisher, name)); } +export function groupByExtension(extensions: T[], getExtensionIdentifier: (t: T) => IExtensionIdentifier): T[][] { + const byExtension: T[][] = []; + const findGroup = extension => { + for (const group of byExtension) { + if (group.some(e => areSameExtensions(getExtensionIdentifier(e), getExtensionIdentifier(extension)))) { + return group; + } + } + return null; + }; + for (const extension of extensions) { + const group = findGroup(extension); + if (group) { + group.push(extension); + } else { + byExtension.push([extension]); + } + } + return byExtension; +} + export function getLocalExtensionTelemetryData(extension: ILocalExtension): any { return { id: getGalleryExtensionIdFromLocal(extension), diff --git a/src/vs/platform/extensionManagement/common/extensionNls.ts b/src/vs/platform/extensionManagement/common/extensionNls.ts index 517cf9c1bcb..ae4df2ad989 100644 --- a/src/vs/platform/extensionManagement/common/extensionNls.ts +++ b/src/vs/platform/extensionManagement/common/extensionNls.ts @@ -8,7 +8,7 @@ import { cloneAndChange } from 'vs/base/common/objects'; import { IExtensionManifest } from 'vs/platform/extensionManagement/common/extensionManagement'; -const nlsRegex = /^%([\w\d.]+)%$/i; +const nlsRegex = /^%([\w\d.-]+)%$/i; export interface ITranslations { [key: string]: string; diff --git a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts index 9256639c0e4..e79adfe2cbc 100644 --- a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts @@ -7,7 +7,6 @@ import { localize } from 'vs/nls'; import { tmpdir } from 'os'; import * as path from 'path'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as uuid from 'vs/base/common/uuid'; import { distinct } from 'vs/base/common/arrays'; import { getErrorMessage, isPromiseCanceledError } from 'vs/base/common/errors'; import { StatisticType, IGalleryExtension, IExtensionGalleryService, IGalleryExtensionAsset, IQueryOptions, SortBy, SortOrder, IExtensionManifest, IExtensionIdentifier } from 'vs/platform/extensionManagement/common/extensionManagement'; @@ -21,6 +20,9 @@ import pkg from 'vs/platform/node/package'; import product from 'vs/platform/node/product'; import { isVersionValid } from 'vs/platform/extensions/node/extensionValidator'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { readFile } from 'vs/base/node/pfs'; +import { writeFileAndFlushSync } from 'vs/base/node/extfs'; +import { generateUuid, isUUID } from 'vs/base/common/uuid'; interface IRawGalleryExtensionFile { assetType: string; @@ -313,7 +315,7 @@ export class ExtensionGalleryService implements IExtensionGalleryService { private extensionsGalleryUrl: string; - private readonly commonHTTPHeaders: { [key: string]: string; }; + private readonly commonHeadersPromise: TPromise<{ [key: string]: string; }>; constructor( @IRequestService private requestService: IRequestService, @@ -322,11 +324,7 @@ export class ExtensionGalleryService implements IExtensionGalleryService { ) { const config = product.extensionsGallery; this.extensionsGalleryUrl = config && config.serviceUrl; - this.commonHTTPHeaders = { - 'X-Market-Client-Id': `VSCode ${pkg.version}`, - 'User-Agent': `VSCode ${pkg.version}`, - 'X-Market-User-Id': this.environmentService.machineUUID - }; + this.commonHeadersPromise = resolveMarketplaceHeaders(this.environmentService); } private api(path = ''): string { @@ -412,33 +410,34 @@ export class ExtensionGalleryService implements IExtensionGalleryService { } private queryGallery(query: Query): TPromise<{ galleryExtensions: IRawGalleryExtension[], total: number; }> { - const commonHeaders = this.commonHTTPHeaders; - const data = JSON.stringify(query.raw); - const headers = assign({}, commonHeaders, { - 'Content-Type': 'application/json', - 'Accept': 'application/json;api-version=3.0-preview.1', - 'Accept-Encoding': 'gzip', - 'Content-Length': data.length - }); + return this.commonHeadersPromise.then(commonHeaders => { + const data = JSON.stringify(query.raw); + const headers = assign({}, commonHeaders, { + 'Content-Type': 'application/json', + 'Accept': 'application/json;api-version=3.0-preview.1', + 'Accept-Encoding': 'gzip', + 'Content-Length': data.length + }); - return this.requestService.request({ - type: 'POST', - url: this.api('/extensionquery'), - data, - headers - }).then(context => { + return this.requestService.request({ + type: 'POST', + url: this.api('/extensionquery'), + data, + headers + }).then(context => { - if (context.res.statusCode >= 400 && context.res.statusCode < 500) { - return { galleryExtensions: [], total: 0 }; - } + if (context.res.statusCode >= 400 && context.res.statusCode < 500) { + return { galleryExtensions: [], total: 0 }; + } - return asJson(context).then(result => { - const r = result.results[0]; - const galleryExtensions = r.extensions; - const resultCount = r.resultMetadata && r.resultMetadata.filter(m => m.metadataType === 'ResultCount')[0]; - const total = resultCount && resultCount.metadataItems.filter(i => i.name === 'TotalCount')[0].count || 0; + return asJson(context).then(result => { + const r = result.results[0]; + const galleryExtensions = r.extensions; + const resultCount = r.resultMetadata && r.resultMetadata.filter(m => m.metadataType === 'ResultCount')[0]; + const total = resultCount && resultCount.metadataItems.filter(i => i.name === 'TotalCount')[0].count || 0; - return { galleryExtensions, total }; + return { galleryExtensions, total }; + }); }); }); } @@ -448,35 +447,41 @@ export class ExtensionGalleryService implements IExtensionGalleryService { return TPromise.as(null); } - const headers = { ...this.commonHTTPHeaders, Accept: '*/*;api-version=4.0-preview.1' }; + return this.commonHeadersPromise.then(commonHeaders => { + const headers = { ...commonHeaders, Accept: '*/*;api-version=4.0-preview.1' }; - return this.requestService.request({ - type: 'POST', - url: this.api(`/publishers/${publisher}/extensions/${name}/${version}/stats?statType=${type}`), - headers - }).then(null, () => null); + return this.requestService.request({ + type: 'POST', + url: this.api(`/publishers/${publisher}/extensions/${name}/${version}/stats?statType=${type}`), + headers + }).then(null, () => null); + }); } download(extension: IGalleryExtension): TPromise { - return this.loadCompatibleVersion(extension).then(extension => { - const zipPath = path.join(tmpdir(), uuid.generateUuid()); - const data = getGalleryExtensionTelemetryData(extension); - const startTime = new Date().getTime(); - /* __GDPR__ - "galleryService:downloadVSIX" : { - "duration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "${include}": [ - "${GalleryExtensionTelemetryData}" - ] + return this.loadCompatibleVersion(extension) + .then(extension => { + if (!extension) { + return TPromise.wrapError(new Error(localize('notCompatibleDownload', "Unable to download because the extension compatible with current version '{0}' of VS Code is not found.", pkg.version))); } - */ - const log = (duration: number) => this.telemetryService.publicLog('galleryService:downloadVSIX', assign(data, { duration })); + const zipPath = path.join(tmpdir(), generateUuid()); + const data = getGalleryExtensionTelemetryData(extension); + const startTime = new Date().getTime(); + /* __GDPR__ + "galleryService:downloadVSIX" : { + "duration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "${include}": [ + "${GalleryExtensionTelemetryData}" + ] + } + */ + const log = (duration: number) => this.telemetryService.publicLog('galleryService:downloadVSIX', assign(data, { duration })); - return this.getAsset(extension.assets.download) - .then(context => download(zipPath, context)) - .then(() => log(new Date().getTime() - startTime)) - .then(() => zipPath); - }); + return this.getAsset(extension.assets.download) + .then(context => download(zipPath, context)) + .then(() => log(new Date().getTime() - startTime)) + .then(() => zipPath); + }); } getReadme(extension: IGalleryExtension): TPromise { @@ -512,22 +517,26 @@ export class ExtensionGalleryService implements IExtensionGalleryService { .withAssetTypes(AssetType.Manifest, AssetType.VSIX) .withFilter(FilterType.ExtensionId, extension.identifier.uuid); - return this.queryGallery(query).then(({ galleryExtensions }) => { - const [rawExtension] = galleryExtensions; + return this.queryGallery(query) + .then(({ galleryExtensions }) => { + const [rawExtension] = galleryExtensions; - if (!rawExtension) { - return TPromise.wrapError(new Error(localize('notFound', "Extension not found"))); - } + if (!rawExtension) { + return null; + } - return this.getLastValidExtensionVersion(rawExtension, rawExtension.versions) - .then(rawVersion => { - extension.properties.dependencies = getDependencies(rawVersion); - extension.properties.engine = getEngine(rawVersion); - extension.assets.download = getVersionAsset(rawVersion, AssetType.VSIX); - extension.version = rawVersion.version; - return extension; - }); - }); + return this.getLastValidExtensionVersion(rawExtension, rawExtension.versions) + .then(rawVersion => { + if (rawVersion) { + extension.properties.dependencies = getDependencies(rawVersion); + extension.properties.engine = getEngine(rawVersion); + extension.assets.download = getVersionAsset(rawVersion, AssetType.VSIX); + extension.version = rawVersion.version; + return extension; + } + return null; + }); + }); } private loadDependencies(extensionNames: string[]): TPromise { @@ -583,47 +592,25 @@ export class ExtensionGalleryService implements IExtensionGalleryService { } private getAsset(asset: IGalleryExtensionAsset, options: IRequestOptions = {}): TPromise { - const baseOptions = { type: 'GET' }; - const headers = assign({}, this.commonHTTPHeaders, options.headers || {}); - options = assign({}, options, baseOptions, { headers }); + return this.commonHeadersPromise.then(commonHeaders => { + const baseOptions = { type: 'GET' }; + const headers = assign({}, commonHeaders, options.headers || {}); + options = assign({}, options, baseOptions, { headers }); - const url = asset.uri; - const fallbackUrl = asset.fallbackUri; - const firstOptions = assign({}, options, { url }); + const url = asset.uri; + const fallbackUrl = asset.fallbackUri; + const firstOptions = assign({}, options, { url }); - return this.requestService.request(firstOptions) - .then(context => { - if (context.res.statusCode === 200) { - return TPromise.as(context); - } - - return asText(context) - .then(message => TPromise.wrapError(new Error(`Expected 200, got back ${context.res.statusCode} instead.\n\n${message}`))); - }) - .then(null, err => { - if (isPromiseCanceledError(err)) { - return TPromise.wrapError(err); - } - - const message = getErrorMessage(err); - /* __GDPR__ - "galleryService:requestError" : { - "url" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "cdn": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "message": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + return this.requestService.request(firstOptions) + .then(context => { + if (context.res.statusCode === 200) { + return TPromise.as(context); } - */ - this.telemetryService.publicLog('galleryService:requestError', { url, cdn: true, message }); - /* __GDPR__ - "galleryService:cdnFallback" : { - "url" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "message": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('galleryService:cdnFallback', { url, message }); - const fallbackOptions = assign({}, options, { url: fallbackUrl }); - return this.requestService.request(fallbackOptions).then(null, err => { + return asText(context) + .then(message => TPromise.wrapError(new Error(`Expected 200, got back ${context.res.statusCode} instead.\n\n${message}`))); + }) + .then(null, err => { if (isPromiseCanceledError(err)) { return TPromise.wrapError(err); } @@ -636,10 +623,34 @@ export class ExtensionGalleryService implements IExtensionGalleryService { "message": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } } */ - this.telemetryService.publicLog('galleryService:requestError', { url: fallbackUrl, cdn: false, message }); - return TPromise.wrapError(err); + this.telemetryService.publicLog('galleryService:requestError', { url, cdn: true, message }); + /* __GDPR__ + "galleryService:cdnFallback" : { + "url" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "message": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ + this.telemetryService.publicLog('galleryService:cdnFallback', { url, message }); + + const fallbackOptions = assign({}, options, { url: fallbackUrl }); + return this.requestService.request(fallbackOptions).then(null, err => { + if (isPromiseCanceledError(err)) { + return TPromise.wrapError(err); + } + + const message = getErrorMessage(err); + /* __GDPR__ + "galleryService:requestError" : { + "url" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "cdn": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "message": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ + this.telemetryService.publicLog('galleryService:requestError', { url: fallbackUrl, cdn: false, message }); + return TPromise.wrapError(err); + }); }); - }); + }); } private getLastValidExtensionVersion(extension: IRawGalleryExtension, versions: IRawGalleryExtensionVersion[]): TPromise { @@ -665,7 +676,7 @@ export class ExtensionGalleryService implements IExtensionGalleryService { private getLastValidExtensionVersionReccursively(extension: IRawGalleryExtension, versions: IRawGalleryExtensionVersion[]): TPromise { if (!versions.length) { - return TPromise.wrapError(new Error(localize('noCompatible', "Couldn't find a compatible version of {0} with this version of Code.", extension.displayName || extension.extensionName))); + return null; } const version = versions[0]; @@ -701,3 +712,33 @@ export class ExtensionGalleryService implements IExtensionGalleryService { return false; } } + +export function resolveMarketplaceHeaders(environmentService: IEnvironmentService): TPromise<{ [key: string]: string; }> { + const marketplaceMachineIdFile = path.join(environmentService.userDataPath, 'machineid'); + + return readFile(marketplaceMachineIdFile, 'utf8').then(contents => { + if (isUUID(contents)) { + return contents; + } + + return TPromise.wrap(null); // invalid marketplace UUID + }, error => { + return TPromise.wrap(null); // error reading ID file + }).then(uuid => { + if (!uuid) { + uuid = generateUuid(); + + try { + writeFileAndFlushSync(marketplaceMachineIdFile, uuid); + } catch (error) { + //noop + } + } + + return { + 'X-Market-Client-Id': `VSCode ${pkg.version}`, + 'User-Agent': `VSCode ${pkg.version}`, + 'X-Market-User-Id': uuid + }; + }); +} \ No newline at end of file diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index d02a3484cfb..0a8bac15123 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -21,20 +21,37 @@ import { StatisticType, IExtensionIdentifier } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { getGalleryExtensionIdFromLocal, getIdAndVersionFromLocalExtensionId, adoptToGalleryExtensionId, areSameExtensions, getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; +import { getGalleryExtensionIdFromLocal, adoptToGalleryExtensionId, areSameExtensions, getGalleryExtensionId, groupByExtension } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { localizeManifest } from '../common/extensionNls'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { Limiter } from 'vs/base/common/async'; import Event, { Emitter } from 'vs/base/common/event'; import * as semver from 'semver'; -import { groupBy, values } from 'vs/base/common/collections'; import URI from 'vs/base/common/uri'; import { IChoiceService, Severity } from 'vs/platform/message/common/message'; +import pkg from 'vs/platform/node/package'; +import { isMacintosh } from 'vs/base/common/platform'; +import { MANIFEST_CACHE_FOLDER, USER_MANIFEST_CACHE_FILE } from 'vs/platform/extensions/common/extensions'; +import { ILogService } from 'vs/platform/log/common/log'; const SystemExtensionsRoot = path.normalize(path.join(URI.parse(require.toUrl('')).fsPath, '..', 'extensions')); -const INSTALL_ERROR_OBSOLETE = 'obsolete'; +const ERROR_SCANNING_SYS_EXTENSIONS = 'scanningSystem'; +const ERROR_SCANNING_USER_EXTENSIONS = 'scanningUser'; +const INSTALL_ERROR_UNSET_UNINSTALLED = 'unsetUninstalled'; +const INSTALL_ERROR_INCOMPATIBLE = 'incompatible'; +const INSTALL_ERROR_DOWNLOADING = 'downloading'; +const INSTALL_ERROR_VALIDATING = 'validating'; const INSTALL_ERROR_GALLERY = 'gallery'; const INSTALL_ERROR_LOCAL = 'local'; +const INSTALL_ERROR_EXTRACTING = 'extracting'; +const INSTALL_ERROR_DELETING = 'deleting'; +const INSTALL_ERROR_UNKNOWN = 'unknown'; + +export class ExtensionManagementError extends Error { + constructor(message: string, readonly code: string) { + super(message); + } +} function parseManifest(raw: string): TPromise<{ manifest: IExtensionManifest; metadata: IGalleryMetadata; }> { return new TPromise((c, e) => { @@ -76,7 +93,6 @@ interface InstallableExtension { zipPath: string; id: string; metadata?: IGalleryMetadata; - current?: ILocalExtension; } export class ExtensionManagementService implements IExtensionManagementService { @@ -84,8 +100,9 @@ export class ExtensionManagementService implements IExtensionManagementService { _serviceBrand: any; private extensionsPath: string; - private obsoletePath: string; - private obsoleteFileLimiter: Limiter; + private uninstalledPath: string; + private userDataPath: string; + private uninstalledFileLimiter: Limiter; private disposables: IDisposable[] = []; private _onInstallExtension = new Emitter(); @@ -103,32 +120,83 @@ export class ExtensionManagementService implements IExtensionManagementService { constructor( @IEnvironmentService environmentService: IEnvironmentService, @IChoiceService private choiceService: IChoiceService, - @IExtensionGalleryService private galleryService: IExtensionGalleryService + @IExtensionGalleryService private galleryService: IExtensionGalleryService, + @ILogService private logService: ILogService, ) { this.extensionsPath = environmentService.extensionsPath; - this.obsoletePath = path.join(this.extensionsPath, '.obsolete'); - this.obsoleteFileLimiter = new Limiter(1); + this.uninstalledPath = path.join(this.extensionsPath, '.obsolete'); + this.userDataPath = environmentService.userDataPath; + this.uninstalledFileLimiter = new Limiter(1); + } + + private deleteExtensionsManifestCache(): void { + const cacheFolder = path.join(this.userDataPath, MANIFEST_CACHE_FOLDER); + const cacheFile = path.join(cacheFolder, USER_MANIFEST_CACHE_FILE); + + pfs.del(cacheFile).done(() => { }, () => { }); } install(zipPath: string): TPromise { + this.deleteExtensionsManifestCache(); + zipPath = path.resolve(zipPath); return validateLocalExtension(zipPath) - .then(manifest => { + .then(manifest => { const identifier = { id: getLocalExtensionIdFromManifest(manifest) }; + return this.unsetUninstalledAndRemove(identifier.id) + .then( + () => this.checkOutdated(manifest) + .then(validated => { + if (validated) { + this.logService.info('Installing the extension:', identifier.id); + this._onInstallExtension.fire({ identifier, zipPath }); + return this.getMetadata(getGalleryExtensionId(manifest.publisher, manifest.name)) + .then( + metadata => this.installFromZipPath(identifier, zipPath, metadata, manifest), + error => this.installFromZipPath(identifier, zipPath, null, manifest)) + .then(() => this.logService.info('Successfully installed the extension:', identifier.id), e => this.logService.error('Failed to install the extension:', identifier.id, e.message)); + } + return null; + }), + e => TPromise.wrapError(new Error(nls.localize('restartCode', "Please restart Code before reinstalling {0}.", manifest.displayName || manifest.name)))); + }); + } - return this.isObsolete(identifier.id).then(isObsolete => { - if (isObsolete) { - return TPromise.wrapError(new Error(nls.localize('restartCodeLocal', "Please restart Code before reinstalling {0}.", manifest.displayName || manifest.name))); - } + private unsetUninstalledAndRemove(id: string): TPromise { + return this.isUninstalled(id) + .then(isUninstalled => { + if (isUninstalled) { + this.logService.trace('Removing the extension:', id); + const extensionPath = path.join(this.extensionsPath, id); + return pfs.rimraf(extensionPath) + .then(() => this.unsetUninstalled(id)) + .then(() => this.logService.info('Reomved the extension:', id)); + } + return null; + }); + } - this._onInstallExtension.fire({ identifier, zipPath }); - - return this.getMetadata(getGalleryExtensionId(manifest.publisher, manifest.name)) - .then( - metadata => this.installFromZipPath(identifier, zipPath, metadata, manifest), - error => this.installFromZipPath(identifier, zipPath, null, manifest)); - }); + private checkOutdated(manifest: IExtensionManifest): TPromise { + const extensionIdentifier = { id: getGalleryExtensionId(manifest.publisher, manifest.name) }; + return this.getInstalled(LocalExtensionType.User) + .then(installedExtensions => { + const newer = installedExtensions.filter(local => areSameExtensions(extensionIdentifier, { id: getGalleryExtensionIdFromLocal(local) }) && semver.gt(local.manifest.version, manifest.version))[0]; + if (newer) { + const message = nls.localize('installingOutdatedExtension', "A newer version of this extension is already installed. Would you like to override this with the older version?"); + const options = [ + nls.localize('override', "Override"), + nls.localize('cancel', "Cancel") + ]; + return this.choiceService.choose(Severity.Info, message, options, 1, true) + .then(value => { + if (value === 0) { + return this.uninstall(newer, true).then(() => true); + } + return TPromise.wrapError(errors.canceled()); + }); + } + return true; }); } @@ -139,7 +207,7 @@ export class ExtensionManagementService implements IExtensionManagementService { return this.getDependenciesToInstall(local.manifest.extensionDependencies) .then(dependenciesToInstall => this.downloadAndInstallExtensions(metadata ? dependenciesToInstall.filter(d => d.identifier.uuid !== metadata.id) : dependenciesToInstall)) .then(() => local, error => { - this.uninstallExtension(local.identifier); + this.uninstallExtension(local); return TPromise.wrapError(error); }); } @@ -152,95 +220,117 @@ export class ExtensionManagementService implements IExtensionManagementService { } installFromGallery(extension: IGalleryExtension): TPromise { - return this.prepareAndCollectExtensionsToInstall(extension) - .then(extensionsToInstall => this.downloadAndInstallExtensions(extensionsToInstall) - .then(local => this.onDidInstallExtensions(extensionsToInstall, local))); - } + this.deleteExtensionsManifestCache(); - private prepareAndCollectExtensionsToInstall(extension: IGalleryExtension): TPromise { this.onInstallExtensions([extension]); return this.collectExtensionsToInstall(extension) .then( - extensionsToInstall => this.checkForObsolete(extensionsToInstall) - .then( - extensionsToInstall => { - if (extensionsToInstall.length > 1) { - this.onInstallExtensions(extensionsToInstall.slice(1)); - } - return extensionsToInstall; - }, - error => this.onDidInstallExtensions([extension], null, INSTALL_ERROR_OBSOLETE, error) - ), - error => this.onDidInstallExtensions([extension], null, INSTALL_ERROR_GALLERY, error) - ); - } - - private downloadAndInstallExtensions(extensions: IGalleryExtension[]): TPromise { - return this.getInstalled(LocalExtensionType.User) - .then(installed => TPromise.join(extensions.map(extensionToInstall => this.downloadInstallableExtension(extensionToInstall, installed))) - .then( - installableExtensions => TPromise.join(installableExtensions.map(installableExtension => this.installExtension(installableExtension))) - .then(null, error => this.rollback(extensions).then(() => this.onDidInstallExtensions(extensions, null, INSTALL_ERROR_LOCAL, error))), - error => this.onDidInstallExtensions(extensions, null, INSTALL_ERROR_GALLERY, error))); + extensionsToInstall => { + if (extensionsToInstall.length > 1) { + this.onInstallExtensions(extensionsToInstall.slice(1)); + } + return this.downloadAndInstallExtensions(extensionsToInstall) + .then( + locals => this.onDidInstallExtensions(extensionsToInstall, locals, []), + errors => this.onDidInstallExtensions(extensionsToInstall, [], errors)); + }, + error => this.onDidInstallExtensions([extension], [], [error])); } private collectExtensionsToInstall(extension: IGalleryExtension): TPromise { return this.galleryService.loadCompatibleVersion(extension) - .then(extensionToInstall => this.getDependenciesToInstall(extension.properties.dependencies) - .then(dependenciesToInstall => [extensionToInstall, ...dependenciesToInstall.filter(d => d.identifier.uuid !== extensionToInstall.identifier.uuid)])); + .then(compatible => { + if (!compatible) { + return TPromise.wrapError(new ExtensionManagementError(nls.localize('notFoundCompatible', "Unable to install because, the extension '{0}' compatible with current version '{1}' of VS Code is not found.", extension.identifier.id, pkg.version), INSTALL_ERROR_INCOMPATIBLE)); + } + return this.getDependenciesToInstall(compatible.properties.dependencies) + .then( + dependenciesToInstall => ([compatible, ...dependenciesToInstall.filter(d => d.identifier.uuid !== compatible.identifier.uuid)]), + error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_GALLERY))); + }, + error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_GALLERY))); } - private checkForObsolete(extensionsToInstall: IGalleryExtension[]): TPromise { - return this.filterObsolete(...extensionsToInstall.map(i => getLocalExtensionIdFromGallery(i, i.version))) - .then(obsolete => obsolete.length ? TPromise.wrapError(new Error(nls.localize('restartCodeGallery', "Please restart Code before reinstalling."))) : extensionsToInstall); + private downloadAndInstallExtensions(extensions: IGalleryExtension[]): TPromise { + return TPromise.join(extensions.map(extensionToInstall => this.downloadInstallableExtension(extensionToInstall) + .then(installableExtension => this.installExtension(installableExtension)) + )).then(null, errors => this.rollback(extensions).then(() => TPromise.wrapError(errors), () => TPromise.wrapError(errors))); } - private downloadInstallableExtension(extension: IGalleryExtension, installed: ILocalExtension[]): TPromise { - const current = installed.filter(i => i.identifier.uuid === extension.identifier.uuid)[0]; + private downloadInstallableExtension(extension: IGalleryExtension): TPromise { const id = getLocalExtensionIdFromGallery(extension, extension.version); const metadata = { id: extension.identifier.uuid, publisherId: extension.publisherId, publisherDisplayName: extension.publisherDisplayName, }; - return this.galleryService.download(extension) - .then(zipPath => validateLocalExtension(zipPath).then(() => ({ zipPath, id, metadata, current }))); + + return this.galleryService.loadCompatibleVersion(extension) + .then( + compatible => { + if (compatible) { + this.logService.trace('Started downloading extension:', extension.name); + return this.galleryService.download(extension) + .then( + zipPath => { + this.logService.info('Downloaded extension:', extension.name); + return validateLocalExtension(zipPath) + .then( + () => ({ zipPath, id, metadata }), + error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_VALIDATING)) + ); + }, + error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_DOWNLOADING))); + } else { + return TPromise.wrapError(new ExtensionManagementError(nls.localize('notFoundCompatibleDependency', "Unable to install because, the depending extension '{0}' compatible with current version '{1}' of VS Code is not found.", extension.identifier.id, pkg.version), INSTALL_ERROR_INCOMPATIBLE)); + } + }, + error => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(error).message, INSTALL_ERROR_GALLERY))); } private rollback(extensions: IGalleryExtension[]): TPromise { return this.filterOutUninstalled(extensions) - .then(installed => TPromise.join(installed.map(local => this.uninstallExtension(local.identifier)))) + .then(installed => TPromise.join(installed.map(local => this.uninstallExtension(local)))) .then(() => null, () => null); } private onInstallExtensions(extensions: IGalleryExtension[]): void { for (const extension of extensions) { + this.logService.info('Installing extension:', extension.name); const id = getLocalExtensionIdFromGallery(extension, extension.version); this._onInstallExtension.fire({ identifier: { id, uuid: extension.identifier.uuid }, gallery: extension }); } } - private onDidInstallExtensions(extensions: IGalleryExtension[], local: ILocalExtension[], errorCode?: string, error?: any): TPromise { + private onDidInstallExtensions(extensions: IGalleryExtension[], locals: ILocalExtension[], errors: Error[]): TPromise { extensions.forEach((gallery, index) => { const identifier = { id: getLocalExtensionIdFromGallery(gallery, gallery.version), uuid: gallery.identifier.uuid }; - if (errorCode) { - this._onDidInstallExtension.fire({ identifier, gallery, error: errorCode }); + const local = locals[index]; + const error = errors[index]; + if (local) { + this.logService.info(`Extensions installed successfully:`, gallery.identifier.id); + this._onDidInstallExtension.fire({ identifier, gallery, local }); } else { - this._onDidInstallExtension.fire({ identifier, gallery, local: local[index] }); + const errorCode = error && (error).code ? (error).code : INSTALL_ERROR_UNKNOWN; + this.logService.error(`Failed to install extension:`, gallery.identifier.id, error ? error.message : errorCode); + this._onDidInstallExtension.fire({ identifier, gallery, error: errorCode }); } }); - return error ? TPromise.wrapError(Array.isArray(error) ? this.joinErrors(error) : error) : TPromise.as(null); + return errors.length ? TPromise.wrapError(this.joinErrors(errors)) : TPromise.as(null); } private getDependenciesToInstall(dependencies: string[]): TPromise { - return this.galleryService.loadAllDependencies(dependencies.map(id => ({ id }))) - .then(allDependencies => this.getInstalled() - .then(local => { - return allDependencies.filter(d => { - const extensionId = getLocalExtensionIdFromGallery(d, d.version); - return local.every(({ identifier }) => identifier.id !== extensionId); - }); - })); + if (dependencies.length) { + return this.galleryService.loadAllDependencies(dependencies.map(id => ({ id }))) + .then(allDependencies => this.getInstalled() + .then(local => { + return allDependencies.filter(d => { + const extensionId = getLocalExtensionIdFromGallery(d, d.version); + return local.every(({ identifier }) => identifier.id !== extensionId); + }); + })); + } + return TPromise.as([]); } private filterOutUninstalled(extensions: IGalleryExtension[]): TPromise { @@ -253,14 +343,54 @@ export class ExtensionManagementService implements IExtensionManagementService { return filtered.length ? filtered[0] : null; } - private installExtension({ zipPath, id, metadata, current }: InstallableExtension): TPromise { - const extensionPath = path.join(this.extensionsPath, id); + private installExtension(installableExtension: InstallableExtension): TPromise { + return this.unsetUninstalledAndGetLocal(installableExtension.id) + .then( + local => { + if (local) { + return local; + } + return this.extractAndInstall(installableExtension); + }, + e => { + if (isMacintosh) { + return TPromise.wrapError(new ExtensionManagementError(nls.localize('quitCode', "Unable to install the extension. Please Quit and Start VS Code before reinstalling."), INSTALL_ERROR_UNSET_UNINSTALLED)); + } + return TPromise.wrapError(new ExtensionManagementError(nls.localize('exitCode', "Unable to install the extension. Please Exit and Start VS Code before reinstalling."), INSTALL_ERROR_UNSET_UNINSTALLED)); + }); + } - return pfs.rimraf(extensionPath).then(() => { - return extract(zipPath, extensionPath, { sourcePath: 'extension', overwrite: true }) - .then(() => readManifest(extensionPath)) - .then(({ manifest }) => { - return pfs.readdir(extensionPath).then(children => { + private unsetUninstalledAndGetLocal(id: string): TPromise { + return this.isUninstalled(id) + .then(isUninstalled => { + if (isUninstalled) { + this.logService.trace('Removing the extension from uninstalled list:', id); + // If the same version of extension is marked as uninstalled, remove it from there and return the local. + return this.unsetUninstalled(id) + .then(() => { + this.logService.info('Removed the extension from uninstalled list:', id); + return this.getInstalled(LocalExtensionType.User); + }) + .then(installed => installed.filter(i => i.identifier.id === id)[0]); + } + return null; + }); + } + + private extractAndInstall({ zipPath, id, metadata }: InstallableExtension): TPromise { + const extensionPath = path.join(this.extensionsPath, id); + return pfs.rimraf(extensionPath) + .then(() => { + this.logService.trace(`Started extracting the extension from ${zipPath} to ${extensionPath}`); + return extract(zipPath, extensionPath, { sourcePath: 'extension', overwrite: true }) + .then( + () => { + this.logService.info(`Extracted extension to ${extensionPath}:`, id); + return TPromise.join([readManifest(extensionPath), pfs.readdir(extensionPath)]) + .then(null, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_LOCAL))); + }, + e => TPromise.wrapError(new ExtensionManagementError(e.message, INSTALL_ERROR_EXTRACTING))) + .then(([{ manifest }, children]) => { const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0]; const readmeUrl = readme ? URI.file(path.join(extensionPath, readme)).toString() : null; const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0]; @@ -270,28 +400,31 @@ export class ExtensionManagementService implements IExtensionManagementService { const local: ILocalExtension = { type, identifier, manifest, metadata, path: extensionPath, readmeUrl, changelogUrl }; + this.logService.trace(`Updating metadata of the extension:`, id); return this.saveMetadataForLocalExtension(local) - .then(() => this.checkForRename(current, local)) - .then(() => local); + .then(() => { + this.logService.info(`Updated metadata of the extension:`, id); + return local; + }, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_LOCAL))); }); - }); - }); + }, e => TPromise.wrapError(new ExtensionManagementError(this.joinErrors(e).message, INSTALL_ERROR_DELETING))); } uninstall(extension: ILocalExtension, force = false): TPromise { - return this.removeOutdatedExtensions() - .then(() => - this.scanUserExtensions() - .then(installed => { - const promises = installed - .filter(e => e.manifest.publisher === extension.manifest.publisher && e.manifest.name === extension.manifest.name) - .map(e => this.checkForDependenciesAndUninstall(e, installed, force)); - return TPromise.join(promises).then(null, error => TPromise.wrapError(Array.isArray(error) ? this.joinErrors(error) : error)); - })) - .then(() => { /* drop resolved value */ }); + this.deleteExtensionsManifestCache(); + + return this.getInstalled(LocalExtensionType.User) + .then(installed => { + const promises = installed + .filter(e => e.manifest.publisher === extension.manifest.publisher && e.manifest.name === extension.manifest.name) + .map(e => this.checkForDependenciesAndUninstall(e, installed, force)); + return TPromise.join(promises).then(() => null, error => TPromise.wrapError(this.joinErrors(error))); + }); } updateMetadata(local: ILocalExtension, metadata: IGalleryMetadata): TPromise { + this.deleteExtensionsManifestCache(); + local.metadata = metadata; return this.saveMetadataForLocalExtension(local); } @@ -316,20 +449,11 @@ export class ExtensionManagementService implements IExtensionManagementService { }); } - private checkForRename(currentExtension: ILocalExtension, newExtension: ILocalExtension): TPromise { - // Check if the gallery id for current and new exensions are same, if not, remove the current one. - if (currentExtension && getGalleryExtensionIdFromLocal(currentExtension) !== getGalleryExtensionIdFromLocal(newExtension)) { - // return this.uninstallExtension(currentExtension.identifier); - return this.setObsolete(currentExtension.identifier.id); - } - return TPromise.as(null); - } - - private joinErrors(errors: (Error | string)[]): Error { + private joinErrors(errorOrErrors: (Error | string) | ((Error | string)[])): Error { + const errors = Array.isArray(errorOrErrors) ? errorOrErrors : [errorOrErrors]; if (errors.length === 1) { return errors[0] instanceof Error ? errors[0] : new Error(errors[0]); } - return errors.reduce((previousValue: Error, currentValue: Error | string) => { return new Error(`${previousValue.message}${previousValue.message ? ',' : ''}${currentValue instanceof Error ? currentValue.message : currentValue}`); }, new Error('')); @@ -373,6 +497,7 @@ export class ExtensionManagementService implements IExtensionManagementService { const dependencies = distinct(this.getDependenciesToUninstallRecursively(extension, installed, [])).filter(e => e !== extension); return this.uninstallWithDependencies(extension, dependencies, installed); } + this.logService.info('Cancelled uninstalling extension:', extension.identifier.id); return TPromise.wrapError(errors.canceled()); }, error => TPromise.wrapError(errors.canceled())); } @@ -392,6 +517,7 @@ export class ExtensionManagementService implements IExtensionManagementService { if (value === 0) { return this.uninstallWithDependencies(extension, [], installed); } + this.logService.info('Cancelled uninstalling extension:', extension.identifier.id); return TPromise.wrapError(errors.canceled()); }, error => TPromise.wrapError(errors.canceled())); } @@ -402,7 +528,7 @@ export class ExtensionManagementService implements IExtensionManagementService { if (dependents.length) { return TPromise.wrapError(new Error(this.getDependentsErrorMessage(extension, dependents))); } - return TPromise.join([this.uninstallExtension(extension.identifier), ...dependenciesToUninstall.map(d => this.doUninstall(d))]).then(() => null); + return TPromise.join([this.uninstallExtension(extension), ...dependenciesToUninstall.map(d => this.doUninstall(d))]).then(() => null); } private getDependentsErrorMessage(extension: ILocalExtension, dependents: ILocalExtension[]): string { @@ -453,7 +579,7 @@ export class ExtensionManagementService implements IExtensionManagementService { private doUninstall(extension: ILocalExtension): TPromise { return this.preUninstallExtension(extension) - .then(() => this.uninstallExtension(extension.identifier)) + .then(() => this.uninstallExtension(extension)) .then(() => this.postUninstallExtension(extension), error => { this.postUninstallExtension(extension, INSTALL_ERROR_LOCAL); @@ -465,24 +591,29 @@ export class ExtensionManagementService implements IExtensionManagementService { const extensionPath = path.join(this.extensionsPath, extension.identifier.id); return pfs.exists(extensionPath) .then(exists => exists ? null : TPromise.wrapError(new Error(nls.localize('notExists', "Could not find extension")))) - .then(() => this._onUninstallExtension.fire(extension.identifier)); + .then(() => { + this.logService.info('Uninstalling extension:', extension.identifier.id); + this._onUninstallExtension.fire(extension.identifier); + }); } - private uninstallExtension({ id }: IExtensionIdentifier): TPromise { - const extensionPath = path.join(this.extensionsPath, id); - return this.setObsolete(id) - .then(() => pfs.rimraf(extensionPath)) - .then(() => this.unsetObsolete(id)); + private uninstallExtension(local: ILocalExtension): TPromise { + const identifier = { id: getGalleryExtensionIdFromLocal(local), uuid: local.identifier.uuid }; + return this.scanUserExtensions(false) // Uninstall all extensions which are same as requested + .then(extensions => extensions.filter(i => areSameExtensions({ id: getGalleryExtensionIdFromLocal(i), uuid: i.identifier.uuid }, identifier))) + .then(uninstalled => this.setUninstalled(...uninstalled.map(u => u.identifier.id))); } private async postUninstallExtension(extension: ILocalExtension, error?: string): TPromise { - if (!error) { + if (error) { + this.logService.error('Failed to uninstall extension:', extension.identifier.id, error); + } else { + this.logService.info('Successfully uninstalled extension:', extension.identifier.id); // only report if extension has a mapped gallery extension. UUID identifies the gallery extension. if (extension.identifier.uuid) { await this.galleryService.reportStatistic(extension.manifest.publisher, extension.manifest.name, extension.manifest.version, StatisticType.Uninstall); } } - this._onDidUninstallExtension.fire({ identifier: extension.identifier, error }); } @@ -490,25 +621,36 @@ export class ExtensionManagementService implements IExtensionManagementService { const promises = []; if (type === null || type === LocalExtensionType.System) { - promises.push(this.scanSystemExtensions()); + promises.push(this.scanSystemExtensions().then(null, e => new ExtensionManagementError(this.joinErrors(e).message, ERROR_SCANNING_SYS_EXTENSIONS))); } if (type === null || type === LocalExtensionType.User) { - promises.push(this.scanUserExtensions()); + promises.push(this.scanUserExtensions(true).then(null, e => new ExtensionManagementError(this.joinErrors(e).message, ERROR_SCANNING_USER_EXTENSIONS))); } - return TPromise.join(promises).then(flatten); + return TPromise.join(promises).then(flatten, errors => TPromise.wrapError(this.joinErrors(errors))); } private scanSystemExtensions(): TPromise { - return this.scanExtensions(SystemExtensionsRoot, LocalExtensionType.System); + this.logService.trace('Started scanning system extensions'); + return this.scanExtensions(SystemExtensionsRoot, LocalExtensionType.System) + .then(result => { + this.logService.info('Scanned system extensions:', result.length); + return result; + }); } - private scanUserExtensions(): TPromise { - return this.scanExtensions(this.extensionsPath, LocalExtensionType.User).then(extensions => { - const byId = values(groupBy(extensions, p => getGalleryExtensionIdFromLocal(p))); - return byId.map(p => p.sort((a, b) => semver.rcompare(a.manifest.version, b.manifest.version))[0]); - }); + private scanUserExtensions(excludeOutdated: boolean): TPromise { + this.logService.trace('Started scanning user extensions'); + return this.scanExtensions(this.extensionsPath, LocalExtensionType.User) + .then(extensions => { + this.logService.info('Scanned user extensions:', extensions.length); + if (excludeOutdated) { + const byExtension: ILocalExtension[][] = groupByExtension(extensions, e => ({ id: getGalleryExtensionIdFromLocal(e), uuid: e.identifier.uuid })); + return byExtension.map(p => p.sort((a, b) => semver.rcompare(a.manifest.version, b.manifest.version))[0]); + } + return extensions; + }); } private scanExtensions(root: string, type: LocalExtensionType): TPromise { @@ -540,90 +682,69 @@ export class ExtensionManagementService implements IExtensionManagementService { } private scanExtensionFolders(root: string): TPromise { - return this.getObsoleteExtensions() - .then(obsolete => pfs.readdir(root).then(extensions => extensions.filter(id => !obsolete[id]))); + return this.getUninstalledExtensions() + .then(uninstalled => pfs.readdir(root).then(extensions => extensions.filter(id => !uninstalled[id]))); } removeDeprecatedExtensions(): TPromise { - return TPromise.join([ - this.removeOutdatedExtensions(), - this.removeObsoleteExtensions() - ]); - } + return this.getUninstalledExtensions() + .then(uninstalled => { + const unInstalledExtensionIds = Object.keys(uninstalled); + return this.scanUserExtensions(false) + .then(extensions => { + const byExtension: ILocalExtension[][] = groupByExtension(extensions, e => ({ id: getGalleryExtensionIdFromLocal(e), uuid: e.identifier.uuid })); + const outDatedExtensionIds = flatten(byExtension.map(p => p.sort((a, b) => semver.rcompare(a.manifest.version, b.manifest.version)).slice(1))) + .map(a => a.identifier.id); - private removeOutdatedExtensions(): TPromise { - return this.getOutdatedExtensionIds() - .then(extensionIds => this.removeExtensions(extensionIds)); - } - - private removeObsoleteExtensions(): TPromise { - return this.getObsoleteExtensions() - .then(obsolete => Object.keys(obsolete)) - .then(extensionIds => this.removeExtensions(extensionIds)); - } - - private removeExtensions(extensionsIds: string[]): TPromise { - return TPromise.join(extensionsIds.map(id => { - return pfs.rimraf(path.join(this.extensionsPath, id)) - .then(() => this.withObsoleteExtensions(obsolete => delete obsolete[id])); - })); - } - - private getOutdatedExtensionIds(): TPromise { - return this.scanExtensionFolders(this.extensionsPath) - .then(folders => { - const galleryFolders = folders - .map(folder => (assign({ folder }, getIdAndVersionFromLocalExtensionId(folder)))) - .filter(({ id, version }) => !!id && !!version); - - const byId = values(groupBy(galleryFolders, p => p.id)); - - return flatten(byId.map(p => p.sort((a, b) => semver.rcompare(a.version, b.version)).slice(1))) - .map(a => a.folder); + return TPromise.join([...unInstalledExtensionIds, ...outDatedExtensionIds].map(id => { + return pfs.rimraf(path.join(this.extensionsPath, id)) + .then(() => this.withUninstalledExtensions(uninstalled => delete uninstalled[id])); + })); + }); }); } - private isObsolete(id: string): TPromise { - return this.filterObsolete(id).then(obsolete => obsolete.length === 1); + private isUninstalled(id: string): TPromise { + return this.filterUninstalled(id).then(uninstalled => uninstalled.length === 1); } - private filterObsolete(...ids: string[]): TPromise { - return this.withObsoleteExtensions(allObsolete => { - const obsolete = []; + private filterUninstalled(...ids: string[]): TPromise { + return this.withUninstalledExtensions(allUninstalled => { + const uninstalled = []; for (const id of ids) { - if (!!allObsolete[id]) { - obsolete.push(id); + if (!!allUninstalled[id]) { + uninstalled.push(id); } } - return obsolete; + return uninstalled; }); } - private setObsolete(id: string): TPromise { - return this.withObsoleteExtensions(obsolete => assign(obsolete, { [id]: true })); + private setUninstalled(...ids: string[]): TPromise { + return this.withUninstalledExtensions(uninstalled => assign(uninstalled, ids.reduce((result, id) => { result[id] = true; return result; }, {}))); } - private unsetObsolete(id: string): TPromise { - return this.withObsoleteExtensions(obsolete => delete obsolete[id]); + private unsetUninstalled(id: string): TPromise { + return this.withUninstalledExtensions(uninstalled => delete uninstalled[id]); } - private getObsoleteExtensions(): TPromise<{ [id: string]: boolean; }> { - return this.withObsoleteExtensions(obsolete => obsolete); + private getUninstalledExtensions(): TPromise<{ [id: string]: boolean; }> { + return this.withUninstalledExtensions(uninstalled => uninstalled); } - private withObsoleteExtensions(fn: (obsolete: { [id: string]: boolean; }) => T): TPromise { - return this.obsoleteFileLimiter.queue(() => { + private withUninstalledExtensions(fn: (uninstalled: { [id: string]: boolean; }) => T): TPromise { + return this.uninstalledFileLimiter.queue(() => { let result: T = null; - return pfs.readFile(this.obsoletePath, 'utf8') + return pfs.readFile(this.uninstalledPath, 'utf8') .then(null, err => err.code === 'ENOENT' ? TPromise.as('{}') : TPromise.wrapError(err)) .then<{ [id: string]: boolean }>(raw => { try { return JSON.parse(raw); } catch (e) { return {}; } }) - .then(obsolete => { result = fn(obsolete); return obsolete; }) - .then(obsolete => { - if (Object.keys(obsolete).length === 0) { - return pfs.rimraf(this.obsoletePath); + .then(uninstalled => { result = fn(uninstalled); return uninstalled; }) + .then(uninstalled => { + if (Object.keys(uninstalled).length === 0) { + return pfs.rimraf(this.uninstalledPath); } else { - const raw = JSON.stringify(obsolete); - return pfs.writeFile(this.obsoletePath, raw); + const raw = JSON.stringify(uninstalled); + return pfs.writeFile(this.uninstalledPath, raw); } }) .then(() => result); @@ -645,4 +766,4 @@ export function getLocalExtensionIdFromManifest(manifest: IExtensionManifest): s function getLocalExtensionId(id: string, version: string): string { return `${id}-${version}`; -} \ No newline at end of file +} diff --git a/src/vs/platform/extensionManagement/node/extensionManagementUtil.ts b/src/vs/platform/extensionManagement/node/extensionManagementUtil.ts new file mode 100644 index 00000000000..b8df67a3d7d --- /dev/null +++ b/src/vs/platform/extensionManagement/node/extensionManagementUtil.ts @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as semver from 'semver'; +import { adoptToGalleryExtensionId, LOCAL_EXTENSION_ID_REGEX } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; + +export function getIdAndVersionFromLocalExtensionId(localExtensionId: string): { id: string, version: string } { + const matches = LOCAL_EXTENSION_ID_REGEX.exec(localExtensionId); + if (matches && matches[1] && matches[2]) { + const version = semver.valid(matches[2]); + if (version) { + return { id: adoptToGalleryExtensionId(matches[1]), version }; + } + } + return { + id: adoptToGalleryExtensionId(localExtensionId), + version: null + }; +} \ No newline at end of file diff --git a/src/vs/platform/extensionManagement/test/node/extensionGalleryService.test.ts b/src/vs/platform/extensionManagement/test/node/extensionGalleryService.test.ts new file mode 100644 index 00000000000..63d4e31cb4d --- /dev/null +++ b/src/vs/platform/extensionManagement/test/node/extensionGalleryService.test.ts @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as assert from 'assert'; +import * as os from 'os'; +import extfs = require('vs/base/node/extfs'); +import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; +import { parseArgs } from 'vs/platform/environment/node/argv'; +import { getRandomTestPath } from 'vs/workbench/test/workbenchTestServices'; +import { join } from 'path'; +import { mkdirp } from 'vs/base/node/pfs'; +import { resolveMarketplaceHeaders } from 'vs/platform/extensionManagement/node/extensionGalleryService'; +import { isUUID } from 'vs/base/common/uuid'; + +suite('Extension Gallery Service', () => { + const parentDir = getRandomTestPath(os.tmpdir(), 'vsctests', 'extensiongalleryservice'); + const marketplaceHome = join(parentDir, 'Marketplace'); + + setup(done => { + + // Delete any existing backups completely and then re-create it. + extfs.del(marketplaceHome, os.tmpdir(), () => { + mkdirp(marketplaceHome).then(() => { + done(); + }); + }); + }); + + teardown(done => { + extfs.del(marketplaceHome, os.tmpdir(), done); + }); + + test('marketplace machine id', done => { + const args = ['--user-data-dir', marketplaceHome]; + const environmentService = new EnvironmentService(parseArgs(args), process.execPath); + + return resolveMarketplaceHeaders(environmentService).then(headers => { + assert.ok(isUUID(headers['X-Market-User-Id'])); + + return resolveMarketplaceHeaders(environmentService).then(headers2 => { + assert.equal(headers['X-Market-User-Id'], headers2['X-Market-User-Id']); + + done(); + }); + }); + }); +}); \ No newline at end of file diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts index 22d4e4259f9..fe757879b07 100644 --- a/src/vs/platform/extensions/common/extensions.ts +++ b/src/vs/platform/extensions/common/extensions.ts @@ -27,9 +27,16 @@ export interface IExtensionDescription { readonly main?: string; readonly contributes?: { [point: string]: any; }; readonly keywords?: string[]; + readonly repository?: { + url: string; + }; enableProposedApi?: boolean; } +export const MANIFEST_CACHE_FOLDER = 'CachedExtensions'; +export const USER_MANIFEST_CACHE_FILE = 'user'; +export const BUILTIN_MANIFEST_CACHE_FILE = 'builtin'; + export const IExtensionService = createDecorator('extensionService'); export interface IMessage { @@ -42,19 +49,63 @@ export interface IMessage { export interface IExtensionsStatus { messages: IMessage[]; + activationTimes: ActivationTimes; + runtimeErrors: Error[]; } -export class ActivationTimes { - public readonly startup: boolean; - public readonly codeLoadingTime: number; - public readonly activateCallTime: number; - public readonly activateResolvedTime: number; +/** + * e.g. + * ``` + * { + * startTime: 1511954813493000, + * endTime: 1511954835590000, + * deltas: [ 100, 1500, 123456, 1500, 100000 ], + * ids: [ 'idle', 'self', 'extension1', 'self', 'idle' ] + * } + * ``` + */ +export interface IExtensionHostProfile { + /** + * Profiling start timestamp in microseconds. + */ + startTime: number; + /** + * Profiling end timestamp in microseconds. + */ + endTime: number; + /** + * Duration of segment in microseconds. + */ + deltas: number[]; + /** + * Segment identifier: extension id or one of the four known strings. + */ + ids: ProfileSegmentId[]; - constructor(startup: boolean, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number) { - this.startup = startup; - this.codeLoadingTime = codeLoadingTime; - this.activateCallTime = activateCallTime; - this.activateResolvedTime = activateResolvedTime; + /** + * Get the information as a .cpuprofile. + */ + data: object; + + /** + * Get the aggregated time per segmentId + */ + getAggregatedTimes(): Map; +} + +/** + * Extension id or one of the four known program states. + */ +export type ProfileSegmentId = string | 'idle' | 'program' | 'gc' | 'self'; + +export class ActivationTimes { + constructor( + public readonly startup: boolean, + public readonly codeLoadingTime: number, + public readonly activateCallTime: number, + public readonly activateResolvedTime: number, + public readonly activationEvent: string + ) { } } @@ -68,6 +119,10 @@ export class ExtensionPointContribution { } } +export interface IExtensionHostInformation { + inspectPort: number; +} + export interface IExtensionService { _serviceBrand: any; @@ -80,6 +135,13 @@ export interface IExtensionService { */ onDidRegisterExtensions: Event; + /** + * @event + * Fired when extensions status changes. + * The event contains the ids of the extensions that have changed. + */ + onDidChangeExtensionsStatus: Event; + /** * Send an activation event and activate interested extensions. */ @@ -107,9 +169,9 @@ export interface IExtensionService { getExtensionsStatus(): { [id: string]: IExtensionsStatus }; /** - * Get information about extension activation times. + * Begin an extension host process profile session. */ - getExtensionsActivationTimes(): { [id: string]: ActivationTimes; }; + startExtensionHostProfile(): TPromise; /** * Restarts the extension host. @@ -125,4 +187,13 @@ export interface IExtensionService { * Stops the extension host. */ stopExtensionHost(): void; + + /** + * + */ + getExtensionHostInformation(): IExtensionHostInformation; +} + +export interface ProfileSession { + stop(): TPromise; } diff --git a/src/vs/platform/extensions/common/extensionsRegistry.ts b/src/vs/platform/extensions/common/extensionsRegistry.ts index fd969d13623..52af538246f 100644 --- a/src/vs/platform/extensions/common/extensionsRegistry.ts +++ b/src/vs/platform/extensions/common/extensionsRegistry.ts @@ -199,6 +199,16 @@ const schema: IJSONSchema = { description: nls.localize('vscode.extension.activationEvents.onDebug', 'An activation event emitted whenever a user is about to start debugging or about to setup debug configurations.'), body: 'onDebug' }, + { + label: 'onDebugInitialConfigurations', + description: nls.localize('vscode.extension.activationEvents.onDebugInitialConfigurations', 'An activation event emitted whenever a "launch.json" needs to be created (and all provideDebugConfigurations methods need to be called).'), + body: 'onDebugInitialConfigurations' + }, + { + label: 'onDebugResolve', + description: nls.localize('vscode.extension.activationEvents.onDebugResolve', 'An activation event emitted whenever a debug session with the specific type is about to be launched (and a corresponding resolveDebugConfiguration method needs to be called).'), + body: 'onDebugResolve:${6:type}' + }, { label: 'workspaceContains', description: nls.localize('vscode.extension.activationEvents.workspaceContains', 'An activation event emitted whenever a folder is opened that contains at least a file matching the specified glob pattern.'), diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 3744088afe5..262916172b6 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -8,7 +8,6 @@ import { TPromise } from 'vs/base/common/winjs.base'; import paths = require('vs/base/common/paths'); import URI from 'vs/base/common/uri'; import glob = require('vs/base/common/glob'); -import events = require('vs/base/common/events'); import { isLinux } from 'vs/base/common/platform'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; @@ -245,12 +244,11 @@ export interface IFileChange { resource: URI; } -export class FileChangesEvent extends events.Event { +export class FileChangesEvent { + private _changes: IFileChange[]; constructor(changes: IFileChange[]) { - super(); - this._changes = changes; } diff --git a/src/vs/platform/history/electron-main/historyMainService.ts b/src/vs/platform/history/electron-main/historyMainService.ts index 069fa2c4733..761b5c05265 100644 --- a/src/vs/platform/history/electron-main/historyMainService.ts +++ b/src/vs/platform/history/electron-main/historyMainService.ts @@ -9,7 +9,7 @@ import * as path from 'path'; import * as nls from 'vs/nls'; import * as arrays from 'vs/base/common/arrays'; import { trim } from 'vs/base/common/strings'; -import { IStorageService } from 'vs/platform/storage/node/storage'; +import { IStateService } from 'vs/platform/state/common/state'; import { app } from 'electron'; import { ILogService } from 'vs/platform/log/common/log'; import { getPathLabel, getBaseLabel } from 'vs/base/common/labels'; @@ -22,10 +22,6 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { isEqual } from 'vs/base/common/paths'; import { RunOnceScheduler } from 'vs/base/common/async'; -export interface ILegacyRecentlyOpened extends IRecentlyOpened { - folders: string[]; // TODO@Ben migration -} - export class HistoryMainService implements IHistoryMainService { private static readonly MAX_TOTAL_RECENT_ENTRIES = 100; @@ -41,9 +37,9 @@ export class HistoryMainService implements IHistoryMainService { private macOSRecentDocumentsUpdater: RunOnceScheduler; constructor( - @IStorageService private storageService: IStorageService, + @IStateService private stateService: IStateService, @ILogService private logService: ILogService, - @IWorkspacesMainService private workspacesService: IWorkspacesMainService, + @IWorkspacesMainService private workspacesMainService: IWorkspacesMainService, @IEnvironmentService private environmentService: IEnvironmentService, ) { this.macOSRecentDocumentsUpdater = new RunOnceScheduler(() => this.updateMacOSRecentDocuments(), 800); @@ -52,7 +48,7 @@ export class HistoryMainService implements IHistoryMainService { } private registerListeners(): void { - this.workspacesService.onWorkspaceSaved(e => this.onWorkspaceSaved(e)); + this.workspacesMainService.onWorkspaceSaved(e => this.onWorkspaceSaved(e)); } private onWorkspaceSaved(e: IWorkspaceSavedEvent): void { @@ -67,7 +63,7 @@ export class HistoryMainService implements IHistoryMainService { // Workspaces workspaces.forEach(workspace => { - const isUntitledWorkspace = !isSingleFolderWorkspaceIdentifier(workspace) && this.workspacesService.isUntitledWorkspace(workspace); + const isUntitledWorkspace = !isSingleFolderWorkspaceIdentifier(workspace) && this.workspacesMainService.isUntitledWorkspace(workspace); if (isUntitledWorkspace) { return; // only store saved workspaces } @@ -179,9 +175,9 @@ export class HistoryMainService implements IHistoryMainService { let files: string[]; // Get from storage - const storedRecents = this.storageService.getItem(HistoryMainService.recentlyOpenedStorageKey) as ILegacyRecentlyOpened; + const storedRecents = this.stateService.getItem(HistoryMainService.recentlyOpenedStorageKey); if (storedRecents) { - workspaces = storedRecents.workspaces || storedRecents.folders || []; + workspaces = storedRecents.workspaces || []; files = storedRecents.files || []; } else { workspaces = []; @@ -203,7 +199,7 @@ export class HistoryMainService implements IHistoryMainService { files = arrays.distinct(files, file => this.distinctFn(file)); // Hide untitled workspaces - workspaces = workspaces.filter(workspace => isSingleFolderWorkspaceIdentifier(workspace) || !this.workspacesService.isUntitledWorkspace(workspace)); + workspaces = workspaces.filter(workspace => isSingleFolderWorkspaceIdentifier(workspace) || !this.workspacesMainService.isUntitledWorkspace(workspace)); return { workspaces, files }; } @@ -217,7 +213,7 @@ export class HistoryMainService implements IHistoryMainService { } private saveRecentlyOpened(recent: IRecentlyOpened): void { - this.storageService.setItem(HistoryMainService.recentlyOpenedStorageKey, recent); + this.stateService.setItem(HistoryMainService.recentlyOpenedStorageKey, recent); } public updateWindowsJumpList(): void { @@ -281,7 +277,7 @@ export class HistoryMainService implements IHistoryMainService { try { app.setJumpList(jumpList); } catch (error) { - this.logService.log('#setJumpList', error); // since setJumpList is relatively new API, make sure to guard for errors + this.logService.warn('#setJumpList', error); // since setJumpList is relatively new API, make sure to guard for errors } } } \ No newline at end of file diff --git a/src/vs/platform/integrity/common/integrity.ts b/src/vs/platform/integrity/common/integrity.ts index 747c07ca50d..6984b0fa8e7 100644 --- a/src/vs/platform/integrity/common/integrity.ts +++ b/src/vs/platform/integrity/common/integrity.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { TPromise } from 'vs/base/common/winjs.base'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import URI from 'vs/base/common/uri'; @@ -25,5 +24,5 @@ export interface IntegrityTestResult { export interface IIntegrityService { _serviceBrand: any; - isPure(): TPromise; + isPure(): Thenable; } diff --git a/src/vs/platform/integrity/node/integrityServiceImpl.ts b/src/vs/platform/integrity/node/integrityServiceImpl.ts index 33ce7582d89..96798846b0b 100644 --- a/src/vs/platform/integrity/node/integrityServiceImpl.ts +++ b/src/vs/platform/integrity/node/integrityServiceImpl.ts @@ -15,6 +15,7 @@ import URI from 'vs/base/common/uri'; import Severity from 'vs/base/common/severity'; import { Action } from 'vs/base/common/actions'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; interface IStorageData { dontShowPrompt: boolean; @@ -60,11 +61,12 @@ export class IntegrityServiceImpl implements IIntegrityService { private _messageService: IMessageService; private _storage: IntegrityStorage; - private _isPurePromise: TPromise; + private _isPurePromise: Thenable; constructor( @IMessageService messageService: IMessageService, - @IStorageService storageService: IStorageService + @IStorageService storageService: IStorageService, + @ILifecycleService private lifecycleService: ILifecycleService ) { this._messageService = messageService; this._storage = new IntegrityStorage(storageService); @@ -124,14 +126,14 @@ export class IntegrityServiceImpl implements IIntegrityService { }); } - public isPure(): TPromise { + public isPure(): Thenable { return this._isPurePromise; } - private _isPure(): TPromise { + private _isPure(): Thenable { const expectedChecksums = product.checksums || {}; - return TPromise.timeout(10000).then(() => { + return this.lifecycleService.when(LifecyclePhase.Eventually).then(() => { let asyncResults: TPromise[] = Object.keys(expectedChecksums).map((filename) => { return this._resolve(filename, expectedChecksums[filename]); }); diff --git a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts index e9468d0dd7b..82518d718f8 100644 --- a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts +++ b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts @@ -124,8 +124,8 @@ suite('AbstractKeybindingService', () => { let messageService: IMessageService = { _serviceBrand: undefined, hideAll: undefined, - confirmSync: undefined, confirm: undefined, + confirmWithCheckbox: undefined, show: (sev: Severity, message: any): () => void => { showMessageCalls.push({ sev: sev, diff --git a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts index d9b3be30cfd..d77c65cd1b6 100644 --- a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts +++ b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts @@ -8,7 +8,7 @@ import { ipcMain as ipc, app } from 'electron'; import { TPromise, TValueCallback } from 'vs/base/common/winjs.base'; import { ILogService } from 'vs/platform/log/common/log'; -import { IStorageService } from 'vs/platform/storage/node/storage'; +import { IStateService } from 'vs/platform/state/common/state'; import Event, { Emitter } from 'vs/base/common/event'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { ICodeWindow } from 'vs/platform/windows/electron-main/windows'; @@ -94,7 +94,7 @@ export class LifecycleService implements ILifecycleService { constructor( @ILogService private logService: ILogService, - @IStorageService private storageService: IStorageService + @IStateService private stateService: IStateService ) { this.windowToCloseRequest = Object.create(null); this.quitRequested = false; @@ -105,10 +105,10 @@ export class LifecycleService implements ILifecycleService { } private handleRestarted(): void { - this._wasRestarted = !!this.storageService.getItem(LifecycleService.QUIT_FROM_RESTART_MARKER); + this._wasRestarted = !!this.stateService.getItem(LifecycleService.QUIT_FROM_RESTART_MARKER); if (this._wasRestarted) { - this.storageService.removeItem(LifecycleService.QUIT_FROM_RESTART_MARKER); // remove the marker right after if found + this.stateService.removeItem(LifecycleService.QUIT_FROM_RESTART_MARKER); // remove the marker right after if found } } @@ -124,7 +124,7 @@ export class LifecycleService implements ILifecycleService { // before-quit app.on('before-quit', (e) => { - this.logService.log('Lifecycle#before-quit'); + this.logService.trace('Lifecycle#before-quit'); if (!this.quitRequested) { this._onBeforeQuit.fire(); // only send this if this is the first quit request we have @@ -135,7 +135,7 @@ export class LifecycleService implements ILifecycleService { // window-all-closed app.on('window-all-closed', () => { - this.logService.log('Lifecycle#window-all-closed'); + this.logService.trace('Lifecycle#window-all-closed'); // Windows/Linux: we quit when all windows have closed // Mac: we only quit when quit was requested @@ -150,11 +150,11 @@ export class LifecycleService implements ILifecycleService { // Window Before Closing: Main -> Renderer window.win.on('close', e => { const windowId = window.id; - this.logService.log('Lifecycle#window-before-close', windowId); + this.logService.trace('Lifecycle#window-before-close', windowId); // The window already acknowledged to be closed if (this.windowToCloseRequest[windowId]) { - this.logService.log('Lifecycle#window-close', windowId); + this.logService.trace('Lifecycle#window-close', windowId); delete this.windowToCloseRequest[windowId]; @@ -183,7 +183,7 @@ export class LifecycleService implements ILifecycleService { return TPromise.as(false); } - this.logService.log('Lifecycle#unload()', window.id); + this.logService.trace('Lifecycle#unload()', window.id); const windowUnloadReason = this.quitRequested ? UnloadReason.QUIT : reason; @@ -247,7 +247,7 @@ export class LifecycleService implements ILifecycleService { * by the user or not. */ public quit(fromUpdate?: boolean): TPromise { - this.logService.log('Lifecycle#quit()'); + this.logService.trace('Lifecycle#quit()'); if (!this.pendingQuitPromise) { this.pendingQuitPromise = new TPromise(c => { @@ -258,7 +258,7 @@ export class LifecycleService implements ILifecycleService { app.once('will-quit', () => { if (this.pendingQuitPromiseComplete) { if (fromUpdate) { - this.storageService.setItem(LifecycleService.QUIT_FROM_RESTART_MARKER, true); + this.stateService.setItem(LifecycleService.QUIT_FROM_RESTART_MARKER, true); } this.pendingQuitPromiseComplete(false /* no veto */); @@ -296,7 +296,7 @@ export class LifecycleService implements ILifecycleService { let vetoed = false; app.once('quit', () => { if (!vetoed) { - this.storageService.setItem(LifecycleService.QUIT_FROM_RESTART_MARKER, true); + this.stateService.setItem(LifecycleService.QUIT_FROM_RESTART_MARKER, true); app.relaunch({ args }); } }); diff --git a/src/vs/platform/list/browser/listService.ts b/src/vs/platform/list/browser/listService.ts index 6c91a4518ec..b4d344e30ac 100644 --- a/src/vs/platform/list/browser/listService.ts +++ b/src/vs/platform/list/browser/listService.ts @@ -4,12 +4,20 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { ITree } from 'vs/base/parts/tree/browser/tree'; -import { List } from 'vs/base/browser/ui/list/listWidget'; +import { ITree, ITreeConfiguration, ITreeOptions } from 'vs/base/parts/tree/browser/tree'; +import { List, IListOptions } from 'vs/base/browser/ui/list/listWidget'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import { dispose, IDisposable } from 'vs/base/common/lifecycle'; -import { IContextKeyService, IContextKey, RawContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { RunOnceScheduler } from 'vs/base/common/async'; +import { IDisposable, toDisposable, combinedDisposable, dispose } from 'vs/base/common/lifecycle'; +import { IContextKeyService, IContextKey, RawContextKey, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { PagedList, IPagedRenderer } from 'vs/base/browser/ui/list/listPaging'; +import { IDelegate, IRenderer } from 'vs/base/browser/ui/list/list'; +import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; +import { attachListStyler } from 'vs/platform/theme/common/styler'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import Event, { Emitter } from 'vs/base/common/event'; +import { InputFocusedContextKey } from 'vs/platform/workbench/common/contextkeys'; + +export type ListWidget = List | PagedList | ITree; export const IListService = createDecorator('listService'); @@ -17,52 +25,32 @@ export interface IListService { _serviceBrand: any; - /** - * Makes a tree or list widget known to the list service. It will track the lists focus and - * blur events to update context keys based on the widget being focused or not. - * - * @param extraContextKeys an optional list of additional context keys to update based on - * the widget being focused or not. - */ - register(tree: ITree, extraContextKeys?: (IContextKey)[]): IDisposable; - register(list: List, extraContextKeys?: (IContextKey)[]): IDisposable; - /** * Returns the currently focused list widget if any. */ - getFocused(): ITree | List; + readonly lastFocusedList: ListWidget | undefined; } -export const ListFocusContext = new RawContextKey('listFocus', false); - interface IRegisteredList { - widget: ITree | List; + widget: ListWidget; extraContextKeys?: (IContextKey)[]; } export class ListService implements IListService { - public _serviceBrand: any; + _serviceBrand: any; - private focusedTreeOrList: ITree | List; - private lists: IRegisteredList[]; + private lists: IRegisteredList[] = []; + private _lastFocusedWidget: ListWidget | undefined = undefined; - private listFocusContext: IContextKey; - - private focusChangeScheduler: RunOnceScheduler; - - constructor( - @IContextKeyService contextKeyService: IContextKeyService - ) { - this.listFocusContext = ListFocusContext.bindTo(contextKeyService); - this.lists = []; - this.focusChangeScheduler = new RunOnceScheduler(() => this.onFocusChange(), 50 /* delay until the focus/blur dust settles */); + get lastFocusedList(): ListWidget | undefined { + return this._lastFocusedWidget; } - public register(tree: ITree, extraContextKeys?: (IContextKey)[]): IDisposable; - public register(list: List, extraContextKeys?: (IContextKey)[]): IDisposable; - public register(widget: ITree | List, extraContextKeys?: (IContextKey)[]): IDisposable { - if (this.indexOf(widget) >= 0) { + constructor( @IContextKeyService contextKeyService: IContextKeyService) { } + + register(widget: ListWidget, extraContextKeys?: (IContextKey)[]): IDisposable { + if (this.lists.some(l => l.widget === widget)) { throw new Error('Cannot register the same widget multiple times'); } @@ -72,83 +60,115 @@ export class ListService implements IListService { // Check for currently being focused if (widget.isDOMFocused()) { - this.setFocusedList(registeredList); + this._lastFocusedWidget = widget; } - const toDispose = [ - widget.onDidFocus(() => this.focusChangeScheduler.schedule()), - widget.onDidBlur(() => this.focusChangeScheduler.schedule()) - ]; + const result = combinedDisposable([ + widget.onDidFocus(() => this._lastFocusedWidget = widget), + toDisposable(() => this.lists.splice(this.lists.indexOf(registeredList), 1)) + ]); - // Special treatment for tree highlight mode - if (!(widget instanceof List)) { - const tree = widget; + return result; + } +} - toDispose.push(tree.onDidChangeHighlight(() => { - this.focusChangeScheduler.schedule(); - })); - } +const RawWorkbenchListFocusContextKey = new RawContextKey('listFocus', true); +export const WorkbenchListFocusContextKey = ContextKeyExpr.and(RawWorkbenchListFocusContextKey, ContextKeyExpr.not(InputFocusedContextKey)); - // Remove list once disposed - toDispose.push({ - dispose: () => { this.lists.splice(this.lists.indexOf(registeredList), 1); } - }); +export type Widget = List | PagedList | ITree; - return { - dispose: () => dispose(toDispose) - }; +function createScopedContextKeyService(contextKeyService: IContextKeyService, widget: Widget): IContextKeyService { + const result = contextKeyService.createScoped(widget.getHTMLElement()); + RawWorkbenchListFocusContextKey.bindTo(result); + return result; +} + +export class WorkbenchList extends List { + + readonly contextKeyService: IContextKeyService; + private disposable: IDisposable; + + constructor( + container: HTMLElement, + delegate: IDelegate, + renderers: IRenderer[], + options: IListOptions, + @IContextKeyService contextKeyService: IContextKeyService, + @IListService listService: IListService, + @IThemeService themeService: IThemeService + ) { + super(container, delegate, renderers, options); + this.contextKeyService = createScopedContextKeyService(contextKeyService, this); + + this.disposable = combinedDisposable([ + this.contextKeyService, + (listService as ListService).register(this), + attachListStyler(this, themeService) + ]); } - private indexOf(widget: ITree | List): number { - for (let i = 0; i < this.lists.length; i++) { - const list = this.lists[i]; - if (list.widget === widget) { - return i; - } - } + dispose(): void { + this.disposable.dispose(); + } +} - return -1; +export class WorkbenchPagedList extends PagedList { + + readonly contextKeyService: IContextKeyService; + private disposable: IDisposable; + + constructor( + container: HTMLElement, + delegate: IDelegate, + renderers: IPagedRenderer[], + options: IListOptions, + @IContextKeyService contextKeyService: IContextKeyService, + @IListService listService: IListService, + @IThemeService themeService: IThemeService + ) { + super(container, delegate, renderers, options); + this.contextKeyService = createScopedContextKeyService(contextKeyService, this); + + this.disposable = combinedDisposable([ + this.contextKeyService, + (listService as ListService).register(this), + attachListStyler(this, themeService) + ]); } - private onFocusChange(): void { - let focusedList: IRegisteredList; - for (let i = 0; i < this.lists.length; i++) { - const list = this.lists[i]; - if (document.activeElement === list.widget.getHTMLElement()) { - focusedList = list; - break; - } - } + dispose(): void { + this.disposable.dispose(); + } +} - this.setFocusedList(focusedList); +export class WorkbenchTree extends Tree { + + private _onFocusChange = new Emitter(); + readonly onFocusChange: Event = this._onFocusChange.event; + + readonly contextKeyService: IContextKeyService; + private disposables: IDisposable[] = []; + + constructor( + container: HTMLElement, + configuration: ITreeConfiguration, + options: ITreeOptions, + @IContextKeyService contextKeyService: IContextKeyService, + @IListService listService: IListService, + @IThemeService themeService: IThemeService + ) { + super(container, configuration, options); + + this.contextKeyService = createScopedContextKeyService(contextKeyService, this); + + this.disposables.push( + this.contextKeyService, + (listService as ListService).register(this), + attachListStyler(this, themeService) + ); } - private setFocusedList(focusedList?: IRegisteredList): void { - - // First update our context - if (focusedList) { - this.focusedTreeOrList = focusedList.widget; - this.listFocusContext.set(true); - } else { - this.focusedTreeOrList = void 0; - this.listFocusContext.set(false); - } - - // Then check for extra contexts to unset - for (let i = 0; i < this.lists.length; i++) { - const list = this.lists[i]; - if (list !== focusedList && list.extraContextKeys) { - list.extraContextKeys.forEach(key => key.set(false)); - } - } - - // Finally set context for focused list if there are any - if (focusedList && focusedList.extraContextKeys) { - focusedList.extraContextKeys.forEach(key => key.set(true)); - } + dispose(): void { + this.disposables = dispose(this.disposables); } - - public getFocused(): ITree | List { - return this.focusedTreeOrList; - } -} \ No newline at end of file +} diff --git a/src/vs/platform/log/common/log.ts b/src/vs/platform/log/common/log.ts index 6860e33cf4e..95bd211f019 100644 --- a/src/vs/platform/log/common/log.ts +++ b/src/vs/platform/log/common/log.ts @@ -5,37 +5,246 @@ 'use strict'; -import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { createDecorator as createServiceDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { IDisposable } from 'vs/base/common/lifecycle'; +import { isWindows } from 'vs/base/common/platform'; -export const ILogService = createDecorator('logService'); +export const ILogService = createServiceDecorator('logService'); -export interface ILogService { - _serviceBrand: any; - - log(...args: any[]): void; - warn(...args: any[]): void; - error(...args: any[]): void; +export enum LogLevel { + Trace, + Debug, + Info, + Warning, + Error, + Critical, + Off } -export class LogMainService implements ILogService { - +export interface ILogService extends IDisposable { _serviceBrand: any; - constructor( @IEnvironmentService private environmentService: IEnvironmentService) { + setLevel(level: LogLevel): void; + getLevel(): LogLevel; + trace(message: string, ...args: any[]): void; + debug(message: string, ...args: any[]): void; + info(message: string, ...args: any[]): void; + warn(message: string, ...args: any[]): void; + error(message: string | Error, ...args: any[]): void; + critical(message: string | Error, ...args: any[]): void; +} + +export class ConsoleLogMainService implements ILogService { + + _serviceBrand: any; + private level: LogLevel = LogLevel.Error; + private useColors: boolean; + + constructor( @IEnvironmentService environmentService: IEnvironmentService) { + this.setLevel(environmentService.logLevel); + this.useColors = !isWindows; } - public log(...args: any[]): void { - if (this.environmentService.verbose) { - console.log(`\x1b[90m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, ...args); + setLevel(level: LogLevel): void { + this.level = level; + } + + getLevel(): LogLevel { + return this.level; + } + + trace(message: string, ...args: any[]): void { + if (this.level <= LogLevel.Trace) { + if (this.useColors) { + console.log(`\x1b[90m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, message, ...args); + } else { + console.log(`[main ${new Date().toLocaleTimeString()}]`, message, ...args); + } } } - public error(...args: any[]): void { - console.error(`\x1b[91m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, ...args); + debug(message: string, ...args: any[]): void { + if (this.level <= LogLevel.Debug) { + if (this.useColors) { + console.log(`\x1b[90m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, message, ...args); + } else { + console.log(`[main ${new Date().toLocaleTimeString()}]`, message, ...args); + } + } } - public warn(...args: any[]): void { - console.warn(`\x1b[93m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, ...args); + info(message: string, ...args: any[]): void { + if (this.level <= LogLevel.Info) { + if (this.useColors) { + console.log(`\x1b[90m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, message, ...args); + } else { + console.log(`[main ${new Date().toLocaleTimeString()}]`, message, ...args); + } + } } -} \ No newline at end of file + + warn(message: string | Error, ...args: any[]): void { + if (this.level <= LogLevel.Warning) { + if (this.useColors) { + console.warn(`\x1b[93m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, message, ...args); + } else { + console.warn(`[main ${new Date().toLocaleTimeString()}]`, message, ...args); + } + } + } + + error(message: string, ...args: any[]): void { + if (this.level <= LogLevel.Error) { + if (this.useColors) { + console.error(`\x1b[91m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, message, ...args); + } else { + console.error(`[main ${new Date().toLocaleTimeString()}]`, message, ...args); + } + } + } + + critical(message: string, ...args: any[]): void { + if (this.level <= LogLevel.Critical) { + if (this.useColors) { + console.error(`\x1b[90m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, message, ...args); + } else { + console.error(`[main ${new Date().toLocaleTimeString()}]`, message, ...args); + } + } + } + + dispose(): void { + // noop + } +} + +export class ConsoleLogService implements ILogService { + + _serviceBrand: any; + private level: LogLevel = LogLevel.Error; + + constructor( @IEnvironmentService environmentService: IEnvironmentService) { + this.setLevel(environmentService.logLevel); + } + + setLevel(level: LogLevel): void { + this.level = level; + } + + getLevel(): LogLevel { + return this.level; + } + + trace(message: string, ...args: any[]): void { + if (this.level <= LogLevel.Trace) { + console.log('%cTRACE', 'color: #888', message, ...args); + } + } + + debug(message: string, ...args: any[]): void { + if (this.level <= LogLevel.Debug) { + console.log('%cDEBUG', 'background: #eee; color: #888', message, ...args); + } + } + + info(message: string, ...args: any[]): void { + if (this.level <= LogLevel.Info) { + console.log('%c INFO', 'color: #33f', message, ...args); + } + } + + warn(message: string | Error, ...args: any[]): void { + if (this.level <= LogLevel.Warning) { + console.log('%c WARN', 'color: #993', message, ...args); + } + } + + error(message: string, ...args: any[]): void { + if (this.level <= LogLevel.Error) { + console.log('%c ERR', 'color: #f33', message, ...args); + } + } + + critical(message: string, ...args: any[]): void { + if (this.level <= LogLevel.Critical) { + console.log('%cCRITI', 'background: #f33; color: white', message, ...args); + } + } + + dispose(): void { } +} + +export class MultiplexLogService implements ILogService { + _serviceBrand: any; + + constructor(private logServices: ILogService[]) { } + + setLevel(level: LogLevel): void { + for (const logService of this.logServices) { + logService.setLevel(level); + } + } + + getLevel(): LogLevel { + for (const logService of this.logServices) { + return logService.getLevel(); + } + return LogLevel.Info; + } + + trace(message: string, ...args: any[]): void { + for (const logService of this.logServices) { + logService.trace(message, ...args); + } + } + + debug(message: string, ...args: any[]): void { + for (const logService of this.logServices) { + logService.debug(message, ...args); + } + } + + info(message: string, ...args: any[]): void { + for (const logService of this.logServices) { + logService.info(message, ...args); + } + } + + warn(message: string, ...args: any[]): void { + for (const logService of this.logServices) { + logService.warn(message, ...args); + } + } + + error(message: string | Error, ...args: any[]): void { + for (const logService of this.logServices) { + logService.error(message, ...args); + } + } + + critical(message: string | Error, ...args: any[]): void { + for (const logService of this.logServices) { + logService.critical(message, ...args); + } + } + + dispose(): void { + for (const logService of this.logServices) { + logService.dispose(); + } + } +} + +export class NoopLogService implements ILogService { + _serviceBrand: any; + setLevel(level: LogLevel): void { } + getLevel(): LogLevel { return LogLevel.Info; } + trace(message: string, ...args: any[]): void { } + debug(message: string, ...args: any[]): void { } + info(message: string, ...args: any[]): void { } + warn(message: string, ...args: any[]): void { } + error(message: string | Error, ...args: any[]): void { } + critical(message: string | Error, ...args: any[]): void { } + dispose(): void { } +} diff --git a/src/vs/platform/log/node/spdlogService.ts b/src/vs/platform/log/node/spdlogService.ts new file mode 100644 index 00000000000..ffdd39e2d23 --- /dev/null +++ b/src/vs/platform/log/node/spdlogService.ts @@ -0,0 +1,111 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as path from 'path'; +import { ILogService, LogLevel, NoopLogService } from 'vs/platform/log/common/log'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { RotatingLogger, setAsyncMode } from 'spdlog'; + +export function createLogService(processName: string, environmentService: IEnvironmentService): ILogService { + try { + setAsyncMode(8192, 2000); + const logfilePath = path.join(environmentService.logsPath, `${processName}.log`); + const logger = new RotatingLogger(processName, logfilePath, 1024 * 1024 * 5, 6); + logger.setLevel(0); + + return new SpdLogService(logger, environmentService.logLevel); + } catch (e) { + console.error(e); + } + return new NoopLogService(); +} + +class SpdLogService implements ILogService { + + _serviceBrand: any; + + constructor( + private readonly logger: RotatingLogger, + private level: LogLevel = LogLevel.Error + ) { + } + + setLevel(logLevel: LogLevel): void { + this.level = logLevel; + } + + getLevel(): LogLevel { + return this.level; + } + + trace(): void { + if (this.level <= LogLevel.Trace) { + this.logger.trace(this.format(arguments)); + } + } + + debug(): void { + if (this.level <= LogLevel.Debug) { + this.logger.debug(this.format(arguments)); + } + } + + info(): void { + if (this.level <= LogLevel.Info) { + this.logger.info(this.format(arguments)); + } + } + + warn(): void { + if (this.level <= LogLevel.Warning) { + this.logger.warn(this.format(arguments)); + } + } + + error(): void { + if (this.level <= LogLevel.Error) { + const arg = arguments[0]; + + if (arg instanceof Error) { + const array = Array.prototype.slice.call(arguments) as any[]; + array[0] = arg.stack; + this.logger.error(this.format(array)); + } else { + this.logger.error(this.format(arguments)); + } + } + } + + critical(): void { + if (this.level <= LogLevel.Critical) { + this.logger.critical(this.format(arguments)); + } + } + + dispose(): void { + this.logger.flush(); + this.logger.drop(); + } + + private format(args: any): string { + let result = ''; + + for (let i = 0; i < args.length; i++) { + let a = args[i]; + + if (typeof a === 'object') { + try { + a = JSON.stringify(a); + } catch (e) { } + } + + result += (i > 0 ? ' ' : '') + a; + } + + return result; + } +} \ No newline at end of file diff --git a/src/vs/platform/markers/common/problemMatcher.ts b/src/vs/platform/markers/common/problemMatcher.ts index b518a234e3f..05b4f7bc294 100644 --- a/src/vs/platform/markers/common/problemMatcher.ts +++ b/src/vs/platform/markers/common/problemMatcher.ts @@ -1598,7 +1598,7 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { label: localize('eslint-compact', 'ESLint compact problems'), owner: 'eslint', applyTo: ApplyToKind.allDocuments, - fileLocation: FileLocationKind.Relative, + fileLocation: FileLocationKind.Absolute, filePrefix: '${workspaceFolder}', pattern: ProblemPatternRegistry.get('eslint-compact') }); diff --git a/src/vs/platform/message/common/message.ts b/src/vs/platform/message/common/message.ts index cfe7e448854..63ca9fe894b 100644 --- a/src/vs/platform/message/common/message.ts +++ b/src/vs/platform/message/common/message.ts @@ -62,12 +62,12 @@ export interface IMessageService { /** * Ask the user for confirmation. */ - confirmSync(confirmation: IConfirmation): boolean; + confirm(confirmation: IConfirmation): boolean; /** - * Ask the user for confirmation without blocking. + * Ask the user for confirmation with a checkbox. */ - confirm(confirmation: IConfirmation): TPromise; + confirmWithCheckbox(confirmation: IConfirmation): TPromise; } export const IChoiceService = createDecorator('choiceService'); diff --git a/src/vs/platform/node/product.ts b/src/vs/platform/node/product.ts index aec3cd8a91a..68802e24d9b 100644 --- a/src/vs/platform/node/product.ts +++ b/src/vs/platform/node/product.ts @@ -31,6 +31,7 @@ export interface IProductConfiguration { exeBasedExtensionTips: { [id: string]: any; }; extensionKeywords: { [extension: string]: string[]; }; extensionAllowedBadgeProviders: string[]; + extensionAllowedProposedApi: string[]; keymapExtensionTips: string[]; crashReporter: { companyName: string; diff --git a/src/vs/platform/progress/common/progress.ts b/src/vs/platform/progress/common/progress.ts index cd966c7e193..358d61cabb9 100644 --- a/src/vs/platform/progress/common/progress.ts +++ b/src/vs/platform/progress/common/progress.ts @@ -78,5 +78,5 @@ export interface IProgressService2 { _serviceBrand: any; - withProgress(options: IProgressOptions, task: (progress: IProgress) => TPromise): void; + withProgress(options: IProgressOptions, task: (progress: IProgress) => Thenable): void; } diff --git a/src/vs/platform/request/electron-browser/requestService.ts b/src/vs/platform/request/electron-browser/requestService.ts index da4457c08f1..513ab815132 100644 --- a/src/vs/platform/request/electron-browser/requestService.ts +++ b/src/vs/platform/request/electron-browser/requestService.ts @@ -61,6 +61,7 @@ export const xhrRequest: IRequestFunction = (options: IRequestOptions): TPromise stream: new ArrayBufferStream(xhr.response) }); }; + xhr.ontimeout = e => reject(new Error(`XHR timeout: ${options.timeout}ms`)); if (options.timeout) { xhr.timeout = options.timeout; diff --git a/src/vs/platform/state/common/state.ts b/src/vs/platform/state/common/state.ts new file mode 100644 index 00000000000..9166da30a45 --- /dev/null +++ b/src/vs/platform/state/common/state.ts @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; + +export const IStateService = createDecorator('stateService'); + +export interface IStateService { + _serviceBrand: any; + + getItem(key: string, defaultValue?: T): T; + setItem(key: string, data: any): void; + removeItem(key: string): void; +} \ No newline at end of file diff --git a/src/vs/platform/state/node/stateService.ts b/src/vs/platform/state/node/stateService.ts new file mode 100644 index 00000000000..6d49892b033 --- /dev/null +++ b/src/vs/platform/state/node/stateService.ts @@ -0,0 +1,110 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as path from 'path'; +import * as fs from 'original-fs'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { writeFileAndFlushSync } from 'vs/base/node/extfs'; +import { isUndefined, isUndefinedOrNull } from 'vs/base/common/types'; +import { IStateService } from 'vs/platform/state/common/state'; +import { ILogService } from 'vs/platform/log/common/log'; + +export class FileStorage { + + private database: object = null; + + constructor(private dbPath: string, private onError: (error) => void) { } + + private ensureLoaded(): void { + if (!this.database) { + this.database = this.loadSync(); + } + } + + public getItem(key: string, defaultValue?: T): T { + this.ensureLoaded(); + + const res = this.database[key]; + if (isUndefinedOrNull(res)) { + return defaultValue; + } + + return res; + } + + public setItem(key: string, data: any): void { + this.ensureLoaded(); + + // Remove an item when it is undefined or null + if (isUndefinedOrNull(data)) { + return this.removeItem(key); + } + + // Shortcut for primitives that did not change + if (typeof data === 'string' || typeof data === 'number' || typeof data === 'boolean') { + if (this.database[key] === data) { + return; + } + } + + this.database[key] = data; + this.saveSync(); + } + + public removeItem(key: string): void { + this.ensureLoaded(); + + // Only update if the key is actually present (not undefined) + if (!isUndefined(this.database[key])) { + this.database[key] = void 0; + this.saveSync(); + } + } + + private loadSync(): object { + try { + return JSON.parse(fs.readFileSync(this.dbPath).toString()); // invalid JSON or permission issue can happen here + } catch (error) { + if (error && error.code !== 'ENOENT') { + this.onError(error); + } + + return {}; + } + } + + private saveSync(): void { + try { + writeFileAndFlushSync(this.dbPath, JSON.stringify(this.database, null, 4)); // permission issue can happen here + } catch (error) { + this.onError(error); + } + } +} + +export class StateService implements IStateService { + + _serviceBrand: any; + + private fileStorage: FileStorage; + + constructor( @IEnvironmentService environmentService: IEnvironmentService, @ILogService logService: ILogService) { + this.fileStorage = new FileStorage(path.join(environmentService.userDataPath, 'storage.json'), error => logService.error(error)); + } + + public getItem(key: string, defaultValue?: T): T { + return this.fileStorage.getItem(key, defaultValue); + } + + public setItem(key: string, data: any): void { + this.fileStorage.setItem(key, data); + } + + public removeItem(key: string): void { + this.fileStorage.removeItem(key); + } +} diff --git a/src/vs/platform/state/test/node/state.test.ts b/src/vs/platform/state/test/node/state.test.ts new file mode 100644 index 00000000000..19776218d7d --- /dev/null +++ b/src/vs/platform/state/test/node/state.test.ts @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as assert from 'assert'; +import os = require('os'); +import path = require('path'); +import extfs = require('vs/base/node/extfs'); +import { getRandomTestPath } from 'vs/workbench/test/workbenchTestServices'; +import { writeFileAndFlushSync, mkdirp } from 'vs/base/node/extfs'; +import { FileStorage } from 'vs/platform/state/node/stateService'; + +suite('StateService', () => { + const parentDir = getRandomTestPath(os.tmpdir(), 'vsctests', 'stateservice'); + const storageFile = path.join(parentDir, 'storage.json'); + + teardown(done => { + extfs.del(parentDir, os.tmpdir(), done); + }); + + test('Basics', done => { + return mkdirp(parentDir).then(() => { + writeFileAndFlushSync(storageFile, ''); + + let service = new FileStorage(storageFile, () => null); + + service.setItem('some.key', 'some.value'); + assert.equal(service.getItem('some.key'), 'some.value'); + + service.removeItem('some.key'); + assert.equal(service.getItem('some.key', 'some.default'), 'some.default'); + + assert.ok(!service.getItem('some.unknonw.key')); + + service.setItem('some.other.key', 'some.other.value'); + + service = new FileStorage(storageFile, () => null); + + assert.equal(service.getItem('some.other.key'), 'some.other.value'); + + service.setItem('some.other.key', 'some.other.value'); + assert.equal(service.getItem('some.other.key'), 'some.other.value'); + + service.setItem('some.undefined.key', void 0); + assert.equal(service.getItem('some.undefined.key', 'some.default'), 'some.default'); + + service.setItem('some.null.key', null); + assert.equal(service.getItem('some.null.key', 'some.default'), 'some.default'); + + done(); + }); + }); +}); \ No newline at end of file diff --git a/src/vs/platform/storage/node/storage.ts b/src/vs/platform/storage/node/storage.ts deleted file mode 100644 index 438a7af5b8d..00000000000 --- a/src/vs/platform/storage/node/storage.ts +++ /dev/null @@ -1,94 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import * as path from 'path'; -import * as fs from 'original-fs'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; - -export const IStorageService = createDecorator('storageService'); - -export interface IStorageService { - _serviceBrand: any; - getItem(key: string, defaultValue?: T): T; - setItem(key: string, data: any): void; - removeItem(key: string): void; -} - -export class StorageService implements IStorageService { - - _serviceBrand: any; - - private dbPath: string; - private database: any = null; - - constructor( @IEnvironmentService private environmentService: IEnvironmentService) { - this.dbPath = path.join(environmentService.userDataPath, 'storage.json'); - } - - public getItem(key: string, defaultValue?: T): T { - if (!this.database) { - this.database = this.load(); - } - - const res = this.database[key]; - if (typeof res === 'undefined') { - return defaultValue; - } - - return this.database[key]; - } - - public setItem(key: string, data: any): void { - if (!this.database) { - this.database = this.load(); - } - - // Shortcut for primitives that did not change - if (typeof data === 'string' || typeof data === 'number' || typeof data === 'boolean') { - if (this.database[key] === data) { - return; - } - } - - this.database[key] = data; - this.save(); - } - - public removeItem(key: string): void { - if (!this.database) { - this.database = this.load(); - } - - if (this.database[key]) { - delete this.database[key]; - this.save(); - } - } - - private load(): any { - try { - return JSON.parse(fs.readFileSync(this.dbPath).toString()); // invalid JSON or permission issue can happen here - } catch (error) { - if (this.environmentService.verbose) { - console.error(error); - } - - return {}; - } - } - - private save(): void { - try { - fs.writeFileSync(this.dbPath, JSON.stringify(this.database, null, 4)); // permission issue can happen here - } catch (error) { - if (this.environmentService.verbose) { - console.error(error); - } - } - } -} diff --git a/src/vs/platform/telemetry/browser/idleMonitor.ts b/src/vs/platform/telemetry/browser/idleMonitor.ts deleted file mode 100644 index 8b76f60b9a4..00000000000 --- a/src/vs/platform/telemetry/browser/idleMonitor.ts +++ /dev/null @@ -1,78 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TimeoutTimer } from 'vs/base/common/async'; -import Event, { Emitter } from 'vs/base/common/event'; -import { Disposable } from 'vs/base/common/lifecycle'; -import * as dom from 'vs/base/browser/dom'; - -export enum UserStatus { - Idle, - Active -} - -export class IdleMonitor extends Disposable { - - private _lastActiveTime: number; - private _idleCheckTimeout: TimeoutTimer; - private _status: UserStatus; - private _idleTime: number; - - private _onStatusChange: Emitter; - get onStatusChange(): Event { return this._onStatusChange.event; } - - constructor(idleTime: number) { - super(); - - this._status = null; - this._idleCheckTimeout = this._register(new TimeoutTimer()); - this._lastActiveTime = -1; - this._idleTime = idleTime; - this._onStatusChange = new Emitter(); - - this._register(dom.addDisposableListener(document, 'mousemove', () => this._onUserActive())); - this._register(dom.addDisposableListener(document, 'keydown', () => this._onUserActive())); - this._onUserActive(); - } - - get status(): UserStatus { - return this._status; - } - - private _onUserActive(): void { - this._lastActiveTime = (new Date()).getTime(); - - if (this._status !== UserStatus.Active) { - this._status = UserStatus.Active; - this._scheduleIdleCheck(); - this._onStatusChange.fire(this._status); - } - } - - private _onUserIdle(): void { - if (this._status !== UserStatus.Idle) { - this._status = UserStatus.Idle; - this._onStatusChange.fire(this._status); - } - } - - private _scheduleIdleCheck(): void { - const minimumTimeWhenUserCanBecomeIdle = this._lastActiveTime + this._idleTime; - const timeout = minimumTimeWhenUserCanBecomeIdle - (new Date()).getTime(); - - this._idleCheckTimeout.setIfNotSet(() => this._checkIfUserIsIdle(), timeout); - } - - private _checkIfUserIsIdle(): void { - const actualIdleTime = (new Date()).getTime() - this._lastActiveTime; - - if (actualIdleTime >= this._idleTime) { - this._onUserIdle(); - } else { - this._scheduleIdleCheck(); - } - } -} diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 4f55ea15c23..41c3db8d63f 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -11,7 +11,6 @@ import paths = require('vs/base/common/paths'); import URI from 'vs/base/common/uri'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; import { IKeybindingService, KeybindingSource } from 'vs/platform/keybinding/common/keybinding'; -import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; import { ITelemetryService, ITelemetryInfo, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; export const NullTelemetryService = new class implements ITelemetryService { @@ -135,7 +134,6 @@ const configurationValueWhitelist = [ 'workbench.sideBar.location', 'window.openFilesInNewWindow', 'javascript.validate.enable', - 'window.reopenFolders', 'window.restoreWindows', 'extensions.autoUpdate', 'files.eol', @@ -184,17 +182,6 @@ export function configurationTelemetry(telemetryService: ITelemetryService, conf }); } -export function lifecycleTelemetry(telemetryService: ITelemetryService, lifecycleService: ILifecycleService): IDisposable { - return lifecycleService.onShutdown(event => { - /* __GDPR__ - "shutdown" : { - "reason" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - telemetryService.publicLog('shutdown', { reason: ShutdownReason[event] }); - }); -} - export function keybindingsTelemetry(telemetryService: ITelemetryService, keybindingService: IKeybindingService): IDisposable { return keybindingService.onDidUpdateKeybindings(event => { if (event.source === KeybindingSource.User && event.keybindings) { diff --git a/src/vs/platform/telemetry/node/commonProperties.ts b/src/vs/platform/telemetry/node/commonProperties.ts index 3ee844f84e3..0d232325091 100644 --- a/src/vs/platform/telemetry/node/commonProperties.ts +++ b/src/vs/platform/telemetry/node/commonProperties.ts @@ -7,13 +7,12 @@ import * as Platform from 'vs/base/common/platform'; import * as os from 'os'; import { TPromise } from 'vs/base/common/winjs.base'; import * as uuid from 'vs/base/common/uuid'; +import { readFile } from 'vs/base/node/pfs'; -export const machineIdStorageKey = 'telemetry.machineId'; -export const machineIdIpcChannel = 'vscode:machineId'; - -export function resolveCommonProperties(commit: string, version: string, source: string): TPromise<{ [name: string]: string; }> { +export function resolveCommonProperties(commit: string, version: string, machineId: string, installSourcePath: string): TPromise<{ [name: string]: string; }> { const result: { [name: string]: string; } = Object.create(null); - + // __GDPR__COMMON__ "common.machineId" : { "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } + result['common.machineId'] = machineId; // __GDPR__COMMON__ "sessionID" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['sessionID'] = uuid.generateUuid() + Date.now(); // __GDPR__COMMON__ "commitHash" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } @@ -28,8 +27,6 @@ export function resolveCommonProperties(commit: string, version: string, source: result['common.nodePlatform'] = process.platform; // __GDPR__COMMON__ "common.nodeArch" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['common.nodeArch'] = process.arch; - // __GDPR__COMMON__ "common.source" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - result['common.source'] = source; // dynamic properties which value differs on each call let seq = 0; @@ -52,5 +49,13 @@ export function resolveCommonProperties(commit: string, version: string, source: } }); - return TPromise.as(result); + return readFile(installSourcePath, 'utf8').then(contents => { + + // __GDPR__COMMON__ "common.source" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['common.source'] = contents.slice(0, 30); + + return result; + }, error => { + return result; + }); } \ No newline at end of file diff --git a/src/vs/platform/telemetry/node/workbenchCommonProperties.ts b/src/vs/platform/telemetry/node/workbenchCommonProperties.ts index 00dbb1346af..41a7901dffb 100644 --- a/src/vs/platform/telemetry/node/workbenchCommonProperties.ts +++ b/src/vs/platform/telemetry/node/workbenchCommonProperties.ts @@ -7,12 +7,10 @@ import * as os from 'os'; import { TPromise } from 'vs/base/common/winjs.base'; import * as uuid from 'vs/base/common/uuid'; import { IStorageService } from 'vs/platform/storage/common/storage'; -import { getMachineId } from 'vs/base/node/id'; -import { resolveCommonProperties, machineIdStorageKey } from '../node/commonProperties'; +import { resolveCommonProperties } from '../node/commonProperties'; - -export function resolveWorkbenchCommonProperties(storageService: IStorageService, commit: string, version: string, source: string): TPromise<{ [name: string]: string }> { - return resolveCommonProperties(commit, version, source).then(result => { +export function resolveWorkbenchCommonProperties(storageService: IStorageService, commit: string, version: string, machineId: string, installSourcePath: string): TPromise<{ [name: string]: string }> { + return resolveCommonProperties(commit, version, machineId, installSourcePath).then(result => { // __GDPR__COMMON__ "common.version.shell" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['common.version.shell'] = process.versions && (process).versions['electron']; // __GDPR__COMMON__ "common.version.renderer" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } @@ -31,32 +29,16 @@ export function resolveWorkbenchCommonProperties(storageService: IStorageService result['common.lastSessionDate'] = lastSessionDate; // __GDPR__COMMON__ "common.isNewSession" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['common.isNewSession'] = !lastSessionDate ? '1' : '0'; - - const promises: TPromise[] = []; // __GDPR__COMMON__ "common.instanceId" : { "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } - promises.push(getOrCreateInstanceId(storageService).then(value => result['common.instanceId'] = value)); - // __GDPR__COMMON__ "common.machineId" : { "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } - promises.push(getOrCreateMachineId(storageService).then(value => result['common.machineId'] = value)); + result['common.instanceId'] = getOrCreateInstanceId(storageService); - return TPromise.join(promises).then(() => result); - }); -} - -function getOrCreateInstanceId(storageService: IStorageService): TPromise { - let result = storageService.get('telemetry.instanceId') || uuid.generateUuid(); - storageService.store('telemetry.instanceId', result); - return TPromise.as(result); -} - -export function getOrCreateMachineId(storageService: IStorageService): TPromise { - let result = storageService.get(machineIdStorageKey); - - if (result) { - return TPromise.as(result); - } - - return getMachineId().then(result => { - storageService.store(machineIdStorageKey, result); return result; }); } + +function getOrCreateInstanceId(storageService: IStorageService): string { + const result = storageService.get('telemetry.instanceId') || uuid.generateUuid(); + storageService.store('telemetry.instanceId', result); + + return result; +} \ No newline at end of file diff --git a/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts b/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts index ff36faa14f5..725718f20bc 100644 --- a/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts @@ -5,49 +5,67 @@ 'use strict'; import * as assert from 'assert'; +import * as path from 'path'; +import * as os from 'os'; +import * as fs from 'fs'; import { TPromise } from 'vs/base/common/winjs.base'; import { resolveWorkbenchCommonProperties } from 'vs/platform/telemetry/node/workbenchCommonProperties'; import { StorageService, InMemoryLocalStorage } from 'vs/platform/storage/common/storageService'; import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; +import { getRandomTestPath } from 'vs/workbench/test/workbenchTestServices'; +import { del } from 'vs/base/node/extfs'; +import { mkdirp } from 'vs/base/node/pfs'; suite('Telemetry - common properties', function () { + const parentDir = getRandomTestPath(os.tmpdir(), 'vsctests', 'telemetryservice'); + const installSource = path.join(parentDir, 'installSource'); const commit: string = void 0; const version: string = void 0; - const source: string = void 0; let storageService: StorageService; setup(() => { storageService = new StorageService(new InMemoryLocalStorage(), null, TestWorkspace.id); }); + teardown(done => { + del(parentDir, os.tmpdir(), done); + }); + test('default', function () { + return mkdirp(parentDir).then(() => { + fs.writeFileSync(installSource, 'my.install.source'); - return resolveWorkbenchCommonProperties(storageService, commit, version, source).then(props => { + return resolveWorkbenchCommonProperties(storageService, commit, version, 'someMachineId', installSource).then(props => { + assert.ok('commitHash' in props); + assert.ok('sessionID' in props); + assert.ok('timestamp' in props); + assert.ok('common.platform' in props); + assert.ok('common.nodePlatform' in props); + assert.ok('common.nodeArch' in props); + assert.ok('common.timesincesessionstart' in props); + assert.ok('common.sequence' in props); - assert.ok('commitHash' in props); - assert.ok('sessionID' in props); - assert.ok('timestamp' in props); - assert.ok('common.platform' in props); - assert.ok('common.nodePlatform' in props); - assert.ok('common.nodeArch' in props); - assert.ok('common.timesincesessionstart' in props); - assert.ok('common.sequence' in props); + // assert.ok('common.version.shell' in first.data); // only when running on electron + // assert.ok('common.version.renderer' in first.data); + assert.ok('common.osVersion' in props, 'osVersion'); + assert.ok('version' in props); + assert.equal(props['common.source'], 'my.install.source'); - // assert.ok('common.version.shell' in first.data); // only when running on electron - // assert.ok('common.version.renderer' in first.data); - assert.ok('common.osVersion' in props, 'osVersion'); - assert.ok('version' in props); - assert.ok('common.source' in props); + assert.ok('common.firstSessionDate' in props, 'firstSessionDate'); + assert.ok('common.lastSessionDate' in props, 'lastSessionDate'); // conditional, see below, 'lastSessionDate'ow + assert.ok('common.isNewSession' in props, 'isNewSession'); - assert.ok('common.firstSessionDate' in props, 'firstSessionDate'); - assert.ok('common.lastSessionDate' in props, 'lastSessionDate'); // conditional, see below, 'lastSessionDate'ow - assert.ok('common.isNewSession' in props, 'isNewSession'); + // machine id et al + assert.ok('common.instanceId' in props, 'instanceId'); + assert.ok('common.machineId' in props, 'machineId'); - // machine id et al - assert.ok('common.instanceId' in props, 'instanceId'); - assert.ok('common.machineId' in props, 'machineId'); + fs.unlinkSync(installSource); + return resolveWorkbenchCommonProperties(storageService, commit, version, 'someMachineId', installSource).then(props => { + assert.ok(!('common.source' in props)); + }); + }); }); }); @@ -55,7 +73,7 @@ suite('Telemetry - common properties', function () { storageService.store('telemetry.lastSessionDate', new Date().toUTCString()); - return resolveWorkbenchCommonProperties(storageService, commit, version, source).then(props => { + return resolveWorkbenchCommonProperties(storageService, commit, version, 'someMachineId', installSource).then(props => { assert.ok('common.lastSessionDate' in props); // conditional, see below assert.ok('common.isNewSession' in props); @@ -64,7 +82,7 @@ suite('Telemetry - common properties', function () { }); test('values chance on ask', function () { - return resolveWorkbenchCommonProperties(storageService, commit, version, source).then(props => { + return resolveWorkbenchCommonProperties(storageService, commit, version, 'someMachineId', installSource).then(props => { let value1 = props['common.sequence']; let value2 = props['common.sequence']; assert.ok(value1 !== value2, 'seq'); diff --git a/src/vs/platform/update/electron-main/updateService.ts b/src/vs/platform/update/electron-main/updateService.ts index 907364dbd20..b7f8f5edf69 100644 --- a/src/vs/platform/update/electron-main/updateService.ts +++ b/src/vs/platform/update/electron-main/updateService.ts @@ -22,6 +22,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IUpdateService, State, IAutoUpdater, IUpdate, IRawUpdate } from 'vs/platform/update/common/update'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { ILogService } from 'vs/platform/log/common/log'; export class UpdateService implements IUpdateService { @@ -88,7 +89,8 @@ export class UpdateService implements IUpdateService { @ILifecycleService private lifecycleService: ILifecycleService, @IConfigurationService private configurationService: IConfigurationService, @ITelemetryService private telemetryService: ITelemetryService, - @IEnvironmentService private environmentService: IEnvironmentService + @IEnvironmentService private environmentService: IEnvironmentService, + @ILogService private logService: ILogService ) { if (process.platform === 'win32') { this.raw = new Win32AutoUpdaterImpl(requestService); @@ -121,7 +123,7 @@ export class UpdateService implements IUpdateService { // Start checking for updates after 30 seconds this.scheduleCheckForUpdates(30 * 1000) - .done(null, err => console.error(err)); + .done(null, err => this.logService.error(err)); } private scheduleCheckForUpdates(delay = 60 * 60 * 1000): TPromise { @@ -268,7 +270,10 @@ export class UpdateService implements IUpdateService { return TPromise.as(null); } + this.logService.trace('update#quitAndInstall(): before lifecycle quit()'); + this.lifecycleService.quit(true /* from update */).done(vetod => { + this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${vetod}`); if (vetod) { return; } @@ -277,9 +282,11 @@ export class UpdateService implements IUpdateService { // we workaround this issue by forcing an explicit flush of the storage data. // see also https://github.com/Microsoft/vscode/issues/172 if (process.platform === 'darwin') { + this.logService.trace('update#quitAndInstall(): calling flushStorageData()'); electron.session.defaultSession.flushStorageData(); } + this.logService.trace('update#quitAndInstall(): running raw#quitAndInstall()'); this.raw.quitAndInstall(); }); diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index e34f14bfb87..b221607ef39 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -191,10 +191,10 @@ export interface IWindowService { setDocumentEdited(flag: boolean): TPromise; onWindowTitleDoubleClick(): TPromise; show(): TPromise; - showMessageBoxSync(options: MessageBoxOptions): number; - showMessageBox(options: MessageBoxOptions): TPromise; - showSaveDialog(options: SaveDialogOptions, callback?: (fileName: string) => void): string; - showOpenDialog(options: OpenDialogOptions, callback?: (fileNames: string[]) => void): string[]; + showMessageBox(options: MessageBoxOptions): number; + showSaveDialog(options: SaveDialogOptions): string; + showOpenDialog(options: OpenDialogOptions): string[]; + showMessageBoxWithCheckbox(options: MessageBoxOptions): TPromise; } export type MenuBarVisibility = 'default' | 'visible' | 'toggle' | 'hidden'; @@ -207,7 +207,6 @@ export interface IWindowSettings { openFilesInNewWindow: 'on' | 'off' | 'default'; openFoldersInNewWindow: 'on' | 'off' | 'default'; restoreWindows: 'all' | 'folders' | 'one' | 'none'; - reopenFolders: 'all' | 'one' | 'none'; // TODO@Ben deprecated restoreFullscreen: boolean; zoomLevel: number; titleBarStyle: 'native' | 'custom'; @@ -292,6 +291,9 @@ export interface IAddFoldersRequest { } export interface IWindowConfiguration extends ParsedArgs, IOpenFileRequest { + machineId: string; + windowId: number; + appRoot: string; execPath: string; isInitialStartup?: boolean; diff --git a/src/vs/platform/windows/electron-browser/windowService.ts b/src/vs/platform/windows/electron-browser/windowService.ts index 5656370d8da..3e8a9ee4555 100644 --- a/src/vs/platform/windows/electron-browser/windowService.ts +++ b/src/vs/platform/windows/electron-browser/windowService.ts @@ -123,11 +123,11 @@ export class WindowService implements IWindowService { return this.windowsService.showWindow(this.windowId); } - showMessageBoxSync(options: Electron.MessageBoxOptions): number { + showMessageBox(options: Electron.MessageBoxOptions): number { return remote.dialog.showMessageBox(remote.getCurrentWindow(), options); } - showMessageBox(options: Electron.MessageBoxOptions): TPromise { + showMessageBoxWithCheckbox(options: Electron.MessageBoxOptions): TPromise { return new TPromise((c, e) => { return remote.dialog.showMessageBox(remote.getCurrentWindow(), options, (response: number, checkboxChecked: boolean) => { c({ button: response, checkboxChecked }); @@ -135,7 +135,7 @@ export class WindowService implements IWindowService { }); } - showSaveDialog(options: Electron.SaveDialogOptions, callback?: (fileName: string) => void): string { + showSaveDialog(options: Electron.SaveDialogOptions): string { function normalizePath(path: string): string { if (path && isMacintosh) { @@ -145,14 +145,10 @@ export class WindowService implements IWindowService { return path; } - if (callback) { - return remote.dialog.showSaveDialog(remote.getCurrentWindow(), options, path => callback(normalizePath(path))); - } - return normalizePath(remote.dialog.showSaveDialog(remote.getCurrentWindow(), options)); // https://github.com/electron/electron/issues/4936 } - showOpenDialog(options: Electron.OpenDialogOptions, callback?: (fileNames: string[]) => void): string[] { + showOpenDialog(options: Electron.OpenDialogOptions): string[] { function normalizePaths(paths: string[]): string[] { if (paths && paths.length > 0 && isMacintosh) { @@ -162,10 +158,6 @@ export class WindowService implements IWindowService { return paths; } - if (callback) { - return remote.dialog.showOpenDialog(remote.getCurrentWindow(), options, paths => callback(normalizePaths(paths))); - } - return normalizePaths(remote.dialog.showOpenDialog(remote.getCurrentWindow(), options)); // https://github.com/electron/electron/issues/4936 } diff --git a/src/vs/platform/workbench/common/contextkeys.ts b/src/vs/platform/workbench/common/contextkeys.ts new file mode 100644 index 00000000000..c4a740d8c28 --- /dev/null +++ b/src/vs/platform/workbench/common/contextkeys.ts @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; + +export const InputFocusedContextKey = 'inputFocus'; +export const InputFocusedContext = new RawContextKey(InputFocusedContextKey, false); \ No newline at end of file diff --git a/src/vs/platform/workspaces/common/workspacesIpc.ts b/src/vs/platform/workspaces/common/workspacesIpc.ts index 981405a1190..91257d6d12e 100644 --- a/src/vs/platform/workspaces/common/workspacesIpc.ts +++ b/src/vs/platform/workspaces/common/workspacesIpc.ts @@ -7,7 +7,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IChannel } from 'vs/base/parts/ipc/common/ipc'; -import { IWorkspacesService, IWorkspaceIdentifier, IWorkspaceFolderCreationData } from 'vs/platform/workspaces/common/workspaces'; +import { IWorkspacesService, IWorkspaceIdentifier, IWorkspaceFolderCreationData, IWorkspacesMainService } from 'vs/platform/workspaces/common/workspaces'; import URI from 'vs/base/common/uri'; export interface IWorkspacesChannel extends IChannel { @@ -17,7 +17,7 @@ export interface IWorkspacesChannel extends IChannel { export class WorkspacesChannel implements IWorkspacesChannel { - constructor(private service: IWorkspacesService) { } + constructor(private service: IWorkspacesMainService) { } public call(command: string, arg?: any): TPromise { switch (command) { diff --git a/src/vs/platform/workspaces/electron-main/workspacesMainService.ts b/src/vs/platform/workspaces/electron-main/workspacesMainService.ts index 1c59a4d0412..f06b9ccc058 100644 --- a/src/vs/platform/workspaces/electron-main/workspacesMainService.ts +++ b/src/vs/platform/workspaces/electron-main/workspacesMainService.ts @@ -11,9 +11,9 @@ import { isParent } from 'vs/platform/files/common/files'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { extname, join, dirname, isAbsolute, resolve } from 'path'; import { mkdirp, writeFile, readFile } from 'vs/base/node/pfs'; -import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'fs'; +import { readFileSync, existsSync, mkdirSync } from 'fs'; import { isLinux, isMacintosh } from 'vs/base/common/platform'; -import { delSync, readdirSync } from 'vs/base/node/extfs'; +import { delSync, readdirSync, writeFileAndFlushSync } from 'vs/base/node/extfs'; import Event, { Emitter } from 'vs/base/common/event'; import { ILogService } from 'vs/platform/log/common/log'; import { isEqual } from 'vs/base/common/paths'; @@ -86,7 +86,7 @@ export class WorkspacesMainService implements IWorkspacesMainService { folders: toWorkspaceFolders(workspace.folders, URI.file(dirname(path))) }; } catch (error) { - this.logService.log(error.toString()); + this.logService.warn(error.toString()); } return null; @@ -136,7 +136,7 @@ export class WorkspacesMainService implements IWorkspacesMainService { mkdirSync(configParent); - writeFileSync(workspace.configPath, JSON.stringify(storedWorkspace, null, '\t')); + writeFileAndFlushSync(workspace.configPath, JSON.stringify(storedWorkspace, null, '\t')); return workspace; } @@ -262,7 +262,7 @@ export class WorkspacesMainService implements IWorkspacesMainService { try { delSync(dirname(configPath)); } catch (error) { - this.logService.log(`Unable to delete untitled workspace ${configPath} (${error}).`); + this.logService.warn(`Unable to delete untitled workspace ${configPath} (${error}).`); } } @@ -271,7 +271,9 @@ export class WorkspacesMainService implements IWorkspacesMainService { try { untitledWorkspacePaths = readdirSync(this.workspacesHome).map(folder => join(this.workspacesHome, folder, UNTITLED_WORKSPACE_NAME)); } catch (error) { - this.logService.log(`Unable to read folders in ${this.workspacesHome} (${error}).`); + if (error && error.code !== 'ENOENT') { + this.logService.warn(`Unable to read folders in ${this.workspacesHome} (${error}).`); + } } const untitledWorkspaces: IWorkspaceIdentifier[] = coalesce(untitledWorkspacePaths.map(untitledWorkspacePath => { diff --git a/src/vs/platform/workspaces/test/electron-main/workspacesMainService.test.ts b/src/vs/platform/workspaces/test/electron-main/workspacesMainService.test.ts index f112ef8f9eb..7031cb06470 100644 --- a/src/vs/platform/workspaces/test/electron-main/workspacesMainService.test.ts +++ b/src/vs/platform/workspaces/test/electron-main/workspacesMainService.test.ts @@ -15,7 +15,7 @@ import { EnvironmentService } from 'vs/platform/environment/node/environmentServ import { parseArgs } from 'vs/platform/environment/node/argv'; import { WorkspacesMainService, IStoredWorkspace } from 'vs/platform/workspaces/electron-main/workspacesMainService'; import { WORKSPACE_EXTENSION, IWorkspaceSavedEvent, IWorkspaceIdentifier, IRawFileWorkspaceFolder, IWorkspaceFolderCreationData, IRawUriWorkspaceFolder } from 'vs/platform/workspaces/common/workspaces'; -import { LogMainService } from 'vs/platform/log/common/log'; +import { ConsoleLogMainService } from 'vs/platform/log/common/log'; import URI from 'vs/base/common/uri'; import { getRandomTestPath } from 'vs/workbench/test/workbenchTestServices'; @@ -48,7 +48,7 @@ suite('WorkspacesMainService', () => { } const environmentService = new TestEnvironmentService(parseArgs(process.argv), process.execPath); - const logService = new LogMainService(environmentService); + const logService = new ConsoleLogMainService(environmentService); let service: TestWorkspacesMainService; diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index d95b2c764ca..b02773f70b9 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -1714,13 +1714,13 @@ declare module 'vscode' { /** * A file glob pattern to match file paths against. This can either be a glob pattern string - * (like `**\*.{ts,js}` or `*.{ts,js}`) or a [relative pattern](#RelativePattern). + * (like `**​/*.{ts,js}` or `*.{ts,js}`) or a [relative pattern](#RelativePattern). * * Glob patterns can have the following syntax: * * `*` to match one or more characters in a path segment * * `?` to match on one character in a path segment * * `**` to match any number of path segments, including none - * * `{}` to group conditions (e.g. `**\*.{ts,js}` matches all TypeScript and JavaScript files) + * * `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files) * * `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) * * `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) */ @@ -1732,7 +1732,7 @@ declare module 'vscode' { * its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName). * * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }` - * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**\package.json' }` + * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**​/package.json' }` */ export interface DocumentFilter { @@ -1758,7 +1758,7 @@ declare module 'vscode' { * and [language filters](#DocumentFilter). * * @sample `let sel:DocumentSelector = 'typescript'`; - * @sample `let sel:DocumentSelector = ['typescript', { language: 'json', pattern: '**\tsconfig.json' }]`; + * @sample `let sel:DocumentSelector = ['typescript', { language: 'json', pattern: '**​/tsconfig.json' }]`; */ export type DocumentSelector = string | DocumentFilter | (string | DocumentFilter)[]; @@ -3452,7 +3452,7 @@ declare module 'vscode' { uri: Uri; /** - * The document range of this locations. + * The document range of this location. */ range: Range; @@ -4496,7 +4496,7 @@ declare module 'vscode' { * has changed. *Note* that the event also fires when the active editor changes * to `undefined`. */ - export const onDidChangeActiveTextEditor: Event; + export const onDidChangeActiveTextEditor: Event; /** * An [event](#Event) which fires when the array of [visible editors](#window.visibleTextEditors) @@ -5260,7 +5260,7 @@ declare module 'vscode' { /** * Find files across all [workspace folders](#workspace.workspaceFolders) in the workspace. * - * @sample `findFiles('**\*.js', '**\node_modules\**', 10)` + * @sample `findFiles('**​/*.js', '**​/node_modules/**', 10)` * @param include A [glob pattern](#GlobPattern) that defines the files to search for. The glob pattern * will be matched against the file paths of resulting matches relative to their workspace. Use a [relative pattern](#RelativePattern) * to restrict the search results to a [workspace folder](#WorkspaceFolder). diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 0f2291ac19e..566fc38c017 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -86,9 +86,9 @@ declare module 'vscode' { // todo@joh discover files etc export interface FileSystemProvider { - onDidChange?: Event; + readonly onDidChange?: Event; - root: Uri; + readonly root: Uri; // more... // @@ -247,4 +247,83 @@ declare module 'vscode' { */ provideCodeActions2?(document: TextDocument, range: Range, context: CodeActionContext, token: CancellationToken): ProviderResult<(Command | CodeAction)[]>; } + + export namespace debug { + + /** + * List of breakpoints. + * + * @readonly + */ + export let breakpoints: Breakpoint[]; + + /** + * An event that is emitted when a breakpoint is added, removed, or changed. + */ + export const onDidChangeBreakpoints: Event; + } + + /** + * An event describing a change to the set of [breakpoints](#debug.Breakpoint). + */ + export interface BreakpointsChangeEvent { + /** + * Added breakpoints. + */ + readonly added: Breakpoint[]; + + /** + * Removed breakpoints. + */ + readonly removed: Breakpoint[]; + + /** + * Changed breakpoints. + */ + readonly changed: Breakpoint[]; + } + + /** + * The base class of all breakpoint types. + */ + export class Breakpoint { + /** + * Is breakpoint enabled. + */ + readonly enabled: boolean; + /** + * An optional expression for conditional breakpoints. + */ + readonly condition?: string; + /** + * An optional expression that controls how many hits of the breakpoint are ignored. + */ + readonly hitCondition?: string; + + protected constructor(enabled: boolean, condition: string, hitCondition: string); + } + + /** + * A breakpoint specified by a source location. + */ + export class SourceBreakpoint extends Breakpoint { + /** + * The source and line position of this breakpoint. + */ + readonly location: Location; + + private constructor(enabled: boolean, condition: string, hitCondition: string, location: Location); + } + + /** + * A breakpoint specified by a function name. + */ + export class FunctionBreakpoint extends Breakpoint { + /** + * The name of the function to which this breakpoint is attached. + */ + readonly functionName: string; + + private constructor(enabled: boolean, condition: string, hitCondition: string, functionName: string); + } } diff --git a/src/vs/workbench/api/electron-browser/mainThreadCommands.ts b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts index f0a84773a51..2b21782e38c 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadCommands.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts @@ -33,7 +33,7 @@ export class MainThreadCommands implements MainThreadCommandsShape { this._generateCommandsDocumentationRegistration.dispose(); } - private _generateCommandsDocumentation(): TPromise { + private _generateCommandsDocumentation(): Thenable { return this._proxy.$getContributedCommandHandlerDescriptions().then(result => { // add local commands const commands = CommandsRegistry.getCommands(); diff --git a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts index 3556feea70b..28026490146 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts @@ -6,10 +6,10 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import uri from 'vs/base/common/uri'; -import { IDebugService, IConfig, IDebugConfigurationProvider } from 'vs/workbench/parts/debug/common/debug'; +import { IDebugService, IConfig, IDebugConfigurationProvider, IBreakpoint, IFunctionBreakpoint } from 'vs/workbench/parts/debug/common/debug'; import { TPromise } from 'vs/base/common/winjs.base'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { ExtHostContext, ExtHostDebugServiceShape, MainThreadDebugServiceShape, DebugSessionUUID, MainContext, IExtHostContext } from '../node/extHost.protocol'; +import { ExtHostContext, ExtHostDebugServiceShape, MainThreadDebugServiceShape, DebugSessionUUID, MainContext, IExtHostContext, IBreakpointsDelta, ISourceBreakpointData, IFunctionBreakpointData } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; import severity from 'vs/base/common/severity'; @@ -18,6 +18,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape { private _proxy: ExtHostDebugServiceShape; private _toDispose: IDisposable[]; + private _breakpointEventsActive: boolean; constructor( extHostContext: IExtHostContext, @@ -35,6 +36,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape { this._proxy.$acceptDebugSessionActiveChanged(undefined); } })); + this._toDispose.push(debugService.onDidCustomEvent(event => { if (event && event.sessionId) { const process = this.debugService.getModel().getProcesses().filter(p => p.getId() === event.sessionId).pop(); @@ -49,6 +51,73 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape { this._toDispose = dispose(this._toDispose); } + public $startBreakpointEvents(): TPromise { + + if (!this._breakpointEventsActive) { + this._breakpointEventsActive = true; + + // set up a handler to send more + this._toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(e => { + if (e) { + const delta: IBreakpointsDelta = {}; + if (e.added) { + delta.added = this.toWire(e.added); + } + if (e.removed) { + delta.removed = e.removed.map(x => x.getId()); + } + if (e.changed) { + delta.changed = this.toWire(e.changed); + } + + if (delta.added || delta.removed || delta.changed) { + this._proxy.$acceptBreakpointsDelta(delta); + } + } + })); + + // send all breakpoints + const bps = this.debugService.getModel().getBreakpoints(); + const fbps = this.debugService.getModel().getFunctionBreakpoints(); + if (bps.length > 0 || fbps.length > 0) { + this._proxy.$acceptBreakpointsDelta({ + added: this.toWire(bps).concat(this.toWire(fbps)) + }); + } + } + + return TPromise.wrap(undefined); + } + + private toWire(bps: (IBreakpoint | IFunctionBreakpoint)[]): (ISourceBreakpointData | IFunctionBreakpointData)[] { + + return bps.map(bp => { + if ('name' in bp) { + const fbp = bp; + return { + type: 'function', + id: bp.getId(), + enabled: bp.enabled, + functionName: fbp.name, + hitCondition: bp.hitCondition, + /* condition: bp.condition */ + }; + } else { + const sbp = bp; + return { + type: 'source', + id: bp.getId(), + enabled: bp.enabled, + condition: sbp.condition, + hitCondition: bp.hitCondition, + uri: sbp.uri, + line: sbp.lineNumber > 0 ? sbp.lineNumber - 1 : 0, + character: (typeof sbp.column === 'number' && sbp.column > 0) ? sbp.column - 1 : 0 + }; + } + }); + } + public $registerDebugConfigurationProvider(debugType: string, hasProvide: boolean, hasResolve: boolean, handle: number): TPromise { const provider = { diff --git a/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts b/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts index 2e6768b97ed..dfc8714ca3b 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { TPromise } from 'vs/base/common/winjs.base'; import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import { MainThreadDiaglogsShape, MainContext, IExtHostContext, MainThreadDialogOpenOptions, MainThreadDialogSaveOptions } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; @@ -25,29 +24,30 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape { // } - $showOpenDialog(options: MainThreadDialogOpenOptions): TPromise { + $showOpenDialog(options: MainThreadDialogOpenOptions): Promise { // TODO@joh what about remote dev setup? if (options.defaultUri && options.defaultUri.scheme !== 'file') { - return TPromise.wrapError(new Error('Not supported - Open-dialogs can only be opened on `file`-uris.')); + return Promise.reject(new Error('Not supported - Open-dialogs can only be opened on `file`-uris.')); } - return new TPromise(resolve => { - this._windowService.showOpenDialog( - MainThreadDialogs._convertOpenOptions(options), - filenames => resolve(isFalsyOrEmpty(filenames) ? undefined : filenames) + return new Promise(resolve => { + const filenames = this._windowService.showOpenDialog( + MainThreadDialogs._convertOpenOptions(options) ); + + resolve(isFalsyOrEmpty(filenames) ? undefined : filenames); }); } - $showSaveDialog(options: MainThreadDialogSaveOptions): TPromise { + $showSaveDialog(options: MainThreadDialogSaveOptions): Promise { // TODO@joh what about remote dev setup? if (options.defaultUri && options.defaultUri.scheme !== 'file') { - return TPromise.wrapError(new Error('Not supported - Save-dialogs can only be opened on `file`-uris.')); + return Promise.reject(new Error('Not supported - Save-dialogs can only be opened on `file`-uris.')); } - return new TPromise(resolve => { - this._windowService.showSaveDialog( - MainThreadDialogs._convertSaveOptions(options), - filename => resolve(!filename ? undefined : filename) + return new Promise(resolve => { + const filename = this._windowService.showSaveDialog( + MainThreadDialogs._convertSaveOptions(options) ); + resolve(!filename ? undefined : filename); }); } diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts index 35716ef72c4..026be3a7145 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts @@ -22,7 +22,6 @@ import { IFileService } from 'vs/platform/files/common/files'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { isCodeEditor, isDiffEditor, ICodeEditor } from 'vs/editor/browser/editorBrowser'; namespace mapset { @@ -307,15 +306,14 @@ export class MainThreadDocumentsAndEditors { @IFileService fileService: IFileService, @ITextModelService textModelResolverService: ITextModelService, @IUntitledEditorService untitledEditorService: IUntitledEditorService, - @IEditorGroupService editorGroupService: IEditorGroupService, - @ITelemetryService telemetryService: ITelemetryService + @IEditorGroupService editorGroupService: IEditorGroupService ) { this._proxy = extHostContext.get(ExtHostContext.ExtHostDocumentsAndEditors); const mainThreadDocuments = new MainThreadDocuments(this, extHostContext, this._modelService, modeService, this._textFileService, fileService, textModelResolverService, untitledEditorService); extHostContext.set(MainContext.MainThreadDocuments, mainThreadDocuments); - const mainThreadEditors = new MainThreadEditors(this, extHostContext, codeEditorService, this._workbenchEditorService, editorGroupService, telemetryService, textModelResolverService, fileService, this._modelService); + const mainThreadEditors = new MainThreadEditors(this, extHostContext, codeEditorService, this._workbenchEditorService, editorGroupService, textModelResolverService, fileService, this._modelService); extHostContext.set(MainContext.MainThreadEditors, mainThreadEditors); // It is expected that the ctor of the state computer calls our `_onDelta`. diff --git a/src/vs/workbench/api/electron-browser/mainThreadEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts index 88e9bff09ad..9870316763a 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts @@ -16,7 +16,6 @@ import { Position as EditorPosition, ITextEditorOptions } from 'vs/platform/edit import { MainThreadTextEditor } from './mainThreadEditor'; import { ITextEditorConfigurationUpdate, TextEditorRevealType, IApplyEditsOptions, IUndoStopOptions } from 'vs/workbench/api/node/extHost.protocol'; import { MainThreadDocumentsAndEditors } from './mainThreadDocumentsAndEditors'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { equals as objectEquals } from 'vs/base/common/objects'; import { ExtHostContext, MainThreadEditorsShape, ExtHostEditorsShape, ITextDocumentShowOptions, ITextEditorPositionData, IExtHostContext, IWorkspaceResourceEdit } from '../node/extHost.protocol'; import { IRange } from 'vs/editor/common/core/range'; @@ -32,7 +31,6 @@ export class MainThreadEditors implements MainThreadEditorsShape { private _proxy: ExtHostEditorsShape; private _documentsAndEditors: MainThreadDocumentsAndEditors; private _workbenchEditorService: IWorkbenchEditorService; - private _telemetryService: ITelemetryService; private _toDispose: IDisposable[]; private _textEditorsListenersMap: { [editorId: string]: IDisposable[]; }; private _editorPositionData: ITextEditorPositionData; @@ -44,7 +42,6 @@ export class MainThreadEditors implements MainThreadEditorsShape { @ICodeEditorService private _codeEditorService: ICodeEditorService, @IWorkbenchEditorService workbenchEditorService: IWorkbenchEditorService, @IEditorGroupService editorGroupService: IEditorGroupService, - @ITelemetryService telemetryService: ITelemetryService, @ITextModelService private readonly _textModelResolverService: ITextModelService, @IFileService private readonly _fileService: IFileService, @IModelService private readonly _modelService: IModelService, @@ -52,7 +49,6 @@ export class MainThreadEditors implements MainThreadEditorsShape { this._proxy = extHostContext.get(ExtHostContext.ExtHostEditors); this._documentsAndEditors = documentsAndEditors; this._workbenchEditorService = workbenchEditorService; - this._telemetryService = telemetryService; this._toDispose = []; this._textEditorsListenersMap = Object.create(null); this._editorPositionData = null; @@ -140,14 +136,6 @@ export class MainThreadEditors implements MainThreadEditorsShape { } $tryShowEditor(id: string, position: EditorPosition): TPromise { - // check how often this is used - /* __GDPR__ - "api.deprecated" : { - "function" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this._telemetryService.publicLog('api.deprecated', { function: 'TextEditor.show' }); - let mainThreadEditor = this._documentsAndEditors.getEditor(id); if (mainThreadEditor) { let model = mainThreadEditor.getModel(); @@ -160,14 +148,6 @@ export class MainThreadEditors implements MainThreadEditorsShape { } $tryHideEditor(id: string): TPromise { - // check how often this is used - /* __GDPR__ - "api.deprecated" : { - "function" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this._telemetryService.publicLog('api.deprecated', { function: 'TextEditor.hide' }); - let mainThreadEditor = this._documentsAndEditors.getEditor(id); if (mainThreadEditor) { let editors = this._workbenchEditorService.getVisibleEditors(); diff --git a/src/vs/workbench/api/electron-browser/mainThreadErrors.ts b/src/vs/workbench/api/electron-browser/mainThreadErrors.ts index a737587e706..a1ff2a2dd6c 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadErrors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadErrors.ts @@ -15,11 +15,11 @@ export class MainThreadErrors implements MainThreadErrorsShape { // } - $onUnexpectedError(err: any | SerializedError, extensionId: string | undefined): void { + $onUnexpectedError(err: any | SerializedError): void { if (err.$isError) { const { name, message, stack } = err; err = new Error(); - err.message = extensionId ? `[${extensionId}] ${message}` : message; + err.message = message; err.name = name; err.stack = stack; } diff --git a/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts index ea48b3c3a40..01f35e37211 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts @@ -9,6 +9,7 @@ import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { MainThreadExtensionServiceShape, MainContext, IExtHostContext } from '../node/extHost.protocol'; import { ExtensionService } from 'vs/workbench/services/extensions/electron-browser/extensionService'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; +import { SerializedError } from 'vs/base/common/errors'; @extHostNamedCustomer(MainContext.MainThreadExtensionService) export class MainThreadExtensionService implements MainThreadExtensionServiceShape { @@ -30,9 +31,21 @@ export class MainThreadExtensionService implements MainThreadExtensionServiceSha $localShowMessage(severity: Severity, msg: string): void { this._extensionService._logOrShowMessage(severity, msg); } - $onExtensionActivated(extensionId: string, startup: boolean, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number): void { - this._extensionService._onExtensionActivated(extensionId, startup, codeLoadingTime, activateCallTime, activateResolvedTime); + $onExtensionActivated(extensionId: string, startup: boolean, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number, activationEvent: string): void { + this._extensionService._onExtensionActivated(extensionId, startup, codeLoadingTime, activateCallTime, activateResolvedTime, activationEvent); + } + $onExtensionRuntimeError(extensionId: string, data: SerializedError): void { + const error = new Error(); + error.name = data.name; + error.message = data.message; + error.stack = data.stack; + this._extensionService._onExtensionRuntimeError(extensionId, error); + console.error(`[${extensionId}]${error.message}`); + console.error(error.stack); } $onExtensionActivationFailed(extensionId: string): void { } + $addMessage(extensionId: string, severity: Severity, message: string): void { + this._extensionService._addMessage(extensionId, severity, message); + } } diff --git a/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts b/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts index 16ce692ccc3..7466f66d835 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts @@ -164,7 +164,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha $registerQuickFixSupport(handle: number, selector: vscode.DocumentSelector): TPromise { this._registrations[handle] = modes.CodeActionProviderRegistry.register(toLanguageSelector(selector), { - provideCodeActions: (model: IReadOnlyModel, range: EditorRange, token: CancellationToken): Thenable<(modes.Command | modes.CodeAction)[]> => { + provideCodeActions: (model: IReadOnlyModel, range: EditorRange, token: CancellationToken): Thenable => { return this._heapService.trackRecursive(wireCancellationToken(token, this._proxy.$provideCodeActions(handle, model.uri, range))); } }); diff --git a/src/vs/workbench/api/electron-browser/mainThreadMessageService.ts b/src/vs/workbench/api/electron-browser/mainThreadMessageService.ts index 090834e9b6a..c62b072f539 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadMessageService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadMessageService.ts @@ -8,7 +8,6 @@ import nls = require('vs/nls'); import { IMessageService, IChoiceService } from 'vs/platform/message/common/message'; import Severity from 'vs/base/common/severity'; import { Action } from 'vs/base/common/actions'; -import { TPromise as Promise } from 'vs/base/common/winjs.base'; import { MainThreadMessageServiceShape, MainContext, IExtHostContext, MainThreadMessageOptions } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; diff --git a/src/vs/workbench/api/electron-browser/mainThreadProgress.ts b/src/vs/workbench/api/electron-browser/mainThreadProgress.ts index 5ddce6f738b..4b0f1c69aca 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadProgress.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadProgress.ts @@ -5,7 +5,6 @@ 'use strict'; import { IProgressService2, IProgress, IProgressOptions, IProgressStep } from 'vs/platform/progress/common/progress'; -import { TPromise } from 'vs/base/common/winjs.base'; import { MainThreadProgressShape, MainContext, IExtHostContext } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; @@ -47,7 +46,7 @@ export class MainThreadProgress implements MainThreadProgressShape { private _createTask(handle: number) { return (progress: IProgress) => { - return new TPromise(resolve => { + return new Promise(resolve => { this._progress.set(handle, { resolve, progress }); }); }; diff --git a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts index 77de0d81f24..e1508fc1f4c 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts @@ -5,13 +5,11 @@ 'use strict'; -import { TPromise } from 'vs/base/common/winjs.base'; import { sequence } from 'vs/base/common/async'; import * as strings from 'vs/base/common/strings'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; import { ISaveParticipant, ITextFileEditorModel, SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IModel, ISingleEditOperation, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; @@ -27,13 +25,7 @@ import { extHostCustomer } from 'vs/workbench/api/electron-browser/extHostCustom import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; -export interface INamedSaveParticpant extends ISaveParticipant { - readonly name: string; -} - -class TrimWhitespaceParticipant implements INamedSaveParticpant { - - readonly name = 'TrimWhitespaceParticipant'; +class TrimWhitespaceParticipant implements ISaveParticipant { constructor( @IConfigurationService private configurationService: IConfigurationService, @@ -89,9 +81,7 @@ function findEditor(model: IModel, codeEditorService: ICodeEditorService): ICode return candidate; } -export class FinalNewLineParticipant implements INamedSaveParticpant { - - readonly name = 'FinalNewLineParticipant'; +export class FinalNewLineParticipant implements ISaveParticipant { constructor( @IConfigurationService private configurationService: IConfigurationService, @@ -129,9 +119,7 @@ export class FinalNewLineParticipant implements INamedSaveParticpant { } } -export class TrimFinalNewLinesParticipant implements INamedSaveParticpant { - - readonly name = 'TrimFinalNewLinesParticipant'; +export class TrimFinalNewLinesParticipant implements ISaveParticipant { constructor( @IConfigurationService private configurationService: IConfigurationService, @@ -168,7 +156,11 @@ export class TrimFinalNewLinesParticipant implements INamedSaveParticpant { currentLine = model.getLineContent(currentLineNumber); currentLineIsEmptyOrWhitespace = strings.lastNonWhitespaceIndex(currentLine) === -1; } - model.pushEditOperations(prevSelection, [EditOperation.delete(new Range(currentLineNumber + 1, 1, lineCount + 1, 1))], edits => prevSelection); + + const deletionRange = new Range(currentLineNumber + 1, 1, lineCount + 1, 1); + if (!deletionRange.isEmpty()) { + model.pushEditOperations(prevSelection, [EditOperation.delete(deletionRange)], edits => prevSelection); + } if (editor) { editor.setSelections(prevSelection); @@ -176,9 +168,7 @@ export class TrimFinalNewLinesParticipant implements INamedSaveParticpant { } } -class FormatOnSaveParticipant implements INamedSaveParticpant { - - readonly name = 'FormatOnSaveParticipant'; +class FormatOnSaveParticipant implements ISaveParticipant { constructor( @ICodeEditorService private _editorService: ICodeEditorService, @@ -188,7 +178,7 @@ class FormatOnSaveParticipant implements INamedSaveParticpant { // Nothing } - participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise { + participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): Promise { const model = editorModel.textEditorModel; if (env.reason === SaveReason.AUTO @@ -199,7 +189,7 @@ class FormatOnSaveParticipant implements INamedSaveParticpant { const versionNow = model.getVersionId(); const { tabSize, insertSpaces } = model.getOptions(); - return new TPromise((resolve, reject) => { + return new Promise((resolve, reject) => { setTimeout(reject, 750); getDocumentFormattingEdits(model, { tabSize, insertSpaces }) .then(edits => this._editorWorkerService.computeMoreMinimalEdits(model.uri, edits)) @@ -246,23 +236,21 @@ class FormatOnSaveParticipant implements INamedSaveParticpant { } } -class ExtHostSaveParticipant implements INamedSaveParticpant { +class ExtHostSaveParticipant implements ISaveParticipant { private _proxy: ExtHostDocumentSaveParticipantShape; - readonly name = 'ExtHostSaveParticipant'; - constructor(extHostContext: IExtHostContext) { this._proxy = extHostContext.get(ExtHostContext.ExtHostDocumentSaveParticipant); } - participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise { - return new TPromise((resolve, reject) => { + participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): Promise { + return new Promise((resolve, reject) => { setTimeout(reject, 1750); this._proxy.$participateInSave(editorModel.getResource(), env.reason).then(values => { for (const success of values) { if (!success) { - return TPromise.wrapError(new Error('listener failed')); + return Promise.reject(new Error('listener failed')); } } return undefined; @@ -275,11 +263,10 @@ class ExtHostSaveParticipant implements INamedSaveParticpant { @extHostCustomer export class SaveParticipant implements ISaveParticipant { - private _saveParticipants: INamedSaveParticpant[]; + private _saveParticipants: ISaveParticipant[]; constructor( extHostContext: IExtHostContext, - @ITelemetryService private _telemetryService: ITelemetryService, @IInstantiationService instantiationService: IInstantiationService, @IConfigurationService configurationService: IConfigurationService, @ICodeEditorService codeEditorService: ICodeEditorService, @@ -302,39 +289,11 @@ export class SaveParticipant implements ISaveParticipant { TextFileEditorModel.setSaveParticipant(undefined); } - participate(model: ITextFileEditorModel, env: { reason: SaveReason }): TPromise { - - const stats: { [name: string]: number } = Object.create(null); - + participate(model: ITextFileEditorModel, env: { reason: SaveReason }): Thenable { const promiseFactory = this._saveParticipants.map(p => () => { - - const { name } = p; - const t1 = Date.now(); - - return TPromise.as(p.participate(model, env)).then(() => { - stats[`Success-${name}`] = Date.now() - t1; - }, err => { - stats[`Failure-${name}`] = Date.now() - t1; - // console.error(err); - }); + return Promise.resolve(p.participate(model, env)); }); - return sequence(promiseFactory).then(() => { - /* __GDPR__ - "saveParticipantStats" : { - "${wildcard}": [ - { - "${prefix}": "Success-", - "${classification}": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } - }, - { - "${prefix}": "Failure-", - "${classification}": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } - } - ] - } - */ - this._telemetryService.publicLog('saveParticipantStats', stats); - }); + return sequence(promiseFactory).then(() => { }); } } diff --git a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts index aa70391c538..afaa490c84f 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts @@ -12,6 +12,7 @@ import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { ViewsRegistry } from 'vs/workbench/browser/parts/views/viewsRegistry'; import { ITreeViewDataProvider, ITreeItem } from 'vs/workbench/common/views'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; +import { assign } from 'vs/base/common/objects'; @extHostNamedCustomer(MainContext.MainThreadTreeViews) export class MainThreadTreeViews extends Disposable implements MainThreadTreeViewsShape { @@ -30,10 +31,10 @@ export class MainThreadTreeViews extends Disposable implements MainThreadTreeVie ViewsRegistry.registerTreeViewDataProvider(treeViewId, this._register(new TreeViewDataProvider(treeViewId, this._proxy, this.messageService))); } - $refresh(treeViewId: string, treeItemHandles: number[]): void { + $refresh(treeViewId: string, itemsToRefresh: { [treeItemHandle: string]: ITreeItem }): void { const treeViewDataProvider: TreeViewDataProvider = ViewsRegistry.getTreeViewDataProvider(treeViewId); if (treeViewDataProvider) { - treeViewDataProvider.refresh(treeItemHandles); + treeViewDataProvider.refresh(itemsToRefresh); } } @@ -43,7 +44,7 @@ export class MainThreadTreeViews extends Disposable implements MainThreadTreeVie } } -type TreeItemHandle = number; +type TreeItemHandle = string; class TreeViewDataProvider implements ITreeViewDataProvider { @@ -53,7 +54,6 @@ class TreeViewDataProvider implements ITreeViewDataProvider { private _onDispose: Emitter = new Emitter(); readonly onDispose: Event = this._onDispose.event; - private childrenMap: Map = new Map(); private itemsMap: Map = new Map(); constructor(private treeViewId: string, @@ -65,8 +65,7 @@ class TreeViewDataProvider implements ITreeViewDataProvider { getElements(): TPromise { return this._proxy.$getElements(this.treeViewId) .then(elements => { - this.postGetElements(null, elements); - return elements; + return this.postGetElements(elements); }, err => { this.messageService.show(Severity.Error, err); return null; @@ -79,20 +78,34 @@ class TreeViewDataProvider implements ITreeViewDataProvider { } return this._proxy.$getChildren(this.treeViewId, treeItem.handle) .then(children => { - this.postGetElements(treeItem.handle, children); - return children; + return this.postGetElements(children); }, err => { this.messageService.show(Severity.Error, err); return null; }); } - refresh(treeItemHandles: number[]) { - if (treeItemHandles && treeItemHandles.length) { - let treeItems = treeItemHandles.map(treeItemHandle => this.itemsMap.get(treeItemHandle)) - .filter(treeItem => !!treeItem); - if (treeItems.length) { - this._onDidChange.fire(treeItems); + refresh(itemsToRefreshByHandle: { [treeItemHandle: string]: ITreeItem }) { + if (itemsToRefreshByHandle) { + const itemsToRefresh: ITreeItem[] = []; + for (const treeItemHandle of Object.keys(itemsToRefreshByHandle)) { + const currentTreeItem = this.itemsMap.get(treeItemHandle); + if (currentTreeItem) { // Refresh only if the item exists + const treeItem = itemsToRefreshByHandle[treeItemHandle]; + // Update the current item with refreshed item + this.updateTreeItem(currentTreeItem, treeItem); + if (treeItemHandle === treeItem.handle) { + itemsToRefresh.push(currentTreeItem); + } else { + // Update maps when handle is changed and refresh parent + this.itemsMap.delete(treeItemHandle); + this.itemsMap.set(currentTreeItem.handle, currentTreeItem); + itemsToRefresh.push(this.itemsMap.get(treeItem.parentHandle)); + } + } + if (itemsToRefresh.length) { + this._onDidChange.fire(itemsToRefresh); + } } } else { this._onDidChange.fire(); @@ -103,21 +116,28 @@ class TreeViewDataProvider implements ITreeViewDataProvider { this._onDispose.fire(); } - private postGetElements(parent: TreeItemHandle, children: ITreeItem[]) { - this.setElements(parent, children); + private postGetElements(elements: ITreeItem[]): ITreeItem[] { + const result = []; + if (elements) { + for (const element of elements) { + const currentTreeItem = this.itemsMap.get(element.handle); + if (currentTreeItem) { + // Update the current item with new item + this.updateTreeItem(currentTreeItem, element); + } else { + this.itemsMap.set(element.handle, element); + } + // Always use the existing items + result.push(this.itemsMap.get(element.handle)); + } + } + return result; } - private setElements(parent: TreeItemHandle, children: ITreeItem[]) { - if (children && children.length) { - for (const child of children) { - this.itemsMap.set(child.handle, child); - if (child.children && child.children.length) { - this.setElements(child.handle, child.children); - } - } - if (parent) { - this.childrenMap.set(parent, children.map(child => child.handle)); - } + private updateTreeItem(current: ITreeItem, treeItem: ITreeItem): void { + treeItem.children = treeItem.children ? treeItem.children : null; + if (current) { + assign(current, treeItem); } } } \ No newline at end of file diff --git a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts index 837eb4f98a3..d0820e649e0 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts @@ -14,7 +14,6 @@ import { MainThreadWorkspaceShape, ExtHostWorkspaceShape, ExtHostContext, MainCo import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IRelativePattern, isRelativePattern } from 'vs/base/common/glob'; @extHostNamedCustomer(MainContext.MainThreadWorkspace) export class MainThreadWorkspace implements MainThreadWorkspaceShape { @@ -52,17 +51,17 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape { // --- search --- - $startSearch(include: string | IRelativePattern, exclude: string | IRelativePattern, maxResults: number, requestId: number): Thenable { + $startSearch(includePattern: string, includeFolder: string, excludePattern: string, maxResults: number, requestId: number): Thenable { const workspace = this._contextService.getWorkspace(); if (!workspace.folders.length) { return undefined; } let folderQueries: IFolderQuery[]; - if (typeof include === 'string' || !include) { + if (typeof includeFolder === 'string') { + folderQueries = [{ folder: URI.file(includeFolder) }]; // if base provided, only search in that folder + } else { folderQueries = workspace.folders.map(folder => ({ folder: folder.uri })); // absolute pattern: search across all folders - } else if (isRelativePattern(include)) { - folderQueries = [{ folder: URI.file(include.base) }]; // relative pattern: search only in base folder } if (!folderQueries) { @@ -83,8 +82,8 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape { folderQueries, type: QueryType.File, maxResults, - includePattern: { [typeof include === 'string' ? include : !!include ? include.pattern : undefined]: true }, - excludePattern: { [typeof exclude === 'string' ? exclude : !!exclude ? exclude.pattern : undefined]: true }, + includePattern: { [typeof includePattern === 'string' ? includePattern : undefined]: true }, + excludePattern: { [typeof excludePattern === 'string' ? excludePattern : undefined]: true }, useRipgrep, ignoreSymlinks }; diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index af59bb8d477..feb0e727eb6 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -56,6 +56,9 @@ import { ExtHostFileSystem } from 'vs/workbench/api/node/extHostFileSystem'; import { FileChangeType, FileType } from 'vs/platform/files/common/files'; import { ExtHostDecorations } from 'vs/workbench/api/node/extHostDecorations'; import { toGlobPattern, toLanguageSelector } from 'vs/workbench/api/node/extHostTypeConverters'; +import { ExtensionActivatedByAPI } from 'vs/workbench/api/node/extHostExtensionActivator'; +import { isFalsyOrEmpty } from 'vs/base/common/arrays'; +import { ILogService } from 'vs/platform/log/common/log'; export interface IExtensionApiFactory { (extension: IExtensionDescription): typeof vscode; @@ -79,7 +82,8 @@ export function createApiFactory( threadService: ExtHostThreadService, extHostWorkspace: ExtHostWorkspace, extHostConfiguration: ExtHostConfiguration, - extensionService: ExtHostExtensionService + extensionService: ExtHostExtensionService, + logService: ILogService ): IExtensionApiFactory { // Addressable instances @@ -90,7 +94,7 @@ export function createApiFactory( const extHostDocumentContentProviders = threadService.set(ExtHostContext.ExtHostDocumentContentProviders, new ExtHostDocumentContentProvider(threadService, extHostDocumentsAndEditors)); const extHostDocumentSaveParticipant = threadService.set(ExtHostContext.ExtHostDocumentSaveParticipant, new ExtHostDocumentSaveParticipant(extHostDocuments, threadService.get(MainContext.MainThreadEditors))); const extHostEditors = threadService.set(ExtHostContext.ExtHostEditors, new ExtHostEditors(threadService, extHostDocumentsAndEditors)); - const extHostCommands = threadService.set(ExtHostContext.ExtHostCommands, new ExtHostCommands(threadService, extHostHeapService)); + const extHostCommands = threadService.set(ExtHostContext.ExtHostCommands, new ExtHostCommands(threadService, extHostHeapService, logService)); const extHostTreeViews = threadService.set(ExtHostContext.ExtHostTreeViews, new ExtHostTreeViews(threadService.get(MainContext.MainThreadTreeViews), extHostCommands)); threadService.set(ExtHostContext.ExtHostWorkspace, extHostWorkspace); const extHostDebugService = threadService.set(ExtHostContext.ExtHostDebugService, new ExtHostDebugService(threadService, extHostWorkspace)); @@ -101,7 +105,7 @@ export function createApiFactory( const extHostFileSystemEvent = threadService.set(ExtHostContext.ExtHostFileSystemEventService, new ExtHostFileSystemEventService()); const extHostQuickOpen = threadService.set(ExtHostContext.ExtHostQuickOpen, new ExtHostQuickOpen(threadService, extHostWorkspace, extHostCommands)); const extHostTerminalService = threadService.set(ExtHostContext.ExtHostTerminalService, new ExtHostTerminalService(threadService)); - const extHostSCM = threadService.set(ExtHostContext.ExtHostSCM, new ExtHostSCM(threadService, extHostCommands)); + const extHostSCM = threadService.set(ExtHostContext.ExtHostSCM, new ExtHostSCM(threadService, extHostCommands, logService)); const extHostTask = threadService.set(ExtHostContext.ExtHostTask, new ExtHostTask(threadService, extHostWorkspace)); const extHostWindow = threadService.set(ExtHostContext.ExtHostWindow, new ExtHostWindow(threadService)); threadService.set(ExtHostContext.ExtHostExtensionService, extensionService); @@ -123,8 +127,14 @@ export function createApiFactory( return function (extension: IExtensionDescription): typeof vscode { - if (extension.enableProposedApi && !extension.isBuiltin) { + if (!isFalsyOrEmpty(product.extensionAllowedProposedApi) + && product.extensionAllowedProposedApi.indexOf(extension.id) >= 0 + ) { + // fast lane -> proposed api is available to all extensions + // that are listed in product.json-files + extension.enableProposedApi = true; + } else if (extension.enableProposedApi && !extension.isBuiltin) { if ( !initData.environment.enableProposedApiForAll && initData.environment.enableProposedApiFor.indexOf(extension.id) < 0 @@ -217,7 +227,7 @@ export function createApiFactory( return extHostLanguages.getLanguages(); }, match(selector: vscode.DocumentSelector, document: vscode.TextDocument): number { - return score(toLanguageSelector(selector), document.uri, document.languageId); + return score(toLanguageSelector(selector), document.uri, document.languageId); }, registerCodeActionsProvider(selector: vscode.DocumentSelector, provider: vscode.CodeActionProvider): vscode.Disposable { return languageFeatures.registerCodeActionProvider(selector, provider); @@ -460,7 +470,7 @@ export function createApiFactory( return extHostDocuments.onDidSaveDocument(listener, thisArgs, disposables); }, onWillSaveTextDocument: (listener, thisArgs?, disposables?) => { - return extHostDocumentSaveParticipant.onWillSaveTextDocumentEvent(listener, thisArgs, disposables); + return extHostDocumentSaveParticipant.getOnWillSaveTextDocumentEvent(extension)(listener, thisArgs, disposables); }, onDidChangeConfiguration: (listener: (_: any) => any, thisArgs?: any, disposables?: extHostTypes.Disposable[]) => { return extHostConfiguration.onDidChangeConfiguration(listener, thisArgs, disposables); @@ -498,8 +508,8 @@ export function createApiFactory( get activeDebugConsole() { return extHostDebugService.activeDebugConsole; }, - startDebugging(folder: vscode.WorkspaceFolder | undefined, nameOrConfig: string | vscode.DebugConfiguration) { - return extHostDebugService.startDebugging(folder, nameOrConfig); + get breakpoints() { + return extHostDebugService.breakpoints; }, onDidStartDebugSession(listener, thisArg?, disposables?) { return extHostDebugService.onDidStartDebugSession(listener, thisArg, disposables); @@ -513,6 +523,12 @@ export function createApiFactory( onDidReceiveDebugSessionCustomEvent(listener, thisArg?, disposables?) { return extHostDebugService.onDidReceiveDebugSessionCustomEvent(listener, thisArg, disposables); }, + onDidChangeBreakpoints: proposedApiFunction(extension, (listener, thisArgs?, disposables?) => { + return extHostDebugService.onDidChangeBreakpoints(listener, thisArgs, disposables); + }), + startDebugging(folder: vscode.WorkspaceFolder | undefined, nameOrConfig: string | vscode.DebugConfiguration) { + return extHostDebugService.startDebugging(folder, nameOrConfig); + }, registerDebugConfigurationProvider(debugType: string, provider: vscode.DebugConfigurationProvider) { return extHostDebugService.registerDebugConfigurationProvider(debugType, provider); } @@ -531,6 +547,7 @@ export function createApiFactory( scm, debug, // types + Breakpoint: extHostTypes.Breakpoint, CancellationTokenSource: CancellationTokenSource, CodeAction: extHostTypes.CodeAction, CodeLens: extHostTypes.CodeLens, @@ -549,6 +566,7 @@ export function createApiFactory( DocumentHighlightKind: extHostTypes.DocumentHighlightKind, DocumentLink: extHostTypes.DocumentLink, EventEmitter: Emitter, + FunctionBreakpoint: extHostTypes.FunctionBreakpoint, Hover: extHostTypes.Hover, IndentAction: languageConfiguration.IndentAction, Location: extHostTypes.Location, @@ -561,6 +579,7 @@ export function createApiFactory( SignatureHelp: extHostTypes.SignatureHelp, SignatureInformation: extHostTypes.SignatureInformation, SnippetString: extHostTypes.SnippetString, + SourceBreakpoint: extHostTypes.SourceBreakpoint, StatusBarAlignment: extHostTypes.StatusBarAlignment, SymbolInformation: extHostTypes.SymbolInformation, SymbolKind: extHostTypes.SymbolKind, @@ -620,7 +639,7 @@ class Extension implements vscode.Extension { } activate(): Thenable { - return this._extensionService.activateById(this.id, false).then(() => this.exports); + return this._extensionService.activateById(this.id, new ExtensionActivatedByAPI(false)).then(() => this.exports); } } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 42ae15c73ab..111a4643be8 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -46,10 +46,10 @@ import { ITreeItem } from 'vs/workbench/common/views'; import { ThemeColor } from 'vs/platform/theme/common/themeService'; import { IDisposable } from 'vs/base/common/lifecycle'; import { SerializedError } from 'vs/base/common/errors'; -import { IRelativePattern } from 'vs/base/common/glob'; import { IWorkspaceFolderData } from 'vs/platform/workspace/common/workspace'; import { IStat, IFileChange } from 'vs/platform/files/common/files'; import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; +import { ParsedArgs } from 'vs/platform/environment/common/environment'; export interface IEnvironment { isExtensionDevelopmentDebug: boolean; @@ -76,6 +76,9 @@ export interface IInitData { extensions: IExtensionDescription[]; configuration: IConfigurationInitData; telemetryInfo: ITelemetryInfo; + windowId: number; + args: ParsedArgs; + execPath: string; } export interface IConfigurationInitData extends IConfigurationData { @@ -141,8 +144,8 @@ export interface MainThreadDialogSaveOptions { } export interface MainThreadDiaglogsShape extends IDisposable { - $showOpenDialog(options: MainThreadDialogOpenOptions): TPromise; - $showSaveDialog(options: MainThreadDialogSaveOptions): TPromise; + $showOpenDialog(options: MainThreadDialogOpenOptions): Thenable; + $showSaveDialog(options: MainThreadDialogSaveOptions): Thenable; } export interface MainThreadDecorationsShape extends IDisposable { @@ -236,11 +239,11 @@ export interface MainThreadEditorsShape extends IDisposable { export interface MainThreadTreeViewsShape extends IDisposable { $registerView(treeViewId: string): void; - $refresh(treeViewId: string, treeItemHandles: number[]): void; + $refresh(treeViewId: string, itemsToRefresh?: { [treeItemHandle: string]: ITreeItem }): void; } export interface MainThreadErrorsShape extends IDisposable { - $onUnexpectedError(err: any | SerializedError, extensionId: string | undefined): void; + $onUnexpectedError(err: any | SerializedError): void; } export interface MainThreadLanguageFeaturesShape extends IDisposable { @@ -328,7 +331,7 @@ export interface MainThreadTelemetryShape extends IDisposable { } export interface MainThreadWorkspaceShape extends IDisposable { - $startSearch(include: string | IRelativePattern, exclude: string | IRelativePattern, maxResults: number, requestId: number): Thenable; + $startSearch(includePattern: string, includeFolder: string, excludePattern: string, maxResults: number, requestId: number): Thenable; $cancelSearch(requestId: number): Thenable; $saveAll(includeUntitled?: boolean): Thenable; } @@ -351,8 +354,10 @@ export interface MainThreadTaskShape extends IDisposable { export interface MainThreadExtensionServiceShape extends IDisposable { $localShowMessage(severity: Severity, msg: string): void; - $onExtensionActivated(extensionId: string, startup: boolean, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number): void; + $onExtensionActivated(extensionId: string, startup: boolean, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number, activationEvent: string): void; $onExtensionActivationFailed(extensionId: string): void; + $onExtensionRuntimeError(extensionId: string, error: SerializedError): void; + $addMessage(extensionId: string, severity: Severity, message: string): void; } export interface SCMProviderFeatures { @@ -415,6 +420,7 @@ export interface MainThreadDebugServiceShape extends IDisposable { $startDebugging(folder: URI | undefined, nameOrConfig: string | vscode.DebugConfiguration): TPromise; $customDebugAdapterRequest(id: DebugSessionUUID, command: string, args: any): TPromise; $appendDebugConsole(value: string): TPromise; + $startBreakpointEvents(): TPromise; } export interface MainThreadWindowShape extends IDisposable { @@ -425,7 +431,7 @@ export interface MainThreadWindowShape extends IDisposable { export interface ExtHostCommandsShape { $executeContributedCommand(id: string, ...args: any[]): Thenable; - $getContributedCommandHandlerDescriptions(): TPromise<{ [id: string]: string | ICommandHandlerDescription }>; + $getContributedCommandHandlerDescriptions(): Thenable<{ [id: string]: string | ICommandHandlerDescription }>; } export interface ExtHostConfigurationShape { @@ -456,7 +462,7 @@ export interface ExtHostDocumentsShape { } export interface ExtHostDocumentSaveParticipantShape { - $participateInSave(resource: URI, reason: SaveReason): TPromise; + $participateInSave(resource: URI, reason: SaveReason): Thenable; } export interface ITextEditorAddData { @@ -489,7 +495,7 @@ export interface ExtHostDocumentsAndEditorsShape { export interface ExtHostTreeViewsShape { $getElements(treeViewId: string): TPromise; - $getChildren(treeViewId: string, treeItemHandle: number): TPromise; + $getChildren(treeViewId: string, treeItemHandle: string): TPromise; } export interface ExtHostWorkspaceShape { @@ -581,7 +587,7 @@ export interface ExtHostLanguageFeaturesShape { $provideHover(handle: number, resource: URI, position: IPosition): TPromise; $provideDocumentHighlights(handle: number, resource: URI, position: IPosition): TPromise; $provideReferences(handle: number, resource: URI, position: IPosition, context: modes.ReferenceContext): TPromise; - $provideCodeActions(handle: number, resource: URI, range: IRange): TPromise<(modes.Command | modes.CodeAction)[]>; + $provideCodeActions(handle: number, resource: URI, range: IRange): TPromise; $provideDocumentFormattingEdits(handle: number, resource: URI, options: modes.FormattingOptions): TPromise; $provideDocumentRangeFormattingEdits(handle: number, resource: URI, range: IRange, options: modes.FormattingOptions): TPromise; $provideOnTypeFormattingEdits(handle: number, resource: URI, position: IPosition, ch: string, options: modes.FormattingOptions): TPromise; @@ -619,6 +625,32 @@ export interface ExtHostTaskShape { $provideTasks(handle: number): TPromise; } +export interface IBreakpointData { + type: 'source' | 'function'; + id: string; + enabled: boolean; + condition?: string; + hitCondition?: string; +} + +export interface ISourceBreakpointData extends IBreakpointData { + type: 'source'; + uri: URI; + line: number; + character: number; +} + +export interface IFunctionBreakpointData extends IBreakpointData { + type: 'function'; + functionName: string; +} + +export interface IBreakpointsDelta { + added?: (ISourceBreakpointData | IFunctionBreakpointData)[]; + removed?: string[]; + changed?: (ISourceBreakpointData | IFunctionBreakpointData)[]; +} + export interface ExtHostDebugServiceShape { $resolveDebugConfiguration(handle: number, folder: URI | undefined, debugConfiguration: any): TPromise; $provideDebugConfigurations(handle: number, folder: URI | undefined): TPromise; @@ -626,6 +658,7 @@ export interface ExtHostDebugServiceShape { $acceptDebugSessionTerminated(id: DebugSessionUUID, type: string, name: string): void; $acceptDebugSessionActiveChanged(id: DebugSessionUUID | undefined, type?: string, name?: string): void; $acceptDebugSessionCustomEvent(id: DebugSessionUUID, type: string, name: string, event: any): void; + $acceptBreakpointsDelta(delat: IBreakpointsDelta): void; } diff --git a/src/vs/workbench/api/node/extHostApiCommands.ts b/src/vs/workbench/api/node/extHostApiCommands.ts index 6a4c1e415dc..0bafb7cb7c6 100644 --- a/src/vs/workbench/api/node/extHostApiCommands.ts +++ b/src/vs/workbench/api/node/extHostApiCommands.ts @@ -16,6 +16,7 @@ import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; import { IWorkspaceSymbolProvider } from 'vs/workbench/parts/search/common/search'; import { Position as EditorPosition, ITextEditorOptions } from 'vs/platform/editor/common/editor'; +import { CustomCodeAction } from 'vs/workbench/api/node/extHostLanguageFeatures'; export class ExtHostApiCommands { @@ -392,16 +393,26 @@ export class ExtHostApiCommands { }); } - private _executeCodeActionProvider(resource: URI, range: types.Range): Thenable { + private _executeCodeActionProvider(resource: URI, range: types.Range): Thenable<(vscode.CodeAction | vscode.Command)[]> { const args = { resource, range: typeConverters.fromRange(range) }; - return this._commands.executeCommand('_executeCodeActionProvider', args).then(value => { + return this._commands.executeCommand('_executeCodeActionProvider', args).then(value => { if (!Array.isArray(value)) { return undefined; } - return value.map(quickFix => this._commands.converter.fromInternal(quickFix)); + return value.map(codeAction => { + if (codeAction._isSynthetic) { + return this._commands.converter.fromInternal(codeAction.command); + } else { + const ret = new types.CodeAction( + codeAction.title, + typeConverters.WorkspaceEdit.to(codeAction.edits) + ); + return ret; + } + }); }); } diff --git a/src/vs/workbench/api/node/extHostCommands.ts b/src/vs/workbench/api/node/extHostCommands.ts index 774d71f8e26..0fea03506f5 100644 --- a/src/vs/workbench/api/node/extHostCommands.ts +++ b/src/vs/workbench/api/node/extHostCommands.ts @@ -6,7 +6,6 @@ import { validateConstraint } from 'vs/base/common/types'; import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; -import { TPromise } from 'vs/base/common/winjs.base'; import * as extHostTypes from 'vs/workbench/api/node/extHostTypes'; import * as extHostTypeConverter from 'vs/workbench/api/node/extHostTypeConverters'; import { cloneAndChange } from 'vs/base/common/objects'; @@ -15,6 +14,7 @@ import { ExtHostHeapService } from 'vs/workbench/api/node/extHostHeapService'; import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import * as modes from 'vs/editor/common/modes'; import * as vscode from 'vscode'; +import { ILogService } from 'vs/platform/log/common/log'; interface CommandHandler { callback: Function; @@ -35,7 +35,8 @@ export class ExtHostCommands implements ExtHostCommandsShape { constructor( mainContext: IMainContext, - heapService: ExtHostHeapService + heapService: ExtHostHeapService, + private logService: ILogService ) { this._proxy = mainContext.get(MainContext.MainThreadCommands); this._converter = new CommandsConverter(this, heapService); @@ -50,6 +51,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { } registerCommand(id: string, callback: (...args: any[]) => T | Thenable, thisArg?: any, description?: ICommandHandlerDescription): extHostTypes.Disposable { + this.logService.trace('ExtHostCommands#registerCommand', id); if (!id.trim().length) { throw new Error('invalid id'); @@ -70,6 +72,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { } executeCommand(id: string, ...args: any[]): Thenable { + this.logService.trace('ExtHostCommands#executeCommand', id); if (this._commands.has(id)) { // we stay inside the extension host and support @@ -102,7 +105,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { $executeContributedCommand(id: string, ...args: any[]): Thenable { let command = this._commands.get(id); if (!command) { - return TPromise.wrapError(new Error(`Contributed command '${id}' does not exist.`)); + return Promise.reject(new Error(`Contributed command '${id}' does not exist.`)); } let { callback, thisArg, description } = command; @@ -112,7 +115,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { try { validateConstraint(args[i], description.args[i].constraint); } catch (err) { - return TPromise.wrapError(new Error(`Running the contributed command:'${id}' failed. Illegal argument '${description.args[i].name}' - ${description.args[i].description}`)); + return Promise.reject(new Error(`Running the contributed command:'${id}' failed. Illegal argument '${description.args[i].name}' - ${description.args[i].description}`)); } } } @@ -121,7 +124,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { try { let result = callback.apply(thisArg, args); - return TPromise.as(result); + return Promise.resolve(result); } catch (err) { // console.log(err); // try { @@ -129,11 +132,13 @@ export class ExtHostCommands implements ExtHostCommandsShape { // } catch (err) { // // // } - return TPromise.wrapError(new Error(`Running the contributed command:'${id}' failed.`)); + return Promise.reject(new Error(`Running the contributed command:'${id}' failed.`)); } } getCommands(filterUnderscoreCommands: boolean = false): Thenable { + this.logService.trace('ExtHostCommands#getCommands', filterUnderscoreCommands); + return this._proxy.$getCommands().then(result => { if (filterUnderscoreCommands) { result = result.filter(command => command[0] !== '_'); @@ -142,7 +147,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { }); } - $getContributedCommandHandlerDescriptions(): TPromise<{ [id: string]: string | ICommandHandlerDescription }> { + $getContributedCommandHandlerDescriptions(): Thenable<{ [id: string]: string | ICommandHandlerDescription }> { const result: { [id: string]: string | ICommandHandlerDescription } = Object.create(null); this._commands.forEach((command, id) => { let { description } = command; @@ -150,7 +155,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { result[id] = description; } }); - return TPromise.as(result); + return Promise.resolve(result); } } diff --git a/src/vs/workbench/api/node/extHostDebugService.ts b/src/vs/workbench/api/node/extHostDebugService.ts index 4e9bd4c99b4..ad91917fa76 100644 --- a/src/vs/workbench/api/node/extHostDebugService.ts +++ b/src/vs/workbench/api/node/extHostDebugService.ts @@ -7,12 +7,12 @@ import { TPromise } from 'vs/base/common/winjs.base'; import Event, { Emitter } from 'vs/base/common/event'; import { asWinJsPromise } from 'vs/base/common/async'; -import { MainContext, MainThreadDebugServiceShape, ExtHostDebugServiceShape, DebugSessionUUID, IMainContext } from 'vs/workbench/api/node/extHost.protocol'; +import { MainContext, MainThreadDebugServiceShape, ExtHostDebugServiceShape, DebugSessionUUID, IMainContext, IBreakpointsDelta, ISourceBreakpointData, IFunctionBreakpointData } from 'vs/workbench/api/node/extHost.protocol'; import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import * as vscode from 'vscode'; import URI from 'vs/base/common/uri'; -import * as types from 'vs/workbench/api/node/extHostTypes'; +import { Disposable, Position, Location, SourceBreakpoint, FunctionBreakpoint } from 'vs/workbench/api/node/extHostTypes'; export class ExtHostDebugService implements ExtHostDebugServiceShape { @@ -43,6 +43,11 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { private _activeDebugConsole: ExtHostDebugConsole; get activeDebugConsole(): ExtHostDebugConsole { return this._activeDebugConsole; } + private _breakpoints: Map; + private _breakpointEventsActive: boolean; + + private _onDidChangeBreakpoints: Emitter; + constructor(mainContext: IMainContext, workspace: ExtHostWorkspace) { @@ -58,19 +63,94 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { this._debugServiceProxy = mainContext.get(MainContext.MainThreadDebugService); + this._onDidChangeBreakpoints = new Emitter({ + onFirstListenerAdd: () => { + this.startBreakpoints(); + } + }); + this._activeDebugConsole = new ExtHostDebugConsole(this._debugServiceProxy); + + this._breakpoints = new Map(); + this._breakpointEventsActive = false; + } + + private startBreakpoints() { + if (!this._breakpointEventsActive) { + this._breakpointEventsActive = true; + this._debugServiceProxy.$startBreakpointEvents(); + } + } + + get onDidChangeBreakpoints(): Event { + return this._onDidChangeBreakpoints.event; + } + + get breakpoints(): vscode.Breakpoint[] { + + this.startBreakpoints(); + + const result: vscode.Breakpoint[] = []; + this._breakpoints.forEach(bp => result.push(bp)); + return result; + } + + public $acceptBreakpointsDelta(delta: IBreakpointsDelta): void { + + let a: vscode.Breakpoint[] = []; + let r: vscode.Breakpoint[] = []; + let c: vscode.Breakpoint[] = []; + + if (delta.added) { + a = delta.added.map(bpd => { + const bp = this.fromWire(bpd); + this._breakpoints.set(bpd.id, bp); + return bp; + }); + } + + if (delta.removed) { + r = delta.removed.map(id => { + const bp = this._breakpoints.get(id); + if (bp) { + this._breakpoints.delete(id); + } + return bp; + }); + } + + if (delta.changed) { + c = delta.changed.map(bpd => { + const bp = this.fromWire(bpd); + this._breakpoints.set(bpd.id, bp); + return bp; + }); + } + + this._onDidChangeBreakpoints.fire(Object.freeze({ + added: Object.freeze(a || []), + removed: Object.freeze(r || []), + changed: Object.freeze(c || []) + })); + } + + private fromWire(bp: ISourceBreakpointData | IFunctionBreakpointData): vscode.Breakpoint { + if (bp.type === 'function') { + return new FunctionBreakpoint(bp.enabled, bp.condition, bp.hitCondition, bp.functionName); + } + return new SourceBreakpoint(bp.enabled, bp.condition, bp.hitCondition, new Location(bp.uri, new Position(bp.line, bp.character))); } public registerDebugConfigurationProvider(type: string, provider: vscode.DebugConfigurationProvider): vscode.Disposable { if (!provider) { - return new types.Disposable(() => { }); + return new Disposable(() => { }); } let handle = this.nextHandle(); this._handlers.set(handle, provider); this._debugServiceProxy.$registerDebugConfigurationProvider(type, !!provider.provideDebugConfigurations, !!provider.resolveDebugConfiguration, handle); - return new types.Disposable(() => { + return new Disposable(() => { this._handlers.delete(handle); this._debugServiceProxy.$unregisterDebugConfigurationProvider(handle); }); @@ -87,7 +167,6 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { return asWinJsPromise(token => handler.provideDebugConfigurations(this.getFolder(folderUri), token)); } - public $resolveDebugConfiguration(handle: number, folderUri: URI | undefined, debugConfiguration: vscode.DebugConfiguration): TPromise { let handler = this._handlers.get(handle); if (!handler) { diff --git a/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts b/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts index 607c8c27b4d..da949bda937 100644 --- a/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts +++ b/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts @@ -8,7 +8,6 @@ import Event from 'vs/base/common/event'; import URI from 'vs/base/common/uri'; import { sequence, always } from 'vs/base/common/async'; import { illegalState } from 'vs/base/common/errors'; -import { TPromise } from 'vs/base/common/winjs.base'; import { ExtHostDocumentSaveParticipantShape, MainThreadEditorsShape, IWorkspaceResourceEdit } from 'vs/workbench/api/node/extHost.protocol'; import { TextEdit } from 'vs/workbench/api/node/extHostTypes'; import { fromRange, TextDocumentSaveReason, EndOfLine } from 'vs/workbench/api/node/extHostTypeConverters'; @@ -16,12 +15,15 @@ import { ExtHostDocuments } from 'vs/workbench/api/node/extHostDocuments'; import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import * as vscode from 'vscode'; import { LinkedList } from 'vs/base/common/linkedList'; +import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; + +type Listener = [Function, any, IExtensionDescription]; export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSaveParticipantShape { private _documents: ExtHostDocuments; private _mainThreadEditors: MainThreadEditorsShape; - private _callbacks = new LinkedList<[Function, any]>(); + private _callbacks = new LinkedList(); private _badListeners = new WeakMap(); private _thresholds: { timeout: number; errors: number; }; @@ -35,9 +37,9 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic this._callbacks.clear(); } - get onWillSaveTextDocumentEvent(): Event { + getOnWillSaveTextDocumentEvent(extension: IExtensionDescription): Event { return (listener, thisArg, disposables) => { - const remove = this._callbacks.push([listener, thisArg]); + const remove = this._callbacks.push([listener, thisArg, extension]); const result = { dispose: remove }; if (Array.isArray(disposables)) { disposables.push(result); @@ -46,13 +48,13 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic }; } - $participateInSave(resource: URI, reason: SaveReason): TPromise { + $participateInSave(resource: URI, reason: SaveReason): Thenable { const entries = this._callbacks.toArray(); let didTimeout = false; let didTimeoutHandle = setTimeout(() => didTimeout = true, this._thresholds.timeout); - const promise = sequence(entries.map(([fn, thisArg]) => { + const promise = sequence(entries.map(listener => { return () => { if (didTimeout) { @@ -61,18 +63,17 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic } const document = this._documents.getDocumentData(resource).document; - return this._deliverEventAsyncAndBlameBadListeners(fn, thisArg, { document, reason: TextDocumentSaveReason.to(reason) }); + return this._deliverEventAsyncAndBlameBadListeners(listener, { document, reason: TextDocumentSaveReason.to(reason) }); }; })); - return always(promise, () => clearTimeout(didTimeoutHandle)); } - private _deliverEventAsyncAndBlameBadListeners(listener: Function, thisArg: any, stubEvent: vscode.TextDocumentWillSaveEvent): TPromise { + private _deliverEventAsyncAndBlameBadListeners([listener, thisArg, extension]: Listener, stubEvent: vscode.TextDocumentWillSaveEvent): Promise { const errors = this._badListeners.get(listener); if (errors > this._thresholds.errors) { // bad listener - ignore - return TPromise.wrap(false); + return Promise.resolve(false); } return this._deliverEventAsync(listener, thisArg, stubEvent).then(() => { @@ -93,9 +94,9 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic }); } - private _deliverEventAsync(listener: Function, thisArg: any, stubEvent: vscode.TextDocumentWillSaveEvent): TPromise { + private _deliverEventAsync(listener: Function, thisArg: any, stubEvent: vscode.TextDocumentWillSaveEvent): Promise { - const promises: TPromise[] = []; + const promises: Promise[] = []; const { document, reason } = stubEvent; const { version } = document; @@ -107,7 +108,7 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic if (Object.isFrozen(promises)) { throw illegalState('waitUntil can not be called async'); } - promises.push(TPromise.wrap(p)); + promises.push(Promise.resolve(p)); } }); @@ -115,16 +116,23 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic // fire event listener.apply(thisArg, [event]); } catch (err) { - return TPromise.wrapError(err); + return Promise.reject(err); } // freeze promises after event call Object.freeze(promises); - return new TPromise((resolve, reject) => { + return new Promise((resolve, reject) => { // join on all listener promises, reject after timeout const handle = setTimeout(() => reject(new Error('timeout')), this._thresholds.timeout); - return always(TPromise.join(promises), () => clearTimeout(handle)).then(resolve, reject); + + return Promise.all(promises).then(edits => { + clearTimeout(handle); + resolve(edits); + }).catch(err => { + clearTimeout(handle); + reject(err); + }); }).then(values => { @@ -156,7 +164,7 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic } // TODO@joh bubble this to listener? - return TPromise.wrapError(new Error('concurrent_edits')); + return Promise.reject(new Error('concurrent_edits')); }); } } diff --git a/src/vs/workbench/api/node/extHostExtensionActivator.ts b/src/vs/workbench/api/node/extHostExtensionActivator.ts index 5b36a1aaa79..5038d467d3b 100644 --- a/src/vs/workbench/api/node/extHostExtensionActivator.ts +++ b/src/vs/workbench/api/node/extHostExtensionActivator.ts @@ -159,9 +159,24 @@ export class FailedExtension extends ActivatedExtension { export interface IExtensionsActivatorHost { showMessage(severity: Severity, message: string): void; - actualActivateExtension(extensionDescription: IExtensionDescription, startup: boolean): TPromise; + actualActivateExtension(extensionDescription: IExtensionDescription, reason: ExtensionActivationReason): TPromise; } +export class ExtensionActivatedByEvent { + constructor( + public readonly startup: boolean, + public readonly activationEvent: string + ) { } +} + +export class ExtensionActivatedByAPI { + constructor( + public readonly startup: boolean + ) { } +} + +export type ExtensionActivationReason = ExtensionActivatedByEvent | ExtensionActivatedByAPI; + export class ExtensionsActivator { private readonly _registry: ExtensionDescriptionRegistry; @@ -192,23 +207,23 @@ export class ExtensionsActivator { return this._activatedExtensions[extensionId]; } - public activateByEvent(activationEvent: string, startup: boolean): TPromise { + public activateByEvent(activationEvent: string, reason: ExtensionActivationReason): TPromise { if (this._alreadyActivatedEvents[activationEvent]) { return NO_OP_VOID_PROMISE; } let activateExtensions = this._registry.getExtensionDescriptionsForActivationEvent(activationEvent); - return this._activateExtensions(activateExtensions, startup, 0).then(() => { + return this._activateExtensions(activateExtensions, reason, 0).then(() => { this._alreadyActivatedEvents[activationEvent] = true; }); } - public activateById(extensionId: string, startup: boolean): TPromise { + public activateById(extensionId: string, reason: ExtensionActivationReason): TPromise { let desc = this._registry.getExtensionDescription(extensionId); if (!desc) { throw new Error('Extension `' + extensionId + '` is not known'); } - return this._activateExtensions([desc], startup, 0); + return this._activateExtensions([desc], reason, 0); } /** @@ -252,7 +267,7 @@ export class ExtensionsActivator { } } - private _activateExtensions(extensionDescriptions: IExtensionDescription[], startup: boolean, recursionLevel: number): TPromise { + private _activateExtensions(extensionDescriptions: IExtensionDescription[], reason: ExtensionActivationReason, recursionLevel: number): TPromise { // console.log(recursionLevel, '_activateExtensions: ', extensionDescriptions.map(p => p.id)); if (extensionDescriptions.length === 0) { return TPromise.as(void 0); @@ -294,15 +309,15 @@ export class ExtensionsActivator { if (red.length === 0) { // Finally reached only leafs! - return TPromise.join(green.map((p) => this._activateExtension(p, startup))).then(_ => void 0); + return TPromise.join(green.map((p) => this._activateExtension(p, reason))).then(_ => void 0); } - return this._activateExtensions(green, startup, recursionLevel + 1).then(_ => { - return this._activateExtensions(red, startup, recursionLevel + 1); + return this._activateExtensions(green, reason, recursionLevel + 1).then(_ => { + return this._activateExtensions(red, reason, recursionLevel + 1); }); } - private _activateExtension(extensionDescription: IExtensionDescription, startup: boolean): TPromise { + private _activateExtension(extensionDescription: IExtensionDescription, reason: ExtensionActivationReason): TPromise { if (hasOwnProperty.call(this._activatedExtensions, extensionDescription.id)) { return TPromise.as(void 0); } @@ -311,7 +326,7 @@ export class ExtensionsActivator { return this._activatingExtensions[extensionDescription.id]; } - this._activatingExtensions[extensionDescription.id] = this._host.actualActivateExtension(extensionDescription, startup).then(null, (err) => { + this._activatingExtensions[extensionDescription.id] = this._host.actualActivateExtension(extensionDescription, reason).then(null, (err) => { this._host.showMessage(Severity.Error, nls.localize('activationError', "Activating extension `{0}` failed: {1}.", extensionDescription.id, err.message)); console.error('Activating extension `' + extensionDescription.id + '` failed: ', err.message); console.log('Here is the error stack: ', err.stack); diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 7679350dda8..71a56b06be4 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -6,7 +6,7 @@ import { dispose } from 'vs/base/common/lifecycle'; import { join } from 'path'; -import { mkdirp, dirExists } from 'vs/base/node/pfs'; +import { mkdirp, dirExists, realpath } from 'vs/base/node/pfs'; import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/node/extensionDescriptionRegistry'; @@ -14,13 +14,13 @@ import { IExtensionDescription } from 'vs/platform/extensions/common/extensions' import { ExtHostStorage } from 'vs/workbench/api/node/extHostStorage'; import { createApiFactory, initializeExtensionApi } from 'vs/workbench/api/node/extHost.api.impl'; import { MainContext, MainThreadExtensionServiceShape, IWorkspaceData, IEnvironment, IInitData, ExtHostExtensionServiceShape, MainThreadTelemetryShape } from './extHost.protocol'; -import { IExtensionMemento, ExtensionsActivator, ActivatedExtension, IExtensionAPI, IExtensionContext, EmptyExtension, IExtensionModule, ExtensionActivationTimesBuilder, ExtensionActivationTimes } from 'vs/workbench/api/node/extHostExtensionActivator'; +import { IExtensionMemento, ExtensionsActivator, ActivatedExtension, IExtensionAPI, IExtensionContext, EmptyExtension, IExtensionModule, ExtensionActivationTimesBuilder, ExtensionActivationTimes, ExtensionActivationReason, ExtensionActivatedByEvent } from 'vs/workbench/api/node/extHostExtensionActivator'; import { ExtHostThreadService } from 'vs/workbench/services/thread/node/extHostThreadService'; import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration'; import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; -import { realpath } from 'fs'; import { TernarySearchTree } from 'vs/base/common/map'; import { Barrier } from 'vs/base/common/async'; +import { ILogService } from 'vs/platform/log/common/log'; class ExtensionMemento implements IExtensionMemento { @@ -117,6 +117,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { private readonly _storage: ExtHostStorage; private readonly _storagePath: ExtensionStoragePath; private readonly _proxy: MainThreadExtensionServiceShape; + private readonly _logService: ILogService; private _activator: ExtensionsActivator; private _extensionPathIndex: TPromise>; /** @@ -125,11 +126,13 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { constructor(initData: IInitData, threadService: ExtHostThreadService, extHostWorkspace: ExtHostWorkspace, - extHostConfiguration: ExtHostConfiguration + extHostConfiguration: ExtHostConfiguration, + logService: ILogService ) { this._barrier = new Barrier(); this._registry = new ExtensionDescriptionRegistry(initData.extensions); this._threadService = threadService; + this._logService = logService; this._mainThreadTelemetry = threadService.get(MainContext.MainThreadTelemetry); this._storage = new ExtHostStorage(threadService); this._storagePath = new ExtensionStoragePath(initData.workspace, initData.environment); @@ -137,7 +140,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { this._activator = null; // initialize API first (i.e. do not release barrier until the API is initialized) - const apiFactory = createApiFactory(initData, threadService, extHostWorkspace, extHostConfiguration, this); + const apiFactory = createApiFactory(initData, threadService, extHostWorkspace, extHostConfiguration, this, logService); initializeExtensionApi(this, apiFactory).then(() => { @@ -157,8 +160,8 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { } }, - actualActivateExtension: (extensionDescription: IExtensionDescription, startup: boolean): TPromise => { - return this._activateExtension(extensionDescription, startup); + actualActivateExtension: (extensionDescription: IExtensionDescription, reason: ExtensionActivationReason): TPromise => { + return this._activateExtension(extensionDescription, reason); } }); @@ -178,18 +181,19 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { } public activateByEvent(activationEvent: string, startup: boolean): TPromise { + const reason = new ExtensionActivatedByEvent(startup, activationEvent); if (this._barrier.isOpen()) { - return this._activator.activateByEvent(activationEvent, startup); + return this._activator.activateByEvent(activationEvent, reason); } else { - return this._barrier.wait().then(() => this._activator.activateByEvent(activationEvent, startup)); + return this._barrier.wait().then(() => this._activator.activateByEvent(activationEvent, reason)); } } - public activateById(extensionId: string, startup: boolean): TPromise { + public activateById(extensionId: string, reason: ExtensionActivationReason): TPromise { if (this._barrier.isOpen()) { - return this._activator.activateById(extensionId, startup); + return this._activator.activateById(extensionId, reason); } else { - return this._barrier.wait().then(() => this._activator.activateById(extensionId, startup)); + return this._barrier.wait().then(() => this._activator.activateById(extensionId, reason)); } } @@ -217,16 +221,8 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { if (!ext.main) { return undefined; } - return new TPromise((resolve, reject) => { - realpath(ext.extensionFolderPath, (err, path) => { - if (err) { - reject(err); - } else { - tree.set(path, ext); - resolve(void 0); - } - }); - }); + return realpath(ext.extensionFolderPath).then(value => tree.set(value, ext)); + }); this._extensionPathIndex = TPromise.join(extensions).then(() => tree); } @@ -272,12 +268,17 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { return result; } + public addMessage(extensionId: string, severity: Severity, message: string): void { + this._proxy.$addMessage(extensionId, severity, message); + } + // --- impl - private _activateExtension(extensionDescription: IExtensionDescription, startup: boolean): TPromise { - return this._doActivateExtension(extensionDescription, startup).then((activatedExtension) => { + private _activateExtension(extensionDescription: IExtensionDescription, reason: ExtensionActivationReason): TPromise { + return this._doActivateExtension(extensionDescription, reason).then((activatedExtension) => { const activationTimes = activatedExtension.activationTimes; - this._proxy.$onExtensionActivated(extensionDescription.id, activationTimes.startup, activationTimes.codeLoadingTime, activationTimes.activateCallTime, activationTimes.activateResolvedTime); + let activationEvent = (reason instanceof ExtensionActivatedByEvent ? reason.activationEvent : null); + this._proxy.$onExtensionActivated(extensionDescription.id, activationTimes.startup, activationTimes.codeLoadingTime, activationTimes.activateCallTime, activationTimes.activateResolvedTime, activationEvent); return activatedExtension; }, (err) => { this._proxy.$onExtensionActivationFailed(extensionDescription.id); @@ -285,7 +286,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { }); } - private _doActivateExtension(extensionDescription: IExtensionDescription, startup: boolean): TPromise { + private _doActivateExtension(extensionDescription: IExtensionDescription, reason: ExtensionActivationReason): TPromise { let event = getTelemetryActivationEvent(extensionDescription); /* __GDPR__ "activatePlugin" : { @@ -300,12 +301,14 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { return TPromise.as(new EmptyExtension(ExtensionActivationTimes.NONE)); } - const activationTimesBuilder = new ExtensionActivationTimesBuilder(startup); + this._logService.info(`ExtensionService#_doActivateExtension ${extensionDescription.id} ${JSON.stringify(reason)}`); + + const activationTimesBuilder = new ExtensionActivationTimesBuilder(reason.startup); return TPromise.join([ - loadCommonJSModule(extensionDescription.main, activationTimesBuilder), + loadCommonJSModule(this._logService, extensionDescription.main, activationTimesBuilder), this._loadExtensionContext(extensionDescription) ]).then(values => { - return ExtHostExtensionService._callActivate(values[0], values[1], activationTimesBuilder); + return ExtHostExtensionService._callActivate(this._logService, extensionDescription.id, values[0], values[1], activationTimesBuilder); }, (errors: any[]) => { // Avoid failing with an array of errors, fail with a single error if (errors[0]) { @@ -323,6 +326,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { let globalState = new ExtensionMemento(extensionDescription.id, true, this._storage); let workspaceState = new ExtensionMemento(extensionDescription.id, false, this._storage); + this._logService.trace(`ExtensionService#loadExtensionContext ${extensionDescription.id}`); return TPromise.join([ globalState.whenReady, workspaceState.whenReady, @@ -339,22 +343,23 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { }); } - private static _callActivate(extensionModule: IExtensionModule, context: IExtensionContext, activationTimesBuilder: ExtensionActivationTimesBuilder): Thenable { + private static _callActivate(logService: ILogService, extensionId: string, extensionModule: IExtensionModule, context: IExtensionContext, activationTimesBuilder: ExtensionActivationTimesBuilder): Thenable { // Make sure the extension's surface is not undefined extensionModule = extensionModule || { activate: undefined, deactivate: undefined }; - return this._callActivateOptional(extensionModule, context, activationTimesBuilder).then((extensionExports) => { + return this._callActivateOptional(logService, extensionId, extensionModule, context, activationTimesBuilder).then((extensionExports) => { return new ActivatedExtension(false, activationTimesBuilder.build(), extensionModule, extensionExports, context.subscriptions); }); } - private static _callActivateOptional(extensionModule: IExtensionModule, context: IExtensionContext, activationTimesBuilder: ExtensionActivationTimesBuilder): Thenable { + private static _callActivateOptional(logService: ILogService, extensionId: string, extensionModule: IExtensionModule, context: IExtensionContext, activationTimesBuilder: ExtensionActivationTimesBuilder): Thenable { if (typeof extensionModule.activate === 'function') { try { activationTimesBuilder.activateCallStart(); + logService.trace(`ExtensionService#_callActivateOptional ${extensionId}`); const activateResult: TPromise = extensionModule.activate.apply(global, [context]); activationTimesBuilder.activateCallStop(); @@ -379,9 +384,10 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { } } -function loadCommonJSModule(modulePath: string, activationTimesBuilder: ExtensionActivationTimesBuilder): TPromise { +function loadCommonJSModule(logService: ILogService, modulePath: string, activationTimesBuilder: ExtensionActivationTimesBuilder): TPromise { let r: T = null; activationTimesBuilder.codeLoadingStart(); + logService.info(`ExtensionService#loadCommonJSModule ${modulePath}`); try { r = require.__$__nodeRequire(modulePath); } catch (e) { @@ -399,13 +405,7 @@ function getTelemetryActivationEvent(extensionDescription: IExtensionDescription "name": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, "publisherDisplayName": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, "activationEvents": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "isBuiltin": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "${wildcard}": [ - { - "${prefix}": "contribution.", - "${classification}": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - ] + "isBuiltin": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } } */ let event = { @@ -416,34 +416,5 @@ function getTelemetryActivationEvent(extensionDescription: IExtensionDescription isBuiltin: extensionDescription.isBuiltin }; - for (let contribution in extensionDescription.contributes) { - let contributionDetails = extensionDescription.contributes[contribution]; - - if (!contributionDetails) { - continue; - } - - switch (contribution) { - case 'debuggers': - let types = contributionDetails.reduce((p, c) => p ? p + ',' + c['type'] : c['type'], ''); - event['contribution.debuggers'] = types; - break; - case 'grammars': - let grammers = contributionDetails.reduce((p, c) => p ? p + ',' + c['language'] : c['language'], ''); - event['contribution.grammars'] = grammers; - break; - case 'languages': - let languages = contributionDetails.reduce((p, c) => p ? p + ',' + c['id'] : c['id'], ''); - event['contribution.languages'] = languages; - break; - case 'tmSnippets': - let tmSnippets = contributionDetails.reduce((p, c) => p ? p + ',' + c['languageId'] : c['languageId'], ''); - event['contribution.tmSnippets'] = tmSnippets; - break; - default: - event[`contribution.${contribution}`] = true; - } - } - return event; } diff --git a/src/vs/workbench/api/node/extHostLanguageFeatures.ts b/src/vs/workbench/api/node/extHostLanguageFeatures.ts index 05756e0d7a9..6e5c04f836c 100644 --- a/src/vs/workbench/api/node/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/node/extHostLanguageFeatures.ts @@ -255,7 +255,11 @@ class ReferenceAdapter { } } -class QuickFixAdapter { +export interface CustomCodeAction extends modes.CodeAction { + _isSynthetic?: boolean; +} + +class CodeActionAdapter { private _documents: ExtHostDocuments; private _commands: CommandsConverter; @@ -269,7 +273,7 @@ class QuickFixAdapter { this._provider = provider; } - provideCodeActions(resource: URI, range: IRange): TPromise<(modes.CodeAction | modes.Command)[]> { + provideCodeActions(resource: URI, range: IRange): TPromise { const doc = this._documents.getDocumentData(resource).document; const ran = TypeConverters.toRange(range); @@ -285,39 +289,45 @@ class QuickFixAdapter { } }); - return asWinJsPromise(token => - this._provider.provideCodeActions2 - ? this._provider.provideCodeActions2(doc, ran, { diagnostics: allDiagnostics }, token) - : this._provider.provideCodeActions(doc, ran, { diagnostics: allDiagnostics }, token) - ).then(commands => { - if (!Array.isArray(commands)) { + return asWinJsPromise(token => this._provider.provideCodeActions2 + ? this._provider.provideCodeActions2(doc, ran, { diagnostics: allDiagnostics }, token) + : this._provider.provideCodeActions(doc, ran, { diagnostics: allDiagnostics }, token) + ).then(commandsOrActions => { + if (isFalsyOrEmpty(commandsOrActions)) { return undefined; } - return commands.map((action): modes.CodeAction => { - if (!action) { - return undefined; + const result: CustomCodeAction[] = []; + for (const candidate of commandsOrActions) { + if (!candidate) { + continue; } - - if (typeof action.command === 'string') { - return this._commands.toInternal(action as vscode.Command); + if (CodeActionAdapter._isCommand(candidate)) { + // old school: synthetic code action + result.push({ + _isSynthetic: true, + title: candidate.title, + command: this._commands.toInternal(candidate), + }); + } else { + // new school: convert code action + result.push({ + title: candidate.title, + command: candidate.command && this._commands.toInternal(candidate.command), + diagnostics: candidate.diagnostics && candidate.diagnostics.map(DiagnosticCollection.toMarkerData), + edits: Array.isArray(candidate.edits) + ? TypeConverters.WorkspaceEdit.fromTextEdits(resource, candidate.edits) + : candidate.edits && TypeConverters.WorkspaceEdit.from(candidate.edits), + }); } + } - const codeAction = action as vscode.CodeAction; - return { - title: codeAction.title, - command: codeAction.command ? this._commands.toInternal(codeAction.command) : undefined, - edits: codeAction.edits - ? Array.isArray(codeAction.edits) - ? TypeConverters.WorkspaceEdit.fromTextEdits(resource, codeAction.edits) - : TypeConverters.WorkspaceEdit.from(codeAction.edits) - : undefined, - diagnostics: codeAction.diagnostics - ? codeAction.diagnostics.map(DiagnosticCollection.toMarkerData) - : undefined - } as modes.CodeAction; - }); + return result; }); } + + private static _isCommand(thing: any): thing is vscode.Command { + return typeof (thing).command === 'string' && typeof (thing).title === 'string'; + } } class DocumentFormattingAdapter { @@ -768,7 +778,7 @@ class ColorProviderAdapter { } type Adapter = OutlineAdapter | CodeLensAdapter | DefinitionAdapter | HoverAdapter - | DocumentHighlightAdapter | ReferenceAdapter | QuickFixAdapter | DocumentFormattingAdapter + | DocumentHighlightAdapter | ReferenceAdapter | CodeActionAdapter | DocumentFormattingAdapter | RangeFormattingAdapter | OnTypeFormattingAdapter | NavigateTypeAdapter | RenameAdapter | SuggestAdapter | SignatureHelpAdapter | LinkProviderAdapter | ImplementationAdapter | TypeDefinitionAdapter | ColorProviderAdapter; @@ -933,13 +943,13 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { registerCodeActionProvider(selector: vscode.DocumentSelector, provider: vscode.CodeActionProvider): vscode.Disposable { const handle = this._nextHandle(); - this._adapter.set(handle, new QuickFixAdapter(this._documents, this._commands.converter, this._diagnostics, provider)); + this._adapter.set(handle, new CodeActionAdapter(this._documents, this._commands.converter, this._diagnostics, provider)); this._proxy.$registerQuickFixSupport(handle, selector); return this._createDisposable(handle); } - $provideCodeActions(handle: number, resource: URI, range: IRange): TPromise<(modes.Command | modes.CodeAction)[]> { - return this._withAdapter(handle, QuickFixAdapter, adapter => adapter.provideCodeActions(resource, range)); + $provideCodeActions(handle: number, resource: URI, range: IRange): TPromise { + return this._withAdapter(handle, CodeActionAdapter, adapter => adapter.provideCodeActions(resource, range)); } // --- formatting diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 9c3637a8c4c..9444ef00744 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -17,6 +17,7 @@ import { sortedDiff } from 'vs/base/common/arrays'; import { comparePaths } from 'vs/base/common/comparers'; import * as vscode from 'vscode'; import { ISplice } from 'vs/base/common/sequence'; +import { ILogService } from 'vs/platform/log/common/log'; type ProviderHandle = number; type GroupHandle = number; @@ -443,7 +444,8 @@ export class ExtHostSCM { constructor( mainContext: IMainContext, - private _commands: ExtHostCommands + private _commands: ExtHostCommands, + @ILogService private logService: ILogService ) { this._proxy = mainContext.get(MainContext.MainThreadSCM); @@ -487,6 +489,8 @@ export class ExtHostSCM { } createSourceControl(extension: IExtensionDescription, id: string, label: string, rootUri: vscode.Uri | undefined): vscode.SourceControl { + this.logService.trace('ExtHostSCM#createSourceControl', extension.id, id, label, rootUri); + const handle = ExtHostSCM._handlePool++; const sourceControl = new ExtHostSourceControl(this._proxy, this._commands, id, label, rootUri); this._sourceControls.set(handle, sourceControl); @@ -500,6 +504,8 @@ export class ExtHostSCM { // Deprecated getLastInputBox(extension: IExtensionDescription): ExtHostSCMInputBox { + this.logService.trace('ExtHostSCM#getLastInputBox', extension.id); + const sourceControls = this._sourceControlsByExtension.get(extension.id); const sourceControl = sourceControls && sourceControls[sourceControls.length - 1]; const inputBox = sourceControl && sourceControl.inputBox; @@ -508,6 +514,8 @@ export class ExtHostSCM { } $provideOriginalResource(sourceControlHandle: number, uri: URI): TPromise { + this.logService.trace('ExtHostSCM#$provideOriginalResource', sourceControlHandle, uri); + const sourceControl = this._sourceControls.get(sourceControlHandle); if (!sourceControl || !sourceControl.quickDiffProvider) { @@ -521,6 +529,8 @@ export class ExtHostSCM { } $onInputBoxValueChange(sourceControlHandle: number, value: string): TPromise { + this.logService.trace('ExtHostSCM#$onInputBoxValueChange', sourceControlHandle); + const sourceControl = this._sourceControls.get(sourceControlHandle); if (!sourceControl) { @@ -532,6 +542,8 @@ export class ExtHostSCM { } async $executeResourceCommand(sourceControlHandle: number, groupHandle: number, handle: number): TPromise { + this.logService.trace('ExtHostSCM#$executeResourceCommand', sourceControlHandle, groupHandle, handle); + const sourceControl = this._sourceControls.get(sourceControlHandle); if (!sourceControl) { diff --git a/src/vs/workbench/api/node/extHostTextEditors.ts b/src/vs/workbench/api/node/extHostTextEditors.ts index d3ca9b8edc8..10232e0c87c 100644 --- a/src/vs/workbench/api/node/extHostTextEditors.ts +++ b/src/vs/workbench/api/node/extHostTextEditors.ts @@ -20,13 +20,13 @@ export class ExtHostEditors implements ExtHostEditorsShape { private readonly _onDidChangeTextEditorSelection = new Emitter(); private readonly _onDidChangeTextEditorOptions = new Emitter(); private readonly _onDidChangeTextEditorViewColumn = new Emitter(); - private readonly _onDidChangeActiveTextEditor = new Emitter(); + private readonly _onDidChangeActiveTextEditor = new Emitter(); private readonly _onDidChangeVisibleTextEditors = new Emitter(); readonly onDidChangeTextEditorSelection: Event = this._onDidChangeTextEditorSelection.event; readonly onDidChangeTextEditorOptions: Event = this._onDidChangeTextEditorOptions.event; readonly onDidChangeTextEditorViewColumn: Event = this._onDidChangeTextEditorViewColumn.event; - readonly onDidChangeActiveTextEditor: Event = this._onDidChangeActiveTextEditor.event; + readonly onDidChangeActiveTextEditor: Event = this._onDidChangeActiveTextEditor.event; readonly onDidChangeVisibleTextEditors: Event = this._onDidChangeVisibleTextEditors.event; diff --git a/src/vs/workbench/api/node/extHostTreeViews.ts b/src/vs/workbench/api/node/extHostTreeViews.ts index 71789d1563c..ad9610e5fb2 100644 --- a/src/vs/workbench/api/node/extHostTreeViews.ts +++ b/src/vs/workbench/api/node/extHostTreeViews.ts @@ -7,17 +7,15 @@ import { localize } from 'vs/nls'; import * as vscode from 'vscode'; import URI from 'vs/base/common/uri'; -import { distinct } from 'vs/base/common/arrays'; import { debounceEvent } from 'vs/base/common/event'; import { TPromise } from 'vs/base/common/winjs.base'; import { Disposable } from 'vs/base/common/lifecycle'; import { ExtHostTreeViewsShape, MainThreadTreeViewsShape } from './extHost.protocol'; import { ITreeItem, TreeViewItemHandleArg } from 'vs/workbench/common/views'; -import { TreeItemCollapsibleState } from './extHostTypes'; import { ExtHostCommands, CommandsConverter } from 'vs/workbench/api/node/extHostCommands'; import { asWinJsPromise } from 'vs/base/common/async'; -type TreeItemHandle = number; +type TreeItemHandle = string; export class ExtHostTreeViews implements ExtHostTreeViewsShape { @@ -56,7 +54,7 @@ export class ExtHostTreeViews implements ExtHostTreeViewsShape { return treeView.getTreeItems(); } - $getChildren(treeViewId: string, treeItemHandle?: number): TPromise { + $getChildren(treeViewId: string, treeItemHandle?: string): TPromise { const treeView = this.treeViews.get(treeViewId); if (!treeView) { return TPromise.wrapError(new Error(localize('treeView.notRegistered', 'No tree view with id \'{0}\' registered.', treeViewId))); @@ -70,13 +68,18 @@ export class ExtHostTreeViews implements ExtHostTreeViewsShape { } } +interface TreeNode { + index: number; + handle: TreeItemHandle; + parent: TreeItemHandle; + children: TreeItemHandle[]; +} + class ExtHostTreeView extends Disposable { - private _itemHandlePool = 0; - - private extElementsMap: Map = new Map(); - private itemHandlesMap: Map = new Map(); - private extChildrenElementsMap: Map = new Map(); + private static ROOT_HANDLE = '0'; + private elements: Map = new Map(); + private nodes: Map = new Map(); constructor(private viewId: string, private dataProvider: vscode.TreeDataProvider, private proxy: MainThreadTreeViewsShape, private commands: CommandsConverter) { super(); @@ -87,12 +90,9 @@ class ExtHostTreeView extends Disposable { } getTreeItems(): TPromise { - this.extChildrenElementsMap.clear(); - this.extElementsMap.clear(); - this.itemHandlesMap.clear(); - + this.clearAll(); return asWinJsPromise(() => this.dataProvider.getChildren()) - .then(elements => this.processAndMapElements(elements)); + .then(elements => this.resolveElements(elements)); } getChildren(treeItemHandle: TreeItemHandle): TPromise { @@ -104,77 +104,86 @@ class ExtHostTreeView extends Disposable { } return asWinJsPromise(() => this.dataProvider.getChildren(extElement)) - .then(childrenElements => this.processAndMapElements(childrenElements)); + .then(childrenElements => this.resolveElements(childrenElements, treeItemHandle)) + .then(childrenItems => { + this.nodes.get(extElement).children = childrenItems.map(c => c.handle); + return childrenItems; + }); } getExtensionElement(treeItemHandle: TreeItemHandle): T { - return this.extElementsMap.get(treeItemHandle); + return this.elements.get(treeItemHandle); } private _refresh(elements: T[]): void { const hasRoot = elements.some(element => !element); if (hasRoot) { - this.proxy.$refresh(this.viewId, []); + this.proxy.$refresh(this.viewId); } else { - const itemHandles = distinct(elements.map(element => this.itemHandlesMap.get(element)) - .filter(itemHandle => !!itemHandle)); - if (itemHandles.length) { - this.proxy.$refresh(this.viewId, itemHandles); + const handlesToUpdate = this.getHandlesToUpdate(elements); + if (handlesToUpdate.length) { + this._refreshHandles(handlesToUpdate); } } } - private processAndMapElements(elements: T[]): TPromise { + private resolveElements(elements: T[], parentHandle?: TreeItemHandle): TPromise { if (elements && elements.length) { return TPromise.join( elements.filter(element => !!element) - .map(element => { - if (this.extChildrenElementsMap.has(element)) { - return TPromise.wrapError(new Error(localize('treeView.duplicateElement', 'Element {0} is already registered', element))); - } - return this.resolveElement(element); + .map((element, index) => { + return this.resolveElement(element, index, parentHandle) + .then(treeItem => { + if (treeItem) { + this.nodes.set(element, { + index, + handle: treeItem.handle, + parent: parentHandle, + children: void 0 + }); + if (this.elements.has(treeItem.handle)) { + return TPromise.wrapError(new Error(localize('treeView.duplicateElement', 'Element {0} is already registered', element))); + } + this.elements.set(treeItem.handle, element); + } + return treeItem; + }); })) .then(treeItems => treeItems.filter(treeItem => !!treeItem)); } return TPromise.as([]); } - private resolveElement(element: T): TPromise { + private resolveElement(element: T, index: number, parentHandle?: TreeItemHandle): TPromise { return asWinJsPromise(() => this.dataProvider.getTreeItem(element)) - .then(extTreeItem => { - const treeItem = this.massageTreeItem(extTreeItem); - if (treeItem) { - this.itemHandlesMap.set(element, treeItem.handle); - this.extElementsMap.set(treeItem.handle, element); - if (treeItem.collapsibleState === TreeItemCollapsibleState.Expanded) { - return this.getChildren(treeItem.handle).then(children => { - treeItem.children = children; - return treeItem; - }); - } else { - return treeItem; - } - } - return null; - }); + .then(extTreeItem => this.massageTreeItem(element, extTreeItem, index, parentHandle)); } - private massageTreeItem(extensionTreeItem: vscode.TreeItem): ITreeItem { + private massageTreeItem(element: T, extensionTreeItem: vscode.TreeItem, index: number, parentHandle: TreeItemHandle): ITreeItem { if (!extensionTreeItem) { return null; } const icon = this.getLightIconPath(extensionTreeItem); + const label = extensionTreeItem.label; + const handle = typeof element === 'string' ? element : this.generateHandle(label, index, parentHandle); return { - handle: ++this._itemHandlePool, - label: extensionTreeItem.label, + handle, + parentHandle, + label, command: extensionTreeItem.command ? this.commands.toInternal(extensionTreeItem.command) : void 0, contextValue: extensionTreeItem.contextValue, icon, iconDark: this.getDarkIconPath(extensionTreeItem) || icon, - collapsibleState: extensionTreeItem.collapsibleState, + collapsibleState: extensionTreeItem.collapsibleState }; } + private generateHandle(label: string, index: number, parentHandle: TreeItemHandle): TreeItemHandle { + parentHandle = parentHandle ? parentHandle : ExtHostTreeView.ROOT_HANDLE; + label = label.indexOf('/') !== -1 ? label.replace('/', '//') : label; + return `${parentHandle}/${index}:${label}`; + } + private getLightIconPath(extensionTreeItem: vscode.TreeItem): string { if (extensionTreeItem.iconPath) { if (typeof extensionTreeItem.iconPath === 'string' || extensionTreeItem.iconPath instanceof URI) { @@ -199,29 +208,107 @@ class ExtHostTreeView extends Disposable { return URI.file(iconPath).toString(); } - private clearChildren(extElement: T): void { - const children = this.extChildrenElementsMap.get(extElement); - if (children) { - for (const child of children) { - this.clearElement(child); + private getHandlesToUpdate(elements: T[]): TreeItemHandle[] { + const elementsToUpdate = new Set(); + for (const element of elements) { + let elementNode = this.nodes.get(element); + if (elementNode && !elementsToUpdate.has(elementNode.handle)) { + // check if an ancestor of extElement is already in the elements to update list + let currentNode = elementNode; + while (currentNode && currentNode.parent && !elementsToUpdate.has(currentNode.parent)) { + const parentElement = this.elements.get(currentNode.parent); + currentNode = this.nodes.get(parentElement); + } + if (!currentNode.parent) { + elementsToUpdate.add(elementNode.handle); + } } - this.extChildrenElementsMap.delete(extElement); } + + const handlesToUpdate: TreeItemHandle[] = []; + // Take only top level elements + elementsToUpdate.forEach((handle) => { + const element = this.elements.get(handle); + let node = this.nodes.get(element); + if (node && !elementsToUpdate.has(node.parent)) { + handlesToUpdate.push(handle); + } + }); + + return handlesToUpdate; } - private clearElement(extElement: T): void { - this.clearChildren(extElement); + private _refreshHandles(itemHandles: TreeItemHandle[]): TPromise { + const itemsToRefresh: { [handle: string]: ITreeItem } = {}; + const promises: TPromise[] = []; + itemHandles.forEach(treeItemHandle => { + const extElement = this.getExtensionElement(treeItemHandle); + const node = this.nodes.get(extElement); + const promise = this.resolveElement(extElement, node.index, node.parent) + .then(treeItem => { + if (treeItemHandle !== treeItem.handle) { + // Update caches if handle changes + this.updateCaches(node, treeItem, extElement); + } + itemsToRefresh[treeItemHandle] = treeItem; + }); + promises.push(promise); + }); + return TPromise.join(promises) + .then(treeItems => { + this.proxy.$refresh(this.viewId, itemsToRefresh); + }); + } - const treeItemhandle = this.itemHandlesMap.get(extElement); - this.itemHandlesMap.delete(extElement); - if (treeItemhandle) { - this.extElementsMap.delete(treeItemhandle); + private updateCaches(node: TreeNode, treeItem: ITreeItem, element: T): void { + if (node.parent) { + // Update parent's children handles + const parentElement = this.getExtensionElement(node.parent); + const parentNode = this.nodes.get(parentElement); + parentNode.children[node.index] = treeItem.handle; } + + // Update elements map + this.elements.delete(node.handle); + this.elements.set(treeItem.handle, element); + + // Update node + node.handle = treeItem.handle; + } + + private clearChildren(element: T): void { + let node = this.nodes.get(element); + if (node.children) { + for (const childHandle of node.children) { + const childEleement = this.elements.get(childHandle); + if (childEleement) { + this.clear(childEleement); + } + } + } + node.children = void 0; + } + + private clear(element: T): void { + let node = this.nodes.get(element); + if (node.children) { + for (const childHandle of node.children) { + const childEleement = this.elements.get(childHandle); + if (childEleement) { + this.clear(childEleement); + } + } + } + this.nodes.delete(element); + this.elements.delete(node.handle); + } + + private clearAll(): void { + this.elements.clear(); + this.nodes.clear(); } dispose() { - this.extElementsMap.clear(); - this.itemHandlesMap.clear(); - this.extChildrenElementsMap.clear(); + this.clearAll(); } } \ No newline at end of file diff --git a/src/vs/workbench/api/node/extHostTypeConverters.ts b/src/vs/workbench/api/node/extHostTypeConverters.ts index 5de197f9eb9..f2e7dce967d 100644 --- a/src/vs/workbench/api/node/extHostTypeConverters.ts +++ b/src/vs/workbench/api/node/extHostTypeConverters.ts @@ -17,7 +17,7 @@ import { IPosition } from 'vs/editor/common/core/position'; import { IRange } from 'vs/editor/common/core/range'; import { ISelection } from 'vs/editor/common/core/selection'; import * as htmlContent from 'vs/base/common/htmlContent'; -import { IRelativePattern, isRelativePattern } from 'vs/base/common/glob'; +import { IRelativePattern } from 'vs/base/common/glob'; import { LanguageSelector, LanguageFilter } from 'vs/editor/common/modes/languageSelector'; export interface PositionLike { @@ -252,6 +252,14 @@ export namespace WorkspaceEdit { } return result; } + + export function to(value: modes.WorkspaceEdit) { + const result = new types.WorkspaceEdit(); + for (const edit of value.edits) { + result.replace(edit.resource, toRange(edit.range), edit.newText); + } + return result; + } } @@ -599,6 +607,12 @@ export function toGlobPattern(pattern: vscode.GlobPattern): string | IRelativePa return new types.RelativePattern(pattern.base, pattern.pattern); } +function isRelativePattern(obj: any): obj is vscode.RelativePattern { + const rp = obj as vscode.RelativePattern; + + return rp && typeof rp.base === 'string' && typeof rp.pattern === 'string'; +} + export function toLanguageSelector(selector: vscode.DocumentSelector): LanguageSelector { if (Array.isArray(selector)) { return selector.map(sel => doToLanguageSelector(sel)); @@ -617,4 +631,4 @@ function doToLanguageSelector(selector: string | vscode.DocumentFilter): string scheme: selector.scheme, pattern: toGlobPattern(selector.pattern) }; -} \ No newline at end of file +} diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index d38439f81ee..b0cc9b02062 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1498,3 +1498,36 @@ export class RelativePattern implements IRelativePattern { return relative(from, to); } } + +export class Breakpoint { + + readonly enabled: boolean; + readonly condition?: string; + readonly hitCondition?: string; + + protected constructor(enabled: boolean, condition: string, hitCondition: string) { + this.enabled = enabled; + this.condition = condition; + this.hitCondition = hitCondition; + this.condition = condition; + this.hitCondition = hitCondition; + } +} + +export class SourceBreakpoint extends Breakpoint { + readonly location: Location; + + constructor(enabled: boolean, condition: string, hitCondition: string, location: Location) { + super(enabled, condition, hitCondition); + this.location = location; + } +} + +export class FunctionBreakpoint extends Breakpoint { + readonly functionName: string; + + constructor(enabled: boolean, condition: string, hitCondition: string, functionName: string) { + super(enabled, condition, hitCondition); + this.functionName = functionName; + } +} diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index 654d088c5de..73f38a7da6e 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -14,7 +14,6 @@ import { IWorkspaceData, ExtHostWorkspaceShape, MainContext, MainThreadWorkspace import * as vscode from 'vscode'; import { compare } from 'vs/base/common/strings'; import { TernarySearchTree } from 'vs/base/common/map'; -import { IRelativePattern } from 'vs/base/common/glob'; class Workspace2 extends Workspace { @@ -155,9 +154,30 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape { // --- search --- - findFiles(include: string | IRelativePattern, exclude: string | IRelativePattern, maxResults?: number, token?: vscode.CancellationToken): Thenable { + findFiles(include: vscode.GlobPattern, exclude: vscode.GlobPattern, maxResults?: number, token?: vscode.CancellationToken): Thenable { const requestId = ExtHostWorkspace._requestIdPool++; - const result = this._proxy.$startSearch(include, exclude, maxResults, requestId); + + let includePattern: string; + let includeFolder: string; + if (include) { + if (typeof include === 'string') { + includePattern = include; + } else { + includePattern = include.pattern; + includeFolder = include.base; + } + } + + let excludePattern: string; + if (exclude) { + if (typeof exclude === 'string') { + excludePattern = exclude; + } else { + excludePattern = exclude.pattern; + } + } + + const result = this._proxy.$startSearch(includePattern, includeFolder, excludePattern, maxResults, requestId); if (token) { token.onCancellationRequested(() => this._proxy.$cancelSearch(requestId)); } diff --git a/src/vs/workbench/browser/composite.ts b/src/vs/workbench/browser/composite.ts index 948871f5c17..c7f752077e0 100644 --- a/src/vs/workbench/browser/composite.ts +++ b/src/vs/workbench/browser/composite.ts @@ -26,10 +26,10 @@ import { IConstructorSignature0, IInstantiationService } from 'vs/platform/insta * layout and focus call, but only one create and dispose call. */ export abstract class Composite extends Component implements IComposite { - private _telemetryData: any = {}; + private _onTitleAreaUpdate: Emitter; + private visible: boolean; private parent: Builder; - private _onTitleAreaUpdate: Emitter; protected actionRunner: IActionRunner; @@ -100,42 +100,6 @@ export abstract class Composite extends Component implements IComposite { public setVisible(visible: boolean): TPromise { this.visible = visible; - // Reset telemetry data when composite becomes visible - if (visible) { - this._telemetryData = {}; - this._telemetryData.startTime = new Date(); - - // Only submit telemetry data when not running from an integration test - if (this._telemetryService && this._telemetryService.publicLog) { - const eventName: string = 'compositeOpen'; - /* __GDPR__ - "compositeOpen" : { - "composite" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this._telemetryService.publicLog(eventName, { composite: this.getId() }); - } - } - - // Send telemetry data when composite hides - else { - this._telemetryData.timeSpent = (Date.now() - this._telemetryData.startTime) / 1000; - delete this._telemetryData.startTime; - - // Only submit telemetry data when not running from an integration test - if (this._telemetryService && this._telemetryService.publicLog) { - const eventName: string = 'compositeShown'; - this._telemetryData.composite = this.getId(); - /* __GDPR__ - "compositeShown" : { - "timeSpent" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "composite": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this._telemetryService.publicLog(eventName, this._telemetryData); - } - } - return TPromise.as(null); } diff --git a/src/vs/workbench/browser/editor.ts b/src/vs/workbench/browser/editor.ts index 24c226052d9..16a6140a6e4 100644 --- a/src/vs/workbench/browser/editor.ts +++ b/src/vs/workbench/browser/editor.ts @@ -12,6 +12,8 @@ import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { IConstructorSignature0, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { isArray } from 'vs/base/common/types'; import URI from 'vs/base/common/uri'; +import { DataTransfers } from 'vs/base/browser/dnd'; +import { IEditorViewState } from 'vs/editor/common/editorCommon'; export interface IEditorDescriptor { instantiate(instantiationService: IInstantiationService): BaseEditor; @@ -204,20 +206,50 @@ export interface IDraggedResource { isExternal: boolean; } -export function extractResources(e: DragEvent, externalOnly?: boolean): IDraggedResource[] { - const resources: IDraggedResource[] = []; +export interface IDraggedEditor extends IDraggedResource { + backupResource?: URI; + viewState?: IEditorViewState; +} + +export interface ISerializedDraggedEditor { + resource: string; + backupResource: string; + viewState: IEditorViewState; +} + +export const CodeDataTransfers = { + EDITOR: 'CodeEditor' +}; + +export function extractResources(e: DragEvent, externalOnly?: boolean): (IDraggedResource | IDraggedEditor)[] { + const resources: (IDraggedResource | IDraggedEditor)[] = []; if (e.dataTransfer.types.length > 0) { - // Check for in-app DND + // Check for window-to-window DND if (!externalOnly) { - const rawData = e.dataTransfer.getData('URL'); - if (rawData) { + + // Data Transfer: Code Editor + const rawEditorData = e.dataTransfer.getData(CodeDataTransfers.EDITOR); + if (rawEditorData) { try { - resources.push({ resource: URI.parse(rawData), isExternal: false }); + const draggedEditor = JSON.parse(rawEditorData) as ISerializedDraggedEditor; + resources.push({ resource: URI.parse(draggedEditor.resource), backupResource: URI.parse(draggedEditor.backupResource), viewState: draggedEditor.viewState, isExternal: false }); } catch (error) { // Invalid URI } } + + // Data Transfer: URL + else { + const rawURLData = e.dataTransfer.getData(DataTransfers.URL); + if (rawURLData) { + try { + resources.push({ resource: URI.parse(rawURLData), isExternal: false }); + } catch (error) { + // Invalid URI + } + } + } } // Check for native file transfer diff --git a/src/vs/workbench/browser/labels.ts b/src/vs/workbench/browser/labels.ts index 72857199426..08f2178ba7b 100644 --- a/src/vs/workbench/browser/labels.ts +++ b/src/vs/workbench/browser/labels.ts @@ -183,7 +183,7 @@ export class ResourceLabel extends IconLabel { if (this.options && typeof this.options.title === 'string') { iconLabelOptions.title = this.options.title; - } else if (resource) { + } else if (resource && resource.scheme !== Schemas.data /* do not accidentally inline Data URIs */) { iconLabelOptions.title = getPathLabel(resource, void 0, this.environmentService); } diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index d04e8eefb73..81b49fbed8d 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -686,6 +686,10 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal } public getVerticalSashHeight(sash: Sash): number { + if (sash === this.sashXTwo && !this.partService.isVisible(Parts.PANEL_PART)) { + return 0; + } + return this.sidebarHeight; } diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index e703469831b..d0c3072491e 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -18,7 +18,7 @@ import { Part } from 'vs/workbench/browser/part'; import { GlobalActivityActionItem, GlobalActivityAction, ViewletActivityAction, ToggleViewletAction } from 'vs/workbench/browser/parts/activitybar/activitybarActions'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IBadge } from 'vs/workbench/services/activity/common/activity'; -import { IPartService, Position as SideBarPosition } from 'vs/workbench/services/part/common/partService'; +import { IPartService, Parts, Position as SideBarPosition } from 'vs/workbench/services/part/common/partService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; @@ -39,6 +39,7 @@ export class ActivitybarPart extends Part { badgeForeground: ACTIVITY_BAR_BADGE_FOREGROUND, dragAndDropBackground: ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND }; + private static readonly ACTION_HEIGHT = 50; public _serviceBrand: any; @@ -72,7 +73,7 @@ export class ActivitybarPart extends Part { getDefaultCompositeId: () => this.viewletService.getDefaultViewletId(), hidePart: () => this.partService.setSideBarHidden(true), colors: ActivitybarPart.COLORS, - overflowActionSize: 50 + overflowActionSize: ActivitybarPart.ACTION_HEIGHT }); this.registerListeners(); } @@ -184,6 +185,9 @@ export class ActivitybarPart extends Part { * Layout title, content and status area in the given dimension. */ public layout(dimension: Dimension): Dimension[] { + if (!this.partService.isVisible(Parts.ACTIVITYBAR_PART)) { + return [dimension]; + } // Pass to super const sizes = super.layout(dimension); @@ -193,7 +197,7 @@ export class ActivitybarPart extends Part { let availableHeight = this.dimension.height; if (this.globalActionBar) { // adjust height for global actions showing - availableHeight -= (this.globalActionBar.items.length * this.globalActionBar.domNode.clientHeight); + availableHeight -= (this.globalActionBar.items.length * ActivitybarPart.ACTION_HEIGHT); } this.compositeBar.layout(new Dimension(dimension.width, availableHeight)); diff --git a/src/vs/workbench/browser/parts/compositebar/compositeBar.ts b/src/vs/workbench/browser/parts/compositebar/compositeBar.ts index 8d0c918c653..24b4a899842 100644 --- a/src/vs/workbench/browser/parts/compositebar/compositeBar.ts +++ b/src/vs/workbench/browser/parts/compositebar/compositeBar.ts @@ -223,15 +223,22 @@ export class CompositeBar implements ICompositeBar { if (overflows) { size -= this.compositeSizeInBar.get(compositesToShow[maxVisible]); compositesToShow = compositesToShow.slice(0, maxVisible); + size += this.options.overflowActionSize; } // Check if we need to make extra room for the overflow action - if (overflows && (size + this.options.overflowActionSize > limit)) { - compositesToShow.pop(); + if (size > limit) { + size -= this.compositeSizeInBar.get(compositesToShow.pop()); } + // We always try show the active composite if (this.activeCompositeId && compositesToShow.length && compositesToShow.indexOf(this.activeCompositeId) === -1) { - compositesToShow.pop(); + const removedComposite = compositesToShow.pop(); + size = size - this.compositeSizeInBar.get(removedComposite) + this.compositeSizeInBar.get(this.activeCompositeId); compositesToShow.push(this.activeCompositeId); } + // The active composite might have bigger size than the removed composite, check for overflow again + if (size > limit) { + compositesToShow.length ? compositesToShow.splice(compositesToShow.length - 2, 1) : compositesToShow.pop(); + } const visibleComposites = Object.keys(this.compositeIdToActions); const visibleCompositesChange = !arrays.equals(compositesToShow, visibleComposites); @@ -348,6 +355,9 @@ export class CompositeBar implements ICompositeBar { const visibleComposites = this.getVisibleComposites(); let unpinPromise: TPromise; + // remove from pinned + const index = this.pinnedComposites.indexOf(compositeId); + this.pinnedComposites.splice(index, 1); // Case: composite is not the active one or the active one is a different one // Solv: we do nothing @@ -374,10 +384,6 @@ export class CompositeBar implements ICompositeBar { } unpinPromise.then(() => { - // then remove from pinned and update switcher - const index = this.pinnedComposites.indexOf(compositeId); - this.pinnedComposites.splice(index, 1); - this.updateCompositeSwitcher(); }); } diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 4e23ee561e5..d099ee571e0 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -323,11 +323,13 @@ export abstract class BaseFocusSideGroupAction extends Action { else if (referenceEditor) { const history = this.historyService.getHistory(); for (let input of history) { - if (input instanceof EditorInput && input.supportsSplitEditor()) { - return this.editorService.openEditor(input, { pinned: true }, this.getTargetEditorSide()); + if (input instanceof EditorInput) { + if (input.supportsSplitEditor()) { + return this.editorService.openEditor(input, { pinned: true }, this.getTargetEditorSide()); + } + } else { + return this.editorService.openEditor({ resource: (input as IResourceInput).resource, options: { pinned: true } }, this.getTargetEditorSide()); } - - return this.editorService.openEditor({ resource: (input as IResourceInput).resource, options: { pinned: true } }, this.getTargetEditorSide()); } } @@ -583,9 +585,14 @@ export class RevertAndCloseEditorAction extends Action { const input = activeEditor.input; const position = activeEditor.position; - return activeEditor.input.revert().then(ok => - this.editorService.closeEditor(position, input) - ); + // first try a normal revert where the contents of the editor are restored + return activeEditor.input.revert().then(() => this.editorService.closeEditor(position, input), error => { + // if that fails, since we are about to close the editor, we accept that + // the editor cannot be reverted and instead do a soft revert that just + // enables us to close the editor. With this, a user can always close a + // dirty editor even when reverting fails. + return activeEditor.input.revert({ soft: true }).then(() => this.editorService.closeEditor(position, input)); + }); } return TPromise.as(false); diff --git a/src/vs/workbench/browser/parts/editor/editorAreaDropHandler.ts b/src/vs/workbench/browser/parts/editor/editorAreaDropHandler.ts new file mode 100644 index 00000000000..587ceeb9128 --- /dev/null +++ b/src/vs/workbench/browser/parts/editor/editorAreaDropHandler.ts @@ -0,0 +1,171 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { IDraggedResource, IDraggedEditor, extractResources } from 'vs/workbench/browser/editor'; +import { WORKSPACE_EXTENSION, IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; +import { extname } from 'vs/base/common/paths'; +import { IFileService } from 'vs/platform/files/common/files'; +import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; +import URI from 'vs/base/common/uri'; +import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { BACKUP_FILE_RESOLVE_OPTIONS, IBackupFileService } from 'vs/workbench/services/backup/common/backup'; +import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { Schemas } from 'vs/base/common/network'; +import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { Position } from 'vs/platform/editor/common/editor'; +import { onUnexpectedError } from 'vs/base/common/errors'; + +/** + * Shared function across some editor components to handle drag & drop of external resources. E.g. of folders and workspace files + * to open them in the window instead of the editor or to handle dirty editors being dropped between instances of Code. + */ +export class EditorAreaDropHandler { + + constructor( + @IFileService private fileService: IFileService, + @IWindowsService private windowsService: IWindowsService, + @IWindowService private windowService: IWindowService, + @IWorkspacesService private workspacesService: IWorkspacesService, + @ITextFileService private textFileService: ITextFileService, + @IBackupFileService private backupFileService: IBackupFileService, + @IEditorGroupService private groupService: IEditorGroupService, + @IUntitledEditorService private untitledEditorService: IUntitledEditorService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + ) { + } + + public handleDrop(event: DragEvent, afterDrop: () => void, targetPosition: Position, targetIndex?: number): void { + const resources = extractResources(event).filter(r => r.resource.scheme === Schemas.file || r.resource.scheme === Schemas.untitled); + if (!resources.length) { + return; + } + + return this.doHandleDrop(resources).then(isWorkspaceOpening => { + if (isWorkspaceOpening) { + return void 0; // return early if the drop operation resulted in this window changing to a workspace + } + + // Add external ones to recently open list unless dropped resource is a workspace + const externalResources = resources.filter(d => d.isExternal).map(d => d.resource); + if (externalResources.length) { + this.windowsService.addRecentlyOpened(externalResources.map(resource => resource.fsPath)); + } + + // Open in Editor + return this.windowService.focusWindow() + .then(() => this.editorService.openEditors(resources.map(r => { + return { + input: { + resource: r.resource, + options: { + pinned: true, + index: targetIndex, + viewState: (r as IDraggedEditor).viewState + } + }, + position: targetPosition + }; + }))).then(() => { + + // Finish with provided function + afterDrop(); + }); + }).done(null, onUnexpectedError); + } + + private doHandleDrop(resources: (IDraggedResource | IDraggedEditor)[]): TPromise { + + // Check for dirty editor being dropped + if (resources.length === 1 && !resources[0].isExternal && (resources[0] as IDraggedEditor).backupResource) { + return this.handleDirtyEditorDrop(resources[0]); + } + + // Check for workspace file being dropped + if (resources.some(r => r.isExternal)) { + return this.handleWorkspaceFileDrop(resources); + } + + return TPromise.as(false); + } + + private handleDirtyEditorDrop(droppedDirtyEditor: IDraggedEditor): TPromise { + + // Untitled: always ensure that we open a new untitled for each file we drop + if (droppedDirtyEditor.resource.scheme === Schemas.untitled) { + droppedDirtyEditor.resource = this.untitledEditorService.createOrGet().getResource(); + } + + // Return early if the resource is already dirty in target or opened already + if (this.textFileService.isDirty(droppedDirtyEditor.resource) || this.groupService.getStacksModel().isOpen(droppedDirtyEditor.resource)) { + return TPromise.as(false); + } + + // Resolve the contents of the dropped dirty resource from source + return this.textFileService.resolveTextContent(droppedDirtyEditor.backupResource, BACKUP_FILE_RESOLVE_OPTIONS).then(content => { + + // Set the contents of to the resource to the target + return this.backupFileService.backupResource(droppedDirtyEditor.resource, this.backupFileService.parseBackupContent(content.value)); + }).then(() => false, () => false /* ignore any error */); + } + + private handleWorkspaceFileDrop(resources: (IDraggedResource | IDraggedEditor)[]): TPromise { + const externalResources = resources.filter(d => d.isExternal).map(d => d.resource); + + const externalWorkspaceResources: { workspaces: URI[], folders: URI[] } = { + workspaces: [], + folders: [] + }; + + return TPromise.join(externalResources.map(resource => { + + // Check for Workspace + if (extname(resource.fsPath) === `.${WORKSPACE_EXTENSION}`) { + externalWorkspaceResources.workspaces.push(resource); + + return void 0; + } + + // Check for Folder + return this.fileService.resolveFile(resource).then(stat => { + if (stat.isDirectory) { + externalWorkspaceResources.folders.push(stat.resource); + } + }, error => void 0); + })).then(_ => { + const { workspaces, folders } = externalWorkspaceResources; + + // Return early if no external resource is a folder or workspace + if (workspaces.length === 0 && folders.length === 0) { + return false; + } + + // Pass focus to window + this.windowService.focusWindow(); + + let workspacesToOpen: TPromise; + + // Open in separate windows if we drop workspaces or just one folder + if (workspaces.length > 0 || folders.length === 1) { + workspacesToOpen = TPromise.as([...workspaces, ...folders].map(resources => resources.fsPath)); + } + + // Multiple folders: Create new workspace with folders and open + else if (folders.length > 1) { + workspacesToOpen = this.workspacesService.createWorkspace(folders.map(folder => ({ uri: folder }))).then(workspace => [workspace.configPath]); + } + + // Open + workspacesToOpen.then(workspaces => { + this.windowsService.openWindow(workspaces, { forceReuseWindow: true }); + }); + + return true; + }); + } +} \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index 6c5c2fd6e17..a6e2d0b65b7 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -21,26 +21,21 @@ import { isMacintosh } from 'vs/base/common/platform'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { Position, POSITIONS } from 'vs/platform/editor/common/editor'; import { IEditorGroupService, IEditorTabOptions, GroupArrangement, GroupOrientation } from 'vs/workbench/services/group/common/groupService'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { TabsTitleControl } from 'vs/workbench/browser/parts/editor/tabsTitleControl'; -import { TitleControl, ITitleAreaControl, handleWorkspaceExternalDrop } from 'vs/workbench/browser/parts/editor/titleControl'; +import { TitleControl, ITitleAreaControl } from 'vs/workbench/browser/parts/editor/titleControl'; import { NoTabsTitleControl } from 'vs/workbench/browser/parts/editor/noTabsTitleControl'; import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup, EditorOptions, TextEditorOptions, IEditorIdentifier } from 'vs/workbench/common/editor'; -import { extractResources } from 'vs/workbench/browser/editor'; -import { IWindowService, IWindowsService } from 'vs/platform/windows/common/windows'; import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorBackground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { Themable, EDITOR_GROUP_HEADER_TABS_BACKGROUND, EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND, EDITOR_GROUP_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_GROUP_BACKGROUND, EDITOR_GROUP_HEADER_TABS_BORDER } from 'vs/workbench/common/theme'; import { attachProgressBarStyler } from 'vs/platform/theme/common/styler'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { IFileService } from 'vs/platform/files/common/files'; -import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; import { IDisposable, combinedDisposable } from 'vs/base/common/lifecycle'; +import { EditorAreaDropHandler } from 'vs/workbench/browser/parts/editor/editorAreaDropHandler'; export enum Rochade { NONE, @@ -88,7 +83,6 @@ export interface IEditorGroupsControl { getRatio(): number[]; - dispose(): void; } @@ -147,16 +141,10 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro groupOrientation: GroupOrientation, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IEditorGroupService private editorGroupService: IEditorGroupService, - @ITelemetryService private telemetryService: ITelemetryService, @IContextKeyService private contextKeyService: IContextKeyService, @IExtensionService private extensionService: IExtensionService, @IInstantiationService private instantiationService: IInstantiationService, - @IWindowService private windowService: IWindowService, - @IWindowsService private windowsService: IWindowsService, - @IThemeService themeService: IThemeService, - @IFileService private fileService: IFileService, - @IMessageService private messageService: IMessageService, - @IWorkspacesService private workspacesService: IWorkspacesService + @IThemeService themeService: IThemeService ) { super(themeService); @@ -229,6 +217,9 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro private updateTabOptions(tabOptions: IEditorTabOptions, refresh?: boolean): void { const tabCloseButton = this.tabOptions ? this.tabOptions.tabCloseButton : 'right'; + const tabSizing = this.tabOptions ? this.tabOptions.tabSizing : 'fit'; + const iconTheme = this.tabOptions ? this.tabOptions.iconTheme : 'vs-seti'; + this.tabOptions = tabOptions; if (!refresh) { @@ -265,8 +256,13 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro this.createTitleControl(this.stacks.groupAt(position), this.silos[position], titleContainer, this.getInstantiationService(position)); } - // Refresh title when icons change - else if (showingIcons !== this.tabOptions.showIcons || tabCloseButton !== this.tabOptions.tabCloseButton) { + // Refresh title when layout options change + else if ( + showingIcons !== this.tabOptions.showIcons || + tabCloseButton !== this.tabOptions.tabCloseButton || + tabSizing !== this.tabOptions.tabSizing || + iconTheme !== this.tabOptions.iconTheme + ) { titleControl.refresh(); } } @@ -444,15 +440,6 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro // Automatically maximize this position if it is minimized if (this.isSiloMinimized(this.lastActivePosition)) { - - // Log this fact in telemetry - if (this.telemetryService) { - /* __GDPR__ - "workbenchEditorMaximized" : {} - */ - this.telemetryService.publicLog('workbenchEditorMaximized'); - } - let remainingSize = this.totalSize; let layout = false; @@ -1125,36 +1112,14 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro // Check for URI transfer else { - const droppedResources = extractResources(e).filter(r => r.resource.scheme === 'file' || r.resource.scheme === 'untitled'); - if (droppedResources.length) { - handleWorkspaceExternalDrop(droppedResources, $this.fileService, $this.messageService, $this.windowsService, $this.windowService, $this.workspacesService).then(handled => { - if (handled) { - return; - } + const dropHandler = $this.instantiationService.createInstance(EditorAreaDropHandler); + dropHandler.handleDrop(e, () => { + if (splitEditor && splitTo !== freeGroup) { + groupService.moveGroup(freeGroup, splitTo); + } - // Add external ones to recently open list - const externalResources = droppedResources.filter(d => d.isExternal).map(d => d.resource); - if (externalResources.length) { - $this.windowsService.addRecentlyOpened(externalResources.map(resource => resource.fsPath)); - } - - // Open in Editor - $this.windowService.focusWindow() - .then(() => editorService.openEditors(droppedResources.map(d => { - return { - input: { resource: d.resource, options: { pinned: true } }, - position: splitEditor ? freeGroup : position - }; - }))).then(() => { - if (splitEditor && splitTo !== freeGroup) { - groupService.moveGroup(freeGroup, splitTo); - } - - groupService.focusGroup(splitEditor ? splitTo : position); - }) - .done(null, errors.onUnexpectedError); - }); - } + groupService.focusGroup(splitEditor ? splitTo : position); + }, splitEditor ? freeGroup : position); } } diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 48e81a3e15d..166e435a60c 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -41,7 +41,7 @@ import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/c import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorBackground } from 'vs/platform/theme/common/colorRegistry'; import { EDITOR_GROUP_BACKGROUND } from 'vs/workbench/common/theme'; -import { createCSSRule } from 'vs/base/browser/dom'; +import { createCSSRule, scheduleAtNextAnimationFrame } from 'vs/base/browser/dom'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { join } from 'vs/base/common/paths'; import { IEditorDescriptor, IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/browser/editor'; @@ -162,26 +162,21 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService showIcons: editorConfig.showIcons, showTabs: editorConfig.showTabs, tabCloseButton: editorConfig.tabCloseButton, + tabSizing: editorConfig.tabSizing, labelFormat: editorConfig.labelFormat, + iconTheme: config.workbench.iconTheme }; this.revealIfOpen = editorConfig.revealIfOpen; - - /* __GDPR__ - "workbenchEditorConfiguration" : { - "${include}": [ - "${IWorkbenchEditorConfiguration}" - ] - } - */ - this.telemetryService.publicLog('workbenchEditorConfiguration', objects.deepClone(editorConfig)); // Clone because telemetry service will modify the passed data by adding more details. } else { this.tabOptions = { previewEditors: true, showIcons: false, showTabs: true, tabCloseButton: 'right', + tabSizing: 'fit', labelFormat: 'default', + iconTheme: 'vs-seti' }; this.revealIfOpen = false; @@ -214,7 +209,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService } private onConfigurationUpdated(event: IConfigurationChangeEvent): void { - if (event.affectsConfiguration('workbench.editor')) { + if (event.affectsConfiguration('workbench.editor') || event.affectsConfiguration('workbench.iconTheme')) { const configuration = this.configurationService.getValue(); if (configuration && configuration.workbench && configuration.workbench.editor) { const editorConfig = configuration.workbench.editor; @@ -234,8 +229,10 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService previewEditors: newPreviewEditors, showIcons: editorConfig.showIcons, tabCloseButton: editorConfig.tabCloseButton, + tabSizing: editorConfig.tabSizing, showTabs: this.forceHideTabs ? false : editorConfig.showTabs, labelFormat: editorConfig.labelFormat, + iconTheme: configuration.workbench.iconTheme }; if (!this.doNotFireTabOptionsChanged && !objects.equals(oldTabOptions, this.tabOptions)) { @@ -359,16 +356,6 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService return TPromise.wrapError(new Error(strings.format('Can not find a registered editor for the input {0}', input))); } - // Opened to the side - if (position !== Position.ONE) { - /* __GDPR__ - "workbenchSideEditorOpened" : { - "position" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('workbenchSideEditorOpened', { position: position }); - } - // Update stacks: We do this early on before the UI is there because we want our stacks model to have // a consistent view of the editor world and updating it later async after the UI is there will cause // issues (e.g. when a closeEditor call is made that expects the openEditor call to have updated the @@ -575,7 +562,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService // Recover by closing the active editor (if the input is still the active one) if (group.activeEditor === input) { - this.doCloseActiveEditor(group); + this.doCloseActiveEditor(group, !(options && options.preserveFocus) /* still preserve focus as needed */); } } @@ -705,9 +692,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService } // Check for dirty and veto - const editorsToClose = arrays.flatten(groups.map(group => group.getEditors().map(editor => { return { group, editor }; }))); - - return this.handleDirty(editorsToClose).then(veto => { + return this.handleDirty(arrays.flatten(groups.map(group => group.getEditors(true /* in MRU order */).map(editor => { return { group, editor }; })))).then(veto => { if (veto) { return; } @@ -722,19 +707,24 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService return TPromise.wrap(null); } - let editors = group.getEditors(); + let editorsToClose = group.getEditors(true /* in MRU order */); + + // Filter: unmodified only if (filter.unmodifiedOnly) { - editors = editors.filter(e => !e.isDirty()); + editorsToClose = editorsToClose.filter(e => !e.isDirty()); + } + + // Filter: direction (left / right) + if (!types.isUndefinedOrNull(filter.direction)) { + editorsToClose = (filter.direction === Direction.LEFT) ? editorsToClose.slice(0, group.indexOf(filter.except)) : editorsToClose.slice(group.indexOf(filter.except) + 1); + } + + // Filter: except + else { + editorsToClose = editorsToClose.filter(e => !filter.except || !e.matches(filter.except)); } // Check for dirty and veto - let editorsToClose: EditorInput[]; - if (types.isUndefinedOrNull(filter.direction)) { - editorsToClose = editors.filter(e => !filter.except || !e.matches(filter.except)); - } else { - editorsToClose = (filter.direction === Direction.LEFT) ? editors.slice(0, group.indexOf(filter.except)) : editors.slice(group.indexOf(filter.except) + 1); - } - return this.handleDirty(editorsToClose.map(editor => { return { group, editor }; }), true /* ignore if opened in other group */).then(veto => { if (veto) { return; @@ -830,17 +820,50 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService const { editor } = identifier; - const res = editor.confirmSave(); - switch (res) { - case ConfirmResult.SAVE: - return editor.save().then(ok => !ok); + // Switch to editor that we want to handle + return this.openEditor(identifier.editor, null, this.stacks.positionOfGroup(identifier.group)).then(() => { + return this.ensureEditorOpenedBeforePrompt().then(() => { + const res = editor.confirmSave(); + switch (res) { + case ConfirmResult.SAVE: + return editor.save().then(ok => !ok); - case ConfirmResult.DONT_SAVE: - return editor.revert().then(ok => !ok); + case ConfirmResult.DONT_SAVE: + // first try a normal revert where the contents of the editor are restored + return editor.revert().then(ok => !ok, error => { + // if that fails, since we are about to close the editor, we accept that + // the editor cannot be reverted and instead do a soft revert that just + // enables us to close the editor. With this, a user can always close a + // dirty editor even when reverting fails. + return editor.revert({ soft: true }).then(ok => !ok); + }); - case ConfirmResult.CANCEL: - return TPromise.as(true); // veto - } + case ConfirmResult.CANCEL: + return true; // veto + } + }); + }); + } + + private ensureEditorOpenedBeforePrompt(): TPromise { + + // Force title area update + this.editorGroupsControl.updateTitleAreas(true /* refresh active group */); + + // TODO@Ben our dialogs currently use the sync API, which means they block the JS + // thread when showing. As such, any UI update will not happen unless we wait a little + // bit. We wait for 2 request animation frames before showing the confirm. The first + // frame is where the UI is updating and the second is good enough to bring up the dialog. + // See also https://github.com/Microsoft/vscode/issues/39536 + return new TPromise(c => { + scheduleAtNextAnimationFrame(() => { + // Here the UI is updating + scheduleAtNextAnimationFrame(() => { + // Here we can show a blocking dialog + c(void 0); + }); + }); + }); } private countEditors(editor: EditorInput): number { diff --git a/src/vs/workbench/browser/parts/editor/editorPicker.ts b/src/vs/workbench/browser/parts/editor/editorPicker.ts index 979df653a59..abe0d8a17a9 100644 --- a/src/vs/workbench/browser/parts/editor/editorPicker.ts +++ b/src/vs/workbench/browser/parts/editor/editorPicker.ts @@ -16,7 +16,7 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { getIconClasses } from 'vs/workbench/browser/labels'; import { IModelService } from 'vs/editor/common/services/modelService'; import { QuickOpenHandler } from 'vs/workbench/browser/quickopen'; -import { Position } from 'vs/platform/editor/common/editor'; +import { Position, IEditorOptions } from 'vs/platform/editor/common/editor'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -71,15 +71,13 @@ export class EditorPickerEntry extends QuickOpenEntryGroup { } public run(mode: Mode, context: IEntryRunContext): boolean { - if (mode === Mode.OPEN) { - return this.runOpen(context); + let options: IEditorOptions; + if (mode === Mode.PREVIEW) { + options = { preserveFocus: true }; // in preview, make sure to keep focus in quick open } - return super.run(mode, context); - } - - private runOpen(context: IEntryRunContext): boolean { - this.editorService.openEditor(this.editor, null, this.stacks.positionOfGroup(this.group)).done(null, errors.onUnexpectedError); + // Open Editor + this.editorService.openEditor(this.editor, options, this.stacks.positionOfGroup(this.group)).done(null, errors.onUnexpectedError); return true; } diff --git a/src/vs/workbench/browser/parts/editor/media/tabstitle.css b/src/vs/workbench/browser/parts/editor/media/tabstitle.css index f28bc2a599c..3dcea34628f 100644 --- a/src/vs/workbench/browser/parts/editor/media/tabstitle.css +++ b/src/vs/workbench/browser/parts/editor/media/tabstitle.css @@ -37,8 +37,6 @@ .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab { display: flex; - width: 120px; - min-width: fit-content; white-space: nowrap; cursor: pointer; height: 35px; @@ -47,10 +45,35 @@ padding-left: 10px; } +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-shrink.has-icon-theme.close-button-right, +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-shrink.has-icon-theme.close-button-off { + padding-left: 5px; /* reduce padding when we show icons and are in shrinking mode and tab close button is not left */ +} + +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-fit { + width: 120px; + min-width: fit-content; +} + +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-shrink { + min-width: 60px; + flex-basis: 0; /* all tabs are even */ + flex-grow: 1; /* all tabs grow even */ + max-width: fit-content; +} + +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-shrink.close-button-left { + min-width: 80px; /* make more room for close button when it shows to the left */ +} + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.dragged { will-change: transform; /* forces tab to be drawn on a separate layer (fixes https://github.com/Microsoft/vscode/issues/18733) */ } +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.dragged-over * { + pointer-events: none; /* prevents cursor flickering (fixes https://github.com/Microsoft/vscode/issues/38753) */ +} + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.close-button-left { flex-direction: row-reverse; padding-left: 0; @@ -64,8 +87,8 @@ margin-bottom: auto; } -.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab .monaco-icon-label, -.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab .monaco-icon-label > .monaco-icon-label-description-container { +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-fit .monaco-icon-label, +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-fit .monaco-icon-label > .monaco-icon-label-description-container { overflow: visible; /* fixes https://github.com/Microsoft/vscode/issues/20182 */ } @@ -81,6 +104,16 @@ width: 28px; } +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.close-button-right.sizing-shrink > .tab-close { + flex: 0; + overflow: hidden; /* let the close button be pushed out of view when sizing is set to shrink to make more room... */ +} + +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.dirty.close-button-right.sizing-shrink > .tab-close, +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.close-button-right.sizing-shrink:hover > .tab-close { + overflow: visible; /* ...but still show the close button on hover and when dirty */ +} + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.close-button-off > .tab-close { display: none; /* hide the close action bar when we are configured to hide it */ } @@ -132,8 +165,7 @@ /* No Tab Close Button */ .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.close-button-off { - padding-right: 12px; - transition: padding-right ease-in-out 100ms; + padding-right: 10px; /* give a little bit more room if close button is off */ } .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.close-button-off.dirty { diff --git a/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts index 7b5575cf751..72aeecf038b 100644 --- a/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts @@ -18,7 +18,6 @@ import { EventType as TouchEventType, GestureEvent, Gesture } from 'vs/base/brow export class NoTabsTitleControl extends TitleControl { private titleContainer: HTMLElement; private editorLabel: ResourceLabel; - private titleTouchSupport: Gesture; public setContext(group: IEditorGroup): void { super.setContext(group); @@ -32,7 +31,7 @@ export class NoTabsTitleControl extends TitleControl { this.titleContainer = parent; // Gesture Support - this.titleTouchSupport = new Gesture(this.titleContainer); + Gesture.addTarget(this.titleContainer); // Pin on double click this.toUnbind.push(DOM.addDisposableListener(this.titleContainer, DOM.EventType.DBLCLICK, (e: MouseEvent) => this.onTitleDoubleClick(e))); @@ -162,10 +161,4 @@ export class NoTabsTitleControl extends TitleControl { default: return Verbosity.MEDIUM; } } - - public dispose(): void { - super.dispose(); - - this.titleTouchSupport.dispose(); - } -} \ No newline at end of file +} diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 054b32740ac..a80ab21c3f0 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -30,22 +30,24 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IMenuService } from 'vs/platform/actions/common/actions'; -import { IWindowService, IWindowsService } from 'vs/platform/windows/common/windows'; -import { TitleControl, handleWorkspaceExternalDrop } from 'vs/workbench/browser/parts/editor/titleControl'; +import { TitleControl } from 'vs/workbench/browser/parts/editor/titleControl'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { IDisposable, dispose, combinedDisposable } from 'vs/base/common/lifecycle'; import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; -import { extractResources } from 'vs/workbench/browser/editor'; +import { CodeDataTransfers, ISerializedDraggedEditor } from 'vs/workbench/browser/editor'; import { getOrSet } from 'vs/base/common/map'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_FOREGROUND, TAB_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, TAB_UNFOCUSED_ACTIVE_FOREGROUND, TAB_UNFOCUSED_INACTIVE_FOREGROUND, TAB_UNFOCUSED_ACTIVE_BORDER, TAB_ACTIVE_BORDER } from 'vs/workbench/common/theme'; +import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_FOREGROUND, TAB_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, TAB_UNFOCUSED_ACTIVE_FOREGROUND, TAB_UNFOCUSED_INACTIVE_FOREGROUND, TAB_UNFOCUSED_ACTIVE_BORDER, TAB_ACTIVE_BORDER, TAB_HOVER_BACKGROUND, TAB_HOVER_BORDER, TAB_UNFOCUSED_HOVER_BACKGROUND, TAB_UNFOCUSED_HOVER_BORDER } from 'vs/workbench/common/theme'; import { activeContrastBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { IFileService } from 'vs/platform/files/common/files'; -import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; import { Dimension } from 'vs/base/browser/builder'; import { scheduleAtNextAnimationFrame } from 'vs/base/browser/dom'; +import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; +import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { DataTransfers } from 'vs/base/browser/dnd'; +import { EditorAreaDropHandler } from 'vs/workbench/browser/parts/editor/editorAreaDropHandler'; +import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor'; interface IEditorInputLabel { name: string; @@ -78,11 +80,9 @@ export class TabsTitleControl extends TitleControl { @IMessageService messageService: IMessageService, @IMenuService menuService: IMenuService, @IQuickOpenService quickOpenService: IQuickOpenService, - @IWindowService private windowService: IWindowService, - @IWindowsService private windowsService: IWindowsService, @IThemeService themeService: IThemeService, - @IFileService private fileService: IFileService, - @IWorkspacesService private workspacesService: IWorkspacesService + @ITextFileService private textFileService: ITextFileService, + @IBackupFileService private backupFileService: IBackupFileService ) { super(contextMenuService, instantiationService, editorService, editorGroupService, contextKeyService, keybindingService, telemetryService, messageService, menuService, quickOpenService, themeService); @@ -156,6 +156,12 @@ export class TabsTitleControl extends TitleControl { } })); + this.toUnbind.push(DOM.addDisposableListener(this.tabsContainer, DOM.EventType.MOUSE_DOWN, (e: MouseEvent) => { + if (e.button === 1) { + e.preventDefault(); // required to prevent auto-scrolling (https://github.com/Microsoft/vscode/issues/16690) + } + })); + // Custom Scrollbar this.scrollbar = new ScrollableElement(this.tabsContainer, { horizontal: ScrollbarVisibility.Auto, @@ -275,7 +281,9 @@ export class TabsTitleControl extends TitleControl { const isGroupActive = this.stacks.isActive(group); if (isGroupActive) { DOM.addClass(this.titleContainer, 'active'); + DOM.removeClass(this.titleContainer, 'inactive'); } else { + DOM.addClass(this.titleContainer, 'inactive'); DOM.removeClass(this.titleContainer, 'active'); } @@ -286,6 +294,10 @@ export class TabsTitleControl extends TitleControl { // Tab label and styles editorsOfGroup.forEach((editor, index) => { const tabContainer = this.tabsContainer.children[index] as HTMLElement; + if (!tabContainer) { + return; // could be a race condition between updating tabs and creating tabs + } + const isPinned = group.isPinned(index); const isTabActive = group.isActive(editor); const isDirty = editor.isDirty(); @@ -303,11 +315,23 @@ export class TabsTitleControl extends TitleControl { tabContainer.style.outlineColor = this.getColor(activeContrastBorder); const tabOptions = this.editorGroupService.getTabOptions(); - ['off', 'left'].forEach(option => { + + ['off', 'left', 'right'].forEach(option => { const domAction = tabOptions.tabCloseButton === option ? DOM.addClass : DOM.removeClass; domAction(tabContainer, `close-button-${option}`); }); + ['fit', 'shrink'].forEach(option => { + const domAction = tabOptions.tabSizing === option ? DOM.addClass : DOM.removeClass; + domAction(tabContainer, `sizing-${option}`); + }); + + if (tabOptions.showIcons && !!tabOptions.iconTheme) { + DOM.addClass(tabContainer, 'has-icon-theme'); + } else { + DOM.removeClass(tabContainer, 'has-icon-theme'); + } + // Label const tabLabel = this.editorLabels[index]; tabLabel.setLabel({ name, description, resource: toResource(editor, { supportSideBySide: true }) }, { extraClasses: ['tab-label'], italic: !isPinned }); @@ -519,7 +543,7 @@ export class TabsTitleControl extends TitleControl { DOM.addClass(tabContainer, 'tab'); // Gesture Support - const gestureSupport = new Gesture(tabContainer); + Gesture.addTarget(tabContainer); // Tab Editor Label const editorLabel = this.instantiationService.createInstance(ResourceLabel, tabContainer, void 0); @@ -536,7 +560,7 @@ export class TabsTitleControl extends TitleControl { // Eventing const disposable = this.hookTabListeners(tabContainer, index); - this.tabDisposeables.push(combinedDisposable([disposable, bar, editorLabel, gestureSupport])); + this.tabDisposeables.push(combinedDisposable([disposable, bar, editorLabel])); return tabContainer; } @@ -611,7 +635,7 @@ export class TabsTitleControl extends TitleControl { if (e instanceof MouseEvent && e.button !== 0) { if (e.button === 1) { - return false; // required due to https://github.com/Microsoft/vscode/issues/16690 + e.preventDefault(); // required to prevent auto-scrolling (https://github.com/Microsoft/vscode/issues/16690) } return void 0; // only for left mouse click @@ -739,12 +763,22 @@ export class TabsTitleControl extends TitleControl { const resource = toResource(editor, { supportSideBySide: true }); if (resource) { const resourceStr = resource.toString(); - e.dataTransfer.setData('URL', resourceStr); // enables cross window DND of tabs - e.dataTransfer.setData('text/plain', getPathLabel(resource)); // enables dropping tab resource path into text controls + + e.dataTransfer.setData(DataTransfers.TEXT, getPathLabel(resource)); // enables dropping tab resource path into text controls if (resource.scheme === 'file') { - e.dataTransfer.setData('DownloadURL', [MIME_BINARY, editor.getName(), resourceStr].join(':')); // enables support to drag a tab as file to desktop + e.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, editor.getName(), resourceStr].join(':')); // enables support to drag a tab as file to desktop } + + // Prepare IDraggedEditor transfer + const activeEditor = this.editorService.getActiveEditor(); + const draggedEditor: ISerializedDraggedEditor = { + resource: resourceStr, + backupResource: this.textFileService.isDirty(resource) ? this.backupFileService.toBackupResource(resource).toString() : void 0, + viewState: activeEditor instanceof BaseTextEditor ? activeEditor.getControl().saveViewState() : void 0 + }; + + e.dataTransfer.setData(CodeDataTransfers.EDITOR, JSON.stringify(draggedEditor)); // enables cross window DND of tabs into the editor area } // Fixes https://github.com/Microsoft/vscode/issues/18733 @@ -773,6 +807,8 @@ export class TabsTitleControl extends TitleControl { } } + DOM.addClass(tab, 'dragged-over'); + if (!draggedEditorIsTab) { this.updateDropFeedback(tab, true, index); } @@ -782,6 +818,7 @@ export class TabsTitleControl extends TitleControl { disposables.push(DOM.addDisposableListener(tab, DOM.EventType.DRAG_LEAVE, (e: DragEvent) => { counter--; if (counter === 0) { + DOM.removeClass(tab, 'dragged-over'); this.updateDropFeedback(tab, false, index); } })); @@ -789,6 +826,7 @@ export class TabsTitleControl extends TitleControl { // Drag end disposables.push(DOM.addDisposableListener(tab, DOM.EventType.DRAG_END, (e: DragEvent) => { counter = 0; + DOM.removeClass(tab, 'dragged-over'); this.updateDropFeedback(tab, false, index); this.onEditorDragEnd(); @@ -797,6 +835,7 @@ export class TabsTitleControl extends TitleControl { // Drop disposables.push(DOM.addDisposableListener(tab, DOM.EventType.DROP, (e: DragEvent) => { counter = 0; + DOM.removeClass(tab, 'dragged-over'); this.updateDropFeedback(tab, false, index); const { group, position } = this.toTabContext(index); @@ -820,13 +859,14 @@ export class TabsTitleControl extends TitleControl { } private onDrop(e: DragEvent, group: IEditorGroup, targetPosition: Position, targetIndex: number): void { + DOM.EventHelper.stop(e, true); + this.updateDropFeedback(this.tabsContainer, false); DOM.removeClass(this.tabsContainer, 'scroll'); // Local DND const draggedEditor = TabsTitleControl.getDraggedEditor(); if (draggedEditor) { - DOM.EventHelper.stop(e, true); // Move editor to target position and index if (this.isMoveOperation(e, draggedEditor.group, group)) { @@ -843,37 +883,8 @@ export class TabsTitleControl extends TitleControl { // External DND else { - this.handleExternalDrop(e, targetPosition, targetIndex); - } - } - - private handleExternalDrop(e: DragEvent, targetPosition: Position, targetIndex: number): void { - const droppedResources = extractResources(e).filter(r => r.resource.scheme === 'file' || r.resource.scheme === 'untitled'); - if (droppedResources.length) { - DOM.EventHelper.stop(e, true); - - handleWorkspaceExternalDrop(droppedResources, this.fileService, this.messageService, this.windowsService, this.windowService, this.workspacesService).then(handled => { - if (handled) { - return; - } - - // Add external ones to recently open list - const externalResources = droppedResources.filter(d => d.isExternal).map(d => d.resource); - if (externalResources.length) { - this.windowsService.addRecentlyOpened(externalResources.map(resource => resource.fsPath)); - } - - // Open in Editor - this.windowService.focusWindow() - .then(() => this.editorService.openEditors(droppedResources.map(d => { - return { - input: { resource: d.resource, options: { pinned: true, index: targetIndex } }, - position: targetPosition - }; - }))).then(() => { - this.editorGroupService.focusGroup(targetPosition); - }).done(null, errors.onUnexpectedError); - }); + const dropHandler = this.instantiationService.createInstance(EditorAreaDropHandler); + dropHandler.handleDrop(e, () => this.editorGroupService.focusGroup(targetPosition), targetPosition, targetIndex); } } @@ -931,4 +942,42 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { } `); } -}); \ No newline at end of file + + // Hover Background + const tabHoverBackground = theme.getColor(TAB_HOVER_BACKGROUND); + if (tabHoverBackground) { + collector.addRule(` + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.active .tabs-container > .tab:hover { + background: ${tabHoverBackground} !important; + } + `); + } + + const tabUnfocusedHoverBackground = theme.getColor(TAB_UNFOCUSED_HOVER_BACKGROUND); + if (tabUnfocusedHoverBackground) { + collector.addRule(` + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.inactive .tabs-container > .tab:hover { + background: ${tabUnfocusedHoverBackground} !important; + } + `); + } + + // Hover Border + const tabHoverBorder = theme.getColor(TAB_HOVER_BORDER); + if (tabHoverBorder) { + collector.addRule(` + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.active .tabs-container > .tab:hover { + box-shadow: ${tabHoverBorder} 0 -1px inset !important; + } + `); + } + + const tabUnfocusedHoverBorder = theme.getColor(TAB_UNFOCUSED_HOVER_BORDER); + if (tabUnfocusedHoverBorder) { + collector.addRule(` + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.inactive .tabs-container > .tab:hover { + box-shadow: ${tabUnfocusedHoverBorder} 0 -1px inset !important; + } + `); + } +}); diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index f6205123ea6..fbc40c16124 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -37,12 +37,6 @@ import { IMenuService, MenuId, IMenu, ExecuteCommandAction } from 'vs/platform/a import { ResourceContextKey } from 'vs/workbench/common/resources'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Themable } from 'vs/workbench/common/theme'; -import { IDraggedResource } from 'vs/workbench/browser/editor'; -import { WORKSPACE_EXTENSION, IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; -import { extname } from 'vs/base/common/paths'; -import { IFileService } from 'vs/platform/files/common/files'; -import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; -import URI from 'vs/base/common/uri'; import { isDiffEditor, isCodeEditor } from 'vs/editor/browser/editorBrowser'; import { Dimension } from 'vs/base/browser/builder'; @@ -423,7 +417,17 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl getActions: () => TPromise.as(this.getContextMenuActions(identifier)), getActionsContext: () => identifier, getKeyBinding: (action) => this.getKeybinding(action), - onHide: (cancel) => this.resourceContext.set(currentContext) // restore previous context + onHide: (cancel) => { + + // restore previous context + this.resourceContext.set(currentContext); + + // restore focus to active editor if any + const editor = this.editorService.getActiveEditor(); + if (editor) { + editor.focus(); + } + } }); } @@ -490,74 +494,3 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl this.editorActionsToolbar.dispose(); } } - -/** - * Shared function across some editor components to handle drag & drop of folders and workspace files - * to open them in the window instead of the editor. - */ -export function handleWorkspaceExternalDrop( - resources: IDraggedResource[], - fileService: IFileService, - messageService: IMessageService, - windowsService: IWindowsService, - windowService: IWindowService, - workspacesService: IWorkspacesService -): TPromise { - - // Return early if there are no external resources - const externalResources = resources.filter(d => d.isExternal).map(d => d.resource); - if (!externalResources.length) { - return TPromise.as(false); - } - - const externalWorkspaceResources: { workspaces: URI[], folders: URI[] } = { - workspaces: [], - folders: [] - }; - - return TPromise.join(externalResources.map(resource => { - - // Check for Workspace - if (extname(resource.fsPath) === `.${WORKSPACE_EXTENSION}`) { - externalWorkspaceResources.workspaces.push(resource); - - return void 0; - } - - // Check for Folder - return fileService.resolveFile(resource).then(stat => { - if (stat.isDirectory) { - externalWorkspaceResources.folders.push(stat.resource); - } - }, error => void 0); - })).then(_ => { - const { workspaces, folders } = externalWorkspaceResources; - - // Return early if no external resource is a folder or workspace - if (workspaces.length === 0 && folders.length === 0) { - return false; - } - - // Pass focus to window - windowService.focusWindow(); - - let workspacesToOpen: TPromise; - - // Open in separate windows if we drop workspaces or just one folder - if (workspaces.length > 0 || folders.length === 1) { - workspacesToOpen = TPromise.as([...workspaces, ...folders].map(resources => resources.fsPath)); - } - - // Multiple folders: Create new workspace with folders and open - else if (folders.length > 1) { - workspacesToOpen = workspacesService.createWorkspace(folders.map(folder => ({ uri: folder }))).then(workspace => [workspace.configPath]); - } - - // Open - workspacesToOpen.then(workspaces => { - windowsService.openWindow(workspaces, { forceReuseWindow: true }); - }); - - return true; - }); -} diff --git a/src/vs/workbench/browser/parts/panel/media/panelpart.css b/src/vs/workbench/browser/parts/panel/media/panelpart.css index 67a4a38738a..a72286fe791 100644 --- a/src/vs/workbench/browser/parts/panel/media/panelpart.css +++ b/src/vs/workbench/browser/parts/panel/media/panelpart.css @@ -31,7 +31,7 @@ } .monaco-workbench > .part.panel > .composite.title > .title-actions { - flex: 0; + flex-grow: 0; } .monaco-workbench > .part.panel > .title > .title-actions .monaco-action-bar .action-item .action-label { @@ -50,35 +50,39 @@ } .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar { - line-height: 32px; + line-height: 30px; + height: 35px; } -.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:first-child .action-label { +.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:first-child { margin-left: 12px; } -.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label { +.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item { text-transform: uppercase; - margin-left: 16px; - margin-right: 16px; + padding-left: 16px; + padding-right: 16px; font-size: 11px; - padding-bottom: 4px; /* puts the bottom border down */ + padding-bottom: 3px; /* puts the bottom border down */ + padding-top: 2px; + display: flex; +} + +.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:last-child { + padding-right: 6px; } .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item.checked .action-label { border-bottom: 1px solid; + height: 82%; } .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .badge .badge-content { - top: 8px; - right: 0px; - position: absolute; - font-size: 11px; - min-width: 6px; - line-height: 18px; - padding: 0 5px; - border-radius: 20px; + padding: 0.2em 0.5em; + border-radius: 1em; + font-weight: normal; text-align: center; + display: inline; } /** Actions */ diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 075ae3a1650..b195a3511b0 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -43,6 +43,7 @@ export class PanelPart extends CompositePart implements IPanelService { private blockOpeningPanel: boolean; private compositeBar: CompositeBar; private dimension: Dimension; + private toolbarWidth = new Map(); constructor( id: string, @@ -86,7 +87,7 @@ export class PanelPart extends CompositePart implements IPanelService { getOnCompositeClickAction: (compositeId: string) => this.instantiationService.createInstance(PanelActivityAction, this.getPanel(compositeId)), getDefaultCompositeId: () => Registry.as(PanelExtensions.Panels).getDefaultPanelId(), hidePart: () => this.partService.setPanelHidden(true), - overflowActionSize: 28, + overflowActionSize: 44, colors: { backgroundColor: PANEL_BACKGROUND, badgeBackground, @@ -213,6 +214,9 @@ export class PanelPart extends CompositePart implements IPanelService { } public layout(dimension: Dimension): Dimension[] { + if (!this.partService.isVisible(Parts.PANEL_PART)) { + return [dimension]; + } if (this.partService.getPanelPosition() === Position.RIGHT) { // Take into account the 1px border when layouting @@ -228,15 +232,27 @@ export class PanelPart extends CompositePart implements IPanelService { private layoutCompositeBar(): void { if (this.dimension) { - let availableWidth = this.dimension.width - 8; // take padding into account + let availableWidth = this.dimension.width - 40; // take padding into account if (this.toolBar) { // adjust height for global actions showing - availableWidth = Math.max(PanelPart.MIN_COMPOSITE_BAR_WIDTH, availableWidth - this.toolBar.getContainer().getHTMLElement().offsetWidth); + availableWidth = Math.max(PanelPart.MIN_COMPOSITE_BAR_WIDTH, availableWidth - this.getToolbarWidth()); } this.compositeBar.layout(new Dimension(availableWidth, this.dimension.height)); } } + private getToolbarWidth(): number { + const activePanel = this.getActivePanel(); + if (!activePanel) { + return 0; + } + if (!this.toolbarWidth.has(activePanel.getId())) { + this.toolbarWidth.set(activePanel.getId(), this.toolBar.getContainer().getHTMLElement().offsetWidth); + } + + return this.toolbarWidth.get(activePanel.getId()); + } + public shutdown(): void { // Persist Hidden State this.compositeBar.store(); @@ -315,7 +331,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { outline-style: solid; border-bottom: none; padding-bottom: 0; - outline-offset: 3px; + outline-offset: 1px; } .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:not(.checked) .action-label:hover { diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index c301f8d29e3..c5e59196388 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -35,7 +35,6 @@ import { EditorInput, IWorkbenchEditorConfiguration } from 'vs/workbench/common/ import { Component } from 'vs/workbench/common/component'; import Event, { Emitter } from 'vs/base/common/event'; import { IPartService } from 'vs/workbench/services/part/common/partService'; -import { KeyMod } from 'vs/base/common/keyCodes'; import { QuickOpenHandler, QuickOpenHandlerDescriptor, IQuickOpenRegistry, Extensions, EditorQuickOpenEntry, CLOSE_ON_FOCUS_LOST_CONFIG } from 'vs/workbench/browser/quickopen'; import errors = require('vs/base/common/errors'); import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -43,11 +42,9 @@ import { IPickOpenEntry, IFilePickOpenEntry, IInputOptions, IQuickOpenService, I import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IContextKeyService, RawContextKey, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; -import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND } from 'vs/workbench/common/theme'; import { attachQuickOpenStyler } from 'vs/platform/theme/common/styler'; @@ -57,6 +54,7 @@ import { BaseActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { FileKind, IFileService } from 'vs/platform/files/common/files'; import { scoreItem, ScorerCache, compareItemsByScore, prepareQuery } from 'vs/base/parts/quickopen/common/quickOpenScorer'; import { getBaseLabel } from 'vs/base/common/labels'; +import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; const HELP_PREFIX = '?'; @@ -105,7 +103,6 @@ export class QuickOpenController extends Component implements IQuickOpenService constructor( @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IMessageService private messageService: IMessageService, - @ITelemetryService private telemetryService: ITelemetryService, @IContextKeyService private contextKeyService: IContextKeyService, @IConfigurationService private configurationService: IConfigurationService, @IInstantiationService private instantiationService: IInstantiationService, @@ -313,14 +310,13 @@ export class QuickOpenController extends Component implements IQuickOpenService onHide: (reason) => this.handleOnHide(true, reason) }, { inputPlaceHolder: options.placeHolder || '', - keyboardSupport: false - }, - this.telemetryService + keyboardSupport: false, + treeCreator: (container, config, opts) => new WorkbenchTree(container, config, opts, this.contextKeyService, this.listService, this.themeService) + } ); this.toUnbind.push(attachQuickOpenStyler(this.pickOpenWidget, this.themeService, { background: SIDE_BAR_BACKGROUND, foreground: SIDE_BAR_FOREGROUND })); const pickOpenContainer = this.pickOpenWidget.create(); - this.toUnbind.push(this.listService.register(this.pickOpenWidget.getTree())); DOM.addClass(pickOpenContainer, 'show-file-icons'); this.positionQuickOpenWidget(); } @@ -556,14 +552,6 @@ export class QuickOpenController extends Component implements IQuickOpenService const registry = Registry.as(Extensions.Quickopen); const handlerDescriptor = registry.getQuickOpenHandler(prefix) || registry.getDefaultQuickOpenHandler(); - /* __GDPR__ - "quickOpenWidgetShown" : { - "mode" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "quickNavigate": { "${inline}": [ "${IQuickNavigateConfiguration}" ] } - } - */ - this.telemetryService.publicLog('quickOpenWidgetShown', { mode: handlerDescriptor.getId(), quickNavigate: quickNavigateConfiguration }); - // Trigger onOpen this.resolveHandler(handlerDescriptor).done(null, errors.onUnexpectedError); @@ -580,14 +568,13 @@ export class QuickOpenController extends Component implements IQuickOpenService onFocusLost: () => !this.closeOnFocusLost }, { inputPlaceHolder: this.hasHandler(HELP_PREFIX) ? nls.localize('quickOpenInput', "Type '?' to get help on the actions you can take from here") : '', - keyboardSupport: false - }, - this.telemetryService + keyboardSupport: false, + treeCreator: (container, config, opts) => new WorkbenchTree(container, config, opts, this.contextKeyService, this.listService, this.themeService) + } ); this.toUnbind.push(attachQuickOpenStyler(this.quickOpenWidget, this.themeService, { background: SIDE_BAR_BACKGROUND, foreground: SIDE_BAR_FOREGROUND })); const quickOpenContainer = this.quickOpenWidget.create(); - this.toUnbind.push(this.listService.register(this.quickOpenWidget.getTree())); DOM.addClass(quickOpenContainer, 'show-file-icons'); this.positionQuickOpenWidget(); } @@ -870,7 +857,7 @@ export class QuickOpenController extends Component implements IQuickOpenService const result = handlerResults[i]; const resource = result.getResource(); - if (!result.isFile() || !resource || !mapEntryToResource[resource.toString()]) { + if (!result.mergeWithEditorHistory() || !resource || !mapEntryToResource[resource.toString()]) { additionalHandlerResults.push(result); } } @@ -1314,8 +1301,8 @@ export class EditorHistoryEntry extends EditorQuickOpenEntry { public run(mode: Mode, context: IEntryRunContext): boolean { if (mode === Mode.OPEN) { - const sideBySide = !context.quickNavigateConfiguration && context.keymods.indexOf(KeyMod.CtrlCmd) >= 0; - const pinned = !this.configurationService.getValue().workbench.editor.enablePreviewFromQuickOpen; + const sideBySide = !context.quickNavigateConfiguration && context.keymods.ctrlCmd; + const pinned = !this.configurationService.getValue().workbench.editor.enablePreviewFromQuickOpen || context.keymods.alt; if (this.input instanceof EditorInput) { this.editorService.openEditor(this.input, { pinned }, sideBySide).done(null, errors.onUnexpectedError); diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index fd9b149c803..bdb3dae5d54 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -29,6 +29,7 @@ import { IThemeService } from 'vs/platform/theme/common/themeService'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { SIDE_BAR_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND, SIDE_BAR_BORDER } from 'vs/workbench/common/theme'; import { ToggleSidebarVisibilityAction } from 'vs/workbench/browser/actions/toggleSidebarVisibility'; +import { Dimension } from 'vs/base/browser/builder'; export class SidebarPart extends CompositePart { @@ -128,6 +129,14 @@ export class SidebarPart extends CompositePart { return this.hideActiveComposite().then(composite => void 0); } + public layout(dimension: Dimension): Dimension[] { + if (!this.partService.isVisible(Parts.SIDEBAR_PART)) { + return [dimension]; + } + + return super.layout(dimension); + } + protected getTitleAreaContextMenuActions(): IAction[] { const contextMenuActions = super.getTitleAreaContextMenuActions(); if (contextMenuActions.length) { diff --git a/src/vs/workbench/browser/parts/views/treeView.ts b/src/vs/workbench/browser/parts/views/treeView.ts index d7bee751d17..10ce86b1cc7 100644 --- a/src/vs/workbench/browser/parts/views/treeView.ts +++ b/src/vs/workbench/browser/parts/views/treeView.ts @@ -14,31 +14,29 @@ import { IAction, IActionItem, ActionRunner } from 'vs/base/common/actions'; import { IMessageService } from 'vs/platform/message/common/message'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IListService } from 'vs/platform/list/browser/listService'; -import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { ClickBehavior, DefaultController } from 'vs/base/parts/tree/browser/treeDefaults'; import { IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IThemeService, LIGHT } from 'vs/platform/theme/common/themeService'; import { createActionItem, fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { ITree, IDataSource, IRenderer, ContextMenuEvent } from 'vs/base/parts/tree/browser/tree'; -import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { ViewsRegistry } from 'vs/workbench/browser/parts/views/viewsRegistry'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; -import { ViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; +import { TreeViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { TreeItemCollapsibleState, ITreeItem, ITreeViewDataProvider, TreeViewItemHandleArg } from 'vs/workbench/common/views'; +import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; -export class TreeView extends ViewsViewletPanel { +export class TreeView extends TreeViewsViewletPanel { private menus: Menus; - private viewFocusContext: IContextKey; private activated: boolean = false; private treeInputPromise: TPromise; private dataProviderElementChangeListener: IDisposable; + private elementsToRefresh: ITreeItem[] = []; constructor( options: IViewletViewOptions, @@ -54,7 +52,6 @@ export class TreeView extends ViewsViewletPanel { ) { super({ ...(options as IViewOptions), ariaHeaderLabel: options.name }, keybindingService, contextMenuService); this.menus = this.instantiationService.createInstance(Menus, this.id); - this.viewFocusContext = this.contextKeyService.createKey(this.id, void 0); this.menus.onDidChangeTitle(() => this.updateActions(), this, this.disposables); this.themeService.onThemeChange(() => this.tree.refresh() /* soft refresh */, this, this.disposables); if (options.expanded) { @@ -86,21 +83,22 @@ export class TreeView extends ViewsViewletPanel { } } - public createViewer(container: Builder): ITree { + public createViewer(container: Builder): WorkbenchTree { const dataSource = this.instantiationService.createInstance(TreeDataSource, this.id); const renderer = this.instantiationService.createInstance(TreeRenderer); const controller = this.instantiationService.createInstance(TreeController, this.id, this.menus); - const tree = new Tree(container.getHTMLElement(), { - dataSource, - renderer, - controller - }, { - keyboardSupport: false - }); + const tree = new WorkbenchTree( + container.getHTMLElement(), + { dataSource, renderer, controller }, + { keyboardSupport: false }, + this.contextKeyService, + this.listService, + this.themeService + ); - this.disposables.push(attachListStyler(tree, this.themeService)); - this.disposables.push(this.listService.register(tree, [this.viewFocusContext])); + tree.contextKeyService.createKey(this.id, true); this.disposables.push(tree.onDidChangeSelection(() => this.onSelection())); + return tree; } @@ -116,10 +114,6 @@ export class TreeView extends ViewsViewletPanel { return createActionItem(action, this.keybindingService, this.messageService); } - public setVisible(visible: boolean): TPromise { - return super.setVisible(visible); - } - private setInput(): TPromise { if (this.tree) { if (!this.treeInputPromise) { @@ -175,10 +169,29 @@ export class TreeView extends ViewsViewletPanel { } } + protected updateTreeVisibility(tree: WorkbenchTree, isVisible: boolean): void { + super.updateTreeVisibility(tree, isVisible); + if (isVisible && this.elementsToRefresh.length) { + this.doRefresh(this.elementsToRefresh); + this.elementsToRefresh = []; + } + } + private refresh(elements: ITreeItem[]): void { - elements = elements ? elements : [this.tree.getInput()]; + if (!elements) { + const root: ITreeItem = this.tree.getInput(); + root.children = null; // reset children + elements = [root]; + } + if (this.isVisible() && this.isExpanded()) { + this.doRefresh(elements); + } else { + this.elementsToRefresh.push(...elements); + } + } + + private doRefresh(elements: ITreeItem[]): void { for (const element of elements) { - element.children = null; this.tree.refresh(element); } } @@ -195,7 +208,8 @@ export class TreeView extends ViewsViewletPanel { class Root implements ITreeItem { label = 'root'; - handle = -1; + handle = '0'; + parentHandle = null; collapsibleState = TreeItemCollapsibleState.Expanded; } @@ -208,7 +222,7 @@ class TreeDataSource implements IDataSource { } public getId(tree: ITree, node: ITreeItem): string { - return '' + node.handle; + return node.handle; } public hasChildren(tree: ITree, node: ITreeItem): boolean { diff --git a/src/vs/workbench/browser/parts/views/viewsViewlet.ts b/src/vs/workbench/browser/parts/views/viewsViewlet.ts index 82a56778155..cd2d2213b2d 100644 --- a/src/vs/workbench/browser/parts/views/viewsViewlet.ts +++ b/src/vs/workbench/browser/parts/views/viewsViewlet.ts @@ -12,7 +12,6 @@ import { Scope } from 'vs/workbench/common/memento'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { IAction, IActionRunner } from 'vs/base/common/actions'; import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; -import { ITree } from 'vs/base/parts/tree/browser/tree'; import { firstIndex } from 'vs/base/common/arrays'; import { DelayedDragHandler } from 'vs/base/browser/dnd'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; @@ -28,6 +27,7 @@ import { IContextKeyService, IContextKeyChangeEvent } from 'vs/platform/contextk import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import { PanelViewlet, ViewletPanel } from 'vs/workbench/browser/parts/views/panelViewlet'; import { IPanelOptions } from 'vs/base/browser/ui/splitview/panelview'; +import { WorkbenchTree } from 'vs/platform/list/browser/listService'; export interface IViewOptions extends IPanelOptions { id: string; @@ -37,15 +37,10 @@ export interface IViewOptions extends IPanelOptions { export abstract class ViewsViewletPanel extends ViewletPanel { + private _isVisible: boolean; + readonly id: string; readonly name: string; - protected treeContainer: HTMLElement; - - // TODO@sandeep why is tree here? isn't this coming only from TreeView - protected tree: ITree; - protected isDisposed: boolean; - private _isVisible: boolean; - private dragHandler: DelayedDragHandler; constructor( options: IViewOptions, @@ -59,6 +54,72 @@ export abstract class ViewsViewletPanel extends ViewletPanel { this._expanded = options.expanded; } + setVisible(visible: boolean): TPromise { + if (this._isVisible !== visible) { + this._isVisible = visible; + } + + return TPromise.wrap(null); + } + + isVisible(): boolean { + return this._isVisible; + } + + getActions(): IAction[] { + return []; + } + + getSecondaryActions(): IAction[] { + return []; + } + + getActionItem(action: IAction): IActionItem { + return null; + } + + getActionsContext(): any { + return undefined; + } + + getOptimalWidth(): number { + return 0; + } + + create(): TPromise { + return TPromise.as(null); + } + + shutdown(): void { + // Subclass to implement + } + +} + +// TODO@isidor @sandeep remove this class +export abstract class TreeViewsViewletPanel extends ViewsViewletPanel { + + readonly id: string; + readonly name: string; + protected treeContainer: HTMLElement; + + // TODO@sandeep why is tree here? isn't this coming only from TreeView + protected tree: WorkbenchTree; + protected isDisposed: boolean; + private dragHandler: DelayedDragHandler; + + constructor( + options: IViewOptions, + protected keybindingService: IKeybindingService, + protected contextMenuService: IContextMenuService + ) { + super(options, keybindingService, contextMenuService); + + this.id = options.id; + this.name = options.name; + this._expanded = options.expanded; + } + setExpanded(expanded: boolean): void { this.updateTreeVisibility(this.tree, expanded); super.setExpanded(expanded); @@ -77,18 +138,14 @@ export abstract class ViewsViewletPanel extends ViewletPanel { return treeContainer; } - getViewer(): ITree { + getViewer(): WorkbenchTree { return this.tree; } - isVisible(): boolean { - return this._isVisible; - } - setVisible(visible: boolean): TPromise { - if (this._isVisible !== visible) { - this._isVisible = visible; - this.updateTreeVisibility(this.tree, visible && this.isExpanded()); + if (this.isVisible() !== visible) { + return super.setVisible(visible) + .then(() => this.updateTreeVisibility(this.tree, visible && this.isExpanded())); } return TPromise.wrap(null); @@ -157,7 +214,7 @@ export abstract class ViewsViewletPanel extends ViewletPanel { super.dispose(); } - private updateTreeVisibility(tree: ITree, isVisible: boolean): void { + protected updateTreeVisibility(tree: WorkbenchTree, isVisible: boolean): void { if (!tree) { return; } @@ -362,16 +419,14 @@ export class ViewsViewlet extends PanelViewlet { for (const view of panels) { let viewState = this.viewsStates.get(view.id); if (!viewState || typeof viewState.size === 'undefined' || !view.isExpanded() !== viewState.collapsed) { - viewState = this.updateViewStateSize(view); - this.viewsStates.set(view.id, viewState); + this.updateViewStateSize(view); } } if (toRemove.length) { for (const viewDescriptor of toRemove) { let view = this.getView(viewDescriptor.id); - const viewState = this.updateViewStateSize(view); - this.viewsStates.set(view.id, viewState); + this.updateViewStateSize(view); this.removePanel(view); this.viewsViewletPanels.splice(this.viewsViewletPanels.indexOf(view), 1); } @@ -394,7 +449,7 @@ export class ViewsViewlet extends PanelViewlet { this.addPanel(view, size, index); this.viewsViewletPanels.splice(index, 0, view); - this.viewsStates.set(view.id, this.updateViewStateSize(view)); + this.updateViewStateSize(view); } return TPromise.join(toCreate.map(view => view.create())) @@ -408,8 +463,7 @@ export class ViewsViewlet extends PanelViewlet { private updateAllViewsSizes(): void { for (const view of this.viewsViewletPanels) { - let viewState = this.updateViewStateSize(view); - this.viewsStates.set(view.id, viewState); + this.updateViewStateSize(view); } } @@ -562,10 +616,16 @@ export class ViewsViewlet extends PanelViewlet { return this.viewsViewletPanels.filter(view => view.id === id)[0]; } - private updateViewStateSize(view: ViewsViewletPanel): IViewState { + private updateViewStateSize(view: ViewsViewletPanel): void { const currentState = this.viewsStates.get(view.id); + if (currentState && !this.didLayout) { + // Do not update to new state if the layout has not happened yet + return; + } + const newViewState = this.createViewState(view); - return currentState ? { ...currentState, collapsed: newViewState.collapsed, size: newViewState.size } : newViewState; + const stateToUpdate = currentState ? { ...currentState, collapsed: newViewState.collapsed, size: newViewState.size } : newViewState; + this.viewsStates.set(view.id, stateToUpdate); } protected createViewState(view: ViewsViewletPanel): IViewState { diff --git a/src/vs/workbench/browser/quickopen.ts b/src/vs/workbench/browser/quickopen.ts index 340218ea1ad..39f9a21eda2 100644 --- a/src/vs/workbench/browser/quickopen.ts +++ b/src/vs/workbench/browser/quickopen.ts @@ -13,7 +13,6 @@ import types = require('vs/base/common/types'); import errors = require('vs/base/common/errors'); import { Registry } from 'vs/platform/registry/common/platform'; import { Action } from 'vs/base/common/actions'; -import { KeyMod } from 'vs/base/common/keyCodes'; import { Mode, IEntryRunContext, IAutoFocus, IModel, IQuickNavigateConfiguration } from 'vs/base/parts/quickopen/common/quickOpen'; import { QuickOpenEntry, QuickOpenEntryGroup } from 'vs/base/parts/quickopen/browser/quickOpenModel'; import { EditorOptions, EditorInput } from 'vs/workbench/common/editor'; @@ -267,28 +266,30 @@ export class EditorQuickOpenEntry extends QuickOpenEntry implements IEditorQuick const hideWidget = (mode === Mode.OPEN); if (mode === Mode.OPEN || mode === Mode.OPEN_IN_BACKGROUND) { - let sideBySide = context.keymods.indexOf(KeyMod.CtrlCmd) >= 0; + const sideBySide = context.keymods.ctrlCmd; - let openInBackgroundOptions: IEditorOptions; + let openOptions: IEditorOptions; if (mode === Mode.OPEN_IN_BACKGROUND) { - openInBackgroundOptions = { pinned: true, preserveFocus: true }; + openOptions = { pinned: true, preserveFocus: true }; + } else if (context.keymods.alt) { + openOptions = { pinned: true }; } - let input = this.getInput(); + const input = this.getInput(); if (input instanceof EditorInput) { let opts = this.getOptions(); if (opts) { - opts = objects.mixin(opts, openInBackgroundOptions, true); - } else if (openInBackgroundOptions) { - opts = EditorOptions.create(openInBackgroundOptions); + opts = objects.mixin(opts, openOptions, true); + } else if (openOptions) { + opts = EditorOptions.create(openOptions); } this.editorService.openEditor(input, opts, sideBySide).done(null, errors.onUnexpectedError); } else { const resourceInput = input; - if (openInBackgroundOptions) { - resourceInput.options = objects.assign(resourceInput.options || Object.create(null), openInBackgroundOptions); + if (openOptions) { + resourceInput.options = objects.assign(resourceInput.options || Object.create(null), openOptions); } this.editorService.openEditor(resourceInput, sideBySide).done(null, errors.onUnexpectedError); diff --git a/src/vs/workbench/common/actions.ts b/src/vs/workbench/common/actions.ts index 8224b78b193..70cf7c390c5 100644 --- a/src/vs/workbench/common/actions.ts +++ b/src/vs/workbench/common/actions.ts @@ -60,10 +60,17 @@ Registry.add(Extensions.WorkbenchActions, new class implements IWorkbenchActionR // https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/search/electron-browser/search.contribution.ts#L266 if (descriptor.label) { + let idx = alias.indexOf(': '); + let categoryOriginal; + if (idx > 0) { + categoryOriginal = alias.substr(0, idx); + alias = alias.substr(idx + 2); + } + const command = { id: descriptor.id, title: { value: descriptor.label, original: alias }, - category + category: category && { value: category, original: categoryOriginal } }; MenuRegistry.addCommand(command); diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 60d6992a664..fa0547e6294 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -11,7 +11,7 @@ import types = require('vs/base/common/types'); import URI from 'vs/base/common/uri'; import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; import { IEditor, IEditorViewState, IModel, ScrollType } from 'vs/editor/common/editorCommon'; -import { IEditorInput, IEditorModel, IEditorOptions, ITextEditorOptions, IBaseResourceInput, Position, Verbosity, IEditor as IBaseEditor } from 'vs/platform/editor/common/editor'; +import { IEditorInput, IEditorModel, IEditorOptions, ITextEditorOptions, IBaseResourceInput, Position, Verbosity, IEditor as IBaseEditor, IRevertOptions } from 'vs/platform/editor/common/editor'; import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { Registry } from 'vs/platform/registry/common/platform'; @@ -214,7 +214,7 @@ export abstract class EditorInput implements IEditorInput { /** * Reverts the editor if it is dirty. Subclasses return a promise with a boolean indicating the success of the operation. */ - public revert(): TPromise { + public revert(options?: IRevertOptions): TPromise { return TPromise.as(true); } @@ -808,23 +808,11 @@ export const EditorOpenPositioning = { export const OPEN_POSITIONING_CONFIG = 'workbench.editor.openPositioning'; export interface IWorkbenchEditorConfiguration { - /* __GDPR__FRAGMENT__ - "IWorkbenchEditorConfiguration" : { - "showTabs" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "tabCloseButton": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "showIcons": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "enablePreview": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "enablePreviewFromQuickOpen": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "closeOnFileDelete": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "openPositioning": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "revealIfOpen": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "swipeToNavigate": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ workbench: { editor: { showTabs: boolean; tabCloseButton: 'left' | 'right' | 'off'; + tabSizing: 'fit' | 'shrink'; showIcons: boolean; enablePreview: boolean; enablePreviewFromQuickOpen: boolean; @@ -833,7 +821,8 @@ export interface IWorkbenchEditorConfiguration { revealIfOpen: boolean; swipeToNavigate: boolean, labelFormat: 'default' | 'short' | 'medium' | 'long'; - } + }, + iconTheme: string; }; } diff --git a/src/vs/workbench/common/editor/resourceEditorInput.ts b/src/vs/workbench/common/editor/resourceEditorInput.ts index 4f9a57314ec..850154f02bc 100644 --- a/src/vs/workbench/common/editor/resourceEditorInput.ts +++ b/src/vs/workbench/common/editor/resourceEditorInput.ts @@ -93,7 +93,8 @@ export class ResourceEditorInput extends EditorInput { if (!(model instanceof ResourceEditorModel)) { ref.dispose(); this.modelReference = null; - return TPromise.wrapError(new Error(`Unexpected model for ResourceInput: ${this.resource}`)); // TODO@Ben eventually also files should be supported, but we guard due to the dangerous dispose of the model in dispose() + + return TPromise.wrapError(new Error(`Unexpected model for ResourceInput: ${this.resource}`)); } return model; diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 77887fd950d..5ea4917d224 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -23,6 +23,18 @@ export const TAB_INACTIVE_BACKGROUND = registerColor('tab.inactiveBackground', { hc: null }, nls.localize('tabInactiveBackground', "Inactive tab background color. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); +export const TAB_HOVER_BACKGROUND = registerColor('tab.hoverBackground', { + dark: null, + light: null, + hc: null +}, nls.localize('tabHoverBackground', "Tab background color when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); + +export const TAB_UNFOCUSED_HOVER_BACKGROUND = registerColor('tab.unfocusedHoverBackground', { + dark: transparent(TAB_HOVER_BACKGROUND, 0.5), + light: transparent(TAB_HOVER_BACKGROUND, 0.7), + hc: null +}, nls.localize('tabUnfocusedHoverBackground', "Tab background color in an unfocused group when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); + export const TAB_BORDER = registerColor('tab.border', { dark: '#252526', light: '#F3F3F3', @@ -41,6 +53,18 @@ export const TAB_UNFOCUSED_ACTIVE_BORDER = registerColor('tab.unfocusedActiveBor hc: null }, nls.localize('tabActiveUnfocusedBorder', "Border to highlight active tabs in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); +export const TAB_HOVER_BORDER = registerColor('tab.hoverBorder', { + dark: null, + light: null, + hc: null +}, nls.localize('tabHoverBorder', "Border to highlight tabs when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); + +export const TAB_UNFOCUSED_HOVER_BORDER = registerColor('tab.unfocusedHoverBorder', { + dark: transparent(TAB_HOVER_BORDER, 0.5), + light: transparent(TAB_HOVER_BORDER, 0.7), + hc: null +}, nls.localize('tabUnfocusedHoverBorder', "Border to highlight tabs in an unfocused group when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); + export const TAB_ACTIVE_FOREGROUND = registerColor('tab.activeForeground', { dark: Color.white, light: '#333333', diff --git a/src/vs/workbench/common/views.ts b/src/vs/workbench/common/views.ts index 599a1cfdde4..00b5ddbc939 100644 --- a/src/vs/workbench/common/views.ts +++ b/src/vs/workbench/common/views.ts @@ -9,7 +9,7 @@ import { Command } from 'vs/editor/common/modes'; export type TreeViewItemHandleArg = { $treeViewId: string, - $treeItemHandle: number + $treeItemHandle: string }; export enum TreeItemCollapsibleState { @@ -20,7 +20,9 @@ export enum TreeItemCollapsibleState { export interface ITreeItem { - handle: number; + handle: string; + + parentHandle: string; label: string; diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index cae8f800d69..76d1c2d8e3a 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -25,8 +25,7 @@ import { IExtensionManagementService, LocalExtensionType, ILocalExtension, IExte import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import paths = require('vs/base/common/paths'); import { isMacintosh, isLinux, language } from 'vs/base/common/platform'; -import { IQuickOpenService, IFilePickOpenEntry, ISeparator, IPickOpenAction, IPickOpenItem } from 'vs/platform/quickOpen/common/quickOpen'; -import { KeyMod } from 'vs/base/common/keyCodes'; +import { IQuickOpenService, IFilePickOpenEntry, ISeparator, IPickOpenAction, IPickOpenItem, IPickOpenEntry } from 'vs/platform/quickOpen/common/quickOpen'; import * as browser from 'vs/base/browser/browser'; import { IIntegrityService } from 'vs/platform/integrity/common/integrity'; import { IEntryRunContext } from 'vs/base/parts/quickopen/common/quickOpen'; @@ -44,9 +43,10 @@ import { IPanel } from 'vs/workbench/common/panel'; import { IWorkspaceIdentifier, getWorkspaceLabel, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; import { FileKind, IFileService } from 'vs/platform/files/common/files'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IExtensionService } from 'vs/platform/extensions/common/extensions'; +import { IExtensionService, ActivationTimes } from 'vs/platform/extensions/common/extensions'; import { getEntries } from 'vs/base/common/performance'; import { IEditor } from 'vs/platform/editor/common/editor'; +import { ILogService, LogLevel } from 'vs/platform/log/common/log'; // --- actions @@ -360,7 +360,15 @@ export class ShowStartupPerformance extends Action { (console).groupEnd(); (console).group('Extension Activation Stats'); - (console).table(this.extensionService.getExtensionsActivationTimes()); + let extensionsActivationTimes: { [id: string]: ActivationTimes; } = {}; + let extensionsStatus = this.extensionService.getExtensionsStatus(); + for (let id in extensionsStatus) { + const status = extensionsStatus[id]; + if (status.activationTimes) { + extensionsActivationTimes[id] = status.activationTimes; + } + } + (console).table(extensionsActivationTimes); (console).groupEnd(); (console).group('Raw Startup Timers (CSV)'); @@ -750,7 +758,7 @@ export abstract class BaseOpenRecentAction extends Action { } const runPick = (path: string, isFile: boolean, context: IEntryRunContext) => { - const forceNewWindow = context.keymods.indexOf(KeyMod.CtrlCmd) >= 0; + const forceNewWindow = context.keymods.ctrlCmd; this.windowsService.openWindow([path], { forceNewWindow, forceOpenWorkspaceAsFile: isFile }); }; @@ -878,7 +886,7 @@ export class CloseMessagesAction extends Action { export class ReportIssueAction extends Action { public static readonly ID = 'workbench.action.reportIssues'; - public static readonly LABEL = nls.localize('reportIssues', "Report Issues"); + public static readonly LABEL = nls.localize({ key: 'reportIssueInEnglish', comment: ['Translate this to "Report Issue in English" in all languages please!'] }, "Report Issue"); constructor( id: string, @@ -991,13 +999,13 @@ export class ReportPerformanceIssueAction extends Action { } public run(appendix?: string): TPromise { - return this.integrityService.isPure().then(res => { + this.integrityService.isPure().then(res => { const issueUrl = this.generatePerformanceIssueUrl(product.reportIssueUrl, pkg.name, pkg.version, product.commit, product.date, res.isPure, appendix); window.open(issueUrl); - - return TPromise.as(true); }); + + return TPromise.wrap(true); } private generatePerformanceIssueUrl(baseUrl: string, name: string, version: string, commit: string, date: string, isPure: boolean, appendix?: string): string { @@ -1675,4 +1683,82 @@ export class ConfigureLocaleAction extends Action { throw new Error(nls.localize('fail.createSettings', "Unable to create '{0}' ({1}).", getPathLabel(file, this.contextService), error)); }); } +} + +export class OpenLogsFolderAction extends Action { + + static ID = 'workbench.action.openLogsFolder'; + static LABEL = nls.localize('openLogsFolder', "Open Logs Folder"); + + constructor(id: string, label: string, + @IEnvironmentService private environmentService: IEnvironmentService, + @IWindowsService private windowsService: IWindowsService, + ) { + super(id, label); + } + + run(): TPromise { + return this.windowsService.showItemInFolder(paths.join(this.environmentService.logsPath, 'main.log')); + } +} + +export class ShowLogsAction extends Action { + + static ID = 'workbench.action.showLogs'; + static LABEL = nls.localize('showLogs', "Show Logs..."); + + constructor(id: string, label: string, + @IEnvironmentService private environmentService: IEnvironmentService, + @IWindowService private windowService: IWindowService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IQuickOpenService private quickOpenService: IQuickOpenService + ) { + super(id, label); + } + + run(): TPromise { + const entries: IPickOpenEntry[] = [ + { id: 'main', label: nls.localize('mainProcess', "Main"), run: () => this.editorService.openEditor({ resource: URI.file(paths.join(this.environmentService.logsPath, 'main.log')) }) }, + { id: 'shared', label: nls.localize('sharedProcess', "Shared"), run: () => this.editorService.openEditor({ resource: URI.file(paths.join(this.environmentService.logsPath, 'sharedprocess.log')) }) }, + { id: 'renderer', label: nls.localize('rendererProcess', "Renderer"), run: () => this.editorService.openEditor({ resource: URI.file(paths.join(this.environmentService.logsPath, `renderer${this.windowService.getCurrentWindowId()}.log`)) }) }, + { id: 'extenshionHost', label: nls.localize('extensionHost', "Extension Host"), run: () => this.editorService.openEditor({ resource: URI.file(paths.join(this.environmentService.logsPath, `exthost${this.windowService.getCurrentWindowId()}.log`)) }) } + ]; + + return this.quickOpenService.pick(entries, { placeHolder: nls.localize('selectProcess', "Select process") }).then(entry => { + if (entry) { + entry.run(null); + } + }); + } +} + +export class SetLogLevelAction extends Action { + + static ID = 'workbench.action.setLogLevel'; + static LABEL = nls.localize('setLogLevel', "Set Log Level"); + + constructor(id: string, label: string, + @IQuickOpenService private quickOpenService: IQuickOpenService, + @ILogService private logService: ILogService + ) { + super(id, label); + } + + run(): TPromise { + const entries = [ + { label: nls.localize('trace', "Trace"), level: LogLevel.Trace }, + { label: nls.localize('debug', "Debug"), level: LogLevel.Debug }, + { label: nls.localize('info', "Info"), level: LogLevel.Info }, + { label: nls.localize('warn', "Warning"), level: LogLevel.Warning }, + { label: nls.localize('err', "Error"), level: LogLevel.Error }, + { label: nls.localize('critical', "Critical"), level: LogLevel.Critical }, + { label: nls.localize('off', "Off"), level: LogLevel.Off } + ]; + + return this.quickOpenService.pick(entries, { placeHolder: nls.localize('selectLogLevel', "Select log level"), autoFocus: { autoFocusIndex: this.logService.getLevel() } }).then(entry => { + if (entry) { + this.logService.setLevel(entry.level); + } + }); + } } \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index 81bc8dd1fbb..4fcb345a224 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -7,12 +7,7 @@ 'use strict'; -if (window.location.search.indexOf('prof-startup') >= 0) { - var profiler = require('v8-profiler'); - profiler.startProfiling('renderer', true); -} - -/*global window,document,define,Monaco_Loader_Init*/ +/*global window,document,define*/ const perf = require('../../../base/common/performance'); perf.mark('renderer/started'); @@ -62,15 +57,6 @@ function parseURLQueryArgs() { .reduce(function (r, param) { r[param[0]] = decodeURIComponent(param[1]); return r; }, {}); } -function createScript(src, onload) { - const script = document.createElement('script'); - script.src = src; - script.addEventListener('load', onload); - - const head = document.getElementsByTagName('head')[0]; - head.insertBefore(script, head.lastChild); -} - function uriFromPath(_path) { var pathName = path.resolve(_path).replace(/\\/g, '/'); if (pathName.length > 0 && pathName.charAt(0) !== '/') { @@ -158,73 +144,63 @@ function main() { } // Load the loader and start loading the workbench - const rootUrl = uriFromPath(configuration.appRoot) + '/out'; + const loaderFilename = configuration.appRoot + '/out/vs/loader.js'; + const loaderSource = require('fs').readFileSync(loaderFilename); + require('vm').runInThisContext(loaderSource, { filename: loaderFilename }); - function onLoader() { - window.nodeRequire = require.__$__nodeRequire; + window.nodeRequire = require.__$__nodeRequire; - define('fs', ['original-fs'], function (originalFS) { return originalFS; }); // replace the patched electron fs with the original node fs for all AMD code + define('fs', ['original-fs'], function (originalFS) { return originalFS; }); // replace the patched electron fs with the original node fs for all AMD code - window.MonacoEnvironment = {}; + window.MonacoEnvironment = {}; - const onNodeCachedData = window.MonacoEnvironment.onNodeCachedData = []; - require.config({ - baseUrl: rootUrl, - 'vs/nls': nlsConfig, - recordStats: !!configuration.performance, - nodeCachedDataDir: configuration.nodeCachedDataDir, - onNodeCachedData: function () { onNodeCachedData.push(arguments); }, - nodeModules: [/*BUILD->INSERT_NODE_MODULES*/] - }); + const onNodeCachedData = window.MonacoEnvironment.onNodeCachedData = []; + require.config({ + baseUrl: uriFromPath(configuration.appRoot) + '/out', + 'vs/nls': nlsConfig, + recordStats: !!configuration.performance, + nodeCachedDataDir: configuration.nodeCachedDataDir, + onNodeCachedData: function () { onNodeCachedData.push(arguments); }, + nodeModules: [/*BUILD->INSERT_NODE_MODULES*/] + }); - if (nlsConfig.pseudo) { - require(['vs/nls'], function (nlsPlugin) { - nlsPlugin.setPseudoTranslation(nlsConfig.pseudo); - }); - } - - // Perf Counters - const timers = window.MonacoEnvironment.timers = { - isInitialStartup: !!configuration.isInitialStartup, - hasAccessibilitySupport: !!configuration.accessibilitySupport, - start: configuration.perfStartTime, - appReady: configuration.perfAppReady, - windowLoad: configuration.perfWindowLoadTime, - beforeLoadWorkbenchMain: Date.now() - }; - - const workbenchMainClock = perf.time('loadWorkbenchMain'); - require([ - 'vs/workbench/workbench.main', - 'vs/nls!vs/workbench/workbench.main', - 'vs/css!vs/workbench/workbench.main' - ], function () { - workbenchMainClock.stop(); - timers.afterLoadWorkbenchMain = Date.now(); - - process.lazyEnv.then(function () { - perf.mark('main/startup'); - require('vs/workbench/electron-browser/main') - .startup(configuration) - .done(function () { - unbind(); // since the workbench is running, unbind our developer related listeners and let the workbench handle them - }, function (error) { - onError(error, enableDeveloperTools); - }); - }); + if (nlsConfig.pseudo) { + require(['vs/nls'], function (nlsPlugin) { + nlsPlugin.setPseudoTranslation(nlsConfig.pseudo); }); } - // In the bundled version the nls plugin is packaged with the loader so the NLS Plugins - if (typeof Monaco_Loader_Init === 'function') { - const loader = Monaco_Loader_Init(); - //eslint-disable-next-line no-global-assign - define = loader.define; require = loader.require; - onLoader(); + // Perf Counters + const timers = window.MonacoEnvironment.timers = { + isInitialStartup: !!configuration.isInitialStartup, + hasAccessibilitySupport: !!configuration.accessibilitySupport, + start: configuration.perfStartTime, + appReady: configuration.perfAppReady, + windowLoad: configuration.perfWindowLoadTime, + beforeLoadWorkbenchMain: Date.now() + }; + + const workbenchMainClock = perf.time('loadWorkbenchMain'); + require([ + 'vs/workbench/workbench.main', + 'vs/nls!vs/workbench/workbench.main', + 'vs/css!vs/workbench/workbench.main' + ], function () { + workbenchMainClock.stop(); + timers.afterLoadWorkbenchMain = Date.now(); + + process.lazyEnv.then(function () { + perf.mark('main/startup'); + require('vs/workbench/electron-browser/main') + .startup(configuration) + .done(function () { + unbind(); // since the workbench is running, unbind our developer related listeners and let the workbench handle them + }, function (error) { + onError(error, enableDeveloperTools); + }); + }); + }); - } else { - createScript(rootUrl + '/vs/loader.js', onLoader); - } } main(); diff --git a/src/vs/workbench/electron-browser/commands.ts b/src/vs/workbench/electron-browser/commands.ts index f079880f97c..b7f991b44e9 100644 --- a/src/vs/workbench/electron-browser/commands.ts +++ b/src/vs/workbench/electron-browser/commands.ts @@ -12,7 +12,6 @@ import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRe import { IPartService } from 'vs/workbench/services/part/common/partService'; import { NoEditorsVisibleContext, InZenModeContext } from 'vs/workbench/electron-browser/workbench'; import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; -import { IListService, ListFocusContext } from 'vs/platform/list/browser/listService'; import { List } from 'vs/base/browser/ui/list/listWidget'; import errors = require('vs/base/common/errors'); import { CommandsRegistry } from 'vs/platform/commands/common/commands'; @@ -20,6 +19,9 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import URI from 'vs/base/common/uri'; import { IEditorOptions, Position as EditorPosition } from 'vs/platform/editor/common/editor'; import { openFolderCommand, openFileInNewWindowCommand, openFileFolderInNewWindowCommand, openFolderInNewWindowCommand, openWorkspaceInNewWindowCommand } from 'vs/workbench/browser/actions/workspaceActions'; +import { WorkbenchListFocusContextKey, IListService } from 'vs/platform/list/browser/listService'; +import { PagedList } from 'vs/base/browser/ui/list/listPaging'; +import { range } from 'vs/base/common/arrays'; // --- List Commands @@ -28,19 +30,18 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.focusDown', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: KeyCode.DownArrow, mac: { primary: KeyCode.DownArrow, secondary: [KeyMod.WinCtrl | KeyCode.KEY_N] }, handler: (accessor, arg2) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + const focused = accessor.get(IListService).lastFocusedList; const count = typeof arg2 === 'number' ? arg2 : 1; // List - if (focused instanceof List) { + if (focused instanceof List || focused instanceof PagedList) { const list = focused; list.focusNext(count); @@ -60,19 +61,18 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.focusUp', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: KeyCode.UpArrow, mac: { primary: KeyCode.UpArrow, secondary: [KeyMod.WinCtrl | KeyCode.KEY_P] }, handler: (accessor, arg2) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + const focused = accessor.get(IListService).lastFocusedList; const count = typeof arg2 === 'number' ? arg2 : 1; // List - if (focused instanceof List) { + if (focused instanceof List || focused instanceof PagedList) { const list = focused; list.focusPrevious(count); @@ -92,18 +92,17 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.collapse', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: KeyCode.LeftArrow, mac: { primary: KeyCode.LeftArrow, secondary: [KeyMod.CtrlCmd | KeyCode.UpArrow] }, handler: (accessor) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + const focused = accessor.get(IListService).lastFocusedList; // Tree only - if (focused && !(focused instanceof List)) { + if (focused && !(focused instanceof List || focused instanceof PagedList)) { const tree = focused; const focus = tree.getFocus(); @@ -123,14 +122,13 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.expand', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: KeyCode.RightArrow, handler: (accessor) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + const focused = accessor.get(IListService).lastFocusedList; // Tree only - if (focused && !(focused instanceof List)) { + if (focused && !(focused instanceof List || focused instanceof PagedList)) { const tree = focused; const focus = tree.getFocus(); @@ -150,14 +148,13 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.focusPageUp', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: KeyCode.PageUp, handler: (accessor) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + const focused = accessor.get(IListService).lastFocusedList; // List - if (focused instanceof List) { + if (focused instanceof List || focused instanceof PagedList) { const list = focused; list.focusPreviousPage(); @@ -177,14 +174,13 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.focusPageDown', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: KeyCode.PageDown, handler: (accessor) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + const focused = accessor.get(IListService).lastFocusedList; // List - if (focused instanceof List) { + if (focused instanceof List || focused instanceof PagedList) { const list = focused; list.focusNextPage(); @@ -204,7 +200,7 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.focusFirst', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: KeyCode.Home, handler: accessor => listFocusFirst(accessor) }); @@ -212,17 +208,16 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.focusFirstChild', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: null, handler: accessor => listFocusFirst(accessor, { fromFocused: true }) }); function listFocusFirst(accessor: ServicesAccessor, options?: { fromFocused: boolean }): void { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + const focused = accessor.get(IListService).lastFocusedList; // List - if (focused instanceof List) { + if (focused instanceof List || focused instanceof PagedList) { const list = focused; list.setFocus([0]); @@ -241,7 +236,7 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.focusLast', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: KeyCode.End, handler: accessor => listFocusLast(accessor) }); @@ -249,17 +244,16 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.focusLastChild', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: null, handler: accessor => listFocusLast(accessor, { fromFocused: true }) }); function listFocusLast(accessor: ServicesAccessor, options?: { fromFocused: boolean }): void { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + const focused = accessor.get(IListService).lastFocusedList; // List - if (focused instanceof List) { + if (focused instanceof List || focused instanceof PagedList) { const list = focused; list.setFocus([list.length - 1]); @@ -278,7 +272,7 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.select', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: KeyCode.Enter, secondary: [KeyMod.CtrlCmd | KeyCode.Enter], mac: { @@ -286,11 +280,10 @@ export function registerCommands(): void { secondary: [KeyMod.CtrlCmd | KeyCode.Enter, KeyMod.CtrlCmd | KeyCode.DownArrow] }, handler: (accessor) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + const focused = accessor.get(IListService).lastFocusedList; // List - if (focused instanceof List) { + if (focused instanceof List || focused instanceof PagedList) { const list = focused; list.setSelection(list.getFocus()); list.open(list.getFocus()); @@ -308,17 +301,32 @@ export function registerCommands(): void { } }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: 'list.selectAll', + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: WorkbenchListFocusContextKey, + primary: KeyMod.CtrlCmd | KeyCode.KEY_A, + handler: (accessor) => { + const focused = accessor.get(IListService).lastFocusedList; + + // List + if (focused instanceof List || focused instanceof PagedList) { + const list = focused; + list.setSelection(range(list.length)); + } + } + }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.toggleExpand', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: KeyCode.Space, handler: (accessor) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + const focused = accessor.get(IListService).lastFocusedList; // Tree only - if (focused && !(focused instanceof List)) { + if (focused && !(focused instanceof List || focused instanceof PagedList)) { const tree = focused; const focus = tree.getFocus(); @@ -332,14 +340,13 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.clear', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ListFocusContext, + when: WorkbenchListFocusContextKey, primary: KeyCode.Escape, handler: (accessor) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + const focused = accessor.get(IListService).lastFocusedList; // Tree only - if (focused && !(focused instanceof List)) { + if (focused && !(focused instanceof List || focused instanceof PagedList)) { const tree = focused; if (tree.getSelection().length) { diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index c7b3f2fc56d..24565c1ea2d 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -14,7 +14,7 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actions'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform'; -import { CloseEditorAction, KeybindingsReferenceAction, OpenDocumentationUrlAction, OpenIntroductoryVideosUrlAction, OpenTipsAndTricksUrlAction, ReportIssueAction, ReportPerformanceIssueAction, ZoomResetAction, ZoomOutAction, ZoomInAction, ToggleFullScreenAction, ToggleMenuBarAction, CloseWorkspaceAction, CloseCurrentWindowAction, SwitchWindow, NewWindowAction, CloseMessagesAction, NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction, IncreaseViewSizeAction, DecreaseViewSizeAction, ShowStartupPerformance, ToggleSharedProcessAction, QuickSwitchWindow, QuickOpenRecentAction, inRecentFilesPickerContextKey, ConfigureLocaleAction } from 'vs/workbench/electron-browser/actions'; +import { CloseEditorAction, KeybindingsReferenceAction, OpenDocumentationUrlAction, OpenIntroductoryVideosUrlAction, OpenTipsAndTricksUrlAction, ReportIssueAction, ReportPerformanceIssueAction, ZoomResetAction, ZoomOutAction, ZoomInAction, ToggleFullScreenAction, ToggleMenuBarAction, CloseWorkspaceAction, CloseCurrentWindowAction, SwitchWindow, NewWindowAction, CloseMessagesAction, NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction, IncreaseViewSizeAction, DecreaseViewSizeAction, ShowStartupPerformance, ToggleSharedProcessAction, QuickSwitchWindow, QuickOpenRecentAction, inRecentFilesPickerContextKey, ConfigureLocaleAction, ShowLogsAction, OpenLogsFolderAction, SetLogLevelAction } from 'vs/workbench/electron-browser/actions'; import { MessagesVisibleContext } from 'vs/workbench/electron-browser/workbench'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; import { registerCommands } from 'vs/workbench/electron-browser/commands'; @@ -31,11 +31,15 @@ registerCommands(); const viewCategory = nls.localize('view', "View"); const helpCategory = nls.localize('help', "Help"); const fileCategory = nls.localize('file', "File"); +const devCategory = nls.localize('developer', "Developer"); const workbenchActionsRegistry = Registry.as(Extensions.WorkbenchActions); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(NewWindowAction, NewWindowAction.ID, NewWindowAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_N }), 'New Window'); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(CloseCurrentWindowAction, CloseCurrentWindowAction.ID, CloseCurrentWindowAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_W }), 'Close Window'); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(SwitchWindow, SwitchWindow.ID, SwitchWindow.LABEL, { primary: null, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_W } }), 'Switch Window...'); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(QuickSwitchWindow, QuickSwitchWindow.ID, QuickSwitchWindow.LABEL), 'Quick Switch Window...'); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowLogsAction, ShowLogsAction.ID, ShowLogsAction.LABEL), 'Developer: Show Logs...', devCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenLogsFolderAction, OpenLogsFolderAction.ID, OpenLogsFolderAction.LABEL), 'Developer: Open Log Folder', devCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(SetLogLevelAction, SetLogLevelAction.ID, SetLogLevelAction.LABEL), 'Developer: Set Log Level', devCategory); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenRecentAction, QuickOpenRecentAction.ID, QuickOpenRecentAction.LABEL), 'File: Quick Open Recent...', fileCategory); @@ -157,6 +161,12 @@ let workbenchProperties: { [path: string]: IJSONSchema; } = { 'default': 'right', 'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'editorTabCloseButton' }, "Controls the position of the editor's tabs close buttons or disables them when set to 'off'.") }, + 'workbench.editor.tabSizing': { + 'type': 'string', + 'enum': ['fit', 'shrink'], + 'default': 'fit', + 'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'tabSizing' }, "Controls the sizing of editor tabs. Set to 'fit' to keep tabs always large enough to show the full editor label. Set to 'shrink' to allow tabs to get smaller when the available space is not enough to show all tabs at once.") + }, 'workbench.editor.showIcons': { 'type': 'boolean', 'description': nls.localize('showIcons', "Controls if opened editors should show with an icon or not. This requires an icon theme to be enabled as well."), @@ -266,130 +276,121 @@ configurationRegistry.registerConfiguration({ // Configuration: Window -let properties: { [path: string]: IJSONSchema; } = { - 'window.openFilesInNewWindow': { - 'type': 'string', - 'enum': ['on', 'off', 'default'], - 'enumDescriptions': [ - nls.localize('window.openFilesInNewWindow.on', "Files will open in a new window"), - nls.localize('window.openFilesInNewWindow.off', "Files will open in the window with the files' folder open or the last active window"), - nls.localize('window.openFilesInNewWindow.default', "Files will open in the window with the files' folder open or the last active window unless opened via the dock or from finder (macOS only)") - ], - 'default': 'off', - 'description': - nls.localize('openFilesInNewWindow', "Controls if files should open in a new window.\n- default: files will open in the window with the files' folder open or the last active window unless opened via the dock or from finder (macOS only)\n- on: files will open in a new window\n- off: files will open in the window with the files' folder open or the last active window\nNote that there can still be cases where this setting is ignored (e.g. when using the -new-window or -reuse-window command line option).") - }, - 'window.openFoldersInNewWindow': { - 'type': 'string', - 'enum': ['on', 'off', 'default'], - 'enumDescriptions': [ - nls.localize('window.openFoldersInNewWindow.on', "Folders will open in a new window"), - nls.localize('window.openFoldersInNewWindow.off', "Folders will replace the last active window"), - nls.localize('window.openFoldersInNewWindow.default', "Folders will open in a new window unless a folder is picked from within the application (e.g. via the File menu)") - ], - 'default': 'default', - 'description': nls.localize('openFoldersInNewWindow', "Controls if folders should open in a new window or replace the last active window.\n- default: folders will open in a new window unless a folder is picked from within the application (e.g. via the File menu)\n- on: folders will open in a new window\n- off: folders will replace the last active window\nNote that there can still be cases where this setting is ignored (e.g. when using the -new-window or -reuse-window command line option)." - ) - }, - 'window.restoreWindows': { - 'type': 'string', - 'enum': ['all', 'folders', 'one', 'none'], - 'enumDescriptions': [ - nls.localize('window.reopenFolders.all', "Reopen all windows."), - nls.localize('window.reopenFolders.folders', "Reopen all folders. Empty workspaces will not be restored."), - nls.localize('window.reopenFolders.one', "Reopen the last active window."), - nls.localize('window.reopenFolders.none', "Never reopen a window. Always start with an empty one.") - ], - 'default': 'one', - 'description': nls.localize('restoreWindows', "Controls how windows are being reopened after a restart. Select 'none' to always start with an empty workspace, 'one' to reopen the last window you worked on, 'folders' to reopen all windows that had folders opened or 'all' to reopen all windows of your last session.") - }, - 'window.restoreFullscreen': { - 'type': 'boolean', - 'default': false, - 'description': nls.localize('restoreFullscreen', "Controls if a window should restore to full screen mode if it was exited in full screen mode.") - }, - 'window.zoomLevel': { - 'type': 'number', - 'default': 0, - 'description': nls.localize('zoomLevel', "Adjust the zoom level of the window. The original size is 0 and each increment above (e.g. 1) or below (e.g. -1) represents zooming 20% larger or smaller. You can also enter decimals to adjust the zoom level with a finer granularity.") - }, - 'window.title': { - 'type': 'string', - 'default': isMacintosh ? '${activeEditorShort}${separator}${rootName}' : '${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}', - 'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by parenthesis are not to be translated.'], key: 'title' }, - "Controls the window title based on the active editor. Variables are substituted based on the context:\n\${activeEditorShort}: the file name (e.g. myFile.txt)\n\${activeEditorMedium}: the path of the file relative to the workspace folder (e.g. myFolder/myFile.txt)\n\${activeEditorLong}: the full path of the file (e.g. /Users/Development/myProject/myFolder/myFile.txt)\n\${folderName}: name of the workspace folder the file is contained in (e.g. myFolder)\n\${folderPath}: file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder)\n\${rootName}: name of the workspace (e.g. myFolder or myWorkspace)\n\${rootPath}: file path of the workspace (e.g. /Users/Development/myWorkspace)\n\${appName}: e.g. VS Code\n\${dirty}: a dirty indicator if the active editor is dirty\n\${separator}: a conditional separator (\" - \") that only shows when surrounded by variables with values") - }, - 'window.newWindowDimensions': { - 'type': 'string', - 'enum': ['default', 'inherit', 'maximized', 'fullscreen'], - 'enumDescriptions': [ - nls.localize('window.newWindowDimensions.default', "Open new windows in the center of the screen."), - nls.localize('window.newWindowDimensions.inherit', "Open new windows with same dimension as last active one."), - nls.localize('window.newWindowDimensions.maximized', "Open new windows maximized."), - nls.localize('window.newWindowDimensions.fullscreen', "Open new windows in full screen mode.") - ], - 'default': 'default', - 'description': nls.localize('newWindowDimensions', "Controls the dimensions of opening a new window when at least one window is already opened. By default, a new window will open in the center of the screen with small dimensions. When set to 'inherit', the window will get the same dimensions as the last window that was active. When set to 'maximized', the window will open maximized and fullscreen if configured to 'fullscreen'. Note that this setting does not have an impact on the first window that is opened. The first window will always restore the size and location as you left it before closing.") - }, - 'window.closeWhenEmpty': { - 'type': 'boolean', - 'default': false, - 'description': nls.localize('closeWhenEmpty', "Controls if closing the last editor should also close the window. This setting only applies for windows that do not show folders.") - } -}; - -if (isWindows || isLinux) { - properties['window.menuBarVisibility'] = { - 'type': 'string', - 'enum': ['default', 'visible', 'toggle', 'hidden'], - 'enumDescriptions': [ - nls.localize('window.menuBarVisibility.default', "Menu is only hidden in full screen mode."), - nls.localize('window.menuBarVisibility.visible', "Menu is always visible even in full screen mode."), - nls.localize('window.menuBarVisibility.toggle', "Menu is hidden but can be displayed via Alt key."), - nls.localize('window.menuBarVisibility.hidden', "Menu is always hidden.") - ], - 'default': 'default', - 'description': nls.localize('menuBarVisibility', "Control the visibility of the menu bar. A setting of 'toggle' means that the menu bar is hidden and a single press of the Alt key will show it. By default, the menu bar will be visible, unless the window is full screen.") - }; - properties['window.enableMenuBarMnemonics'] = { - 'type': 'boolean', - 'default': true, - 'description': nls.localize('enableMenuBarMnemonics', "If enabled, the main menus can be opened via Alt-key shortcuts. Disabling mnemonics allows to bind these Alt-key shortcuts to editor commands instead.") - }; -} - -if (isWindows) { - properties['window.autoDetectHighContrast'] = { - 'type': 'boolean', - 'default': true, - 'description': nls.localize('autoDetectHighContrast', "If enabled, will automatically change to high contrast theme if Windows is using a high contrast theme, and to dark theme when switching away from a Windows high contrast theme."), - }; -} - -if (isMacintosh) { - properties['window.titleBarStyle'] = { - 'type': 'string', - 'enum': ['native', 'custom'], - 'default': 'custom', - 'description': nls.localize('titleBarStyle', "Adjust the appearance of the window title bar. Changes require a full restart to apply.") - }; - - // Minimum: macOS Sierra (10.12.x = darwin 16.x) - if (parseFloat(os.release()) >= 16) { - properties['window.nativeTabs'] = { - 'type': 'boolean', - 'default': false, - 'description': nls.localize('window.nativeTabs', "Enables macOS Sierra window tabs. Note that changes require a full restart to apply and that native tabs will disable a custom title bar style if configured.") - }; - } -} configurationRegistry.registerConfiguration({ 'id': 'window', 'order': 8, 'title': nls.localize('windowConfigurationTitle', "Window"), 'type': 'object', - 'properties': properties + 'properties': { + 'window.openFilesInNewWindow': { + 'type': 'string', + 'enum': ['on', 'off', 'default'], + 'enumDescriptions': [ + nls.localize('window.openFilesInNewWindow.on', "Files will open in a new window"), + nls.localize('window.openFilesInNewWindow.off', "Files will open in the window with the files' folder open or the last active window"), + nls.localize('window.openFilesInNewWindow.default', "Files will open in the window with the files' folder open or the last active window unless opened via the dock or from finder (macOS only)") + ], + 'default': 'off', + 'description': + nls.localize('openFilesInNewWindow', "Controls if files should open in a new window.\n- default: files will open in the window with the files' folder open or the last active window unless opened via the dock or from finder (macOS only)\n- on: files will open in a new window\n- off: files will open in the window with the files' folder open or the last active window\nNote that there can still be cases where this setting is ignored (e.g. when using the -new-window or -reuse-window command line option).") + }, + 'window.openFoldersInNewWindow': { + 'type': 'string', + 'enum': ['on', 'off', 'default'], + 'enumDescriptions': [ + nls.localize('window.openFoldersInNewWindow.on', "Folders will open in a new window"), + nls.localize('window.openFoldersInNewWindow.off', "Folders will replace the last active window"), + nls.localize('window.openFoldersInNewWindow.default', "Folders will open in a new window unless a folder is picked from within the application (e.g. via the File menu)") + ], + 'default': 'default', + 'description': nls.localize('openFoldersInNewWindow', "Controls if folders should open in a new window or replace the last active window.\n- default: folders will open in a new window unless a folder is picked from within the application (e.g. via the File menu)\n- on: folders will open in a new window\n- off: folders will replace the last active window\nNote that there can still be cases where this setting is ignored (e.g. when using the -new-window or -reuse-window command line option)." + ) + }, + 'window.restoreWindows': { + 'type': 'string', + 'enum': ['all', 'folders', 'one', 'none'], + 'enumDescriptions': [ + nls.localize('window.reopenFolders.all', "Reopen all windows."), + nls.localize('window.reopenFolders.folders', "Reopen all folders. Empty workspaces will not be restored."), + nls.localize('window.reopenFolders.one', "Reopen the last active window."), + nls.localize('window.reopenFolders.none', "Never reopen a window. Always start with an empty one.") + ], + 'default': 'one', + 'description': nls.localize('restoreWindows', "Controls how windows are being reopened after a restart. Select 'none' to always start with an empty workspace, 'one' to reopen the last window you worked on, 'folders' to reopen all windows that had folders opened or 'all' to reopen all windows of your last session.") + }, + 'window.restoreFullscreen': { + 'type': 'boolean', + 'default': false, + 'description': nls.localize('restoreFullscreen', "Controls if a window should restore to full screen mode if it was exited in full screen mode.") + }, + 'window.zoomLevel': { + 'type': 'number', + 'default': 0, + 'description': nls.localize('zoomLevel', "Adjust the zoom level of the window. The original size is 0 and each increment above (e.g. 1) or below (e.g. -1) represents zooming 20% larger or smaller. You can also enter decimals to adjust the zoom level with a finer granularity.") + }, + 'window.title': { + 'type': 'string', + 'default': isMacintosh ? '${activeEditorShort}${separator}${rootName}' : '${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}', + 'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by parenthesis are not to be translated.'], key: 'title' }, + "Controls the window title based on the active editor. Variables are substituted based on the context:\n\${activeEditorShort}: the file name (e.g. myFile.txt)\n\${activeEditorMedium}: the path of the file relative to the workspace folder (e.g. myFolder/myFile.txt)\n\${activeEditorLong}: the full path of the file (e.g. /Users/Development/myProject/myFolder/myFile.txt)\n\${folderName}: name of the workspace folder the file is contained in (e.g. myFolder)\n\${folderPath}: file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder)\n\${rootName}: name of the workspace (e.g. myFolder or myWorkspace)\n\${rootPath}: file path of the workspace (e.g. /Users/Development/myWorkspace)\n\${appName}: e.g. VS Code\n\${dirty}: a dirty indicator if the active editor is dirty\n\${separator}: a conditional separator (\" - \") that only shows when surrounded by variables with values") + }, + 'window.newWindowDimensions': { + 'type': 'string', + 'enum': ['default', 'inherit', 'maximized', 'fullscreen'], + 'enumDescriptions': [ + nls.localize('window.newWindowDimensions.default', "Open new windows in the center of the screen."), + nls.localize('window.newWindowDimensions.inherit', "Open new windows with same dimension as last active one."), + nls.localize('window.newWindowDimensions.maximized', "Open new windows maximized."), + nls.localize('window.newWindowDimensions.fullscreen', "Open new windows in full screen mode.") + ], + 'default': 'default', + 'description': nls.localize('newWindowDimensions', "Controls the dimensions of opening a new window when at least one window is already opened. By default, a new window will open in the center of the screen with small dimensions. When set to 'inherit', the window will get the same dimensions as the last window that was active. When set to 'maximized', the window will open maximized and fullscreen if configured to 'fullscreen'. Note that this setting does not have an impact on the first window that is opened. The first window will always restore the size and location as you left it before closing.") + }, + 'window.closeWhenEmpty': { + 'type': 'boolean', + 'default': false, + 'description': nls.localize('closeWhenEmpty', "Controls if closing the last editor should also close the window. This setting only applies for windows that do not show folders.") + }, + 'window.menuBarVisibility': { + 'type': 'string', + 'enum': ['default', 'visible', 'toggle', 'hidden'], + 'enumDescriptions': [ + nls.localize('window.menuBarVisibility.default', "Menu is only hidden in full screen mode."), + nls.localize('window.menuBarVisibility.visible', "Menu is always visible even in full screen mode."), + nls.localize('window.menuBarVisibility.toggle', "Menu is hidden but can be displayed via Alt key."), + nls.localize('window.menuBarVisibility.hidden', "Menu is always hidden.") + ], + 'default': 'default', + 'description': nls.localize('menuBarVisibility', "Control the visibility of the menu bar. A setting of 'toggle' means that the menu bar is hidden and a single press of the Alt key will show it. By default, the menu bar will be visible, unless the window is full screen."), + 'included': isWindows || isLinux + }, + 'window.enableMenuBarMnemonics': { + 'type': 'boolean', + 'default': true, + 'description': nls.localize('enableMenuBarMnemonics', "If enabled, the main menus can be opened via Alt-key shortcuts. Disabling mnemonics allows to bind these Alt-key shortcuts to editor commands instead."), + 'included': isWindows || isLinux + }, + 'window.autoDetectHighContrast': { + 'type': 'boolean', + 'default': true, + 'description': nls.localize('autoDetectHighContrast', "If enabled, will automatically change to high contrast theme if Windows is using a high contrast theme, and to dark theme when switching away from a Windows high contrast theme."), + 'included': !isWindows + }, + 'window.titleBarStyle': { + 'type': 'string', + 'enum': ['native', 'custom'], + 'default': 'custom', + 'description': nls.localize('titleBarStyle', "Adjust the appearance of the window title bar. Changes require a full restart to apply."), + 'included': isMacintosh + }, + 'window.nativeTabs': { + 'type': 'boolean', + 'default': false, + 'description': nls.localize('window.nativeTabs', "Enables macOS Sierra window tabs. Note that changes require a full restart to apply and that native tabs will disable a custom title bar style if configured."), + 'included': isMacintosh && parseFloat(os.release()) >= 16 // Minimum: macOS Sierra (10.12.x = darwin 16.x) + } + } }); // Configuration: Zen Mode @@ -442,6 +443,7 @@ const schemaId = 'vscode://schemas/locale'; const schema: IJSONSchema = { id: schemaId, + allowComments: true, description: 'Locale Definition file', type: 'object', default: { diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index 577105b0535..ed776746567 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -32,19 +32,19 @@ import { IStorageService } from 'vs/platform/storage/common/storage'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { StorageService, inMemoryLocalStorageInstance } from 'vs/platform/storage/common/storageService'; import { Client as ElectronIPCClient } from 'vs/base/parts/ipc/electron-browser/ipc.electron-browser'; -import { webFrame, remote } from 'electron'; +import { webFrame } from 'electron'; import { UpdateChannelClient } from 'vs/platform/update/common/updateIpc'; import { IUpdateService } from 'vs/platform/update/common/update'; import { URLChannelClient } from 'vs/platform/url/common/urlIpc'; import { IURLService } from 'vs/platform/url/common/url'; import { WorkspacesChannelClient } from 'vs/platform/workspaces/common/workspacesIpc'; import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; +import { createLogService } from 'vs/platform/log/node/spdlogService'; import fs = require('fs'); +import { ConsoleLogService, MultiplexLogService } from 'vs/platform/log/common/log'; gracefulFs.gracefulify(fs); // enable gracefulFs -const currentWindowId = remote.getCurrentWindow().id; - export function startup(configuration: IWindowConfiguration): TPromise { // Ensure others can listen to zoom level changes @@ -68,14 +68,20 @@ export function startup(configuration: IWindowConfiguration): TPromise { } function openWorkbench(configuration: IWindowConfiguration): TPromise { - const mainProcessClient = new ElectronIPCClient(String(`window${currentWindowId}`)); - const mainServices = createMainProcessServices(mainProcessClient); + const mainProcessClient = new ElectronIPCClient(String(`window${configuration.windowId}`)); + const mainServices = createMainProcessServices(mainProcessClient, configuration); const environmentService = new EnvironmentService(configuration, configuration.execPath); + const spdlogService = createLogService(`renderer${configuration.windowId}`, environmentService); + const consoleLogService = new ConsoleLogService(environmentService); + const logService = new MultiplexLogService([consoleLogService, spdlogService]); + + logService.trace('openWorkbench configuration', JSON.stringify(configuration)); // Since the configuration service is one of the core services that is used in so many places, we initialize it // right before startup of the workbench shell to have its data ready for consumers return createAndInitializeWorkspaceService(configuration, environmentService).then(workspaceService => { + const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, workspaceService.getWorkbenchState() === WorkbenchState.EMPTY); const storageService = createStorageService(workspaceService, environmentService); @@ -90,6 +96,7 @@ function openWorkbench(configuration: IWindowConfiguration): TPromise { contextService: workspaceService, configurationService: workspaceService, environmentService, + logService, timerService, storageService }, mainServices, configuration); @@ -185,7 +192,7 @@ function createStorageService(workspaceService: IWorkspaceContextService, enviro return new StorageService(storage, storage, workspaceId, secondaryWorkspaceId); } -function createMainProcessServices(mainProcessClient: ElectronIPCClient): ServiceCollection { +function createMainProcessServices(mainProcessClient: ElectronIPCClient, configuration: IWindowConfiguration): ServiceCollection { const serviceCollection = new ServiceCollection(); const windowsChannel = mainProcessClient.getChannel('windows'); @@ -195,7 +202,7 @@ function createMainProcessServices(mainProcessClient: ElectronIPCClient): Servic serviceCollection.set(IUpdateService, new SyncDescriptor(UpdateChannelClient, updateChannel)); const urlChannel = mainProcessClient.getChannel('url'); - serviceCollection.set(IURLService, new SyncDescriptor(URLChannelClient, urlChannel, currentWindowId)); + serviceCollection.set(IURLService, new SyncDescriptor(URLChannelClient, urlChannel, configuration.windowId)); const workspacesChannel = mainProcessClient.getChannel('workspaces'); serviceCollection.set(IWorkspacesService, new WorkspacesChannelClient(workspacesChannel)); diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 8eed7cd4610..cf13abcc7cc 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -21,15 +21,13 @@ import pkg from 'vs/platform/node/package'; import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService'; import { Workbench, IWorkbenchStartedInfo } from 'vs/workbench/electron-browser/workbench'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { NullTelemetryService, configurationTelemetry, lifecycleTelemetry } from 'vs/platform/telemetry/common/telemetryUtils'; +import { NullTelemetryService, configurationTelemetry } from 'vs/platform/telemetry/common/telemetryUtils'; import { IExperimentService, ExperimentService } from 'vs/platform/telemetry/common/experiments'; import { ITelemetryAppenderChannel, TelemetryAppenderClient } from 'vs/platform/telemetry/common/telemetryIpc'; import { TelemetryService, ITelemetryServiceConfig } from 'vs/platform/telemetry/common/telemetryService'; -import { IdleMonitor, UserStatus } from 'vs/platform/telemetry/browser/idleMonitor'; import ErrorTelemetry from 'vs/platform/telemetry/browser/errorTelemetry'; import { ElectronWindow } from 'vs/workbench/electron-browser/window'; -import { resolveWorkbenchCommonProperties, getOrCreateMachineId } from 'vs/platform/telemetry/node/workbenchCommonProperties'; -import { machineIdIpcChannel } from 'vs/platform/telemetry/node/commonProperties'; +import { resolveWorkbenchCommonProperties } from 'vs/platform/telemetry/node/workbenchCommonProperties'; import { IWindowsService, IWindowService, IWindowConfiguration } from 'vs/platform/windows/common/windows'; import { WindowService } from 'vs/platform/windows/electron-browser/windowService'; import { MessageService } from 'vs/workbench/services/message/electron-browser/messageService'; @@ -53,7 +51,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; -import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; +import { ILifecycleService, LifecyclePhase, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IMessageService, IChoiceService, Severity } from 'vs/platform/message/common/message'; @@ -73,7 +71,6 @@ import { IExtensionManagementChannel, ExtensionManagementChannelClient } from 'v import { IExtensionManagementService, IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { ExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionEnablementService'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; -import { remote, ipcRenderer as ipc } from 'electron'; import { BareFontInfo } from 'vs/editor/common/config/fontInfo'; import { restoreFontInfo, readFontInfo, saveFontInfo } from 'vs/editor/browser/config/configuration'; import * as browser from 'vs/base/browser/browser'; @@ -89,6 +86,7 @@ import { ITextMateService } from 'vs/workbench/services/textMate/electron-browse import { IBroadcastService, BroadcastService } from 'vs/platform/broadcast/electron-browser/broadcastService'; import { HashService } from 'vs/workbench/services/hash/node/hashService'; import { IHashService } from 'vs/workbench/services/hash/common/hashService'; +import { ILogService } from 'vs/platform/log/common/log'; /** * Services that we require for the Shell @@ -97,12 +95,11 @@ export interface ICoreServices { contextService: IWorkspaceContextService; configurationService: IConfigurationService; environmentService: IEnvironmentService; + logService: ILogService; timerService: ITimerService; storageService: IStorageService; } -const currentWindow = remote.getCurrentWindow(); - /** * The workbench shell contains the workbench with a rich header containing navigation and the activity bar. * With the Shell being the top level element in the page, it is also responsible for driving the layouting. @@ -111,6 +108,7 @@ export class WorkbenchShell { private storageService: IStorageService; private messageService: MessageService; private environmentService: IEnvironmentService; + private logService: ILogService; private contextViewService: ContextViewService; private configurationService: IConfigurationService; private contextService: IWorkspaceContextService; @@ -141,6 +139,7 @@ export class WorkbenchShell { this.contextService = coreServices.contextService; this.configurationService = coreServices.configurationService; this.environmentService = coreServices.environmentService; + this.logService = coreServices.logService; this.timerService = coreServices.timerService; this.storageService = coreServices.storageService; @@ -167,8 +166,8 @@ export class WorkbenchShell { this.workbench.startup().done(startupInfos => this.onWorkbenchStarted(startupInfos, instantiationService)); } catch (error) { - // Print out error - console.error(toErrorMessage(error, true)); + // Log it + this.logService.error(toErrorMessage(error, true)); // Rethrow throw error; @@ -179,7 +178,7 @@ export class WorkbenchShell { // Handle case where workbench is not starting up properly const timeoutHandle = setTimeout(() => { - console.warn('Workbench did not finish loading in 10 seconds, that might be a problem that should be reported.'); + this.logService.warn('Workbench did not finish loading in 10 seconds, that might be a problem that should be reported.'); }, 10000); this.lifecycleService.when(LifecyclePhase.Running).then(() => { @@ -274,12 +273,13 @@ export class WorkbenchShell { } private initServiceCollection(container: HTMLElement): [IInstantiationService, ServiceCollection] { - const disposables: IDisposable[] = []; - const serviceCollection = new ServiceCollection(); serviceCollection.set(IWorkspaceContextService, this.contextService); serviceCollection.set(IConfigurationService, this.configurationService); serviceCollection.set(IEnvironmentService, this.environmentService); + serviceCollection.set(ILogService, this.logService); + this.toUnbind.push(this.logService); + serviceCollection.set(ITimerService, this.timerService); serviceCollection.set(IStorageService, this.storageService); this.mainProcessServices.forEach((serviceIdentifier, serviceInstance) => { @@ -288,13 +288,13 @@ export class WorkbenchShell { const instantiationService: IInstantiationService = new InstantiationService(serviceCollection, true); - this.broadcastService = new BroadcastService(currentWindow.id); + this.broadcastService = new BroadcastService(this.configuration.windowId); serviceCollection.set(IBroadcastService, this.broadcastService); - serviceCollection.set(IWindowService, new SyncDescriptor(WindowService, currentWindow.id, this.configuration)); + serviceCollection.set(IWindowService, new SyncDescriptor(WindowService, this.configuration.windowId, this.configuration)); const sharedProcess = (serviceCollection.get(IWindowsService)).whenSharedProcessReady() - .then(() => connectNet(this.environmentService.sharedIPCHandle, `window:${currentWindow.id}`)); + .then(() => connectNet(this.environmentService.sharedIPCHandle, `window:${this.configuration.windowId}`)); sharedProcess .done(client => client.registerChannel('choice', instantiationService.createInstance(ChoiceChannel))); @@ -311,7 +311,6 @@ export class WorkbenchShell { serviceCollection.set(IExperimentService, this.experimentService); // Telemetry - this.sendMachineIdToMain(this.storageService); if (this.environmentService.isBuilt && !this.environmentService.isExtensionDevelopment && !this.environmentService.args['disable-telemetry'] && !!product.enableTelemetry) { const channel = getDelayedChannel(sharedProcess.then(c => c.getChannel('telemetryAppender'))); const commit = product.commit; @@ -319,7 +318,7 @@ export class WorkbenchShell { const config: ITelemetryServiceConfig = { appender: new TelemetryAppenderClient(channel), - commonProperties: resolveWorkbenchCommonProperties(this.storageService, commit, version, this.environmentService.installSource), + commonProperties: resolveWorkbenchCommonProperties(this.storageService, commit, version, this.configuration.machineId, this.environmentService.installSourcePath), piiPaths: [this.environmentService.appRoot, this.environmentService.extensionsPath] }; @@ -327,27 +326,14 @@ export class WorkbenchShell { this.telemetryService = telemetryService; const errorTelemetry = new ErrorTelemetry(telemetryService); - const idleMonitor = new IdleMonitor(2 * 60 * 1000); // 2 minutes - const listener = idleMonitor.onStatusChange(status => - /* __GDPR__ - "UserIdleStart" : {} - */ - /* __GDPR__ - "UserIdleStop" : {} - */ - this.telemetryService.publicLog(status === UserStatus.Active - ? TelemetryService.IDLE_STOP_EVENT_NAME - : TelemetryService.IDLE_START_EVENT_NAME - )); - - disposables.push(telemetryService, errorTelemetry, listener, idleMonitor); + this.toUnbind.push(telemetryService, errorTelemetry); } else { this.telemetryService = NullTelemetryService; } serviceCollection.set(ITelemetryService, this.telemetryService); - disposables.push(configurationTelemetry(this.telemetryService, this.configurationService)); + this.toUnbind.push(configurationTelemetry(this.telemetryService, this.configurationService)); let crashReporterService = NullCrashReporterService; if (!this.environmentService.disableCrashReporter && product.crashReporter && product.hockeyApp) { @@ -360,10 +346,8 @@ export class WorkbenchShell { serviceCollection.set(IChoiceService, this.messageService); const lifecycleService = instantiationService.createInstance(LifecycleService); - this.toUnbind.push(lifecycleService.onShutdown(reason => dispose(disposables))); - this.toUnbind.push(lifecycleService.onShutdown(reason => saveFontInfo(this.storageService))); + this.toUnbind.push(lifecycleService.onShutdown(reason => this.dispose(reason))); serviceCollection.set(ILifecycleService, lifecycleService); - disposables.push(lifecycleTelemetry(this.telemetryService, lifecycleService)); this.lifecycleService = lifecycleService; const extensionManagementChannel = getDelayedChannel(sharedProcess.then(c => c.getChannel('extensions'))); @@ -371,7 +355,7 @@ export class WorkbenchShell { const extensionEnablementService = instantiationService.createInstance(ExtensionEnablementService); serviceCollection.set(IExtensionEnablementService, extensionEnablementService); - disposables.push(extensionEnablementService); + this.toUnbind.push(extensionEnablementService); this.extensionService = instantiationService.createInstance(ExtensionService); serviceCollection.set(IExtensionService, this.extensionService); @@ -414,12 +398,6 @@ export class WorkbenchShell { return [instantiationService, serviceCollection]; } - private sendMachineIdToMain(storageService: IStorageService) { - getOrCreateMachineId(storageService).then(machineId => { - ipc.send(machineIdIpcChannel, machineId); - }).then(null, errors.onUnexpectedError); - } - public open(): void { // Listen on unexpected errors @@ -463,8 +441,8 @@ export class WorkbenchShell { this.previousErrorTime = now; this.previousErrorValue = errorMsg; - // Log to console - console.error(errorMsg); + // Log it + this.logService.error(errorMsg); // Show to user if friendly message provided if (error && error.friendlyMessage && this.messageService) { @@ -482,20 +460,18 @@ export class WorkbenchShell { this.workbench.layout(); } - public dispose(): void { + public dispose(reason = ShutdownReason.QUIT): void { - // Workbench - if (this.workbench) { - this.workbench.dispose(); - } - - this.contextViewService.dispose(); - - // Listeners + // Dispose bindings this.toUnbind = dispose(this.toUnbind); - // Container - $(this.container).empty(); + // Keep font info for next startup around + saveFontInfo(this.storageService); + + // Dispose Workbench + if (this.workbench) { + this.workbench.dispose(reason); + } } } diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 52f9f210d19..be4fdf87384 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -10,7 +10,7 @@ import 'vs/css!./media/workbench'; import { localize } from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import Event, { Emitter, chain } from 'vs/base/common/event'; +import Event, { Emitter } from 'vs/base/common/event'; import DOM = require('vs/base/browser/dom'); import { Builder, $ } from 'vs/base/browser/builder'; import { Delayer, RunOnceScheduler } from 'vs/base/common/async'; @@ -37,7 +37,7 @@ import { IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs/workbe import { PanelRegistry, Extensions as PanelExtensions } from 'vs/workbench/browser/panel'; import { QuickOpenController } from 'vs/workbench/browser/parts/quickopen/quickOpenController'; import { getServices } from 'vs/platform/instantiation/common/extensions'; -import { Position, Parts, IPartService, ILayoutOptions } from 'vs/workbench/services/part/common/partService'; +import { Position, Parts, IPartService, ILayoutOptions, Dimension } from 'vs/workbench/services/part/common/partService'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { ContextMenuService } from 'vs/workbench/services/contextview/electron-browser/contextmenuService'; @@ -55,7 +55,6 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { ViewletService } from 'vs/workbench/services/viewlet/browser/viewletService'; import { RemoteFileService } from 'vs/workbench/services/files/electron-browser/remoteFileService'; import { IFileService } from 'vs/platform/files/common/files'; -import { IListService, ListService } from 'vs/platform/list/browser/listService'; import { IConfigurationResolverService } from 'vs/workbench/services/configurationResolver/common/configurationResolver'; import { ConfigurationResolverService } from 'vs/workbench/services/configurationResolver/electron-browser/configurationResolverService'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; @@ -96,6 +95,9 @@ import { FileDecorationsService } from 'vs/workbench/services/decorations/browse import { IDecorationsService } from 'vs/workbench/services/decorations/browser/decorations'; import { ActivityService } from 'vs/workbench/services/activity/browser/activityService'; import URI from 'vs/base/common/uri'; +import { IListService, ListService } from 'vs/platform/list/browser/listService'; +import { domEvent } from 'vs/base/browser/event'; +import { InputFocusedContext } from 'vs/platform/workbench/common/contextkeys'; export const MessagesVisibleContext = new RawContextKey('globalMessageVisible', false); export const EditorsVisibleContext = new RawContextKey('editorIsOpen', false); @@ -135,6 +137,14 @@ const Identifiers = { STATUSBAR_PART: 'workbench.parts.statusbar' }; +function getWorkbenchStateString(state: WorkbenchState): string { + switch (state) { + case WorkbenchState.EMPTY: return 'empty'; + case WorkbenchState.FOLDER: return 'folder'; + case WorkbenchState.WORKSPACE: return 'workspace'; + } +} + /** * The workbench creates and lays out all parts that make up the workbench. */ @@ -180,8 +190,7 @@ export class Workbench implements IPartService { private statusbarPart: StatusbarPart; private quickOpen: QuickOpenController; private workbenchLayout: WorkbenchLayout; - private toDispose: IDisposable[]; - private toShutdown: { shutdown: () => void; }[]; + private toUnbind: IDisposable[]; private sideBarHidden: boolean; private statusBarHidden: boolean; private activityBarHidden: boolean; @@ -230,8 +239,7 @@ export class Workbench implements IPartService { (configuration.filesToOpen && configuration.filesToOpen.length > 0) || (configuration.filesToDiff && configuration.filesToDiff.length > 0); - this.toDispose = []; - this.toShutdown = []; + this.toUnbind = []; this.editorBackgroundDelayer = new Delayer(50); this.closeEmptyWindowScheduler = new RunOnceScheduler(() => this.onAllEditorsClosed(), 50); @@ -243,10 +251,8 @@ export class Workbench implements IPartService { return this._onTitleBarVisibilityChange.event; } - public get onEditorLayout(): Event { - return chain(this.editorPart.onLayout) - .map(() => void 0) - .event; + public get onEditorLayout(): Event { + return this.editorPart.onLayout; } /** @@ -271,6 +277,20 @@ export class Workbench implements IPartService { this.inZenMode = InZenModeContext.bindTo(this.contextKeyService); this.sideBarVisibleContext = SidebarVisibleContext.bindTo(this.contextKeyService); + const inputFocused = InputFocusedContext.bindTo(this.contextKeyService); + const onWindowsFocusIn = domEvent(window, 'focusin', true); + onWindowsFocusIn(() => inputFocused.set(document.activeElement && (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA')), null, this.toUnbind); + + // Set workbench state context + const WorkbenchStateContext = new RawContextKey('workbenchState', getWorkbenchStateString(this.configurationService.getWorkbenchState())); + const workbenchStateContext = WorkbenchStateContext.bindTo(this.contextKeyService); + + const WorkspaceFolderCountContext = new RawContextKey('workspaceFolderCount', this.configurationService.getWorkspace().folders.length); + const workspaceFolderCountContext = WorkspaceFolderCountContext.bindTo(this.contextKeyService); + + this.toUnbind.push(this.configurationService.onDidChangeWorkbenchState(() => workbenchStateContext.set(getWorkbenchStateString(this.configurationService.getWorkbenchState())))); + this.toUnbind.push(this.configurationService.onDidChangeWorkspaceFolders(() => workspaceFolderCountContext.set(this.configurationService.getWorkspace().folders.length))); + // Register Listeners this.registerListeners(); @@ -489,8 +509,6 @@ export class Workbench implements IPartService { private initServices(): void { const { serviceCollection } = this.workbenchParams; - this.toDispose.push(this.lifecycleService.onShutdown(this.shutdownComponents, this)); - // Services we contribute serviceCollection.set(IPartService, this); @@ -499,8 +517,7 @@ export class Workbench implements IPartService { // Status bar this.statusbarPart = this.instantiationService.createInstance(StatusbarPart, Identifiers.STATUSBAR_PART); - this.toDispose.push(this.statusbarPart); - this.toShutdown.push(this.statusbarPart); + this.toUnbind.push({ dispose: () => this.statusbarPart.shutdown() }); serviceCollection.set(IStatusbarService, this.statusbarPart); // Progress 2 @@ -524,8 +541,7 @@ export class Workbench implements IPartService { // Sidebar part this.sidebarPart = this.instantiationService.createInstance(SidebarPart, Identifiers.SIDEBAR_PART); - this.toDispose.push(this.sidebarPart); - this.toShutdown.push(this.sidebarPart); + this.toUnbind.push({ dispose: () => this.sidebarPart.shutdown() }); // Viewlet service this.viewletService = this.instantiationService.createInstance(ViewletService, this.sidebarPart); @@ -533,34 +549,30 @@ export class Workbench implements IPartService { // Panel service (panel part) this.panelPart = this.instantiationService.createInstance(PanelPart, Identifiers.PANEL_PART); - this.toDispose.push(this.panelPart); - this.toShutdown.push(this.panelPart); + this.toUnbind.push({ dispose: () => this.panelPart.shutdown() }); serviceCollection.set(IPanelService, this.panelPart); // Activity service (activitybar part) this.activitybarPart = this.instantiationService.createInstance(ActivitybarPart, Identifiers.ACTIVITYBAR_PART); - this.toDispose.push(this.activitybarPart); - this.toShutdown.push(this.activitybarPart); + this.toUnbind.push({ dispose: () => this.activitybarPart.shutdown() }); const activityService = this.instantiationService.createInstance(ActivityService, this.activitybarPart, this.panelPart); serviceCollection.set(IActivityService, activityService); // File Service this.fileService = this.instantiationService.createInstance(RemoteFileService); serviceCollection.set(IFileService, this.fileService); - this.toDispose.push(this.fileService.onFileChanges(e => this.configurationService.handleWorkspaceFileEvents(e))); + this.toUnbind.push(this.fileService.onFileChanges(e => this.configurationService.handleWorkspaceFileEvents(e))); // Editor service (editor part) this.editorPart = this.instantiationService.createInstance(EditorPart, Identifiers.EDITOR_PART, !this.hasFilesToCreateOpenOrDiff); - this.toDispose.push(this.editorPart); - this.toShutdown.push(this.editorPart); + this.toUnbind.push({ dispose: () => this.editorPart.shutdown() }); this.editorService = this.instantiationService.createInstance(WorkbenchEditorService, this.editorPart); serviceCollection.set(IWorkbenchEditorService, this.editorService); serviceCollection.set(IEditorGroupService, this.editorPart); // Title bar this.titlebarPart = this.instantiationService.createInstance(TitlebarPart, Identifiers.TITLEBAR_PART); - this.toDispose.push(this.titlebarPart); - this.toShutdown.push(this.titlebarPart); + this.toUnbind.push({ dispose: () => this.titlebarPart.shutdown() }); serviceCollection.set(ITitleService, this.titlebarPart); // History @@ -597,8 +609,7 @@ export class Workbench implements IPartService { // Quick open service (quick open controller) this.quickOpen = this.instantiationService.createInstance(QuickOpenController); - this.toDispose.push(this.quickOpen); - this.toShutdown.push(this.quickOpen); + this.toUnbind.push({ dispose: () => this.quickOpen.shutdown() }); serviceCollection.set(IQuickOpenService, this.quickOpen); // Contributed services @@ -940,26 +951,7 @@ export class Workbench implements IPartService { document.body.style['-webkit-font-smoothing'] = (aliasing === 'default' ? '' : aliasing); } - public dispose(): void { - if (this.isStarted()) { - this.shutdownComponents(); - this.workbenchShutdown = true; - } - - this.toDispose = dispose(this.toDispose); - } - - /** - * Asks the workbench and all its UI components inside to lay out according to - * the containers dimension the workbench is living in. - */ - public layout(options?: ILayoutOptions): void { - if (this.isStarted()) { - this.workbenchLayout.layout(options); - } - } - - private shutdownComponents(reason = ShutdownReason.QUIT): void { + public dispose(reason = ShutdownReason.QUIT): void { // Restore sidebar if we are being shutdown as a matter of a reload if (reason === ShutdownReason.RELOAD) { @@ -975,14 +967,27 @@ export class Workbench implements IPartService { this.storageService.remove(Workbench.zenModeActiveStorageKey, StorageScope.WORKSPACE); } + // Dispose bindings + this.toUnbind = dispose(this.toUnbind); + // Pass shutdown on to each participant - this.toShutdown.forEach(s => s.shutdown()); + this.workbenchShutdown = true; + } + + /** + * Asks the workbench and all its UI components inside to lay out according to + * the containers dimension the workbench is living in. + */ + public layout(options?: ILayoutOptions): void { + if (this.isStarted()) { + this.workbenchLayout.layout(options); + } } private registerListeners(): void { // Listen to editor changes - this.toDispose.push(this.editorPart.onEditorsChanged(() => this.onEditorsChanged())); + this.toUnbind.push(this.editorPart.onEditorsChanged(() => this.onEditorsChanged())); // Listen to editor closing (if we run with --wait) const filesToWait = this.workbenchParams.configuration.filesToWait; @@ -991,21 +996,21 @@ export class Workbench implements IPartService { const waitMarkerFile = URI.file(filesToWait.waitMarkerFilePath); const listenerDispose = this.editorPart.getStacksModel().onEditorClosed(() => this.onEditorClosed(listenerDispose, resourcesToWaitFor, waitMarkerFile)); - this.toDispose.push(listenerDispose); + this.toUnbind.push(listenerDispose); } // Handle message service and quick open events - this.toDispose.push((this.messageService).onMessagesShowing(() => this.messagesVisibleContext.set(true))); - this.toDispose.push((this.messageService).onMessagesCleared(() => this.messagesVisibleContext.reset())); + this.toUnbind.push((this.messageService).onMessagesShowing(() => this.messagesVisibleContext.set(true))); + this.toUnbind.push((this.messageService).onMessagesCleared(() => this.messagesVisibleContext.reset())); - this.toDispose.push(this.quickOpen.onShow(() => (this.messageService).suspend())); // when quick open is open, don't show messages behind - this.toDispose.push(this.quickOpen.onHide(() => (this.messageService).resume())); // resume messages once quick open is closed again + this.toUnbind.push(this.quickOpen.onShow(() => (this.messageService).suspend())); // when quick open is open, don't show messages behind + this.toUnbind.push(this.quickOpen.onHide(() => (this.messageService).resume())); // resume messages once quick open is closed again // Configuration changes - this.toDispose.push(this.configurationService.onDidChangeConfiguration(() => this.onDidUpdateConfiguration())); + this.toUnbind.push(this.configurationService.onDidChangeConfiguration(() => this.onDidUpdateConfiguration())); // Fullscreen changes - this.toDispose.push(browser.onDidChangeFullscreen(() => this.onFullscreenChanged())); + this.toUnbind.push(browser.onDidChangeFullscreen(() => this.onFullscreenChanged())); } private onFullscreenChanged(): void { @@ -1121,8 +1126,6 @@ export class Workbench implements IPartService { }, this.quickOpen // Quickopen ); - - this.toDispose.push(this.workbenchLayout); } private renderWorkbench(): void { diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index 6bd6c20bcc2..952ef7e4f96 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -21,9 +21,14 @@ import { IInitData, IEnvironment, IWorkspaceData, MainContext } from 'vs/workben import * as errors from 'vs/base/common/errors'; import * as watchdog from 'native-watchdog'; import * as glob from 'vs/base/common/glob'; +import { ExtensionActivatedByEvent } from 'vs/workbench/api/node/extHostExtensionActivator'; +import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; +import { createLogService } from 'vs/platform/log/node/spdlogService'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { ILogService } from 'vs/platform/log/common/log'; // const nativeExit = process.exit.bind(process); -function patchExit(allowExit: boolean) { +function patchProcess(allowExit: boolean) { process.exit = function (code) { if (allowExit) { exit(code); @@ -32,6 +37,11 @@ function patchExit(allowExit: boolean) { console.warn(err.stack); } }; + + process.crash = function () { + const err = new Error('An extension called process.crash() and this was prevented.'); + console.warn(err.stack); + }; } export function exit(code?: number) { //nativeExit(code); @@ -67,19 +77,28 @@ export class ExtensionHostMain { private _environment: IEnvironment; private _extensionService: ExtHostExtensionService; private _extHostConfiguration: ExtHostConfiguration; + private _logService: ILogService; + private disposables: IDisposable[] = []; constructor(rpcProtocol: RPCProtocol, initData: IInitData) { this._environment = initData.environment; this._workspace = initData.workspace; const allowExit = !!this._environment.extensionTestsPath; // to support other test frameworks like Jasmin that use process.exit (https://github.com/Microsoft/vscode/issues/37708) - patchExit(allowExit); + patchProcess(allowExit); // services const threadService = new ExtHostThreadService(rpcProtocol); const extHostWorkspace = new ExtHostWorkspace(threadService, initData.workspace); + const environmentService = new EnvironmentService(initData.args, initData.execPath); + this._logService = createLogService(`exthost${initData.windowId}`, environmentService); + this.disposables.push(this._logService); + + this._logService.info('extension host started'); + this._logService.trace('initData', initData); + this._extHostConfiguration = new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), extHostWorkspace, initData.configuration); - this._extensionService = new ExtHostExtensionService(initData, threadService, extHostWorkspace, this._extHostConfiguration); + this._extensionService = new ExtHostExtensionService(initData, threadService, extHostWorkspace, this._extHostConfiguration, this._logService); // error forwarding and stack trace scanning const extensionErrors = new WeakMap(); @@ -100,11 +119,16 @@ export class ExtensionHostMain { return `${error.name || 'Error'}: ${error.message || ''}${stackTraceMessage}`; }; }); + const mainThreadExtensions = threadService.get(MainContext.MainThreadExtensionService); const mainThreadErrors = threadService.get(MainContext.MainThreadErrors); errors.setUnexpectedErrorHandler(err => { const data = errors.transformErrorForSerialization(err); const extension = extensionErrors.get(err); - mainThreadErrors.$onUnexpectedError(data, extension && extension.id); + if (extension) { + mainThreadExtensions.$onExtensionRuntimeError(extension.id, data); + } else { + mainThreadErrors.$onUnexpectedError(data); + } }); // Configure the watchdog to kill our process if the JS event loop is unresponsive for more than 10s @@ -116,7 +140,10 @@ export class ExtensionHostMain { public start(): TPromise { return this._extensionService.onExtensionAPIReady() .then(() => this.handleEagerExtensions()) - .then(() => this.handleExtensionTests()); + .then(() => this.handleExtensionTests()) + .then(() => { + this._logService.info(`eager extensions activated`); + }); } public terminate(): void { @@ -126,6 +153,8 @@ export class ExtensionHostMain { } this._isTerminating = true; + this.disposables = dispose(this.disposables); + errors.setUnexpectedErrorHandler((err) => { // TODO: write to log once we have one }); @@ -208,7 +237,7 @@ export class ExtensionHostMain { if (await pfs.exists(join(uri.fsPath, fileName))) { // the file was found return ( - this._extensionService.activateById(extensionId, true) + this._extensionService.activateById(extensionId, new ExtensionActivatedByEvent(true, `workspaceContains:${fileName}`)) .done(null, err => console.error(err)) ); } @@ -250,7 +279,7 @@ export class ExtensionHostMain { if (result.limitHit) { // a file was found matching one of the glob patterns return ( - this._extensionService.activateById(extensionId, true) + this._extensionService.activateById(extensionId, new ExtensionActivatedByEvent(true, `workspaceContains:${globPatterns.join(',')}`)) .done(null, err => console.error(err)) ); } diff --git a/src/vs/workbench/node/extensionHostProcess.ts b/src/vs/workbench/node/extensionHostProcess.ts index 0e68ea4e1a7..d44ebcc379c 100644 --- a/src/vs/workbench/node/extensionHostProcess.ts +++ b/src/vs/workbench/node/extensionHostProcess.ts @@ -120,6 +120,8 @@ function connectToRenderer(protocol: IMessagePassingProtocol): TPromise { // connect to main side return connectToRenderer(protocol); @@ -129,3 +131,18 @@ createExtHostProtocol().then(protocol => { onTerminate = () => extensionHostMain.terminate(); return extensionHostMain.start(); }).done(null, err => console.error(err)); + + + +function patchExecArgv() { + // when encountering the prevent-inspect flag we delete this + // and the prior flag + if (process.env.VSCODE_PREVENT_FOREIGN_INSPECT) { + for (let i = 0; i < process.execArgv.length; i++) { + if (process.execArgv[i].match(/--inspect-brk=\d+|--inspect=\d+/)) { + process.execArgv.splice(i, 1); + break; + } + } + } +} diff --git a/src/vs/workbench/parts/backup/common/backupRestorer.ts b/src/vs/workbench/parts/backup/common/backupRestorer.ts index d1b4010f586..6e1d90e3e7e 100644 --- a/src/vs/workbench/parts/backup/common/backupRestorer.ts +++ b/src/vs/workbench/parts/backup/common/backupRestorer.ts @@ -93,8 +93,6 @@ export class BackupRestorer implements IWorkbenchContribution { const options = { pinned: true, preserveFocus: true, inactive: index > 0 || hasOpenedEditors }; if (resource.scheme === UNTITLED_SCHEMA && !BackupRestorer.UNTITLED_REGEX.test(resource.fsPath)) { - // TODO@Ben debt: instead of guessing if an untitled file has an associated file path or not - // this information should be provided by the backup service and stored as meta data within return { filePath: resource.fsPath, options }; } diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.ts b/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.ts index 4b7695b68b9..b28acd01d56 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.ts @@ -344,6 +344,7 @@ export class LanguageConfigurationFileHandler { const schemaId = 'vscode://schemas/language-configuration'; const schema: IJSONSchema = { + allowComments: true, default: { comments: { blockComment: ['/*', '*/'], diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/selectionClipboard.ts b/src/vs/workbench/parts/codeEditor/electron-browser/selectionClipboard.ts index f3187ce413d..6e4df83796c 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/selectionClipboard.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/selectionClipboard.ts @@ -7,7 +7,7 @@ import { clipboard } from 'electron'; import * as platform from 'vs/base/common/platform'; -import { ICodeEditor, IEditorMouseEvent } from 'vs/editor/browser/editorBrowser'; +import { ICodeEditor, IEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { Disposable } from 'vs/base/common/lifecycle'; import { EndOfLinePreference, IEditorContribution } from 'vs/editor/common/editorCommon'; import { registerEditorContribution } from 'vs/editor/browser/editorExtensions'; @@ -48,6 +48,10 @@ export class SelectionClipboard extends Disposable implements IEditorContributio editor.setPosition(e.target.position); } + if (e.target.type === MouseTargetType.SCROLLBAR) { + return; + } + process.nextTick(() => { // TODO@Alex: electron weirdness: calling clipboard.readText('selection') generates a paste event, so no need to execute paste ourselves clipboard.readText('selection'); diff --git a/src/vs/workbench/parts/debug/browser/debugActions.ts b/src/vs/workbench/parts/debug/browser/debugActions.ts index 11a1a6e75d1..0e71397c23c 100644 --- a/src/vs/workbench/parts/debug/browser/debugActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugActions.ts @@ -531,12 +531,18 @@ export class AddFunctionBreakpointAction extends AbstractDebugAction { constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { super(id, label, 'debug-action add-function-breakpoint', debugService, keybindingService); + this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(() => this.updateEnablement())); } public run(): TPromise { this.debugService.addFunctionBreakpoint(); return TPromise.as(null); } + + protected isEnabled(state: State): boolean { + return !this.debugService.getViewModel().getSelectedFunctionBreakpoint() + && this.debugService.getModel().getFunctionBreakpoints().every(fbp => !!fbp.name); + } } export class AddConditionalBreakpointAction extends AbstractDebugAction { diff --git a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts index 0185c16a1eb..10db5a16c85 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts @@ -19,7 +19,6 @@ import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IDebugConfiguration, IDebugService, State } from 'vs/workbench/parts/debug/common/debug'; import { AbstractDebugAction, PauseAction, ContinueAction, StepBackAction, ReverseContinueAction, StopAction, DisconnectAction, StepOverAction, StepIntoAction, StepOutAction, RestartAction, FocusProcessAction } from 'vs/workbench/parts/debug/browser/debugActions'; import { FocusProcessActionItem } from 'vs/workbench/parts/debug/browser/debugActionItems'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IMessageService } from 'vs/platform/message/common/message'; @@ -28,6 +27,8 @@ import { Themable } from 'vs/workbench/common/theme'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { registerColor, contrastBorder, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; import { localize } from 'vs/nls'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; const $ = builder.$; const DEBUG_ACTIONS_WIDGET_POSITION_KEY = 'debug.actionswidgetposition'; @@ -53,11 +54,12 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi @IMessageService private messageService: IMessageService, @ITelemetryService private telemetryService: ITelemetryService, @IDebugService private debugService: IDebugService, - @IInstantiationService private instantiationService: IInstantiationService, @IPartService private partService: IPartService, @IStorageService private storageService: IStorageService, @IConfigurationService private configurationService: IConfigurationService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IKeybindingService private keybindingService: IKeybindingService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService ) { super(themeService); @@ -73,7 +75,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi orientation: ActionsOrientation.HORIZONTAL, actionItemProvider: (action: IAction) => { if (action.id === FocusProcessAction.ID) { - return this.instantiationService.createInstance(FocusProcessActionItem, action); + return new FocusProcessActionItem(action, this.debugService, this.themeService); } return null; @@ -145,12 +147,6 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi private storePosition(): void { const position = parseFloat(this.$el.getComputedStyle().left) / window.innerWidth; this.storageService.store(DEBUG_ACTIONS_WIDGET_POSITION_KEY, position, StorageScope.WORKSPACE); - /* __GDPR__ - "debug.actionswidgetposition" : { - "position" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog(DEBUG_ACTIONS_WIDGET_POSITION_KEY, { position }); } protected updateStyles(): void { @@ -231,17 +227,17 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi private getActions(): AbstractDebugAction[] { if (!this.allActions) { this.allActions = []; - this.allActions.push(this.instantiationService.createInstance(ContinueAction, ContinueAction.ID, ContinueAction.LABEL)); - this.allActions.push(this.instantiationService.createInstance(PauseAction, PauseAction.ID, PauseAction.LABEL)); - this.allActions.push(this.instantiationService.createInstance(StopAction, StopAction.ID, StopAction.LABEL)); - this.allActions.push(this.instantiationService.createInstance(DisconnectAction, DisconnectAction.ID, DisconnectAction.LABEL)); - this.allActions.push(this.instantiationService.createInstance(StepOverAction, StepOverAction.ID, StepOverAction.LABEL)); - this.allActions.push(this.instantiationService.createInstance(StepIntoAction, StepIntoAction.ID, StepIntoAction.LABEL)); - this.allActions.push(this.instantiationService.createInstance(StepOutAction, StepOutAction.ID, StepOutAction.LABEL)); - this.allActions.push(this.instantiationService.createInstance(RestartAction, RestartAction.ID, RestartAction.LABEL)); - this.allActions.push(this.instantiationService.createInstance(StepBackAction, StepBackAction.ID, StepBackAction.LABEL)); - this.allActions.push(this.instantiationService.createInstance(ReverseContinueAction, ReverseContinueAction.ID, ReverseContinueAction.LABEL)); - this.allActions.push(this.instantiationService.createInstance(FocusProcessAction, FocusProcessAction.ID, FocusProcessAction.LABEL)); + this.allActions.push(new ContinueAction(ContinueAction.ID, ContinueAction.LABEL, this.debugService, this.keybindingService)); + this.allActions.push(new PauseAction(PauseAction.ID, PauseAction.LABEL, this.debugService, this.keybindingService)); + this.allActions.push(new StopAction(StopAction.ID, StopAction.LABEL, this.debugService, this.keybindingService)); + this.allActions.push(new DisconnectAction(DisconnectAction.ID, DisconnectAction.LABEL, this.debugService, this.keybindingService)); + this.allActions.push(new StepOverAction(StepOverAction.ID, StepOverAction.LABEL, this.debugService, this.keybindingService)); + this.allActions.push(new StepIntoAction(StepIntoAction.ID, StepIntoAction.LABEL, this.debugService, this.keybindingService)); + this.allActions.push(new StepOutAction(StepOutAction.ID, StepOutAction.LABEL, this.debugService, this.keybindingService)); + this.allActions.push(new RestartAction(RestartAction.ID, RestartAction.LABEL, this.debugService, this.keybindingService)); + this.allActions.push(new StepBackAction(StepBackAction.ID, StepBackAction.LABEL, this.debugService, this.keybindingService)); + this.allActions.push(new ReverseContinueAction(ReverseContinueAction.ID, ReverseContinueAction.LABEL, this.debugService, this.keybindingService)); + this.allActions.push(new FocusProcessAction(FocusProcessAction.ID, FocusProcessAction.LABEL, this.debugService, this.keybindingService, this.editorService)); this.allActions.forEach(a => { this.toUnbind.push(a); }); diff --git a/src/vs/workbench/parts/debug/browser/debugViewlet.ts b/src/vs/workbench/parts/debug/browser/debugViewlet.ts index 719caa8aa4d..6107937695a 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewlet.ts @@ -25,7 +25,6 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { ViewLocation } from 'vs/workbench/browser/parts/views/viewsRegistry'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { Constants } from 'vs/editor/common/core/uint'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; export class DebugViewlet extends PersistentViewsViewlet { @@ -60,7 +59,6 @@ export class DebugViewlet extends PersistentViewsViewlet { const el = parent.getHTMLElement(); DOM.addClass(el, 'debug-viewlet'); - this.updateBreakpointsMaxSize(); } public focus(): void { @@ -117,6 +115,7 @@ export class DebugViewlet extends PersistentViewsViewlet { // attach event listener to if (panel.id === BREAKPOINTS_VIEW_ID) { this.breakpointView = panel; + this.updateBreakpointsMaxSize(); } else { this.panelListeners.set(panel.id, panel.onDidChange(() => this.updateBreakpointsMaxSize())); } @@ -129,8 +128,11 @@ export class DebugViewlet extends PersistentViewsViewlet { } private updateBreakpointsMaxSize(): void { - const allOtherCollapsed = this.views.every(view => !view.isExpanded() || view === this.breakpointView); - this.breakpointView.maximumBodySize = allOtherCollapsed ? Constants.MAX_SAFE_SMALL_INTEGER : this.breakpointView.minimumBodySize; + if (this.breakpointView) { + // We need to update the breakpoints view since all other views are collapsed #25384 + const allOtherCollapsed = this.views.every(view => !view.isExpanded() || view === this.breakpointView); + this.breakpointView.maximumBodySize = allOtherCollapsed ? Number.POSITIVE_INFINITY : this.breakpointView.minimumBodySize; + } } } diff --git a/src/vs/workbench/parts/debug/browser/media/debug.contribution.css b/src/vs/workbench/parts/debug/browser/media/debug.contribution.css index c0f23e9662f..a6318e82a30 100644 --- a/src/vs/workbench/parts/debug/browser/media/debug.contribution.css +++ b/src/vs/workbench/parts/debug/browser/media/debug.contribution.css @@ -146,6 +146,10 @@ color: #9B46B0; } +.monaco-workbench .monaco-tree-row:not(.selected) .expression .name.virtual { + opacity: 0.5; +} + .monaco-workbench > .monaco-tree-row:not(.selected) .expression .value { color: rgba(108, 108, 108, 0.8); } diff --git a/src/vs/workbench/parts/debug/browser/media/debugViewlet.css b/src/vs/workbench/parts/debug/browser/media/debugViewlet.css index 208bf5a0716..355de7ae222 100644 --- a/src/vs/workbench/parts/debug/browser/media/debugViewlet.css +++ b/src/vs/workbench/parts/debug/browser/media/debugViewlet.css @@ -110,6 +110,7 @@ } .debug-viewlet .monaco-tree .monaco-tree-row.selected .line-number, +.debug-viewlet .monaco-list .monaco-list-row.selected .line-number, .debug-viewlet .monaco-tree .monaco-tree-row.selected .thread > .state > .label, .debug-viewlet .monaco-tree .monaco-tree-row.selected .process > .state > .label { background-color: #ffffff; @@ -347,6 +348,10 @@ /* Breakpoints */ +.debug-viewlet .debug-breakpoints .monaco-list-row { + padding-left: 20px; +} + .debug-viewlet .debug-breakpoints .breakpoint { display: flex; padding-right: 0.8em; @@ -367,7 +372,6 @@ overflow: hidden; } - .debug-viewlet .debug-action.remove { background: url('remove.svg') center center no-repeat; } diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index 9e08b4ff90b..912b7131c86 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -36,9 +36,9 @@ export const CONTEXT_NOT_IN_DEBUG_REPL: ContextKeyExpr = CONTEXT_IN_DEBUG_REPL.t export const CONTEXT_ON_FIRST_DEBUG_REPL_LINE = new RawContextKey('onFirsteDebugReplLine', false); export const CONTEXT_ON_LAST_DEBUG_REPL_LINE = new RawContextKey('onLastDebugReplLine', false); export const CONTEXT_BREAKPOINT_WIDGET_VISIBLE = new RawContextKey('breakpointWidgetVisible', false); -export const CONTEXT_BREAKPOINTS_FOCUSED = new RawContextKey('breakpointsFocused', false); -export const CONTEXT_WATCH_EXPRESSIONS_FOCUSED = new RawContextKey('watchExpressionsFocused', false); -export const CONTEXT_VARIABLES_FOCUSED = new RawContextKey('variablesFocused', false); +export const CONTEXT_BREAKPOINTS_FOCUSED = new RawContextKey('breakpointsFocused', true); +export const CONTEXT_WATCH_EXPRESSIONS_FOCUSED = new RawContextKey('watchExpressionsFocused', true); +export const CONTEXT_VARIABLES_FOCUSED = new RawContextKey('variablesFocused', true); export const EDITOR_CONTRIBUTION_ID = 'editor.contrib.debug'; export const DEBUG_SCHEME = 'debug'; @@ -288,7 +288,6 @@ export interface IViewModel extends ITreeElement { onDidFocusProcess: Event; onDidFocusStackFrame: Event<{ stackFrame: IStackFrame, explicit: boolean }>; onDidSelectExpression: Event; - onDidSelectFunctionBreakpoint: Event; } export interface IModel extends ITreeElement { @@ -300,12 +299,21 @@ export interface IModel extends ITreeElement { getWatchExpressions(): IExpression[]; getReplElements(): IReplElement[]; - onDidChangeBreakpoints: Event; + onDidChangeBreakpoints: Event; onDidChangeCallStack: Event; onDidChangeWatchExpressions: Event; onDidChangeReplElements: Event; } +/** + * An event describing a change to the set of [breakpoints](#debug.Breakpoint). + */ +export interface IBreakpointsChangeEvent { + added?: (IBreakpoint | IFunctionBreakpoint)[]; + removed?: (IBreakpoint | IFunctionBreakpoint)[]; + changed?: (IBreakpoint | IFunctionBreakpoint)[]; +} + // Debug enums export enum State { diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 8ca94fe2f2d..620a46ecbc7 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -20,7 +20,7 @@ import { ISuggestion } from 'vs/editor/common/modes'; import { Position } from 'vs/editor/common/core/position'; import { ITreeElement, IExpression, IExpressionContainer, IProcess, IStackFrame, IExceptionBreakpoint, IBreakpoint, IFunctionBreakpoint, IModel, IReplElementSource, - IConfig, ISession, IThread, IRawModelUpdate, IScope, IRawStoppedDetails, IEnablement, IRawBreakpoint, IExceptionInfo, IReplElement, ProcessState + IConfig, ISession, IThread, IRawModelUpdate, IScope, IRawStoppedDetails, IEnablement, IRawBreakpoint, IExceptionInfo, IReplElement, ProcessState, IBreakpointsChangeEvent } from 'vs/workbench/parts/debug/common/debug'; import { Source } from 'vs/workbench/parts/debug/common/debugSource'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -159,7 +159,7 @@ export class ExpressionContainer implements IExpressionContainer { for (let i = 0; i < numberOfChunks; i++) { const start = this.startOfVariables + i * chunkSize; const count = Math.min(chunkSize, this.indexedVariables - i * chunkSize); - childrenArray.push(new Variable(this.process, this, this.reference, `[${start}..${start + count - 1}]`, '', '', null, count, null, true, start)); + childrenArray.push(new Variable(this.process, this, this.reference, `[${start}..${start + count - 1}]`, '', '', null, count, { kind: 'virtual' }, null, true, start)); } return childrenArray; @@ -191,9 +191,9 @@ export class ExpressionContainer implements IExpressionContainer { filter }).then(response => { return response && response.body && response.body.variables ? distinct(response.body.variables.filter(v => !!v && v.name), v => v.name).map( - v => new Variable(this.process, this, v.variablesReference, v.name, v.evaluateName, v.value, v.namedVariables, v.indexedVariables, v.type) + v => new Variable(this.process, this, v.variablesReference, v.name, v.evaluateName, v.value, v.namedVariables, v.indexedVariables, v.presentationHint, v.type) ) : []; - }, (e: Error) => [new Variable(this.process, this, 0, null, e.message, '', 0, 0, null, false)]) : TPromise.as([]); + }, (e: Error) => [new Variable(this.process, this, 0, null, e.message, '', 0, 0, { kind: 'virtual' }, null, false)]) : TPromise.as([]); } // The adapter explicitly sents the children count of an expression only if there are lots of children which should be chunked. @@ -278,6 +278,7 @@ export class Variable extends ExpressionContainer implements IExpression { value: string, namedVariables: number, indexedVariables: number, + public presentationHint: DebugProtocol.VariablePresentationHint, public type: string = null, public available = true, startOfVariables = 0 @@ -739,7 +740,7 @@ export class Model implements IModel { private toDispose: lifecycle.IDisposable[]; private replElements: IReplElement[]; private schedulers = new Map(); - private _onDidChangeBreakpoints: Emitter; + private _onDidChangeBreakpoints: Emitter; private _onDidChangeCallStack: Emitter; private _onDidChangeWatchExpressions: Emitter; private _onDidChangeREPLElements: Emitter; @@ -754,7 +755,7 @@ export class Model implements IModel { this.processes = []; this.replElements = []; this.toDispose = []; - this._onDidChangeBreakpoints = new Emitter(); + this._onDidChangeBreakpoints = new Emitter(); this._onDidChangeCallStack = new Emitter(); this._onDidChangeWatchExpressions = new Emitter(); this._onDidChangeREPLElements = new Emitter(); @@ -780,7 +781,7 @@ export class Model implements IModel { this._onDidChangeCallStack.fire(); } - public get onDidChangeBreakpoints(): Event { + public get onDidChangeBreakpoints(): Event { return this._onDidChangeBreakpoints.event; } @@ -851,6 +852,7 @@ export class Model implements IModel { const ebp = this.exceptionBreakpoints.filter(ebp => ebp.filter === d.filter).pop(); return new ExceptionBreakpoint(d.filter, d.label, ebp ? ebp.enabled : d.default); }); + this._onDidChangeBreakpoints.fire(); } } @@ -867,9 +869,10 @@ export class Model implements IModel { const newBreakpoints = rawData.map(rawBp => new Breakpoint(uri, rawBp.lineNumber, rawBp.column, rawBp.enabled, rawBp.condition, rawBp.hitCondition, undefined)); this.breakpoints = this.breakpoints.concat(newBreakpoints); this.breakpointsActivated = true; - this.breakpoints = distinct(this.breakpoints, bp => `${bp.uri.toString()}:${bp.lineNumber}:${bp.column}`); + this.sortAndDeDup(); + if (fireEvent) { - this._onDidChangeBreakpoints.fire(); + this._onDidChangeBreakpoints.fire({ added: newBreakpoints }); } return newBreakpoints; @@ -877,10 +880,11 @@ export class Model implements IModel { public removeBreakpoints(toRemove: IBreakpoint[]): void { this.breakpoints = this.breakpoints.filter(bp => !toRemove.some(toRemove => toRemove.getId() === bp.getId())); - this._onDidChangeBreakpoints.fire(); + this._onDidChangeBreakpoints.fire({ removed: toRemove }); } public updateBreakpoints(data: { [id: string]: DebugProtocol.Breakpoint }): void { + const updated: IBreakpoint[] = []; this.breakpoints.forEach(bp => { const bpData = data[bp.getId()]; if (bpData) { @@ -888,45 +892,82 @@ export class Model implements IModel { bp.endLineNumber = bpData.endLine; bp.column = bpData.column; bp.endColumn = bpData.endColumn; - bp.verified = bpData.verified; + bp.verified = bp.verified || bpData.verified; bp.idFromAdapter = bpData.id; bp.message = bpData.message; bp.adapterData = bpData.source ? bpData.source.adapterData : bp.adapterData; + updated.push(bp); } }); - this.breakpoints = distinct(this.breakpoints, bp => `${bp.uri.toString()}:${bp.lineNumber}:${bp.column}`); + this.sortAndDeDup(); + this._onDidChangeBreakpoints.fire({ changed: updated }); + } - this._onDidChangeBreakpoints.fire(); + private sortAndDeDup(): void { + this.breakpoints = this.breakpoints.sort((first, second) => { + if (first.uri.toString() !== second.uri.toString()) { + return resources.basenameOrAuthority(first.uri).localeCompare(resources.basenameOrAuthority(second.uri)); + } + if (first.lineNumber === second.lineNumber) { + return first.column - second.column; + } + + return first.lineNumber - second.lineNumber; + }); + this.breakpoints = distinct(this.breakpoints, bp => `${bp.uri.toString()}:${bp.lineNumber}:${bp.column}`); } public setEnablement(element: IEnablement, enable: boolean): void { + + const changed: (IBreakpoint | IFunctionBreakpoint)[] = []; + if (element.enabled !== enable && (element instanceof Breakpoint || element instanceof FunctionBreakpoint)) { + changed.push(element); + } + element.enabled = enable; if (element instanceof Breakpoint && !element.enabled) { const breakpoint = element; breakpoint.verified = false; } - this._onDidChangeBreakpoints.fire(); + this._onDidChangeBreakpoints.fire({ changed: changed }); } public enableOrDisableAllBreakpoints(enable: boolean): void { + + const changed: (IBreakpoint | IFunctionBreakpoint)[] = []; + this.breakpoints.forEach(bp => { + if (bp.enabled !== enable) { + changed.push(bp); + } bp.enabled = enable; if (!enable) { bp.verified = false; } }); - this.functionBreakpoints.forEach(fbp => fbp.enabled = enable); + this.functionBreakpoints.forEach(fbp => { + if (fbp.enabled !== enable) { + changed.push(fbp); + } + fbp.enabled = enable; + }); - this._onDidChangeBreakpoints.fire(); + this._onDidChangeBreakpoints.fire({ changed: changed }); } - public addFunctionBreakpoint(functionName: string): void { - this.functionBreakpoints.push(new FunctionBreakpoint(functionName, true, null)); - this._onDidChangeBreakpoints.fire(); + public addFunctionBreakpoint(functionName: string): FunctionBreakpoint { + const newFunctionBreakpoint = new FunctionBreakpoint(functionName, true, null); + this.functionBreakpoints.push(newFunctionBreakpoint); + this._onDidChangeBreakpoints.fire({ added: [newFunctionBreakpoint] }); + + return newFunctionBreakpoint; } public updateFunctionBreakpoints(data: { [id: string]: { name?: string, verified?: boolean; id?: number; hitCondition?: string } }): void { + + const changed: IFunctionBreakpoint[] = []; + this.functionBreakpoints.forEach(fbp => { const fbpData = data[fbp.getId()]; if (fbpData) { @@ -934,15 +975,25 @@ export class Model implements IModel { fbp.verified = fbpData.verified; fbp.idFromAdapter = fbpData.id; fbp.hitCondition = fbpData.hitCondition; + + changed.push(fbp); } }); - this._onDidChangeBreakpoints.fire(); + this._onDidChangeBreakpoints.fire({ changed: changed }); } public removeFunctionBreakpoints(id?: string): void { - this.functionBreakpoints = id ? this.functionBreakpoints.filter(fbp => fbp.getId() !== id) : []; - this._onDidChangeBreakpoints.fire(); + + let removed: IFunctionBreakpoint[]; + if (id) { + removed = this.functionBreakpoints.filter(fbp => fbp.getId() === id); + this.functionBreakpoints = this.functionBreakpoints.filter(fbp => fbp.getId() !== id); + } else { + removed = this.functionBreakpoints; + this.functionBreakpoints = []; + } + this._onDidChangeBreakpoints.fire({ removed: removed }); } public getReplElements(): IReplElement[] { diff --git a/src/vs/workbench/parts/debug/common/debugProtocol.d.ts b/src/vs/workbench/parts/debug/common/debugProtocol.d.ts index 449a78f8614..3713e38afd6 100644 --- a/src/vs/workbench/parts/debug/common/debugProtocol.d.ts +++ b/src/vs/workbench/parts/debug/common/debugProtocol.d.ts @@ -251,8 +251,8 @@ declare module DebugProtocol { cwd: string; /** List of arguments. The first argument is the command to run. */ args: string[]; - /** Environment key-value pairs that are added to the default environment. */ - env?: { [key: string]: string; }; + /** Environment key-value pairs that are added to or removed from the default environment. */ + env?: { [key: string]: string | null; }; } /** Response to Initialize request. */ diff --git a/src/vs/workbench/parts/debug/common/debugViewModel.ts b/src/vs/workbench/parts/debug/common/debugViewModel.ts index 2da97bc70b5..8cf6ba7bc33 100644 --- a/src/vs/workbench/parts/debug/common/debugViewModel.ts +++ b/src/vs/workbench/parts/debug/common/debugViewModel.ts @@ -15,14 +15,12 @@ export class ViewModel implements debug.IViewModel { private _onDidFocusProcess: Emitter; private _onDidFocusStackFrame: Emitter<{ stackFrame: debug.IStackFrame, explicit: boolean }>; private _onDidSelectExpression: Emitter; - private _onDidSelectFunctionBreakpoint: Emitter; private multiProcessView: boolean; constructor() { this._onDidFocusProcess = new Emitter(); this._onDidFocusStackFrame = new Emitter<{ stackFrame: debug.IStackFrame, explicit: boolean }>(); this._onDidSelectExpression = new Emitter(); - this._onDidSelectFunctionBreakpoint = new Emitter(); this.multiProcessView = false; } @@ -78,11 +76,6 @@ export class ViewModel implements debug.IViewModel { public setSelectedFunctionBreakpoint(functionBreakpoint: debug.IFunctionBreakpoint): void { this.selectedFunctionBreakpoint = functionBreakpoint; - this._onDidSelectFunctionBreakpoint.fire(functionBreakpoint); - } - - public get onDidSelectFunctionBreakpoint(): Event { - return this._onDidSelectFunctionBreakpoint.event; } public isMultiProcessView(): boolean { diff --git a/src/vs/workbench/parts/debug/electron-browser/baseDebugView.ts b/src/vs/workbench/parts/debug/electron-browser/baseDebugView.ts new file mode 100644 index 00000000000..1edf13d6ec5 --- /dev/null +++ b/src/vs/workbench/parts/debug/electron-browser/baseDebugView.ts @@ -0,0 +1,248 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as dom from 'vs/base/browser/dom'; +import { IExpression, IDebugService, IEnablement } from 'vs/workbench/parts/debug/common/debug'; +import { Expression, FunctionBreakpoint, Variable } from 'vs/workbench/parts/debug/common/debugModel'; +import { IContextViewService, IContextMenuService } from 'vs/platform/contextview/browser/contextView'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { ITree, ContextMenuEvent, IActionProvider } from 'vs/base/parts/tree/browser/tree'; +import { InputBox, IInputValidationOptions } from 'vs/base/browser/ui/inputbox/inputBox'; +import { attachInputBoxStyler } from 'vs/platform/theme/common/styler'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { once } from 'vs/base/common/functional'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IMenuService, MenuId, IMenu } from 'vs/platform/actions/common/actions'; +import { ClickBehavior, DefaultController } from 'vs/base/parts/tree/browser/treeDefaults'; +import { fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; +import { KeyCode } from 'vs/base/common/keyCodes'; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { onUnexpectedError } from 'vs/base/common/errors'; + +export const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024; +export const twistiePixels = 20; +const booleanRegex = /^true|false$/i; +const stringRegex = /^(['"]).*\1$/; +const $ = dom.$; + +export interface IRenderValueOptions { + preserveWhitespace?: boolean; + showChanged?: boolean; + maxValueLength?: number; + showHover?: boolean; + colorize?: boolean; +} + +export interface IVariableTemplateData { + expression: HTMLElement; + name: HTMLElement; + value: HTMLElement; +} + +export function renderViewTree(container: HTMLElement): HTMLElement { + const treeContainer = document.createElement('div'); + dom.addClass(treeContainer, 'debug-view-content'); + container.appendChild(treeContainer); + return treeContainer; +} + +function replaceWhitespace(value: string): string { + const map: { [x: string]: string } = { '\n': '\\n', '\r': '\\r', '\t': '\\t' }; + return value.replace(/[\n\r\t]/g, char => map[char]); +} + +export function renderExpressionValue(expressionOrValue: IExpression | string, container: HTMLElement, options: IRenderValueOptions): void { + let value = typeof expressionOrValue === 'string' ? expressionOrValue : expressionOrValue.value; + + // remove stale classes + container.className = 'value'; + // when resolving expressions we represent errors from the server as a variable with name === null. + if (value === null || ((expressionOrValue instanceof Expression || expressionOrValue instanceof Variable) && !expressionOrValue.available)) { + dom.addClass(container, 'unavailable'); + if (value !== Expression.DEFAULT_VALUE) { + dom.addClass(container, 'error'); + } + } + + if (options.colorize && typeof expressionOrValue !== 'string') { + if (expressionOrValue.type === 'number' || expressionOrValue.type === 'boolean' || expressionOrValue.type === 'string') { + dom.addClass(container, expressionOrValue.type); + } else if (!isNaN(+value)) { + dom.addClass(container, 'number'); + } else if (booleanRegex.test(value)) { + dom.addClass(container, 'boolean'); + } else if (stringRegex.test(value)) { + dom.addClass(container, 'string'); + } + } + + if (options.showChanged && (expressionOrValue).valueChanged && value !== Expression.DEFAULT_VALUE) { + // value changed color has priority over other colors. + container.className = 'value changed'; + } + + if (options.maxValueLength && value.length > options.maxValueLength) { + value = value.substr(0, options.maxValueLength) + '...'; + } + if (value && !options.preserveWhitespace) { + container.textContent = replaceWhitespace(value); + } else { + container.textContent = value; + } + if (options.showHover) { + container.title = value; + } +} + +export function renderVariable(tree: ITree, variable: Variable, data: IVariableTemplateData, showChanged: boolean): void { + if (variable.available) { + data.name.textContent = replaceWhitespace(variable.name); + data.name.title = variable.type ? variable.type : variable.name; + dom.toggleClass(data.name, 'virtual', !!variable.presentationHint && variable.presentationHint.kind === 'virtual'); + } + + if (variable.value) { + data.name.textContent += variable.name ? ':' : ''; + renderExpressionValue(variable, data.value, { + showChanged, + maxValueLength: MAX_VALUE_RENDER_LENGTH_IN_VIEWLET, + preserveWhitespace: false, + showHover: true, + colorize: true + }); + } else { + data.value.textContent = ''; + data.value.title = ''; + } +} + +export interface IRenameBoxOptions { + initialValue: string; + ariaLabel: string; + placeholder?: string; + validationOptions?: IInputValidationOptions; +} + +export function renderRenameBox(debugService: IDebugService, contextViewService: IContextViewService, themeService: IThemeService, tree: ITree, element: any, container: HTMLElement, options: IRenameBoxOptions): void { + let inputBoxContainer = dom.append(container, $('.inputBoxContainer')); + let inputBox = new InputBox(inputBoxContainer, contextViewService, { + validationOptions: options.validationOptions, + placeholder: options.placeholder, + ariaLabel: options.ariaLabel + }); + const styler = attachInputBoxStyler(inputBox, themeService); + + tree.setHighlight(); + inputBox.value = options.initialValue ? options.initialValue : ''; + inputBox.focus(); + inputBox.select(); + + let disposed = false; + const toDispose: IDisposable[] = [inputBox, styler]; + + const wrapUp = once((renamed: boolean) => { + if (!disposed) { + disposed = true; + if (element instanceof Expression && renamed && inputBox.value) { + debugService.renameWatchExpression(element.getId(), inputBox.value).done(null, onUnexpectedError); + } else if (element instanceof Expression && !element.name) { + debugService.removeWatchExpressions(element.getId()); + } else if (element instanceof FunctionBreakpoint && inputBox.value) { + debugService.renameFunctionBreakpoint(element.getId(), renamed ? inputBox.value : element.name).done(null, onUnexpectedError); + } else if (element instanceof FunctionBreakpoint && !element.name) { + debugService.removeFunctionBreakpoints(element.getId()).done(null, onUnexpectedError); + } else if (element instanceof Variable) { + element.errorMessage = null; + if (renamed && element.value !== inputBox.value) { + element.setVariable(inputBox.value) + // if everything went fine we need to refresh ui elements since the variable update can change watch and variables view + .done(() => { + tree.refresh(element, false); + debugService.evaluateWatchExpressions(); + }, onUnexpectedError); + } + } + + tree.clearHighlight(); + tree.DOMFocus(); + tree.setFocus(element); + + // need to remove the input box since this template will be reused. + container.removeChild(inputBoxContainer); + dispose(toDispose); + } + }); + + toDispose.push(dom.addStandardDisposableListener(inputBox.inputElement, 'keydown', (e: IKeyboardEvent) => { + const isEscape = e.equals(KeyCode.Escape); + const isEnter = e.equals(KeyCode.Enter); + if (isEscape || isEnter) { + e.preventDefault(); + e.stopPropagation(); + wrapUp(isEnter); + } + })); + toDispose.push(dom.addDisposableListener(inputBox.inputElement, 'blur', () => { + wrapUp(true); + })); +} + +export class BaseDebugController extends DefaultController { + + private contributedContextMenu: IMenu; + + constructor( + private actionProvider: IActionProvider, + menuId: MenuId, + @IDebugService protected debugService: IDebugService, + @IWorkbenchEditorService protected editorService: IWorkbenchEditorService, + @IContextMenuService private contextMenuService: IContextMenuService, + @IContextKeyService contextKeyService: IContextKeyService, + @IMenuService menuService: IMenuService + ) { + super({ clickBehavior: ClickBehavior.ON_MOUSE_UP, keyboardSupport: false }); + + this.contributedContextMenu = menuService.createMenu(menuId, contextKeyService); + } + + public onContextMenu(tree: ITree, element: IEnablement, event: ContextMenuEvent, focusElement = true): boolean { + if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'input') { + return false; + } + + event.preventDefault(); + event.stopPropagation(); + + if (focusElement) { + tree.setFocus(element); + } + + if (this.actionProvider.hasSecondaryActions(tree, element)) { + const anchor = { x: event.posx, y: event.posy }; + this.contextMenuService.showContextMenu({ + getAnchor: () => anchor, + getActions: () => this.actionProvider.getSecondaryActions(tree, element).then(actions => { + fillInActions(this.contributedContextMenu, { arg: this.getContext(element) }, actions); + return actions; + }), + onHide: (wasCancelled?: boolean) => { + if (wasCancelled) { + tree.DOMFocus(); + } + }, + getActionsContext: () => element + }); + + return true; + } + + return false; + } + + protected getContext(element: any): any { + return undefined; + } +} diff --git a/src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts b/src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts new file mode 100644 index 00000000000..04d49976b8c --- /dev/null +++ b/src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts @@ -0,0 +1,518 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vs/nls'; +import * as resources from 'vs/base/common/resources'; +import * as dom from 'vs/base/browser/dom'; +import { onUnexpectedError } from 'vs/base/common/errors'; +import { IAction, Action } from 'vs/base/common/actions'; +import { IDebugService, IBreakpoint, CONTEXT_BREAKPOINTS_FOCUSED, EDITOR_CONTRIBUTION_ID, State, DEBUG_SCHEME, IFunctionBreakpoint, IExceptionBreakpoint, IEnablement, IDebugEditorContribution } from 'vs/workbench/parts/debug/common/debug'; +import { ExceptionBreakpoint, FunctionBreakpoint, Breakpoint } from 'vs/workbench/parts/debug/common/debugModel'; +import { AddFunctionBreakpointAction, ToggleBreakpointsActivatedAction, RemoveAllBreakpointsAction, RemoveBreakpointAction, EnableAllBreakpointsAction, DisableAllBreakpointsAction, ReapplyBreakpointsAction } from 'vs/workbench/parts/debug/browser/debugActions'; +import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { Constants } from 'vs/editor/common/core/uint'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { getPathLabel } from 'vs/base/common/labels'; +import { dispose, IDisposable } from 'vs/base/common/lifecycle'; +import { basename } from 'vs/base/common/paths'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; +import { IDelegate, IListContextMenuEvent, IRenderer } from 'vs/base/browser/ui/list/list'; +import { IEditorService, IEditor } from 'vs/platform/editor/common/editor'; +import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; +import { IKeyboardEvent, StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { KeyCode } from 'vs/base/common/keyCodes'; +import { WorkbenchList, IListService } from 'vs/platform/list/browser/listService'; +import { ViewsViewletPanel, IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { attachInputBoxStyler } from 'vs/platform/theme/common/styler'; +import { isCodeEditor } from 'vs/editor/browser/editorBrowser'; + +const $ = dom.$; + +export class BreakpointsView extends ViewsViewletPanel { + + private static readonly MAX_VISIBLE_FILES = 9; + private static readonly MEMENTO = 'breakopintsview.memento'; + private settings: any; + private list: WorkbenchList; + private needsRefresh: boolean; + + constructor( + options: IViewletViewOptions, + @IContextMenuService contextMenuService: IContextMenuService, + @IDebugService private debugService: IDebugService, + @IKeybindingService keybindingService: IKeybindingService, + @IInstantiationService private instantiationService: IInstantiationService, + @IListService private listService: IListService, + @IThemeService private themeService: IThemeService, + @IEditorService private editorService: IEditorService, + @IContextViewService private contextViewService: IContextViewService, + @IContextKeyService private contextKeyService: IContextKeyService + ) { + super(options, keybindingService, contextMenuService); + + this.minimumBodySize = this.maximumBodySize = this.getExpandedBodySize(); + this.settings = options.viewletSettings; + this.disposables.push(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange())); + } + + public renderBody(container: HTMLElement): void { + dom.addClass(container, 'debug-breakpoints'); + const delegate = new BreakpointsDelegate(this.debugService); + + this.list = new WorkbenchList(container, delegate, [ + this.instantiationService.createInstance(BreakpointsRenderer), + new ExceptionBreakpointsRenderer(this.debugService), + new FunctionBreakpointsRenderer(this.debugService), + new FunctionBreakpointInputRenderer(this.debugService, this.contextViewService, this.themeService) + ], { + identityProvider: element => element.getId(), + multipleSelectionSupport: false + }, this.contextKeyService, this.listService, this.themeService); + + CONTEXT_BREAKPOINTS_FOCUSED.bindTo(this.list.contextKeyService); + + this.list.onContextMenu(this.onListContextMenu, this, this.disposables); + + const handleBreakpointFocus = (preserveFocuse: boolean, sideBySide: boolean, selectFunctionBreakpoint: boolean) => { + const focused = this.list.getFocusedElements(); + const element = focused.length ? focused[0] : undefined; + if (element instanceof Breakpoint) { + openBreakpointSource(element, sideBySide, preserveFocuse, this.debugService, this.editorService).done(undefined, onUnexpectedError); + } + if (selectFunctionBreakpoint && element instanceof FunctionBreakpoint && element !== this.debugService.getViewModel().getSelectedFunctionBreakpoint()) { + this.debugService.getViewModel().setSelectedFunctionBreakpoint(element); + this.onBreakpointsChange(); + } + }; + this.disposables.push(this.list.onKeyUp(e => { + const event = new StandardKeyboardEvent(e); + if (event.equals(KeyCode.Enter)) { + handleBreakpointFocus(false, event && (event.ctrlKey || event.metaKey), false); + } + })); + this.disposables.push(this.list.onMouseDblClick(e => { + handleBreakpointFocus(false, false, true); + })); + this.disposables.push(this.list.onMouseClick(e => { + handleBreakpointFocus(true, false, false); + })); + + this.list.splice(0, this.list.length, this.elements); + } + + protected layoutBody(size: number): void { + if (this.list) { + this.list.layout(size); + } + } + + private onListContextMenu(e: IListContextMenuEvent): void { + const actions: IAction[] = []; + const element = e.element; + + if (element instanceof Breakpoint) { + actions.push(new Action('workbench.action.debug.openEditorAndEditBreakpoint', nls.localize('editConditionalBreakpoint', "Edit Breakpoint..."), undefined, true, () => { + return openBreakpointSource(element, false, false, this.debugService, this.editorService).then(editor => { + const codeEditor = editor.getControl(); + if (isCodeEditor(codeEditor)) { + codeEditor.getContribution(EDITOR_CONTRIBUTION_ID).showBreakpointWidget(element.lineNumber, element.column); + } + }); + })); + actions.push(new Separator()); + } + + actions.push(new RemoveBreakpointAction(RemoveBreakpointAction.ID, RemoveBreakpointAction.LABEL, this.debugService, this.keybindingService)); + + + if (this.debugService.getModel().getBreakpoints().length + this.debugService.getModel().getFunctionBreakpoints().length > 1) { + actions.push(new RemoveAllBreakpointsAction(RemoveAllBreakpointsAction.ID, RemoveAllBreakpointsAction.LABEL, this.debugService, this.keybindingService)); + actions.push(new Separator()); + + actions.push(new EnableAllBreakpointsAction(EnableAllBreakpointsAction.ID, EnableAllBreakpointsAction.LABEL, this.debugService, this.keybindingService)); + actions.push(new DisableAllBreakpointsAction(DisableAllBreakpointsAction.ID, DisableAllBreakpointsAction.LABEL, this.debugService, this.keybindingService)); + } + + actions.push(new Separator()); + actions.push(new ReapplyBreakpointsAction(ReapplyBreakpointsAction.ID, ReapplyBreakpointsAction.LABEL, this.debugService, this.keybindingService)); + + this.contextMenuService.showContextMenu({ + getAnchor: () => e.anchor, + getActions: () => TPromise.as(actions), + getActionsContext: () => element + }); + } + + public getActions(): IAction[] { + return [ + new AddFunctionBreakpointAction(AddFunctionBreakpointAction.ID, AddFunctionBreakpointAction.LABEL, this.debugService, this.keybindingService), + new ToggleBreakpointsActivatedAction(ToggleBreakpointsActivatedAction.ID, ToggleBreakpointsActivatedAction.ACTIVATE_LABEL, this.debugService, this.keybindingService), + new RemoveAllBreakpointsAction(RemoveAllBreakpointsAction.ID, RemoveAllBreakpointsAction.LABEL, this.debugService, this.keybindingService) + ]; + } + + public setExpanded(expanded: boolean): void { + super.setExpanded(expanded); + if (expanded && this.needsRefresh) { + this.onBreakpointsChange(); + } + } + + public setVisible(visible: boolean): TPromise { + return super.setVisible(visible).then(() => { + if (visible && this.needsRefresh) { + this.onBreakpointsChange(); + } + }); + } + + private onBreakpointsChange(): void { + if (this.isExpanded() && this.isVisible()) { + this.minimumBodySize = this.getExpandedBodySize(); + if (this.maximumBodySize < Number.POSITIVE_INFINITY) { + this.maximumBodySize = this.minimumBodySize; + } + if (this.list) { + this.list.splice(0, this.list.length, this.elements); + this.needsRefresh = false; + } + } else { + this.needsRefresh = true; + } + } + + private get elements(): IEnablement[] { + const model = this.debugService.getModel(); + const elements = (model.getExceptionBreakpoints()).concat(model.getFunctionBreakpoints()).concat(model.getBreakpoints()); + + return elements; + } + + private getExpandedBodySize(): number { + const model = this.debugService.getModel(); + const length = model.getBreakpoints().length + model.getExceptionBreakpoints().length + model.getFunctionBreakpoints().length; + return Math.min(BreakpointsView.MAX_VISIBLE_FILES, length) * 22; + } + + public shutdown(): void { + this.settings[BreakpointsView.MEMENTO] = !this.isExpanded(); + } +} + +class BreakpointsDelegate implements IDelegate { + + constructor(private debugService: IDebugService) { + // noop + } + + getHeight(element: IEnablement): number { + return 22; + } + + getTemplateId(element: IEnablement): string { + if (element instanceof Breakpoint) { + return BreakpointsRenderer.ID; + } + if (element instanceof FunctionBreakpoint) { + const selected = this.debugService.getViewModel().getSelectedFunctionBreakpoint(); + if (!element.name || (selected && selected.getId() === element.getId())) { + return FunctionBreakpointInputRenderer.ID; + } + + return FunctionBreakpointsRenderer.ID; + } + if (element instanceof ExceptionBreakpoint) { + return ExceptionBreakpointsRenderer.ID; + } + + return undefined; + } +} + +interface IBaseBreakpointTemplateData { + breakpoint: HTMLElement; + name: HTMLElement; + checkbox: HTMLInputElement; + context: IEnablement; + toDispose: IDisposable[]; +} + +interface IBreakpointTemplateData extends IBaseBreakpointTemplateData { + lineNumber: HTMLElement; + filePath: HTMLElement; +} + +interface IInputTemplateData { + inputBox: InputBox; + breakpoint: IFunctionBreakpoint; + reactedOnEvent: boolean; + toDispose: IDisposable[]; +} + +class BreakpointsRenderer implements IRenderer { + + constructor( + @IDebugService private debugService: IDebugService, + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IEnvironmentService private environmentService: IEnvironmentService + ) { + // noop + } + + static ID = 'breakpoints'; + + get templateId() { + return BreakpointsRenderer.ID; + } + + renderTemplate(container: HTMLElement): IBreakpointTemplateData { + const data: IBreakpointTemplateData = Object.create(null); + data.breakpoint = dom.append(container, $('.breakpoint')); + + data.checkbox = $('input'); + data.checkbox.type = 'checkbox'; + data.toDispose = []; + data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => { + this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context); + })); + + dom.append(data.breakpoint, data.checkbox); + + data.name = dom.append(data.breakpoint, $('span.name')); + + data.filePath = dom.append(data.breakpoint, $('span.file-path')); + const lineNumberContainer = dom.append(data.breakpoint, $('.line-number-container')); + data.lineNumber = dom.append(lineNumberContainer, $('span.line-number')); + + return data; + } + + renderElement(breakpoint: IBreakpoint, index: number, data: IBreakpointTemplateData): void { + data.context = breakpoint; + dom.toggleClass(data.breakpoint, 'disabled', !this.debugService.getModel().areBreakpointsActivated()); + + data.name.textContent = basename(getPathLabel(breakpoint.uri, this.contextService)); + data.lineNumber.textContent = breakpoint.lineNumber.toString(); + if (breakpoint.column) { + data.lineNumber.textContent += `:${breakpoint.column}`; + } + data.filePath.textContent = getPathLabel(resources.dirname(breakpoint.uri), this.contextService, this.environmentService); + data.checkbox.checked = breakpoint.enabled; + + const debugActive = this.debugService.state === State.Running || this.debugService.state === State.Stopped; + if (debugActive && !breakpoint.verified) { + dom.addClass(data.breakpoint, 'disabled'); + if (breakpoint.message) { + data.breakpoint.title = breakpoint.message; + } + } else if (breakpoint.condition || breakpoint.hitCondition) { + data.breakpoint.title = breakpoint.condition ? breakpoint.condition : breakpoint.hitCondition; + } + } + + disposeTemplate(templateData: IBreakpointTemplateData): void { + dispose(templateData.toDispose); + } +} + +class ExceptionBreakpointsRenderer implements IRenderer { + + constructor( + private debugService: IDebugService + ) { + // noop + } + + static ID = 'exceptionbreakpoints'; + + get templateId() { + return ExceptionBreakpointsRenderer.ID; + } + + renderTemplate(container: HTMLElement): IBaseBreakpointTemplateData { + const data: IBreakpointTemplateData = Object.create(null); + data.breakpoint = dom.append(container, $('.breakpoint')); + + data.checkbox = $('input'); + data.checkbox.type = 'checkbox'; + data.toDispose = []; + data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => { + this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context); + })); + + dom.append(data.breakpoint, data.checkbox); + + data.name = dom.append(data.breakpoint, $('span.name')); + dom.addClass(data.breakpoint, 'exception'); + + return data; + } + + renderElement(exceptionBreakpoint: IExceptionBreakpoint, index: number, data: IBaseBreakpointTemplateData): void { + data.context = exceptionBreakpoint; + data.name.textContent = exceptionBreakpoint.label || `${exceptionBreakpoint.filter} exceptions`; + data.breakpoint.title = data.name.textContent; + data.checkbox.checked = exceptionBreakpoint.enabled; + } + + disposeTemplate(templateData: IBaseBreakpointTemplateData): void { + dispose(templateData.toDispose); + } +} + +class FunctionBreakpointsRenderer implements IRenderer { + + constructor( + private debugService: IDebugService + ) { + // noop + } + + static ID = 'functionbreakpoints'; + + get templateId() { + return FunctionBreakpointsRenderer.ID; + } + + renderTemplate(container: HTMLElement): IBaseBreakpointTemplateData { + const data: IBreakpointTemplateData = Object.create(null); + data.breakpoint = dom.append(container, $('.breakpoint')); + + data.checkbox = $('input'); + data.checkbox.type = 'checkbox'; + data.toDispose = []; + data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => { + this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context); + })); + + dom.append(data.breakpoint, data.checkbox); + + data.name = dom.append(data.breakpoint, $('span.name')); + + return data; + } + + renderElement(functionBreakpoint: IFunctionBreakpoint, index: number, data: IBaseBreakpointTemplateData): void { + data.context = functionBreakpoint; + data.name.textContent = functionBreakpoint.name; + data.checkbox.checked = functionBreakpoint.enabled; + data.breakpoint.title = functionBreakpoint.name; + + // Mark function breakpoints as disabled if deactivated or if debug type does not support them #9099 + const process = this.debugService.getViewModel().focusedProcess; + dom.toggleClass(data.breakpoint, 'disalbed', (process && !process.session.capabilities.supportsFunctionBreakpoints) || !this.debugService.getModel().areBreakpointsActivated()); + if (process && !process.session.capabilities.supportsFunctionBreakpoints) { + data.breakpoint.title = nls.localize('functionBreakpointsNotSupported', "Function breakpoints are not supported by this debug type"); + } + } + + disposeTemplate(templateData: IBaseBreakpointTemplateData): void { + dispose(templateData.toDispose); + } +} + +class FunctionBreakpointInputRenderer implements IRenderer { + + constructor( + private debugService: IDebugService, + private contextViewService: IContextViewService, + private themeService: IThemeService + ) { + // noop + } + + static ID = 'functionbreakpointinput'; + + get templateId() { + return FunctionBreakpointInputRenderer.ID; + } + + renderTemplate(container: HTMLElement): IInputTemplateData { + const template: IInputTemplateData = Object.create(null); + const inputBoxContainer = dom.append(container, $('.inputBoxContainer')); + const inputBox = new InputBox(inputBoxContainer, this.contextViewService, { + placeholder: nls.localize('functionBreakpointPlaceholder', "Function to break on"), + ariaLabel: nls.localize('functionBreakPointInputAriaLabel', "Type function breakpoint") + }); + const styler = attachInputBoxStyler(inputBox, this.themeService); + const toDispose: IDisposable[] = [inputBox, styler]; + + const wrapUp = (renamed: boolean) => { + if (!template.reactedOnEvent) { + template.reactedOnEvent = true; + this.debugService.getViewModel().setSelectedFunctionBreakpoint(undefined); + if (inputBox.value && (renamed || template.breakpoint.name)) { + this.debugService.renameFunctionBreakpoint(template.breakpoint.getId(), renamed ? inputBox.value : template.breakpoint.name).done(null, onUnexpectedError); + } else { + this.debugService.removeFunctionBreakpoints(template.breakpoint.getId()).done(null, onUnexpectedError); + } + } + }; + + toDispose.push(dom.addStandardDisposableListener(inputBox.inputElement, 'keydown', (e: IKeyboardEvent) => { + const isEscape = e.equals(KeyCode.Escape); + const isEnter = e.equals(KeyCode.Enter); + if (isEscape || isEnter) { + e.preventDefault(); + e.stopPropagation(); + wrapUp(isEnter); + } + })); + toDispose.push(dom.addDisposableListener(inputBox.inputElement, 'blur', () => { + wrapUp(true); + })); + + template.inputBox = inputBox; + template.toDispose = toDispose; + return template; + } + + renderElement(functionBreakpoint: IFunctionBreakpoint, index: number, data: IInputTemplateData): void { + data.breakpoint = functionBreakpoint; + data.reactedOnEvent = false; + data.inputBox.value = functionBreakpoint.name || ''; + data.inputBox.focus(); + data.inputBox.select(); + } + + disposeTemplate(templateData: IInputTemplateData): void { + dispose(templateData.toDispose); + } +} + +function openBreakpointSource(breakpoint: Breakpoint, sideBySide: boolean, preserveFocus: boolean, debugService: IDebugService, editorService: IEditorService): TPromise { + if (breakpoint.uri.scheme === DEBUG_SCHEME && debugService.state === State.Inactive) { + return TPromise.as(null); + } + + const selection = breakpoint.endLineNumber ? { + startLineNumber: breakpoint.lineNumber, + endLineNumber: breakpoint.endLineNumber, + startColumn: breakpoint.column, + endColumn: breakpoint.endColumn + } : { + startLineNumber: breakpoint.lineNumber, + startColumn: breakpoint.column || 1, + endLineNumber: breakpoint.lineNumber, + endColumn: breakpoint.column || Constants.MAX_SAFE_SMALL_INTEGER + }; + + return editorService.openEditor({ + resource: breakpoint.uri, + options: { + preserveFocus, + selection, + revealIfVisible: true, + revealInCenterIfOutsideViewport: true, + pinned: !preserveFocus + } + }, sideBySide); +} diff --git a/src/vs/workbench/parts/debug/electron-browser/callStackView.ts b/src/vs/workbench/parts/debug/electron-browser/callStackView.ts new file mode 100644 index 00000000000..e45bccd9b77 --- /dev/null +++ b/src/vs/workbench/parts/debug/electron-browser/callStackView.ts @@ -0,0 +1,543 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vs/nls'; +import { RunOnceScheduler } from 'vs/base/common/async'; +import * as dom from 'vs/base/browser/dom'; +import { TPromise } from 'vs/base/common/winjs.base'; +import * as errors from 'vs/base/common/errors'; +import { TreeViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; +import { IDebugService, State, IStackFrame, IProcess, IThread } from 'vs/workbench/parts/debug/common/debug'; +import { Thread, StackFrame, ThreadAndProcessIds, Process, Model } from 'vs/workbench/parts/debug/common/debugModel'; +import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { MenuId } from 'vs/platform/actions/common/actions'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { BaseDebugController, twistiePixels, renderViewTree } from 'vs/workbench/parts/debug/electron-browser/baseDebugView'; +import { ITree, IActionProvider, IDataSource, IRenderer, IAccessibilityProvider } from 'vs/base/parts/tree/browser/tree'; +import { IMouseEvent } from 'vs/base/browser/mouseEvent'; +import { IAction, IActionItem } from 'vs/base/common/actions'; +import { RestartAction, StopAction, ContinueAction, StepOverAction, StepIntoAction, StepOutAction, PauseAction, RestartFrameAction } from 'vs/workbench/parts/debug/browser/debugActions'; +import { CopyStackTraceAction } from 'vs/workbench/parts/debug/electron-browser/electronDebugActions'; +import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { Source } from 'vs/workbench/parts/debug/common/debugSource'; +import { basenameOrAuthority } from 'vs/base/common/resources'; +import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; + +const $ = dom.$; + +export class CallStackView extends TreeViewsViewletPanel { + + private static readonly MEMENTO = 'callstackview.memento'; + private pauseMessage: HTMLSpanElement; + private pauseMessageLabel: HTMLSpanElement; + private onCallStackChangeScheduler: RunOnceScheduler; + private settings: any; + private needsRefresh: boolean; + + constructor( + private options: IViewletViewOptions, + @IContextMenuService contextMenuService: IContextMenuService, + @IContextKeyService private contextKeyService: IContextKeyService, + @IDebugService private debugService: IDebugService, + @IKeybindingService keybindingService: IKeybindingService, + @IInstantiationService private instantiationService: IInstantiationService, + @IThemeService private themeService: IThemeService, + @IListService private listService: IListService + ) { + super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService); + this.settings = options.viewletSettings; + + // Create scheduler to prevent unnecessary flashing of tree when reacting to changes + this.onCallStackChangeScheduler = new RunOnceScheduler(() => { + let newTreeInput: any = this.debugService.getModel(); + const processes = this.debugService.getModel().getProcesses(); + if (!this.debugService.getViewModel().isMultiProcessView() && processes.length) { + const threads = processes[0].getAllThreads(); + // Only show the threads in the call stack if there is more than 1 thread. + newTreeInput = threads.length === 1 ? threads[0] : processes[0]; + } + + // Only show the global pause message if we do not display threads. + // Otherwise there will be a pause message per thread and there is no need for a global one. + if (newTreeInput instanceof Thread && newTreeInput.stoppedDetails) { + this.pauseMessageLabel.textContent = newTreeInput.stoppedDetails.description || nls.localize('debugStopped', "Paused on {0}", newTreeInput.stoppedDetails.reason); + if (newTreeInput.stoppedDetails.text) { + this.pauseMessageLabel.title = newTreeInput.stoppedDetails.text; + } + dom.toggleClass(this.pauseMessageLabel, 'exception', newTreeInput.stoppedDetails.reason === 'exception'); + this.pauseMessage.hidden = false; + } else { + this.pauseMessage.hidden = true; + } + + this.needsRefresh = false; + (this.tree.getInput() === newTreeInput ? this.tree.refresh() : this.tree.setInput(newTreeInput)) + .done(() => this.updateTreeSelection(), errors.onUnexpectedError); + }, 50); + } + + protected renderHeaderTitle(container: HTMLElement): void { + const title = dom.append(container, $('.title.debug-call-stack-title')); + const name = dom.append(title, $('span')); + name.textContent = this.options.name; + this.pauseMessage = dom.append(title, $('span.pause-message')); + this.pauseMessage.hidden = true; + this.pauseMessageLabel = dom.append(this.pauseMessage, $('span.label')); + } + + public renderBody(container: HTMLElement): void { + dom.addClass(container, 'debug-call-stack'); + this.treeContainer = renderViewTree(container); + const actionProvider = new CallStackActionProvider(this.debugService, this.keybindingService); + const controller = this.instantiationService.createInstance(CallStackController, actionProvider, MenuId.DebugCallStackContext); + + this.tree = new WorkbenchTree(this.treeContainer, { + dataSource: new CallStackDataSource(), + renderer: this.instantiationService.createInstance(CallStackRenderer), + accessibilityProvider: this.instantiationService.createInstance(CallstackAccessibilityProvider), + controller + }, { + ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'callStackAriaLabel' }, "Debug Call Stack"), + twistiePixels, + keyboardSupport: false + }, this.contextKeyService, this.listService, this.themeService); + + this.disposables.push(this.tree.onDidChangeSelection(event => { + if (event && event.payload && event.payload.origin === 'keyboard') { + const element = this.tree.getFocus(); + if (element instanceof ThreadAndProcessIds) { + controller.showMoreStackFrames(this.tree, element); + } else if (element instanceof StackFrame) { + controller.focusStackFrame(element, event, false); + } + } + })); + + this.disposables.push(this.debugService.getModel().onDidChangeCallStack(() => { + if (!this.isVisible()) { + this.needsRefresh = true; + return; + } + + if (!this.onCallStackChangeScheduler.isScheduled()) { + this.onCallStackChangeScheduler.schedule(); + } + })); + this.disposables.push(this.debugService.getViewModel().onDidFocusStackFrame(() => + this.updateTreeSelection().done(undefined, errors.onUnexpectedError))); + + // Schedule the update of the call stack tree if the viewlet is opened after a session started #14684 + if (this.debugService.state === State.Stopped) { + this.onCallStackChangeScheduler.schedule(); + } + } + + private updateTreeSelection(): TPromise { + if (!this.tree.getInput()) { + // Tree not initialized yet + return TPromise.as(null); + } + + const stackFrame = this.debugService.getViewModel().focusedStackFrame; + const thread = this.debugService.getViewModel().focusedThread; + const process = this.debugService.getViewModel().focusedProcess; + if (!thread) { + if (!process) { + this.tree.clearSelection(); + return TPromise.as(null); + } + + this.tree.setSelection([process]); + return this.tree.reveal(process); + } + + return this.tree.expandAll([thread.process, thread]).then(() => { + if (!stackFrame) { + return TPromise.as(null); + } + + this.tree.setSelection([stackFrame]); + return this.tree.reveal(stackFrame); + }); + } + + public setVisible(visible: boolean): TPromise { + return super.setVisible(visible).then(() => { + if (visible && this.needsRefresh) { + this.onCallStackChangeScheduler.schedule(); + } + }); + } + + public shutdown(): void { + this.settings[CallStackView.MEMENTO] = !this.isExpanded(); + super.shutdown(); + } +} + +class CallStackController extends BaseDebugController { + + protected onLeftClick(tree: ITree, element: any, event: IMouseEvent): boolean { + if (element instanceof ThreadAndProcessIds) { + return this.showMoreStackFrames(tree, element); + } + if (element instanceof StackFrame) { + super.onLeftClick(tree, element, event); + this.focusStackFrame(element, event, event.detail !== 2); + return true; + } + + return super.onLeftClick(tree, element, event); + } + + protected getContext(element: any): any { + if (element instanceof StackFrame) { + if (element.source.inMemory) { + return element.source.raw.path || element.source.reference; + } + + return element.source.uri.toString(); + } + if (element instanceof Thread) { + return element.threadId; + } + } + + // user clicked / pressed on 'Load More Stack Frames', get those stack frames and refresh the tree. + public showMoreStackFrames(tree: ITree, threadAndProcessIds: ThreadAndProcessIds): boolean { + const process = this.debugService.getModel().getProcesses().filter(p => p.getId() === threadAndProcessIds.processId).pop(); + const thread = process && process.getThread(threadAndProcessIds.threadId); + if (thread) { + (thread).fetchCallStack() + .done(() => tree.refresh(), errors.onUnexpectedError); + } + + return true; + } + + public focusStackFrame(stackFrame: IStackFrame, event: any, preserveFocus: boolean): void { + this.debugService.focusStackFrameAndEvaluate(stackFrame, undefined, true).then(() => { + const sideBySide = (event && (event.ctrlKey || event.metaKey)); + return stackFrame.openInEditor(this.editorService, preserveFocus, sideBySide); + }, errors.onUnexpectedError); + } +} + + +class CallStackActionProvider implements IActionProvider { + + constructor(private debugService: IDebugService, private keybindingService: IKeybindingService) { + // noop + } + + public hasActions(tree: ITree, element: any): boolean { + return false; + } + + public getActions(tree: ITree, element: any): TPromise { + return TPromise.as([]); + } + + public hasSecondaryActions(tree: ITree, element: any): boolean { + return element !== tree.getInput(); + } + + public getSecondaryActions(tree: ITree, element: any): TPromise { + const actions: IAction[] = []; + if (element instanceof Process) { + actions.push(new RestartAction(RestartAction.ID, RestartAction.LABEL, this.debugService, this.keybindingService)); + actions.push(new StopAction(StopAction.ID, StopAction.LABEL, this.debugService, this.keybindingService)); + } else if (element instanceof Thread) { + const thread = element; + if (thread.stopped) { + actions.push(new ContinueAction(ContinueAction.ID, ContinueAction.LABEL, this.debugService, this.keybindingService)); + actions.push(new StepOverAction(StepOverAction.ID, StepOverAction.LABEL, this.debugService, this.keybindingService)); + actions.push(new StepIntoAction(StepIntoAction.ID, StepIntoAction.LABEL, this.debugService, this.keybindingService)); + actions.push(new StepOutAction(StepOutAction.ID, StepOutAction.LABEL, this.debugService, this.keybindingService)); + } else { + actions.push(new PauseAction(PauseAction.ID, PauseAction.LABEL, this.debugService, this.keybindingService)); + } + } else if (element instanceof StackFrame) { + if (element.thread.process.session.capabilities.supportsRestartFrame) { + actions.push(new RestartFrameAction(RestartFrameAction.ID, RestartFrameAction.LABEL, this.debugService, this.keybindingService)); + } + actions.push(new CopyStackTraceAction(CopyStackTraceAction.ID, CopyStackTraceAction.LABEL)); + } + + return TPromise.as(actions); + } + + public getActionItem(tree: ITree, element: any, action: IAction): IActionItem { + return null; + } +} + +class CallStackDataSource implements IDataSource { + + public getId(tree: ITree, element: any): string { + if (typeof element === 'string') { + return element; + } + + return element.getId(); + } + + public hasChildren(tree: ITree, element: any): boolean { + return element instanceof Model || element instanceof Process || (element instanceof Thread && (element).stopped); + } + + public getChildren(tree: ITree, element: any): TPromise { + if (element instanceof Thread) { + return this.getThreadChildren(element); + } + if (element instanceof Model) { + return TPromise.as(element.getProcesses()); + } + + const process = element; + return TPromise.as(process.getAllThreads()); + } + + private getThreadChildren(thread: Thread): TPromise { + let callStack: any[] = thread.getCallStack(); + let callStackPromise: TPromise = TPromise.as(null); + if (!callStack || !callStack.length) { + callStackPromise = thread.fetchCallStack().then(() => callStack = thread.getCallStack()); + } + + return callStackPromise.then(() => { + if (callStack.length === 1 && thread.process.session.capabilities.supportsDelayedStackTraceLoading) { + // To reduce flashing of the call stack view simply append the stale call stack + // once we have the correct data the tree will refresh and we will no longer display it. + callStack = callStack.concat(thread.getStaleCallStack().slice(1)); + } + + if (thread.stoppedDetails && thread.stoppedDetails.framesErrorMessage) { + callStack = callStack.concat([thread.stoppedDetails.framesErrorMessage]); + } + if (thread.stoppedDetails && thread.stoppedDetails.totalFrames > callStack.length && callStack.length > 1) { + callStack = callStack.concat([new ThreadAndProcessIds(thread.process.getId(), thread.threadId)]); + } + + return callStack; + }); + } + + public getParent(tree: ITree, element: any): TPromise { + return TPromise.as(null); + } +} + +interface IThreadTemplateData { + thread: HTMLElement; + name: HTMLElement; + state: HTMLElement; + stateLabel: HTMLSpanElement; +} + +interface IProcessTemplateData { + process: HTMLElement; + name: HTMLElement; + state: HTMLElement; + stateLabel: HTMLSpanElement; +} + +interface IErrorTemplateData { + label: HTMLElement; +} + +interface ILoadMoreTemplateData { + label: HTMLElement; +} + +interface IStackFrameTemplateData { + stackFrame: HTMLElement; + label: HTMLElement; + file: HTMLElement; + fileName: HTMLElement; + lineNumber: HTMLElement; +} + +class CallStackRenderer implements IRenderer { + + private static readonly THREAD_TEMPLATE_ID = 'thread'; + private static readonly STACK_FRAME_TEMPLATE_ID = 'stackFrame'; + private static readonly ERROR_TEMPLATE_ID = 'error'; + private static readonly LOAD_MORE_TEMPLATE_ID = 'loadMore'; + private static readonly PROCESS_TEMPLATE_ID = 'process'; + + constructor( + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IEnvironmentService private environmentService: IEnvironmentService + ) { + // noop + } + + public getHeight(tree: ITree, element: any): number { + return 22; + } + + public getTemplateId(tree: ITree, element: any): string { + if (element instanceof Process) { + return CallStackRenderer.PROCESS_TEMPLATE_ID; + } + if (element instanceof Thread) { + return CallStackRenderer.THREAD_TEMPLATE_ID; + } + if (element instanceof StackFrame) { + return CallStackRenderer.STACK_FRAME_TEMPLATE_ID; + } + if (typeof element === 'string') { + return CallStackRenderer.ERROR_TEMPLATE_ID; + } + + return CallStackRenderer.LOAD_MORE_TEMPLATE_ID; + } + + public renderTemplate(tree: ITree, templateId: string, container: HTMLElement): any { + if (templateId === CallStackRenderer.PROCESS_TEMPLATE_ID) { + let data: IProcessTemplateData = Object.create(null); + data.process = dom.append(container, $('.process')); + data.name = dom.append(data.process, $('.name')); + data.state = dom.append(data.process, $('.state')); + data.stateLabel = dom.append(data.state, $('span.label')); + + return data; + } + + if (templateId === CallStackRenderer.LOAD_MORE_TEMPLATE_ID) { + let data: ILoadMoreTemplateData = Object.create(null); + data.label = dom.append(container, $('.load-more')); + + return data; + } + if (templateId === CallStackRenderer.ERROR_TEMPLATE_ID) { + let data: ILoadMoreTemplateData = Object.create(null); + data.label = dom.append(container, $('.error')); + + return data; + } + if (templateId === CallStackRenderer.THREAD_TEMPLATE_ID) { + let data: IThreadTemplateData = Object.create(null); + data.thread = dom.append(container, $('.thread')); + data.name = dom.append(data.thread, $('.name')); + data.state = dom.append(data.thread, $('.state')); + data.stateLabel = dom.append(data.state, $('span.label')); + + return data; + } + + let data: IStackFrameTemplateData = Object.create(null); + data.stackFrame = dom.append(container, $('.stack-frame')); + data.label = dom.append(data.stackFrame, $('span.label.expression')); + data.file = dom.append(data.stackFrame, $('.file')); + data.fileName = dom.append(data.file, $('span.file-name')); + const wrapper = dom.append(data.file, $('span.line-number-wrapper')); + data.lineNumber = dom.append(wrapper, $('span.line-number')); + + return data; + } + + public renderElement(tree: ITree, element: any, templateId: string, templateData: any): void { + if (templateId === CallStackRenderer.PROCESS_TEMPLATE_ID) { + this.renderProcess(element, templateData); + } else if (templateId === CallStackRenderer.THREAD_TEMPLATE_ID) { + this.renderThread(element, templateData); + } else if (templateId === CallStackRenderer.STACK_FRAME_TEMPLATE_ID) { + this.renderStackFrame(element, templateData); + } else if (templateId === CallStackRenderer.ERROR_TEMPLATE_ID) { + this.renderError(element, templateData); + } else if (templateId === CallStackRenderer.LOAD_MORE_TEMPLATE_ID) { + this.renderLoadMore(element, templateData); + } + } + + private renderProcess(process: IProcess, data: IProcessTemplateData): void { + data.process.title = nls.localize({ key: 'process', comment: ['Process is a noun'] }, "Process"); + data.name.textContent = process.getName(this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE); + const stoppedThread = process.getAllThreads().filter(t => t.stopped).pop(); + + data.stateLabel.textContent = stoppedThread ? nls.localize('paused', "Paused") + : nls.localize({ key: 'running', comment: ['indicates state'] }, "Running"); + } + + private renderThread(thread: IThread, data: IThreadTemplateData): void { + data.thread.title = nls.localize('thread', "Thread"); + data.name.textContent = thread.name; + + if (thread.stopped) { + data.stateLabel.textContent = thread.stoppedDetails.description || + thread.stoppedDetails.reason ? nls.localize({ key: 'pausedOn', comment: ['indicates reason for program being paused'] }, "Paused on {0}", thread.stoppedDetails.reason) : nls.localize('paused', "Paused"); + } else { + data.stateLabel.textContent = nls.localize({ key: 'running', comment: ['indicates state'] }, "Running"); + } + } + + private renderError(element: string, data: IErrorTemplateData) { + data.label.textContent = element; + data.label.title = element; + } + + private renderLoadMore(element: any, data: ILoadMoreTemplateData): void { + data.label.textContent = nls.localize('loadMoreStackFrames', "Load More Stack Frames"); + } + + private renderStackFrame(stackFrame: IStackFrame, data: IStackFrameTemplateData): void { + dom.toggleClass(data.stackFrame, 'disabled', !stackFrame.source.available || stackFrame.source.presentationHint === 'deemphasize'); + dom.toggleClass(data.stackFrame, 'label', stackFrame.presentationHint === 'label'); + dom.toggleClass(data.stackFrame, 'subtle', stackFrame.presentationHint === 'subtle'); + + data.file.title = stackFrame.source.raw.path || stackFrame.source.name; + if (stackFrame.source.raw.origin) { + data.file.title += `\n${stackFrame.source.raw.origin}`; + } + data.label.textContent = stackFrame.name; + data.label.title = stackFrame.name; + data.fileName.textContent = getSourceName(stackFrame.source, this.contextService, this.environmentService); + if (stackFrame.range.startLineNumber !== undefined) { + data.lineNumber.textContent = `${stackFrame.range.startLineNumber}`; + if (stackFrame.range.startColumn) { + data.lineNumber.textContent += `:${stackFrame.range.startColumn}`; + } + dom.removeClass(data.lineNumber, 'unavailable'); + } else { + dom.addClass(data.lineNumber, 'unavailable'); + } + } + + public disposeTemplate(tree: ITree, templateId: string, templateData: any): void { + // noop + } +} + +class CallstackAccessibilityProvider implements IAccessibilityProvider { + + constructor( @IWorkspaceContextService private contextService: IWorkspaceContextService) { + // noop + } + + public getAriaLabel(tree: ITree, element: any): string { + if (element instanceof Thread) { + return nls.localize('threadAriaLabel', "Thread {0}, callstack, debug", (element).name); + } + if (element instanceof StackFrame) { + return nls.localize('stackFrameAriaLabel', "Stack Frame {0} line {1} {2}, callstack, debug", (element).name, (element).range.startLineNumber, getSourceName((element).source, this.contextService)); + } + + return null; + } +} + +function getSourceName(source: Source, contextService: IWorkspaceContextService, environmentService?: IEnvironmentService): string { + if (source.name) { + return source.name; + } + + return basenameOrAuthority(source.uri); +} diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index 1b2783ced7b..b393541ca3f 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -16,7 +16,10 @@ import { IWorkbenchActionRegistry, Extensions as WorkbenchActionRegistryExtensio import { ToggleViewletAction, Extensions as ViewletExtensions, ViewletRegistry, ViewletDescriptor } from 'vs/workbench/browser/viewlet'; import { TogglePanelAction, Extensions as PanelExtensions, PanelRegistry, PanelDescriptor } from 'vs/workbench/browser/panel'; import { StatusbarItemDescriptor, StatusbarAlignment, IStatusbarRegistry, Extensions as StatusExtensions } from 'vs/workbench/browser/parts/statusbar/statusbar'; -import { VariablesView, WatchExpressionsView, CallStackView, BreakpointsView } from 'vs/workbench/parts/debug/electron-browser/debugViews'; +import { VariablesView } from 'vs/workbench/parts/debug/electron-browser/variablesView'; +import { BreakpointsView } from 'vs/workbench/parts/debug/electron-browser/breakpointsView'; +import { WatchExpressionsView } from 'vs/workbench/parts/debug/electron-browser/watchExpressionsView'; +import { CallStackView } from 'vs/workbench/parts/debug/electron-browser/callStackView'; import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; import { IDebugService, VIEWLET_ID, REPL_ID, CONTEXT_NOT_IN_DEBUG_MODE, CONTEXT_IN_DEBUG_MODE, INTERNAL_CONSOLE_OPTIONS_SCHEMA, @@ -190,6 +193,7 @@ configurationRegistry.registerConfiguration({ }, 'debug.showInStatusBar': { enum: ['never', 'always', 'onFirstSessionStart'], + enumDescriptions: [nls.localize('never', "Never show debug in status bar"), nls.localize('always', "Always show debug in status bar"), nls.localize('onFirstSessionStart', "Show debug in status bar only after debug was started for the first time")], description: nls.localize({ comment: ['This is the description for a setting'], key: 'showInStatusBar' }, "Controls when the debug status bar should be visible"), default: 'onFirstSessionStart' }, diff --git a/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts b/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts index d243033621b..689ba933e35 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts @@ -44,7 +44,7 @@ export function registerCommands(): void { handler: (accessor) => { const listService = accessor.get(IListService); const debugService = accessor.get(IDebugService); - const focused = listService.getFocused(); + const focused = listService.lastFocusedList; // Tree only if (!(focused instanceof List)) { @@ -64,7 +64,7 @@ export function registerCommands(): void { handler: (accessor) => { const listService = accessor.get(IListService); const debugService = accessor.get(IDebugService); - const focused = listService.getFocused(); + const focused = listService.lastFocusedList; // Tree only if (!(focused instanceof List)) { @@ -85,7 +85,7 @@ export function registerCommands(): void { handler: (accessor) => { const listService = accessor.get(IListService); const debugService = accessor.get(IDebugService); - const focused = listService.getFocused(); + const focused = listService.lastFocusedList; // Tree only if (!(focused instanceof List)) { @@ -106,7 +106,7 @@ export function registerCommands(): void { handler: (accessor) => { const listService = accessor.get(IListService); const debugService = accessor.get(IDebugService); - const focused = listService.getFocused(); + const focused = listService.lastFocusedList; // Tree only if (!(focused instanceof List)) { @@ -127,7 +127,7 @@ export function registerCommands(): void { handler: (accessor) => { const listService = accessor.get(IListService); const debugService = accessor.get(IDebugService); - const focused = listService.getFocused(); + const focused = listService.lastFocusedList; // Tree only if (!(focused instanceof List)) { diff --git a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts index d259464ea8d..452bd2314cb 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts @@ -223,7 +223,8 @@ export class ConfigurationManager implements IConfigurationManager { @IInstantiationService private instantiationService: IInstantiationService, @ICommandService private commandService: ICommandService, @IStorageService private storageService: IStorageService, - @ILifecycleService lifecycleService: ILifecycleService + @ILifecycleService lifecycleService: ILifecycleService, + @IExtensionService private extensionService: IExtensionService ) { this.providers = []; this.adapters = []; @@ -292,7 +293,7 @@ export class ConfigurationManager implements IConfigurationManager { if (duplicate) { duplicate.merge(rawAdapter, extension.description); } else { - this.adapters.push(this.instantiationService.createInstance(Adapter, rawAdapter, extension.description)); + this.adapters.push(new Adapter(rawAdapter, extension.description, this.configurationService, this.commandService)); } }); }); @@ -379,7 +380,7 @@ export class ConfigurationManager implements IConfigurationManager { public canSetBreakpointsIn(model: IModel): boolean { const modeId = model ? model.getLanguageIdentifier().language : null; - if (!modeId || modeId === 'json') { + if (!modeId || modeId === 'jsonc') { // do not allow breakpoints in our settings files return false; } @@ -395,34 +396,36 @@ export class ConfigurationManager implements IConfigurationManager { } public guessAdapter(type?: string): TPromise { - if (type) { - const adapter = this.getAdapter(type); - return TPromise.as(adapter); - } + return this.extensionService.activateByEvent('onDebugInitialConfigurations').then(() => this.extensionService.activateByEvent('onDebug').then(() => { + if (type) { + const adapter = this.getAdapter(type); + return TPromise.as(adapter); + } - const editor = this.editorService.getActiveEditor(); - if (editor) { - const codeEditor = editor.getControl(); - if (isCodeEditor(codeEditor)) { - const model = codeEditor.getModel(); - const language = model ? model.getLanguageIdentifier().language : undefined; - const adapters = this.adapters.filter(a => a.languages && a.languages.indexOf(language) >= 0); - if (adapters.length === 1) { - return TPromise.as(adapters[0]); + const editor = this.editorService.getActiveEditor(); + if (editor) { + const codeEditor = editor.getControl(); + if (isCodeEditor(codeEditor)) { + const model = codeEditor.getModel(); + const language = model ? model.getLanguageIdentifier().language : undefined; + const adapters = this.adapters.filter(a => a.languages && a.languages.indexOf(language) >= 0); + if (adapters.length === 1) { + return TPromise.as(adapters[0]); + } } } - } - return this.quickOpenService.pick([...this.adapters.filter(a => a.hasInitialConfiguration() || a.hasConfigurationProvider), { label: 'More...', separator: { border: true } }], { placeHolder: nls.localize('selectDebug', "Select Environment") }) - .then(picked => { - if (picked instanceof Adapter) { - return picked; - } - if (picked) { - this.commandService.executeCommand('debug.installAdditionalDebuggers'); - } - return undefined; - }); + return this.quickOpenService.pick([...this.adapters.filter(a => a.hasInitialConfiguration() || a.hasConfigurationProvider), { label: 'More...', separator: { border: true } }], { placeHolder: nls.localize('selectDebug', "Select Environment") }) + .then(picked => { + if (picked instanceof Adapter) { + return picked; + } + if (picked) { + this.commandService.executeCommand('debug.installAdditionalDebuggers'); + } + return undefined; + }); + })); } private store(): void { @@ -445,8 +448,7 @@ class Launch implements ILaunch { @IFileService private fileService: IFileService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IConfigurationService private configurationService: IConfigurationService, - @IConfigurationResolverService private configurationResolverService: IConfigurationResolverService, - @IExtensionService private extensionService: IExtensionService + @IConfigurationResolverService private configurationResolverService: IConfigurationResolverService ) { // noop } @@ -514,59 +516,57 @@ class Launch implements ILaunch { } public openConfigFile(sideBySide: boolean, type?: string): TPromise { - return this.extensionService.activateByEvent('onDebug').then(() => { - const resource = this.uri; - let configFileCreated = false; + const resource = this.uri; + let configFileCreated = false; - return this.fileService.resolveContent(resource).then(content => content, err => { + return this.fileService.resolveContent(resource).then(content => content, err => { - // launch.json not found: create one by collecting launch configs from debugConfigProviders + // launch.json not found: create one by collecting launch configs from debugConfigProviders - return this.configurationManager.guessAdapter(type).then(adapter => { - if (adapter) { - return this.configurationManager.provideDebugConfigurations(this.workspace.uri, adapter.type).then(initialConfigs => { - return adapter.getInitialConfigurationContent(initialConfigs); - }); - } else { - return undefined; - } - }).then(content => { - - if (!content) { - return undefined; - } - - configFileCreated = true; - return this.fileService.updateContent(resource, content).then(() => { - // convert string into IContent; see #32135 - return { value: content }; + return this.configurationManager.guessAdapter(type).then(adapter => { + if (adapter) { + return this.configurationManager.provideDebugConfigurations(this.workspace.uri, adapter.type).then(initialConfigs => { + return adapter.getInitialConfigurationContent(initialConfigs); }); - }); + } else { + return undefined; + } }).then(content => { + if (!content) { return undefined; } - const index = content.value.indexOf(`"${this.configurationManager.selectedName}"`); - let startLineNumber = 1; - for (let i = 0; i < index; i++) { - if (content.value.charAt(i) === '\n') { - startLineNumber++; - } - } - const selection = startLineNumber > 1 ? { startLineNumber, startColumn: 4 } : undefined; - return this.editorService.openEditor({ - resource: resource, - options: { - forceOpen: true, - selection, - pinned: configFileCreated, // pin only if config file is created #8727 - revealIfVisible: true - }, - }, sideBySide); - }, (error) => { - throw new Error(nls.localize('DebugConfig.failed', "Unable to create 'launch.json' file inside the '.vscode' folder ({0}).", error)); + configFileCreated = true; + return this.fileService.updateContent(resource, content).then(() => { + // convert string into IContent; see #32135 + return { value: content }; + }); }); + }).then(content => { + if (!content) { + return undefined; + } + const index = content.value.indexOf(`"${this.configurationManager.selectedName}"`); + let startLineNumber = 1; + for (let i = 0; i < index; i++) { + if (content.value.charAt(i) === '\n') { + startLineNumber++; + } + } + const selection = startLineNumber > 1 ? { startLineNumber, startColumn: 4 } : undefined; + + return this.editorService.openEditor({ + resource: resource, + options: { + forceOpen: true, + selection, + pinned: configFileCreated, // pin only if config file is created #8727 + revealIfVisible: true + }, + }, sideBySide); + }, (error) => { + throw new Error(nls.localize('DebugConfig.failed', "Unable to create 'launch.json' file inside the '.vscode' folder ({0}).", error)); }); } } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index 55f8bd7fe50..f12f16ae613 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -34,12 +34,13 @@ import { IDebugEditorContribution, IDebugService, State, IBreakpoint, EDITOR_CON import { BreakpointWidget } from 'vs/workbench/parts/debug/browser/breakpointWidget'; import { ExceptionWidget } from 'vs/workbench/parts/debug/browser/exceptionWidget'; import { FloatingClickWidget } from 'vs/workbench/parts/preferences/browser/preferencesWidgets'; -import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; import { CoreEditingCommands } from 'vs/editor/browser/controller/coreCommands'; import { first } from 'vs/base/common/arrays'; import { IMarginData } from 'vs/editor/browser/controller/mouseTarget'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { IListService } from 'vs/platform/list/browser/listService'; const HOVER_DELAY = 300; const LAUNCH_JSON_REGEX = /launch\.json$/; @@ -78,10 +79,11 @@ export class DebugEditorContribution implements IDebugEditorContribution { @ITelemetryService private telemetryService: ITelemetryService, @IListService listService: IListService, @IConfigurationService private configurationService: IConfigurationService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IKeybindingService private keybindingService: IKeybindingService ) { this.breakpointHintDecoration = []; - this.hoverWidget = new DebugHoverWidget(this.editor, this.debugService, listService, this.instantiationService, themeService); + this.hoverWidget = new DebugHoverWidget(this.editor, this.debugService, this.instantiationService, themeService, contextKeyService, listService); this.toDispose = []; this.showHoverScheduler = new RunOnceScheduler(() => this.showHover(this.hoverRange, false), HOVER_DELAY); this.hideHoverScheduler = new RunOnceScheduler(() => this.hoverWidget.hide(), HOVER_DELAY); @@ -96,12 +98,12 @@ export class DebugEditorContribution implements IDebugEditorContribution { private getContextMenuActions(breakpoints: IBreakpoint[], uri: uri, lineNumber: number): TPromise<(IAction | ContextSubMenu)[]> { const actions: (IAction | ContextSubMenu)[] = []; if (breakpoints.length === 1) { - actions.push(this.instantiationService.createInstance(RemoveBreakpointAction, RemoveBreakpointAction.ID, RemoveBreakpointAction.LABEL)); - actions.push(this.instantiationService.createInstance(EditConditionalBreakpointAction, EditConditionalBreakpointAction.ID, EditConditionalBreakpointAction.LABEL, this.editor)); + actions.push(new RemoveBreakpointAction(RemoveBreakpointAction.ID, RemoveBreakpointAction.LABEL, this.debugService, this.keybindingService)); + actions.push(new EditConditionalBreakpointAction(EditConditionalBreakpointAction.ID, EditConditionalBreakpointAction.LABEL, this.editor, this.debugService, this.keybindingService)); if (breakpoints[0].enabled) { - actions.push(this.instantiationService.createInstance(DisableBreakpointAction, DisableBreakpointAction.ID, DisableBreakpointAction.LABEL)); + actions.push(new DisableBreakpointAction(DisableBreakpointAction.ID, DisableBreakpointAction.LABEL, this.debugService, this.keybindingService)); } else { - actions.push(this.instantiationService.createInstance(EnableBreakpointAction, EnableBreakpointAction.ID, EnableBreakpointAction.LABEL)); + actions.push(new EnableBreakpointAction(EnableBreakpointAction.ID, EnableBreakpointAction.LABEL, this.debugService, this.keybindingService)); } } else if (breakpoints.length > 1) { const sorted = breakpoints.sort((first, second) => first.column - second.column); @@ -138,7 +140,7 @@ export class DebugEditorContribution implements IDebugEditorContribution { true, () => this.debugService.addBreakpoints(uri, [{ lineNumber }]) )); - actions.push(this.instantiationService.createInstance(AddConditionalBreakpointAction, AddConditionalBreakpointAction.ID, AddConditionalBreakpointAction.LABEL, this.editor, lineNumber)); + actions.push(new AddConditionalBreakpointAction(AddConditionalBreakpointAction.ID, AddConditionalBreakpointAction.LABEL, this.editor, lineNumber, this.debugService, this.keybindingService)); } return TPromise.as(actions); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index ef996593519..072347dc3b7 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -10,7 +10,6 @@ import { KeyCode } from 'vs/base/common/keyCodes'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import * as dom from 'vs/base/browser/dom'; import { ITree } from 'vs/base/parts/tree/browser/tree'; -import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { DefaultController, ICancelableEvent, ClickBehavior } from 'vs/base/parts/tree/browser/treeDefaults'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; @@ -20,12 +19,14 @@ import { IContentWidget, ICodeEditor, IContentWidgetPosition, ContentWidgetPosit import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IDebugService, IExpression, IExpressionContainer } from 'vs/workbench/parts/debug/common/debug'; import { Expression } from 'vs/workbench/parts/debug/common/debugModel'; -import { VariablesRenderer, renderExpressionValue, VariablesDataSource } from 'vs/workbench/parts/debug/electron-browser/debugViewer'; -import { IListService } from 'vs/platform/list/browser/listService'; +import { renderExpressionValue } from 'vs/workbench/parts/debug/electron-browser/baseDebugView'; +import { VariablesDataSource, VariablesRenderer } from 'vs/workbench/parts/debug/electron-browser/variablesView'; import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; -import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; +import { attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; const $ = dom.$; const MAX_ELEMENTS_SHOWN = 18; @@ -38,7 +39,7 @@ export class DebugHoverWidget implements IContentWidget { private _isVisible: boolean; private domNode: HTMLElement; - private tree: ITree; + private tree: WorkbenchTree; private showAtPosition: Position; private highlightDecorations: string[]; private complexValueContainer: HTMLElement; @@ -52,9 +53,10 @@ export class DebugHoverWidget implements IContentWidget { constructor( private editor: ICodeEditor, private debugService: IDebugService, - private listService: IListService, private instantiationService: IInstantiationService, - private themeService: IThemeService + private themeService: IThemeService, + private contextKeyService: IContextKeyService, + private listService: IListService ) { this.toDispose = []; @@ -69,7 +71,7 @@ export class DebugHoverWidget implements IContentWidget { this.complexValueTitle = dom.append(this.complexValueContainer, $('.title')); this.treeContainer = dom.append(this.complexValueContainer, $('.debug-hover-tree')); this.treeContainer.setAttribute('role', 'tree'); - this.tree = new Tree(this.treeContainer, { + this.tree = new WorkbenchTree(this.treeContainer, { dataSource: new VariablesDataSource(), renderer: this.instantiationService.createInstance(VariablesHoverRenderer), controller: new DebugHoverController(this.editor) @@ -78,7 +80,7 @@ export class DebugHoverWidget implements IContentWidget { twistiePixels: 15, ariaLabel: nls.localize('treeAriaLabel', "Debug Hover"), keyboardSupport: false - }); + }, this.contextKeyService, this.listService, this.themeService); this.valueContainer = $('.value'); this.valueContainer.tabIndex = 0; @@ -89,8 +91,6 @@ export class DebugHoverWidget implements IContentWidget { this.editor.applyFontInfo(this.domNode); - this.toDispose.push(attachListStyler(this.tree, this.themeService)); - this.toDispose.push(this.listService.register(this.tree)); this.toDispose.push(attachStylerCallback(this.themeService, { editorHoverBackground, editorHoverBorder }, colors => { this.domNode.style.backgroundColor = colors.editorHoverBackground; if (colors.editorHoverBorder) { diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 52b53e0ee77..59f9d612c4d 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -595,7 +595,8 @@ export class DebugService implements debug.IDebugService { } public addFunctionBreakpoint(): void { - this.model.addFunctionBreakpoint(''); + const newFunctionBreakpoint = this.model.addFunctionBreakpoint(''); + this.viewModel.setSelectedFunctionBreakpoint(newFunctionBreakpoint); } public renameFunctionBreakpoint(id: string, newFunctionName: string): TPromise { @@ -609,10 +610,6 @@ export class DebugService implements debug.IDebugService { } public addReplExpression(name: string): TPromise { - /* __GDPR__ - "debugService/addReplExpression" : {} - */ - this.telemetryService.publicLog('debugService/addReplExpression'); return this.model.addReplExpression(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame, name) // Evaluate all watch expressions and fetch variables again since repl evaluation might have changed some. .then(() => this.focusStackFrameAndEvaluate(this.viewModel.focusedStackFrame, this.viewModel.focusedProcess)); @@ -659,6 +656,7 @@ export class DebugService implements debug.IDebugService { if (this.model.getProcesses().length === 0) { this.removeReplExpressions(); this.allProcesses.clear(); + this.model.getBreakpoints().forEach(bp => bp.verified = false); } this.launchJsonChanged = false; const manager = this.getConfigurationManager(); @@ -688,7 +686,9 @@ export class DebugService implements debug.IDebugService { return TPromise.join(compound.configurations.map(name => name !== compound.name ? this.startDebugging(root, name, noDebug, topCompoundName || compound.name) : TPromise.as(null))); } if (configOrName && !config) { - return TPromise.wrapError(new Error(nls.localize('configMissing', "Configuration '{0}' is missing in 'launch.json'.", configOrName))); + const message = !!launch ? nls.localize('configMissing', "Configuration '{0}' is missing in 'launch.json'.", configOrName) : + nls.localize('launchJsonDoesNotExist', "'launch.json' does not exist."); + return TPromise.wrapError(new Error(message)); } // We keep the debug type in a separate variable 'type' so that a no-folder config has no attributes. @@ -713,21 +713,22 @@ export class DebugService implements debug.IDebugService { }; return (type ? TPromise.as(null) : this.configurationManager.guessAdapter().then(a => type = a && a.type)).then(() => - this.configurationManager.resolveConfigurationByProviders(launch ? launch.workspace.uri : undefined, type, config).then(config => { - // a falsy config indicates an aborted launch - if (config && config.type) { - return this.createProcess(root, config, sessionId); - } - if (launch) { - return launch.openConfigFile(false, type).then(editor => undefined); - } + (type ? this.extensionService.activateByEvent(`onDebugResolve:${type}`) : TPromise.as(null)).then(() => + this.configurationManager.resolveConfigurationByProviders(launch ? launch.workspace.uri : undefined, type, config).then(config => { + // a falsy config indicates an aborted launch + if (config && config.type) { + return this.createProcess(root, config, sessionId); + } + if (launch) { + return launch.openConfigFile(false, type).then(editor => undefined); + } - return undefined; - }) - ).then(() => wrapUpState(), err => { - wrapUpState(); - return TPromise.wrapError(err); - }); + return undefined; + }) + ).then(() => wrapUpState(), err => { + wrapUpState(); + return TPromise.wrapError(err); + })); }) ))); } @@ -1011,43 +1012,45 @@ export class DebugService implements debug.IDebugService { } public restartProcess(process: debug.IProcess, restartData?: any): TPromise { - if (process.session.capabilities.supportsRestartRequest) { - return this.textFileService.saveAll().then(() => process.session.custom('restart', null)); - } - const focusedProcess = this.viewModel.focusedProcess; - const preserveFocus = focusedProcess && process.getId() === focusedProcess.getId(); - - return process.session.disconnect(true).then(() => { - if (strings.equalsIgnoreCase(process.configuration.type, 'extensionHost')) { - return this.broadcastService.broadcast({ - channel: EXTENSION_RELOAD_BROADCAST_CHANNEL, - payload: [process.session.root.uri.fsPath] - }); + return this.textFileService.saveAll().then(() => { + if (process.session.capabilities.supportsRestartRequest) { + return process.session.custom('restart', null); } + const focusedProcess = this.viewModel.focusedProcess; + const preserveFocus = focusedProcess && process.getId() === focusedProcess.getId(); - return new TPromise((c, e) => { - setTimeout(() => { - // Read the configuration again if a launch.json has been changed, if not just use the inmemory configuration - let config = process.configuration; - if (this.launchJsonChanged && this.configurationManager.selectedLaunch) { - this.launchJsonChanged = false; - config = this.configurationManager.selectedLaunch.getConfiguration(process.configuration.name) || config; - // Take the type from the process since the debug extension might overwrite it #21316 - config.type = process.configuration.type; - config.noDebug = process.configuration.noDebug; - } - config.__restart = restartData; - this.createProcess(process.session.root, config, process.getId()).then(() => c(null), err => e(err)); - }, 300); - }); - }).then(() => { - if (preserveFocus) { - // Restart should preserve the focused process - const restartedProcess = this.model.getProcesses().filter(p => p.configuration.name === process.configuration.name).pop(); - if (restartedProcess && restartedProcess !== this.viewModel.focusedProcess) { - this.focusStackFrameAndEvaluate(null, restartedProcess); + return process.session.disconnect(true).then(() => { + if (strings.equalsIgnoreCase(process.configuration.type, 'extensionHost')) { + return this.broadcastService.broadcast({ + channel: EXTENSION_RELOAD_BROADCAST_CHANNEL, + payload: [process.session.root.uri.fsPath] + }); } - } + + return new TPromise((c, e) => { + setTimeout(() => { + // Read the configuration again if a launch.json has been changed, if not just use the inmemory configuration + let config = process.configuration; + if (this.launchJsonChanged && this.configurationManager.selectedLaunch) { + this.launchJsonChanged = false; + config = this.configurationManager.selectedLaunch.getConfiguration(process.configuration.name) || config; + // Take the type from the process since the debug extension might overwrite it #21316 + config.type = process.configuration.type; + config.noDebug = process.configuration.noDebug; + } + config.__restart = restartData; + this.createProcess(process.session.root, config, process.getId()).then(() => c(null), err => e(err)); + }, 300); + }); + }).then(() => { + if (preserveFocus) { + // Restart should preserve the focused process + const restartedProcess = this.model.getProcesses().filter(p => p.configuration.name === process.configuration.name).pop(); + if (restartedProcess && restartedProcess !== this.viewModel.focusedProcess) { + this.focusStackFrameAndEvaluate(null, restartedProcess); + } + } + }); }); } @@ -1238,8 +1241,11 @@ export class DebugService implements debug.IDebugService { } private onFileChanges(fileChangesEvent: FileChangesEvent): void { - this.model.removeBreakpoints(this.model.getBreakpoints().filter(bp => - fileChangesEvent.contains(bp.uri, FileChangeType.DELETED))); + const toRemove = this.model.getBreakpoints().filter(bp => + fileChangesEvent.contains(bp.uri, FileChangeType.DELETED)); + if (toRemove.length) { + this.model.removeBreakpoints(toRemove); + } fileChangesEvent.getUpdated().forEach(event => { if (this.breakpointsToSendOnResourceSaved.has(event.resource.toString())) { diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts deleted file mode 100644 index 4f7156c1cbc..00000000000 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ /dev/null @@ -1,1323 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as nls from 'vs/nls'; -import { TPromise } from 'vs/base/common/winjs.base'; -import * as lifecycle from 'vs/base/common/lifecycle'; -import { KeyCode } from 'vs/base/common/keyCodes'; -import * as paths from 'vs/base/common/paths'; -import * as resources from 'vs/base/common/resources'; -import * as errors from 'vs/base/common/errors'; -import { equalsIgnoreCase } from 'vs/base/common/strings'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import * as dom from 'vs/base/browser/dom'; -import { IMouseEvent, DragMouseEvent } from 'vs/base/browser/mouseEvent'; -import { getPathLabel } from 'vs/base/common/labels'; -import { IAction } from 'vs/base/common/actions'; -import { IActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; -import { ITree, IAccessibilityProvider, ContextMenuEvent, IDataSource, IRenderer, DRAG_OVER_REJECT, IDragAndDropData, IDragOverReaction, IActionProvider } from 'vs/base/parts/tree/browser/tree'; -import { InputBox, IInputValidationOptions } from 'vs/base/browser/ui/inputbox/inputBox'; -import { DefaultController, DefaultDragAndDrop, ClickBehavior } from 'vs/base/parts/tree/browser/treeDefaults'; -import { Constants } from 'vs/editor/common/core/uint'; -import { IContextViewService, IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; -import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { IMenuService, IMenu, MenuId } from 'vs/platform/actions/common/actions'; -import { fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import * as debug from 'vs/workbench/parts/debug/common/debug'; -import { Expression, Variable, FunctionBreakpoint, StackFrame, Thread, Process, Breakpoint, ExceptionBreakpoint, Model, Scope, ThreadAndProcessIds } from 'vs/workbench/parts/debug/common/debugModel'; -import { ViewModel } from 'vs/workbench/parts/debug/common/debugViewModel'; -import { ContinueAction, StepOverAction, PauseAction, ReapplyBreakpointsAction, DisableAllBreakpointsAction, RemoveBreakpointAction, RemoveWatchExpressionAction, AddWatchExpressionAction, EditWatchExpressionAction, RemoveAllBreakpointsAction, EnableAllBreakpointsAction, StepOutAction, StepIntoAction, SetValueAction, RemoveAllWatchExpressionsAction, RestartFrameAction, AddToWatchExpressionsAction, StopAction, RestartAction } from 'vs/workbench/parts/debug/browser/debugActions'; -import { CopyValueAction, CopyStackTraceAction } from 'vs/workbench/parts/debug/electron-browser/electronDebugActions'; -import { Source } from 'vs/workbench/parts/debug/common/debugSource'; -import { once } from 'vs/base/common/functional'; -import { attachInputBoxStyler } from 'vs/platform/theme/common/styler'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; - -const $ = dom.$; -const booleanRegex = /^true|false$/i; -const stringRegex = /^(['"]).*\1$/; -const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024; - -export interface IRenderValueOptions { - preserveWhitespace?: boolean; - showChanged?: boolean; - maxValueLength?: number; - showHover?: boolean; - colorize?: boolean; -} - -function replaceWhitespace(value: string): string { - const map: { [x: string]: string } = { '\n': '\\n', '\r': '\\r', '\t': '\\t' }; - return value.replace(/[\n\r\t]/g, char => map[char]); -} - -export function renderExpressionValue(expressionOrValue: debug.IExpression | string, container: HTMLElement, options: IRenderValueOptions): void { - let value = typeof expressionOrValue === 'string' ? expressionOrValue : expressionOrValue.value; - - // remove stale classes - container.className = 'value'; - // when resolving expressions we represent errors from the server as a variable with name === null. - if (value === null || ((expressionOrValue instanceof Expression || expressionOrValue instanceof Variable) && !expressionOrValue.available)) { - dom.addClass(container, 'unavailable'); - if (value !== Expression.DEFAULT_VALUE) { - dom.addClass(container, 'error'); - } - } - - if (options.colorize && typeof expressionOrValue !== 'string') { - if (expressionOrValue.type === 'number' || expressionOrValue.type === 'boolean' || expressionOrValue.type === 'string') { - dom.addClass(container, expressionOrValue.type); - } else if (!isNaN(+value)) { - dom.addClass(container, 'number'); - } else if (booleanRegex.test(value)) { - dom.addClass(container, 'boolean'); - } else if (stringRegex.test(value)) { - dom.addClass(container, 'string'); - } - } - - if (options.showChanged && (expressionOrValue).valueChanged && value !== Expression.DEFAULT_VALUE) { - // value changed color has priority over other colors. - container.className = 'value changed'; - } - - if (options.maxValueLength && value.length > options.maxValueLength) { - value = value.substr(0, options.maxValueLength) + '...'; - } - if (value && !options.preserveWhitespace) { - container.textContent = replaceWhitespace(value); - } else { - container.textContent = value; - } - if (options.showHover) { - container.title = value; - } -} - -export function renderVariable(tree: ITree, variable: Variable, data: IVariableTemplateData, showChanged: boolean): void { - if (variable.available) { - data.name.textContent = replaceWhitespace(variable.name); - data.name.title = variable.type ? variable.type : variable.name; - } - - if (variable.value) { - data.name.textContent += variable.name ? ':' : ''; - renderExpressionValue(variable, data.value, { - showChanged, - maxValueLength: MAX_VALUE_RENDER_LENGTH_IN_VIEWLET, - preserveWhitespace: false, - showHover: true, - colorize: true - }); - } else { - data.value.textContent = ''; - data.value.title = ''; - } -} - -interface IRenameBoxOptions { - initialValue: string; - ariaLabel: string; - placeholder?: string; - validationOptions?: IInputValidationOptions; -} - -function renderRenameBox(debugService: debug.IDebugService, contextViewService: IContextViewService, themeService: IThemeService, tree: ITree, element: any, container: HTMLElement, options: IRenameBoxOptions): void { - let inputBoxContainer = dom.append(container, $('.inputBoxContainer')); - let inputBox = new InputBox(inputBoxContainer, contextViewService, { - validationOptions: options.validationOptions, - placeholder: options.placeholder, - ariaLabel: options.ariaLabel - }); - const styler = attachInputBoxStyler(inputBox, themeService); - - tree.setHighlight(); - inputBox.value = options.initialValue ? options.initialValue : ''; - inputBox.focus(); - inputBox.select(); - - let disposed = false; - const toDispose: lifecycle.IDisposable[] = [inputBox, styler]; - - const wrapUp = once((renamed: boolean) => { - if (!disposed) { - disposed = true; - if (element instanceof Expression && renamed && inputBox.value) { - debugService.renameWatchExpression(element.getId(), inputBox.value).done(null, errors.onUnexpectedError); - } else if (element instanceof Expression && !element.name) { - debugService.removeWatchExpressions(element.getId()); - } else if (element instanceof FunctionBreakpoint && inputBox.value) { - debugService.renameFunctionBreakpoint(element.getId(), renamed ? inputBox.value : element.name).done(null, errors.onUnexpectedError); - } else if (element instanceof FunctionBreakpoint && !element.name) { - debugService.removeFunctionBreakpoints(element.getId()).done(null, errors.onUnexpectedError); - } else if (element instanceof Variable) { - element.errorMessage = null; - if (renamed && element.value !== inputBox.value) { - element.setVariable(inputBox.value) - // if everything went fine we need to refresh ui elements since the variable update can change watch and variables view - .done(() => { - tree.refresh(element, false); - debugService.evaluateWatchExpressions(); - }, errors.onUnexpectedError); - } - } - - tree.clearHighlight(); - tree.DOMFocus(); - tree.setFocus(element); - - // need to remove the input box since this template will be reused. - container.removeChild(inputBoxContainer); - lifecycle.dispose(toDispose); - } - }); - - toDispose.push(dom.addStandardDisposableListener(inputBox.inputElement, 'keydown', (e: IKeyboardEvent) => { - const isEscape = e.equals(KeyCode.Escape); - const isEnter = e.equals(KeyCode.Enter); - if (isEscape || isEnter) { - e.preventDefault(); - e.stopPropagation(); - wrapUp(isEnter); - } - })); - toDispose.push(dom.addDisposableListener(inputBox.inputElement, 'blur', () => { - wrapUp(true); - })); -} - -function getSourceName(source: Source, contextService: IWorkspaceContextService, environmentService?: IEnvironmentService): string { - if (source.name) { - return source.name; - } - - return resources.basenameOrAuthority(source.uri); -} - -export class BaseDebugController extends DefaultController { - - private contributedContextMenu: IMenu; - - constructor( - private actionProvider: IActionProvider, - menuId: MenuId, - @debug.IDebugService protected debugService: debug.IDebugService, - @IWorkbenchEditorService protected editorService: IWorkbenchEditorService, - @IContextMenuService private contextMenuService: IContextMenuService, - @IContextKeyService contextKeyService: IContextKeyService, - @IMenuService menuService: IMenuService - ) { - super({ clickBehavior: ClickBehavior.ON_MOUSE_UP, keyboardSupport: false }); - - this.contributedContextMenu = menuService.createMenu(menuId, contextKeyService); - } - - public onContextMenu(tree: ITree, element: debug.IEnablement, event: ContextMenuEvent, focusElement = true): boolean { - if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'input') { - return false; - } - - event.preventDefault(); - event.stopPropagation(); - - if (focusElement) { - tree.setFocus(element); - } - - if (this.actionProvider.hasSecondaryActions(tree, element)) { - const anchor = { x: event.posx, y: event.posy }; - this.contextMenuService.showContextMenu({ - getAnchor: () => anchor, - getActions: () => this.actionProvider.getSecondaryActions(tree, element).then(actions => { - fillInActions(this.contributedContextMenu, { arg: this.getContext(element) }, actions); - return actions; - }), - onHide: (wasCancelled?: boolean) => { - if (wasCancelled) { - tree.DOMFocus(); - } - }, - getActionsContext: () => element - }); - - return true; - } - - return false; - } - - protected getContext(element: any): any { - return undefined; - } -} - -// call stack - -export class CallStackController extends BaseDebugController { - - protected onLeftClick(tree: ITree, element: any, event: IMouseEvent): boolean { - if (element instanceof ThreadAndProcessIds) { - return this.showMoreStackFrames(tree, element); - } - if (element instanceof StackFrame) { - super.onLeftClick(tree, element, event); - this.focusStackFrame(element, event, event.detail !== 2); - return true; - } - - return super.onLeftClick(tree, element, event); - } - - protected getContext(element: any): any { - if (element instanceof StackFrame) { - if (element.source.inMemory) { - return element.source.raw.path || element.source.reference; - } - - return element.source.uri.toString(); - } - if (element instanceof Thread) { - return element.threadId; - } - } - - // user clicked / pressed on 'Load More Stack Frames', get those stack frames and refresh the tree. - public showMoreStackFrames(tree: ITree, threadAndProcessIds: ThreadAndProcessIds): boolean { - const process = this.debugService.getModel().getProcesses().filter(p => p.getId() === threadAndProcessIds.processId).pop(); - const thread = process && process.getThread(threadAndProcessIds.threadId); - if (thread) { - (thread).fetchCallStack() - .done(() => tree.refresh(), errors.onUnexpectedError); - } - - return true; - } - - public focusStackFrame(stackFrame: debug.IStackFrame, event: any, preserveFocus: boolean): void { - this.debugService.focusStackFrameAndEvaluate(stackFrame, undefined, true).then(() => { - const sideBySide = (event && (event.ctrlKey || event.metaKey)); - return stackFrame.openInEditor(this.editorService, preserveFocus, sideBySide); - }, errors.onUnexpectedError); - } -} - - -export class CallStackActionProvider implements IActionProvider { - - constructor( @IInstantiationService private instantiationService: IInstantiationService) { - // noop - } - - public hasActions(tree: ITree, element: any): boolean { - return false; - } - - public getActions(tree: ITree, element: any): TPromise { - return TPromise.as([]); - } - - public hasSecondaryActions(tree: ITree, element: any): boolean { - return element !== tree.getInput(); - } - - public getSecondaryActions(tree: ITree, element: any): TPromise { - const actions: IAction[] = []; - if (element instanceof Process) { - actions.push(this.instantiationService.createInstance(RestartAction, RestartAction.ID, RestartAction.LABEL)); - actions.push(this.instantiationService.createInstance(StopAction, StopAction.ID, StopAction.LABEL)); - } else if (element instanceof Thread) { - const thread = element; - if (thread.stopped) { - actions.push(this.instantiationService.createInstance(ContinueAction, ContinueAction.ID, ContinueAction.LABEL)); - actions.push(this.instantiationService.createInstance(StepOverAction, StepOverAction.ID, StepOverAction.LABEL)); - actions.push(this.instantiationService.createInstance(StepIntoAction, StepIntoAction.ID, StepIntoAction.LABEL)); - actions.push(this.instantiationService.createInstance(StepOutAction, StepOutAction.ID, StepOutAction.LABEL)); - } else { - actions.push(this.instantiationService.createInstance(PauseAction, PauseAction.ID, PauseAction.LABEL)); - } - } else if (element instanceof StackFrame) { - if (element.thread.process.session.capabilities.supportsRestartFrame) { - actions.push(this.instantiationService.createInstance(RestartFrameAction, RestartFrameAction.ID, RestartFrameAction.LABEL)); - } - actions.push(new CopyStackTraceAction(CopyStackTraceAction.ID, CopyStackTraceAction.LABEL)); - } - - return TPromise.as(actions); - } - - public getActionItem(tree: ITree, element: any, action: IAction): IActionItem { - return null; - } -} - -export class CallStackDataSource implements IDataSource { - - public getId(tree: ITree, element: any): string { - if (typeof element === 'string') { - return element; - } - - return element.getId(); - } - - public hasChildren(tree: ITree, element: any): boolean { - return element instanceof Model || element instanceof Process || (element instanceof Thread && (element).stopped); - } - - public getChildren(tree: ITree, element: any): TPromise { - if (element instanceof Thread) { - return this.getThreadChildren(element); - } - if (element instanceof Model) { - return TPromise.as(element.getProcesses()); - } - - const process = element; - return TPromise.as(process.getAllThreads()); - } - - private getThreadChildren(thread: Thread): TPromise { - let callStack: any[] = thread.getCallStack(); - let callStackPromise: TPromise = TPromise.as(null); - if (!callStack || !callStack.length) { - callStackPromise = thread.fetchCallStack().then(() => callStack = thread.getCallStack()); - } - - return callStackPromise.then(() => { - if (callStack.length === 1 && thread.process.session.capabilities.supportsDelayedStackTraceLoading) { - // To reduce flashing of the call stack view simply append the stale call stack - // once we have the correct data the tree will refresh and we will no longer display it. - callStack = callStack.concat(thread.getStaleCallStack().slice(1)); - } - - if (thread.stoppedDetails && thread.stoppedDetails.framesErrorMessage) { - callStack = callStack.concat([thread.stoppedDetails.framesErrorMessage]); - } - if (thread.stoppedDetails && thread.stoppedDetails.totalFrames > callStack.length && callStack.length > 1) { - callStack = callStack.concat([new ThreadAndProcessIds(thread.process.getId(), thread.threadId)]); - } - - return callStack; - }); - } - - public getParent(tree: ITree, element: any): TPromise { - return TPromise.as(null); - } -} - -interface IThreadTemplateData { - thread: HTMLElement; - name: HTMLElement; - state: HTMLElement; - stateLabel: HTMLSpanElement; -} - -interface IProcessTemplateData { - process: HTMLElement; - name: HTMLElement; - state: HTMLElement; - stateLabel: HTMLSpanElement; -} - -interface IErrorTemplateData { - label: HTMLElement; -} - -interface ILoadMoreTemplateData { - label: HTMLElement; -} - -interface IStackFrameTemplateData { - stackFrame: HTMLElement; - label: HTMLElement; - file: HTMLElement; - fileName: HTMLElement; - lineNumber: HTMLElement; -} - -export class CallStackRenderer implements IRenderer { - - private static readonly THREAD_TEMPLATE_ID = 'thread'; - private static readonly STACK_FRAME_TEMPLATE_ID = 'stackFrame'; - private static readonly ERROR_TEMPLATE_ID = 'error'; - private static readonly LOAD_MORE_TEMPLATE_ID = 'loadMore'; - private static readonly PROCESS_TEMPLATE_ID = 'process'; - - constructor( - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IEnvironmentService private environmentService: IEnvironmentService - ) { - // noop - } - - public getHeight(tree: ITree, element: any): number { - return 22; - } - - public getTemplateId(tree: ITree, element: any): string { - if (element instanceof Process) { - return CallStackRenderer.PROCESS_TEMPLATE_ID; - } - if (element instanceof Thread) { - return CallStackRenderer.THREAD_TEMPLATE_ID; - } - if (element instanceof StackFrame) { - return CallStackRenderer.STACK_FRAME_TEMPLATE_ID; - } - if (typeof element === 'string') { - return CallStackRenderer.ERROR_TEMPLATE_ID; - } - - return CallStackRenderer.LOAD_MORE_TEMPLATE_ID; - } - - public renderTemplate(tree: ITree, templateId: string, container: HTMLElement): any { - if (templateId === CallStackRenderer.PROCESS_TEMPLATE_ID) { - let data: IProcessTemplateData = Object.create(null); - data.process = dom.append(container, $('.process')); - data.name = dom.append(data.process, $('.name')); - data.state = dom.append(data.process, $('.state')); - data.stateLabel = dom.append(data.state, $('span.label')); - - return data; - } - - if (templateId === CallStackRenderer.LOAD_MORE_TEMPLATE_ID) { - let data: ILoadMoreTemplateData = Object.create(null); - data.label = dom.append(container, $('.load-more')); - - return data; - } - if (templateId === CallStackRenderer.ERROR_TEMPLATE_ID) { - let data: ILoadMoreTemplateData = Object.create(null); - data.label = dom.append(container, $('.error')); - - return data; - } - if (templateId === CallStackRenderer.THREAD_TEMPLATE_ID) { - let data: IThreadTemplateData = Object.create(null); - data.thread = dom.append(container, $('.thread')); - data.name = dom.append(data.thread, $('.name')); - data.state = dom.append(data.thread, $('.state')); - data.stateLabel = dom.append(data.state, $('span.label')); - - return data; - } - - let data: IStackFrameTemplateData = Object.create(null); - data.stackFrame = dom.append(container, $('.stack-frame')); - data.label = dom.append(data.stackFrame, $('span.label.expression')); - data.file = dom.append(data.stackFrame, $('.file')); - data.fileName = dom.append(data.file, $('span.file-name')); - const wrapper = dom.append(data.file, $('span.line-number-wrapper')); - data.lineNumber = dom.append(wrapper, $('span.line-number')); - - return data; - } - - public renderElement(tree: ITree, element: any, templateId: string, templateData: any): void { - if (templateId === CallStackRenderer.PROCESS_TEMPLATE_ID) { - this.renderProcess(element, templateData); - } else if (templateId === CallStackRenderer.THREAD_TEMPLATE_ID) { - this.renderThread(element, templateData); - } else if (templateId === CallStackRenderer.STACK_FRAME_TEMPLATE_ID) { - this.renderStackFrame(element, templateData); - } else if (templateId === CallStackRenderer.ERROR_TEMPLATE_ID) { - this.renderError(element, templateData); - } else if (templateId === CallStackRenderer.LOAD_MORE_TEMPLATE_ID) { - this.renderLoadMore(element, templateData); - } - } - - private renderProcess(process: debug.IProcess, data: IProcessTemplateData): void { - data.process.title = nls.localize({ key: 'process', comment: ['Process is a noun'] }, "Process"); - data.name.textContent = process.getName(this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE); - const stoppedThread = process.getAllThreads().filter(t => t.stopped).pop(); - - data.stateLabel.textContent = stoppedThread ? nls.localize('paused', "Paused") - : nls.localize({ key: 'running', comment: ['indicates state'] }, "Running"); - } - - private renderThread(thread: debug.IThread, data: IThreadTemplateData): void { - data.thread.title = nls.localize('thread', "Thread"); - data.name.textContent = thread.name; - - if (thread.stopped) { - data.stateLabel.textContent = thread.stoppedDetails.description || - thread.stoppedDetails.reason ? nls.localize({ key: 'pausedOn', comment: ['indicates reason for program being paused'] }, "Paused on {0}", thread.stoppedDetails.reason) : nls.localize('paused', "Paused"); - } else { - data.stateLabel.textContent = nls.localize({ key: 'running', comment: ['indicates state'] }, "Running"); - } - } - - private renderError(element: string, data: IErrorTemplateData) { - data.label.textContent = element; - data.label.title = element; - } - - private renderLoadMore(element: any, data: ILoadMoreTemplateData): void { - data.label.textContent = nls.localize('loadMoreStackFrames', "Load More Stack Frames"); - } - - private renderStackFrame(stackFrame: debug.IStackFrame, data: IStackFrameTemplateData): void { - dom.toggleClass(data.stackFrame, 'disabled', !stackFrame.source.available || stackFrame.source.presentationHint === 'deemphasize'); - dom.toggleClass(data.stackFrame, 'label', stackFrame.presentationHint === 'label'); - dom.toggleClass(data.stackFrame, 'subtle', stackFrame.presentationHint === 'subtle'); - - data.file.title = stackFrame.source.raw.path || stackFrame.source.name; - if (stackFrame.source.raw.origin) { - data.file.title += `\n${stackFrame.source.raw.origin}`; - } - data.label.textContent = stackFrame.name; - data.label.title = stackFrame.name; - data.fileName.textContent = getSourceName(stackFrame.source, this.contextService, this.environmentService); - if (stackFrame.range.startLineNumber !== undefined) { - data.lineNumber.textContent = `${stackFrame.range.startLineNumber}`; - if (stackFrame.range.startColumn) { - data.lineNumber.textContent += `:${stackFrame.range.startColumn}`; - } - dom.removeClass(data.lineNumber, 'unavailable'); - } else { - dom.addClass(data.lineNumber, 'unavailable'); - } - } - - public disposeTemplate(tree: ITree, templateId: string, templateData: any): void { - // noop - } -} - -export class CallstackAccessibilityProvider implements IAccessibilityProvider { - - constructor( @IWorkspaceContextService private contextService: IWorkspaceContextService) { - // noop - } - - public getAriaLabel(tree: ITree, element: any): string { - if (element instanceof Thread) { - return nls.localize('threadAriaLabel', "Thread {0}, callstack, debug", (element).name); - } - if (element instanceof StackFrame) { - return nls.localize('stackFrameAriaLabel', "Stack Frame {0} line {1} {2}, callstack, debug", (element).name, (element).range.startLineNumber, getSourceName((element).source, this.contextService)); - } - - return null; - } -} - -// variables - -export class VariablesActionProvider implements IActionProvider { - - constructor(private instantiationService: IInstantiationService) { - // noop - } - - public hasActions(tree: ITree, element: any): boolean { - return false; - } - - public getActions(tree: ITree, element: any): TPromise { - return TPromise.as([]); - } - - public hasSecondaryActions(tree: ITree, element: any): boolean { - // Only show context menu on "real" variables. Not on array chunk nodes. - return element instanceof Variable && !!element.value; - } - - public getSecondaryActions(tree: ITree, element: any): TPromise { - const actions: IAction[] = []; - const variable = element; - actions.push(this.instantiationService.createInstance(SetValueAction, SetValueAction.ID, SetValueAction.LABEL, variable)); - actions.push(this.instantiationService.createInstance(CopyValueAction, CopyValueAction.ID, CopyValueAction.LABEL, variable)); - actions.push(new Separator()); - actions.push(this.instantiationService.createInstance(AddToWatchExpressionsAction, AddToWatchExpressionsAction.ID, AddToWatchExpressionsAction.LABEL, variable)); - - return TPromise.as(actions); - } - - public getActionItem(tree: ITree, element: any, action: IAction): IActionItem { - return null; - } -} - -export class VariablesDataSource implements IDataSource { - - public getId(tree: ITree, element: any): string { - return element.getId(); - } - - public hasChildren(tree: ITree, element: any): boolean { - if (element instanceof ViewModel || element instanceof Scope) { - return true; - } - - let variable = element; - return variable.hasChildren && !equalsIgnoreCase(variable.value, 'null'); - } - - public getChildren(tree: ITree, element: any): TPromise { - if (element instanceof ViewModel) { - const focusedStackFrame = (element).focusedStackFrame; - return focusedStackFrame ? focusedStackFrame.getScopes() : TPromise.as([]); - } - - let scope = element; - return scope.getChildren(); - } - - public getParent(tree: ITree, element: any): TPromise { - return TPromise.as(null); - } -} - -interface IScopeTemplateData { - name: HTMLElement; -} - -export interface IVariableTemplateData { - expression: HTMLElement; - name: HTMLElement; - value: HTMLElement; -} - -export class VariablesRenderer implements IRenderer { - - private static readonly SCOPE_TEMPLATE_ID = 'scope'; - private static readonly VARIABLE_TEMPLATE_ID = 'variable'; - - constructor( - @debug.IDebugService private debugService: debug.IDebugService, - @IContextViewService private contextViewService: IContextViewService, - @IThemeService private themeService: IThemeService - ) { - // noop - } - - public getHeight(tree: ITree, element: any): number { - return 22; - } - - public getTemplateId(tree: ITree, element: any): string { - if (element instanceof Scope) { - return VariablesRenderer.SCOPE_TEMPLATE_ID; - } - if (element instanceof Variable) { - return VariablesRenderer.VARIABLE_TEMPLATE_ID; - } - - return null; - } - - public renderTemplate(tree: ITree, templateId: string, container: HTMLElement): any { - if (templateId === VariablesRenderer.SCOPE_TEMPLATE_ID) { - let data: IScopeTemplateData = Object.create(null); - data.name = dom.append(container, $('.scope')); - - return data; - } - - let data: IVariableTemplateData = Object.create(null); - data.expression = dom.append(container, $('.expression')); - data.name = dom.append(data.expression, $('span.name')); - data.value = dom.append(data.expression, $('span.value')); - - return data; - } - - public renderElement(tree: ITree, element: any, templateId: string, templateData: any): void { - if (templateId === VariablesRenderer.SCOPE_TEMPLATE_ID) { - this.renderScope(element, templateData); - } else { - const variable = element; - if (variable === this.debugService.getViewModel().getSelectedExpression() || variable.errorMessage) { - renderRenameBox(this.debugService, this.contextViewService, this.themeService, tree, variable, (templateData).expression, { - initialValue: variable.value, - ariaLabel: nls.localize('variableValueAriaLabel', "Type new variable value"), - validationOptions: { - validation: (value: string) => variable.errorMessage ? ({ content: variable.errorMessage }) : null - } - }); - } else { - renderVariable(tree, variable, templateData, true); - } - } - } - - private renderScope(scope: Scope, data: IScopeTemplateData): void { - data.name.textContent = scope.name; - } - - public disposeTemplate(tree: ITree, templateId: string, templateData: any): void { - // noop - } -} - -export class VariablesAccessibilityProvider implements IAccessibilityProvider { - - public getAriaLabel(tree: ITree, element: any): string { - if (element instanceof Scope) { - return nls.localize('variableScopeAriaLabel', "Scope {0}, variables, debug", (element).name); - } - if (element instanceof Variable) { - return nls.localize('variableAriaLabel', "{0} value {1}, variables, debug", (element).name, (element).value); - } - - return null; - } -} - -export class VariablesController extends BaseDebugController { - - protected onLeftClick(tree: ITree, element: any, event: IMouseEvent): boolean { - // double click on primitive value: open input box to be able to set the value - const process = this.debugService.getViewModel().focusedProcess; - if (element instanceof Variable && event.detail === 2 && process && process.session.capabilities.supportsSetVariable) { - const expression = element; - this.debugService.getViewModel().setSelectedExpression(expression); - return true; - } - - return super.onLeftClick(tree, element, event); - } -} - -// watch expressions - -export class WatchExpressionsActionProvider implements IActionProvider { - - private instantiationService: IInstantiationService; - - constructor(instantiationService: IInstantiationService) { - this.instantiationService = instantiationService; - } - - public hasActions(tree: ITree, element: any): boolean { - return element instanceof Expression && !!element.name; - } - - public hasSecondaryActions(tree: ITree, element: any): boolean { - return true; - } - - public getActions(tree: ITree, element: any): TPromise { - return TPromise.as([]); - } - - public getSecondaryActions(tree: ITree, element: any): TPromise { - const actions: IAction[] = []; - if (element instanceof Expression) { - const expression = element; - actions.push(this.instantiationService.createInstance(AddWatchExpressionAction, AddWatchExpressionAction.ID, AddWatchExpressionAction.LABEL)); - actions.push(this.instantiationService.createInstance(EditWatchExpressionAction, EditWatchExpressionAction.ID, EditWatchExpressionAction.LABEL)); - if (!expression.hasChildren) { - actions.push(this.instantiationService.createInstance(CopyValueAction, CopyValueAction.ID, CopyValueAction.LABEL, expression.value)); - } - actions.push(new Separator()); - - actions.push(this.instantiationService.createInstance(RemoveWatchExpressionAction, RemoveWatchExpressionAction.ID, RemoveWatchExpressionAction.LABEL)); - actions.push(this.instantiationService.createInstance(RemoveAllWatchExpressionsAction, RemoveAllWatchExpressionsAction.ID, RemoveAllWatchExpressionsAction.LABEL)); - } else { - actions.push(this.instantiationService.createInstance(AddWatchExpressionAction, AddWatchExpressionAction.ID, AddWatchExpressionAction.LABEL)); - if (element instanceof Variable) { - const variable = element; - if (!variable.hasChildren) { - actions.push(this.instantiationService.createInstance(CopyValueAction, CopyValueAction.ID, CopyValueAction.LABEL, variable.value)); - } - actions.push(new Separator()); - } - actions.push(this.instantiationService.createInstance(RemoveAllWatchExpressionsAction, RemoveAllWatchExpressionsAction.ID, RemoveAllWatchExpressionsAction.LABEL)); - } - - return TPromise.as(actions); - } - - public getActionItem(tree: ITree, element: any, action: IAction): IActionItem { - return null; - } -} - -export class WatchExpressionsDataSource implements IDataSource { - - public getId(tree: ITree, element: any): string { - return element.getId(); - } - - public hasChildren(tree: ITree, element: any): boolean { - if (element instanceof Model) { - return true; - } - - const watchExpression = element; - return watchExpression.hasChildren && !equalsIgnoreCase(watchExpression.value, 'null'); - } - - public getChildren(tree: ITree, element: any): TPromise { - if (element instanceof Model) { - return TPromise.as((element).getWatchExpressions()); - } - - let expression = element; - return expression.getChildren(); - } - - public getParent(tree: ITree, element: any): TPromise { - return TPromise.as(null); - } -} - -interface IWatchExpressionTemplateData { - watchExpression: HTMLElement; - expression: HTMLElement; - name: HTMLSpanElement; - value: HTMLSpanElement; -} - -export class WatchExpressionsRenderer implements IRenderer { - - private static readonly WATCH_EXPRESSION_TEMPLATE_ID = 'watchExpression'; - private static readonly VARIABLE_TEMPLATE_ID = 'variables'; - private toDispose: lifecycle.IDisposable[]; - - constructor( - @debug.IDebugService private debugService: debug.IDebugService, - @IContextViewService private contextViewService: IContextViewService, - @IThemeService private themeService: IThemeService - ) { - this.toDispose = []; - } - - public getHeight(tree: ITree, element: any): number { - return 22; - } - - public getTemplateId(tree: ITree, element: any): string { - if (element instanceof Expression) { - return WatchExpressionsRenderer.WATCH_EXPRESSION_TEMPLATE_ID; - } - - return WatchExpressionsRenderer.VARIABLE_TEMPLATE_ID; - } - - public renderTemplate(tree: ITree, templateId: string, container: HTMLElement): any { - const createVariableTemplate = ((data: IVariableTemplateData, container: HTMLElement) => { - data.expression = dom.append(container, $('.expression')); - data.name = dom.append(data.expression, $('span.name')); - data.value = dom.append(data.expression, $('span.value')); - }); - - if (templateId === WatchExpressionsRenderer.WATCH_EXPRESSION_TEMPLATE_ID) { - const data: IWatchExpressionTemplateData = Object.create(null); - data.watchExpression = dom.append(container, $('.watch-expression')); - createVariableTemplate(data, data.watchExpression); - - return data; - } - - const data: IVariableTemplateData = Object.create(null); - createVariableTemplate(data, container); - - return data; - } - - public renderElement(tree: ITree, element: any, templateId: string, templateData: any): void { - if (templateId === WatchExpressionsRenderer.WATCH_EXPRESSION_TEMPLATE_ID) { - this.renderWatchExpression(tree, element, templateData); - } else { - renderVariable(tree, element, templateData, true); - } - } - - private renderWatchExpression(tree: ITree, watchExpression: debug.IExpression, data: IWatchExpressionTemplateData): void { - let selectedExpression = this.debugService.getViewModel().getSelectedExpression(); - if ((selectedExpression instanceof Expression && selectedExpression.getId() === watchExpression.getId()) || (watchExpression instanceof Expression && !watchExpression.name)) { - renderRenameBox(this.debugService, this.contextViewService, this.themeService, tree, watchExpression, data.expression, { - initialValue: watchExpression.name, - placeholder: nls.localize('watchExpressionPlaceholder', "Expression to watch"), - ariaLabel: nls.localize('watchExpressionInputAriaLabel', "Type watch expression") - }); - } - - data.name.textContent = watchExpression.name; - if (watchExpression.value) { - data.name.textContent += ':'; - renderExpressionValue(watchExpression, data.value, { - showChanged: true, - maxValueLength: MAX_VALUE_RENDER_LENGTH_IN_VIEWLET, - preserveWhitespace: false, - showHover: true, - colorize: true - }); - data.name.title = watchExpression.type ? watchExpression.type : watchExpression.value; - } - } - - public disposeTemplate(tree: ITree, templateId: string, templateData: any): void { - // noop - } - - public dispose(): void { - this.toDispose = lifecycle.dispose(this.toDispose); - } -} - -export class WatchExpressionsAccessibilityProvider implements IAccessibilityProvider { - - public getAriaLabel(tree: ITree, element: any): string { - if (element instanceof Expression) { - return nls.localize('watchExpressionAriaLabel', "{0} value {1}, watch, debug", (element).name, (element).value); - } - if (element instanceof Variable) { - return nls.localize('watchVariableAriaLabel', "{0} value {1}, watch, debug", (element).name, (element).value); - } - - return null; - } -} - -export class WatchExpressionsController extends BaseDebugController { - - protected onLeftClick(tree: ITree, element: any, event: IMouseEvent): boolean { - // double click on primitive value: open input box to be able to select and copy value. - if (element instanceof Expression && event.detail === 2) { - const expression = element; - this.debugService.getViewModel().setSelectedExpression(expression); - return true; - } - - return super.onLeftClick(tree, element, event); - } -} - -export class WatchExpressionsDragAndDrop extends DefaultDragAndDrop { - - constructor( @debug.IDebugService private debugService: debug.IDebugService) { - super(); - } - - public getDragURI(tree: ITree, element: Expression): string { - if (!(element instanceof Expression)) { - return null; - } - - return element.getId(); - } - - public getDragLabel(tree: ITree, elements: Expression[]): string { - if (elements.length > 1) { - return String(elements.length); - } - - return elements[0].name; - } - - public onDragOver(tree: ITree, data: IDragAndDropData, target: Expression | Model, originalEvent: DragMouseEvent): IDragOverReaction { - if (target instanceof Expression || target instanceof Model) { - return { - accept: true, - autoExpand: false - }; - } - - return DRAG_OVER_REJECT; - } - - public drop(tree: ITree, data: IDragAndDropData, target: Expression | Model, originalEvent: DragMouseEvent): void { - const draggedData = data.getData(); - if (Array.isArray(draggedData)) { - const draggedElement = draggedData[0]; - const watches = this.debugService.getModel().getWatchExpressions(); - const position = target instanceof Model ? watches.length - 1 : watches.indexOf(target); - this.debugService.moveWatchExpression(draggedElement.getId(), position); - } - } -} - -// breakpoints - -export class BreakpointsActionProvider implements IActionProvider { - - constructor(private instantiationService: IInstantiationService, private debugService: debug.IDebugService) { - // noop - } - - public hasActions(tree: ITree, element: any): boolean { - return false; - } - - public hasSecondaryActions(tree: ITree, element: any): boolean { - return element instanceof Breakpoint || element instanceof ExceptionBreakpoint || element instanceof FunctionBreakpoint; - } - - public getActions(tree: ITree, element: any): TPromise { - return TPromise.as([]); - } - - public getSecondaryActions(tree: ITree, element: any): TPromise { - if (element instanceof ExceptionBreakpoint) { - return TPromise.as([]); - } - - const actions: IAction[] = []; - actions.push(this.instantiationService.createInstance(RemoveBreakpointAction, RemoveBreakpointAction.ID, RemoveBreakpointAction.LABEL)); - if (this.debugService.getModel().getBreakpoints().length + this.debugService.getModel().getFunctionBreakpoints().length > 1) { - actions.push(this.instantiationService.createInstance(RemoveAllBreakpointsAction, RemoveAllBreakpointsAction.ID, RemoveAllBreakpointsAction.LABEL)); - actions.push(new Separator()); - - actions.push(this.instantiationService.createInstance(EnableAllBreakpointsAction, EnableAllBreakpointsAction.ID, EnableAllBreakpointsAction.LABEL)); - actions.push(this.instantiationService.createInstance(DisableAllBreakpointsAction, DisableAllBreakpointsAction.ID, DisableAllBreakpointsAction.LABEL)); - } - - actions.push(new Separator()); - actions.push(this.instantiationService.createInstance(ReapplyBreakpointsAction, ReapplyBreakpointsAction.ID, ReapplyBreakpointsAction.LABEL)); - - return TPromise.as(actions); - } - - public getActionItem(tree: ITree, element: any, action: IAction): IActionItem { - return null; - } -} - -export class BreakpointsDataSource implements IDataSource { - - public getId(tree: ITree, element: any): string { - return element.getId(); - } - - public hasChildren(tree: ITree, element: any): boolean { - return element instanceof Model; - } - - public getChildren(tree: ITree, element: any): TPromise { - const model = element; - const exBreakpoints = model.getExceptionBreakpoints(); - - return TPromise.as(exBreakpoints.concat(model.getFunctionBreakpoints()).concat(model.getBreakpoints())); - } - - public getParent(tree: ITree, element: any): TPromise { - return TPromise.as(null); - } -} - -interface IBaseBreakpointTemplateData { - breakpoint: HTMLElement; - name: HTMLElement; - checkbox: HTMLInputElement; - context: debug.IEnablement; - toDispose: lifecycle.IDisposable[]; -} - -interface IBreakpointTemplateData extends IBaseBreakpointTemplateData { - lineNumber: HTMLElement; - filePath: HTMLElement; -} - -export class BreakpointsRenderer implements IRenderer { - - private static readonly EXCEPTION_BREAKPOINT_TEMPLATE_ID = 'exceptionBreakpoint'; - private static readonly FUNCTION_BREAKPOINT_TEMPLATE_ID = 'functionBreakpoint'; - private static readonly BREAKPOINT_TEMPLATE_ID = 'breakpoint'; - - constructor( - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @debug.IDebugService private debugService: debug.IDebugService, - @IContextViewService private contextViewService: IContextViewService, - @IThemeService private themeService: IThemeService, - @IEnvironmentService private environmentService: IEnvironmentService - ) { - // noop - } - - public getHeight(tree: ITree, element: any): number { - return 22; - } - - public getTemplateId(tree: ITree, element: any): string { - if (element instanceof Breakpoint) { - return BreakpointsRenderer.BREAKPOINT_TEMPLATE_ID; - } - if (element instanceof FunctionBreakpoint) { - return BreakpointsRenderer.FUNCTION_BREAKPOINT_TEMPLATE_ID; - } - if (element instanceof ExceptionBreakpoint) { - return BreakpointsRenderer.EXCEPTION_BREAKPOINT_TEMPLATE_ID; - } - - return null; - } - - public renderTemplate(tree: ITree, templateId: string, container: HTMLElement): any { - const data: IBreakpointTemplateData = Object.create(null); - data.breakpoint = dom.append(container, $('.breakpoint')); - - data.checkbox = $('input'); - data.checkbox.type = 'checkbox'; - data.toDispose = []; - data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => { - this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context); - })); - - dom.append(data.breakpoint, data.checkbox); - - data.name = dom.append(data.breakpoint, $('span.name')); - - if (templateId === BreakpointsRenderer.BREAKPOINT_TEMPLATE_ID) { - data.filePath = dom.append(data.breakpoint, $('span.file-path')); - const lineNumberContainer = dom.append(data.breakpoint, $('.line-number-container')); - data.lineNumber = dom.append(lineNumberContainer, $('span.line-number')); - } - if (templateId === BreakpointsRenderer.EXCEPTION_BREAKPOINT_TEMPLATE_ID) { - dom.addClass(data.breakpoint, 'exception'); - } - - return data; - } - - public renderElement(tree: ITree, element: any, templateId: string, templateData: any): void { - templateData.context = element; - if (templateId === BreakpointsRenderer.EXCEPTION_BREAKPOINT_TEMPLATE_ID) { - this.renderExceptionBreakpoint(element, templateData); - } else if (templateId === BreakpointsRenderer.FUNCTION_BREAKPOINT_TEMPLATE_ID) { - this.renderFunctionBreakpoint(tree, element, templateData); - } else { - this.renderBreakpoint(tree, element, templateData); - } - } - - private renderExceptionBreakpoint(exceptionBreakpoint: debug.IExceptionBreakpoint, data: IBaseBreakpointTemplateData): void { - data.name.textContent = exceptionBreakpoint.label || `${exceptionBreakpoint.filter} exceptions`; - data.breakpoint.title = data.name.textContent; - data.checkbox.checked = exceptionBreakpoint.enabled; - } - - private renderFunctionBreakpoint(tree: ITree, functionBreakpoint: debug.IFunctionBreakpoint, data: IBaseBreakpointTemplateData): void { - const selected = this.debugService.getViewModel().getSelectedFunctionBreakpoint(); - if (!functionBreakpoint.name || (selected && selected.getId() === functionBreakpoint.getId())) { - data.name.textContent = ''; - renderRenameBox(this.debugService, this.contextViewService, this.themeService, tree, functionBreakpoint, data.breakpoint, { - initialValue: functionBreakpoint.name, - placeholder: nls.localize('functionBreakpointPlaceholder', "Function to break on"), - ariaLabel: nls.localize('functionBreakPointInputAriaLabel', "Type function breakpoint") - }); - } else { - data.name.textContent = functionBreakpoint.name; - data.checkbox.checked = functionBreakpoint.enabled; - data.breakpoint.title = functionBreakpoint.name; - - // Mark function breakpoints as disabled if deactivated or if debug type does not support them #9099 - const process = this.debugService.getViewModel().focusedProcess; - if ((process && !process.session.capabilities.supportsFunctionBreakpoints) || !this.debugService.getModel().areBreakpointsActivated()) { - tree.addTraits('disabled', [functionBreakpoint]); - if (process && !process.session.capabilities.supportsFunctionBreakpoints) { - data.breakpoint.title = nls.localize('functionBreakpointsNotSupported', "Function breakpoints are not supported by this debug type"); - } - } else { - tree.removeTraits('disabled', [functionBreakpoint]); - } - } - } - - private renderBreakpoint(tree: ITree, breakpoint: debug.IBreakpoint, data: IBreakpointTemplateData): void { - this.debugService.getModel().areBreakpointsActivated() ? tree.removeTraits('disabled', [breakpoint]) : tree.addTraits('disabled', [breakpoint]); - - data.name.textContent = paths.basename(getPathLabel(breakpoint.uri, this.contextService)); - data.lineNumber.textContent = breakpoint.lineNumber.toString(); - if (breakpoint.column) { - data.lineNumber.textContent += `:${breakpoint.column}`; - } - data.filePath.textContent = getPathLabel(resources.dirname(breakpoint.uri), this.contextService, this.environmentService); - data.checkbox.checked = breakpoint.enabled; - - const debugActive = this.debugService.state === debug.State.Running || this.debugService.state === debug.State.Stopped; - if (debugActive && !breakpoint.verified) { - tree.addTraits('disabled', [breakpoint]); - if (breakpoint.message) { - data.breakpoint.title = breakpoint.message; - } - } else if (breakpoint.condition || breakpoint.hitCondition) { - data.breakpoint.title = breakpoint.condition ? breakpoint.condition : breakpoint.hitCondition; - } - } - - public disposeTemplate(tree: ITree, templateId: string, templateData: any): void { - lifecycle.dispose(templateData.toDispose); - } -} - -export class BreakpointsAccessibilityProvider implements IAccessibilityProvider { - - constructor( @IWorkspaceContextService private contextService: IWorkspaceContextService) { - // noop - } - - public getAriaLabel(tree: ITree, element: any): string { - if (element instanceof Breakpoint) { - return nls.localize('breakpointAriaLabel', "Breakpoint line {0} {1}, breakpoints, debug", (element).lineNumber, getPathLabel(resources.basenameOrAuthority((element).uri), this.contextService), this.contextService); - } - if (element instanceof FunctionBreakpoint) { - return nls.localize('functionBreakpointAriaLabel', "Function breakpoint {0}, breakpoints, debug", (element).name); - } - if (element instanceof ExceptionBreakpoint) { - return nls.localize('exceptionBreakpointAriaLabel', "Exception breakpoint {0}, breakpoints, debug", (element).filter); - } - - return null; - } -} - -export class BreakpointsController extends BaseDebugController { - - protected onLeftClick(tree: ITree, element: any, event: IMouseEvent): boolean { - if (element instanceof FunctionBreakpoint && event.detail === 2) { - this.debugService.getViewModel().setSelectedFunctionBreakpoint(element); - return true; - } - if (element instanceof Breakpoint) { - super.onLeftClick(tree, element, event); - this.openBreakpointSource(element, event, event.detail !== 2); - return true; - } - - return super.onLeftClick(tree, element, event); - } - - public openBreakpointSource(breakpoint: Breakpoint, event: any, preserveFocus: boolean): void { - if (breakpoint.uri.scheme === debug.DEBUG_SCHEME && this.debugService.state === debug.State.Inactive) { - return; - } - - const sideBySide = (event && (event.ctrlKey || event.metaKey)); - const selection = breakpoint.endLineNumber ? { - startLineNumber: breakpoint.lineNumber, - endLineNumber: breakpoint.endLineNumber, - startColumn: breakpoint.column, - endColumn: breakpoint.endColumn - } : { - startLineNumber: breakpoint.lineNumber, - startColumn: breakpoint.column || 1, - endLineNumber: breakpoint.lineNumber, - endColumn: breakpoint.column || Constants.MAX_SAFE_SMALL_INTEGER - }; - - this.editorService.openEditor({ - resource: breakpoint.uri, - options: { - preserveFocus, - selection, - revealIfVisible: true, - revealInCenterIfOutsideViewport: true, - pinned: !preserveFocus - } - }, sideBySide).done(undefined, errors.onUnexpectedError); - } -} diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts deleted file mode 100644 index e457ed0cf80..00000000000 --- a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts +++ /dev/null @@ -1,511 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as nls from 'vs/nls'; -import * as resources from 'vs/base/common/resources'; -import { RunOnceScheduler, sequence } from 'vs/base/common/async'; -import * as dom from 'vs/base/browser/dom'; -import * as builder from 'vs/base/browser/builder'; -import { TPromise } from 'vs/base/common/winjs.base'; -import * as errors from 'vs/base/common/errors'; -import { IAction } from 'vs/base/common/actions'; -import { prepareActions } from 'vs/workbench/browser/actions'; -import { IHighlightEvent, ITree } from 'vs/base/parts/tree/browser/tree'; -import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; -import { CollapseAction } from 'vs/workbench/browser/viewlet'; -import { ViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; -import { IDebugService, State, IBreakpoint, IExpression, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED } from 'vs/workbench/parts/debug/common/debug'; -import { Expression, Variable, ExceptionBreakpoint, FunctionBreakpoint, Thread, StackFrame, Breakpoint, ThreadAndProcessIds } from 'vs/workbench/parts/debug/common/debugModel'; -import * as viewer from 'vs/workbench/parts/debug/electron-browser/debugViewer'; -import { AddWatchExpressionAction, RemoveAllWatchExpressionsAction, AddFunctionBreakpointAction, ToggleBreakpointsActivatedAction, RemoveAllBreakpointsAction } from 'vs/workbench/parts/debug/browser/debugActions'; -import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { MenuId } from 'vs/platform/actions/common/actions'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { IListService } from 'vs/platform/list/browser/listService'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { once } from 'vs/base/common/event'; - -function renderViewTree(container: HTMLElement): HTMLElement { - const treeContainer = document.createElement('div'); - dom.addClass(treeContainer, 'debug-view-content'); - container.appendChild(treeContainer); - return treeContainer; -} - -const $ = builder.$; -const twistiePixels = 20; - -export class VariablesView extends ViewsViewletPanel { - - private static readonly MEMENTO = 'variablesview.memento'; - private onFocusStackFrameScheduler: RunOnceScheduler; - private variablesFocusedContext: IContextKey; - private settings: any; - private expandedElements: any[]; - - constructor( - options: IViewletViewOptions, - @IContextMenuService contextMenuService: IContextMenuService, - @IDebugService private debugService: IDebugService, - @IKeybindingService keybindingService: IKeybindingService, - @IInstantiationService private instantiationService: IInstantiationService, - @IContextKeyService contextKeyService: IContextKeyService, - @IListService private listService: IListService, - @IThemeService private themeService: IThemeService - ) { - super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService); - - this.settings = options.viewletSettings; - this.variablesFocusedContext = CONTEXT_VARIABLES_FOCUSED.bindTo(contextKeyService); - this.expandedElements = []; - // Use scheduler to prevent unnecessary flashing - this.onFocusStackFrameScheduler = new RunOnceScheduler(() => { - // Remember expanded elements when there are some (otherwise don't override/erase the previous ones) - const expanded = this.tree.getExpandedElements(); - if (expanded.length > 0) { - this.expandedElements = expanded; - } - - // Always clear tree highlight to avoid ending up in a broken state #12203 - this.tree.clearHighlight(); - this.tree.refresh().then(() => { - const stackFrame = this.debugService.getViewModel().focusedStackFrame; - return sequence(this.expandedElements.map(e => () => this.tree.expand(e))).then(() => { - // If there is no preserved expansion state simply expand the first scope - if (stackFrame && this.tree.getExpandedElements().length === 0) { - return stackFrame.getScopes().then(scopes => { - if (scopes.length > 0 && !scopes[0].expensive) { - return this.tree.expand(scopes[0]); - } - return undefined; - }); - } - return undefined; - }); - }).done(null, errors.onUnexpectedError); - }, 400); - } - - public renderBody(container: HTMLElement): void { - dom.addClass(container, 'debug-variables'); - this.treeContainer = renderViewTree(container); - - this.tree = new Tree(this.treeContainer, { - dataSource: new viewer.VariablesDataSource(), - renderer: this.instantiationService.createInstance(viewer.VariablesRenderer), - accessibilityProvider: new viewer.VariablesAccessibilityProvider(), - controller: this.instantiationService.createInstance(viewer.VariablesController, new viewer.VariablesActionProvider(this.instantiationService), MenuId.DebugVariablesContext) - }, { - ariaLabel: nls.localize('variablesAriaTreeLabel', "Debug Variables"), - twistiePixels, - keyboardSupport: false - }); - - this.disposables.push(attachListStyler(this.tree, this.themeService)); - this.disposables.push(this.listService.register(this.tree, [this.variablesFocusedContext])); - - const viewModel = this.debugService.getViewModel(); - - this.tree.setInput(viewModel); - - const collapseAction = this.instantiationService.createInstance(CollapseAction, this.tree, false, 'explorer-action collapse-explorer'); - this.toolbar.setActions(prepareActions([collapseAction]))(); - - this.disposables.push(viewModel.onDidFocusStackFrame(sf => { - // Refresh the tree immediately if it is not visible. - // Otherwise postpone the refresh until user stops stepping. - if (!this.tree.getContentHeight() || sf.explicit) { - this.onFocusStackFrameScheduler.schedule(0); - } else { - this.onFocusStackFrameScheduler.schedule(); - } - })); - this.disposables.push(this.debugService.onDidChangeState(state => { - collapseAction.enabled = state === State.Running || state === State.Stopped; - })); - - this.disposables.push(this.debugService.getViewModel().onDidSelectExpression(expression => { - if (!expression || !(expression instanceof Variable)) { - return; - } - - this.tree.refresh(expression, false).then(() => { - this.tree.setHighlight(expression); - once(this.tree.onDidChangeHighlight)((e: IHighlightEvent) => { - if (!e.highlight) { - this.debugService.getViewModel().setSelectedExpression(null); - } - }); - }).done(null, errors.onUnexpectedError); - })); - } - - public shutdown(): void { - this.settings[VariablesView.MEMENTO] = !this.isExpanded(); - super.shutdown(); - } -} - -export class WatchExpressionsView extends ViewsViewletPanel { - - private static readonly MEMENTO = 'watchexpressionsview.memento'; - private onWatchExpressionsUpdatedScheduler: RunOnceScheduler; - private toReveal: IExpression; - private watchExpressionsFocusedContext: IContextKey; - private settings: any; - - constructor( - options: IViewletViewOptions, - @IContextMenuService contextMenuService: IContextMenuService, - @IDebugService private debugService: IDebugService, - @IKeybindingService keybindingService: IKeybindingService, - @IInstantiationService private instantiationService: IInstantiationService, - @IContextKeyService contextKeyService: IContextKeyService, - @IListService private listService: IListService, - @IThemeService private themeService: IThemeService - ) { - super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('expressionsSection', "Expressions Section") }, keybindingService, contextMenuService); - this.settings = options.viewletSettings; - - this.disposables.push(this.debugService.getModel().onDidChangeWatchExpressions(we => { - // only expand when a new watch expression is added. - if (we instanceof Expression) { - this.setExpanded(true); - } - })); - this.watchExpressionsFocusedContext = CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bindTo(contextKeyService); - - this.onWatchExpressionsUpdatedScheduler = new RunOnceScheduler(() => { - this.tree.refresh().done(() => { - return this.toReveal instanceof Expression ? this.tree.reveal(this.toReveal) : TPromise.as(true); - }, errors.onUnexpectedError); - }, 50); - } - - public renderBody(container: HTMLElement): void { - dom.addClass(container, 'debug-watch'); - this.treeContainer = renderViewTree(container); - - const actionProvider = new viewer.WatchExpressionsActionProvider(this.instantiationService); - this.tree = new Tree(this.treeContainer, { - dataSource: new viewer.WatchExpressionsDataSource(), - renderer: this.instantiationService.createInstance(viewer.WatchExpressionsRenderer), - accessibilityProvider: new viewer.WatchExpressionsAccessibilityProvider(), - controller: this.instantiationService.createInstance(viewer.WatchExpressionsController, actionProvider, MenuId.DebugWatchContext), - dnd: this.instantiationService.createInstance(viewer.WatchExpressionsDragAndDrop) - }, { - ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'watchAriaTreeLabel' }, "Debug Watch Expressions"), - twistiePixels, - keyboardSupport: false - }); - - this.disposables.push(attachListStyler(this.tree, this.themeService)); - this.disposables.push(this.listService.register(this.tree, [this.watchExpressionsFocusedContext])); - - this.tree.setInput(this.debugService.getModel()); - - const addWatchExpressionAction = this.instantiationService.createInstance(AddWatchExpressionAction, AddWatchExpressionAction.ID, AddWatchExpressionAction.LABEL); - const collapseAction = this.instantiationService.createInstance(CollapseAction, this.tree, true, 'explorer-action collapse-explorer'); - const removeAllWatchExpressionsAction = this.instantiationService.createInstance(RemoveAllWatchExpressionsAction, RemoveAllWatchExpressionsAction.ID, RemoveAllWatchExpressionsAction.LABEL); - this.toolbar.setActions(prepareActions([addWatchExpressionAction, collapseAction, removeAllWatchExpressionsAction]))(); - - this.disposables.push(this.debugService.getModel().onDidChangeWatchExpressions(we => { - if (!this.onWatchExpressionsUpdatedScheduler.isScheduled()) { - this.onWatchExpressionsUpdatedScheduler.schedule(); - } - this.toReveal = we; - })); - - this.disposables.push(this.debugService.getViewModel().onDidSelectExpression(expression => { - if (!expression || !(expression instanceof Expression)) { - return; - } - - this.tree.refresh(expression, false).then(() => { - this.tree.setHighlight(expression); - once(this.tree.onDidChangeHighlight)((e: IHighlightEvent) => { - if (!e.highlight) { - this.debugService.getViewModel().setSelectedExpression(null); - } - }); - }).done(null, errors.onUnexpectedError); - })); - } - - public shutdown(): void { - this.settings[WatchExpressionsView.MEMENTO] = !this.isExpanded(); - super.shutdown(); - } -} - -export class CallStackView extends ViewsViewletPanel { - - private static readonly MEMENTO = 'callstackview.memento'; - private pauseMessage: builder.Builder; - private pauseMessageLabel: builder.Builder; - private onCallStackChangeScheduler: RunOnceScheduler; - private settings: any; - - constructor( - private options: IViewletViewOptions, - @IContextMenuService contextMenuService: IContextMenuService, - @IDebugService private debugService: IDebugService, - @IKeybindingService keybindingService: IKeybindingService, - @IInstantiationService private instantiationService: IInstantiationService, - @IListService private listService: IListService, - @IThemeService private themeService: IThemeService - ) { - super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService); - this.settings = options.viewletSettings; - - // Create scheduler to prevent unnecessary flashing of tree when reacting to changes - this.onCallStackChangeScheduler = new RunOnceScheduler(() => { - let newTreeInput: any = this.debugService.getModel(); - const processes = this.debugService.getModel().getProcesses(); - if (!this.debugService.getViewModel().isMultiProcessView() && processes.length) { - const threads = processes[0].getAllThreads(); - // Only show the threads in the call stack if there is more than 1 thread. - newTreeInput = threads.length === 1 ? threads[0] : processes[0]; - } - - // Only show the global pause message if we do not display threads. - // Otherwise there will be a pause message per thread and there is no need for a global one. - if (newTreeInput instanceof Thread && newTreeInput.stoppedDetails) { - this.pauseMessageLabel.text(newTreeInput.stoppedDetails.description || nls.localize('debugStopped', "Paused on {0}", newTreeInput.stoppedDetails.reason)); - if (newTreeInput.stoppedDetails.text) { - this.pauseMessageLabel.title(newTreeInput.stoppedDetails.text); - } - newTreeInput.stoppedDetails.reason === 'exception' ? this.pauseMessageLabel.addClass('exception') : this.pauseMessageLabel.removeClass('exception'); - this.pauseMessage.show(); - } else { - this.pauseMessage.hide(); - } - - (this.tree.getInput() === newTreeInput ? this.tree.refresh() : this.tree.setInput(newTreeInput)) - .done(() => this.updateTreeSelection(), errors.onUnexpectedError); - }, 50); - } - - protected renderHeaderTitle(container: HTMLElement): void { - const title = $('.title.debug-call-stack-title').appendTo(container); - $('span').text(this.options.name).appendTo(title); - this.pauseMessage = $('span.pause-message').appendTo(title); - this.pauseMessage.hide(); - this.pauseMessageLabel = $('span.label').appendTo(this.pauseMessage); - } - - public renderBody(container: HTMLElement): void { - dom.addClass(container, 'debug-call-stack'); - this.treeContainer = renderViewTree(container); - const actionProvider = this.instantiationService.createInstance(viewer.CallStackActionProvider); - const controller = this.instantiationService.createInstance(viewer.CallStackController, actionProvider, MenuId.DebugCallStackContext); - - this.tree = new Tree(this.treeContainer, { - dataSource: this.instantiationService.createInstance(viewer.CallStackDataSource), - renderer: this.instantiationService.createInstance(viewer.CallStackRenderer), - accessibilityProvider: this.instantiationService.createInstance(viewer.CallstackAccessibilityProvider), - controller - }, { - ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'callStackAriaLabel' }, "Debug Call Stack"), - twistiePixels, - keyboardSupport: false - }); - - this.disposables.push(attachListStyler(this.tree, this.themeService)); - this.disposables.push(this.listService.register(this.tree)); - - this.disposables.push(this.tree.onDidChangeSelection(event => { - if (event && event.payload && event.payload.origin === 'keyboard') { - const element = this.tree.getFocus(); - if (element instanceof ThreadAndProcessIds) { - controller.showMoreStackFrames(this.tree, element); - } else if (element instanceof StackFrame) { - controller.focusStackFrame(element, event, false); - } - } - })); - - this.disposables.push(this.debugService.getModel().onDidChangeCallStack(() => { - if (!this.onCallStackChangeScheduler.isScheduled()) { - this.onCallStackChangeScheduler.schedule(); - } - })); - this.disposables.push(this.debugService.getViewModel().onDidFocusStackFrame(() => - this.updateTreeSelection().done(undefined, errors.onUnexpectedError))); - - // Schedule the update of the call stack tree if the viewlet is opened after a session started #14684 - if (this.debugService.state === State.Stopped) { - this.onCallStackChangeScheduler.schedule(); - } - } - - private updateTreeSelection(): TPromise { - if (!this.tree.getInput()) { - // Tree not initialized yet - return TPromise.as(null); - } - - const stackFrame = this.debugService.getViewModel().focusedStackFrame; - const thread = this.debugService.getViewModel().focusedThread; - const process = this.debugService.getViewModel().focusedProcess; - if (!thread) { - if (!process) { - this.tree.clearSelection(); - return TPromise.as(null); - } - - this.tree.setSelection([process]); - return this.tree.reveal(process); - } - - return this.tree.expandAll([thread.process, thread]).then(() => { - if (!stackFrame) { - return TPromise.as(null); - } - - this.tree.setSelection([stackFrame]); - return this.tree.reveal(stackFrame); - }); - } - - public shutdown(): void { - this.settings[CallStackView.MEMENTO] = !this.isExpanded(); - super.shutdown(); - } -} - -export class BreakpointsView extends ViewsViewletPanel { - - private static readonly MAX_VISIBLE_FILES = 9; - private static readonly MEMENTO = 'breakopintsview.memento'; - private breakpointsFocusedContext: IContextKey; - private settings: any; - - constructor( - options: IViewletViewOptions, - @IContextMenuService contextMenuService: IContextMenuService, - @IDebugService private debugService: IDebugService, - @IKeybindingService keybindingService: IKeybindingService, - @IInstantiationService private instantiationService: IInstantiationService, - @IContextKeyService contextKeyService: IContextKeyService, - @IListService private listService: IListService, - @IThemeService private themeService: IThemeService - ) { - super({ - ...(options as IViewOptions), - ariaHeaderLabel: nls.localize('breakpointsSection', "Breakpoints Section") - }, keybindingService, contextMenuService); - - this.minimumBodySize = this.maximumBodySize = this.getExpandedBodySize(); - this.settings = options.viewletSettings; - this.breakpointsFocusedContext = CONTEXT_BREAKPOINTS_FOCUSED.bindTo(contextKeyService); - this.disposables.push(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange())); - } - - public renderBody(container: HTMLElement): void { - dom.addClass(container, 'debug-breakpoints'); - this.treeContainer = renderViewTree(container); - const actionProvider = new viewer.BreakpointsActionProvider(this.instantiationService, this.debugService); - const controller = this.instantiationService.createInstance(viewer.BreakpointsController, actionProvider, MenuId.DebugBreakpointsContext); - - this.tree = new Tree(this.treeContainer, { - dataSource: new viewer.BreakpointsDataSource(), - renderer: this.instantiationService.createInstance(viewer.BreakpointsRenderer), - accessibilityProvider: this.instantiationService.createInstance(viewer.BreakpointsAccessibilityProvider), - controller, - sorter: { - compare(tree: ITree, element: any, otherElement: any): number { - const first = element; - const second = otherElement; - if (first instanceof ExceptionBreakpoint) { - return -1; - } - if (second instanceof ExceptionBreakpoint) { - return 1; - } - if (first instanceof FunctionBreakpoint) { - return -1; - } - if (second instanceof FunctionBreakpoint) { - return 1; - } - - if (first.uri.toString() !== second.uri.toString()) { - return resources.basenameOrAuthority(first.uri).localeCompare(resources.basenameOrAuthority(second.uri)); - } - if (first.lineNumber === second.lineNumber) { - return first.column - second.column; - } - - return first.lineNumber - second.lineNumber; - } - } - }, { - ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'breakpointsAriaTreeLabel' }, "Debug Breakpoints"), - twistiePixels, - keyboardSupport: false - }); - - this.disposables.push(attachListStyler(this.tree, this.themeService)); - this.disposables.push(this.listService.register(this.tree, [this.breakpointsFocusedContext])); - - this.disposables.push(this.tree.onDidChangeSelection(event => { - if (event && event.payload && event.payload.origin === 'keyboard') { - const element = this.tree.getFocus(); - if (element instanceof Breakpoint) { - controller.openBreakpointSource(element, event, false); - } - } - })); - - const debugModel = this.debugService.getModel(); - - this.tree.setInput(debugModel); - - this.disposables.push(this.debugService.getViewModel().onDidSelectFunctionBreakpoint(fbp => { - if (!fbp || !(fbp instanceof FunctionBreakpoint)) { - return; - } - - this.tree.refresh(fbp, false).then(() => { - this.tree.setHighlight(fbp); - once(this.tree.onDidChangeHighlight)((e: IHighlightEvent) => { - if (!e.highlight) { - this.debugService.getViewModel().setSelectedFunctionBreakpoint(null); - } - }); - }).done(null, errors.onUnexpectedError); - })); - } - - public getActions(): IAction[] { - return [ - this.instantiationService.createInstance(AddFunctionBreakpointAction, AddFunctionBreakpointAction.ID, AddFunctionBreakpointAction.LABEL), - this.instantiationService.createInstance(ToggleBreakpointsActivatedAction, ToggleBreakpointsActivatedAction.ID, ToggleBreakpointsActivatedAction.ACTIVATE_LABEL), - this.instantiationService.createInstance(RemoveAllBreakpointsAction, RemoveAllBreakpointsAction.ID, RemoveAllBreakpointsAction.LABEL) - ]; - } - - private onBreakpointsChange(): void { - this.minimumBodySize = this.maximumBodySize = this.getExpandedBodySize(); - if (this.tree) { - this.tree.refresh(); - } - } - - private getExpandedBodySize(): number { - const model = this.debugService.getModel(); - const length = model.getBreakpoints().length + model.getExceptionBreakpoints().length + model.getFunctionBreakpoints().length; - return Math.min(BreakpointsView.MAX_VISIBLE_FILES, length) * 22; - } - - public shutdown(): void { - this.settings[BreakpointsView.MEMENTO] = !this.isExpanded(); - super.shutdown(); - } -} diff --git a/src/vs/workbench/parts/debug/electron-browser/repl.ts b/src/vs/workbench/parts/debug/electron-browser/repl.ts index 3d8dba4e41e..81264733319 100644 --- a/src/vs/workbench/parts/debug/electron-browser/repl.ts +++ b/src/vs/workbench/parts/debug/electron-browser/repl.ts @@ -16,7 +16,6 @@ import { isMacintosh } from 'vs/base/common/platform'; import { CancellationToken } from 'vs/base/common/cancellation'; import { KeyCode } from 'vs/base/common/keyCodes'; import { ITree, ITreeOptions } from 'vs/base/parts/tree/browser/tree'; -import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { Context as SuggestContext } from 'vs/editor/contrib/suggest/suggest'; import { SuggestController } from 'vs/editor/contrib/suggest/suggestController'; import { IReadOnlyModel } from 'vs/editor/common/editorCommon'; @@ -38,12 +37,12 @@ import { ClearReplAction } from 'vs/workbench/parts/debug/browser/debugActions'; import { ReplHistory } from 'vs/workbench/parts/debug/common/replHistory'; import { Panel } from 'vs/workbench/browser/panel'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; -import { IListService } from 'vs/platform/list/browser/listService'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { clipboard } from 'electron'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; +import { memoize } from 'vs/base/common/decorators'; const $ = dom.$; @@ -75,7 +74,7 @@ export class Repl extends Panel implements IPrivateReplService { private tree: ITree; private renderer: ReplExpressionsRenderer; - private characterWidthSurveyor: HTMLElement; + private container: HTMLElement; private treeContainer: HTMLElement; private replInput: ReplInputEditor; private replInputContainer: HTMLElement; @@ -130,30 +129,20 @@ export class Repl extends Panel implements IPrivateReplService { public create(parent: Builder): TPromise { super.create(parent); - const container = dom.append(parent.getHTMLElement(), $('.repl')); - this.treeContainer = dom.append(container, $('.repl-tree')); - this.createReplInput(container); - - this.characterWidthSurveyor = dom.append(container, $('.surveyor')); - this.characterWidthSurveyor.textContent = Repl.HALF_WIDTH_TYPICAL; - for (let i = 0; i < 10; i++) { - this.characterWidthSurveyor.textContent += this.characterWidthSurveyor.textContent; - } - this.characterWidthSurveyor.style.fontSize = isMacintosh ? '12px' : '14px'; + this.container = dom.append(parent.getHTMLElement(), $('.repl')); + this.treeContainer = dom.append(this.container, $('.repl-tree')); + this.createReplInput(this.container); this.renderer = this.instantiationService.createInstance(ReplExpressionsRenderer); const controller = this.instantiationService.createInstance(ReplExpressionsController, new ReplExpressionsActionProvider(this.instantiationService), MenuId.DebugConsoleContext); controller.toFocusOnClick = this.replInput; - this.tree = new Tree(this.treeContainer, { + this.tree = new WorkbenchTree(this.treeContainer, { dataSource: new ReplExpressionsDataSource(), renderer: this.renderer, accessibilityProvider: new ReplExpressionsAccessibilityProvider(), controller - }, replTreeOptions); - - this.toUnbind.push(attachListStyler(this.tree, this.themeService)); - this.toUnbind.push(this.listService.register(this.tree)); + }, replTreeOptions, this.contextKeyService, this.listService, this.themeService); if (!Repl.HISTORY) { Repl.HISTORY = new ReplHistory(JSON.parse(this.storageService.get(HISTORY_STORAGE_KEY, StorageScope.WORKSPACE, '[]'))); @@ -247,7 +236,7 @@ export class Repl extends Panel implements IPrivateReplService { public layout(dimension: Dimension): void { this.dimension = dimension; if (this.tree) { - this.renderer.setWidth(dimension.width - 25, this.characterWidthSurveyor.clientWidth / this.characterWidthSurveyor.textContent.length); + this.renderer.setWidth(dimension.width - 25, this.characterWidth); const treeHeight = dimension.height - this.replInputHeight; this.treeContainer.style.height = `${treeHeight}px`; this.tree.layout(treeHeight); @@ -257,6 +246,18 @@ export class Repl extends Panel implements IPrivateReplService { this.replInput.layout({ width: dimension.width - 20, height: this.replInputHeight }); } + @memoize + private get characterWidth(): number { + const characterWidthSurveyor = dom.append(this.container, $('.surveyor')); + characterWidthSurveyor.textContent = Repl.HALF_WIDTH_TYPICAL; + for (let i = 0; i < 10; i++) { + characterWidthSurveyor.textContent += characterWidthSurveyor.textContent; + } + characterWidthSurveyor.style.fontSize = isMacintosh ? '12px' : '14px'; + + return characterWidthSurveyor.clientWidth / characterWidthSurveyor.textContent.length; + } + public focus(): void { this.replInput.focus(); } diff --git a/src/vs/workbench/parts/debug/electron-browser/replViewer.ts b/src/vs/workbench/parts/debug/electron-browser/replViewer.ts index d761ceea00e..d382679b170 100644 --- a/src/vs/workbench/parts/debug/electron-browser/replViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/replViewer.ts @@ -17,7 +17,7 @@ import { ITree, IAccessibilityProvider, ContextMenuEvent, IDataSource, IRenderer import { ICancelableEvent } from 'vs/base/parts/tree/browser/treeDefaults'; import { IExpressionContainer, IExpression, IReplElementSource } from 'vs/workbench/parts/debug/common/debug'; import { Model, RawObjectReplElement, Expression, SimpleReplElement, Variable } from 'vs/workbench/parts/debug/common/debugModel'; -import { renderVariable, renderExpressionValue, IVariableTemplateData, BaseDebugController } from 'vs/workbench/parts/debug/electron-browser/debugViewer'; +import { renderVariable, renderExpressionValue, IVariableTemplateData, BaseDebugController } from 'vs/workbench/parts/debug/electron-browser/baseDebugView'; import { ClearReplAction } from 'vs/workbench/parts/debug/browser/debugActions'; import { CopyAction, CopyAllAction } from 'vs/workbench/parts/debug/electron-browser/electronDebugActions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -298,34 +298,46 @@ export class ReplExpressionsRenderer implements IRenderer { if (text.charCodeAt(i) === 27) { let index = i; let chr = (++index < len ? text.charAt(index) : null); + let codes = []; if (chr && chr === '[') { let code: string = null; - chr = (++index < len ? text.charAt(index) : null); - - if (chr && chr >= '0' && chr <= '9') { - code = chr; + while (chr !== 'm' && codes.length <= 7) { chr = (++index < len ? text.charAt(index) : null); - } - if (chr && chr >= '0' && chr <= '9') { - code += chr; - chr = (++index < len ? text.charAt(index) : null); - } + if (chr && chr >= '0' && chr <= '9') { + code = chr; + chr = (++index < len ? text.charAt(index) : null); + } - if (code === null) { - code = '0'; + if (chr && chr >= '0' && chr <= '9') { + code += chr; + chr = (++index < len ? text.charAt(index) : null); + } + + if (code === null) { + code = '0'; + } + + codes.push(code); } if (chr === 'm') { // set text color/mode. - + code = null; // only respect text-foreground ranges and ignore the values for "black" & "white" because those // only make sense in combination with text-background ranges which we currently not support - let parsedMode = parseInt(code, 10); let token = document.createElement('span'); - if ((parsedMode >= 30 && parsedMode <= 37) || (parsedMode >= 90 && parsedMode <= 97)) { - token.className = 'code' + parsedMode; - } else if (parsedMode === 1) { - token.className = 'code-bold'; + token.className = ''; + while (codes.length > 0) { + code = codes.pop(); + let parsedMode = parseInt(code, 10); + if (token.className.length > 0) { + token.className += ' '; + } + if ((parsedMode >= 30 && parsedMode <= 37) || (parsedMode >= 90 && parsedMode <= 97)) { + token.className += 'code' + parsedMode; + } else if (parsedMode === 1) { + token.className += 'code-bold'; + } } // we need a tokens container now diff --git a/src/vs/workbench/parts/debug/electron-browser/terminalSupport.ts b/src/vs/workbench/parts/debug/electron-browser/terminalSupport.ts index d4b478ccb17..25ca3cf7a4b 100644 --- a/src/vs/workbench/parts/debug/electron-browser/terminalSupport.ts +++ b/src/vs/workbench/parts/debug/electron-browser/terminalSupport.ts @@ -102,7 +102,12 @@ export class TerminalSupport { } if (args.env) { for (let key in args.env) { - command += `$env:${key}='${args.env[key]}'; `; + const value = args.env[key]; + if (value === null) { + command += `Remove-Item env:${key}; `; + } else { + command += `\${env:${key}}='${value}'; `; + } } } if (args.args && args.args.length > 0) { @@ -127,7 +132,12 @@ export class TerminalSupport { if (args.env) { command += 'cmd /C "'; for (let key in args.env) { - command += `set "${key}=${args.env[key]}" && `; + const value = args.env[key]; + if (value === null) { + command += `set "${key}=" && `; + } else { + command += `set "${key}=${args.env[key]}" && `; + } } } for (let a of args.args) { @@ -151,7 +161,12 @@ export class TerminalSupport { if (args.env) { command += 'env'; for (let key in args.env) { - command += ` "${key}=${args.env[key]}"`; + const value = args.env[key]; + if (value === null) { + command += ` -u "${key}"`; + } else { + command += ` "${key}=${value}"`; + } } command += ' '; } diff --git a/src/vs/workbench/parts/debug/electron-browser/variablesView.ts b/src/vs/workbench/parts/debug/electron-browser/variablesView.ts new file mode 100644 index 00000000000..2ed48ab66cb --- /dev/null +++ b/src/vs/workbench/parts/debug/electron-browser/variablesView.ts @@ -0,0 +1,334 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vs/nls'; +import { RunOnceScheduler, sequence } from 'vs/base/common/async'; +import * as dom from 'vs/base/browser/dom'; +import * as errors from 'vs/base/common/errors'; +import { prepareActions } from 'vs/workbench/browser/actions'; +import { IHighlightEvent, IActionProvider, ITree, IDataSource, IRenderer, IAccessibilityProvider } from 'vs/base/parts/tree/browser/tree'; +import { CollapseAction } from 'vs/workbench/browser/viewlet'; +import { TreeViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; +import { IDebugService, State, CONTEXT_VARIABLES_FOCUSED, IExpression } from 'vs/workbench/parts/debug/common/debug'; +import { Variable, Scope } from 'vs/workbench/parts/debug/common/debugModel'; +import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { MenuId } from 'vs/platform/actions/common/actions'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { once } from 'vs/base/common/event'; +import { twistiePixels, renderViewTree, IVariableTemplateData, BaseDebugController, renderRenameBox, renderVariable } from 'vs/workbench/parts/debug/electron-browser/baseDebugView'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { IAction, IActionItem } from 'vs/base/common/actions'; +import { SetValueAction, AddToWatchExpressionsAction } from 'vs/workbench/parts/debug/browser/debugActions'; +import { CopyValueAction } from 'vs/workbench/parts/debug/electron-browser/electronDebugActions'; +import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; +import { ViewModel } from 'vs/workbench/parts/debug/common/debugViewModel'; +import { equalsIgnoreCase } from 'vs/base/common/strings'; +import { IMouseEvent } from 'vs/base/browser/mouseEvent'; +import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; + +const $ = dom.$; + +export class VariablesView extends TreeViewsViewletPanel { + + private static readonly MEMENTO = 'variablesview.memento'; + private onFocusStackFrameScheduler: RunOnceScheduler; + private settings: any; + private expandedElements: any[]; + private needsRefresh: boolean; + + constructor( + options: IViewletViewOptions, + @IContextMenuService contextMenuService: IContextMenuService, + @IDebugService private debugService: IDebugService, + @IKeybindingService keybindingService: IKeybindingService, + @IInstantiationService private instantiationService: IInstantiationService, + @IListService private listService: IListService, + @IContextKeyService private contextKeyService: IContextKeyService, + @IThemeService private themeService: IThemeService + ) { + super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService); + + this.settings = options.viewletSettings; + this.expandedElements = []; + // Use scheduler to prevent unnecessary flashing + this.onFocusStackFrameScheduler = new RunOnceScheduler(() => { + // Remember expanded elements when there are some (otherwise don't override/erase the previous ones) + const expanded = this.tree.getExpandedElements(); + if (expanded.length > 0) { + this.expandedElements = expanded; + } + + // Always clear tree highlight to avoid ending up in a broken state #12203 + this.tree.clearHighlight(); + this.needsRefresh = false; + this.tree.refresh().then(() => { + const stackFrame = this.debugService.getViewModel().focusedStackFrame; + return sequence(this.expandedElements.map(e => () => this.tree.expand(e))).then(() => { + // If there is no preserved expansion state simply expand the first scope + if (stackFrame && this.tree.getExpandedElements().length === 0) { + return stackFrame.getScopes().then(scopes => { + if (scopes.length > 0 && !scopes[0].expensive) { + return this.tree.expand(scopes[0]); + } + return undefined; + }); + } + return undefined; + }); + }).done(null, errors.onUnexpectedError); + }, 400); + } + + public renderBody(container: HTMLElement): void { + dom.addClass(container, 'debug-variables'); + this.treeContainer = renderViewTree(container); + + this.tree = new WorkbenchTree(this.treeContainer, { + dataSource: new VariablesDataSource(), + renderer: this.instantiationService.createInstance(VariablesRenderer), + accessibilityProvider: new VariablesAccessibilityProvider(), + controller: this.instantiationService.createInstance(VariablesController, new VariablesActionProvider(this.debugService, this.keybindingService), MenuId.DebugVariablesContext) + }, { + ariaLabel: nls.localize('variablesAriaTreeLabel', "Debug Variables"), + twistiePixels, + keyboardSupport: false + }, this.contextKeyService, this.listService, this.themeService); + + CONTEXT_VARIABLES_FOCUSED.bindTo(this.tree.contextKeyService); + + const viewModel = this.debugService.getViewModel(); + + this.tree.setInput(viewModel); + + const collapseAction = new CollapseAction(this.tree, false, 'explorer-action collapse-explorer'); + this.toolbar.setActions(prepareActions([collapseAction]))(); + + this.disposables.push(viewModel.onDidFocusStackFrame(sf => { + if (!this.isVisible() || !this.isExpanded()) { + this.needsRefresh = true; + return; + } + + // Refresh the tree immediately if it is not visible. + // Otherwise postpone the refresh until user stops stepping. + if (!this.tree.getContentHeight() || sf.explicit) { + this.onFocusStackFrameScheduler.schedule(0); + } else { + this.onFocusStackFrameScheduler.schedule(); + } + })); + this.disposables.push(this.debugService.onDidChangeState(state => { + collapseAction.enabled = state === State.Running || state === State.Stopped; + })); + + this.disposables.push(this.debugService.getViewModel().onDidSelectExpression(expression => { + if (!expression || !(expression instanceof Variable)) { + return; + } + + this.tree.refresh(expression, false).then(() => { + this.tree.setHighlight(expression); + once(this.tree.onDidChangeHighlight)((e: IHighlightEvent) => { + if (!e.highlight) { + this.debugService.getViewModel().setSelectedExpression(null); + } + }); + }).done(null, errors.onUnexpectedError); + })); + } + + public setExpanded(expanded: boolean): void { + super.setExpanded(expanded); + if (expanded && this.needsRefresh) { + this.onFocusStackFrameScheduler.schedule(); + } + } + + public setVisible(visible: boolean): TPromise { + return super.setVisible(visible).then(() => { + if (visible && this.needsRefresh) { + this.onFocusStackFrameScheduler.schedule(); + } + }); + } + + public shutdown(): void { + this.settings[VariablesView.MEMENTO] = !this.isExpanded(); + super.shutdown(); + } +} + +class VariablesActionProvider implements IActionProvider { + + constructor(private debugService: IDebugService, private keybindingService: IKeybindingService) { + // noop + } + + public hasActions(tree: ITree, element: any): boolean { + return false; + } + + public getActions(tree: ITree, element: any): TPromise { + return TPromise.as([]); + } + + public hasSecondaryActions(tree: ITree, element: any): boolean { + // Only show context menu on "real" variables. Not on array chunk nodes. + return element instanceof Variable && !!element.value; + } + + public getSecondaryActions(tree: ITree, element: any): TPromise { + const actions: IAction[] = []; + const variable = element; + actions.push(new SetValueAction(SetValueAction.ID, SetValueAction.LABEL, variable, this.debugService, this.keybindingService)); + actions.push(new CopyValueAction(CopyValueAction.ID, CopyValueAction.LABEL, variable, this.debugService)); + actions.push(new Separator()); + actions.push(new AddToWatchExpressionsAction(AddToWatchExpressionsAction.ID, AddToWatchExpressionsAction.LABEL, variable, this.debugService, this.keybindingService)); + + return TPromise.as(actions); + } + + public getActionItem(tree: ITree, element: any, action: IAction): IActionItem { + return null; + } +} + +export class VariablesDataSource implements IDataSource { + + public getId(tree: ITree, element: any): string { + return element.getId(); + } + + public hasChildren(tree: ITree, element: any): boolean { + if (element instanceof ViewModel || element instanceof Scope) { + return true; + } + + let variable = element; + return variable.hasChildren && !equalsIgnoreCase(variable.value, 'null'); + } + + public getChildren(tree: ITree, element: any): TPromise { + if (element instanceof ViewModel) { + const focusedStackFrame = (element).focusedStackFrame; + return focusedStackFrame ? focusedStackFrame.getScopes() : TPromise.as([]); + } + + let scope = element; + return scope.getChildren(); + } + + public getParent(tree: ITree, element: any): TPromise { + return TPromise.as(null); + } +} + +interface IScopeTemplateData { + name: HTMLElement; +} + +export class VariablesRenderer implements IRenderer { + + private static readonly SCOPE_TEMPLATE_ID = 'scope'; + private static readonly VARIABLE_TEMPLATE_ID = 'variable'; + + constructor( + @IDebugService private debugService: IDebugService, + @IContextViewService private contextViewService: IContextViewService, + @IThemeService private themeService: IThemeService + ) { + // noop + } + + public getHeight(tree: ITree, element: any): number { + return 22; + } + + public getTemplateId(tree: ITree, element: any): string { + if (element instanceof Scope) { + return VariablesRenderer.SCOPE_TEMPLATE_ID; + } + if (element instanceof Variable) { + return VariablesRenderer.VARIABLE_TEMPLATE_ID; + } + + return null; + } + + public renderTemplate(tree: ITree, templateId: string, container: HTMLElement): any { + if (templateId === VariablesRenderer.SCOPE_TEMPLATE_ID) { + let data: IScopeTemplateData = Object.create(null); + data.name = dom.append(container, $('.scope')); + + return data; + } + + let data: IVariableTemplateData = Object.create(null); + data.expression = dom.append(container, $('.expression')); + data.name = dom.append(data.expression, $('span.name')); + data.value = dom.append(data.expression, $('span.value')); + + return data; + } + + public renderElement(tree: ITree, element: any, templateId: string, templateData: any): void { + if (templateId === VariablesRenderer.SCOPE_TEMPLATE_ID) { + this.renderScope(element, templateData); + } else { + const variable = element; + if (variable === this.debugService.getViewModel().getSelectedExpression() || variable.errorMessage) { + renderRenameBox(this.debugService, this.contextViewService, this.themeService, tree, variable, (templateData).expression, { + initialValue: variable.value, + ariaLabel: nls.localize('variableValueAriaLabel', "Type new variable value"), + validationOptions: { + validation: (value: string) => variable.errorMessage ? ({ content: variable.errorMessage }) : null + } + }); + } else { + renderVariable(tree, variable, templateData, true); + } + } + } + + private renderScope(scope: Scope, data: IScopeTemplateData): void { + data.name.textContent = scope.name; + } + + public disposeTemplate(tree: ITree, templateId: string, templateData: any): void { + // noop + } +} + +class VariablesAccessibilityProvider implements IAccessibilityProvider { + + public getAriaLabel(tree: ITree, element: any): string { + if (element instanceof Scope) { + return nls.localize('variableScopeAriaLabel', "Scope {0}, variables, debug", (element).name); + } + if (element instanceof Variable) { + return nls.localize('variableAriaLabel', "{0} value {1}, variables, debug", (element).name, (element).value); + } + + return null; + } +} + +class VariablesController extends BaseDebugController { + + protected onLeftClick(tree: ITree, element: any, event: IMouseEvent): boolean { + // double click on primitive value: open input box to be able to set the value + const process = this.debugService.getViewModel().focusedProcess; + if (element instanceof Variable && event.detail === 2 && process && process.session.capabilities.supportsSetVariable) { + const expression = element; + this.debugService.getViewModel().setSelectedExpression(expression); + return true; + } + + return super.onLeftClick(tree, element, event); + } +} diff --git a/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts b/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts new file mode 100644 index 00000000000..aba0c419a6d --- /dev/null +++ b/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts @@ -0,0 +1,395 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vs/nls'; +import { RunOnceScheduler } from 'vs/base/common/async'; +import * as dom from 'vs/base/browser/dom'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { TPromise } from 'vs/base/common/winjs.base'; +import * as errors from 'vs/base/common/errors'; +import { prepareActions } from 'vs/workbench/browser/actions'; +import { IHighlightEvent, IActionProvider, ITree, IDataSource, IRenderer, IAccessibilityProvider, IDragAndDropData, IDragOverReaction, DRAG_OVER_REJECT } from 'vs/base/parts/tree/browser/tree'; +import { CollapseAction } from 'vs/workbench/browser/viewlet'; +import { TreeViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; +import { IDebugService, IExpression, CONTEXT_WATCH_EXPRESSIONS_FOCUSED } from 'vs/workbench/parts/debug/common/debug'; +import { Expression, Variable, Model } from 'vs/workbench/parts/debug/common/debugModel'; +import { AddWatchExpressionAction, RemoveAllWatchExpressionsAction, EditWatchExpressionAction, RemoveWatchExpressionAction } from 'vs/workbench/parts/debug/browser/debugActions'; +import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { MenuId } from 'vs/platform/actions/common/actions'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { once } from 'vs/base/common/event'; +import { IAction, IActionItem } from 'vs/base/common/actions'; +import { CopyValueAction } from 'vs/workbench/parts/debug/electron-browser/electronDebugActions'; +import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; +import { equalsIgnoreCase } from 'vs/base/common/strings'; +import { IMouseEvent, DragMouseEvent } from 'vs/base/browser/mouseEvent'; +import { DefaultDragAndDrop } from 'vs/base/parts/tree/browser/treeDefaults'; +import { IVariableTemplateData, renderVariable, renderRenameBox, renderExpressionValue, BaseDebugController, twistiePixels, renderViewTree } from 'vs/workbench/parts/debug/electron-browser/baseDebugView'; +import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; + +const $ = dom.$; +const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024; + +export class WatchExpressionsView extends TreeViewsViewletPanel { + + private static readonly MEMENTO = 'watchexpressionsview.memento'; + private onWatchExpressionsUpdatedScheduler: RunOnceScheduler; + private toReveal: IExpression; + private settings: any; + private needsRefresh: boolean; + + constructor( + options: IViewletViewOptions, + @IContextMenuService contextMenuService: IContextMenuService, + @IDebugService private debugService: IDebugService, + @IKeybindingService keybindingService: IKeybindingService, + @IContextKeyService private contextKeyService: IContextKeyService, + @IListService private listService: IListService, + @IInstantiationService private instantiationService: IInstantiationService, + @IThemeService private themeService: IThemeService + ) { + super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('expressionsSection', "Expressions Section") }, keybindingService, contextMenuService); + this.settings = options.viewletSettings; + + this.disposables.push(this.debugService.getModel().onDidChangeWatchExpressions(we => { + // only expand when a new watch expression is added. + if (we instanceof Expression) { + this.setExpanded(true); + } + })); + + this.onWatchExpressionsUpdatedScheduler = new RunOnceScheduler(() => { + this.needsRefresh = false; + this.tree.refresh().done(() => { + return this.toReveal instanceof Expression ? this.tree.reveal(this.toReveal) : TPromise.as(true); + }, errors.onUnexpectedError); + }, 50); + } + + public renderBody(container: HTMLElement): void { + dom.addClass(container, 'debug-watch'); + this.treeContainer = renderViewTree(container); + + const actionProvider = new WatchExpressionsActionProvider(this.debugService, this.keybindingService); + this.tree = new WorkbenchTree(this.treeContainer, { + dataSource: new WatchExpressionsDataSource(), + renderer: this.instantiationService.createInstance(WatchExpressionsRenderer), + accessibilityProvider: new WatchExpressionsAccessibilityProvider(), + controller: this.instantiationService.createInstance(WatchExpressionsController, actionProvider, MenuId.DebugWatchContext), + dnd: new WatchExpressionsDragAndDrop(this.debugService) + }, { + ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'watchAriaTreeLabel' }, "Debug Watch Expressions"), + twistiePixels, + keyboardSupport: false + }, this.contextKeyService, this.listService, this.themeService); + + CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bindTo(this.tree.contextKeyService); + + this.tree.setInput(this.debugService.getModel()); + + const addWatchExpressionAction = new AddWatchExpressionAction(AddWatchExpressionAction.ID, AddWatchExpressionAction.LABEL, this.debugService, this.keybindingService); + const collapseAction = new CollapseAction(this.tree, true, 'explorer-action collapse-explorer'); + const removeAllWatchExpressionsAction = new RemoveAllWatchExpressionsAction(RemoveAllWatchExpressionsAction.ID, RemoveAllWatchExpressionsAction.LABEL, this.debugService, this.keybindingService); + this.toolbar.setActions(prepareActions([addWatchExpressionAction, collapseAction, removeAllWatchExpressionsAction]))(); + + this.disposables.push(this.debugService.getModel().onDidChangeWatchExpressions(we => { + if (!this.isExpanded() || !this.isVisible()) { + this.needsRefresh = true; + return; + } + + if (!this.onWatchExpressionsUpdatedScheduler.isScheduled()) { + this.onWatchExpressionsUpdatedScheduler.schedule(); + } + this.toReveal = we; + })); + + this.disposables.push(this.debugService.getViewModel().onDidSelectExpression(expression => { + if (!expression || !(expression instanceof Expression)) { + return; + } + + this.tree.refresh(expression, false).then(() => { + this.tree.setHighlight(expression); + once(this.tree.onDidChangeHighlight)((e: IHighlightEvent) => { + if (!e.highlight) { + this.debugService.getViewModel().setSelectedExpression(null); + } + }); + }).done(null, errors.onUnexpectedError); + })); + } + + public setExpanded(expanded: boolean): void { + super.setExpanded(expanded); + if (expanded && this.needsRefresh) { + this.onWatchExpressionsUpdatedScheduler.schedule(); + } + } + + public setVisible(visible: boolean): TPromise { + return super.setVisible(visible).then(() => { + if (visible && this.needsRefresh) { + this.onWatchExpressionsUpdatedScheduler.schedule(); + } + }); + } + + public shutdown(): void { + this.settings[WatchExpressionsView.MEMENTO] = !this.isExpanded(); + super.shutdown(); + } +} + + +class WatchExpressionsActionProvider implements IActionProvider { + + constructor(private debugService: IDebugService, private keybindingService: IKeybindingService) { + // noop + } + + public hasActions(tree: ITree, element: any): boolean { + return element instanceof Expression && !!element.name; + } + + public hasSecondaryActions(tree: ITree, element: any): boolean { + return true; + } + + public getActions(tree: ITree, element: any): TPromise { + return TPromise.as([]); + } + + public getSecondaryActions(tree: ITree, element: any): TPromise { + const actions: IAction[] = []; + if (element instanceof Expression) { + const expression = element; + actions.push(new AddWatchExpressionAction(AddWatchExpressionAction.ID, AddWatchExpressionAction.LABEL, this.debugService, this.keybindingService)); + actions.push(new EditWatchExpressionAction(EditWatchExpressionAction.ID, EditWatchExpressionAction.LABEL, this.debugService, this.keybindingService)); + if (!expression.hasChildren) { + actions.push(new CopyValueAction(CopyValueAction.ID, CopyValueAction.LABEL, expression.value, this.debugService)); + } + actions.push(new Separator()); + + actions.push(new RemoveWatchExpressionAction(RemoveWatchExpressionAction.ID, RemoveWatchExpressionAction.LABEL, this.debugService, this.keybindingService)); + actions.push(new RemoveAllWatchExpressionsAction(RemoveAllWatchExpressionsAction.ID, RemoveAllWatchExpressionsAction.LABEL, this.debugService, this.keybindingService)); + } else { + actions.push(new AddWatchExpressionAction(AddWatchExpressionAction.ID, AddWatchExpressionAction.LABEL, this.debugService, this.keybindingService)); + if (element instanceof Variable) { + const variable = element; + if (!variable.hasChildren) { + actions.push(new CopyValueAction(CopyValueAction.ID, CopyValueAction.LABEL, variable.value, this.debugService)); + } + actions.push(new Separator()); + } + actions.push(new RemoveAllWatchExpressionsAction(RemoveAllWatchExpressionsAction.ID, RemoveAllWatchExpressionsAction.LABEL, this.debugService, this.keybindingService)); + } + + return TPromise.as(actions); + } + + public getActionItem(tree: ITree, element: any, action: IAction): IActionItem { + return null; + } +} + +class WatchExpressionsDataSource implements IDataSource { + + public getId(tree: ITree, element: any): string { + return element.getId(); + } + + public hasChildren(tree: ITree, element: any): boolean { + if (element instanceof Model) { + return true; + } + + const watchExpression = element; + return watchExpression.hasChildren && !equalsIgnoreCase(watchExpression.value, 'null'); + } + + public getChildren(tree: ITree, element: any): TPromise { + if (element instanceof Model) { + return TPromise.as((element).getWatchExpressions()); + } + + let expression = element; + return expression.getChildren(); + } + + public getParent(tree: ITree, element: any): TPromise { + return TPromise.as(null); + } +} + +interface IWatchExpressionTemplateData { + watchExpression: HTMLElement; + expression: HTMLElement; + name: HTMLSpanElement; + value: HTMLSpanElement; +} + +class WatchExpressionsRenderer implements IRenderer { + + private static readonly WATCH_EXPRESSION_TEMPLATE_ID = 'watchExpression'; + private static readonly VARIABLE_TEMPLATE_ID = 'variables'; + private toDispose: IDisposable[]; + + constructor( + @IDebugService private debugService: IDebugService, + @IContextViewService private contextViewService: IContextViewService, + @IThemeService private themeService: IThemeService + ) { + this.toDispose = []; + } + + public getHeight(tree: ITree, element: any): number { + return 22; + } + + public getTemplateId(tree: ITree, element: any): string { + if (element instanceof Expression) { + return WatchExpressionsRenderer.WATCH_EXPRESSION_TEMPLATE_ID; + } + + return WatchExpressionsRenderer.VARIABLE_TEMPLATE_ID; + } + + public renderTemplate(tree: ITree, templateId: string, container: HTMLElement): any { + const createVariableTemplate = ((data: IVariableTemplateData, container: HTMLElement) => { + data.expression = dom.append(container, $('.expression')); + data.name = dom.append(data.expression, $('span.name')); + data.value = dom.append(data.expression, $('span.value')); + }); + + if (templateId === WatchExpressionsRenderer.WATCH_EXPRESSION_TEMPLATE_ID) { + const data: IWatchExpressionTemplateData = Object.create(null); + data.watchExpression = dom.append(container, $('.watch-expression')); + createVariableTemplate(data, data.watchExpression); + + return data; + } + + const data: IVariableTemplateData = Object.create(null); + createVariableTemplate(data, container); + + return data; + } + + public renderElement(tree: ITree, element: any, templateId: string, templateData: any): void { + if (templateId === WatchExpressionsRenderer.WATCH_EXPRESSION_TEMPLATE_ID) { + this.renderWatchExpression(tree, element, templateData); + } else { + renderVariable(tree, element, templateData, true); + } + } + + private renderWatchExpression(tree: ITree, watchExpression: IExpression, data: IWatchExpressionTemplateData): void { + let selectedExpression = this.debugService.getViewModel().getSelectedExpression(); + if ((selectedExpression instanceof Expression && selectedExpression.getId() === watchExpression.getId()) || (watchExpression instanceof Expression && !watchExpression.name)) { + renderRenameBox(this.debugService, this.contextViewService, this.themeService, tree, watchExpression, data.expression, { + initialValue: watchExpression.name, + placeholder: nls.localize('watchExpressionPlaceholder', "Expression to watch"), + ariaLabel: nls.localize('watchExpressionInputAriaLabel', "Type watch expression") + }); + } + + data.name.textContent = watchExpression.name; + if (watchExpression.value) { + data.name.textContent += ':'; + renderExpressionValue(watchExpression, data.value, { + showChanged: true, + maxValueLength: MAX_VALUE_RENDER_LENGTH_IN_VIEWLET, + preserveWhitespace: false, + showHover: true, + colorize: true + }); + data.name.title = watchExpression.type ? watchExpression.type : watchExpression.value; + } + } + + public disposeTemplate(tree: ITree, templateId: string, templateData: any): void { + // noop + } + + public dispose(): void { + this.toDispose = dispose(this.toDispose); + } +} + +class WatchExpressionsAccessibilityProvider implements IAccessibilityProvider { + + public getAriaLabel(tree: ITree, element: any): string { + if (element instanceof Expression) { + return nls.localize('watchExpressionAriaLabel', "{0} value {1}, watch, debug", (element).name, (element).value); + } + if (element instanceof Variable) { + return nls.localize('watchVariableAriaLabel', "{0} value {1}, watch, debug", (element).name, (element).value); + } + + return null; + } +} + +class WatchExpressionsController extends BaseDebugController { + + protected onLeftClick(tree: ITree, element: any, event: IMouseEvent): boolean { + // double click on primitive value: open input box to be able to select and copy value. + if (element instanceof Expression && event.detail === 2) { + const expression = element; + this.debugService.getViewModel().setSelectedExpression(expression); + return true; + } + + return super.onLeftClick(tree, element, event); + } +} + +class WatchExpressionsDragAndDrop extends DefaultDragAndDrop { + + constructor(private debugService: IDebugService) { + super(); + } + + public getDragURI(tree: ITree, element: Expression): string { + if (!(element instanceof Expression)) { + return null; + } + + return element.getId(); + } + + public getDragLabel(tree: ITree, elements: Expression[]): string { + if (elements.length > 1) { + return String(elements.length); + } + + return elements[0].name; + } + + public onDragOver(tree: ITree, data: IDragAndDropData, target: Expression | Model, originalEvent: DragMouseEvent): IDragOverReaction { + if (target instanceof Expression || target instanceof Model) { + return { + accept: true, + autoExpand: false + }; + } + + return DRAG_OVER_REJECT; + } + + public drop(tree: ITree, data: IDragAndDropData, target: Expression | Model, originalEvent: DragMouseEvent): void { + const draggedData = data.getData(); + if (Array.isArray(draggedData)) { + const draggedElement = draggedData[0]; + const watches = this.debugService.getModel().getWatchExpressions(); + const position = target instanceof Model ? watches.length - 1 : watches.indexOf(target); + this.debugService.moveWatchExpression(draggedElement.getId(), position); + } + } +} diff --git a/src/vs/workbench/parts/execution/electron-browser/TerminalHelper.scpt b/src/vs/workbench/parts/execution/electron-browser/TerminalHelper.scpt index 98d4f76d3aaffd854714ab3c66851597bb2d4f6c..1130091f6000e2e47167d1ac3054fbbdad827578 100644 GIT binary patch literal 15672 zcmeHucYIYv)Bns#Xy>qj3rH_l6a?uC7DTB*5H%Kf5Eb!~+&~~Cc<-etDi%=028xP} zu7VX26g!9oJBTP2#6l75z3%+Jb2iD1JRv;q=l6a-@B7Ca*vUCtW@o4Eo|#SmSTb)& z?=z!aI(F%-C5wnMYl#q(M;VLWp7h6Hk5V z_zwR+KbU~Bs54+u+BOOAQD}tf$@oyxsue2rC^RGyj&$`&)F&}Q^+4N7bxV8Zp)DW(R8!)>t-6_@ z33$?0)jmguVu;expJ&Ugj&$#5=!H+ zsx${CfGW4{RLCz~rK?NxHwm7ML%r50AJXgFms`sHiNKRv&IXenH3cnEI@kbsV^q<| zlV7N108pnhRV$1oQ>oMx_b@m$#ZXJ)abZ7}pMCk6GW~JMqEQ|l3`B>}p#~sCltESG zCu$V{H0?|^6%n*A4=R}F-iC&61N#|j`aLb2NI|Gn0uw>-7)Ly>v9A(w8qw7H{atG$p$O*-f>UGoS`PXdN1m20Kyrtc~PG%*cfK$tDYV2z0)&%5y%%*volqX z7fl>7F_uUw)jd)AQMLgH1yP%7%jfc$e9H2<%HT5vpK8x+l>T(00jM$zf~ZZ8&;Z#^ z1L-9B#K0|thl%ENKMnF|5IUbsrx<{c)aG<3ok}?d0Mk^V<}ioTWSe|!=rr<*fKF>p zr!x$I*A?$AsHJ>FXZiq{es1x|F^0}`Yk}3thk<-ZRXP(xX$_s>8k$oJ`5=%F$|)bq zHeJBS+AAl`imicc4Tr~cWv8GFrXdC(%ql&lrL`^>;d6yT|fkmDh42wQWrWJ&K|NTAntA)bwb?b85+0_y=I zxPTG{Ae^QL9WSp0@=97@3CF?XVR*?bY%UO3DuRte1s3zL_j%Y~CK`ZHa($pklRRwJ z9yTa={>hG)edt7-jxI6)q2&6&q^8ov1|Xcb5A~Io19>^U?u*^LeW{LVl)Mk3E9goC5Y9e;2FeS8 zyilnRGIXUQ2}V!TvuL`qVn&2!VDhM;%blnP!G^D*s|`S?Bsp}ttn+1EnUY-Xlw=U) z&`en?&l{RqIx>f@p;-nXRFab^N1mf=eSlIWxz>?;3Y{v?2J&nv0}Rb_4TI=pc_xr& z{-GpmRY{&#C7G7y-_wCSUFm8)S+Dvs5#>6%-T;L9G87tg1Knr zjgCp`8D?kEY-Q4%2+axgCGOGnKzI|~Yyd)i84gXH>(N|P-$J($x6>U4Ae?tNohMHQ@?@F?cer`aqY<(uL)NIi%uBELi9ntx?d#F4nC(t^+|ZqF zwpWWH4==Ek?lAzNhK!*?S>?;BG7Y)MX-Gc&$-VNJtTc3Q>Bup3A1yNgp@xj2 zG4d!a_W?>ZWVs`7G!@8-KvtA4*}zwal;_hZc_ffW{-Gg{sfMgn4Y@nbv4;bBc%Suo z^0?~6%_#TN0|p?}i3F_uL3+plgmWY)DGvqmP+BJ*a%@RLogU7jhm|dlM6iXb51HW6 z13BNO}F+D+R3_v(9{EIvo$b;!c zLkslSc@a&O2QuUV)rrT`E4)9D`%C+Jv1LY-BA%kB4M3;^)96}yhMqM5 zCGXSeIeOjzgtJeh%Vb#~%l6@!q30bDm%)9k&7!rs_;nFlhgd*Vm#>=ftds9_*zpSl zH}-VK!;u|9XXR;qL&Ros2MZhTb9x*K0v8vyyD1& zZ;~Z}EGb>Mp_g65bebWH16lkJ&A3-J;~v$Fr_+2}6v(1|R_V!d)r?0`HqfgEAk>W6 zFz46kbpsIcXg1A}g@G(gYsTx2Idk9u-pHailsRuk=*>_w@KN5Xq>l_hD2@fR zSmx2kK0v8BK6bOgtH^DE+*Uf9p^sbx+>hKE$gTen#~mt;+f^J})5P8q$SoBe^yN;7 zL>B0fcU3q;QMSokL)(;WkCxMNxmj+KIV?A8r<)Ya(J^z00vvA3j+g@-v+7bknVlhU z=>|Jsxb%AXg8xKrlp73vq909+;6o$1p0>+%K7KXqm|L8P=N6^n`k@3%#82&#kEZQz z1&CP4wSin)Zk?W7r=;Ad;06VsDETL%d`h1gfROwZv_fXdH8PWBmUg;E!A$M>8OrDM zg#ie)V+9<<4%%q|LU*tN4rNys?NVji9iiRI&z)(0ULDBQRIM{*sC|xJr*G*y0}%R|=javso_;U@CGYF$NBYSCgsXWDuH@$|`dL@=ON4&GXDqfS z^(sF(TGr7Eaz!9lR7A@U4##>pfnT%eSHWh`rUo)~ABSTYSk_ym9VOqz@t+bOfIMZ;3>UqEEO+7T3^O{0RGCvIdVP8m{WbZl_P> z!ay$kH!?HRESwSuVj^XVC6_2;E>_0;MIHxS({SKexR>_IWSJxrSte_zNeVQaz%@|} zXBn7a$ilr?crC6i6C`E0mSf>w`i>)9$8f~Wt;(7VBw6Ws&u|^L)UW7UuA9Ymb*c3t zTn`N8+K!<=(qDWK*Ef8SW8jbU8#myFh8wtvexzR{5lAAvNW%?X(=YU^ToA|w2cV&T znp@)o8J|Yv$pqy=N_mil(uf-yZWMBh@gv1jB;)W)JK>9(1yb|4F-j9|YPbn`IjCh` z#m%_6;b!4>0_i`-Ej(_4Zc#qiaMU5J#?_=y#>yBLM0!||C}0_*2obO1mVAiemLW%g zpfMlHtqddTgfBR}*XP!Jm|+B;24Ylot}g}LMn(rxK&?AdBp>msqT-^F6OvO9Axp(Z zx~fx)i~67nv9iIjksc!;#cla;!)-%;0F9ARfs8spP|V}QF|eKF8%D%Qc>$?PJdk*W zVL4Cou_hU<5^u0aB~?E z$cX(CV7P0jv)r5ymh*f;6v5Z%oWZ$T50c!9dvG_8yJ7O9_-MmNDVdDwRx+HA;bU2b z6V>En5D~9c8i_3lz``mii;q<+=pNzj2+?SqxO^=2ACXg!kH#d&aSy}Cl}^%;kLMG( zr{UwBva|vRdU0>Vy&To8xV4=)sF zh?hq3(WUY1(ujKu?@@Abh8fNd)Nt2Q6u#NQK2Hqc|la`_}4WH>yuF!$u1aweb5r?8x<;y)SbhkDW6 zL_C&?M~mW<%7XAt2ToBAof_d&5!;GlZ&fYOjFiUDivTBuJlaPa5Ch~KKFx5BlYLK6 za5|r1_;l5dDxjf1pDAa^>4wjATttnW#)Botm(wcc;$X*>p4>-H4dm1`7d=rQCub-) zUDq3L1mXK;*18jd;BJC)Cn{=W2A)5CHM zk8}bU#HUJjAldt6E6V_7+leZQ5ouBM3#4Dg{+Ne@*j&ytoa=}k#-ljSaOZKiy$nO^ zC?0Kil-pj;=3ME^1=1&wz7*+9rX<#1oIgTcHLw++j1l;pF^=f7d4%)|q*uiRNN+Wv zK1wil1>F!JSi|{g;(G?t(=B*(+)aiJVRU?Gn3nN457UihnC@8T=1222JdTUx1UcT| zAf;zz9?ix0H{QUuL-QWZW2HwRJ@$*%@ObAi#{$!Fz8qKP=8GJg518Ef~WEX#vyKkV`q}5%CS62jtS)0irF~{>zgdt zNhUkmlXyESkfZj)&ZCu`$0$2-cvE&JIB7VMW@ooRx*cd!7iF3ty6&-><`llr@DyjJ zvv`(tl_TW{maf|ANCih|&kIp5k}ifXa)OuzS2&d~md=7bc&Zb`EWVyE;Y$r);ubTD zua%C0bgbZG((t8D1lRI)(!rMwU}gB#!U)sqPCJ_);%OdF!?c(2<%SVxMPdlmxAPTz zrQs{w@Yy^^+WXS}A6wp)q14n(@pPVHc)F9?T%ITGd}*h4mzN7^&TwST;kj~nAcybQ z?mR{;mapQg4PWKRxPzDQOuokOOh?8Ye5bVarELir`LRNX1z}gs#V8rzgki)~b?2SW zi=~Y(Z9+1VP+J#-a1iXuau~?5M<(`+Ovg%=Gy&W zHO=NuCzvz&wpx4}&!`?M!GAmG%fPR(E(x)E?#ZS%B8x$Rpey(&x z#f^%ie2aVcqq+E|D)&=kNUET)K(BXzH`KaQ_uk{j7Z#MRqD&*rV&vA?5LPD#O>QJU+rL8VFG7^|&d@JiguVJSWK2yjq$` zQ)$A|Ol8CEDaT10|oWbQyKwKTXdh#3k=T>yDPWkAgL#HSq{>k_&jE*tB4n%EaXLo7m|m> zEUs1=Ud&4X!p$WdSqBav5=fo@!l&R;puLChHGEHK6Cs+~fz%FnoLI>gTrF0*0V7ku z_em|o_ocgM1(Kz4iOd*|FM#;U^rV(9F{1jvB=q1wJd&4rybK7I^ZkaGho8)-9>EXr zgN7fVjI;2TN$2rHV)$Xhi0Z@j;}X#@e#GNPFmMGwY7jySqi*%739sbG3?q!MMqeM- zi&pV!!>dB0$9)7zxTwCIj<4MsON>P{Z)!E_BiqbUy*dUR45z6Ya9n#(hz=HGWi+92&yXwyV7a=tjEX#@N@jU z;pZF&yV9||me(0x>p0kzj^-D5z2TDdfaaewe8CNvl7s1bM+Po;h!==Q4Lg%x!a+R_ zmOf)AF}yC#I}Q+V!%dN@V3%r${#G5~=Rwem0u_1DajZM&e2HJSVy$6h8v29w?sOu* z!W#^~q6Sh0@5l42_HX-_;a43`wdOT`-Ec_~0QW-dpMm|ef+-CnAE10cj(XTX0{h24 zYRmR-*qg=eJ;NK^e7z`}->|>i-weN@#~P2c=1qRf@SBcpy{Iq0%^MBB?G&#!^|inH z_E)e?!!U+7x;cAMZ~IGNf2ovh$U|s65Ls#avu}SccaCBEyVCZX(uR}@ybyxqC-Wx5 zn;ia=XpsFWus>CT-?Q+0Y^~ZR#s`vFNoT{zM5$%r(gnZ6n+?B1`sIrc`8M`P-|Cep zjo298>k9Jd4esFrJ9maL&-1)90G^nCa*@m{T}}@c`gjmFp`4GF(Bl3 zYw^4Px4r(a*>f2dWYyH6;>HJW_jo%He9E60{vSNyeM zWNp+2+fY0HhQBq8><$j0I5)JjJAAt%v_TCTeCyVL`-b+5zl-2WOk_ZckZ4-3ckhttyja1MVO{?iEzw>s?> z-)<>$bMLA1Lf)SL;=c|5Rd(#R@7m4w9k%bPu5MQFj`l>_5*s#ld7JLJ(Y|fpV!Kg0 zy{+IaRqaiB;T;~cR&C0l`u0u63C+IYvFCXi_I3LjZpZeaU0$YF#lC7c*jMb!_9gqG zU2k7t`zG?{EL6{~vuo}1_Bs2kea1d*pR!NdHTDVnxLs{m*~jck`>0)EAF&Syc3p)b zslcv1K)A`b&sTESIk3^E`{*vDO4>E}YZFecm8DzsG!9#gPV!J`URD0oD{!;mI~$t%375w9x# zWTI0^bfpvGFB-2-;;w3EIx54yk=Y{)pZ?Wq+lR0zJZK;As(IDz{XSkB?)Or8U>_`h zBf>ra1@NjtiSLGK#deWhNW<*{5Hy`; z<6_FgxP$Zt?XvT6XW&<)L~C$ezRlik@3ME=JM8Utp1sZ9YHzV~?alTkJIA+r|44&< zfxWjv$=y?tS=KkI>2i5VoD5O*jSXidK+LdWr_8` z-u++D(YyAmBEG$|#3}gp4m@ez&9}GXNwZVFomWYg#<#cW2z*Ti_STB6;FkUBpKs@4 zuznQ#_GU$c=%;UQ3ZIhWeT%!4VVo>t@8_qsXK&2ep1mpO^X$zzJF>UrG@$uo7mUGQ ztc@Mrlz74Jg`Kju=4{x5KR>CvaBTDJ6**e9w|(}eVN|@~D^xdd)$6}*S?2jLtdjoSb1YE+;(2(-<|wh^F!Iv3dLcr~}p(crC0+(P1SzF_2ZTNIp`~Hp*LvqH{ z$~mo8mglKgn9WP8AwLSd#BEM^|v{%^6?PYeFz0_V}FSb+dMZVQ5Rr>Ae+bi%iwm28Ydb!rYefajW zO5Myf^mCSXDW3H6*|(R3PpK)sy%p>rG1u){y? zaL#9+L&Y-3j>grKMLXJOugqDz0A_Ja13F^S&ho99OLn!-UX`jrSE!7n@nQf&Hj}OV&Qwv&?p;~hxe{84N$zDy**hzuCup%duWpOb+(@ylVGVDa+ zEH4Y1Z6^eF!aid3>||8~&}&mRX%qH>z^3-;6WHW`AnHV=qP(C&Q5yW2?eBKHEw)8= zoGr9tEyOe)Y;{5`#*-6bk=BJm99O9j3(?Ps4r$2H3;T8qp7c95Vkgl+h^bEl>iJJG z;TBVyg*(cN##^+rOmNi}mI-9HN@e4aoL#kQ`Sx|-)y>hz0nR;Td6~rZJO~PZciPaa zZ42z^EUz|YHo`VL%I4d+Z%3i8t}esoXZG-I9C4(v`H68(^9sI^@*{&!C(mOECF1PoKb@42$eB+gJ6JvO&Qs3SL(5l7bf%;Br6P7l>l` PYfLCb%|Etnd+`4O(TH8~ literal 14736 zcmeHO2b5IBwms(#$$P088jvKRMNyC}U_gA52H}AYDu}3v%}fsr3^Ul>fMCLe@fk3n zm`LV;fQk_XOemrt5)6nSNHB+I!a9GSThr6P8;1AR|7-pA*ZQq>rf%K3Rj2j|RduT9 z6H68h?r}!6W4n$WG-VS}l^hXb@+gauA%i@RLAm~_cvJ;%s!}xrl2wd%_=%7WQ5M3brQ|JHvVRRcFZ1qP&ixPM`ohUG6EZcXY=U8B89 z$4yEUjU1JVw(Qj^dP-4#qBL1rm_m7CTxlYfDk?2$7wu7891SZaqltJjo|q6XXy?WX zjOSB!1fxz-6!?|WIGRKWDx#4zDlBV>(pGqP3d-{Frj(LMh2`}V_@Wf$F_aV`S3>Pj zy9X8Hzvvz8-l>AP3b1+gps&7Ebf%%OZP(zmA6qp7;aCkH| zDjqE?EiNvdSX44HnwnS|9hWE_7f+;$;>l<%5sxCDEJ~*01<{zQMlxDZR9F~K#7k1q z#Q2hAw6qXy6eXjB;)$_EC9&eZ@nU=uP39+x#-)_OY-*^`HHuIpS_~PcpcircErhI9 z#-%h7axa0t=(~w{jzS|;PsW9kR;^H}N1-8!@Jm;oM0pZls2=FMv~Fq50=z54f2t{Q zw5__Cpz+A*Th%_thqe%tt*!GG$n$AuTGIP?{f_TGAobR1s?yp=NYp z8K-erRR)3a;L43V72>6%bY&TQlfYyw%C$ss$c%4av=sdbXeWOU8%%oC7`#O3Py^zP zRz)LE{z=UPklG!ndT}h7N~I>b%%IdHL(PfDhV@u}@#Pn);*U+1jP&SGG;|mpZa~6@ zvZ$*3Of3SC#vQ1pHU#Y}fC?74ry=1}zutygxF)lxiu~luPvuP>jwX+wBMk`T;LPAh z`9Z#C`B5$42PNOD861h!l3E!MuL#^#gIhj|S{sn8eq~>NM{VR=U%sOT?PBo>snXcE zaV6u6i;1S-gInk*{0y}rE)7RV@=YM$P>l{$C6*XDL1Fn;C!5w~lMUZPZ9TYs500$8 z0V(J3YuP0`S-w{0b}8AZ9JWX5KphQ;mk4{vqNAyk0V&6Ghc7$I25+cShLi1qY^PcP z(E&I-Rg@}@Yoi^JI#U+|5;j@|v)eIrtN{rdtpXW*<;z#)jUJn6bXy?XD5nDj6H60g z;1-4#6oD^~x*#1##~YBa%^GmNUFie^61G_b(00qFZmPT|M(9KZ<%CSLTLaljjnFJS z%*aG+EWk^aKlH$ZN5`XwztKqsBP1> zRI>xsh?h(lJ|UJ!D%U3=^`=|{5(=Ug)sii;S-xP|qB7X5W|6;=oAAIvf7jmr&B4ZY;1m`6Q4}sA>mdD6OH>-HWEwOg;|e z<2{s*Wup$@Gp&`Efnq}-8^X_HI>O>(}d)tks%>k%ql&R45-9%mHC<9l->aDh4E!Qb#%#&K|NT zBJPOZyU?-nzAx`XM#)s-0z;#nd^_UJ7+ERr85)!RvJ0k-u?8fR@6psnR#1r#l9q3Y zPTQTafHcs3HIPXiJP ztQ(Br0!kQ=u$yjlqP!i*+Zll+9D*mp@RHe>Tp+Mi1QUk}EaqYE^Dw_mFd(7idP0#V zdYG&|Oi=Lr7dk9^(#cpIU1UH)$@PRuT}+o4kg(sL)Jxt9dVq{CAroq zNq@?t>tu<%X6U-~mwB+L8w^OOBm*c4{NT@Hvpow>QbO(y>r0E7Ew7p?4@w@15 z0}|@XFt~sjbdLcE`yEE-$%}!!n1SFP*Y9~WTwchM7gS&F&W!i@K%P(6^=LYJyH^$& zy4UrV4<_!T`wd8_ANjDl2WX}NDSIxYSv1>#guUlefjk$;bNkFFhGsh^;FD-hHqFt& z&yCPrbO#NY>Ev7pFYq8eWI#d<8BN9VtS`@&Ysf=RLki(f9+qchp`nM%hM5hI@Ad) zou5F1^W{lH^PNsihD|N-XaR~B(lZ7m)QQP3=V$3T0}|@QWV(bF(enl*>=*t;o(SZL z%%Gol{a!>D%i~${xa!1nnGrq~$Ybfc9zBEJUJ!u$g6nMxn0S$1G9clsJq70fvOFRW z8+zG^LrY$v#Reo4$K`aDJVdYhAZc;D>Uz6^u9OD@c`)6Z!FDHPc?w-Fa|4;XmpC3# zaXhTzcqzl|oIvJOw49SiArg5~Klw<7GX&{1fvUcyYRxJfPpq zCJL~GDPKtRb70k>x^jP(Kobo7TsZW)*rzR#`{Z6jOLS?>*kU%6duXZ5@bRZXyZq8b zJijCr*X1zWEq=Aimc~on2(T}ey92pphS$L&lQ%PLxJKtc~Q69)PrtuY{F&kxc^wAO%xqnQb3 zvM!s}>1ftRXgxM7a6;-;);eD1&|JACkXtI^WsPg&LHLag*|b61_&7oz!~9Or7O*Nx zZ(nW>F2abZjkE@G9i)+V6$J)W&;xTy?_?Vb%9*BkHayv*|EM5cDp5;wkYdgM(9fw<|c>a zixBu$+GapP?$hDba8rtc4c?CwZE1Py{FJDLK zYk;gF0xWK}yKk33<*y0kntx$)TL!|ZflSS`?a2)a%=HS)Mx<}(TLTh8xPn&5)pC_w z$#S(;x=P8FTJu|^@92925<<8FIQ>9B$`x|CK_-N71ytuJ`q_Yl<61%Q$&^5*R6460 z`q>TjJt*ie+4PGJ^`8;?rvmz;19S}p_bdHoKtcf5Kx2NVKMY9N(HdGOmj!ZJW{`&d zaIech_|Qnw zz(a=;`Idf?L?DR@gD;-wURTCL!h8^6Z=>VcVYqrm2p0r$0oCh32c@v_j;EC0vTVp_ zRdkolIfkFoDVbHJmgvxM~ZwYq8h=7($Wd3#Q3;jgu8U#j~^e-EeszX zE(O`=Y#HUtD2y;QB8d?q$ff93hjNV!WaNG^s>xBz(RHFD5@D=1HbO&-g^AJ<7iZ-| zb%aMm_y|PBqF7pM)G{4cjo~?p4V^|;3-Lzd>?x0%Vx&h(q2VLLXc*+$MB?0%Tlo?% zoAL`vlldwMf!EQLpSmz*xTWK{7UW(KNI}NBt8pvJl6*c&M);DCF^(xL!WfTo_3Lp% zi3Jkd?-;8IwsM|8fjz+lZ@8`#e-ujA+T+&Xw+**7+{Q^J%27F=+i`oA^Hu!q5M-_! z%}>N*sd%&`KCwL1>U5yJBGe(m9T35YhH>3^81vL9X$dr9Vu;Z`+Rzq#cI2ZC*752n zILfWL6L&V;NqMM>=Oej`443l^cX249M27J(a;`7KDn${&IF)>q50i5OIVXdnC+DJE zhATNwVdxyzB>d#;K+fJTejXnUc8}%b3?HlPDO_!2sGKE3SP;}=IZMe9HDrYG_;~JW z_;?4V);yC>;BG8uDwrowJ8B7A8XF%w0wH}kxoE7UAnHPm(SE&gaF77V7ltPR4q%P_ z@re;W5kW6!WEz4V3*}Q#RRL3Ff$S1p*Z^=<(E_NWLf;QDI(IOjbyXl2qJCNE-s7&| z_iucXVHX|5$d2dk+{18pCx|u>OHUargADf!O%F9XaWC#|xR*1%_S{Jja63ay55qCs z+X=#(Blb)`)2fLKp+F$fJen$XP6L1#fOB!caQs^yHgn5of5ivFgu3x zc%bwbFr62=d6W(0)A)45r#Y7Tfx&)(^xJQk}6DR@JJ*` z@C+xxGdRYB`Aoxuodkz*OiuRYWPAq&j2b@E!FdJ`;~{*O;UNyrK|D8!!kMdZ!hqnO9G8PKaP|zO=Yb}5>5mTu^6>anq;vRO z!{<0NE#_kBA>HL9mL6KEyONW%=DA42wY!3ROdq2hn@OG^#|Coje(lcV z0g1vmuhoQ$WU;Ry^5 zNt5G>W0P=N8lO;^b@C5hwca7*SnL2_`nI zAJq1yLh$2xg5mK_I#c-?=@>}I3Y7>k!!*Pb`9i}J9mLo3P13;^oQ?U4gy9QaTi5XQ z(ms&(`-fPLRtv-V0!uf|VK44+1Zk4AGd#&z$?bf*w3Rl}nx(DQY@?*LR&S@Ki6=N0 z>?gPKY?DbMkgL zWZX~v%8Ikz_amzZK7iTC{RBUvgQDr@vcCrnP8Agw=^?&GX@J7Y>5nhNyNKpj54^Gq z@=P_9qpX#6mSO}g`}XeIW8ApnqOybNu2kMcSK5o|Y^eJywDatFhthGu00X zXw{13x7x{Wo_aK4FeHhdFhVX8y? z=sdnf8u6`$5%t%tc0C%((>$Jr4{zh!4c`{J4-_AQJ@}o55$0FdP!Cs4APB?LL)U=2 z6Ah)IFAd=u+|+%S;~1Azq(LAJs3}%G`QsCMx1?;C=|?wMgDro!6-MJyKal!i1OiJI zR~xqng7WoCzXFdD!sfdLo6x)6Mzt~cp27FX!BW@o3>VgJOwIUSzR&QzuIa|qMCt@m zr_!bk-{)%M;)m1@q;`d}F}Mg2BG{Y;^ZgRx2Miw#m(D!x(pBToepLSlId~5MPI?sn88pffaB8CQeQ4TNq|4I1&)+Ee01m@@M zUxsn8hN+d#$2{?ZVH~!qSaDOs?)L3&h+CsVp8X3-!&f1_$S)ZV&(S=UzWvkwVSi`) zCltZ{q2zb1`4ZC0{EFe1-K?2S5njx%8eUvJYuexVHT!E|f2(-o_8MAPV*hD)iPLiJ z>zBa(vXATVEaKgs{Z-8qCv@s|aYulcdW_``FXPt@FH6sOx%>vdY50xwjMtmrvOn|N zhTn1}_2?vCZhzu;4CAOtn`%j2`CX6SMN=#IJ;N)U2X9Gjc_qJZ7$-n#sV%8Bf558@ zL0*`F#! z=N*T5Lu$+$_+!I30aN$Xh#K3ke5)7ToNxTtvC)tk*=>Q{c0e`)`||MTm6o(K{3M4z`G05lf6N)a4tx64erfnqr^|idLOwJ6nG-8+3)(Hd-BRuhzf>28 zn*zL%KR3Lwd<$VW+b`@UwwqO>zfiJCYvQ1kH(Au&l&QJVer7*qyHP8BrsPvKfY0?J zHT-H$Ey|+m_7ncXerz}JX5PYIvi$_RJpO{J+VyswU28wGYXZBz!a!DF*Bu~8<=eHD z+=C75NB{O-Ca`NN^5DM3p>!B>^6iGQTsCi}>b2~LaF46)D&ET5><2y`8|?Q&ZeUmM zdC$PEQV4K5Y~Qyl1N;6S?*h9regB~rZ^M%4J-fobOWo`{)YC4vZ`-%*n>5V6fuP9M zbSsYF=h1TeI!@s?;3#?*{lb&&GP~3+v9H-z?PB|iec8TbU$igS=j|fjzE?Jaz^+hl zxz9!103H3yP1*oGS9T9Ju*=n{?s1FNw{Mr7BUE$&!?$mN3B5rYU?h6gBZl252IQ_R z1{h5F9f-g#`w!%|bid&m-!4J(x&rX+Ysl$ImT&bEo1XXhc5x-=9=?4=zrfBTurF7n zA%T6#b)4SX?Gc#v?Th$WH;}%4L7PE5(YMcsx#T$CF47z#PZ9e8-@7SyRoo|89JZp@2O zB=>x(owsxo4i{_3sLs+BF{;}_%ff1J#^_*uGhAQRYw>30&Fe9$k2l$P^LnN~jP~&)*ZQQ00%Ft>PJQmlarbB5wo`FWwO#NnU za`Uy7ys$+Y)0(1qc_=sHpW&}~yImOA=l*T&%(l28R>dyh9a(k(dD*-}14#4j(}A5| z;eI@@Pw%r<@hmRI)#9(Hnw@8#vQOG4?Bn*az|Pyx_fPHfePEwF;L;$lPgEL92<+pP zENcS$SOsgaTD+YCUSuD&kJyLpL-s*C*UquC?JPUfw~xXAbR*{5N01v+nh$Hlc0TkE zzI~`tKk^{zIn$bpoUWIAJ15MgCi!+Ya=L-`?JUiemZIgE$f*~I*oBn8sWzQkpN1aw zMcZ>WZ-I(c88hk-@@8*sle;i)&P0HOZ_0G zp7rUZy~Tu^6)k6N-BUE)>}}kgB*gb}Ckxr*uxS+eL}LqesS8@7qT--}id!5*gg{7Q7EnUf#SRkvT ze9Gffh<6A(Sfu6_bB)2`z}!UjVhNTS1?L)-pNQ#LhUG?~qdyrd@T5`j%}>N6uJ*VZ z8D&VXsvTD`F4oX!y?8S4ViIo0$}m!*6V;Wkq+9=3z z+MkMPY<1a+6t}Ud;W~rW2-P4}<)&f{S8=7mn$DF|@f4mm3Qj*=IR#VsB-XkLDQ;!m zHKPsI27cawJGsK+ih!oL^-!6y1Wv{jF88<`>19ZXHH;hw2v=EHX{DAXsaxi8*+FqS zTmxlrfwn*58KdBwqB>{demslkjDl}tCT4M|$ECjY7!WsjF5qVtW@B9#>nuOdXXAOK zpf8#nJfj+4;1Yuug6f!~IegKFBt{DI_BUJ{0SS3f?pkT@DN_cMx)>xo`bnu z>~V3jIyPFn8vk6(;}aoju^4Pf#`w6$$2)}`yrkw{p%&jOfw}qW#U{LJ6#R_L*ZO&l zk5bF^wICyQWHVkj3VucwU=bJM4OgKvBX2l0Vs+(%6G$DMXCn8oY(jAP97X58!Ry@A84f zsBk3ycHmVm@;KY$>;rsvc)!&?$HIdac3GGDYx^_aF$%s*t!U+aOmLR)J}Z>4Fw085 zqpb~FjDnx@RxOUd;9aBOZ}e8J{`cZxyk~1@Yc{r8lHN^{G}GfubSXoqa_k7JZ;Q6S z;(eo#a+&7gS+%eYAMjq@WAwv0)gOBvf5Ud8;Mb8BGiP|5fy^>^DHPK@mYeyP<5cs=ZS^p3_jDmlJtk+ukJKBvxM}H$e!pBCzk7vEs z<0oN!V#E0~8=oQ#l^9{qi;n|mHsEDW_c;APXX2gSvpfX&$E?zzgrSjNfA!dSBZ=u*)d;xoJZi@8VS6DZI-HO|@{RmE5K6b9`YC|2!bG z4PRh4zT_R8V)Vl&vrSX-6}~nKKAD%jLdn#w(4?6JOolZ|gI$zKLs zZqrEqiEoX9&)qiVWG}u``+GYF+VL;!GYY<~ZP?D+J>H%S)L>s=X1gX}e;E6%neVgl zz4BazT8uOJE?C=+k9eEM+kWNew@DIj^?0k*9q*_v-eI|!V!8Q3+rROHQSe#ZjoqBY ziHr*;S)qv*^dxfdgSP+RN2B0Zn{tcj7ej~=wGs)4&GV_dt?MY;{XRw(~Y;@V2 z_^`0#9AT5{qu#=fWNOQjY$I8I^kO7ma-^$~9P3W1_H!hc4ZO}sZlF#_SkF4vx~xyk z>>9C0wL`t8g}U2?*D06MH5vL?k7NA;sjbrUx2i#(9*$&d%VUj^ydahW^*vt-)Oyg5 z$Z=9AMMeq(qoq>DF&r($F2|tom_bbqdV(}vU)x+$lQ_R9Ln~%9kS4_lv06$v%4M~l zGDEAbZ!%Ki`yxll(H!Y$3MIxE1Zd7{WqudLMF=*(8gOvcpYN|B} zs?^m&5a;ZHIvq(rW1w2mU!p#5K(YO>BAvgW@Ajx{PQ0F15^+#;>`ABB*Vj~6#+s_@ zY8y|g9;y@{6RWR37KvW@XT_~<=_cKcbPEcspY-E3jPYurzTbrU+7MoClhR#V59w*7 z2jn~*?I*vJUPgKaQS_7ktO&8fO7_%t7_TyNSfKNGIi6SY3SKU}QWx?H3;Gy!7{5vp z1uB2Ilo~nQm$$+2G7jgZLcL&w!!2BDHJ55Tf|nRMA}M(>hjFOzVktmATO6g<2_zA)&&8u=GZkEMA~j@(@O~68i9bmlq@khf3le zhy3Cy)}56lN2&h7JkR6c1Li!Q*ZC63l0N9kb9oL2p%2eS8PDRGEayO+%ReB7Mtwld z#KZckU5EF0hF(=W^|aovl@Q_S9Kh3fDo^3bF3;`XaT$6%=l{G@Jk|fJ3)SP-qdcB=PK0=je2HFl`r>w+%;VRCLJY(cv5$jiGD#)yR!*XqO0bV#wQ28bf}m9rMLD#ZXXh zrz(&eLt*KrWy6^P^@zfTO^j?RJ6|L(e~ dCIdZ&4I366of#dH8EdR;&^KVl4?A|O_!(;|xy1kg delta 3024 zcmZuzYj9Q775?_QNeJg;C%GZvhNPkN2Q!MI=}ehv>C|aw%#1wrQiWnb36~H;Ah`)i zc*w&W9wGuN`=S!%vJKJk*8+gzM+LBu|^A6)!uLnYq3rXSVO)3G_1!4EubpB{uJ(UxCe>(P-TF|2B-=VOu(O<4kyx4@zS|Cu4MATsxwy=@AG`7HsiUl*W z72C9c^$Y1w$1Lu|c3U99F0LFgMq|6b+zia*4u?D9u5I%Lbumomc8A-MoR5S^b?F2^ zvC+UT6T#-VyW1RYLwY_^CYD7>O>!!EA1xz1gf zlN;06<$IQiEUt05<|h9wt~E<+FtFahdE-_uX^jwi8-2IxQP0(E;3~z{MybKTDx=vX ztr@$ufS31rEX5v3dF=7iS&zk|u`d<-pc?UF5HA{{_Qr{N!Ql(&kdHud#Ykgsx3rhA zUkfA*ku)t67hc9IT*(z$KCFAZv6VQ0SG9mwOUtmF%N;Iv(=#$-ulnmQ#|kd9xlEE< zQ4=lIc*XaxL9+Zuyru=L5n`)Bvi2t&)B-p9>+w1cX#uYs8>E2WNW~k*{lh^VMiPoK z65TWo`HM@DbE(6nNXv&avC<7?=-5Gj?s}=lBdIuI=Dr!kn@GT~&CJ*0;Xm*2`J2M$ zN<-`lL&Sb*NAZ>x@G7GTOmAl3B_GKp(FsKpBGok}H}CkqH%pREq~e6}{bUd)jp(>f;eLsz z6>VC;qinx$^%tDd0)9UxWWI~{w1BtPejMOJhYRC@YP{z!b3n*Aor=?DnfHTuU+67C z6caQ~`Ew;VT;OoQ|M=M!C-GT_&&F+Aj4d+UxQ3e+X&>N2E#R@(f)+l*r#WBo8Kd;H zf%!)BLur4-87<(k*n*GnH=N}>&eihak=P=9e1vu_;04x#V|>ctQ^=9rS5;S*R!1u2 zSa7>#rj0_oAK@`!^js>=nFv1);$uVPS)a%@S?d#gss%ja+JuL{ZFsw!_(ReT(xx&RVFUsvKH`;{PU_4u2{GtYX8LNI#W;%9!q??#2K8IN2+cXo(!SCDn49SYp(|*L+ONYF;c?#rLcDMhkfT z>na1^;+hsPF{mUJ`>sB<)pC5)PKu5%FL(Rrro@!Uq)5L*fD`aN$J_Fk zU=J*rRIBm5=ZmtHX05~8cp8#8-uQY=B2~b36~J}Yuv+6f)X#-r8R0ma_kPmMm4_iZ@+Oo=M4bqVe z9AC2ab&&?mcWdk0a&pVPlVA)B-8uK&+xzAzy-_w$vT;|WstT!cJ9R`E2Ff;fZ_n-> z!$lz-N@*d+l%>j2S*&D~6^imsP?Wn{(WFu-X_g9TWkL0q(JU2G30ft1u}iNr%L6Po zngMBv9II8LZ!=qEa}3KkT5*gqC+`i#(WaVW@`SMv68$9AL8~NB-^9&Qj$(;osZkwe zz+B&|gS2Fh)G9fyS9$fxl$A(#|;dI7j^X@g-pM0XahQ)cvyab8mOp|CYkH+3&_~vDsI?%nr2K$Nf!i zUgx1I=WM}=@Y#Zs;d2FT;ZF)qg+r)wt8#CP4LEucc?hi@+qIxEeCSg5hV!fMzHn#v zg0@2RI(j)SI(+3v(Wye@9F0ib=OO6NGm{EV6e2J>JYZ26MzzZny}! r8R*<2f}h-(0WJS|GOIiVT?Y*s6dscn9*~AeO>wpCMg8rWGu!_IC&6Ry diff --git a/src/vs/workbench/parts/execution/electron-browser/terminalService.ts b/src/vs/workbench/parts/execution/electron-browser/terminalService.ts index f8dd3a66f5f..1d25e068cbe 100644 --- a/src/vs/workbench/parts/execution/electron-browser/terminalService.ts +++ b/src/vs/workbench/parts/execution/electron-browser/terminalService.ts @@ -60,6 +60,9 @@ export class WinTerminalService implements ITerminalService { // merge environment variables into a copy of the process.env const env = assign({}, process.env, envVars); + // delete environment variables that have a null value + Object.keys(env).filter(v => env[v] === null).forEach(key => delete env[key]); + const options: any = { cwd: dir, env: env, @@ -155,8 +158,14 @@ export class MacTerminalService implements ITerminalService { if (envVars) { for (let key in envVars) { - osaArgs.push('-e'); - osaArgs.push(key + '=' + envVars[key]); + const value = envVars[key]; + if (value === null) { + osaArgs.push('-u'); + osaArgs.push(key); + } else { + osaArgs.push('-e'); + osaArgs.push(`${key}=${value}`); + } } } @@ -239,6 +248,9 @@ export class LinuxTerminalService implements ITerminalService { // merge environment variables into a copy of the process.env const env = assign({}, process.env, envVars); + // delete environment variables that have a null value + Object.keys(env).filter(v => env[v] === null).forEach(key => delete env[key]); + const options: any = { cwd: dir, env: env diff --git a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts index d2102082d06..af0184e53df 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts @@ -42,17 +42,16 @@ import { IMessageService } from 'vs/platform/message/common/message'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { Position } from 'vs/platform/editor/common/editor'; -import { IListService } from 'vs/platform/list/browser/listService'; import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { KeybindingLabel } from 'vs/base/browser/ui/keybindingLabel/keybindingLabel'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IContextKeyService, RawContextKey, ContextKeyExpr, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { Command, ICommandOptions } from 'vs/editor/browser/editorExtensions'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { Color } from 'vs/base/common/color'; +import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; /** A context key that is set when an extension editor webview has focus. */ export const KEYBINDING_CONTEXT_EXTENSIONEDITOR_WEBVIEW_FOCUS = new RawContextKey('extensionEditorWebviewFocus', undefined); @@ -379,12 +378,6 @@ export class ExtensionEditor extends BaseEditor { } } - hideFind(): void { - if (this.activeWebview) { - this.activeWebview.hideFind(); - } - } - public showNextFindTerm() { if (this.activeWebview) { this.activeWebview.showNextFindTerm(); @@ -518,7 +511,7 @@ export class ExtensionEditor extends BaseEditor { private renderDependencies(container: HTMLElement, extensionDependencies: IExtensionDependencies): Tree { const renderer = this.instantiationService.createInstance(Renderer); const controller = this.instantiationService.createInstance(Controller); - const tree = new Tree(container, { + const tree = new WorkbenchTree(container, { dataSource: new DataSource(), renderer, controller @@ -526,9 +519,7 @@ export class ExtensionEditor extends BaseEditor { indentPixels: 40, twistiePixels: 20, keyboardSupport: false - }); - - this.contentDisposables.push(attachListStyler(tree, this.themeService)); + }, this.contextKeyService, this.listService, this.themeService); tree.setInput(extensionDependencies); @@ -538,8 +529,6 @@ export class ExtensionEditor extends BaseEditor { } })); - this.contentDisposables.push(this.listService.register(tree)); - return tree; } @@ -941,15 +930,6 @@ const showCommand = new ShowExtensionEditorFindCommand({ }); KeybindingsRegistry.registerCommandAndKeybindingRule(showCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib())); -const hideCommand = new ShowExtensionEditorFindCommand({ - id: 'editor.action.extensioneditor.hidefind', - precondition: KEYBINDING_CONTEXT_EXTENSIONEDITOR_WEBVIEW_FOCUS, - kbOpts: { - primary: KeyMod.CtrlCmd | KeyCode.KEY_F - } -}); -KeybindingsRegistry.registerCommandAndKeybindingRule(hideCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib())); - class ShowExtensionEditorFindTermCommand extends Command { constructor(opts: ICommandOptions, private _next: boolean) { super(opts); diff --git a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts index 200b4e2b301..677b4981ba6 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts @@ -14,10 +14,10 @@ import Event from 'vs/base/common/event'; import * as json from 'vs/base/common/json'; import { ActionItem, IActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; import { IExtension, ExtensionState, IExtensionsWorkbenchService, VIEWLET_ID, IExtensionsViewlet, AutoUpdateConfigurationKey } from 'vs/workbench/parts/extensions/common/extensions'; import { ExtensionsConfigurationInitialContent } from 'vs/workbench/parts/extensions/common/extensionsFileTemplate'; -import { LocalExtensionType, IExtensionEnablementService, IExtensionTipsService, EnablementState } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { LocalExtensionType, IExtensionEnablementService, IExtensionTipsService, EnablementState, ExtensionsLabel } from 'vs/platform/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService } from 'vs/platform/message/common/message'; @@ -41,6 +41,9 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { PICK_WORKSPACE_FOLDER_COMMAND } from 'vs/workbench/browser/actions/workspaceActions'; import Severity from 'vs/base/common/severity'; import { PagedModel } from 'vs/base/common/paging'; +import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; +import { IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey'; +import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; export class InstallAction extends Action { @@ -1303,6 +1306,53 @@ export class ChangeSortAction extends Action { } } +export class ConfigureRecommendedExtensionsCommandsContributor extends Disposable implements IWorkbenchContribution { + + private workspaceContextKey = new RawContextKey('workspaceRecommendations', true); + private workspaceFolderContextKey = new RawContextKey('workspaceFolderRecommendations', true); + + constructor( + @IContextKeyService contextKeyService: IContextKeyService, + @IWorkspaceContextService workspaceContextService: IWorkspaceContextService + ) { + super(); + const boundWorkspaceContextKey = this.workspaceContextKey.bindTo(contextKeyService); + boundWorkspaceContextKey.set(workspaceContextService.getWorkbenchState() === WorkbenchState.WORKSPACE); + this._register(workspaceContextService.onDidChangeWorkbenchState(() => boundWorkspaceContextKey.set(workspaceContextService.getWorkbenchState() === WorkbenchState.WORKSPACE))); + + + const boundWorkspaceFolderContextKey = this.workspaceFolderContextKey.bindTo(contextKeyService); + boundWorkspaceFolderContextKey.set(workspaceContextService.getWorkspace().folders.length > 0); + this._register(workspaceContextService.onDidChangeWorkspaceFolders(() => boundWorkspaceFolderContextKey.set(workspaceContextService.getWorkspace().folders.length > 0))); + + this.registerCommands(); + } + + private registerCommands(): void { + CommandsRegistry.registerCommand(ConfigureWorkspaceRecommendedExtensionsAction.ID, serviceAccessor => { + serviceAccessor.get(IInstantiationService).createInstance(ConfigureWorkspaceRecommendedExtensionsAction, ConfigureWorkspaceRecommendedExtensionsAction.ID, ConfigureWorkspaceRecommendedExtensionsAction.LABEL).run(); + }); + MenuRegistry.appendMenuItem(MenuId.CommandPalette, { + command: { + id: ConfigureWorkspaceRecommendedExtensionsAction.ID, + title: `${ExtensionsLabel}: ${ConfigureWorkspaceRecommendedExtensionsAction.LABEL}`, + }, + when: this.workspaceContextKey + }); + + CommandsRegistry.registerCommand(ConfigureWorkspaceFolderRecommendedExtensionsAction.ID, serviceAccessor => { + serviceAccessor.get(IInstantiationService).createInstance(ConfigureWorkspaceFolderRecommendedExtensionsAction, ConfigureWorkspaceFolderRecommendedExtensionsAction.ID, ConfigureWorkspaceFolderRecommendedExtensionsAction.LABEL).run(); + }); + MenuRegistry.appendMenuItem(MenuId.CommandPalette, { + command: { + id: ConfigureWorkspaceFolderRecommendedExtensionsAction.ID, + title: `${ExtensionsLabel}: ${ConfigureWorkspaceFolderRecommendedExtensionsAction.LABEL}`, + }, + when: this.workspaceFolderContextKey + }); + } +} + interface IExtensionsContent { recommendations: string[]; } @@ -1323,20 +1373,22 @@ export abstract class AbstractConfigureRecommendedExtensionsAction extends Actio protected openExtensionsFile(extensionsFileResource: URI): TPromise { return this.getOrCreateExtensionsFile(extensionsFileResource) - .then(({ created }) => { - return this.editorService.openEditor({ - resource: extensionsFileResource, - options: { - forceOpen: true, - pinned: created - }, - }); - }, error => TPromise.wrapError(new Error(localize('OpenExtensionsFile.failed', "Unable to create 'extensions.json' file inside the '.vscode' folder ({0}).", error)))); + .then(({ created, content }) => + this.getSelectionPosition(content, extensionsFileResource, ['recommendations']) + .then(selection => this.editorService.openEditor({ + resource: extensionsFileResource, + options: { + forceOpen: true, + pinned: created, + selection + } + })), + error => TPromise.wrapError(new Error(localize('OpenExtensionsFile.failed', "Unable to create 'extensions.json' file inside the '.vscode' folder ({0}).", error)))); } protected openWorkspaceConfigurationFile(workspaceConfigurationFile: URI): TPromise { return this.getOrUpdateWorkspaceConfigurationFile(workspaceConfigurationFile) - .then(content => this.getSelectionPosition(content)) + .then(content => this.getSelectionPosition(content.value, content.resource, ['extensions', 'recommendations'])) .then(selection => this.editorService.openEditor({ resource: workspaceConfigurationFile, options: { @@ -1358,12 +1410,14 @@ export abstract class AbstractConfigureRecommendedExtensionsAction extends Actio }); } - private getSelectionPosition(content: IContent): TPromise { - const tree = json.parseTree(content.value); - const node = json.findNodeAtLocation(tree, ['extensions', 'recommendations']); + private getSelectionPosition(content: string, resource: URI, path: json.JSONPath): TPromise { + const tree = json.parseTree(content); + const node = json.findNodeAtLocation(tree, path); if (node && node.parent.children[1]) { - const offset = node.parent.children[1].offset; - return this.textModelResolverService.createModelReference(content.resource) + const recommendationsValueNode = node.parent.children[1]; + const lastExtensionNode = recommendationsValueNode.children && recommendationsValueNode.children.length ? recommendationsValueNode.children[recommendationsValueNode.children.length - 1] : null; + const offset = lastExtensionNode ? lastExtensionNode.offset + lastExtensionNode.length : recommendationsValueNode.offset + 1; + return this.textModelResolverService.createModelReference(resource) .then(reference => { const position = reference.object.textEditorModel.getPositionAt(offset); reference.dispose(); @@ -1378,12 +1432,12 @@ export abstract class AbstractConfigureRecommendedExtensionsAction extends Actio return TPromise.as(null); } - private getOrCreateExtensionsFile(extensionsFileResource: URI): TPromise<{ created: boolean, extensionsFileResource: URI }> { + private getOrCreateExtensionsFile(extensionsFileResource: URI): TPromise<{ created: boolean, extensionsFileResource: URI, content: string }> { return this.fileService.resolveContent(extensionsFileResource).then(content => { - return { created: false, extensionsFileResource }; + return { created: false, extensionsFileResource, content: content.value }; }, err => { return this.fileService.updateContent(extensionsFileResource, ExtensionsConfigurationInitialContent).then(() => { - return { created: true, extensionsFileResource }; + return { created: true, extensionsFileResource, content: ExtensionsConfigurationInitialContent }; }); }); } @@ -1414,7 +1468,7 @@ export class ConfigureWorkspaceRecommendedExtensionsAction extends AbstractConfi this.enabled = this.contextService.getWorkbenchState() !== WorkbenchState.EMPTY; } - public run(event: any): TPromise { + public run(): TPromise { switch (this.contextService.getWorkbenchState()) { case WorkbenchState.FOLDER: return this.openExtensionsFile(this.contextService.getWorkspace().folders[0].toResource(paths.join('.vscode', 'extensions.json'))); @@ -1476,7 +1530,7 @@ export class ConfigureWorkspaceFolderRecommendedExtensionsAction extends Abstrac export class BuiltinStatusLabelAction extends Action { - private static readonly Class = 'extension-action built-in-status'; + private static readonly Class = 'built-in-status'; private _extension: IExtension; get extension(): IExtension { return this._extension; } @@ -1694,4 +1748,4 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { if (extensionButtonProminentHoverBackground) { collector.addRule(`.monaco-action-bar .action-item:hover .action-label.extension-action.prominent { background-color: ${extensionButtonProminentHoverBackgroundColor}; }`); } -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/parts/extensions/browser/extensionsWidgets.ts b/src/vs/workbench/parts/extensions/browser/extensionsWidgets.ts index 12d0a66aa7a..3167b710f49 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsWidgets.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsWidgets.ts @@ -10,6 +10,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IExtension, IExtensionsWorkbenchService } from '../common/extensions'; import { append, $, addClass } from 'vs/base/browser/dom'; import * as platform from 'vs/base/common/platform'; +import { localize } from 'vs/nls'; export interface IOptions { extension?: IExtension; @@ -142,6 +143,7 @@ export class RatingsWidget implements IDisposable { const count = append(this.container, $('span.count')); count.textContent = String(rating); + this.container.title = this.extension.ratingCount > 1 ? localize('ratedByUsers', "Rated by {0} users", this.extension.ratingCount) : localize('ratedBySingleUser', "Rated by 1 user"); } else { for (let i = 1; i <= 5; i++) { if (rating >= i) { diff --git a/src/vs/workbench/parts/extensions/browser/media/extensionActions.css b/src/vs/workbench/parts/extensions/browser/media/extensionActions.css index c9b9d8508a2..8314dddb331 100644 --- a/src/vs/workbench/parts/extensions/browser/media/extensionActions.css +++ b/src/vs/workbench/parts/extensions/browser/media/extensionActions.css @@ -30,19 +30,21 @@ .monaco-action-bar .action-item.disabled .action-label.extension-action.enable, .monaco-action-bar .action-item.disabled .action-label.extension-action.disable, .monaco-action-bar .action-item.disabled .action-label.extension-action.reload, -.monaco-action-bar .action-item.disabled .action-label.extension-action.built-in-status.user { +.monaco-action-bar .action-item.disabled .action-label.built-in-status.user { display: none; } -.monaco-action-bar .action-item .action-label.extension-action.built-in-status { +.monaco-action-bar .action-item .action-label.built-in-status { border-radius: 4px; color: inherit; background-color: transparent; opacity: 0.9; font-style: italic; + padding: 0 5px; + line-height: initial; } -.extension-editor>.header>.details>.actions>.monaco-action-bar .action-item .action-label.extension-action.built-in-status { +.extension-editor>.header>.details>.actions>.monaco-action-bar .action-item .action-label.built-in-status { font-weight: normal; } diff --git a/src/vs/workbench/parts/extensions/browser/media/extensionEditor.css b/src/vs/workbench/parts/extensions/browser/media/extensionEditor.css index 5d8a88b28a9..01dd0458f1d 100644 --- a/src/vs/workbench/parts/extensions/browser/media/extensionEditor.css +++ b/src/vs/workbench/parts/extensions/browser/media/extensionEditor.css @@ -15,7 +15,6 @@ .extension-editor > .header { display: flex; height: 128px; - background: rgba(128, 128, 128, 0.15); padding: 20px; overflow: hidden; font-size: 14px; diff --git a/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.ts b/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.ts index 0cb5367299e..fc81cb063d1 100644 --- a/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.ts +++ b/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.ts @@ -10,6 +10,7 @@ import { EXTENSION_IDENTIFIER_PATTERN } from 'vs/platform/extensionManagement/co export const ExtensionsConfigurationSchemaId = 'vscode://schemas/extensions'; export const ExtensionsConfigurationSchema: IJSONSchema = { id: ExtensionsConfigurationSchemaId, + allowComments: true, type: 'object', title: localize('app.extensions.json.title', "Extensions"), properties: { diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.ts new file mode 100644 index 00000000000..307d628fdd3 --- /dev/null +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.ts @@ -0,0 +1,182 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as nls from 'vs/nls'; +import Event, { Emitter } from 'vs/base/common/event'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IExtensionHostProfile, ProfileSession, IExtensionService } from 'vs/platform/extensions/common/extensions'; +import { Disposable, IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { onUnexpectedError } from 'vs/base/common/errors'; +import { append, $, addDisposableListener } from 'vs/base/browser/dom'; +import { StatusbarAlignment, IStatusbarRegistry, StatusbarItemDescriptor, Extensions, IStatusbarItem } from 'vs/workbench/browser/parts/statusbar/statusbar'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { IExtensionHostProfileService, ProfileSessionState, RuntimeExtensionsInput } from 'vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; + +export class ExtensionHostProfileService extends Disposable implements IExtensionHostProfileService { + + _serviceBrand: any; + + private readonly _onDidChangeState: Emitter = this._register(new Emitter()); + public readonly onDidChangeState: Event = this._onDidChangeState.event; + + private readonly _onDidChangeLastProfile: Emitter = this._register(new Emitter()); + public readonly onDidChangeLastProfile: Event = this._onDidChangeLastProfile.event; + + private _profile: IExtensionHostProfile; + private _profileSession: ProfileSession; + private _state: ProfileSessionState; + + public get state() { return this._state; } + public get lastProfile() { return this._profile; } + + constructor( + @IExtensionService private readonly _extensionService: IExtensionService, + @IWorkbenchEditorService private readonly _editorService: IWorkbenchEditorService, + @IInstantiationService private readonly _instantiationService: IInstantiationService, + ) { + super(); + this._profile = null; + this._profileSession = null; + this._setState(ProfileSessionState.None); + } + + private _setState(state: ProfileSessionState): void { + if (this._state === state) { + return; + } + this._state = state; + + if (this._state === ProfileSessionState.Running) { + ProfileExtHostStatusbarItem.instance.show(() => { + this.stopProfiling(); + this._editorService.openEditor(this._instantiationService.createInstance(RuntimeExtensionsInput), { revealIfOpened: true }); + }); + } else if (this._state === ProfileSessionState.Stopping) { + ProfileExtHostStatusbarItem.instance.hide(); + } + + this._onDidChangeState.fire(void 0); + } + + public startProfiling(): void { + if (this._state !== ProfileSessionState.None) { + return; + } + this._setState(ProfileSessionState.Starting); + + this._extensionService.startExtensionHostProfile().then((value) => { + this._profileSession = value; + this._setState(ProfileSessionState.Running); + }, (err) => { + onUnexpectedError(err); + this._setState(ProfileSessionState.None); + }); + } + + public stopProfiling(): void { + if (this._state !== ProfileSessionState.Running) { + return; + } + + this._setState(ProfileSessionState.Stopping); + this._profileSession.stop().then((result) => { + this._setLastProfile(result); + this._setState(ProfileSessionState.None); + }, (err) => { + onUnexpectedError(err); + this._setState(ProfileSessionState.None); + }); + this._profileSession = null; + } + + private _setLastProfile(profile: IExtensionHostProfile) { + this._profile = profile; + this._onDidChangeLastProfile.fire(void 0); + } + + public getLastProfile(): IExtensionHostProfile { + return this._profile; + } + + public clearLastProfile(): void { + this._setLastProfile(null); + } +} + +export class ProfileExtHostStatusbarItem implements IStatusbarItem { + + public static instance: ProfileExtHostStatusbarItem; + + private toDispose: IDisposable[]; + private statusBarItem: HTMLElement; + private label: HTMLElement; + private timeStarted: number; + private labelUpdater: number; + private clickHandler: () => void; + + constructor() { + ProfileExtHostStatusbarItem.instance = this; + this.toDispose = []; + this.timeStarted = 0; + } + + public show(clickHandler: () => void) { + this.clickHandler = clickHandler; + if (this.timeStarted === 0) { + this.timeStarted = new Date().getTime(); + this.statusBarItem.hidden = false; + this.labelUpdater = setInterval(() => { + this.updateLabel(); + }, 1000); + this.updateLabel(); + } + } + + public hide() { + this.clickHandler = null; + this.statusBarItem.hidden = true; + this.timeStarted = 0; + clearInterval(this.labelUpdater); + this.labelUpdater = null; + } + + public render(container: HTMLElement): IDisposable { + if (!this.statusBarItem && container) { + this.statusBarItem = append(container, $('.profileExtHost-statusbar-item')); + this.toDispose.push(addDisposableListener(this.statusBarItem, 'click', () => { + if (this.clickHandler) { + this.clickHandler(); + } + })); + this.statusBarItem.title = nls.localize('selectAndStartDebug', "Click to stop profiling."); + const a = append(this.statusBarItem, $('a')); + append(a, $('.icon')); + this.label = append(a, $('span.label')); + this.updateLabel(); + this.statusBarItem.hidden = true; + } + return this; + } + + private updateLabel() { + let label = 'Profiling Extension Host'; + if (this.timeStarted > 0) { + let secondsRecoreded = (new Date().getTime() - this.timeStarted) / 1000; + label = `Profiling Extension Host (${Math.round(secondsRecoreded)} sec)`; + } + this.label.textContent = label; + } + + public dispose(): void { + this.toDispose = dispose(this.toDispose); + } +} + +Registry.as(Extensions.Statusbar).registerStatusbarItem( + new StatusbarItemDescriptor(ProfileExtHostStatusbarItem, StatusbarAlignment.RIGHT) +); diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts index 3de767e604b..d0fc19c59fb 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts @@ -28,6 +28,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import * as pfs from 'vs/base/node/pfs'; import * as os from 'os'; import { flatten, distinct } from 'vs/base/common/arrays'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; interface IExtensionsContent { recommendations: string[]; @@ -61,11 +62,12 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe @IWorkspaceContextService private contextService: IWorkspaceContextService, @IConfigurationService private configurationService: IConfigurationService, @IMessageService private messageService: IMessageService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private telemetryService: ITelemetryService, + @IEnvironmentService private environmentService: IEnvironmentService ) { super(); - if (!this._galleryService.isEnabled()) { + if (!this._galleryService.isEnabled() || this.environmentService.extensionDevelopmentPath) { return; } @@ -353,7 +355,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe this.extensionsService.getInstalled(LocalExtensionType.User).done(local => { const recommendations = allRecommendations - .filter(id => local.every(local => `${local.manifest.publisher}.${local.manifest.name}` !== id)); + .filter(id => local.every(local => `${local.manifest.publisher.toLowerCase()}.${local.manifest.name.toLowerCase()}` !== id)); if (!recommendations.length) { return; diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts index d865b71dfa6..18f4e4a6d56 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts @@ -21,8 +21,8 @@ import { VIEWLET_ID, IExtensionsWorkbenchService } from '../common/extensions'; import { ExtensionsWorkbenchService } from 'vs/workbench/parts/extensions/node/extensionsWorkbenchService'; import { OpenExtensionsViewletAction, InstallExtensionsAction, ShowOutdatedExtensionsAction, ShowRecommendedExtensionsAction, ShowRecommendedKeymapExtensionsAction, ShowPopularExtensionsAction, - ShowEnabledExtensionsAction, ShowInstalledExtensionsAction, ShowDisabledExtensionsAction, UpdateAllAction, ConfigureWorkspaceRecommendedExtensionsAction, ConfigureWorkspaceFolderRecommendedExtensionsAction, - EnableAllAction, EnableAllWorkpsaceAction, DisableAllAction, DisableAllWorkpsaceAction, CheckForUpdatesAction, ShowLanguageExtensionsAction, ShowAzureExtensionsAction, EnableAutoUpdateAction, DisableAutoUpdateAction + ShowEnabledExtensionsAction, ShowInstalledExtensionsAction, ShowDisabledExtensionsAction, UpdateAllAction, + EnableAllAction, EnableAllWorkpsaceAction, DisableAllAction, DisableAllWorkpsaceAction, CheckForUpdatesAction, ShowLanguageExtensionsAction, ShowAzureExtensionsAction, EnableAutoUpdateAction, DisableAutoUpdateAction, ConfigureRecommendedExtensionsCommandsContributor } from 'vs/workbench/parts/extensions/browser/extensionsActions'; import { OpenExtensionsFolderAction, InstallVSIXAction } from 'vs/workbench/parts/extensions/electron-browser/extensionsActions'; import { ExtensionsInput } from 'vs/workbench/parts/extensions/common/extensionsInput'; @@ -34,20 +34,25 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v import jsonContributionRegistry = require('vs/platform/jsonschemas/common/jsonContributionRegistry'); import { ExtensionsConfigurationSchema, ExtensionsConfigurationSchemaId } from 'vs/workbench/parts/extensions/common/extensionsFileTemplate'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; -import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; +import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { KeymapExtensions, BetterMergeDisabled } from 'vs/workbench/parts/extensions/electron-browser/extensionsUtils'; import { adoptToGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { GalleryExtensionsHandler, ExtensionsHandler } from 'vs/workbench/parts/extensions/browser/extensionsQuickOpen'; import { EditorDescriptor, IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/browser/editor'; import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; +import { RuntimeExtensionsEditor, RuntimeExtensionsInput, ShowRuntimeExtensionsAction, IExtensionHostProfileService } from 'vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor'; +import { EditorInput, IEditorInputFactory, IEditorInputFactoryRegistry, Extensions as EditorInputExtensions } from 'vs/workbench/common/editor'; +import { ExtensionHostProfileService } from 'vs/workbench/parts/extensions/electron-browser/extensionProfileService'; // Singletons registerSingleton(IExtensionGalleryService, ExtensionGalleryService); registerSingleton(IExtensionTipsService, ExtensionTipsService); registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService); +registerSingleton(IExtensionHostProfileService, ExtensionHostProfileService); const workbenchRegistry = Registry.as(WorkbenchExtensions.Workbench); workbenchRegistry.registerWorkbenchContribution(StatusUpdater, LifecyclePhase.Running); +workbenchRegistry.registerWorkbenchContribution(ConfigureRecommendedExtensionsCommandsContributor, LifecyclePhase.Eventually); workbenchRegistry.registerWorkbenchContribution(KeymapExtensions, LifecyclePhase.Running); workbenchRegistry.registerWorkbenchContribution(BetterMergeDisabled, LifecyclePhase.Running); @@ -87,6 +92,29 @@ const editorDescriptor = new EditorDescriptor( Registry.as(EditorExtensions.Editors) .registerEditor(editorDescriptor, [new SyncDescriptor(ExtensionsInput)]); +// Running Extensions Editor + +const runtimeExtensionsEditorDescriptor = new EditorDescriptor( + RuntimeExtensionsEditor, + RuntimeExtensionsEditor.ID, + localize('runtimeExtension', "Running Extensions") +); + +Registry.as(EditorExtensions.Editors) + .registerEditor(runtimeExtensionsEditorDescriptor, [new SyncDescriptor(RuntimeExtensionsInput)]); + +class RuntimeExtensionsInputFactory implements IEditorInputFactory { + serialize(editorInput: EditorInput): string { + return ''; + } + deserialize(instantiationService: IInstantiationService, serializedEditorInput: string): EditorInput { + return new RuntimeExtensionsInput(); + } +} + +Registry.as(EditorInputExtensions.EditorInputFactories).registerEditorInputFactory(RuntimeExtensionsInput.ID, RuntimeExtensionsInputFactory); + + // Viewlet const viewletDescriptor = new ViewletDescriptor( ExtensionsViewlet, @@ -141,12 +169,6 @@ actionRegistry.registerWorkbenchAction(updateAllActionDescriptor, 'Extensions: U const openExtensionsFolderActionDescriptor = new SyncActionDescriptor(OpenExtensionsFolderAction, OpenExtensionsFolderAction.ID, OpenExtensionsFolderAction.LABEL); actionRegistry.registerWorkbenchAction(openExtensionsFolderActionDescriptor, 'Extensions: Open Extensions Folder', ExtensionsLabel); -const configureWorkspaceExtensionsDescriptor = new SyncActionDescriptor(ConfigureWorkspaceRecommendedExtensionsAction, ConfigureWorkspaceRecommendedExtensionsAction.ID, ConfigureWorkspaceRecommendedExtensionsAction.LABEL); -actionRegistry.registerWorkbenchAction(configureWorkspaceExtensionsDescriptor, 'Extensions: Configure Recommended Extensions (Workspace)', ExtensionsLabel); - -const configureWorkspaceFolderRecommendationsDescriptor = new SyncActionDescriptor(ConfigureWorkspaceFolderRecommendedExtensionsAction, ConfigureWorkspaceFolderRecommendedExtensionsAction.ID, ConfigureWorkspaceFolderRecommendedExtensionsAction.LABEL); -actionRegistry.registerWorkbenchAction(configureWorkspaceFolderRecommendationsDescriptor, 'Extensions: Configure Recommended Extensions (Workspace Folder)', ExtensionsLabel); - const installVSIXActionDescriptor = new SyncActionDescriptor(InstallVSIXAction, InstallVSIXAction.ID, InstallVSIXAction.LABEL); actionRegistry.registerWorkbenchAction(installVSIXActionDescriptor, 'Extensions: Install from VSIX...', ExtensionsLabel); @@ -167,6 +189,7 @@ actionRegistry.registerWorkbenchAction(checkForUpdatesAction, `Extensions: Check actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(EnableAutoUpdateAction, EnableAutoUpdateAction.ID, EnableAutoUpdateAction.LABEL), `Extensions: Enable Auto Updating Extensions`, ExtensionsLabel); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DisableAutoUpdateAction, DisableAutoUpdateAction.ID, DisableAutoUpdateAction.LABEL), `Extensions: Disable Auto Updating Extensions`, ExtensionsLabel); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowRuntimeExtensionsAction, ShowRuntimeExtensionsAction.ID, ShowRuntimeExtensionsAction.LABEL), 'Show Running Extensions', localize('developer', "Developer")); Registry.as(ConfigurationExtensions.Configuration) .registerConfiguration({ @@ -182,7 +205,7 @@ Registry.as(ConfigurationExtensions.Configuration) }, 'extensions.ignoreRecommendations': { type: 'boolean', - description: localize('extensionsIgnoreRecommendations', "Ignore extension recommendations"), + description: localize('extensionsIgnoreRecommendations', "If set to true, the notifications for extension recommendations will stop showing up."), default: false } } @@ -199,4 +222,4 @@ CommandsRegistry.registerCommand('_extensions.manage', (accessor: ServicesAccess if (extension.length === 1) { extensionService.open(extension[0]).done(null, errors.onUnexpectedError); } -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts index e76d511962b..e128026b9e0 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts @@ -47,10 +47,6 @@ export class OpenExtensionsFolderAction extends Action { return this.windowsService.showItemInFolder(itemToShow); }); } - - protected isEnabled(): boolean { - return true; - } } export class InstallVSIXAction extends Action { diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts index 0b2b76fc740..de679af9945 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts @@ -20,7 +20,8 @@ import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiati import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IMessageService, Severity, IChoiceService } from 'vs/platform/message/common/message'; import { Action } from 'vs/base/common/actions'; -import { BetterMergeDisabledNowKey, BetterMergeId, getIdAndVersionFromLocalExtensionId, areSameExtensions, adoptToGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; +import { BetterMergeDisabledNowKey, BetterMergeId, areSameExtensions, adoptToGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; +import { getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/node/extensionManagementUtil'; export interface IExtensionStatus { identifier: IExtensionIdentifier; @@ -52,9 +53,9 @@ export class KeymapExtensions implements IWorkbenchContribution { private checkForOtherKeymaps(extensionIdentifier: IExtensionIdentifier): TPromise { return this.instantiationService.invokeFunction(getInstalledExtensions).then(extensions => { const keymaps = extensions.filter(extension => isKeymapExtension(this.tipsService, extension)); - const extension = arrays.first(keymaps, extension => extension.identifier.id === extensionIdentifier.id); + const extension = arrays.first(keymaps, extension => stripVersion(extension.identifier.id) === extensionIdentifier.id); if (extension && extension.globallyEnabled) { - const otherKeymaps = keymaps.filter(extension => extension.identifier.id !== extensionIdentifier.id && extension.globallyEnabled); + const otherKeymaps = keymaps.filter(extension => stripVersion(extension.identifier.id) !== extensionIdentifier.id && extension.globallyEnabled); if (otherKeymaps.length) { return this.promptForDisablingOtherKeymaps(extension, otherKeymaps); } @@ -64,25 +65,8 @@ export class KeymapExtensions implements IWorkbenchContribution { } private promptForDisablingOtherKeymaps(newKeymap: IExtensionStatus, oldKeymaps: IExtensionStatus[]): TPromise { - /* __GDPR__FRAGMENT__ - "KeyMapsData" : { - "newKeymap" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "oldKeymaps": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - const telemetryData: { [key: string]: any; } = { - newKeymap: newKeymap.identifier, - oldKeymaps: oldKeymaps.map(k => k.identifier) - }; - /* __GDPR__ - "disableOtherKeymapsConfirmation" : { - "${include}": [ - "${KeyMapsData}" - ] - } - */ - this.telemetryService.publicLog('disableOtherKeymapsConfirmation', telemetryData); + const message = localize('disableOtherKeymapsConfirmation', "Disable other keymaps ({0}) to avoid conflicts between keybindings?", oldKeymaps.map(k => `'${k.local.manifest.displayName}'`).join(', ')); const options = [ localize('yes', "Yes"), @@ -91,13 +75,16 @@ export class KeymapExtensions implements IWorkbenchContribution { return this.choiceService.choose(Severity.Info, message, options, 1, false) .then(value => { const confirmed = value === 0; - telemetryData['confirmed'] = confirmed; + const telemetryData: { [key: string]: any; } = { + newKeymap: newKeymap.identifier, + oldKeymaps: oldKeymaps.map(k => k.identifier), + confirmed + }; /* __GDPR__ "disableOtherKeymaps" : { - "confirmed" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "${include}": [ - "${KeyMapsData}" - ] + "newKeymap" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "oldKeymaps": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "confirmed" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } } */ this.telemetryService.publicLog('disableOtherKeymaps', telemetryData); @@ -142,7 +129,7 @@ export function getInstalledExtensions(accessor: ServicesAccessor): TPromise { return extensions.map(extension => { return { - identifier: { id: adoptToGalleryExtensionId(extension.identifier.id), uuid: extension.identifier.uuid }, + identifier: { id: adoptToGalleryExtensionId(stripVersion(extension.identifier.id)), uuid: extension.identifier.uuid }, local: extension, globallyEnabled: disabledExtensions.every(disabled => !areSameExtensions(disabled, extension.identifier)) }; @@ -153,7 +140,7 @@ export function getInstalledExtensions(accessor: ServicesAccessor): TPromise { if (storageService.getBoolean(BetterMergeDisabledNowKey, StorageScope.GLOBAL, false)) { storageService.remove(BetterMergeDisabledNowKey, StorageScope.GLOBAL); - /* __GDPR__ - "betterMergeDisabled" : {} - */ - telemetryService.publicLog('betterMergeDisabled'); messageService.show(Severity.Info, { message: localize('betterMergeDisabled', "The Better Merge extension is now built-in, the installed extension was disabled and can be uninstalled."), actions: [ new Action('uninstall', localize('uninstall', "Uninstall"), null, true, () => { - /* __GDPR__ - "betterMergeUninstall" : { - "outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - telemetryService.publicLog('betterMergeUninstall', { - outcome: 'uninstall', - }); return extensionManagementService.getInstalled(LocalExtensionType.User).then(extensions => { return Promise.all(extensions.filter(e => stripVersion(e.identifier.id) === BetterMergeId) .map(e => extensionManagementService.uninstall(e, true))); }); }), - new Action('later', localize('later', "Later"), null, true, () => { - /* __GDPR__ - "betterMergeUninstall" : { - "outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - telemetryService.publicLog('betterMergeUninstall', { - outcome: 'later', - }); - return TPromise.as(true); - }) + new Action('later', localize('later', "Later"), null, true) ] }); } diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts index 6dfba15a733..8f6cb11fba0 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts @@ -19,16 +19,14 @@ import { areSameExtensions } from 'vs/platform/extensionManagement/common/extens import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { append, $, toggleClass } from 'vs/base/browser/dom'; -import { PagedList } from 'vs/base/browser/ui/list/listPaging'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { Delegate, Renderer } from 'vs/workbench/parts/extensions/browser/extensionsList'; import { IExtension, IExtensionsWorkbenchService } from '../common/extensions'; import { Query } from '../common/extensionQuery'; -import { IListService } from 'vs/platform/list/browser/listService'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { attachListStyler, attachBadgeStyler } from 'vs/platform/theme/common/styler'; -import { ViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; +import { attachBadgeStyler } from 'vs/platform/theme/common/styler'; +import { IViewletViewOptions, IViewOptions, ViewsViewletPanel } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { OpenGlobalSettingsAction } from 'vs/workbench/parts/preferences/browser/preferencesActions'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; @@ -37,6 +35,8 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { CountBadge } from 'vs/base/browser/ui/countBadge/countBadge'; import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; import { InstallWorkspaceRecommendedExtensionsAction, ConfigureWorkspaceFolderRecommendedExtensionsAction } from 'vs/workbench/parts/extensions/browser/extensionsActions'; +import { WorkbenchPagedList, IListService } from 'vs/platform/list/browser/listService'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; export class ExtensionsListView extends ViewsViewletPanel { @@ -44,7 +44,7 @@ export class ExtensionsListView extends ViewsViewletPanel { private extensionsList: HTMLElement; private badge: CountBadge; protected badgeContainer: HTMLElement; - private list: PagedList; + private list: WorkbenchPagedList; constructor( private options: IViewletViewOptions, @@ -60,7 +60,8 @@ export class ExtensionsListView extends ViewsViewletPanel { @IEditorGroupService private editorInputService: IEditorGroupService, @IExtensionTipsService private tipsService: IExtensionTipsService, @IModeService private modeService: IModeService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private telemetryService: ITelemetryService, + @IContextKeyService private contextKeyService: IContextKeyService ) { super({ ...(options as IViewOptions), ariaHeaderLabel: options.name }, keybindingService, contextMenuService); } @@ -79,13 +80,10 @@ export class ExtensionsListView extends ViewsViewletPanel { this.messageBox = append(container, $('.message')); const delegate = new Delegate(); const renderer = this.instantiationService.createInstance(Renderer); - this.list = new PagedList(this.extensionsList, delegate, [renderer], { + this.list = new WorkbenchPagedList(this.extensionsList, delegate, [renderer], { ariaLabel: localize('extensions', "Extensions"), keyboardSupport: false - }); - - this.disposables.push(attachListStyler(this.list.widget, this.themeService)); - this.disposables.push(this.listService.register(this.list.widget)); + }, this.contextKeyService, this.listService, this.themeService); chain(this.list.onSelectionChange) .map(e => e.elements[0]) @@ -156,27 +154,10 @@ export class ExtensionsListView extends ViewsViewletPanel { let result = await this.extensionsWorkbenchService.queryLocal(); - switch (options.sortBy) { - case SortBy.InstallCount: - result = result.sort((e1, e2) => e2.installCount - e1.installCount); - break; - case SortBy.AverageRating: - case SortBy.WeightedRating: - result = result.sort((e1, e2) => e2.rating - e1.rating); - break; - default: - result = result.sort((e1, e2) => e1.displayName.localeCompare(e2.displayName)); - break; - } - - if (options.sortOrder === SortOrder.Descending) { - result = result.reverse(); - } - result = result .filter(e => e.type === LocalExtensionType.User && e.name.toLowerCase().indexOf(value) > -1); - return new PagedModel(result); + return new PagedModel(this.sortExtensions(result, options)); } const idMatch = /@id:([a-z0-9][a-z0-9\-]*\.[a-z0-9][a-z0-9\-]*)/.exec(value); @@ -189,18 +170,18 @@ export class ExtensionsListView extends ViewsViewletPanel { } if (/@outdated/i.test(value)) { - value = value.replace(/@outdated/g, '').trim().toLowerCase(); + value = value.replace(/@outdated/g, '').replace(/@sort:(\w+)(-\w*)?/g, '').trim().toLowerCase(); const local = await this.extensionsWorkbenchService.queryLocal(); const result = local .sort((e1, e2) => e1.displayName.localeCompare(e2.displayName)) .filter(extension => extension.outdated && extension.name.toLowerCase().indexOf(value) > -1); - return new PagedModel(result); + return new PagedModel(this.sortExtensions(result, options)); } if (/@disabled/i.test(value)) { - value = value.replace(/@disabled/g, '').trim().toLowerCase(); + value = value.replace(/@disabled/g, '').replace(/@sort:(\w+)(-\w*)?/g, '').trim().toLowerCase(); const local = await this.extensionsWorkbenchService.queryLocal(); const runningExtensions = await this.extensionService.getExtensions(); @@ -209,22 +190,22 @@ export class ExtensionsListView extends ViewsViewletPanel { .sort((e1, e2) => e1.displayName.localeCompare(e2.displayName)) .filter(e => runningExtensions.every(r => !areSameExtensions(r, e)) && e.name.toLowerCase().indexOf(value) > -1); - return new PagedModel(result); + return new PagedModel(this.sortExtensions(result, options)); } if (/@enabled/i.test(value)) { - value = value ? value.replace(/@enabled/g, '').trim().toLowerCase() : ''; + value = value ? value.replace(/@enabled/g, '').replace(/@sort:(\w+)(-\w*)?/g, '').trim().toLowerCase() : ''; const local = await this.extensionsWorkbenchService.queryLocal(); - const result = local + let result = local .sort((e1, e2) => e1.displayName.localeCompare(e2.displayName)) .filter(e => e.type === LocalExtensionType.User && (e.enablementState === EnablementState.Enabled || e.enablementState === EnablementState.WorkspaceEnabled) && e.name.toLowerCase().indexOf(value) > -1 ); - return new PagedModel(result); + return new PagedModel(this.sortExtensions(result, options)); } if (ExtensionsListView.isWorkspaceRecommendedExtensionsQuery(query.value)) { @@ -279,6 +260,25 @@ export class ExtensionsListView extends ViewsViewletPanel { return new PagedModel(pager); } + private sortExtensions(extensions: IExtension[], options: IQueryOptions): IExtension[] { + switch (options.sortBy) { + case SortBy.InstallCount: + extensions = extensions.sort((e1, e2) => e2.installCount - e1.installCount); + break; + case SortBy.AverageRating: + case SortBy.WeightedRating: + extensions = extensions.sort((e1, e2) => e2.rating - e1.rating); + break; + default: + extensions = extensions.sort((e1, e2) => e1.displayName.localeCompare(e2.displayName)); + break; + } + if (options.sortOrder === SortOrder.Descending) { + extensions = extensions.reverse(); + } + return extensions; + } + private getAllRecommendationsModel(query: Query, options: IQueryOptions): TPromise> { const value = query.value.replace(/@recommended:all/g, '').replace(/@recommended/g, '').trim().toLowerCase(); @@ -404,12 +404,6 @@ export class ExtensionsListView extends ViewsViewletPanel { const value = query.value.replace(/@recommended:keymaps/g, '').trim().toLowerCase(); const names = this.tipsService.getKeymapRecommendations() .filter(name => name.toLowerCase().indexOf(value) > -1); - /* __GDPR__ - "extensionKeymapRecommendations:open" : { - "count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('extensionKeymapRecommendations:open', { count: names.length }); if (!names.length) { return TPromise.as(new PagedModel([])); diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/profile-start-inverse.svg b/src/vs/workbench/parts/extensions/electron-browser/media/profile-start-inverse.svg new file mode 100644 index 00000000000..6fa378a7fa5 --- /dev/null +++ b/src/vs/workbench/parts/extensions/electron-browser/media/profile-start-inverse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/profile-start.svg b/src/vs/workbench/parts/extensions/electron-browser/media/profile-start.svg new file mode 100644 index 00000000000..184a953726c --- /dev/null +++ b/src/vs/workbench/parts/extensions/electron-browser/media/profile-start.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/profile-stop-inverse.svg b/src/vs/workbench/parts/extensions/electron-browser/media/profile-stop-inverse.svg new file mode 100644 index 00000000000..ed989422ee9 --- /dev/null +++ b/src/vs/workbench/parts/extensions/electron-browser/media/profile-stop-inverse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/profile-stop.svg b/src/vs/workbench/parts/extensions/electron-browser/media/profile-stop.svg new file mode 100644 index 00000000000..22656a29c7d --- /dev/null +++ b/src/vs/workbench/parts/extensions/electron-browser/media/profile-stop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/runtimeExtensionsEditor.css b/src/vs/workbench/parts/extensions/electron-browser/media/runtimeExtensionsEditor.css new file mode 100644 index 00000000000..54046a8f2a1 --- /dev/null +++ b/src/vs/workbench/parts/extensions/electron-browser/media/runtimeExtensionsEditor.css @@ -0,0 +1,126 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +.runtime-extensions-editor .monaco-list .monaco-list-rows > .monaco-list-row.odd { + background-color: #f5f5f5; +} + +.runtime-extensions-editor .monaco-list .monaco-list-rows > .monaco-list-row:hover:not(.odd) { + background-color: transparent; +} + +.runtime-extensions-editor .extension { + display: flex; + padding-left: 20px; + padding-right: 20px; +} + +.runtime-extensions-editor .extension .desc { + flex: 1; + padding: 4px 0; +} + +.runtime-extensions-editor .extension .desc .name { + font-weight: bold; +} + +.runtime-extensions-editor .extension .time { + padding: 4px; + text-align: right; +} + +.runtime-extensions-editor .extension .desc .msg-label { + padding-left: 4px; +} + + +.runtime-extensions-editor .extension .profile-timeline { + width: 100px; + margin: auto; + padding: 0 4px; +} + +.runtime-extensions-editor .extension .profile-timeline-svg { + width: 100%; + pointer-events: none; +} + +.runtime-extensions-editor .extension .profile-timeline rect { + fill: rgb(181, 181, 255); +} + +.runtime-extensions-editor .extension > .icon { + width: 42px; + height: 42px; + padding: 10px 14px 10px 0; +} + +.monaco-action-bar .extension-host-profile-start { + background: url('profile-start.svg') center center no-repeat; +} + +.monaco-action-bar .extension-host-profile-stop { + background: url('profile-stop.svg') center center no-repeat; +} + +.vs-dark .monaco-action-bar .extension-host-profile-start, +.hc-black .monaco-action-bar .extension-host-profile-start { + background: url('profile-start-inverse.svg') center center no-repeat; +} + +.vs-dark .monaco-action-bar .extension-host-profile-stop, +.hc-black .monaco-action-bar .extension-host-profile-stop { + background: url('profile-stop-inverse.svg') center center no-repeat; + animation:fade 1000ms infinite; + -webkit-animation:fade 1000ms infinite; +} + +.monaco-action-bar .save-extension-host-profile { + background: url('save.svg') center center no-repeat; +} + +.vs-dark .monaco-action-bar .save-extension-host-profile, +.hc-black .monaco-action-bar .save-extension-host-profile { + background: url('save-inverse.svg') center center no-repeat; +} + +.vs-dark .runtime-extensions-editor .monaco-list .monaco-list-rows > .monaco-list-row.odd, +.hc-black .runtime-extensions-editor .monaco-list .monaco-list-rows > .monaco-list-row.odd { + background-color: #262829; +} + +.runtime-extensions-editor .monaco-action-bar { + padding-top: 21px; + flex-shrink: 0; +} + +.runtime-extensions-editor .monaco-action-bar.hidden { + visibility: hidden; +} + + +.monaco-workbench .part.statusbar .profileExtHost-statusbar-item .icon { + background: url('profile-stop.svg') no-repeat; + display: inline-block; + padding-right: 2px; + padding-bottom: 2px; + width: 16px; + height: 16px; + vertical-align: middle; + animation:fade 1000ms infinite; + -webkit-animation:fade 1000ms infinite; +} + +@keyframes fade { + from { opacity: 1.0; } + 50% { opacity: 0.5; } + to { opacity: 1.0; } +} + +@-webkit-keyframes fade { + from { opacity: 1.0; } + 50% { opacity: 0.5; } + to { opacity: 1.0; } +} \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/save-inverse.svg b/src/vs/workbench/parts/extensions/electron-browser/media/save-inverse.svg new file mode 100644 index 00000000000..01c42bce304 --- /dev/null +++ b/src/vs/workbench/parts/extensions/electron-browser/media/save-inverse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/save.svg b/src/vs/workbench/parts/extensions/electron-browser/media/save.svg new file mode 100644 index 00000000000..01e1ca99bdf --- /dev/null +++ b/src/vs/workbench/parts/extensions/electron-browser/media/save.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts b/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts new file mode 100644 index 00000000000..ed0034b4bb3 --- /dev/null +++ b/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts @@ -0,0 +1,593 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import 'vs/css!./media/runtimeExtensionsEditor'; +import * as nls from 'vs/nls'; +import * as os from 'os'; +import product from 'vs/platform/node/product'; +import URI from 'vs/base/common/uri'; +import { EditorInput } from 'vs/workbench/common/editor'; +import pkg from 'vs/platform/node/package'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { Action, IAction } from 'vs/base/common/actions'; +import { Builder, Dimension } from 'vs/base/browser/builder'; +import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { IInstantiationService, createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { IExtensionsWorkbenchService, IExtension } from 'vs/workbench/parts/extensions/common/extensions'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { IExtensionService, IExtensionDescription, IExtensionsStatus, IExtensionHostProfile } from 'vs/platform/extensions/common/extensions'; +import { IDelegate, IRenderer } from 'vs/base/browser/ui/list/list'; +import { WorkbenchList, IListService } from 'vs/platform/list/browser/listService'; +import { append, $, addClass, toggleClass } from 'vs/base/browser/dom'; +import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; +import { IMessageService, Severity } from 'vs/platform/message/common/message'; +import { dispose, IDisposable } from 'vs/base/common/lifecycle'; +import { RunOnceScheduler } from 'vs/base/common/async'; +import { clipboard } from 'electron'; +import { LocalExtensionType } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; +import { IWindowService } from 'vs/platform/windows/common/windows'; +import { writeFile } from 'vs/base/node/pfs'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { memoize } from 'vs/base/common/decorators'; +import { isFalsyOrEmpty } from 'vs/base/common/arrays'; +import Event from 'vs/base/common/event'; + +export const IExtensionHostProfileService = createDecorator('extensionHostProfileService'); + +export const enum ProfileSessionState { + None = 0, + Starting = 1, + Running = 2, + Stopping = 3 +} + +export interface IExtensionHostProfileService { + _serviceBrand: any; + + readonly onDidChangeState: Event; + readonly onDidChangeLastProfile: Event; + + readonly state: ProfileSessionState; + readonly lastProfile: IExtensionHostProfile; + + startProfiling(): void; + stopProfiling(): void; + + clearLastProfile(): void; +} + +interface IExtensionProfileInformation { + /** + * segment when the extension was running. + * 2*i = segment start time + * 2*i+1 = segment end time + */ + segments: number[]; + /** + * total time when the extension was running. + * (sum of all segment lengths). + */ + totalTime: number; +} + +interface IRuntimeExtension { + originalIndex: number; + description: IExtensionDescription; + marketplaceInfo: IExtension; + status: IExtensionsStatus; + profileInfo: IExtensionProfileInformation; +} + +export class RuntimeExtensionsEditor extends BaseEditor { + + static ID: string = 'workbench.editor.runtimeExtensions'; + + private _list: WorkbenchList; + private _profileInfo: IExtensionHostProfile; + + private _elements: IRuntimeExtension[]; + private _extensionsDescriptions: IExtensionDescription[]; + private _updateSoon: RunOnceScheduler; + + constructor( + @ITelemetryService telemetryService: ITelemetryService, + @IThemeService themeService: IThemeService, + @IExtensionsWorkbenchService private readonly _extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionService private readonly _extensionService: IExtensionService, + @IListService private readonly _listService: IListService, + @IContextKeyService private readonly _contextKeyService: IContextKeyService, + @IMessageService private readonly _messageService: IMessageService, + @IContextMenuService private readonly _contextMenuService: IContextMenuService, + @IInstantiationService private readonly _instantiationService: IInstantiationService, + @IExtensionHostProfileService private readonly _extensionHostProfileService: IExtensionHostProfileService, + ) { + super(RuntimeExtensionsEditor.ID, telemetryService, themeService); + + this._list = null; + this._profileInfo = this._extensionHostProfileService.lastProfile; + this._register(this._extensionHostProfileService.onDidChangeLastProfile(() => { + this._profileInfo = this._extensionHostProfileService.lastProfile; + this._updateExtensions(); + })); + + this._elements = null; + + this._extensionsDescriptions = []; + this._updateExtensions(); + + this._updateSoon = this._register(new RunOnceScheduler(() => this._updateExtensions(), 200)); + + this._extensionService.getExtensions().then((extensions) => { + // We only deal with extensions with source code! + this._extensionsDescriptions = extensions.filter((extension) => { + return !!extension.main; + }); + this._updateExtensions(); + }); + this._register(this._extensionService.onDidChangeExtensionsStatus(() => this._updateSoon.schedule())); + } + + private _updateExtensions(): void { + this._elements = this._resolveExtensions(); + if (this._list) { + this._list.splice(0, this._list.length, this._elements); + } + } + + private _resolveExtensions(): IRuntimeExtension[] { + let marketplaceMap: { [id: string]: IExtension; } = Object.create(null); + for (let extension of this._extensionsWorkbenchService.local) { + marketplaceMap[extension.id] = extension; + } + + let statusMap = this._extensionService.getExtensionsStatus(); + + // group profile segments by extension + let segments: { [id: string]: number[]; } = Object.create(null); + + if (this._profileInfo) { + let currentStartTime = this._profileInfo.startTime; + for (let i = 0, len = this._profileInfo.deltas.length; i < len; i++) { + const id = this._profileInfo.ids[i]; + const delta = this._profileInfo.deltas[i]; + + let extensionSegments = segments[id]; + if (!extensionSegments) { + extensionSegments = []; + segments[id] = extensionSegments; + } + + extensionSegments.push(currentStartTime); + currentStartTime = currentStartTime + delta; + extensionSegments.push(currentStartTime); + } + } + + let result: IRuntimeExtension[] = []; + for (let i = 0, len = this._extensionsDescriptions.length; i < len; i++) { + const extensionDescription = this._extensionsDescriptions[i]; + + let profileInfo: IExtensionProfileInformation = null; + if (this._profileInfo) { + let extensionSegments = segments[extensionDescription.id] || []; + let extensionTotalTime = 0; + for (let j = 0, lenJ = extensionSegments.length / 2; j < lenJ; j++) { + const startTime = extensionSegments[2 * j]; + const endTime = extensionSegments[2 * j + 1]; + extensionTotalTime += (endTime - startTime); + } + profileInfo = { + segments: extensionSegments, + totalTime: extensionTotalTime + }; + } + + result[i] = { + originalIndex: i, + description: extensionDescription, + marketplaceInfo: marketplaceMap[extensionDescription.id], + status: statusMap[extensionDescription.id], + profileInfo: profileInfo + }; + } + + result = result.filter((element) => element.status.activationTimes); + + if (this._profileInfo) { + // sort descending by time spent in the profiler + result = result.sort((a, b) => { + if (a.profileInfo.totalTime === b.profileInfo.totalTime) { + return a.originalIndex - b.originalIndex; + } + return b.profileInfo.totalTime - a.profileInfo.totalTime; + }); + } + + return result; + } + + protected createEditor(parent: Builder): void { + const container = parent.getHTMLElement(); + + addClass(container, 'runtime-extensions-editor'); + + const TEMPLATE_ID = 'runtimeExtensionElementTemplate'; + + const delegate = new class implements IDelegate{ + getHeight(element: IRuntimeExtension): number { + return 62; + } + getTemplateId(element: IRuntimeExtension): string { + return TEMPLATE_ID; + } + }; + + interface IRuntimeExtensionTemplateData { + root: HTMLElement; + element: HTMLElement; + name: HTMLElement; + + activationTime: HTMLElement; + profileTime: HTMLElement; + + profileTimeline: HTMLElement; + + msgIcon: HTMLElement; + msgLabel: HTMLElement; + + actionbar: ActionBar; + disposables: IDisposable[]; + elementDisposables: IDisposable[]; + } + + const renderer: IRenderer = { + templateId: TEMPLATE_ID, + renderTemplate: (root: HTMLElement): IRuntimeExtensionTemplateData => { + const element = append(root, $('.extension')); + + const desc = append(element, $('div.desc')); + const name = append(desc, $('div.name')); + + const msgContainer = append(desc, $('div.msg')); + const msgIcon = append(msgContainer, $('.')); + const msgLabel = append(msgContainer, $('span.msg-label')); + + const timeContainer = append(element, $('.time')); + const activationTime = append(timeContainer, $('div.activation-time')); + const profileTime = append(timeContainer, $('div.profile-time')); + + const profileTimeline = append(element, $('div.profile-timeline')); + + const actionbar = new ActionBar(element, { + animated: false + }); + actionbar.onDidRun(({ error }) => error && this._messageService.show(Severity.Error, error)); + actionbar.push(new ReportExtensionIssueAction(), { icon: true, label: true }); + + const disposables = [actionbar]; + + return { + root, + element, + name, + actionbar, + activationTime, + profileTime, + profileTimeline, + msgIcon, + msgLabel, + disposables, + elementDisposables: [] + }; + }, + + renderElement: (element: IRuntimeExtension, index: number, data: IRuntimeExtensionTemplateData): void => { + + data.elementDisposables = dispose(data.elementDisposables); + + toggleClass(data.root, 'odd', index % 2 === 1); + + data.name.textContent = element.marketplaceInfo ? element.marketplaceInfo.displayName : element.description.displayName; + + const activationTimes = element.status.activationTimes; + let syncTime = activationTimes.codeLoadingTime + activationTimes.activateCallTime; + data.activationTime.textContent = activationTimes.startup ? `Startup Activation: ${syncTime}ms` : `Activation: ${syncTime}ms`; + data.actionbar.context = element; + toggleClass(data.actionbar.getContainer().getHTMLElement(), 'hidden', element.marketplaceInfo && element.marketplaceInfo.type === LocalExtensionType.User && (!element.description.repository || !element.description.repository.url)); + + let title: string; + if (activationTimes.activationEvent === '*') { + title = nls.localize('starActivation', "Activated on start-up"); + } else if (/^workspaceContains:/.test(activationTimes.activationEvent)) { + let fileNameOrGlob = activationTimes.activationEvent.substr('workspaceContains:'.length); + if (fileNameOrGlob.indexOf('*') >= 0 || fileNameOrGlob.indexOf('?') >= 0) { + title = nls.localize('workspaceContainsGlobActivation', "Activated because a file matching {0} exists in your workspace", fileNameOrGlob); + } else { + title = nls.localize('workspaceContainsFileActivation', "Activated because file {0} exists in your workspace", fileNameOrGlob); + } + } else if (/^onLanguage:/.test(activationTimes.activationEvent)) { + let language = activationTimes.activationEvent.substr('onLanguage:'.length); + title = nls.localize('languageActivation', "Activated because you opened a {0} file", language); + } else { + title = nls.localize('workspaceGenericActivation', "Activated on {0}", activationTimes.activationEvent); + } + data.activationTime.title = title; + if (!isFalsyOrEmpty(element.status.runtimeErrors)) { + data.msgIcon.className = 'octicon octicon-bug'; + data.msgLabel.textContent = nls.localize('errors', "{0} uncaught errors", element.status.runtimeErrors.length); + } else if (element.status.messages && element.status.messages.length > 0) { + data.msgIcon.className = 'octicon octicon-alert'; + data.msgLabel.textContent = element.status.messages[0].message; + } else { + data.msgIcon.className = ''; + data.msgLabel.textContent = ''; + } + + if (this._profileInfo) { + data.profileTime.textContent = `Profile: ${(element.profileInfo.totalTime / 1000).toFixed(2)}ms`; + const elementSegments = element.profileInfo.segments; + let inner = ''; + for (let i = 0, len = elementSegments.length / 2; i < len; i++) { + const absoluteStart = elementSegments[2 * i]; + const absoluteEnd = elementSegments[2 * i + 1]; + + const start = absoluteStart - this._profileInfo.startTime; + const end = absoluteEnd - this._profileInfo.startTime; + + const absoluteDuration = this._profileInfo.endTime - this._profileInfo.startTime; + + const xStart = start / absoluteDuration * 100; + const xEnd = end / absoluteDuration * 100; + + inner += ``; + } + let svg = `${inner}`; + + data.profileTimeline.innerHTML = svg; + data.profileTimeline.style.display = 'inherit'; + } else { + data.profileTime.textContent = ''; + data.profileTimeline.innerHTML = ''; + } + }, + + disposeTemplate: (data: IRuntimeExtensionTemplateData): void => { + data.disposables = dispose(data.disposables); + } + }; + + this._list = new WorkbenchList(container, delegate, [renderer], { + multipleSelectionSupport: false + }, this._contextKeyService, this._listService, this.themeService); + + this._list.splice(0, this._list.length, this._elements); + + this._list.onContextMenu((e) => { + const actions: IAction[] = []; + + actions.push(this.saveExtensionHostProfileAction, this.extensionHostProfileAction); + + this._contextMenuService.showContextMenu({ + getAnchor: () => e.anchor, + getActions: () => TPromise.as(actions) + }); + }); + } + + public getActions(): IAction[] { + return [ + this.saveExtensionHostProfileAction, + this.extensionHostProfileAction + ]; + } + + @memoize + private get extensionHostProfileAction(): IAction { + return this._instantiationService.createInstance(ExtensionHostProfileAction, ExtensionHostProfileAction.ID, ExtensionHostProfileAction.LABEL_START); + } + + @memoize + private get saveExtensionHostProfileAction(): IAction { + return this._instantiationService.createInstance(SaveExtensionHostProfileAction, SaveExtensionHostProfileAction.ID, SaveExtensionHostProfileAction.LABEL); + } + + public layout(dimension: Dimension): void { + this._list.layout(dimension.height); + } +} + +export class RuntimeExtensionsInput extends EditorInput { + + static ID = 'workbench.runtimeExtensions.input'; + + constructor() { + super(); + } + + getTypeId(): string { + return RuntimeExtensionsInput.ID; + } + + getName(): string { + return nls.localize('extensionsInputName', "Running Extensions"); + } + + matches(other: any): boolean { + if (!(other instanceof RuntimeExtensionsInput)) { + return false; + } + return true; + } + + resolve(refresh?: boolean): TPromise { + return TPromise.as(null); + } + + supportsSplitEditor(): boolean { + return false; + } + + getResource(): URI { + return URI.from({ + scheme: 'runtime-extensions', + path: 'default' + }); + } +} + +export class ShowRuntimeExtensionsAction extends Action { + static ID = 'workbench.action.showRuntimeExtensions'; + static LABEL = nls.localize('showRuntimeExtensions', "Show Running Extensions"); + + constructor( + id: string, label: string, + @IWorkbenchEditorService private readonly _editorService: IWorkbenchEditorService, + @IInstantiationService private readonly _instantiationService: IInstantiationService + ) { + super(id, label); + } + + public run(e?: any): TPromise { + return this._editorService.openEditor(this._instantiationService.createInstance(RuntimeExtensionsInput), { revealIfOpened: true }); + } +} + +class ReportExtensionIssueAction extends Action { + static ID = 'workbench.extensions.action.reportExtensionIssue'; + static LABEL = nls.localize('reportExtensionIssue', "Report Issue"); + + constructor( + id: string = ReportExtensionIssueAction.ID, label: string = ReportExtensionIssueAction.LABEL + ) { + super(id, label, 'extension-action report-issue'); + } + + run(extension: IRuntimeExtension): TPromise { + clipboard.writeText('```json \n' + JSON.stringify(extension.status, null, '\t') + '\n```'); + window.open(this.generateNewIssueUrl(extension)); + + return TPromise.as(null); + } + + private generateNewIssueUrl(extension: IRuntimeExtension): string { + let baseUrl = extension.marketplaceInfo && extension.marketplaceInfo.type === LocalExtensionType.User && extension.description.repository ? extension.description.repository.url : undefined; + if (!!baseUrl) { + baseUrl = `${baseUrl.indexOf('.git') !== -1 ? baseUrl.substr(0, baseUrl.length - 4) : baseUrl}/issues/new/`; + } else { + baseUrl = product.reportIssueUrl; + } + + const osVersion = `${os.type()} ${os.arch()} ${os.release()}`; + const queryStringPrefix = baseUrl.indexOf('?') === -1 ? '?' : '&'; + const body = encodeURIComponent( + `- Extension Name: ${extension.description.name} +- Extension Version: ${extension.description.version} +- OS Version: ${osVersion} +- VSCode version: ${pkg.version}` + '\n\n We have written the needed data into your clipboard. Please paste:' + ); + + return `${baseUrl}${queryStringPrefix}body=${body}`; + } +} + +class ExtensionHostProfileAction extends Action { + static ID = 'workbench.extensions.action.extensionHostProfile'; + static LABEL_START = nls.localize('extensionHostProfileStart', "Start Extension Host Profile"); + static LABEL_STOP = nls.localize('extensionHostProfileStop', "Stop Extension Host Profile"); + static STOP_CSS_CLASS = 'extension-host-profile-stop'; + static START_CSS_CLASS = 'extension-host-profile-start'; + + constructor( + id: string = ExtensionHostProfileAction.ID, label: string = ExtensionHostProfileAction.LABEL_START, + @IExtensionHostProfileService private readonly _extensionHostProfileService: IExtensionHostProfileService, + ) { + super(id, label, ExtensionHostProfileAction.START_CSS_CLASS); + + this._extensionHostProfileService.onDidChangeState(() => this._update()); + } + + private _update(): void { + const state = this._extensionHostProfileService.state; + + if (state === ProfileSessionState.Running) { + this.class = ExtensionHostProfileAction.STOP_CSS_CLASS; + this.label = ExtensionHostProfileAction.LABEL_STOP; + } else { + this.class = ExtensionHostProfileAction.START_CSS_CLASS; + this.label = ExtensionHostProfileAction.LABEL_START; + } + } + + run(): TPromise { + const state = this._extensionHostProfileService.state; + + if (state === ProfileSessionState.Running) { + this._extensionHostProfileService.stopProfiling(); + } else if (state === ProfileSessionState.None) { + this._extensionHostProfileService.startProfiling(); + } + + return TPromise.as(null); + } +} + +class SaveExtensionHostProfileAction extends Action { + + static LABEL = nls.localize('saveExtensionHostProfile', "Save Extension Host Profile"); + static ID = 'workbench.extensions.action.saveExtensionHostProfile'; + + constructor( + id: string = SaveExtensionHostProfileAction.ID, label: string = SaveExtensionHostProfileAction.LABEL, + @IWindowService private readonly _windowService: IWindowService, + @IEnvironmentService private readonly _environmentService: IEnvironmentService, + @IExtensionHostProfileService private readonly _extensionHostProfileService: IExtensionHostProfileService, + ) { + super(id, label, 'save-extension-host-profile', false); + this.enabled = (this._extensionHostProfileService.lastProfile !== null); + this._extensionHostProfileService.onDidChangeLastProfile(() => { + this.enabled = (this._extensionHostProfileService.lastProfile !== null); + }); + } + + async run(): TPromise { + let picked = this._windowService.showSaveDialog({ + title: 'Save Extension Host Profile', + buttonLabel: 'Save', + defaultPath: `CPU-${new Date().toISOString().replace(/[\-:]/g, '')}.cpuprofile`, + filters: [{ + name: 'CPU Profiles', + extensions: ['cpuprofile', 'txt'] + }] + }); + + if (!picked) { + return; + } + + const profileInfo = this._extensionHostProfileService.lastProfile; + let dataToWrite: object = profileInfo.data; + + if (this._environmentService.isBuilt) { + const profiler = await import('v8-inspect-profiler'); + // when running from a not-development-build we remove + // absolute filenames because we don't want to reveal anything + // about users. We also append the `.txt` suffix to make it + // easier to attach these files to GH issues + + let tmp = profiler.rewriteAbsolutePaths({ profile: dataToWrite }, 'piiRemoved'); + dataToWrite = tmp.profile; + + picked = picked + '.txt'; + } + + return writeFile(picked, JSON.stringify(profileInfo.data, null, '\t')); + } +} diff --git a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts index 2bf8ce1397b..9208d1a21ed 100644 --- a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts @@ -181,8 +181,12 @@ class Extension implements IExtension { return this.gallery ? this.gallery.preview : false; } + private isGalleryOutdated(): boolean { + return this.local && this.gallery && semver.gt(this.local.manifest.version, this.gallery.version); + } + getManifest(): TPromise { - if (this.gallery) { + if (this.gallery && !this.isGalleryOutdated()) { if (this.gallery.assets.manifest) { return this.galleryService.getManifest(this.gallery); } @@ -194,7 +198,7 @@ class Extension implements IExtension { } getReadme(): TPromise { - if (this.gallery) { + if (this.gallery && !this.isGalleryOutdated()) { if (this.gallery.assets.readme) { return this.galleryService.getReadme(this.gallery); } @@ -210,7 +214,7 @@ class Extension implements IExtension { } getChangelog(): TPromise { - if (this.gallery && this.gallery.assets.changelog) { + if (this.gallery && this.gallery.assets.changelog && !this.isGalleryOutdated()) { return this.galleryService.getChangelog(this.gallery); } @@ -231,12 +235,12 @@ class Extension implements IExtension { get dependencies(): string[] { const { local, gallery } = this; + if (gallery && !this.isGalleryOutdated()) { + return gallery.properties.dependencies; + } if (local && local.manifest.extensionDependencies) { return local.manifest.extensionDependencies; } - if (gallery) { - return gallery.properties.dependencies; - } return []; } } @@ -420,14 +424,6 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { } open(extension: IExtension, sideByside: boolean = false): TPromise { - /* __GDPR__ - "extensionGallery:open" : { - "${include}": [ - "${GalleryExtensionTelemetryData}" - ] - } - */ - this.telemetryService.publicLog('extensionGallery:open', extension.telemetryData); return this.editorService.openEditor(this.instantiationService.createInstance(ExtensionsInput, extension), null, sideByside); } @@ -438,7 +434,8 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { // Loading the compatible version only there is an engine property // Otherwise falling back to old way so that we will not make many roundtrips if (gallery.properties.engine) { - this.galleryService.loadCompatibleVersion(gallery).then(compatible => this.syncLocalWithGalleryExtension(installed, compatible)); + this.galleryService.loadCompatibleVersion(gallery) + .then(compatible => compatible ? this.syncLocalWithGalleryExtension(installed, compatible) : null); } else { this.syncLocalWithGalleryExtension(installed, gallery); } @@ -748,9 +745,16 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { if (extension) { this.installing = installing ? this.installing.filter(e => e !== installing) : this.installing; - if (!error) { + if (error) { + if (extension.gallery) { + // Updating extension can be only a gallery extension + const installed = this.installed.filter(e => e.id === extension.id)[0]; + if (installed && installing) { + installing.operation = Operation.Updating; + } + } + } else { extension.local = local; - const installed = this.installed.filter(e => e.id === extension.id)[0]; if (installed) { if (installing) { diff --git a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts index fa5f2c65fdd..38d0d179cfe 100644 --- a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts +++ b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts @@ -279,7 +279,7 @@ suite('ExtensionsWorkbenchService Test', () => { assert.equal(4, actual.rating); assert.equal(100, actual.ratingCount); assert.equal(true, actual.outdated); - assert.deepEqual(['pub.1', 'pub.2'], actual.dependencies); + assert.deepEqual(['pub.1'], actual.dependencies); actual = actuals[1]; assert.equal(LocalExtensionType.System, actual.type); diff --git a/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts b/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts index 6af8ce910c7..ab024a2c681 100644 --- a/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts +++ b/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts @@ -44,7 +44,7 @@ class TwitterFeedbackService implements IFeedbackService { length += ` via @${TwitterFeedbackService.VIA_NAME}`.length; } - return 140 - length; + return 280 - length; } } @@ -88,4 +88,4 @@ export class FeedbackStatusbarItem extends Themable implements IStatusbarItem { return null; } -} \ No newline at end of file +} diff --git a/src/vs/workbench/parts/files/browser/editors/fileEditorTracker.ts b/src/vs/workbench/parts/files/browser/editors/fileEditorTracker.ts index 56624ba490d..a4b89ff6e86 100644 --- a/src/vs/workbench/parts/files/browser/editors/fileEditorTracker.ts +++ b/src/vs/workbench/parts/files/browser/editors/fileEditorTracker.ts @@ -27,6 +27,7 @@ import { ResourceQueue } from 'vs/base/common/async'; import { ResourceMap } from 'vs/base/common/map'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { isCodeEditor } from 'vs/editor/browser/editorBrowser'; +import { SideBySideEditor } from 'vs/workbench/browser/parts/editor/sideBySideEditor'; export class FileEditorTracker implements IWorkbenchContribution { @@ -141,8 +142,7 @@ export class FileEditorTracker implements IWorkbenchContribution { // We have received reports of users seeing delete events even though the file still // exists (network shares issue: https://github.com/Microsoft/vscode/issues/13665). // Since we do not want to close an editor without reason, we have to check if the - // file is really gone and not just a faulty file event (TODO@Ben revisit when we - // have a more stable file watcher in place for this scenario). + // file is really gone and not just a faulty file event. // This only applies to external file events, so we need to check for the isExternal // flag. let checkExists: TPromise; @@ -263,8 +263,16 @@ export class FileEditorTracker implements IWorkbenchContribution { editors.forEach(editor => { const resource = toResource(editor.input, { supportSideBySide: true }); + // Support side-by-side binary editors too + let isBinaryEditor = false; + if (editor instanceof SideBySideEditor) { + isBinaryEditor = editor.getMasterEditor().getId() === BINARY_FILE_EDITOR_ID; + } else { + isBinaryEditor = editor.getId() === BINARY_FILE_EDITOR_ID; + } + // Binary editor that should reload from event - if (resource && editor.getId() === BINARY_FILE_EDITOR_ID && (e.contains(resource, FileChangeType.UPDATED) || e.contains(resource, FileChangeType.ADDED))) { + if (resource && isBinaryEditor && (e.contains(resource, FileChangeType.UPDATED) || e.contains(resource, FileChangeType.ADDED))) { this.editorService.openEditor(editor.input, { forceOpen: true, preserveFocus: true }, editor.position).done(null, errors.onUnexpectedError); } }); diff --git a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts index 0b7c07c9f74..37df37a64d7 100644 --- a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts +++ b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts @@ -21,7 +21,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IDisposable, dispose, IReference } from 'vs/base/common/lifecycle'; import { telemetryURIDescriptor } from 'vs/platform/telemetry/common/telemetryUtils'; -import { Verbosity } from 'vs/platform/editor/common/editor'; +import { Verbosity, IRevertOptions } from 'vs/platform/editor/common/editor'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IHashService } from 'vs/workbench/services/hash/common/hashService'; @@ -222,8 +222,8 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { return this.textFileService.save(this.resource); } - public revert(): TPromise { - return this.textFileService.revert(this.resource); + public revert(options?: IRevertOptions): TPromise { + return this.textFileService.revert(this.resource, options); } public getPreferredEditorId(candidates: string[]): string { @@ -240,7 +240,7 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { // Resolve as text return this.textFileService.models.loadOrCreate(this.resource, { encoding: this.preferredEncoding, reload: refresh }).then(model => { - // TODO@Ben this is a bit ugly, because we first resolve the model and then resolve a model reference. the reason being that binary + // This is a bit ugly, because we first resolve the model and then resolve a model reference. the reason being that binary // or very large files do not resolve to a text file model but should be opened as binary files without text. First calling into // loadOrCreate ensures we are not creating model references for these kind of resources. // In addition we have a bit of payload to take into account (encoding, reload) that the text resolver does not handle yet. diff --git a/src/vs/workbench/parts/files/common/files.ts b/src/vs/workbench/parts/files/common/files.ts index 0bb9d5ee7f1..b817c709192 100644 --- a/src/vs/workbench/parts/files/common/files.ts +++ b/src/vs/workbench/parts/files/common/files.ts @@ -20,6 +20,7 @@ import { IModelService } from 'vs/editor/common/services/modelService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IViewlet } from 'vs/workbench/common/viewlet'; +import { InputFocusedContextKey } from 'vs/platform/workbench/common/contextkeys'; /** * Explorer viewlet id. @@ -46,14 +47,14 @@ const explorerResourceIsFolderId = 'explorerResourceIsFolder'; export const ExplorerViewletVisibleContext = new RawContextKey(explorerViewletVisibleId, true); export const ExplorerFolderContext = new RawContextKey(explorerResourceIsFolderId, false); -export const FilesExplorerFocusedContext = new RawContextKey(filesExplorerFocusId, false); +export const FilesExplorerFocusedContext = new RawContextKey(filesExplorerFocusId, true); export const OpenEditorsVisibleContext = new RawContextKey(openEditorsVisibleId, false); -export const OpenEditorsFocusedContext = new RawContextKey(openEditorsFocusId, false); -export const ExplorerFocusedContext = new RawContextKey(explorerViewletFocusId, false); +export const OpenEditorsFocusedContext = new RawContextKey(openEditorsFocusId, true); +export const ExplorerFocusedContext = new RawContextKey(explorerViewletFocusId, true); export const OpenEditorsVisibleCondition = ContextKeyExpr.has(openEditorsVisibleId); -export const FilesExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(filesExplorerFocusId)); -export const ExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(explorerViewletFocusId)); +export const FilesExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(filesExplorerFocusId), ContextKeyExpr.not(InputFocusedContextKey)); +export const ExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(explorerViewletFocusId), ContextKeyExpr.not(InputFocusedContextKey)); /** * File editor input id. diff --git a/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts b/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts index e06c2e39dc9..b7b9b3cd8d8 100644 --- a/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts @@ -12,7 +12,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as DOM from 'vs/base/browser/dom'; import { Builder } from 'vs/base/browser/builder'; import { VIEWLET_ID, ExplorerViewletVisibleContext, IFilesConfiguration, OpenEditorsVisibleContext, OpenEditorsVisibleCondition, IExplorerViewlet } from 'vs/workbench/parts/files/common/files'; -import { PersistentViewsViewlet, ViewsViewletPanel, IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; +import { PersistentViewsViewlet, IViewletViewOptions, ViewsViewletPanel } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; import { ActionRunner, FileViewletState } from 'vs/workbench/parts/files/electron-browser/views/explorerViewer'; import { ExplorerView, IExplorerViewOptions } from 'vs/workbench/parts/files/electron-browser/views/explorerView'; @@ -271,7 +271,7 @@ export class ExplorerViewlet extends PersistentViewsViewlet implements IExplorer return false; } - if (view instanceof ExplorerView || view instanceof OpenEditorsView) { + if (view instanceof ExplorerView) { const viewer = view.getViewer(); if (!viewer) { return false; @@ -280,6 +280,9 @@ export class ExplorerViewlet extends PersistentViewsViewlet implements IExplorer return !!viewer.getFocus() || (viewer.getSelection() && viewer.getSelection().length > 0); } + if (view instanceof OpenEditorsView && !!view.getList()) { + return view.getList().isDOMFocused(); + } return false; } diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index 5dbf38e4515..2b3598a96ba 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -693,7 +693,7 @@ export class BaseDeleteFileAction extends BaseFileAction { message = nls.localize('dirtyMessageFileDelete', "You are deleting a file with unsaved changes. Do you want to continue?"); } - const res = this.messageService.confirmSync({ + const res = this.messageService.confirm({ message, type: 'warning', detail: nls.localize('dirtyWarning', "Your changes will be lost if you don't save them."), @@ -719,7 +719,7 @@ export class BaseDeleteFileAction extends BaseFileAction { // Confirm for moving to trash else if (this.useTrash) { - confirmPromise = this.messageService.confirm({ + confirmPromise = this.messageService.confirmWithCheckbox({ message: this.element.isDirectory ? nls.localize('confirmMoveTrashMessageFolder', "Are you sure you want to delete '{0}' and its contents?", this.element.name) : nls.localize('confirmMoveTrashMessageFile', "Are you sure you want to delete '{0}'?", this.element.name), detail: isWindows ? nls.localize('undoBin', "You can restore from the recycle bin.") : nls.localize('undoTrash', "You can restore from the trash."), primaryButton, @@ -732,7 +732,7 @@ export class BaseDeleteFileAction extends BaseFileAction { // Confirm for deleting permanently else { - confirmPromise = this.messageService.confirm({ + confirmPromise = this.messageService.confirmWithCheckbox({ message: this.element.isDirectory ? nls.localize('confirmDeleteMessageFolder', "Are you sure you want to permanently delete '{0}' and its contents?", this.element.name) : nls.localize('confirmDeleteMessageFile', "Are you sure you want to permanently delete '{0}'?", this.element.name), detail: nls.localize('irreversible', "This action is irreversible!"), primaryButton, @@ -861,7 +861,7 @@ export class ImportFileAction extends BaseFileAction { type: 'warning' }; - overwrite = this.messageService.confirmSync(confirm); + overwrite = this.messageService.confirm(confirm); } if (!overwrite) { @@ -1141,7 +1141,9 @@ export class OpenToSideAction extends Action { public run(): TPromise { // Remove highlight - this.tree.clearHighlight(); + if (this.tree) { + this.tree.clearHighlight(); + } // Set side input return this.editorService.openEditor({ @@ -1668,7 +1670,8 @@ export class RevertFileAction extends Action { id: string, label: string, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @ITextFileService private textFileService: ITextFileService + @ITextFileService private textFileService: ITextFileService, + @IMessageService private messageService: IMessageService ) { super(id, label); @@ -1688,7 +1691,9 @@ export class RevertFileAction extends Action { } if (resource && resource.scheme !== 'untitled') { - return this.textFileService.revert(resource, { force: true }); + return this.textFileService.revert(resource, { force: true }).then(null, error => { + this.messageService.show(Severity.Error, nls.localize('genericRevertError', "Failed to revert '{0}': {1}", paths.basename(resource.fsPath), toErrorMessage(error, false))); + }); } return TPromise.as(true); @@ -1713,7 +1718,7 @@ export class FocusOpenEditorsView extends Action { const openEditorsView = viewlet.getOpenEditorsView(); if (openEditorsView) { openEditorsView.setExpanded(true); - openEditorsView.getViewer().DOMFocus(); + openEditorsView.getList().domFocus(); } }); } diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index b2eeab111dd..40455bd3cb2 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -174,21 +174,22 @@ export function withFocusedFilesExplorer(accessor: ServicesAccessor): TPromise<{ }); } -function withFocusedOpenEditorsViewItem(accessor: ServicesAccessor): TPromise<{ explorer: ExplorerViewlet, tree: ITree, item: OpenEditor }> { +function withFocusedOpenEditorsViewItem(accessor: ServicesAccessor): TPromise<{ explorer: ExplorerViewlet, item: OpenEditor }> { return withVisibleExplorer(accessor).then(explorer => { - if (!explorer || !explorer.getOpenEditorsView()) { + if (!explorer || !explorer.getOpenEditorsView() || !explorer.getOpenEditorsView().getList()) { return void 0; // empty folder or hidden explorer } - const tree = explorer.getOpenEditorsView().getViewer(); + const list = explorer.getOpenEditorsView().getList(); // Ignore if in highlight mode or not focused - const focus = tree.getFocus(); - if (tree.getHighlight() || !tree.isDOMFocused() || !(focus instanceof OpenEditor)) { + const focused = list.getFocusedElements(); + const focus = focused.length ? focused[0] : undefined; + if (!list.isDOMFocused() || !(focus instanceof OpenEditor)) { return void 0; } - return { explorer, tree, item: focus }; + return { explorer, item: focus }; }); } diff --git a/src/vs/workbench/parts/files/electron-browser/media/explorerviewlet.css b/src/vs/workbench/parts/files/electron-browser/media/explorerviewlet.css index 07ff1c0ca4b..ef3c88021fd 100644 --- a/src/vs/workbench/parts/files/electron-browser/media/explorerviewlet.css +++ b/src/vs/workbench/parts/files/electron-browser/media/explorerviewlet.css @@ -41,11 +41,12 @@ flex: 0; /* do not steal space when label is hidden because we are in edit mode */ } -.explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content { +.explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row { + padding-left: 22px; display: flex; } -.explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content > .monaco-action-bar { +.explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row > .monaco-action-bar { visibility: hidden; } @@ -106,32 +107,32 @@ display: none; } -.explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row:hover > .content .monaco-action-bar, -.explorer-viewlet .explorer-open-editors .monaco-tree.focused .monaco-tree-row.focused > .content .monaco-action-bar, -.explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content.dirty > .monaco-action-bar { +.explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row:hover > .monaco-action-bar, +.explorer-viewlet .explorer-open-editors .monaco-list.focused .monaco-list-row.focused > .monaco-action-bar, +.explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row.dirty > .monaco-action-bar { visibility: visible; } -.explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content .monaco-action-bar .action-label { +.explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row > .monaco-action-bar .action-label { display: block; } -.explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content .monaco-action-bar .close-editor-action { +.explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row > .monaco-action-bar .close-editor-action { width: 8px; height: 22px; } -.explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content .monaco-action-bar .action-close-all-files, -.explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content .monaco-action-bar .save-all { +.explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row > .monaco-action-bar .action-close-all-files, +.explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row > .monaco-action-bar .save-all { width: 23px; height: 22px; } -.explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content > .open-editor { +.explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row > .open-editor { flex: 1; } -.explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content > .editor-group { +.explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row > .editor-group { flex: 1; } @@ -169,7 +170,7 @@ height: 20px; } -.explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row .editor-group { +.explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row .editor-group { font-size: 11px; font-weight: bold; text-transform: uppercase; @@ -177,10 +178,10 @@ } /* Bold font style does not go well with CJK fonts */ -.explorer-viewlet:lang(zh-Hans) .explorer-open-editors .monaco-tree .monaco-tree-row .editor-group, -.explorer-viewlet:lang(zh-Hant) .explorer-open-editors .monaco-tree .monaco-tree-row .editor-group, -.explorer-viewlet:lang(ja) .explorer-open-editors .monaco-tree .monaco-tree-row .editor-group, -.explorer-viewlet:lang(ko) .explorer-open-editors .monaco-tree .monaco-tree-row .editor-group { +.explorer-viewlet:lang(zh-Hans) .explorer-open-editors .monaco-list .monaco-list-row .editor-group, +.explorer-viewlet:lang(zh-Hant) .explorer-open-editors .monaco-list .monaco-list-row .editor-group, +.explorer-viewlet:lang(ja) .explorer-open-editors .monaco-list .monaco-list-row .editor-group, +.explorer-viewlet:lang(ko) .explorer-open-editors .monaco-list .monaco-list-row .editor-group { font-weight: normal; } diff --git a/src/vs/workbench/parts/files/electron-browser/media/fileactions.css b/src/vs/workbench/parts/files/electron-browser/media/fileactions.css index 0954b8841ce..a073640bc8f 100644 --- a/src/vs/workbench/parts/files/electron-browser/media/fileactions.css +++ b/src/vs/workbench/parts/files/electron-browser/media/fileactions.css @@ -104,20 +104,20 @@ background: url("action-close.svg") center center no-repeat; } -.explorer-viewlet .explorer-open-editors .focused .monaco-tree-row.selected:not(.highlighted) > .content .close-editor-action { +.explorer-viewlet .explorer-open-editors .focused .monaco-list-row.selected:not(.highlighted) .close-editor-action { background: url("action-close-focus.svg") center center no-repeat; } -.explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row:not(:hover) > .content.dirty > .monaco-action-bar .close-editor-action { +.explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row.dirty:not(:hover) > .monaco-action-bar .close-editor-action { background: url("action-close-dirty.svg") center center no-repeat; } -.vs-dark .explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row:not(:hover) > .content.dirty > .monaco-action-bar .close-editor-action, -.hc-black .monaco-workbench .explorer-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row:not(:hover) > .content.dirty > .monaco-action-bar .close-editor-action { +.vs-dark .explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row.dirty:not(:hover) > .monaco-action-bar .close-editor-action, +.hc-black .monaco-workbench .explorer-viewlet .explorer-open-editors .monaco-list .monaco-list-row.dirty:not(:hover) > .monaco-action-bar .close-editor-action { background: url("action-close-dirty-dark.svg") center center no-repeat; } -.explorer-viewlet .explorer-open-editors .monaco-tree.focused .monaco-tree-row.selected:not(:hover) > .content.dirty > .monaco-action-bar .close-editor-action { +.explorer-viewlet .explorer-open-editors .monaco-list.focused .monaco-list-row.selected.dirty:not(:hover) > .monaco-action-bar .close-editor-action { background: url("action-close-dirty-focus.svg") center center no-repeat; } diff --git a/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts b/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts index 95667aa866e..50804c6c0cd 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts @@ -13,7 +13,7 @@ import { IAction } from 'vs/base/common/actions'; import { Button } from 'vs/base/browser/ui/button/button'; import { $, Builder } from 'vs/base/browser/builder'; import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; -import { ViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; +import { IViewletViewOptions, IViewOptions, ViewsViewletPanel } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { OpenFolderAction, OpenFileFolderAction, AddRootFolderAction } from 'vs/workbench/browser/actions/workspaceActions'; import { attachButtonStyler } from 'vs/platform/theme/common/styler'; diff --git a/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts b/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts index 9ac2116768f..7823cae29c3 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts @@ -8,7 +8,7 @@ import nls = require('vs/nls'); import { TPromise } from 'vs/base/common/winjs.base'; import { Builder, $ } from 'vs/base/browser/builder'; import URI from 'vs/base/common/uri'; -import { ThrottledDelayer, sequence, Delayer } from 'vs/base/common/async'; +import { ThrottledDelayer, Delayer } from 'vs/base/common/async'; import errors = require('vs/base/common/errors'); import paths = require('vs/base/common/paths'); import resources = require('vs/base/common/resources'); @@ -16,8 +16,6 @@ import glob = require('vs/base/common/glob'); import { Action, IAction } from 'vs/base/common/actions'; import { prepareActions } from 'vs/workbench/browser/actions'; import { memoize } from 'vs/base/common/decorators'; -import { ITree } from 'vs/base/parts/tree/browser/tree'; -import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { IFilesConfiguration, ExplorerFolderContext, FilesExplorerFocusedContext, ExplorerFocusedContext, SortOrderConfiguration, SortOrder, IExplorerView } from 'vs/workbench/parts/files/common/files'; import { FileOperation, FileOperationEvent, IResolveFileOptions, FileChangeType, FileChangesEvent, IFileService, FILES_EXCLUDE_CONFIG } from 'vs/platform/files/common/files'; import { RefreshViewExplorerAction, NewFolderAction, NewFileAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; @@ -27,9 +25,8 @@ import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import * as DOM from 'vs/base/browser/dom'; import { CollapseAction } from 'vs/workbench/browser/viewlet'; -import { ViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; +import { TreeViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { FileStat, Model } from 'vs/workbench/parts/files/common/explorerModel'; -import { IListService } from 'vs/platform/list/browser/listService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import { ExplorerDecorationsProvider } from 'vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider'; @@ -45,14 +42,14 @@ import { ResourceContextKey } from 'vs/workbench/common/resources'; import { ResourceGlobMatcher } from 'vs/workbench/electron-browser/resources'; import { IWorkbenchThemeService, IFileIconTheme } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { isLinux } from 'vs/base/common/platform'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IDecorationsService } from 'vs/workbench/services/decorations/browser/decorations'; +import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; export interface IExplorerViewOptions extends IViewletViewOptions { viewletState: FileViewletState; } -export class ExplorerView extends ViewsViewletPanel implements IExplorerView { +export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView { public static ID: string = 'workbench.explorer.fileView'; private static readonly EXPLORER_FILE_CHANGES_REACT_DELAY = 500; // delay in ms to react to file changes to give our internal events a chance to react first @@ -63,7 +60,7 @@ export class ExplorerView extends ViewsViewletPanel implements IExplorerView { public readonly id: string = ExplorerView.ID; - private explorerViewer: ITree; + private explorerViewer: WorkbenchTree; private filter: FileFilter; private viewletState: FileViewletState; @@ -72,9 +69,6 @@ export class ExplorerView extends ViewsViewletPanel implements IExplorerView { private resourceContext: ResourceContextKey; private folderContext: IContextKey; - private filesExplorerFocusedContext: IContextKey; - private explorerFocusedContext: IContextKey; - private fileEventsFilter: ResourceGlobMatcher; private shouldRefresh: boolean; @@ -95,7 +89,7 @@ export class ExplorerView extends ViewsViewletPanel implements IExplorerView { @IFileService private fileService: IFileService, @IPartService private partService: IPartService, @IKeybindingService keybindingService: IKeybindingService, - @IContextKeyService contextKeyService: IContextKeyService, + @IContextKeyService private contextKeyService: IContextKeyService, @IConfigurationService private configurationService: IConfigurationService, @IWorkbenchThemeService private themeService: IWorkbenchThemeService, @IDecorationsService decorationService: IDecorationsService @@ -111,9 +105,6 @@ export class ExplorerView extends ViewsViewletPanel implements IExplorerView { this.resourceContext = instantiationService.createInstance(ResourceContextKey); this.folderContext = ExplorerFolderContext.bindTo(contextKeyService); - this.filesExplorerFocusedContext = FilesExplorerFocusedContext.bindTo(contextKeyService); - this.explorerFocusedContext = ExplorerFocusedContext.bindTo(contextKeyService); - this.fileEventsFilter = instantiationService.createInstance( ResourceGlobMatcher, (root: URI) => this.getFileEventsExcludes(root), @@ -406,7 +397,7 @@ export class ExplorerView extends ViewsViewletPanel implements IExplorerView { return model; } - public createViewer(container: Builder): ITree { + public createViewer(container: Builder): WorkbenchTree { const dataSource = this.instantiationService.createInstance(FileDataSource); const renderer = this.instantiationService.createInstance(FileRenderer, this.viewletState); const controller = this.instantiationService.createInstance(FileController, this.viewletState); @@ -417,7 +408,7 @@ export class ExplorerView extends ViewsViewletPanel implements IExplorerView { const dnd = this.instantiationService.createInstance(FileDragAndDrop); const accessibilityProvider = this.instantiationService.createInstance(FileAccessibilityProvider); - this.explorerViewer = new Tree(container.getHTMLElement(), { + this.explorerViewer = new WorkbenchTree(container.getHTMLElement(), { dataSource, renderer, controller, @@ -431,13 +422,17 @@ export class ExplorerView extends ViewsViewletPanel implements IExplorerView { twistiePixels: 12, showTwistie: false, keyboardSupport: false - }); + }, this.contextKeyService, this.listService, this.themeService); - // Theme styler - this.disposables.push(attachListStyler(this.explorerViewer, this.themeService)); + // Bind context keys + const filesExplorerFocusedContextKey = FilesExplorerFocusedContext.bindTo(this.explorerViewer.contextKeyService); + const explorerFocusedContextKey = ExplorerFocusedContext.bindTo(this.explorerViewer.contextKeyService); - // Register to list service - this.disposables.push(this.listService.register(this.explorerViewer, [this.explorerFocusedContext, this.filesExplorerFocusedContext])); + // Update context keys + this.disposables.push(this.explorerViewer.onFocusChange(focused => { + filesExplorerFocusedContextKey.set(focused); + explorerFocusedContextKey.set(focused); + })); // Update Viewer based on File Change Events this.disposables.push(this.fileService.onAfterOperation(e => this.onFileOperation(e))); @@ -784,31 +779,70 @@ export class ExplorerView extends ViewsViewletPanel implements IExplorerView { }); } - // Load Root Stat with given target path configured + const promise = this.resolveRoots(targetsToResolve, targetsToExpand); + this.progressService.showWhile(promise, this.partService.isCreated() ? 800 : 3200 /* less ugly initial startup */); + + return promise; + } + + private resolveRoots(targetsToResolve: { root: FileStat, resource: URI, options: { resolveTo: any[] } }[], targetsToExpand: URI[]): TPromise { + + // Display roots only when multi folder workspace + const input = this.contextService.getWorkbenchState() === WorkbenchState.FOLDER ? this.model.roots[0] : this.model; + const errorFileStat = (resource: URI, root: FileStat) => FileStat.create({ + resource: resource, + name: paths.basename(resource.fsPath), + mtime: 0, + etag: undefined, + isDirectory: true, + hasChildren: false + }, root); + + if (targetsToResolve.every(t => t.root.resource.scheme === 'file')) { + // All the roots are local, resolve them in parallel + return this.fileService.resolveFiles(targetsToResolve).then(results => { + // Convert to model + const modelStats = results.map((result, index) => { + if (result.success) { + return FileStat.create(result.stat, targetsToResolve[index].root, targetsToResolve[index].options.resolveTo); + } + + return errorFileStat(targetsToResolve[index].resource, targetsToResolve[index].root); + }); + // Subsequent refresh: Merge stat into our local model and refresh tree + modelStats.forEach((modelStat, index) => FileStat.mergeLocalWithDisk(modelStat, this.model.roots[index])); + + const statsToExpand: FileStat[] = this.explorerViewer.getExpandedElements().concat(targetsToExpand.map(expand => this.model.findClosest(expand))); + + if (input === this.explorerViewer.getInput()) { + return this.explorerViewer.refresh().then(() => statsToExpand.length ? this.explorerViewer.expandAll(statsToExpand) : undefined); + } + + // Make sure to expand all folders that where expanded in the previous session + // Special case: there is nothing to expand, thus expand all the roots (they might just be added) + if (statsToExpand.length === 0) { + statsToExpand.push(...this.model.roots); + } + return this.explorerViewer.setInput(input).then(() => statsToExpand.length ? this.explorerViewer.expandAll(statsToExpand) : undefined); + }); + } + + // There is a remote root, resolve the roots sequantally let statsToExpand: FileStat[] = []; let delayer = new Delayer(100); let delayerPromise: TPromise; - - const promise = TPromise.join(targetsToResolve.map((target, index) => this.fileService.resolveFile(target.resource, target.options) - .then(result => FileStat.create(result, target.root, target.options.resolveTo), err => FileStat.create({ - resource: target.resource, - name: resources.basenameOrAuthority(target.resource), - mtime: 0, - etag: undefined, - isDirectory: true, - hasChildren: false - }, target.root)) + return TPromise.join(targetsToResolve.map((target, index) => this.fileService.resolveFile(target.resource, target.options) + .then(result => FileStat.create(result, target.root, target.options.resolveTo), err => errorFileStat(target.resource, target.root)) .then(modelStat => { // Subsequent refresh: Merge stat into our local model and refresh tree FileStat.mergeLocalWithDisk(modelStat, this.model.roots[index]); - const input = this.contextService.getWorkbenchState() === WorkbenchState.FOLDER ? this.model.roots[0] : this.model; let toExpand: FileStat[] = this.explorerViewer.getExpandedElements().concat(targetsToExpand.map(target => this.model.findClosest(target))); if (input === this.explorerViewer.getInput()) { statsToExpand = statsToExpand.concat(toExpand); if (!delayer.isTriggered()) { delayerPromise = delayer.trigger(() => this.explorerViewer.refresh() - .then(() => sequence(statsToExpand.map(e => () => this.explorerViewer.expand(e)))) + .then(() => this.explorerViewer.expandAll(statsToExpand)) .then(() => statsToExpand = []) ); } @@ -822,12 +856,8 @@ export class ExplorerView extends ViewsViewletPanel implements IExplorerView { // We have transitioned into workspace view -> expand all roots toExpand = this.model.roots.concat(toExpand); } - return this.explorerViewer.setInput(input).then(() => sequence(toExpand.map(e => () => this.explorerViewer.expand(e)))); + return this.explorerViewer.setInput(input).then(() => this.explorerViewer.expandAll(toExpand)); }))); - - this.progressService.showWhile(promise, this.partService.isCreated() ? 800 : 3200 /* less ugly initial startup */); - - return promise; } /** diff --git a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts index 766fcc010ad..242683e3f09 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts @@ -56,6 +56,7 @@ import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common import { getPathLabel } from 'vs/base/common/labels'; import { extractResources } from 'vs/workbench/browser/editor'; import { relative } from 'path'; +import { DataTransfers } from 'vs/base/browser/dnd'; export class FileDataSource implements IDataSource { constructor( @@ -793,10 +794,10 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { // Apply some datatransfer types to allow for dragging the element outside of the application if (source) { if (!source.isDirectory) { - originalEvent.dataTransfer.setData('DownloadURL', [MIME_BINARY, source.name, source.resource.toString()].join(':')); + originalEvent.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, source.name, source.resource.toString()].join(':')); } - originalEvent.dataTransfer.setData('text/plain', getPathLabel(source.resource)); + originalEvent.dataTransfer.setData(DataTransfers.TEXT, getPathLabel(source.resource)); } } @@ -915,7 +916,7 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { // If we are in no-workspace context, ask for confirmation to create a workspace let confirmed = true; if (this.contextService.getWorkbenchState() !== WorkbenchState.WORKSPACE) { - confirmed = this.messageService.confirmSync({ + confirmed = this.messageService.confirm({ message: folders.length > 1 ? nls.localize('dropFolders', "Do you want to add the folders to the workspace?") : nls.localize('dropFolder', "Do you want to add the folder to the workspace?"), type: 'question', primaryButton: folders.length > 1 ? nls.localize('addFolders', "&&Add Folders") : nls.localize('addFolder', "&&Add Folder") @@ -947,7 +948,7 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { // Handle confirm setting const confirmDragAndDrop = !isCopy && this.configurationService.getValue(FileDragAndDrop.CONFIRM_DND_SETTING_KEY); if (confirmDragAndDrop) { - confirmPromise = this.messageService.confirm({ + confirmPromise = this.messageService.confirmWithCheckbox({ message: nls.localize('confirmMove', "Are you sure you want to move '{0}'?", source.name), checkbox: { label: nls.localize('doNotAskAgain', "Do not ask me again") @@ -1039,7 +1040,7 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { }; // Move with overwrite if the user confirms - if (this.messageService.confirmSync(confirm)) { + if (this.messageService.confirm(confirm)) { const targetDirty = this.textFileService.getDirty().filter(d => resources.isEqualOrParent(d, targetResource, !isLinux /* ignorecase */)); // Make sure to revert all dirty in target first to be able to overwrite properly diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index 31a79eec423..8d23f75ad38 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -3,36 +3,43 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import nls = require('vs/nls'); -import errors = require('vs/base/common/errors'); +import * as nls from 'vs/nls'; +import * as errors from 'vs/base/common/errors'; import { RunOnceScheduler } from 'vs/base/common/async'; -import { TPromise } from 'vs/base/common/winjs.base'; import { IAction } from 'vs/base/common/actions'; -import dom = require('vs/base/browser/dom'); -import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; -import { IItemCollapseEvent } from 'vs/base/parts/tree/browser/treeModel'; +import * as dom from 'vs/base/browser/dom'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { Position, IEditorInput } from 'vs/platform/editor/common/editor'; import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup } from 'vs/workbench/common/editor'; -import { SaveAllAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; -import { ViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; -import { VIEWLET_ID, OpenEditorsFocusedContext, ExplorerFocusedContext } from 'vs/workbench/parts/files/common/files'; +import { SaveAllAction, SaveAllInGroupAction, OpenToSideAction, SaveFileAction, RevertFileAction, SaveFileAsAction, CompareWithSavedAction, CompareResourcesAction, SelectResourceForCompareAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; +import { IViewletViewOptions, IViewOptions, ViewsViewletPanel } from 'vs/workbench/browser/parts/views/viewsViewlet'; +import { OpenEditorsFocusedContext, ExplorerFocusedContext, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; import { ITextFileService, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; -import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { OpenEditor } from 'vs/workbench/parts/files/common/explorerModel'; -import { Renderer, DataSource, Controller, AccessibilityProvider, ActionProvider, DragAndDrop } from 'vs/workbench/parts/files/electron-browser/views/openEditorsViewer'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { CloseAllEditorsAction } from 'vs/workbench/browser/parts/editor/editorActions'; +import { CloseAllEditorsAction, CloseUnmodifiedEditorsInGroupAction, CloseEditorsInGroupAction, CloseOtherEditorsInGroupAction, CloseEditorAction } from 'vs/workbench/browser/parts/editor/editorActions'; import { ToggleEditorLayoutAction } from 'vs/workbench/browser/actions/toggleEditorLayout'; -import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { IListService } from 'vs/platform/list/browser/listService'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; -import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; +import { attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { badgeBackground, badgeForeground, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { IListService, WorkbenchList } from 'vs/platform/list/browser/listService'; +import { IDelegate, IRenderer, IListContextMenuEvent, IListMouseEvent } from 'vs/base/browser/ui/list/list'; +import { EditorLabel } from 'vs/workbench/browser/labels'; +import { ActionBar, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { KeyCode } from 'vs/base/common/keyCodes'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { ContributableActionProvider } from 'vs/workbench/browser/actions'; +import { memoize } from 'vs/base/common/decorators'; const $ = dom.$; @@ -45,27 +52,25 @@ export class OpenEditorsView extends ViewsViewletPanel { private model: IEditorStacksModel; private dirtyCountElement: HTMLElement; - private structuralTreeRefreshScheduler: RunOnceScheduler; + private listRefreshScheduler: RunOnceScheduler; private structuralRefreshDelay: number; - private groupToRefresh: IEditorGroup; - private fullRefreshNeeded: boolean; - - private openEditorsFocusedContext: IContextKey; - private explorerFocusedContext: IContextKey; + private list: WorkbenchList; + private needsRefresh: boolean; constructor( options: IViewletViewOptions, @IInstantiationService private instantiationService: IInstantiationService, @IContextMenuService contextMenuService: IContextMenuService, @ITextFileService private textFileService: ITextFileService, - @IEditorGroupService editorGroupService: IEditorGroupService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IEditorGroupService private editorGroupService: IEditorGroupService, @IConfigurationService private configurationService: IConfigurationService, @IKeybindingService keybindingService: IKeybindingService, @IListService private listService: IListService, @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IContextKeyService contextKeyService: IContextKeyService, - @IViewletService private viewletService: IViewletService, - @IThemeService private themeService: IThemeService + @IContextKeyService private contextKeyService: IContextKeyService, + @IThemeService private themeService: IThemeService, + @ITelemetryService private telemetryService: ITelemetryService ) { super({ ...(options as IViewOptions), @@ -74,11 +79,29 @@ export class OpenEditorsView extends ViewsViewletPanel { this.model = editorGroupService.getStacksModel(); - this.openEditorsFocusedContext = OpenEditorsFocusedContext.bindTo(contextKeyService); - this.explorerFocusedContext = ExplorerFocusedContext.bindTo(contextKeyService); - this.structuralRefreshDelay = 0; - this.structuralTreeRefreshScheduler = new RunOnceScheduler(() => this.structuralTreeUpdate(), this.structuralRefreshDelay); + this.listRefreshScheduler = new RunOnceScheduler(() => { + const previousLength = this.list.length; + this.list.splice(0, this.list.length, this.elements); + this.focusActiveEditor(); + if (previousLength !== this.list.length) { + this.updateSize(); + } + this.needsRefresh = false; + }, this.structuralRefreshDelay); + + // update on model changes + this.disposables.push(this.model.onModelChanged(e => this.onEditorStacksModelChanged(e))); + + // Also handle configuration updates + this.disposables.push(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationChange(e))); + + // Handle dirty counter + this.disposables.push(this.untitledEditorService.onDidChangeDirty(e => this.updateDirtyIndicator())); + this.disposables.push(this.textFileService.models.onModelsDirty(e => this.updateDirtyIndicator())); + this.disposables.push(this.textFileService.models.onModelsSaved(e => this.updateDirtyIndicator())); + this.disposables.push(this.textFileService.models.onModelsSaveError(e => this.updateDirtyIndicator())); + this.disposables.push(this.textFileService.models.onModelsReverted(e => this.updateDirtyIndicator())); } protected renderHeaderTitle(container: HTMLElement): void { @@ -104,6 +127,43 @@ export class OpenEditorsView extends ViewsViewletPanel { this.updateDirtyIndicator(); } + public renderBody(container: HTMLElement): void { + dom.addClass(container, 'explorer-open-editors'); + dom.addClass(container, 'show-file-icons'); + + const delegate = new OpenEditorsDelegate(); + this.list = new WorkbenchList(container, delegate, [ + new EditorGroupRenderer(this.keybindingService, this.instantiationService, this.editorGroupService), + new OpenEditorRenderer(this.instantiationService, this.keybindingService, this.configurationService, this.editorGroupService) + ], { + identityProvider: element => element instanceof OpenEditor ? element.getId() : element.id.toString(), + multipleSelectionSupport: false + }, this.contextKeyService, this.listService, this.themeService); + + this.updateSize(); + // Bind context keys + OpenEditorsFocusedContext.bindTo(this.list.contextKeyService); + ExplorerFocusedContext.bindTo(this.list.contextKeyService); + + this.disposables.push(this.list.onContextMenu(e => this.onListContextMenu(e))); + + // Open when selecting via keyboard + this.disposables.push(this.list.onMouseClick(e => this.onMouseClick(e, false))); + this.disposables.push(this.list.onMouseDblClick(e => this.onMouseClick(e, true))); + this.disposables.push(this.list.onKeyDown(e => { + const event = new StandardKeyboardEvent(e); + if (event.keyCode === KeyCode.Enter) { + const focused = this.list.getFocusedElements(); + const element = focused.length ? focused[0] : undefined; + if (element instanceof OpenEditor) { + this.openEditor(element, { pinned: false, sideBySide: !!event.ctrlKey, preserveFocus: false }); + } + } + })); + + this.listRefreshScheduler.schedule(0); + } + public getActions(): IAction[] { return [ this.instantiationService.createInstance(ToggleEditorLayoutAction, ToggleEditorLayoutAction.ID, ToggleEditorLayoutAction.LABEL), @@ -112,161 +172,147 @@ export class OpenEditorsView extends ViewsViewletPanel { ]; } - public renderBody(container: HTMLElement): void { - this.treeContainer = super.renderViewTree(container); - dom.addClass(this.treeContainer, 'explorer-open-editors'); - dom.addClass(this.treeContainer, 'show-file-icons'); - - const dataSource = this.instantiationService.createInstance(DataSource); - const actionProvider = this.instantiationService.createInstance(ActionProvider, this.model); - const renderer = this.instantiationService.createInstance(Renderer, actionProvider); - const controller = this.instantiationService.createInstance(Controller, actionProvider, this.model); - const accessibilityProvider = this.instantiationService.createInstance(AccessibilityProvider); - const dnd = this.instantiationService.createInstance(DragAndDrop); - - this.tree = new Tree(this.treeContainer, { - dataSource, - renderer, - controller, - accessibilityProvider, - dnd - }, { - indentPixels: 0, - twistiePixels: 22, - ariaLabel: nls.localize({ key: 'treeAriaLabel', comment: ['Open is an adjective'] }, "Open Editors: List of Active Files"), - showTwistie: false, - keyboardSupport: false - }); - - // Theme styler - this.disposables.push(attachListStyler(this.tree, this.themeService)); - - // Register to list service - this.disposables.push(this.listService.register(this.tree, [this.explorerFocusedContext, this.openEditorsFocusedContext])); - - // Open when selecting via keyboard - this.disposables.push(this.tree.onDidChangeSelection(event => { - if (event && event.payload && event.payload.origin === 'keyboard') { - controller.openEditor(this.tree.getFocus(), { pinned: false, sideBySide: false, preserveFocus: false }); - } - })); - - // Prevent collapsing of editor groups - this.disposables.push(this.tree.onDidCollapseItem((event: IItemCollapseEvent) => { - if (event.item && event.item.getElement() instanceof EditorGroup) { - setTimeout(() => this.tree.expand(event.item.getElement())); // unwind from callback - } - })); - - this.fullRefreshNeeded = true; - this.structuralTreeUpdate(); + public setExpanded(expanded: boolean): void { + super.setExpanded(expanded); + if (expanded && this.needsRefresh) { + this.listRefreshScheduler.schedule(0); + } } - public create(): TPromise { - - // Load Config - this.updateSize(); - - // listeners - this.registerListeners(); - - return super.create(); + public setVisible(visible: boolean): TPromise { + return super.setVisible(visible).then(() => { + if (visible && this.needsRefresh) { + this.listRefreshScheduler.schedule(0); + } + }); } - private registerListeners(): void { + public getList(): WorkbenchList { + return this.list; + } - // update on model changes - this.disposables.push(this.model.onModelChanged(e => this.onEditorStacksModelChanged(e))); + protected layoutBody(size: number): void { + if (this.list) { + this.list.layout(size); + } + } - // Also handle configuration updates - this.disposables.push(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationChange(e))); + @memoize + private get actionProvider(): ActionProvider { + return new ActionProvider(this.instantiationService, this.textFileService, this.untitledEditorService); + } - // Handle dirty counter - this.disposables.push(this.untitledEditorService.onDidChangeDirty(e => this.updateDirtyIndicator())); - this.disposables.push(this.textFileService.models.onModelsDirty(e => this.updateDirtyIndicator())); - this.disposables.push(this.textFileService.models.onModelsSaved(e => this.updateDirtyIndicator())); - this.disposables.push(this.textFileService.models.onModelsSaveError(e => this.updateDirtyIndicator())); - this.disposables.push(this.textFileService.models.onModelsReverted(e => this.updateDirtyIndicator())); - - // We are not updating the tree while the viewlet is not visible. Thus refresh when viewlet becomes visible #6702 - this.disposables.push(this.viewletService.onDidViewletOpen(viewlet => { - if (viewlet.getId() === VIEWLET_ID) { - this.fullRefreshNeeded = true; - this.structuralTreeUpdate(); - this.updateDirtyIndicator(); + private get elements(): (IEditorGroup | OpenEditor)[] { + const result: (IEditorGroup | OpenEditor)[] = []; + this.model.groups.forEach(g => { + if (this.model.groups.length > 1) { + result.push(g); } - })); + result.push(...g.getEditors().map(ei => new OpenEditor(ei, g))); + }); + + return result; + } + + private getIndex(group: IEditorGroup, editor: IEditorInput): number { + let index = editor ? group.indexOf(editor) : 0; + if (this.model.groups.length === 1) { + return index; + } + + for (let g of this.model.groups) { + if (g.id === group.id) { + return index + (!!editor ? 1 : 0); + } else { + index += g.count + 1; + } + } + + return -1; + } + + private onMouseClick(event: IListMouseEvent, isDoubleClick: boolean): void { + const element = event.element; + if (!(element instanceof OpenEditor)) { + return; + } + + if (event.browserEvent && event.browserEvent.button === 1 /* Middle Button */) { + const position = this.model.positionOfGroup(element.editorGroup); + this.editorService.closeEditor(position, element.editorInput).done(null, errors.onUnexpectedError); + } else { + this.openEditor(element, { preserveFocus: !isDoubleClick, pinned: isDoubleClick, sideBySide: event.browserEvent.ctrlKey || event.browserEvent.metaKey }); + } + } + + private openEditor(element: OpenEditor, options: { preserveFocus: boolean; pinned: boolean; sideBySide: boolean; }): void { + if (element) { + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ + this.telemetryService.publicLog('workbenchActionExecuted', { id: 'workbench.files.openFile', from: 'openEditors' }); + let position = this.model.positionOfGroup(element.editorGroup); + if (options.sideBySide && position !== Position.THREE) { + position++; + } + this.editorGroupService.activateGroup(this.model.groupAt(position)); + this.editorService.openEditor(element.editorInput, options, position) + .done(() => this.editorGroupService.activateGroup(this.model.groupAt(position)), errors.onUnexpectedError); + } + } + + private onListContextMenu(e: IListContextMenuEvent): void { + const element = e.element; + this.contextMenuService.showContextMenu({ + getAnchor: () => e.anchor, + getActions: () => this.actionProvider.getSecondaryActions(element), + getActionsContext: () => element instanceof OpenEditor ? { group: element.editorGroup, editor: element.editorInput } : { group: element } + }); } private onEditorStacksModelChanged(e: IStacksModelChangeEvent): void { - if (this.isDisposed || !this.isVisible() || !this.tree) { + if (!this.isVisible() || !this.list || !this.isExpanded()) { + this.needsRefresh = true; return; } // Do a minimal tree update based on if the change is structural or not #6670 if (e.structural) { - // If an editor changed structurally it is enough to refresh the group, otherwise a group changed structurally and we need the full refresh. - // If there are multiple groups to refresh - refresh the whole tree. - if (e.editor && !this.groupToRefresh) { - this.groupToRefresh = e.group; - } else { - this.fullRefreshNeeded = true; + this.listRefreshScheduler.schedule(this.structuralRefreshDelay); + } else if (!this.listRefreshScheduler.isScheduled()) { + + const newElement = e.editor ? new OpenEditor(e.editor, e.group) : e.group; + const index = this.getIndex(e.group, e.editor); + const previousLength = this.list.length; + this.list.splice(index, 1, [newElement]); + + if (previousLength !== this.list.length) { + this.updateSize(); } - this.structuralTreeRefreshScheduler.schedule(this.structuralRefreshDelay); - } else { - const toRefresh = e.editor ? new OpenEditor(e.editor, e.group) : e.group; - this.tree.refresh(toRefresh, false).done(() => this.highlightActiveEditor(), errors.onUnexpectedError); + this.focusActiveEditor(); } } - private structuralTreeUpdate(): void { - // View size - this.minimumBodySize = this.maximumBodySize = this.getExpandedBodySize(this.model); - // Show groups only if there is more than 1 group - const treeInput = this.model.groups.length === 1 ? this.model.groups[0] : this.model; - // TODO@Isidor temporary workaround due to a partial tree refresh issue - this.fullRefreshNeeded = true; - const toRefresh = this.fullRefreshNeeded ? null : this.groupToRefresh; - - (treeInput !== this.tree.getInput() ? this.tree.setInput(treeInput) : this.tree.refresh(toRefresh)).done(() => { - this.fullRefreshNeeded = false; - this.groupToRefresh = null; - - // Always expand all the groups as they are unclickable - return this.tree.expandAll(this.model.groups).then(() => this.highlightActiveEditor()); - }, errors.onUnexpectedError); - } - - private highlightActiveEditor(): void { + private focusActiveEditor(): void { if (this.model.activeGroup && this.model.activeGroup.activeEditor /* could be empty */) { - const openEditor = new OpenEditor(this.model.activeGroup.activeEditor, this.model.activeGroup); - this.tree.clearFocus(); - this.tree.clearSelection(); - - if (openEditor) { - this.tree.setFocus(openEditor); - this.tree.setSelection([openEditor]); - const relativeTop = this.tree.getRelativeTop(openEditor); - if (relativeTop <= 0 || relativeTop >= 1) { - // Only reveal the element if it is not visible #8279 - this.tree.reveal(openEditor).done(null, errors.onUnexpectedError); - } - } + const index = this.getIndex(this.model.activeGroup, this.model.activeGroup.activeEditor); + this.list.setFocus([index]); + this.list.setSelection([index]); + this.list.reveal(index); } } private onConfigurationChange(event: IConfigurationChangeEvent): void { - if (this.isDisposed) { - return; // guard against possible race condition when config change causes recreate of views - } - if (event.affectsConfiguration('explorer.openEditors')) { this.updateSize(); } // Trigger a 'repaint' when decoration settings change if (event.affectsConfiguration('explorer.decorations')) { - this.tree.refresh(); + this.listRefreshScheduler.schedule(); } } @@ -296,24 +342,21 @@ export class OpenEditorsView extends ViewsViewletPanel { if (typeof dynamicHeight !== 'boolean') { dynamicHeight = OpenEditorsView.DEFAULT_DYNAMIC_HEIGHT; } - return OpenEditorsView.computeExpandedBodySize(model, visibleOpenEditors, dynamicHeight); + + return this.computeExpandedBodySize(visibleOpenEditors, dynamicHeight); } - private static computeExpandedBodySize(model: IEditorStacksModel, visibleOpenEditors = OpenEditorsView.DEFAULT_VISIBLE_OPEN_EDITORS, dynamicHeight = OpenEditorsView.DEFAULT_DYNAMIC_HEIGHT): number { - let entryCount = model.groups.reduce((sum, group) => sum + group.count, 0); - // We only show the group labels if there is more than 1 group - if (model.groups.length > 1) { - entryCount += model.groups.length; - } - + private computeExpandedBodySize(visibleOpenEditors = OpenEditorsView.DEFAULT_VISIBLE_OPEN_EDITORS, dynamicHeight = OpenEditorsView.DEFAULT_DYNAMIC_HEIGHT): number { let itemsToShow: number; if (dynamicHeight) { - itemsToShow = Math.min(Math.max(visibleOpenEditors, 1), entryCount); + const elementCount = this.model.groups.map(g => g.count) + .reduce((first, second) => first + second, this.model.groups.length > 1 ? this.model.groups.length : 0); + itemsToShow = Math.min(Math.max(visibleOpenEditors, 1), elementCount); } else { itemsToShow = Math.max(visibleOpenEditors, 1); } - return itemsToShow * Renderer.ITEM_HEIGHT; + return itemsToShow * OpenEditorsDelegate.ITEM_HEIGHT; } public setStructuralRefreshDelay(delay: number): void { @@ -321,9 +364,289 @@ export class OpenEditorsView extends ViewsViewletPanel { } public getOptimalWidth(): number { - let parentNode = this.tree.getHTMLElement(); + let parentNode = this.list.getHTMLElement(); let childNodes = [].slice.call(parentNode.querySelectorAll('.open-editor > a')); return dom.getLargestChildWidth(parentNode, childNodes); } } + +interface IOpenEditorTemplateData { + container: HTMLElement; + root: EditorLabel; + actionBar: ActionBar; + openEditor: OpenEditor; + toDispose: IDisposable[]; +} + +interface IEditorGroupTemplateData { + root: HTMLElement; + name: HTMLSpanElement; + actionBar: ActionBar; + editorGroup: IEditorGroup; + toDispose: IDisposable[]; +} + +class OpenEditorsDelegate implements IDelegate { + + public static readonly ITEM_HEIGHT = 22; + + getHeight(element: OpenEditor | IEditorGroup): number { + return OpenEditorsDelegate.ITEM_HEIGHT; + } + + getTemplateId(element: OpenEditor | IEditorGroup): string { + if (element instanceof EditorGroup) { + return EditorGroupRenderer.ID; + } + + return OpenEditorRenderer.ID; + } +} + +class EditorGroupRenderer implements IRenderer { + static ID = 'editorgroup'; + + constructor( + private keybindingService: IKeybindingService, + private instantiationService: IInstantiationService, + private editorGroupService: IEditorGroupService + ) { + // noop + } + + get templateId() { + return EditorGroupRenderer.ID; + } + + renderTemplate(container: HTMLElement): IEditorGroupTemplateData { + const editorGroupTemplate: IEditorGroupTemplateData = Object.create(null); + editorGroupTemplate.root = dom.append(container, $('.editor-group')); + editorGroupTemplate.name = dom.append(editorGroupTemplate.root, $('span.name')); + editorGroupTemplate.actionBar = new ActionBar(container); + + const editorGroupActions = [ + this.instantiationService.createInstance(SaveAllInGroupAction, SaveAllInGroupAction.ID, SaveAllInGroupAction.LABEL), + this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, CloseUnmodifiedEditorsInGroupAction.LABEL), + this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, CloseEditorsInGroupAction.LABEL) + ]; + editorGroupActions.forEach(a => { + const key = this.keybindingService.lookupKeybinding(a.id); + editorGroupTemplate.actionBar.push(a, { icon: true, label: false, keybinding: key ? key.getLabel() : void 0 }); + }); + + editorGroupTemplate.toDispose = []; + editorGroupTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_OVER, (e: DragEvent) => { + if (OpenEditorRenderer.DRAGGED_OPEN_EDITOR) { + dom.addClass(container, 'focused'); + } + })); + editorGroupTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_LEAVE, (e: DragEvent) => { + dom.removeClass(container, 'focused'); + })); + editorGroupTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DROP, () => { + dom.removeClass(container, 'focused'); + if (OpenEditorRenderer.DRAGGED_OPEN_EDITOR) { + const model = this.editorGroupService.getStacksModel(); + const positionOfTargetGroup = model.positionOfGroup(editorGroupTemplate.editorGroup); + this.editorGroupService.moveEditor(OpenEditorRenderer.DRAGGED_OPEN_EDITOR.editorInput, model.positionOfGroup(OpenEditorRenderer.DRAGGED_OPEN_EDITOR.editorGroup), positionOfTargetGroup, { preserveFocus: true }); + this.editorGroupService.activateGroup(positionOfTargetGroup); + } + })); + + return editorGroupTemplate; + } + + renderElement(editorGroup: IEditorGroup, index: number, templateData: IEditorGroupTemplateData): void { + templateData.editorGroup = editorGroup; + templateData.name.textContent = editorGroup.label; + templateData.actionBar.context = { group: editorGroup }; + } + + disposeTemplate(templateData: IEditorGroupTemplateData): void { + templateData.actionBar.dispose(); + dispose(templateData.toDispose); + } +} + +class OpenEditorRenderer implements IRenderer { + static ID = 'openeditor'; + public static DRAGGED_OPEN_EDITOR: OpenEditor; + + constructor( + private instantiationService: IInstantiationService, + private keybindingService: IKeybindingService, + private configurationService: IConfigurationService, + private editorGroupService: IEditorGroupService + ) { + // noop + } + + get templateId() { + return OpenEditorRenderer.ID; + } + + renderTemplate(container: HTMLElement): IOpenEditorTemplateData { + const editorTemplate: IOpenEditorTemplateData = Object.create(null); + editorTemplate.container = container; + editorTemplate.actionBar = new ActionBar(container); + container.draggable = true; + + const closeEditorAction = this.instantiationService.createInstance(CloseEditorAction, CloseEditorAction.ID, CloseEditorAction.LABEL); + const key = this.keybindingService.lookupKeybinding(closeEditorAction.id); + editorTemplate.actionBar.push(closeEditorAction, { icon: true, label: false, keybinding: key ? key.getLabel() : void 0 }); + + editorTemplate.root = this.instantiationService.createInstance(EditorLabel, container, void 0); + + editorTemplate.toDispose = []; + + editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_START, (e: DragEvent) => { + + const dragImage = document.createElement('div'); + e.dataTransfer.effectAllowed = 'copyMove'; + dragImage.className = 'monaco-tree-drag-image'; + dragImage.textContent = editorTemplate.openEditor.editorInput.getName(); + document.body.appendChild(dragImage); + e.dataTransfer.setDragImage(dragImage, -10, -10); + setTimeout(() => document.body.removeChild(dragImage), 0); + + OpenEditorRenderer.DRAGGED_OPEN_EDITOR = editorTemplate.openEditor; + })); + editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_OVER, () => { + if (OpenEditorRenderer.DRAGGED_OPEN_EDITOR) { + dom.addClass(container, 'focused'); + } + })); + editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_LEAVE, () => { + dom.removeClass(container, 'focused'); + })); + editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DROP, (e: DragEvent) => { + dom.removeClass(container, 'focused'); + if (OpenEditorRenderer.DRAGGED_OPEN_EDITOR) { + const model = this.editorGroupService.getStacksModel(); + const positionOfTargetGroup = model.positionOfGroup(editorTemplate.openEditor.editorGroup); + const index = editorTemplate.openEditor.editorGroup.indexOf(editorTemplate.openEditor.editorInput); + + this.editorGroupService.moveEditor(OpenEditorRenderer.DRAGGED_OPEN_EDITOR.editorInput, + model.positionOfGroup(OpenEditorRenderer.DRAGGED_OPEN_EDITOR.editorGroup), positionOfTargetGroup, { index, preserveFocus: true }); + this.editorGroupService.activateGroup(positionOfTargetGroup); + } + })); + editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_END, () => { + OpenEditorRenderer.DRAGGED_OPEN_EDITOR = undefined; + })); + + return editorTemplate; + } + + renderElement(editor: OpenEditor, index: number, templateData: IOpenEditorTemplateData): void { + templateData.openEditor = editor; + editor.isDirty() ? dom.addClass(templateData.container, 'dirty') : dom.removeClass(templateData.container, 'dirty'); + templateData.root.setEditor(editor.editorInput, { + italic: editor.isPreview(), + extraClasses: ['open-editor'], + fileDecorations: this.configurationService.getValue().explorer.decorations + }); + templateData.actionBar.context = { group: editor.editorGroup, editor: editor.editorInput }; + } + + disposeTemplate(templateData: IOpenEditorTemplateData): void { + templateData.actionBar.dispose(); + templateData.root.dispose(); + dispose(templateData.toDispose); + } +} + +export class ActionProvider extends ContributableActionProvider { + + constructor( + @IInstantiationService private instantiationService: IInstantiationService, + @ITextFileService private textFileService: ITextFileService, + @IUntitledEditorService private untitledEditorService: IUntitledEditorService + ) { + super(); + } + + public getSecondaryActions(element: any): TPromise { + return super.getSecondaryActions(undefined, element).then(result => { + const autoSaveEnabled = this.textFileService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY; + + if (element instanceof EditorGroup) { + if (!autoSaveEnabled) { + result.push(this.instantiationService.createInstance(SaveAllInGroupAction, SaveAllInGroupAction.ID, nls.localize('saveAll', "Save All"))); + result.push(new Separator()); + } + + result.push(this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified"))); + result.push(this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All"))); + } else { + const openEditor = element; + const resource = openEditor.getResource(); + if (resource) { + // Open to side + result.unshift(this.instantiationService.createInstance(OpenToSideAction, undefined, resource, false)); + + if (!openEditor.isUntitled()) { + + // Files: Save / Revert + if (!autoSaveEnabled) { + result.push(new Separator()); + + const saveAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); + saveAction.setResource(resource); + saveAction.enabled = openEditor.isDirty(); + result.push(saveAction); + + const revertAction = this.instantiationService.createInstance(RevertFileAction, RevertFileAction.ID, RevertFileAction.LABEL); + revertAction.setResource(resource); + revertAction.enabled = openEditor.isDirty(); + result.push(revertAction); + } + } + + // Untitled: Save / Save As + if (openEditor.isUntitled()) { + result.push(new Separator()); + + if (this.untitledEditorService.hasAssociatedFilePath(resource)) { + let saveUntitledAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); + saveUntitledAction.setResource(resource); + result.push(saveUntitledAction); + } + + let saveAsAction = this.instantiationService.createInstance(SaveFileAsAction, SaveFileAsAction.ID, SaveFileAsAction.LABEL); + saveAsAction.setResource(resource); + result.push(saveAsAction); + } + + // Compare Actions + result.push(new Separator()); + + if (!openEditor.isUntitled()) { + const compareWithSavedAction = this.instantiationService.createInstance(CompareWithSavedAction, CompareWithSavedAction.ID, nls.localize('compareWithSaved', "Compare with Saved")); + compareWithSavedAction.setResource(resource); + compareWithSavedAction.enabled = openEditor.isDirty(); + result.push(compareWithSavedAction); + } + + const runCompareAction = this.instantiationService.createInstance(CompareResourcesAction, resource, undefined); + if (runCompareAction._isEnabled()) { + result.push(runCompareAction); + } + result.push(this.instantiationService.createInstance(SelectResourceForCompareAction, resource, undefined)); + + result.push(new Separator()); + } + + result.push(this.instantiationService.createInstance(CloseEditorAction, CloseEditorAction.ID, nls.localize('close', "Close"))); + const closeOtherEditorsInGroupAction = this.instantiationService.createInstance(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, nls.localize('closeOthers', "Close Others")); + closeOtherEditorsInGroupAction.enabled = openEditor.editorGroup.count > 1; + result.push(closeOtherEditorsInGroupAction); + result.push(this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified"))); + result.push(this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All"))); + } + + return result; + }); + } +} diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.ts deleted file mode 100644 index 6c0ac532f9a..00000000000 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsViewer.ts +++ /dev/null @@ -1,521 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import nls = require('vs/nls'); -import errors = require('vs/base/common/errors'); -import { TPromise } from 'vs/base/common/winjs.base'; -import { IAction } from 'vs/base/common/actions'; -import { EditorLabel } from 'vs/workbench/browser/labels'; -import { DefaultController, ClickBehavior, DefaultDragAndDrop } from 'vs/base/parts/tree/browser/treeDefaults'; -import { IDataSource, ITree, IAccessibilityProvider, IDragAndDropData, IDragOverReaction, DRAG_OVER_ACCEPT, DRAG_OVER_REJECT, ContextMenuEvent, IRenderer } from 'vs/base/parts/tree/browser/tree'; -import { ExternalElementsDragAndDropData, ElementsDragAndDropData, DesktopDragAndDropData } from 'vs/base/parts/tree/browser/treeDnd'; -import { ActionBar, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import dom = require('vs/base/browser/dom'); -import { IMouseEvent, DragMouseEvent } from 'vs/base/browser/mouseEvent'; -import { IResourceInput, Position } from 'vs/platform/editor/common/editor'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { IEditorGroup, IEditorStacksModel } from 'vs/workbench/common/editor'; -import { OpenEditor } from 'vs/workbench/parts/files/common/explorerModel'; -import { ContributableActionProvider } from 'vs/workbench/browser/actions'; -import { explorerItemToFileResource, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; -import { ITextFileService, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { EditorStacksModel, EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; -import { SaveFileAction, RevertFileAction, SaveFileAsAction, OpenToSideAction, SelectResourceForCompareAction, CompareResourcesAction, SaveAllInGroupAction, CompareWithSavedAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; -import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { CloseOtherEditorsInGroupAction, CloseEditorAction, CloseEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; - -const $ = dom.$; - -export class DataSource implements IDataSource { - - public getId(tree: ITree, element: any): string { - if (element instanceof EditorStacksModel) { - return 'root'; - } - if (element instanceof EditorGroup) { - return (element).id.toString(); - } - - return (element).getId(); - } - - public hasChildren(tree: ITree, element: any): boolean { - return element instanceof EditorStacksModel || element instanceof EditorGroup; - } - - public getChildren(tree: ITree, element: any): TPromise { - if (element instanceof EditorStacksModel) { - return TPromise.as((element).groups); - } - - const editorGroup = element; - return TPromise.as(editorGroup.getEditors().map(ei => new OpenEditor(ei, editorGroup))); - } - - public getParent(tree: ITree, element: any): TPromise { - return TPromise.as(null); - } -} - -interface IOpenEditorTemplateData { - container: HTMLElement; - root: EditorLabel; - actionBar: ActionBar; -} - -interface IEditorGroupTemplateData { - root: HTMLElement; - name: HTMLSpanElement; - actionBar: ActionBar; -} - -export class Renderer implements IRenderer { - - public static readonly ITEM_HEIGHT = 22; - private static readonly EDITOR_GROUP_TEMPLATE_ID = 'editorgroup'; - private static readonly OPEN_EDITOR_TEMPLATE_ID = 'openeditor'; - - constructor( - private actionProvider: ActionProvider, - @IInstantiationService private instantiationService: IInstantiationService, - @IKeybindingService private keybindingService: IKeybindingService, - @IConfigurationService private configurationService: IConfigurationService - ) { - // noop - } - - public getHeight(tree: ITree, element: any): number { - return Renderer.ITEM_HEIGHT; - } - - public getTemplateId(tree: ITree, element: any): string { - if (element instanceof EditorGroup) { - return Renderer.EDITOR_GROUP_TEMPLATE_ID; - } - - return Renderer.OPEN_EDITOR_TEMPLATE_ID; - } - - public renderTemplate(tree: ITree, templateId: string, container: HTMLElement): any { - if (templateId === Renderer.EDITOR_GROUP_TEMPLATE_ID) { - const editorGroupTemplate: IEditorGroupTemplateData = Object.create(null); - editorGroupTemplate.root = dom.append(container, $('.editor-group')); - editorGroupTemplate.name = dom.append(editorGroupTemplate.root, $('span.name')); - editorGroupTemplate.actionBar = new ActionBar(container); - - const editorGroupActions = this.actionProvider.getEditorGroupActions(); - editorGroupActions.forEach(a => { - const key = this.keybindingService.lookupKeybinding(a.id); - editorGroupTemplate.actionBar.push(a, { icon: true, label: false, keybinding: key ? key.getLabel() : void 0 }); - }); - - return editorGroupTemplate; - } - - const editorTemplate: IOpenEditorTemplateData = Object.create(null); - editorTemplate.container = container; - editorTemplate.actionBar = new ActionBar(container); - - const openEditorActions = this.actionProvider.getOpenEditorActions(); - openEditorActions.forEach(a => { - const key = this.keybindingService.lookupKeybinding(a.id); - editorTemplate.actionBar.push(a, { icon: true, label: false, keybinding: key ? key.getLabel() : void 0 }); - }); - - editorTemplate.root = this.instantiationService.createInstance(EditorLabel, container, void 0); - - return editorTemplate; - } - - public renderElement(tree: ITree, element: any, templateId: string, templateData: any): void { - if (templateId === Renderer.EDITOR_GROUP_TEMPLATE_ID) { - this.renderEditorGroup(tree, element, templateData); - } else { - this.renderOpenEditor(tree, element, templateData); - } - } - - private renderEditorGroup(tree: ITree, editorGroup: IEditorGroup, templateData: IEditorGroupTemplateData): void { - templateData.name.textContent = editorGroup.label; - templateData.actionBar.context = { group: editorGroup }; - } - - private renderOpenEditor(tree: ITree, editor: OpenEditor, templateData: IOpenEditorTemplateData): void { - editor.isDirty() ? dom.addClass(templateData.container, 'dirty') : dom.removeClass(templateData.container, 'dirty'); - templateData.root.setEditor(editor.editorInput, { - italic: editor.isPreview(), - extraClasses: ['open-editor'], - fileDecorations: this.configurationService.getValue().explorer.decorations - }); - templateData.actionBar.context = { group: editor.editorGroup, editor: editor.editorInput }; - } - - public disposeTemplate(tree: ITree, templateId: string, templateData: any): void { - if (templateId === Renderer.OPEN_EDITOR_TEMPLATE_ID) { - (templateData).actionBar.dispose(); - (templateData).root.dispose(); - } - if (templateId === Renderer.EDITOR_GROUP_TEMPLATE_ID) { - (templateData).actionBar.dispose(); - } - } -} - -export class Controller extends DefaultController { - - constructor(private actionProvider: ActionProvider, private model: IEditorStacksModel, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IEditorGroupService private editorGroupService: IEditorGroupService, - @IContextMenuService private contextMenuService: IContextMenuService, - @ITelemetryService private telemetryService: ITelemetryService - ) { - super({ clickBehavior: ClickBehavior.ON_MOUSE_DOWN, keyboardSupport: false }); - } - - public onClick(tree: ITree, element: any, event: IMouseEvent): boolean { - - // Close opened editor on middle mouse click - if (element instanceof OpenEditor && event.browserEvent && event.browserEvent.button === 1 /* Middle Button */) { - const position = this.model.positionOfGroup(element.editorGroup); - - this.editorService.closeEditor(position, element.editorInput).done(null, errors.onUnexpectedError); - - return true; - } - - return super.onClick(tree, element, event); - } - - protected onLeftClick(tree: ITree, element: any, event: IMouseEvent, origin: string = 'mouse'): boolean { - const payload = { origin: origin }; - const isDoubleClick = (origin === 'mouse' && event.detail === 2); - - // Cancel Event - const isMouseDown = event && event.browserEvent && event.browserEvent.type === 'mousedown'; - if (!isMouseDown) { - event.preventDefault(); // we cannot preventDefault onMouseDown because this would break DND otherwise - } - event.stopPropagation(); - - // Status group should never get selected nor expanded/collapsed - if (!(element instanceof OpenEditor)) { - return true; - } - - // Set DOM focus - tree.DOMFocus(); - - // Allow to unselect - if (event.shiftKey) { - const selection = tree.getSelection(); - if (selection && selection.length > 0 && selection[0] === element) { - tree.clearSelection(payload); - } - } - - // Select, Focus and open files - else { - tree.setFocus(element, payload); - - if (isDoubleClick) { - event.preventDefault(); // focus moves to editor, we need to prevent default - } - - tree.setSelection([element], payload); - this.openEditor(element, { preserveFocus: !isDoubleClick, pinned: isDoubleClick, sideBySide: event.ctrlKey || event.metaKey }); - } - - return true; - } - - // Do not allow left / right to expand and collapse groups #7848 - protected onLeft(tree: ITree, event: IKeyboardEvent): boolean { - return true; - } - - protected onRight(tree: ITree, event: IKeyboardEvent): boolean { - return true; - } - - public onContextMenu(tree: ITree, element: any, event: ContextMenuEvent): boolean { - if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'input') { - return false; - } - // Check if clicked on some element - if (element === tree.getInput()) { - return false; - } - - event.preventDefault(); - event.stopPropagation(); - - tree.setFocus(element); - const group = element instanceof EditorGroup ? element : (element).editorGroup; - const editor = element instanceof OpenEditor ? (element).editorInput : undefined; - - let anchor = { x: event.posx, y: event.posy }; - this.contextMenuService.showContextMenu({ - getAnchor: () => anchor, - getActions: () => this.actionProvider.getSecondaryActions(tree, element), - onHide: (wasCancelled?: boolean) => { - if (wasCancelled) { - tree.DOMFocus(); - } - }, - getActionsContext: () => ({ group, editor }) - }); - - return true; - } - - public openEditor(element: OpenEditor, options: { preserveFocus: boolean; pinned: boolean; sideBySide: boolean; }): void { - if (element) { - /* __GDPR__ - "workbenchActionExecuted" : { - "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('workbenchActionExecuted', { id: 'workbench.files.openFile', from: 'openEditors' }); - let position = this.model.positionOfGroup(element.editorGroup); - if (options.sideBySide && position !== Position.THREE) { - position++; - } - this.editorGroupService.activateGroup(this.model.groupAt(position)); - this.editorService.openEditor(element.editorInput, options, position) - .done(() => this.editorGroupService.activateGroup(this.model.groupAt(position)), errors.onUnexpectedError); - } - } -} - -export class AccessibilityProvider implements IAccessibilityProvider { - - getAriaLabel(tree: ITree, element: any): string { - if (element instanceof EditorGroup) { - return nls.localize('editorGroupAriaLabel', "{0}, Editor Group", (element).label); - } - - return nls.localize('openEditorAriaLabel', "{0}, Open Editor", (element).editorInput.getName()); - } -} - -export class ActionProvider extends ContributableActionProvider { - - constructor( - private model: IEditorStacksModel, - @IInstantiationService private instantiationService: IInstantiationService, - @ITextFileService private textFileService: ITextFileService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService - ) { - super(); - } - - public hasActions(tree: ITree, element: any): boolean { - const multipleGroups = this.model.groups.length > 1; - return element instanceof OpenEditor || (element instanceof EditorGroup && multipleGroups); - } - - public getActions(tree: ITree, element: any): TPromise { - if (element instanceof OpenEditor) { - return TPromise.as(this.getOpenEditorActions()); - } - if (element instanceof EditorGroup) { - return TPromise.as(this.getEditorGroupActions()); - } - - return TPromise.as([]); - } - - public getOpenEditorActions(): IAction[] { - return [this.instantiationService.createInstance(CloseEditorAction, CloseEditorAction.ID, CloseEditorAction.LABEL)]; - } - - public getEditorGroupActions(): IAction[] { - const saveAllAction = this.instantiationService.createInstance(SaveAllInGroupAction, SaveAllInGroupAction.ID, SaveAllInGroupAction.LABEL); - - return [ - saveAllAction, - this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, CloseUnmodifiedEditorsInGroupAction.LABEL), - this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, CloseEditorsInGroupAction.LABEL) - ]; - } - - public hasSecondaryActions(tree: ITree, element: any): boolean { - return element instanceof OpenEditor || element instanceof EditorGroup; - } - - public getSecondaryActions(tree: ITree, element: any): TPromise { - return super.getSecondaryActions(tree, element).then(result => { - const autoSaveEnabled = this.textFileService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY; - - if (element instanceof EditorGroup) { - if (!autoSaveEnabled) { - result.push(this.instantiationService.createInstance(SaveAllInGroupAction, SaveAllInGroupAction.ID, nls.localize('saveAll', "Save All"))); - result.push(new Separator()); - } - - result.push(this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified"))); - result.push(this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All"))); - } else { - const openEditor = element; - const resource = openEditor.getResource(); - if (resource) { - // Open to side - result.unshift(this.instantiationService.createInstance(OpenToSideAction, tree, resource, false)); - - if (!openEditor.isUntitled()) { - - // Files: Save / Revert - if (!autoSaveEnabled) { - result.push(new Separator()); - - const saveAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); - saveAction.setResource(resource); - saveAction.enabled = openEditor.isDirty(); - result.push(saveAction); - - const revertAction = this.instantiationService.createInstance(RevertFileAction, RevertFileAction.ID, RevertFileAction.LABEL); - revertAction.setResource(resource); - revertAction.enabled = openEditor.isDirty(); - result.push(revertAction); - } - } - - // Untitled: Save / Save As - if (openEditor.isUntitled()) { - result.push(new Separator()); - - if (this.untitledEditorService.hasAssociatedFilePath(resource)) { - let saveUntitledAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); - saveUntitledAction.setResource(resource); - result.push(saveUntitledAction); - } - - let saveAsAction = this.instantiationService.createInstance(SaveFileAsAction, SaveFileAsAction.ID, SaveFileAsAction.LABEL); - saveAsAction.setResource(resource); - result.push(saveAsAction); - } - - // Compare Actions - result.push(new Separator()); - - if (!openEditor.isUntitled()) { - const compareWithSavedAction = this.instantiationService.createInstance(CompareWithSavedAction, CompareWithSavedAction.ID, nls.localize('compareWithSaved', "Compare with Saved")); - compareWithSavedAction.setResource(resource); - compareWithSavedAction.enabled = openEditor.isDirty(); - result.push(compareWithSavedAction); - } - - const runCompareAction = this.instantiationService.createInstance(CompareResourcesAction, resource, tree); - if (runCompareAction._isEnabled()) { - result.push(runCompareAction); - } - result.push(this.instantiationService.createInstance(SelectResourceForCompareAction, resource, tree)); - - result.push(new Separator()); - } - - result.push(this.instantiationService.createInstance(CloseEditorAction, CloseEditorAction.ID, nls.localize('close', "Close"))); - const closeOtherEditorsInGroupAction = this.instantiationService.createInstance(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, nls.localize('closeOthers', "Close Others")); - closeOtherEditorsInGroupAction.enabled = openEditor.editorGroup.count > 1; - result.push(closeOtherEditorsInGroupAction); - result.push(this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified"))); - result.push(this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All"))); - } - - return result; - }); - } -} - -export class DragAndDrop extends DefaultDragAndDrop { - - constructor( - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IEditorGroupService private editorGroupService: IEditorGroupService - ) { - super(); - } - - public getDragURI(tree: ITree, element: OpenEditor): string { - if (!(element instanceof OpenEditor)) { - return null; - } - - const resource = element.getResource(); - // Some open editors do not have a resource so use the name as drag identifier instead #7021 - return resource ? resource.toString() : element.editorInput.getName(); - } - - public getDragLabel(tree: ITree, elements: OpenEditor[]): string { - if (elements.length > 1) { - return String(elements.length); - } - - return elements[0].editorInput.getName(); - } - - public onDragOver(tree: ITree, data: IDragAndDropData, target: OpenEditor | EditorGroup, originalEvent: DragMouseEvent): IDragOverReaction { - if (!(target instanceof OpenEditor) && !(target instanceof EditorGroup)) { - return DRAG_OVER_REJECT; - } - - if (data instanceof ExternalElementsDragAndDropData) { - let resource = explorerItemToFileResource(data.getData()[0]); - - if (!resource) { - return DRAG_OVER_REJECT; - } - - return resource.isDirectory ? DRAG_OVER_REJECT : DRAG_OVER_ACCEPT; - } - - if (data instanceof DesktopDragAndDropData) { - return DRAG_OVER_REJECT; - } - - if (!(data instanceof ElementsDragAndDropData)) { - return DRAG_OVER_REJECT; - } - - return DRAG_OVER_ACCEPT; - } - - public drop(tree: ITree, data: IDragAndDropData, target: OpenEditor | EditorGroup, originalEvent: DragMouseEvent): void { - let draggedElement: OpenEditor | EditorGroup; - const model = this.editorGroupService.getStacksModel(); - const positionOfTargetGroup = model.positionOfGroup(target instanceof EditorGroup ? target : target.editorGroup); - const index = target instanceof OpenEditor ? target.editorGroup.indexOf(target.editorInput) : undefined; - // Support drop from explorer viewer - if (data instanceof ExternalElementsDragAndDropData) { - let resource = explorerItemToFileResource(data.getData()[0]); - (resource as IResourceInput).options = { index, pinned: true }; - this.editorService.openEditor(resource, positionOfTargetGroup).done(null, errors.onUnexpectedError); - } - - // Drop within viewer - else { - let source: OpenEditor | EditorGroup[] = data.getData(); - if (Array.isArray(source)) { - draggedElement = source[0]; - } - } - - if (draggedElement) { - if (draggedElement instanceof OpenEditor) { - this.editorGroupService.moveEditor(draggedElement.editorInput, model.positionOfGroup(draggedElement.editorGroup), positionOfTargetGroup, { index }); - } else { - this.editorGroupService.moveGroup(model.positionOfGroup(draggedElement), positionOfTargetGroup); - } - } - } -} diff --git a/src/vs/workbench/parts/html/browser/html.contribution.ts b/src/vs/workbench/parts/html/browser/html.contribution.ts index 8201c1cfe1d..cebedb5d247 100644 --- a/src/vs/workbench/parts/html/browser/html.contribution.ts +++ b/src/vs/workbench/parts/html/browser/html.contribution.ts @@ -17,7 +17,6 @@ import { Registry } from 'vs/platform/registry/common/platform'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { MenuRegistry } from 'vs/platform/actions/common/actions'; -import { WebviewElement } from 'vs/workbench/parts/html/browser/webview'; import { IExtensionsWorkbenchService } from 'vs/workbench/parts/extensions/common/extensions'; import { IEditorRegistry, EditorDescriptor, Extensions as EditorExtensions } from 'vs/workbench/browser/editor'; @@ -118,7 +117,7 @@ CommandsRegistry.registerCommand('_webview.openDevTools', function () { const elements = document.querySelectorAll('webview.ready'); for (let i = 0; i < elements.length; i++) { try { - (elements.item(i) as WebviewElement).openDevTools(); + (elements.item(i) as Electron.WebviewTag).openDevTools(); } catch (e) { console.error(e); } diff --git a/src/vs/workbench/parts/html/browser/webview-pre.js b/src/vs/workbench/parts/html/browser/webview-pre.js index 37882cb62c9..3cfc357897a 100644 --- a/src/vs/workbench/parts/html/browser/webview-pre.js +++ b/src/vs/workbench/parts/html/browser/webview-pre.js @@ -50,16 +50,16 @@ var node = event.target; while (node) { if (node.tagName && node.tagName.toLowerCase() === 'a' && node.href) { - var baseElement = event.view.document.getElementsByTagName("base")[0]; - if (node.getAttribute("href") === "#") { + var baseElement = event.view.document.getElementsByTagName('base')[0]; + if (node.getAttribute('href') === '#') { event.view.scrollTo(0, 0); - } else if (node.hash && (node.getAttribute("href") === node.hash || (baseElement && node.href.indexOf(baseElement.href) >= 0))) { + } else if (node.hash && (node.getAttribute('href') === node.hash || (baseElement && node.href.indexOf(baseElement.href) >= 0))) { var scrollTarget = event.view.document.getElementById(node.hash.substr(1, node.hash.length - 1)); if (scrollTarget) { scrollTarget.scrollIntoView(); } } else { - ipcRenderer.sendToHost("did-click-link", node.href); + ipcRenderer.sendToHost('did-click-link', node.href); } event.preventDefault(); break; @@ -95,8 +95,8 @@ initData.baseUrl = value; }); - ipcRenderer.on('styles', function (event, value, activeTheme) { - initData.styles = value; + ipcRenderer.on('styles', function (event, variables, activeTheme) { + initData.styles = variables; initData.activeTheme = activeTheme; // webview @@ -108,10 +108,9 @@ styleBody(body[0]); // iframe - var defaultStyles = target.contentDocument.getElementById('_defaultStyles'); - if (defaultStyles) { - defaultStyles.innerHTML = initData.styles; - } + Object.keys(variables).forEach(function(variable) { + target.contentDocument.documentElement.style.setProperty(`--${variable}`,variables[variable]); + }); }); // propagate focus @@ -138,7 +137,48 @@ // apply default styles const defaultStyles = newDocument.createElement('style'); defaultStyles.id = '_defaultStyles'; - defaultStyles.innerHTML = initData.styles; + + const vars = Object.keys(initData.styles).map(function(variable) { + return `--${variable}: ${initData.styles[variable]};`; + }); + defaultStyles.innerHTML = ` + :root { ${vars.join(' ')} } + + body { + background-color: var(--background-color); + color: var(--color); + font-family: var(--font-family); + font-weight: var(--font-weight); + font-size: var(--font-size); + margin: 0; + padding: 0 20px; + } + + img { + max-width: 100%; + max-height: 100%; + } + a:focus, + input:focus, + select:focus, + textarea:focus { + outline: 1px solid -webkit-focus-ring-color; + outline-offset: -1px; + } + ::-webkit-scrollbar { + width: 10px; + height: 10px; + } + ::-webkit-scrollbar-thumb { + background-color: var(--scrollbar-thumb); + } + ::-webkit-scrollbar-thumb:hover { + background-color: var(--scrollbar-thumb-hover); + } + ::-webkit-scrollbar-thumb:active { + background-color: var(--scrollbar-thumb-active); + } + `; if (newDocument.head.hasChildNodes()) { newDocument.head.insertBefore(defaultStyles, newDocument.head.firstChild); } else { @@ -181,7 +221,7 @@ newFrame.setAttribute('id', 'pending-frame'); newFrame.setAttribute('frameborder', '0'); newFrame.setAttribute('sandbox', options.allowScripts ? 'allow-scripts allow-forms allow-same-origin' : 'allow-same-origin'); - newFrame.style.cssText = "display: block; margin: 0; overflow: hidden; position: absolute; width: 100%; height: 100%; visibility: hidden"; + newFrame.style.cssText = 'display: block; margin: 0; overflow: hidden; position: absolute; width: 100%; height: 100%; visibility: hidden'; document.body.appendChild(newFrame); // write new content onto iframe diff --git a/src/vs/workbench/parts/html/browser/webview.ts b/src/vs/workbench/parts/html/browser/webview.ts index 76809e246eb..4e207e563b9 100644 --- a/src/vs/workbench/parts/html/browser/webview.ts +++ b/src/vs/workbench/parts/html/browser/webview.ts @@ -16,22 +16,6 @@ import { WebviewFindWidget } from './webviewFindWidget'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IContextKey } from 'vs/platform/contextkey/common/contextkey'; -export declare interface WebviewElement extends HTMLElement { - src: string; - preload: string; - send(channel: string, ...args: any[]); - openDevTools(): any; - getWebContents(): any; - findInPage(value: string, options?: WebviewElementFindInPageOptions); - stopFindInPage(action: string); -} - -export class StopFindInPageActions { - static clearSelection = 'clearSelection'; - static keepSelection = 'keepSelection'; - static activateSelection = 'activateSelection'; -} - export interface WebviewElementFindInPageOptions { forward?: boolean; findNext?: boolean; @@ -58,7 +42,7 @@ export interface WebviewOptions { export default class Webview { private static index: number = 0; - private _webview: WebviewElement; + private readonly _webview: Electron.WebviewTag; private _ready: TPromise; private _disposables: IDisposable[] = []; private _onDidClickLink = new Emitter(); @@ -70,14 +54,14 @@ export default class Webview { private _findStarted: boolean = false; constructor( - private parent: HTMLElement, - private _styleElement: Element, - @IContextViewService private _contextViewService: IContextViewService, - private _contextKey: IContextKey, - private _findInputContextKey: IContextKey, + private readonly parent: HTMLElement, + private readonly _styleElement: Element, + @IContextViewService private readonly _contextViewService: IContextViewService, + private readonly _contextKey: IContextKey, + private readonly _findInputContextKey: IContextKey, private _options: WebviewOptions = {}, ) { - this._webview = document.createElement('webview'); + this._webview = document.createElement('webview'); this._webview.setAttribute('partition', this._options.allowSvgs ? 'webview' : `webview${Webview.index++}`); // disable auxclick events (see https://developers.google.com/web/updates/2016/10/auxclick) @@ -119,7 +103,7 @@ export default class Webview { return; } - contents.session.webRequest.onBeforeRequest((details, callback) => { + (contents.session.webRequest as any).onBeforeRequest((details, callback) => { if (details.url.indexOf('.svg') > 0) { const uri = URI.parse(details.url); if (uri && !uri.scheme.match(/file/i) && (uri.path as any).endsWith('.svg') && !this.isAllowedSvg(uri)) { @@ -130,7 +114,7 @@ export default class Webview { return callback({}); }); - contents.session.webRequest.onHeadersReceived((details, callback) => { + (contents.session.webRequest as any).onHeadersReceived((details, callback) => { const contentType: string[] = (details.responseHeaders['content-type'] || details.responseHeaders['Content-Type']) as any; if (contentType && Array.isArray(contentType) && contentType.some(x => x.toLowerCase().indexOf('image/svg') >= 0)) { const uri = URI.parse(details.url); @@ -157,25 +141,24 @@ export default class Webview { console.error('embedded page crashed'); }), addDisposableListener(this._webview, 'ipc-message', (event) => { - if (event.channel === 'did-click-link') { - let [uri] = event.args; - this._onDidClickLink.fire(URI.parse(uri)); - return; - } + switch (event.channel) { + case 'did-click-link': + let [uri] = event.args; + this._onDidClickLink.fire(URI.parse(uri)); + return; - if (event.channel === 'did-set-content') { - this._webview.style.flex = ''; - this._webview.style.width = '100%'; - this._webview.style.height = '100%'; - this.layout(); - return; - } + case 'did-set-content': + this._webview.style.flex = ''; + this._webview.style.width = '100%'; + this._webview.style.height = '100%'; + this.layout(); + return; - if (event.channel === 'did-scroll') { - if (event.args && typeof event.args[0] === 'number') { - this._onDidScroll.fire({ scrollYPercentage: event.args[0] }); - } - return; + case 'did-scroll': + if (event.args && typeof event.args[0] === 'number') { + this._onDidScroll.fire({ scrollYPercentage: event.args[0] }); + } + return; } }), addDisposableListener(this._webview, 'focus', () => { @@ -276,87 +259,33 @@ export default class Webview { style(theme: ITheme): void { const { fontFamily, fontWeight, fontSize } = window.getComputedStyle(this._styleElement); // TODO@theme avoid styleElement - let value = ` - :root { - --background-color: ${theme.getColor(editorBackground)}; - --color: ${theme.getColor(editorForeground)}; - --font-family: ${fontFamily}; - --font-weight: ${fontWeight}; - --font-size: ${fontSize}; - } - body { - background-color: var(--background-color); - color: var(--color); - font-family: var(--font-family); - font-weight: var(--font-weight); - font-size: var(--font-size); - margin: 0; - padding: 0 20px; - } - - img { - max-width: 100%; - max-height: 100%; - } - a:focus, - input:focus, - select:focus, - textarea:focus { - outline: 1px solid -webkit-focus-ring-color; - outline-offset: -1px; - } - ::-webkit-scrollbar { - width: 10px; - height: 10px; - }`; - + const styles = { + 'background-color': theme.getColor(editorBackground).toString(), + 'color': theme.getColor(editorForeground).toString(), + 'font-family': fontFamily, + 'font-weight': fontWeight, + 'font-size': fontSize, + }; let activeTheme: ApiThemeClassName; - if (theme.type === LIGHT) { - value += ` - ::-webkit-scrollbar-thumb { - background-color: rgba(100, 100, 100, 0.4); - } - ::-webkit-scrollbar-thumb:hover { - background-color: rgba(100, 100, 100, 0.7); - } - ::-webkit-scrollbar-thumb:active { - background-color: rgba(0, 0, 0, 0.6); - }`; - + styles['scrollbar-thumb'] = 'rgba(100, 100, 100, 0.4)'; + styles['scrollbar-thumb-hover'] = 'rgba(100, 100, 100, 0.7)'; + styles['scrollbar-thumb-active'] = 'rgba(0, 0, 0, 0.6)'; activeTheme = 'vscode-light'; - } else if (theme.type === DARK) { - value += ` - ::-webkit-scrollbar-thumb { - background-color: rgba(121, 121, 121, 0.4); - } - ::-webkit-scrollbar-thumb:hover { - background-color: rgba(100, 100, 100, 0.7); - } - ::-webkit-scrollbar-thumb:active { - background-color: rgba(85, 85, 85, 0.8); - }`; - + styles['scrollbar-thumb'] = 'rgba(121, 121, 121, 0.4)'; + styles['scrollbar-thumb-hover'] = 'rgba(100, 100, 100, 0.7)'; + styles['scrollbar-thumb-active'] = 'rgba(85, 85, 85, 0.8)'; activeTheme = 'vscode-dark'; - } else { - value += ` - ::-webkit-scrollbar-thumb { - background-color: rgba(111, 195, 223, 0.3); - } - ::-webkit-scrollbar-thumb:hover { - background-color: rgba(111, 195, 223, 0.8); - } - ::-webkit-scrollbar-thumb:active { - background-color: rgba(111, 195, 223, 0.8); - }`; - + styles['scrollbar-thumb'] = 'rgba(111, 195, 223, 0.3)'; + styles['scrollbar-thumb-hover'] = 'rgba(111, 195, 223, 0.8)'; + styles['scrollbar-thumb-active'] = 'rgba(111, 195, 223, 0.8)'; activeTheme = 'vscode-high-contrast'; } - this._send('styles', value, activeTheme); + this._send('styles', styles, activeTheme); this._webviewFindWidget.updateTheme(theme); } @@ -445,7 +374,7 @@ export default class Webview { public stopFind(keepSelection?: boolean): void { this._findStarted = false; - this._webview.stopFindInPage(keepSelection ? StopFindInPageActions.keepSelection : StopFindInPageActions.clearSelection); + this._webview.stopFindInPage(keepSelection ? 'keepSelection' : 'clearSelection'); } public showFind() { diff --git a/src/vs/workbench/parts/markers/browser/markersPanel.ts b/src/vs/workbench/parts/markers/browser/markersPanel.ts index 06ccfc040b0..bc160c94e8e 100644 --- a/src/vs/workbench/parts/markers/browser/markersPanel.ts +++ b/src/vs/workbench/parts/markers/browser/markersPanel.ts @@ -21,22 +21,21 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import Constants from 'vs/workbench/parts/markers/common/constants'; import { MarkersModel, Marker, Resource, FilterOptions } from 'vs/workbench/parts/markers/common/markersModel'; import { Controller } from 'vs/workbench/parts/markers/browser/markersTreeController'; -import Tree = require('vs/base/parts/tree/browser/tree'); -import TreeImpl = require('vs/base/parts/tree/browser/treeImpl'); import * as Viewer from 'vs/workbench/parts/markers/browser/markersTreeViewer'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { CollapseAllAction, FilterAction, FilterInputBoxActionItem } from 'vs/workbench/parts/markers/browser/markersPanelActions'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import Messages from 'vs/workbench/parts/markers/common/messages'; import { RangeHighlightDecorations } from 'vs/workbench/browser/parts/editor/rangeDecorations'; -import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { IListService } from 'vs/platform/list/browser/listService'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import FileResultsNavigation from 'vs/workbench/parts/files/browser/fileResultsNavigation'; import { debounceEvent } from 'vs/base/common/event'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; import { SimpleFileResourceDragAndDrop } from 'vs/base/parts/tree/browser/treeDnd'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; +import { IActivityService, NumberBadge } from 'vs/workbench/services/activity/common/activity'; +import { localize } from 'vs/nls'; export class MarkersPanel extends Panel { @@ -47,7 +46,7 @@ export class MarkersPanel extends Panel { private lastSelectedRelativeTop: number = 0; private currentActiveResource: URI = null; - private tree: Tree.ITree; + private tree: WorkbenchTree; private autoExpanded: Set; private rangeHighlightDecorations: RangeHighlightDecorations; @@ -59,7 +58,6 @@ export class MarkersPanel extends Panel { private messageBoxContainer: HTMLElement; private messageBox: HTMLElement; - private markerFocusContextKey: IContextKey; private currentResourceGotAddedToMarkersData: boolean = false; constructor( @@ -68,15 +66,15 @@ export class MarkersPanel extends Panel { @IEditorGroupService private editorGroupService: IEditorGroupService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IConfigurationService private configurationService: IConfigurationService, - @IContextKeyService contextKeyService: IContextKeyService, + @IContextKeyService private contextKeyService: IContextKeyService, @ITelemetryService telemetryService: ITelemetryService, @IListService private listService: IListService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IActivityService private activityService: IActivityService ) { super(Constants.MARKERS_PANEL_ID, telemetryService, themeService); this.delayedRefresh = new Delayer(500); this.autoExpanded = new Set(); - this.markerFocusContextKey = Constants.MarkerFocusContextKey.bindTo(contextKeyService); } public create(parent: builder.Builder): TPromise { @@ -127,11 +125,17 @@ export class MarkersPanel extends Panel { } public setVisible(visible: boolean): TPromise { - let promise: TPromise = super.setVisible(visible); - if (!visible) { - this.rangeHighlightDecorations.removeHighlightRange(); - } - return promise; + const wasVisible = this.isVisible(); + return super.setVisible(visible) + .then(() => { + if (this.isVisible()) { + if (!wasVisible) { + this.refreshPanel(); + } + } else { + this.rangeHighlightDecorations.removeHighlightRange(); + } + }); } public getActions(): IAction[] { @@ -171,13 +175,16 @@ export class MarkersPanel extends Panel { } private refreshPanel(): TPromise { - this.collapseAllAction.enabled = this.markersModel.hasFilteredResources(); - dom.toggleClass(this.treeContainer, 'hidden', !this.markersModel.hasFilteredResources()); - this.renderMessage(); - if (this.markersModel.hasFilteredResources()) { - return this.tree.refresh().then(() => { - this.autoExpand(); - }); + this.refreshBadge(); + if (this.isVisible()) { + this.collapseAllAction.enabled = this.markersModel.hasFilteredResources(); + dom.toggleClass(this.treeContainer, 'hidden', !this.markersModel.hasFilteredResources()); + this.renderMessage(); + if (this.markersModel.hasFilteredResources()) { + return this.tree.refresh().then(() => { + this.autoExpand(); + }); + } } return TPromise.as(null); } @@ -189,6 +196,13 @@ export class MarkersPanel extends Panel { this.autoReveal(); } + private refreshBadge(): void { + const total = this.markersModel.total(); + const count = this.markersModel.count(); + const message = total === count ? localize('totalProblems', 'Total {0} Problems', total) : localize('filteredProblems', 'Showing {0} of {1} Problems', count, total); + this.activityService.showActivity(this.getId(), new NumberBadge(count, () => message)); + } + private createMessageBox(parent: HTMLElement): void { this.messageBoxContainer = dom.append(parent, dom.$('.message-box-container')); this.messageBox = dom.append(this.messageBoxContainer, dom.$('span')); @@ -201,7 +215,7 @@ export class MarkersPanel extends Panel { const renderer = this.instantiationService.createInstance(Viewer.Renderer); const dnd = new SimpleFileResourceDragAndDrop(obj => obj instanceof Resource ? obj.uri : void 0); let controller = this.instantiationService.createInstance(Controller); - this.tree = new TreeImpl.Tree(this.treeContainer, { + this.tree = new WorkbenchTree(this.treeContainer, { dataSource: new Viewer.DataSource(), renderer, controller, @@ -213,24 +227,14 @@ export class MarkersPanel extends Panel { twistiePixels: 20, ariaLabel: Messages.MARKERS_PANEL_ARIA_LABEL_PROBLEMS_TREE, keyboardSupport: false - }); + }, this.contextKeyService, this.listService, this.themeService); - this._register(attachListStyler(this.tree, this.themeService)); - - this._register(this.tree.onDidChangeFocus((e: { focus: any }) => { - this.markerFocusContextKey.set(e.focus instanceof Marker); - })); + Constants.MarkerFocusContextKey.bindTo(this.tree.contextKeyService); const fileResultsNavigation = this._register(new FileResultsNavigation(this.tree)); this._register(debounceEvent(fileResultsNavigation.openFile, (last, event) => event, 75, true)(options => { this.openFileAtElement(options.element, options.editorOptions.preserveFocus, options.editorOptions.pinned, options.sideBySide); })); - - const focusTracker = this._register(dom.trackFocus(this.tree.getHTMLElement())); - this._register(focusTracker.onDidBlur(() => this.markerFocusContextKey.set(false))); - this._register(focusTracker); - - this.toUnbind.push(this.listService.register(this.tree)); } private createActions(): void { diff --git a/src/vs/workbench/parts/markers/browser/markersPanelActions.ts b/src/vs/workbench/parts/markers/browser/markersPanelActions.ts index 207be79c10e..9f1412c4218 100644 --- a/src/vs/workbench/parts/markers/browser/markersPanelActions.ts +++ b/src/vs/workbench/parts/markers/browser/markersPanelActions.ts @@ -33,21 +33,9 @@ export class ToggleMarkersPanelAction extends TogglePanelAction { constructor(id: string, label: string, @IPartService partService: IPartService, @IPanelService panelService: IPanelService, - @ITelemetryService private telemetryService: ITelemetryService ) { super(id, label, Constants.MARKERS_PANEL_ID, panelService, partService); } - - public run(): TPromise { - let promise = super.run(); - if (this.isPanelFocused()) { - /* __GDPR__ - "problems.used" : {} - */ - this.telemetryService.publicLog('problems.used'); - } - return promise; - } } export class ShowProblemsPanelAction extends Action { @@ -56,17 +44,12 @@ export class ShowProblemsPanelAction extends Action { public static readonly LABEL = Messages.MARKERS_PANEL_SHOW_LABEL; constructor(id: string, label: string, - @IPanelService private panelService: IPanelService, - @ITelemetryService private telemetryService: ITelemetryService + @IPanelService private panelService: IPanelService ) { super(id, label); } public run(): TPromise { - /* __GDPR__ - "problems.used" : {} - */ - this.telemetryService.publicLog('problems.used'); return this.panelService.openPanel(Constants.MARKERS_PANEL_ID, true); } } @@ -79,38 +62,16 @@ export class ToggleErrorsAndWarningsAction extends TogglePanelAction { constructor(id: string, label: string, @IPartService partService: IPartService, @IPanelService panelService: IPanelService, - @ITelemetryService private telemetryService: ITelemetryService ) { super(id, label, Constants.MARKERS_PANEL_ID, panelService, partService); } - - public run(): TPromise { - let promise = super.run(); - if (this.isPanelFocused()) { - /* __GDPR__ - "problems.used" : {} - */ - this.telemetryService.publicLog('problems.used'); - } - return promise; - } } export class CollapseAllAction extends TreeCollapseAction { - constructor(viewer: Tree.ITree, enabled: boolean, - @ITelemetryService private telemetryService: ITelemetryService) { + constructor(viewer: Tree.ITree, enabled: boolean) { super(viewer, enabled); } - - public run(context?: any): TPromise { - /* __GDPR__ - "problems.collapseAll.used" : {} - */ - this.telemetryService.publicLog('problems.collapseAll.used'); - return super.run(context); - } - } export class FilterAction extends Action { diff --git a/src/vs/workbench/parts/markers/common/constants.ts b/src/vs/workbench/parts/markers/common/constants.ts index d470ebfc8b0..e1edde7ad00 100644 --- a/src/vs/workbench/parts/markers/common/constants.ts +++ b/src/vs/workbench/parts/markers/common/constants.ts @@ -11,5 +11,5 @@ export default { MARKER_COPY_MESSAGE_ACTION_ID: 'problems.action.copyMessage', MARKER_OPEN_SIDE_ACTION_ID: 'problems.action.openToSide', - MarkerFocusContextKey: new RawContextKey('problemFocus', false) + MarkerFocusContextKey: new RawContextKey('problemFocus', true) }; diff --git a/src/vs/workbench/parts/markers/common/markersModel.ts b/src/vs/workbench/parts/markers/common/markersModel.ts index 6ffeaf6792a..f17a6faac71 100644 --- a/src/vs/workbench/parts/markers/common/markersModel.ts +++ b/src/vs/workbench/parts/markers/common/markersModel.ts @@ -159,6 +159,18 @@ export class MarkersModel { return this.markersByResource.has(resource.toString()); } + public total(): number { + let total = 0; + this.markersByResource.forEach(markers => total = total + markers.length); + return total; + } + + public count(): number { + let count = 0; + this.filteredResources.forEach(resource => count = count + resource.markers.length); + return count; + } + public get nonFilteredResources(): Resource[] { return this._nonFilteredResources; } @@ -310,25 +322,6 @@ export class MarkersModel { return Messages.MARKERS_PANEL_NO_PROBLEMS_BUILT; } - public static getStatisticsLabel(markerStatistics: MarkerStatistics, onlyErrors: boolean = false): string { - let label = this.getLabel('', markerStatistics.errors, Messages.MARKERS_PANEL_SINGLE_ERROR_LABEL, Messages.MARKERS_PANEL_MULTIPLE_ERRORS_LABEL); - if (!onlyErrors) { - label = this.getLabel(label, markerStatistics.warnings, Messages.MARKERS_PANEL_SINGLE_WARNING_LABEL, Messages.MARKERS_PANEL_MULTIPLE_WARNINGS_LABEL); - label = this.getLabel(label, markerStatistics.infos, Messages.MARKERS_PANEL_SINGLE_INFO_LABEL, Messages.MARKERS_PANEL_MULTIPLE_INFOS_LABEL); - label = this.getLabel(label, markerStatistics.unknowns, Messages.MARKERS_PANEL_SINGLE_UNKNOWN_LABEL, Messages.MARKERS_PANEL_MULTIPLE_UNKNOWNS_LABEL); - } - return label; - } - - private static getLabel(title: string, markersCount: number, singleMarkerString: string, multipleMarkersFunction: (markersCount: number) => string): string { - if (markersCount <= 0) { - return title; - } - title = title ? title + ', ' : ''; - title += markersCount === 1 ? singleMarkerString : multipleMarkersFunction(markersCount); - return title; - } - public static compare(a: any, b: any): number { if (a instanceof Resource && b instanceof Resource) { return MarkersModel.compareResources(a, b); diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index e1444989978..4850d22984f 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -5,84 +5,4 @@ 'use strict'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IExtensionService } from 'vs/platform/extensions/common/extensions'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { IWorkbenchContributionsRegistry, IWorkbenchContribution, Extensions } from 'vs/workbench/common/contributions'; -import { Registry } from 'vs/platform/registry/common/platform'; -import { ReportPerformanceIssueAction } from 'vs/workbench/electron-browser/actions'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { join } from 'path'; -import { localize } from 'vs/nls'; -import { readdir } from 'vs/base/node/pfs'; -import { stopProfiling } from 'vs/base/node/profiler'; - -class StartupProfiler implements IWorkbenchContribution { - - constructor( - @IWindowsService private readonly _windowsService: IWindowsService, - @IMessageService private readonly _messageService: IMessageService, - @IEnvironmentService private readonly _environmentService: IEnvironmentService, - @IInstantiationService private readonly _instantiationService: IInstantiationService, - @ILifecycleService lifecycleService: ILifecycleService, - @IExtensionService extensionService: IExtensionService, - ) { - // wait for everything to be ready - extensionService.whenInstalledExtensionsRegistered().then(() => { - this._stopProfiling(); - }); - } - - private _stopProfiling(): void { - - const { profileStartup } = this._environmentService; - if (!profileStartup) { - return; - } - - stopProfiling(profileStartup.dir, profileStartup.prefix).then(() => { - readdir(profileStartup.dir).then(files => { - return files.filter(value => value.indexOf(profileStartup.prefix) === 0); - }).then(files => { - const profileFiles = files.reduce((prev, cur) => `${prev}${join(profileStartup.dir, cur)}\n`, '\n'); - - const primaryButton = this._messageService.confirmSync({ - type: 'info', - message: localize('prof.message', "Successfully created profiles."), - detail: localize('prof.detail', "Please create an issue and manually attach the following files:\n{0}", profileFiles), - primaryButton: localize('prof.restartAndFileIssue', "Create Issue and Restart"), - secondaryButton: localize('prof.restart', "Restart") - }); - - if (primaryButton) { - const action = this._instantiationService.createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL); - TPromise.join([ - this._windowsService.showItemInFolder(join(profileStartup.dir, files[0])), - action.run(`:warning: Make sure to **attach** these files from your *home*-directory: :warning:\n${files.map(file => `-\`${file}\``).join('\n')}`) - ]).then(() => { - // keep window stable until restart is selected - this._messageService.confirmSync({ - type: 'info', - message: localize('prof.thanks', "Thanks for helping us."), - detail: localize('prof.detail.restart', "A final restart is required to continue to use '{0}'. Again, thank you for your contribution.", this._environmentService.appNameLong), - primaryButton: localize('prof.restart', "Restart"), - secondaryButton: null - }); - // now we are ready to restart - this._windowsService.relaunch({ removeArgs: ['--prof-startup'] }); - }); - - } else { - // simply restart - this._windowsService.relaunch({ removeArgs: ['--prof-startup'] }); - } - }); - }); - } -} - -const registry = Registry.as(Extensions.Workbench); -registry.registerWorkbenchContribution(StartupProfiler, LifecyclePhase.Running); +import './startupProfiler'; diff --git a/src/vs/workbench/parts/performance/electron-browser/startupProfiler.ts b/src/vs/workbench/parts/performance/electron-browser/startupProfiler.ts new file mode 100644 index 00000000000..242c7c0e1c8 --- /dev/null +++ b/src/vs/workbench/parts/performance/electron-browser/startupProfiler.ts @@ -0,0 +1,97 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { IExtensionService } from 'vs/platform/extensions/common/extensions'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IMessageService } from 'vs/platform/message/common/message'; +import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; +import { IWindowsService } from 'vs/platform/windows/common/windows'; +import { IWorkbenchContributionsRegistry, IWorkbenchContribution, Extensions } from 'vs/workbench/common/contributions'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { ReportPerformanceIssueAction } from 'vs/workbench/electron-browser/actions'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { join, dirname } from 'path'; +import { localize } from 'vs/nls'; +import { readdir, del, readFile } from 'vs/base/node/pfs'; +import { basename } from 'vs/base/common/paths'; + +class StartupProfiler implements IWorkbenchContribution { + + constructor( + @IWindowsService private readonly _windowsService: IWindowsService, + @IMessageService private readonly _messageService: IMessageService, + @IEnvironmentService private readonly _environmentService: IEnvironmentService, + @IInstantiationService private readonly _instantiationService: IInstantiationService, + @ILifecycleService lifecycleService: ILifecycleService, + @IExtensionService extensionService: IExtensionService, + ) { + // wait for everything to be ready + Promise.all([ + lifecycleService.when(LifecyclePhase.Eventually), + extensionService.whenInstalledExtensionsRegistered() + ]).then(() => { + this._stopProfiling(); + }); + } + + private _stopProfiling(): void { + + const profileFilenamePrefix = this._environmentService.args['prof-startup-prefix']; + if (!profileFilenamePrefix) { + return; + } + + const dir = dirname(profileFilenamePrefix); + const prefix = basename(profileFilenamePrefix); + + const removeArgs: string[] = ['--prof-startup']; + const markerFile = readFile(profileFilenamePrefix).then(value => removeArgs.push(...value.toString().split('|'))) + .then(() => del(profileFilenamePrefix)) + .then(() => TPromise.timeout(1000)); + + markerFile.then(() => { + return readdir(dir).then(files => files.filter(value => value.indexOf(prefix) === 0)); + }).then(files => { + const profileFiles = files.reduce((prev, cur) => `${prev}${join(dir, cur)}\n`, '\n'); + + const primaryButton = this._messageService.confirm({ + type: 'info', + message: localize('prof.message', "Successfully created profiles."), + detail: localize('prof.detail', "Please create an issue and manually attach the following files:\n{0}", profileFiles), + primaryButton: localize('prof.restartAndFileIssue', "Create Issue and Restart"), + secondaryButton: localize('prof.restart', "Restart") + }); + + if (primaryButton) { + const action = this._instantiationService.createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL); + TPromise.join([ + this._windowsService.showItemInFolder(join(dir, files[0])), + action.run(`:warning: Make sure to **attach** these files from your *home*-directory: :warning:\n${files.map(file => `-\`${file}\``).join('\n')}`) + ]).then(() => { + // keep window stable until restart is selected + this._messageService.confirm({ + type: 'info', + message: localize('prof.thanks', "Thanks for helping us."), + detail: localize('prof.detail.restart', "A final restart is required to continue to use '{0}'. Again, thank you for your contribution.", this._environmentService.appNameLong), + primaryButton: localize('prof.restart', "Restart"), + secondaryButton: null + }); + // now we are ready to restart + this._windowsService.relaunch({ removeArgs }); + }); + + } else { + // simply restart + this._windowsService.relaunch({ removeArgs }); + } + }); + } +} + +const registry = Registry.as(Extensions.Workbench); +registry.registerWorkbenchContribution(StartupProfiler, LifecyclePhase.Running); diff --git a/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts b/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts index 596eb146690..50cfe71341a 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts @@ -203,7 +203,7 @@ export class DefineKeybindingWidget extends Widget { this._domNode.setClassName('defineKeybindingWidget'); this._domNode.setWidth(DefineKeybindingWidget.WIDTH); this._domNode.setHeight(DefineKeybindingWidget.HEIGHT); - dom.append(this._domNode.domNode, dom.$('.message', null, nls.localize('defineKeybinding.initial', "Press desired key combination and ENTER. ESCAPE to cancel."))); + dom.append(this._domNode.domNode, dom.$('.message', null, nls.localize('defineKeybinding.initial', "Press desired key combination and then press ENTER."))); this._register(attachStylerCallback(this.themeService, { editorWidgetBackground, widgetShadow }, colors => { this._domNode.domNode.style.backgroundColor = colors.editorWidgetBackground; diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts index a462da1c428..ea68e3b1e2f 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts @@ -16,7 +16,7 @@ import { KeybindingLabel } from 'vs/base/browser/ui/keybindingLabel/keybindingLa import { IAction } from 'vs/base/common/actions'; import { ActionBar, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; -import { EditorInput } from 'vs/workbench/common/editor'; +import { EditorInput, EditorOptions } from 'vs/workbench/common/editor'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { KeybindingsEditorModel, IKeybindingItemEntry, IListEntry, KEYBINDING_ENTRY_TEMPLATE_ID, KEYBINDING_HEADER_TEMPLATE_ID } from 'vs/workbench/parts/preferences/common/keybindingsEditorModel'; @@ -30,7 +30,6 @@ import { } from 'vs/workbench/parts/preferences/common/preferences'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IKeybindingEditingService } from 'vs/workbench/services/keybinding/common/keybindingEditing'; -import { IListService } from 'vs/platform/list/browser/listService'; import { List } from 'vs/base/browser/ui/list/listWidget'; import { IDelegate, IRenderer, IListContextMenuEvent, IListEvent } from 'vs/base/browser/ui/list/list'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; @@ -38,10 +37,10 @@ import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/c import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode, ResolvedKeybinding } from 'vs/base/common/keyCodes'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; import { listHighlightForeground } from 'vs/platform/theme/common/colorRegistry'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { EditorExtensionsRegistry } from 'vs/editor/browser/editorExtensions'; +import { WorkbenchList, IListService } from 'vs/platform/list/browser/listService'; let $ = DOM.$; @@ -136,19 +135,18 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor this._register(focusTracker.onDidBlur(() => this.keybindingsEditorContextKey.reset())); } - setInput(input: KeybindingsEditorInput): TPromise { + setInput(input: KeybindingsEditorInput, options: EditorOptions): TPromise { const oldInput = this.input; return super.setInput(input) .then(() => { if (!input.matches(oldInput)) { - this.render(); + this.render(options && options.preserveFocus); } }); } clearInput(): void { super.clearInput(); - this.searchWidget.clear(); this.keybindingsEditorContextKey.reset(); this.keybindingFocusContextKey.reset(); } @@ -328,8 +326,8 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor private createList(parent: HTMLElement): void { this.keybindingsListContainer = DOM.append(parent, $('.keybindings-list-container')); - this.keybindingsList = this._register(new List(this.keybindingsListContainer, new Delegate(), [new KeybindingHeaderRenderer(), new KeybindingItemRenderer(this, this.keybindingsService)], - { identityProvider: e => e.id, keyboardSupport: false, mouseSupport: true, ariaLabel: localize('keybindingsLabel', "Keybindings") })); + this.keybindingsList = this._register(new WorkbenchList(this.keybindingsListContainer, new Delegate(), [new KeybindingHeaderRenderer(), new KeybindingItemRenderer(this, this.keybindingsService)], + { identityProvider: e => e.id, keyboardSupport: false, mouseSupport: true, ariaLabel: localize('keybindingsLabel', "Keybindings") }, this.contextKeyService, this.listService, this.themeService)); this._register(this.keybindingsList.onContextMenu(e => this.onContextMenu(e))); this._register(this.keybindingsList.onFocusChange(e => this.onFocusChange(e))); this._register(this.keybindingsList.onDidFocus(() => { @@ -339,12 +337,20 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor DOM.removeClass(this.keybindingsList.getHTMLElement(), 'focused'); this.keybindingFocusContextKey.reset(); })); - - this._register(attachListStyler(this.keybindingsList, this.themeService)); - this._register(this.listService.register(this.keybindingsList)); + this._register(this.keybindingsList.onMouseDblClick(() => this.defineKeybinding(this.activeKeybindingEntry))); + this._register(this.keybindingsList.onKeyDown(e => { + const event = new StandardKeyboardEvent(e); + if (event.keyCode === KeyCode.Enter) { + const keybindingEntry = this.activeKeybindingEntry; + if (keybindingEntry) { + this.defineKeybinding(this.activeKeybindingEntry); + } + e.stopPropagation(); + } + })); } - private render(): TPromise { + private render(preserveFocus?: boolean): TPromise { if (this.input) { return this.input.resolve() .then((keybindingsModel: KeybindingsEditorModel) => this.keybindingsEditorModel = keybindingsModel) @@ -355,7 +361,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor }, {}); return this.keybindingsEditorModel.resolve(editorActionsLabels); }) - .then(() => this.renderKeybindingsEntries(false)); + .then(() => this.renderKeybindingsEntries(false, preserveFocus)); } return TPromise.as(null); } @@ -365,7 +371,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor this.delayedFilterLogging.trigger(() => this.reportFilteringUsed(this.searchWidget.getValue())); } - private renderKeybindingsEntries(reset: boolean): void { + private renderKeybindingsEntries(reset: boolean, preserveFocus?: boolean): void { if (this.keybindingsEditorModel) { const filter = this.searchWidget.getValue(); const keybindingsEntries: IKeybindingItemEntry[] = this.keybindingsEditorModel.fetch(filter, this.sortByPrecedence.checked); @@ -390,7 +396,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor this.unAssignedKeybindingItemToRevealAndFocus = null; } else if (currentSelectedIndex !== -1 && currentSelectedIndex < this.listEntries.length) { this.selectEntry(currentSelectedIndex); - } else if (this.editorService.getActiveEditor() === this) { + } else if (this.editorService.getActiveEditor() === this && !preserveFocus) { this.focus(); } } @@ -743,7 +749,7 @@ class CommandColumn extends Column { commandLabel.set(keybindingItem.command, keybindingItemEntry.commandIdMatches); } if (commandLabel) { - commandLabel.element.title = keybindingItem.command; + commandLabel.element.title = keybindingItem.commandLabel ? localize('title', "{0} ({1})", keybindingItem.commandLabel, keybindingItem.command) : keybindingItem.command; } } diff --git a/src/vs/workbench/parts/preferences/browser/media/preferences.css b/src/vs/workbench/parts/preferences/browser/media/preferences.css index c758b65f083..4faa43a06fc 100644 --- a/src/vs/workbench/parts/preferences/browser/media/preferences.css +++ b/src/vs/workbench/parts/preferences/browser/media/preferences.css @@ -41,13 +41,21 @@ text-transform: uppercase; font-size: 11px; margin-left: 33px; - margin-right: 0px; + margin-right: 5px; cursor: pointer; display: flex; overflow: hidden; text-overflow: ellipsis; } +.settings-tabs-widget > .monaco-action-bar .actions-container { + justify-content: flex-start; +} + +.settings-tabs-widget > .monaco-action-bar .action-item { + padding: 3px 0px; +} + .settings-tabs-widget > .monaco-action-bar .action-item .action-title { text-overflow: ellipsis; overflow: hidden; @@ -89,18 +97,6 @@ opacity: 1; } -.settings-tabs-widget > .monaco-action-bar:not(.empty-workbench) .action-item .action-label.checked { - border-bottom: 1px solid; -} - -.vs .settings-tabs-widget > .monaco-action-bar .action-item .action-label.checked { - border-bottom-color: #ccceda; -} - -.vs-dark .settings-tabs-widget > .monaco-action-bar .action-item .action-label.checked { - border-bottom-color: #404047; -} - .preferences-header > .settings-header-widget { flex: 1; display: flex; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index a195b75a566..5525dd14aad 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -25,7 +25,7 @@ import { CodeEditor } from 'vs/editor/browser/codeEditor'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IPreferencesService, ISettingsGroup, ISetting, IFilterResult, IPreferencesSearchService, - CONTEXT_SETTINGS_EDITOR, CONTEXT_SETTINGS_SEARCH_FOCUS, SETTINGS_EDITOR_COMMAND_SEARCH, SETTINGS_EDITOR_COMMAND_FOCUS_FILE, ISettingsEditorModel, SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, SETTINGS_EDITOR_COMMAND_FOCUS_NEXT_SETTING, SETTINGS_EDITOR_COMMAND_FOCUS_PREVIOUS_SETTING, IFilterMetadata + CONTEXT_SETTINGS_EDITOR, CONTEXT_SETTINGS_SEARCH_FOCUS, SETTINGS_EDITOR_COMMAND_SEARCH, SETTINGS_EDITOR_COMMAND_FOCUS_FILE, ISettingsEditorModel, SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, SETTINGS_EDITOR_COMMAND_FOCUS_NEXT_SETTING, SETTINGS_EDITOR_COMMAND_FOCUS_PREVIOUS_SETTING, IFilterMetadata, IPreferencesSearchModel } from 'vs/workbench/parts/preferences/common/preferences'; import { SettingsEditorModel, DefaultSettingsEditorModel } from 'vs/workbench/parts/preferences/common/preferencesModels'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; @@ -66,6 +66,10 @@ export class PreferencesEditorInput extends SideBySideEditorInput { return PreferencesEditorInput.ID; } + public supportsSplitEditor(): boolean { + return true; + } + public getTitle(verbosity: Verbosity): string { return this.master.getTitle(verbosity); } @@ -387,6 +391,7 @@ class PreferencesRenderers extends Disposable { private _settingsNavigator: SettingsNavigator; private _filtersInProgress: TPromise[]; private _searchCriteria: ISearchCriteria; + private _currentSearchModel: IPreferencesSearchModel; private _onTriggeredFuzzy: Emitter = this._register(new Emitter()); public onTriggeredFuzzy: Event = this._onTriggeredFuzzy.event; @@ -404,6 +409,10 @@ class PreferencesRenderers extends Disposable { return this._defaultPreferencesRenderer; } + get editablePreferencesRenderer(): IPreferencesRenderer { + return this._editablePreferencesRenderer; + } + set defaultPreferencesRenderer(defaultPreferencesRenderer: IPreferencesRenderer) { if (this._defaultPreferencesRenderer !== defaultPreferencesRenderer) { this._defaultPreferencesRenderer = defaultPreferencesRenderer; @@ -427,11 +436,13 @@ class PreferencesRenderers extends Disposable { this._editablePreferencesRendererDisposables = dispose(this._editablePreferencesRendererDisposables); if (this._editablePreferencesRenderer) { (this._editablePreferencesRenderer.preferencesModel).onDidChangeGroups(() => { - this._filterEditablePreferences() - .then(() => { - const count = this.consolidateAndUpdate(); - this._onDidFilterResultsCountChange.fire(count); - }); + if (this._currentSearchModel) { + this._filterEditablePreferences() + .then(() => { + const count = this.consolidateAndUpdate(); + this._onDidFilterResultsCountChange.fire(count); + }); + } }, this, this._editablePreferencesRendererDisposables); } } @@ -445,6 +456,7 @@ class PreferencesRenderers extends Disposable { this._filtersInProgress.forEach(p => p.cancel && p.cancel()); } + this._currentSearchModel = this.preferencesSearchService.startSearch(this._searchCriteria.filter, criteria.fuzzy); this._filtersInProgress = [this._filterDefaultPreferences(), this._filterEditablePreferences()]; return TPromise.join(this._filtersInProgress).then(() => { @@ -473,7 +485,7 @@ class PreferencesRenderers extends Disposable { private _filterDefaultPreferences(): TPromise { if (this._searchCriteria && this._defaultPreferencesRenderer) { - return this._filterPreferences(this._searchCriteria, this._defaultPreferencesRenderer) + return this._filterPreferences(this._searchCriteria, this._defaultPreferencesRenderer, this._currentSearchModel) .then(filterResult => { this._defaultPreferencesFilterResult = filterResult; }); } return TPromise.wrap(null); @@ -481,7 +493,7 @@ class PreferencesRenderers extends Disposable { private _filterEditablePreferences(): TPromise { if (this._searchCriteria && this._editablePreferencesRenderer) { - return this._filterPreferences({ filter: this._searchCriteria.filter, fuzzy: false }, this._editablePreferencesRenderer) + return this._filterPreferences(this._searchCriteria, this._editablePreferencesRenderer, this._currentSearchModel) .then(filterResult => { this._editablePreferencesFilterResult = filterResult; }); } return TPromise.wrap(null); @@ -500,9 +512,8 @@ class PreferencesRenderers extends Disposable { return preferencesRenderer ? (preferencesRenderer.preferencesModel).settingsGroups : []; } - private _filterPreferences(searchCriteria: ISearchCriteria, preferencesRenderer: IPreferencesRenderer): TPromise { - if (preferencesRenderer) { - const searchModel = this.preferencesSearchService.startSearch(searchCriteria.filter, searchCriteria.fuzzy); + private _filterPreferences(searchCriteria: ISearchCriteria, preferencesRenderer: IPreferencesRenderer, searchModel: IPreferencesSearchModel): TPromise { + if (preferencesRenderer && searchCriteria) { const prefSearchP = searchModel.filterPreferences(preferencesRenderer.preferencesModel); return prefSearchP.then(filterResult => { @@ -643,7 +654,7 @@ class SideBySidePreferencesWidget extends Widget { return TPromise.join([this.updateInput(this.defaultPreferencesEditor, defaultPreferencesEditorInput, DefaultSettingsEditorContribution.ID, editablePreferencesEditorInput.getResource(), options), this.updateInput(this.editablePreferencesEditor, editablePreferencesEditorInput, SettingsEditorContribution.ID, defaultPreferencesEditorInput.getResource(), options)]) .then(([defaultPreferencesRenderer, editablePreferencesRenderer]) => { - this.defaultPreferencesHeader.textContent = (defaultPreferencesRenderer.preferencesModel).configurationScope === ConfigurationScope.RESOURCE ? nls.localize('defaultFolderSettings', "Default Folder Settings") : nls.localize('defaultSettings', "Default Settings"); + this.defaultPreferencesHeader.textContent = defaultPreferencesRenderer && (defaultPreferencesRenderer.preferencesModel).configurationScope === ConfigurationScope.RESOURCE ? nls.localize('defaultFolderSettings', "Default Folder Settings") : nls.localize('defaultSettings', "Default Settings"); return { defaultPreferencesRenderer, editablePreferencesRenderer }; }); } diff --git a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts index 7db9cd818f8..60ea35dc725 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts @@ -363,10 +363,6 @@ export class DefaultSettingsRenderer extends Disposable implements IPreferencesR this.settingHighlighter.clear(true); } - public collapseAll() { - this.settingsGroupTitleRenderer.collapseAll(); - } - public updatePreference(key: string, value: any, source: ISetting): void { } } @@ -501,15 +497,6 @@ export class SettingsGroupTitleRenderer extends Disposable implements HiddenArea } } - public collapseAll() { - this.editor.setPosition({ lineNumber: 1, column: 1 }); - this.hiddenGroups = this.settingsGroups.slice(); - for (const groupTitleWidget of this.settingsGroupTitleWidgets) { - groupTitleWidget.toggleCollapse(true); - } - this._onHiddenAreasChanged.fire(); - } - private onToggled(collapsed: boolean, group: ISettingsGroup) { const index = this.hiddenGroups.indexOf(group); if (collapsed) { @@ -619,7 +606,7 @@ export class FeedbackWidgetRenderer extends Disposable { JSON.stringify(feedbackQuery, undefined, ' ') + '\n\n' + actualResultNames.map(name => `// ${name}: ${result.metadata.scoredResults[name]}`).join('\n'); - this.editorService.openEditor({ contents, language: 'json' }, /*sideBySide=*/true).then(feedbackEditor => { + this.editorService.openEditor({ contents, language: 'jsonc' }, /*sideBySide=*/true).then(feedbackEditor => { const sendFeedbackWidget = this._register(this.instantiationService.createInstance(FloatingClickWidget, feedbackEditor.getControl(), 'Send feedback', null)); sendFeedbackWidget.render(); diff --git a/src/vs/workbench/parts/preferences/browser/preferencesService.ts b/src/vs/workbench/parts/preferences/browser/preferencesService.ts index c1f56fe9e76..3c3892467af 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesService.ts @@ -111,7 +111,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic if (this.isDefaultSettingsResource(uri) || this.isDefaultResourceSettingsResource(uri)) { const scope = this.isDefaultSettingsResource(uri) ? ConfigurationScope.WINDOW : ConfigurationScope.RESOURCE; - const mode = this.modeService.getOrCreateMode('json'); + const mode = this.modeService.getOrCreateMode('jsonc'); const model = this._register(this.modelService.createModel('', mode, uri)); let defaultSettings: DefaultSettings; @@ -139,14 +139,14 @@ export class PreferencesService extends Disposable implements IPreferencesServic if (this.defaultSettingsRawResource.toString() === uri.toString()) { let defaultSettings: DefaultSettings = this.getDefaultSettings(ConfigurationScope.WINDOW); - const mode = this.modeService.getOrCreateMode('json'); + const mode = this.modeService.getOrCreateMode('jsonc'); const model = this._register(this.modelService.createModel(defaultSettings.raw, mode, uri)); return TPromise.as(model); } if (this.defaultKeybindingsResource.toString() === uri.toString()) { const defaultKeybindingsEditorModel = this.instantiationService.createInstance(DefaultKeybindingsEditorModel, uri); - const mode = this.modeService.getOrCreateMode('json'); + const mode = this.modeService.getOrCreateMode('jsonc'); const model = this._register(this.modelService.createModel(defaultKeybindingsEditorModel.content, mode, uri)); return TPromise.as(model); } diff --git a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts index fb47a588bb1..347e9331103 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts @@ -12,7 +12,7 @@ import { Disposable, IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Widget } from 'vs/base/browser/ui/widget'; import { Checkbox } from 'vs/base/browser/ui/checkbox/checkbox'; import Event, { Emitter } from 'vs/base/common/event'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { IKeyboardEvent, StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode } from 'vs/base/common/keyCodes'; import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference, IViewZone, IEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import * as editorCommon from 'vs/editor/common/editorCommon'; @@ -24,16 +24,17 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IWorkspaceContextService, WorkbenchState, IWorkspaceFolder } from 'vs/platform/workspace/common/workspace'; import { IAction, Action } from 'vs/base/common/actions'; import { attachInputBoxStyler, attachStylerCallback, attachCheckboxStyler } from 'vs/platform/theme/common/styler'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { buttonBackground, buttonForeground, badgeForeground, badgeBackground, contrastBorder, errorForeground } from 'vs/platform/theme/common/colorRegistry'; +import { buttonBackground, buttonForeground, badgeForeground, badgeBackground, contrastBorder, errorForeground, focusBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { Separator, ActionBar, ActionsOrientation, BaseActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { MarkdownString } from 'vs/base/common/htmlContent'; import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; import { IMarginData } from 'vs/editor/browser/controller/mouseTarget'; import { render as renderOcticons } from 'vs/base/browser/ui/octiconLabel/octiconLabel'; +import { PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER, PANEL_INACTIVE_TITLE_FOREGROUND } from 'vs/workbench/common/theme'; export class SettingsHeaderWidget extends Widget implements IViewZone { @@ -333,15 +334,26 @@ export class FolderSettingsActionItem extends BaseActionItem { this.anchorElement = DOM.$('a.action-label', { role: 'button', 'aria-haspopup': 'true', - // 'tabindex': '0' + 'tabindex': '0' }, this.labelElement, this.detailsElement, this.dropDownElement); this.disposables.push(DOM.addDisposableListener(this.anchorElement, DOM.EventType.CLICK, e => this.onClick(e))); + this.disposables.push(DOM.addDisposableListener(this.anchorElement, DOM.EventType.KEY_UP, e => this.onKeyUp(e))); DOM.append(this.container, this.anchorElement); this.update(); } + private onKeyUp(event: any): void { + const keyboardEvent = new StandardKeyboardEvent(event); + switch (keyboardEvent.keyCode) { + case KeyCode.Enter: + case KeyCode.Space: + this.onClick(event); + return; + } + } + public onClick(event: DOM.EventLike): void { DOM.EventHelper.stop(event, true); if (!this.folder || this._action.checked) { @@ -399,7 +411,10 @@ export class FolderSettingsActionItem extends BaseActionItem { this.contextMenuService.showContextMenu({ getAnchor: () => this.container, getActions: () => TPromise.as(this.getDropdownMenuActions()), - getActionItem: (action) => null + getActionItem: (action) => null, + onHide: () => { + this.anchorElement.blur(); + } }); } @@ -455,7 +470,7 @@ export class SettingsTargetsWidget extends Widget { private create(parent: HTMLElement): void { const settingsTabsWidget = DOM.append(parent, DOM.$('.settings-tabs-widget')); this.settingsSwitcherBar = this._register(new ActionBar(settingsTabsWidget, { - orientation: ActionsOrientation.HORIZONTAL_REVERSE, + orientation: ActionsOrientation.HORIZONTAL, ariaLabel: localize('settingsSwitcherBarAriaLabel', "Settings Switcher"), animated: false, actionItemProvider: (action: Action) => action.id === 'folderSettings' ? this.folderSettings : null @@ -472,7 +487,7 @@ export class SettingsTargetsWidget extends Widget { this.update(); - this.settingsSwitcherBar.push([folderSettingsAction, this.workspaceSettings, this.userSettings]); + this.settingsSwitcherBar.push([this.userSettings, this.workspaceSettings, folderSettingsAction]); } public get settingsTarget(): SettingsTarget { @@ -815,3 +830,72 @@ export class EditPreferenceWidget extends Disposable { super.dispose(); } } + +registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { + + collector.addRule(` + .settings-tabs-widget > .monaco-action-bar .action-item .action-label:focus, + .settings-tabs-widget > .monaco-action-bar .action-item .action-label.checked { + border-bottom: 1px solid; + } + `); + // Title Active + const titleActive = theme.getColor(PANEL_ACTIVE_TITLE_FOREGROUND); + const titleActiveBorder = theme.getColor(PANEL_ACTIVE_TITLE_BORDER); + if (titleActive || titleActiveBorder) { + collector.addRule(` + .settings-tabs-widget > .monaco-action-bar .action-item .action-label:hover, + .settings-tabs-widget > .monaco-action-bar .action-item .action-label.checked { + color: ${titleActive}; + border-bottom-color: ${titleActiveBorder}; + } + `); + } + + // Title Inactive + const titleInactive = theme.getColor(PANEL_INACTIVE_TITLE_FOREGROUND); + if (titleInactive) { + collector.addRule(` + .settings-tabs-widget > .monaco-action-bar .action-item .action-label { + color: ${titleInactive}; + } + `); + } + + // Title focus + const focusBorderColor = theme.getColor(focusBorder); + if (focusBorderColor) { + collector.addRule(` + .settings-tabs-widget > .monaco-action-bar .action-item .action-label:focus { + border-bottom-color: ${focusBorderColor} !important; + } + `); + collector.addRule(` + .settings-tabs-widget > .monaco-action-bar .action-item .action-label:focus { + outline: none; + } + `); + } + + // Styling with Outline color (e.g. high contrast theme) + const outline = theme.getColor(activeContrastBorder); + if (outline) { + const outline = theme.getColor(activeContrastBorder); + + collector.addRule(` + .settings-tabs-widget > .monaco-action-bar .action-item .action-label.checked, + .settings-tabs-widget > .monaco-action-bar .action-item .action-label:hover { + outline-color: ${outline}; + outline-width: 1px; + outline-style: solid; + border-bottom: none; + padding-bottom: 0; + outline-offset: 3px; + } + + .settings-tabs-widget > .monaco-action-bar .action-item .action-label:not(.checked):hover { + outline-style: dashed; + } + `); + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/preferences/common/preferences.ts b/src/vs/workbench/parts/preferences/common/preferences.ts index f46423135ee..6407647bd2c 100644 --- a/src/vs/workbench/parts/preferences/common/preferences.ts +++ b/src/vs/workbench/parts/preferences/common/preferences.ts @@ -86,13 +86,13 @@ export interface IPreferencesEditorModel { } export type IGroupFilter = (group: ISettingsGroup) => boolean; -export type ISettingFilter = (setting: ISetting) => IRange[]; +export type ISettingMatcher = (setting: ISetting) => IRange[]; export interface ISettingsEditorModel extends IPreferencesEditorModel { readonly onDidChangeGroups: Event; settingsGroups: ISettingsGroup[]; groupsTerms: string[]; - filterSettings(filter: string, groupFilter: IGroupFilter, settingFilter: ISettingFilter, mostRelevantSettings?: string[]): IFilterResult; + filterSettings(filter: string, groupFilter: IGroupFilter, settingMatcher: ISettingMatcher, mostRelevantSettings?: string[]): IFilterResult; findValueMatches(filter: string, setting: ISetting): IRange[]; } diff --git a/src/vs/workbench/parts/preferences/common/preferencesContribution.ts b/src/vs/workbench/parts/preferences/common/preferencesContribution.ts index c4caf066e46..9023b766375 100644 --- a/src/vs/workbench/parts/preferences/common/preferencesContribution.ts +++ b/src/vs/workbench/parts/preferences/common/preferencesContribution.ts @@ -125,7 +125,7 @@ export class PreferencesContribution implements IWorkbenchContribution { let schema = schemaRegistry.getSchemaContributions().schemas[uri.toString()]; if (schema) { const modelContent = JSON.stringify(schema); - const mode = this.modeService.getOrCreateMode('json'); + const mode = this.modeService.getOrCreateMode('jsonc'); const model = this.modelService.createModel(modelContent, mode, uri); let disposables = []; diff --git a/src/vs/workbench/parts/preferences/common/preferencesModels.ts b/src/vs/workbench/parts/preferences/common/preferencesModels.ts index 5f372335aea..d4ec0090dce 100644 --- a/src/vs/workbench/parts/preferences/common/preferencesModels.ts +++ b/src/vs/workbench/parts/preferences/common/preferencesModels.ts @@ -14,14 +14,10 @@ import { visit, JSONVisitor } from 'vs/base/common/json'; import { IModel } from 'vs/editor/common/editorCommon'; import { EditorModel } from 'vs/workbench/common/editor'; import { IConfigurationNode, IConfigurationRegistry, Extensions, OVERRIDE_PROPERTY_PATTERN, IConfigurationPropertySchema, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; -import { ISettingsEditorModel, IKeybindingsEditorModel, ISettingsGroup, ISetting, IFilterResult, ISettingsSection, IGroupFilter, ISettingFilter } from 'vs/workbench/parts/preferences/common/preferences'; +import { ISettingsEditorModel, IKeybindingsEditorModel, ISettingsGroup, ISetting, IFilterResult, ISettingsSection, IGroupFilter, ISettingMatcher } from 'vs/workbench/parts/preferences/common/preferences'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { ITextEditorModel, ITextModelService } from 'vs/editor/common/services/resolverService'; +import { ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { IRange, Range } from 'vs/editor/common/core/range'; -import { ITextFileService, StateChange } from 'vs/workbench/services/textfile/common/textfiles'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { Queue } from 'vs/base/common/async'; -import { IFileService } from 'vs/platform/files/common/files'; import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; export abstract class AbstractSettingsModel extends EditorModel { @@ -30,7 +26,7 @@ export abstract class AbstractSettingsModel extends EditorModel { return this.settingsGroups.map(group => '@' + group.id); } - protected doFilterSettings(filter: string, groupFilter: IGroupFilter, settingFilter: ISettingFilter): IFilterResult { + protected doFilterSettings(filter: string, groupFilter: IGroupFilter, settingMatcher: ISettingMatcher): IFilterResult { const allGroups = this.settingsGroups; if (!filter) { @@ -60,7 +56,7 @@ export abstract class AbstractSettingsModel extends EditorModel { for (const section of group.sections) { const settings: ISetting[] = []; for (const setting of section.settings) { - const settingMatches = settingFilter(setting); + const settingMatches = settingMatcher(setting); if (groupMatched || settingMatches && settingMatches.length) { settings.push(setting); } @@ -120,12 +116,11 @@ export class SettingsEditorModel extends AbstractSettingsModel implements ISetti private _settingsGroups: ISettingsGroup[]; protected settingsModel: IModel; - private queue: Queue; private _onDidChangeGroups: Emitter = this._register(new Emitter()); readonly onDidChangeGroups: Event = this._onDidChangeGroups.event; - constructor(reference: IReference, private _configurationTarget: ConfigurationTarget, @ITextFileService protected textFileService: ITextFileService) { + constructor(reference: IReference, private _configurationTarget: ConfigurationTarget) { super(); this.settingsModel = reference.object.textEditorModel; this._register(this.onDispose(() => reference.dispose())); @@ -133,7 +128,6 @@ export class SettingsEditorModel extends AbstractSettingsModel implements ISetti this._settingsGroups = null; this._onDidChangeGroups.fire(); })); - this.queue = new Queue(); } public get uri(): URI { @@ -155,26 +149,18 @@ export class SettingsEditorModel extends AbstractSettingsModel implements ISetti return this.settingsModel.getValue(); } - public filterSettings(filter: string, groupFilter: IGroupFilter, settingFilter: ISettingFilter): IFilterResult { - return this.doFilterSettings(filter, groupFilter, settingFilter); + public filterSettings(filter: string, groupFilter: IGroupFilter, settingMatcher: ISettingMatcher): IFilterResult { + return this.doFilterSettings(filter, groupFilter, settingMatcher); } public findValueMatches(filter: string, setting: ISetting): IRange[] { return this.settingsModel.findMatches(filter, setting.valueRange, false, false, null, false).map(match => match.range); } - public save(): TPromise { - return this.queue.queue(() => this.doSave()); - } - protected isSettingsProperty(property: string, previousParents: string[]): boolean { return previousParents.length === 0; // Settings is root } - protected doSave(): TPromise { - return this.textFileService.save(this.uri); - } - protected parse(): void { this._settingsGroups = parse(this.settingsModel, (property: string, previousParents: string[]): boolean => this.isSettingsProperty(property, previousParents)); } @@ -367,144 +353,6 @@ export class WorkspaceConfigurationEditorModel extends SettingsEditorModel { } -export class WorkspaceConfigModel extends SettingsEditorModel implements ISettingsEditorModel { - - private workspaceConfigModel: IModel; - private workspaceConfigEtag: string; - - constructor( - reference: IReference, - workspaceConfigModelReference: IReference, - _configurationTarget: ConfigurationTarget, - onDispose: Event, - @IFileService private fileService: IFileService, - @ITextModelService textModelResolverService: ITextModelService, - @ITextFileService textFileService: ITextFileService - ) { - super(reference, _configurationTarget, textFileService); - - this._register(workspaceConfigModelReference); - this.workspaceConfigModel = workspaceConfigModelReference.object.textEditorModel; - - // Only listen to state changes. Content changes without saving are not synced. - this._register(this.textFileService.models.get(this.workspaceConfigModel.uri).onDidStateChange(statChange => this._onWorkspaceConfigFileStateChanged(statChange))); - this.onDispose(() => super.dispose()); - } - - protected doSave(): TPromise { - if (this.textFileService.isDirty(this.workspaceConfigModel.uri)) { - // Throw an error? - return TPromise.as(null); - } - - const content = this.createWorkspaceConfigContentFromSettingsModel(); - if (content !== this.workspaceConfigModel.getValue()) { - return this.fileService.updateContent(this.workspaceConfigModel.uri, content) - .then(stat => this.workspaceConfigEtag = stat.etag); - } - - return TPromise.as(null); - } - - private createWorkspaceConfigContentFromSettingsModel(): string { - const workspaceConfigContent = this.workspaceConfigModel.getValue(); - const { settingsPropertyEndsAt, nodeAfterSettingStartsAt } = WorkspaceConfigModel.parseWorkspaceConfigContent(workspaceConfigContent); - const workspaceConfigEndsAt = workspaceConfigContent.lastIndexOf('}'); - - // Settings property exist in Workspace Configuration and has Ending Brace - if (settingsPropertyEndsAt !== -1 && workspaceConfigEndsAt > settingsPropertyEndsAt) { - - // Place settings at the end - let from = workspaceConfigContent.indexOf(':', settingsPropertyEndsAt) + 1; - let to = workspaceConfigEndsAt; - let settingsContent = this.settingsModel.getValue(); - - // There is a node after settings property - // Place settings before that node - if (nodeAfterSettingStartsAt !== -1) { - settingsContent += ','; - to = nodeAfterSettingStartsAt; - } - - return workspaceConfigContent.substring(0, from) + settingsContent + workspaceConfigContent.substring(to); - } - - // Settings property does not exist. Place it at the end - return workspaceConfigContent.substring(0, workspaceConfigEndsAt) + `,\n"settings": ${this.settingsModel.getValue()}\n` + workspaceConfigContent.substring(workspaceConfigEndsAt); - } - - private _onWorkspaceConfigFileStateChanged(stateChange: StateChange): void { - let hasToUpdate = false; - switch (stateChange) { - case StateChange.SAVED: - hasToUpdate = this.workspaceConfigEtag !== this.textFileService.models.get(this.workspaceConfigModel.uri).getETag(); - break; - } - if (hasToUpdate) { - this.onWorkspaceConfigFileContentChanged(); - } - } - - private onWorkspaceConfigFileContentChanged(): void { - this.workspaceConfigEtag = this.textFileService.models.get(this.workspaceConfigModel.uri).getETag(); - const settingsValue = WorkspaceConfigModel.getSettingsContentFromConfigContent(this.workspaceConfigModel.getValue()); - if (settingsValue) { - this.settingsModel.setValue(settingsValue); - } - } - - dispose() { - // Not disposable by default - } - - static getSettingsContentFromConfigContent(workspaceConfigContent: string): string { - const { settingsPropertyEndsAt, nodeAfterSettingStartsAt } = WorkspaceConfigModel.parseWorkspaceConfigContent(workspaceConfigContent); - - const workspaceConfigEndsAt = workspaceConfigContent.lastIndexOf('}'); - - if (settingsPropertyEndsAt !== -1) { - const from = workspaceConfigContent.indexOf(':', settingsPropertyEndsAt) + 1; - const to = nodeAfterSettingStartsAt !== -1 ? nodeAfterSettingStartsAt : workspaceConfigEndsAt; - return workspaceConfigContent.substring(from, to); - } - - return null; - } - - static parseWorkspaceConfigContent(content: string): { settingsPropertyEndsAt: number, nodeAfterSettingStartsAt: number } { - - let settingsPropertyEndsAt = -1; - let nodeAfterSettingStartsAt = -1; - - let rootProperties: string[] = []; - let ancestors: string[] = []; - let currentProperty = ''; - - visit(content, { - onObjectProperty: (name: string, offset: number, length: number) => { - currentProperty = name; - if (ancestors.length === 1) { - rootProperties.push(name); - if (rootProperties[rootProperties.length - 1] === 'settings') { - settingsPropertyEndsAt = offset + length; - } - if (rootProperties[rootProperties.length - 2] === 'settings') { - nodeAfterSettingStartsAt = offset; - } - } - }, - onObjectBegin: (offset: number, length: number) => { - ancestors.push(currentProperty); - }, - onObjectEnd: (offset: number, length: number) => { - ancestors.pop(); - } - }, { allowTrailingComma: true }); - - return { settingsPropertyEndsAt, nodeAfterSettingStartsAt }; - } -} - export class DefaultSettings extends Disposable { private static _RAW: string; @@ -542,24 +390,13 @@ export class DefaultSettings extends Disposable { this.initAllSettingsMap(settingsGroups); const mostCommonlyUsed = this.getMostCommonlyUsedSettings(settingsGroups); this._allSettingsGroups = [mostCommonlyUsed, ...settingsGroups]; - - const builder = new SettingsContentBuilder(); - builder.pushLine('['); - builder.pushGroups([mostCommonlyUsed]); - builder.pushLine(','); - builder.pushGroups(settingsGroups); - builder.pushLine(']'); - this._content = builder.getContent(); - + this._content = this.toContent(true, [mostCommonlyUsed], settingsGroups); return this._content; } get raw(): string { if (!DefaultSettings._RAW) { - const settingsGroups = this.getRegisteredGroups(); - const builder = new SettingsContentBuilder(); - builder.pushGroups(settingsGroups); - DefaultSettings._RAW = builder.getContent(); + DefaultSettings._RAW = this.toContent(false, this.getRegisteredGroups()); } return DefaultSettings._RAW; } @@ -697,6 +534,24 @@ export class DefaultSettings extends Disposable { return c1.order - c2.order; } + private toContent(asArray: boolean, ...settingsGroups: ISettingsGroup[][]): string { + const builder = new SettingsContentBuilder(); + if (asArray) { + builder.pushLine('['); + } + settingsGroups.forEach((settingsGroup, i) => { + builder.pushGroups(settingsGroup); + + if (i !== settingsGroups.length - 1) { + builder.pushLine(','); + } + }); + if (asArray) { + builder.pushLine(']'); + } + return builder.getContent(); + } + } export class DefaultSettingsEditorModel extends AbstractSettingsModel implements ISettingsEditorModel { @@ -730,20 +585,25 @@ export class DefaultSettingsEditorModel extends AbstractSettingsModel implements return this.defaultSettings.settingsGroups; } - public filterSettings(filter: string, groupFilter: IGroupFilter, settingFilter: ISettingFilter, mostRelevantSettings?: string[]): IFilterResult { + public filterSettings(filter: string, groupFilter: IGroupFilter, settingMatcher: ISettingMatcher, mostRelevantSettings?: string[]): IFilterResult { if (mostRelevantSettings) { const mostRelevantGroup = this.renderMostRelevantSettings(mostRelevantSettings); + // calculate match ranges + const matches = mostRelevantGroup.sections[0].settings.reduce((prev, s) => { + return prev.concat(settingMatcher(s)); + }, []); + return { allGroups: [...this.settingsGroups, mostRelevantGroup], filteredGroups: mostRelevantGroup.sections[0].settings.length ? [mostRelevantGroup] : [], - matches: [], + matches, query: filter }; } else { // Do local search and add empty 'most relevant' group const mostRelevantGroup = this.renderMostRelevantSettings([]); - const result = this.doFilterSettings(filter, groupFilter, settingFilter); + const result = this.doFilterSettings(filter, groupFilter, settingMatcher); result.allGroups = [...result.allGroups, mostRelevantGroup]; return result; } diff --git a/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts b/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts index 37a3f7e5e1c..149102c0a87 100644 --- a/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts +++ b/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts @@ -6,8 +6,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as errors from 'vs/base/common/errors'; import Event, { Emitter } from 'vs/base/common/event'; -import { ISettingsEditorModel, IFilterResult, ISetting, ISettingsGroup, IWorkbenchSettingsConfiguration, IFilterMetadata, IPreferencesSearchService } from 'vs/workbench/parts/preferences/common/preferences'; -import { IRange, Range } from 'vs/editor/common/core/range'; +import { ISettingsEditorModel, IFilterResult, ISetting, ISettingsGroup, IWorkbenchSettingsConfiguration, IFilterMetadata, IPreferencesSearchService, IPreferencesSearchModel } from 'vs/workbench/parts/preferences/common/preferences'; +import { IRange } from 'vs/editor/common/core/range'; import { distinct } from 'vs/base/common/arrays'; import * as strings from 'vs/base/common/strings'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; @@ -74,7 +74,7 @@ export class PreferencesSearchService extends Disposable implements IPreferences } } -export class PreferencesSearchModel { +export class PreferencesSearchModel implements IPreferencesSearchModel { private _localProvider: LocalSearchProvider; private _remoteProvider: RemoteSearchProvider; @@ -128,11 +128,11 @@ class LocalSearchProvider { return regex.test(group.title); }; - const settingFilter = (setting: ISetting) => { - return new SettingMatches(this._filter, setting, (filter, setting) => preferencesModel.findValueMatches(filter, setting)).matches; + const settingMatcher = (setting: ISetting) => { + return new SettingMatches(this._filter, setting, true, (filter, setting) => preferencesModel.findValueMatches(filter, setting)).matches; }; - return TPromise.wrap(preferencesModel.filterSettings(this._filter, groupFilter, settingFilter)); + return TPromise.wrap(preferencesModel.filterSettings(this._filter, groupFilter, settingMatcher)); } } @@ -150,19 +150,6 @@ class RemoteSearchProvider { filterPreferences(preferencesModel: ISettingsEditorModel): TPromise { return this._remoteSearchP.then(remoteResult => { - const settingFilter = (setting: ISetting) => { - if (!!remoteResult.scoredResults[setting.key]) { - const settingMatches = new SettingMatches(this._filter, setting, (filter, setting) => preferencesModel.findValueMatches(filter, setting)).matches; - if (settingMatches.length) { - return settingMatches; - } else { - return [new Range(setting.keyRange.startLineNumber, setting.keyRange.startColumn, setting.keyRange.endLineNumber, setting.keyRange.startColumn)]; - } - } else { - return null; - } - }; - if (remoteResult) { let sortedNames = Object.keys(remoteResult.scoredResults).sort((a, b) => remoteResult.scoredResults[b] - remoteResult.scoredResults[a]); if (sortedNames.length) { @@ -170,7 +157,8 @@ class RemoteSearchProvider { sortedNames = sortedNames.filter(name => remoteResult.scoredResults[name] >= highScore / 2); } - const result = preferencesModel.filterSettings(this._filter, group => null, settingFilter, sortedNames); + const settingMatcher = this.getRemoteSettingMatcher(sortedNames, preferencesModel); + const result = preferencesModel.filterSettings(this._filter, group => null, settingMatcher, sortedNames); result.metadata = remoteResult; return result; } else { @@ -189,7 +177,7 @@ class RemoteSearchProvider { 'Content-Type': 'application/json; charset=utf-8', 'api-key': endpoint.key }, - timeout: 4000 + timeout: 5000 }) .then(context => { if (context.res.statusCode >= 300) { @@ -226,6 +214,22 @@ class RemoteSearchProvider { return TPromise.as(p as any); } + + private getRemoteSettingMatcher(names: string[], preferencesModel: ISettingsEditorModel): any { + const resultSet = new Set(); + names.forEach(name => resultSet.add(name)); + + return (setting: ISetting) => { + if (resultSet.has(setting.key)) { + const settingMatches = new SettingMatches(this._filter, setting, false, (filter, setting) => preferencesModel.findValueMatches(filter, setting)).matches; + if (settingMatches.length) { + return settingMatches; + } + } + + return []; + }; + } } const API_VERSION = 'api-version=2016-09-01-Preview'; @@ -243,11 +247,11 @@ function prepareUrl(query: string, endpoint: IEndpointDetails, buildNumber: numb query = escapeSpecialChars(query); const boost = 10; const userQuery = `(${query})^${boost}`; - const encodedQuery = encodeURIComponent(userQuery + ' || ' + query); // Appending Fuzzy after each word. query = query.replace(/\ +/g, '~ ') + '~'; + const encodedQuery = encodeURIComponent(userQuery + ' || ' + query); let url = `${endpoint.urlBase}?`; if (endpoint.key) { url += `search=${encodedQuery}`; @@ -275,7 +279,7 @@ class SettingMatches { public readonly matches: IRange[]; - constructor(searchString: string, setting: ISetting, private valuesMatcher: (filter: string, setting: ISetting) => IRange[]) { + constructor(searchString: string, setting: ISetting, private requireFullQueryMatch: boolean, private valuesMatcher: (filter: string, setting: ISetting) => IRange[]) { this.matches = distinct(this._findMatchesInSetting(searchString, setting), (match) => `${match.startLineNumber}_${match.startColumn}_${match.endLineNumber}_${match.endColumn}_`); } @@ -283,7 +287,7 @@ class SettingMatches { const result = this._doFindMatchesInSetting(searchString, setting); if (setting.overrides && setting.overrides.length) { for (const subSetting of setting.overrides) { - const subSettingMatches = new SettingMatches(searchString, subSetting, this.valuesMatcher); + const subSettingMatches = new SettingMatches(searchString, subSetting, this.requireFullQueryMatch, this.valuesMatcher); let words = searchString.split(' '); const descriptionRanges: IRange[] = this.getRangesForWords(words, this.descriptionMatchingWords, [subSettingMatches.descriptionMatchingWords, subSettingMatches.keyMatchingWords, subSettingMatches.valueMatchingWords]); const keyRanges: IRange[] = this.getRangesForWords(words, this.keyMatchingWords, [subSettingMatches.descriptionMatchingWords, subSettingMatches.keyMatchingWords, subSettingMatches.valueMatchingWords]); @@ -353,7 +357,7 @@ class SettingMatches { const ranges = from.get(word); if (ranges) { result.push(...ranges); - } else if (others.every(o => !o.has(word))) { + } else if (this.requireFullQueryMatch && others.every(o => !o.has(word))) { return []; } } diff --git a/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts b/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts index 297669a92db..1187e04bc01 100644 --- a/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts @@ -10,7 +10,6 @@ import types = require('vs/base/common/types'); import errors = require('vs/base/common/errors'); import { IEntryRunContext, Mode, IAutoFocus } from 'vs/base/parts/quickopen/common/quickOpen'; import { QuickOpenModel } from 'vs/base/parts/quickopen/browser/quickOpenModel'; -import { KeyMod } from 'vs/base/common/keyCodes'; import { QuickOpenHandler, EditorQuickOpenEntry, QuickOpenAction } from 'vs/workbench/browser/quickopen'; import { IEditor, IModelDecorationsChangeAccessor, OverviewRulerLane, IModelDeltaDecoration, IEditorViewState, ITextModel, IDiffEditorModel, ScrollType } from 'vs/editor/common/editorCommon'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -131,9 +130,10 @@ class GotoLineEntry extends EditorQuickOpenEntry { return this.editorService.getActiveEditorInput(); } - public getOptions(): ITextEditorOptions { + public getOptions(pinned?: boolean): ITextEditorOptions { return { - selection: this.toSelection() + selection: this.toSelection(), + pinned }; } @@ -145,9 +145,9 @@ class GotoLineEntry extends EditorQuickOpenEntry { } // Check for sideBySide use - const sideBySide = context.keymods.indexOf(KeyMod.CtrlCmd) >= 0; + const sideBySide = context.keymods.ctrlCmd; if (sideBySide) { - this.editorService.openEditor(this.getInput(), this.getOptions(), true).done(null, errors.onUnexpectedError); + this.editorService.openEditor(this.getInput(), this.getOptions(context.keymods.alt), true).done(null, errors.onUnexpectedError); } // Apply selection and focus diff --git a/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts b/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts index d451792268d..e83194a9110 100644 --- a/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts @@ -15,7 +15,6 @@ import { IEntryRunContext, Mode, IAutoFocus } from 'vs/base/parts/quickopen/comm import { QuickOpenModel, IHighlight } from 'vs/base/parts/quickopen/browser/quickOpenModel'; import { QuickOpenHandler, EditorQuickOpenEntryGroup, QuickOpenAction } from 'vs/workbench/browser/quickopen'; import filters = require('vs/base/common/filters'); -import { KeyMod } from 'vs/base/common/keyCodes'; import { IEditor, IModelDecorationsChangeAccessor, OverviewRulerLane, IModelDeltaDecoration, IModel, ITokenizedModel, IDiffEditorModel, IEditorViewState, ScrollType } from 'vs/editor/common/editorCommon'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; @@ -294,9 +293,10 @@ class SymbolEntry extends EditorQuickOpenEntryGroup { return this.editorService.getActiveEditorInput(); } - public getOptions(): ITextEditorOptions { + public getOptions(pinned?: boolean): ITextEditorOptions { return { - selection: this.toSelection() + selection: this.toSelection(), + pinned }; } @@ -311,9 +311,9 @@ class SymbolEntry extends EditorQuickOpenEntryGroup { private runOpen(context: IEntryRunContext): boolean { // Check for sideBySide use - const sideBySide = context.keymods.indexOf(KeyMod.CtrlCmd) >= 0; + const sideBySide = context.keymods.ctrlCmd; if (sideBySide) { - this.editorService.openEditor(this.getInput(), this.getOptions(), true).done(null, errors.onUnexpectedError); + this.editorService.openEditor(this.getInput(), this.getOptions(context.keymods.alt), true).done(null, errors.onUnexpectedError); } // Apply selection and focus diff --git a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts index 7d9233b0532..0c923fea0fb 100644 --- a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts +++ b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts @@ -138,7 +138,7 @@ export class SettingsChangeRelauncher implements IWorkbenchContribution { private doConfirm(message: string, detail: string, primaryButton: string, confirmed: () => void): void { this.windowService.isFocused().then(focused => { if (focused) { - const confirm = this.messageService.confirmSync({ + const confirm = this.messageService.confirm({ type: 'info', message, detail, diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index 102032dc0fe..154be590d96 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -19,6 +19,7 @@ import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import URI from 'vs/base/common/uri'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISCMService, ISCMRepository } from 'vs/workbench/services/scm/common/scm'; @@ -197,7 +198,7 @@ class DirtyDiffWidget extends PeekViewWidget { @IMessageService private messageService: IMessageService, @IContextKeyService contextKeyService: IContextKeyService ) { - super(editor, { isResizeable: true, frameWidth: 1 }); + super(editor, { isResizeable: true, frameWidth: 1, keepEditorSelection: true }); themeService.onThemeChange(this._applyTheme, this, this._disposables); this._applyTheme(themeService.getTheme()); @@ -243,7 +244,7 @@ class DirtyDiffWidget extends PeekViewWidget { const changeType = getChangeType(change); const changeTypeColor = getChangeTypeColor(this.themeService.getTheme(), changeType); - this.style({ frameColor: changeTypeColor }); + this.style({ frameColor: changeTypeColor, arrowColor: changeTypeColor }); this._actionbarWidget.context = [this.model.modified.uri, this.model.changes, index]; this.show(position, height); @@ -999,23 +1000,59 @@ class DirtyDiffItem { export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution, IModelRegistry { + private enabled = false; private models: IModel[] = []; private items: { [modelId: string]: DirtyDiffItem; } = Object.create(null); + private transientDisposables: IDisposable[] = []; private disposables: IDisposable[] = []; constructor( @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IEditorGroupService editorGroupService: IEditorGroupService, - @IInstantiationService private instantiationService: IInstantiationService + @IEditorGroupService private editorGroupService: IEditorGroupService, + @IInstantiationService private instantiationService: IInstantiationService, + @IConfigurationService private configurationService: IConfigurationService ) { - this.disposables.push(editorGroupService.onEditorsChanged(() => this.onEditorsChanged())); + const onDidChangeEnablement = filterEvent(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.enableDiffDecorations')); + onDidChangeEnablement(this.onDidChangeEnablement, this, this.disposables); + this.onDidChangeEnablement(); } - private onEditorsChanged(): void { - // HACK: This is the best current way of figuring out whether to draw these decorations - // or not. Needs context from the editor, to know whether it is a diff editor, in place editor - // etc. + private onDidChangeEnablement(): void { + const enabled = this.configurationService.getValue('scm.enableDiffDecorations'); + if (enabled) { + this.enable(); + } else { + this.disable(); + } + } + + private enable(): void { + if (this.enabled) { + return; + } + + this.transientDisposables.push(this.editorGroupService.onEditorsChanged(() => this.onEditorsChanged())); + this.onEditorsChanged(); + this.enabled = true; + } + + private disable(): void { + if (!this.enabled) { + return; + } + + this.transientDisposables = dispose(this.transientDisposables); + this.models.forEach(m => this.items[m.id].dispose()); + this.models = []; + this.items = Object.create(null); + this.enabled = false; + } + + // HACK: This is the best current way of figuring out whether to draw these decorations + // or not. Needs context from the editor, to know whether it is a diff editor, in place editor + // etc. + private onEditorsChanged(): void { const models = this.editorService.getVisibleEditors() // map to the editor controls @@ -1067,11 +1104,8 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution, } dispose(): void { + this.disable(); this.disposables = dispose(this.disposables); - this.models.forEach(m => this.items[m.id].dispose()); - - this.models = null; - this.items = null; } } diff --git a/src/vs/workbench/parts/scm/electron-browser/media/scmViewlet.css b/src/vs/workbench/parts/scm/electron-browser/media/scmViewlet.css index ff68aea9db1..fa1b724f9fc 100644 --- a/src/vs/workbench/parts/scm/electron-browser/media/scmViewlet.css +++ b/src/vs/workbench/parts/scm/electron-browser/media/scmViewlet.css @@ -33,8 +33,13 @@ flex-wrap: wrap; } -.scm-viewlet .monaco-list-row > .scm-provider > input { - flex-shrink: 0; +.scm-viewlet .monaco-list-row > .scm-provider > .monaco-action-bar { + flex: 1; +} + +.scm-viewlet .monaco-list-row > .scm-provider > .monaco-action-bar .action-item { + overflow: hidden; + text-overflow: ellipsis; } .scm-viewlet .scm-provider > .count { @@ -150,7 +155,3 @@ .scm-viewlet .scm-editor.scroll > .monaco-inputbox > .wrapper > textarea.input { overflow-y: scroll; } - -.scm-viewlet .spacer { - flex: 1; -} diff --git a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts index 2dc55faba6d..fcbe4f68f73 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -19,6 +19,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { StatusUpdater, StatusBarController } from './scmActivity'; import { SCMViewlet } from 'vs/workbench/parts/scm/electron-browser/scmViewlet'; import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; +import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; class OpenSCMViewletAction extends ToggleViewletAction { @@ -61,3 +62,16 @@ Registry.as(WorkbenchActionExtensions.WorkbenchActions 'View: Show SCM', localize('view', "View") ); + +Registry.as(ConfigurationExtensions.Configuration).registerConfiguration({ + id: 'scm', + order: 5, + type: 'object', + properties: { + 'scm.enableDiffDecorations': { + 'type': 'boolean', + 'default': true, + 'description': localize('enableDiffDecorations', "Enables or disables diff decorations in the editor.") + }, + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index 835eb0269ff..4530cff6727 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -31,7 +31,6 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IMessageService } from 'vs/platform/message/common/message'; -import { IListService } from 'vs/platform/list/browser/listService'; import { MenuItemAction, IMenuService, MenuId } from 'vs/platform/actions/common/actions'; import { IAction, Action, IActionItem, ActionRunner } from 'vs/base/common/actions'; import { MenuItemActionItem, fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; @@ -39,7 +38,7 @@ import { SCMMenus } from './scmMenus'; import { ActionBar, IActionItemProvider, Separator, ActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { IThemeService, LIGHT } from 'vs/platform/theme/common/themeService'; import { isSCMResource } from './scmUtil'; -import { attachListStyler, attachBadgeStyler, attachInputBoxStyler } from 'vs/platform/theme/common/styler'; +import { attachBadgeStyler, attachInputBoxStyler } from 'vs/platform/theme/common/styler'; import Severity from 'vs/base/common/severity'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; @@ -56,6 +55,7 @@ import * as platform from 'vs/base/common/platform'; import { format } from 'vs/base/common/strings'; import { ISpliceable, ISequence, ISplice } from 'vs/base/common/sequence'; import { firstIndex } from 'vs/base/common/arrays'; +import { WorkbenchList, IListService } from 'vs/platform/list/browser/listService'; // TODO@Joao // Need to subclass MenuItemActionItem in order to respect @@ -82,6 +82,10 @@ export interface IViewModel { readonly repositories: ISCMRepository[]; readonly selectedRepositories: ISCMRepository[]; readonly onDidSplice: Event>; + + isVisible(): boolean; + readonly onDidChangeVisibility: Event; + hide(repository: ISCMRepository): void; } @@ -149,9 +153,6 @@ class ProviderRenderer implements IRenderer new StatusBarActionItem(a as StatusBarAction) }); @@ -212,7 +213,9 @@ class ProviderRenderer implements IRenderer; + private visibilityDisposables: IDisposable[] = []; + private previousSelection: ISCMRepository[] | undefined = undefined; private _onSelectionChange = new Emitter(); readonly onSelectionChange: Event = this._onSelectionChange.event; @@ -224,6 +227,7 @@ class MainPanel extends ViewletPanel { @IInstantiationService private instantiationService: IInstantiationService, @IThemeService private themeService: IThemeService, @IContextKeyService private contextKeyService: IContextKeyService, + @IListService private listService: IListService, @IMenuService private menuService: IMenuService ) { super(localize('scm providers', "Source Control Providers"), {}, keybindingService, contextMenuService); @@ -251,6 +255,32 @@ class MainPanel extends ViewletPanel { return this.list.getSelectedElements(); } + protected renderBody(container: HTMLElement): void { + const delegate = new ProvidersListDelegate(); + const renderer = this.instantiationService.createInstance(ProviderRenderer); + + this.list = new WorkbenchList(container, delegate, [renderer], { + identityProvider: repository => repository.provider.id + }, this.contextKeyService, this.listService, this.themeService); + + this.disposables.push(this.list); + this.list.onSelectionChange(this.onListSelectionChange, this, this.disposables); + this.list.onContextMenu(this.onListContextMenu, this, this.disposables); + + this.viewModel.onDidChangeVisibility(this.onDidChangeVisibility, this, this.disposables); + this.onDidChangeVisibility(this.viewModel.isVisible()); + } + + private onDidChangeVisibility(visible: boolean): void { + if (visible) { + this.viewModel.onDidSplice(({ index, deleteCount, elements }) => this.splice(index, deleteCount, elements), null, this.visibilityDisposables); + this.splice(0, 0, this.viewModel.repositories); + } else { + this.visibilityDisposables = dispose(this.visibilityDisposables); + this.splice(0, this.list.length); + } + } + private splice(index: number, deleteCount: number, repositories: ISCMRepository[] = []): void { const wasEmpty = this.list.length === 0; @@ -259,27 +289,10 @@ class MainPanel extends ViewletPanel { // Automatically select the first one if (wasEmpty && this.list.length > 0) { - this.list.setSelection([0]); + this.restoreSelection(); } } - protected renderBody(container: HTMLElement): void { - const delegate = new ProvidersListDelegate(); - const renderer = this.instantiationService.createInstance(ProviderRenderer); - - this.list = new List(container, delegate, [renderer], { - identityProvider: repository => repository.provider.id - }); - - this.disposables.push(this.list); - this.disposables.push(attachListStyler(this.list, this.themeService)); - this.list.onSelectionChange(this.onListSelectionChange, this, this.disposables); - this.list.onContextMenu(this.onListContextMenu, this, this.disposables); - - this.viewModel.onDidSplice(({ index, deleteCount, elements }) => this.splice(index, deleteCount, elements), null, this.disposables); - this.splice(0, 0, this.viewModel.repositories); - } - protected layoutBody(size: number): void { this.list.layout(size); } @@ -328,12 +341,32 @@ class MainPanel extends ViewletPanel { private onListSelectionChange(e: IListEvent): void { // select one repository if the selected one is gone if (e.elements.length === 0 && this.list.length > 0) { - this.list.setSelection([0]); + this.restoreSelection(); return; } + if (e.elements.length > 0) { + this.previousSelection = e.elements; + } + this._onSelectionChange.fire(e.elements); } + + private restoreSelection(): void { + let selection: number[]; + + if (this.previousSelection) { + selection = this.previousSelection + .map(r => this.viewModel.repositories.indexOf(r)) + .filter(i => i > -1); + } + + if (!selection || selection.length === 0) { + selection = [0]; + } + + this.list.setSelection(selection); + } } interface ResourceGroupTemplate { @@ -634,6 +667,7 @@ class ResourceGroupSplicer { } dispose(): void { + this.onDidSpliceGroups({ start: 0, deleteCount: this.items.length, toInsert: [] }); this.disposables = dispose(this.disposables); } } @@ -646,6 +680,7 @@ export class RepositoryPanel extends ViewletPanel { private listContainer: HTMLElement; private list: List; private menus: SCMMenus; + private visibilityDisposables: IDisposable[] = []; constructor( readonly repository: ISCMRepository, @@ -659,6 +694,7 @@ export class RepositoryPanel extends ViewletPanel { @IMessageService protected messageService: IMessageService, @IWorkbenchEditorService protected editorService: IWorkbenchEditorService, @IEditorGroupService protected editorGroupService: IEditorGroupService, + @IContextKeyService protected contextKeyService: IContextKeyService, @IInstantiationService protected instantiationService: IInstantiationService ) { super(repository.provider.label, {}, keybindingService, contextMenuService); @@ -753,13 +789,10 @@ export class RepositoryPanel extends ViewletPanel { this.instantiationService.createInstance(ResourceRenderer, this.menus, actionItemProvider, () => this.getSelectedResources()), ]; - this.list = new List(this.listContainer, delegate, renderers, { + this.list = new WorkbenchList(this.listContainer, delegate, renderers, { identityProvider: scmResourceIdentityProvider, keyboardSupport: false - }); - - this.disposables.push(attachListStyler(this.list, this.themeService)); - this.disposables.push(this.listService.register(this.list)); + }, this.contextKeyService, this.listService, this.themeService); chain(this.list.onOpen) .map(e => e.elements[0]) @@ -774,8 +807,17 @@ export class RepositoryPanel extends ViewletPanel { this.list.onContextMenu(this.onListContextMenu, this, this.disposables); this.disposables.push(this.list); - const listSplicer = new ResourceGroupSplicer(this.repository.provider.groups, this.list); - this.disposables.push(listSplicer); + this.viewModel.onDidChangeVisibility(this.onDidChangeVisibility, this, this.disposables); + this.onDidChangeVisibility(this.viewModel.isVisible()); + } + + private onDidChangeVisibility(visible: boolean): void { + if (visible) { + const listSplicer = new ResourceGroupSplicer(this.repository.provider.groups, this.list); + this.visibilityDisposables.push(listSplicer); + } else { + this.visibilityDisposables = dispose(this.visibilityDisposables); + } } layoutBody(height: number = this.cachedHeight): void { @@ -783,7 +825,6 @@ export class RepositoryPanel extends ViewletPanel { return; } - this.list.layout(height); this.cachedHeight = height; this.inputBox.layout(); @@ -882,7 +923,7 @@ export class RepositoryPanel extends ViewletPanel { } dispose(): void { - this.disposables = dispose(this.disposables); + this.visibilityDisposables = dispose(this.visibilityDisposables); super.dispose(); } } @@ -915,6 +956,9 @@ export class SCMViewlet extends PanelViewlet implements IViewModel { private _onDidSplice = new Emitter>(); readonly onDidSplice: Event> = this._onDidSplice.event; + private _onDidChangeVisibility = new Emitter(); + readonly onDidChangeVisibility: Event = this._onDidChangeVisibility.event; + private _height: number | undefined = undefined; get height(): number | undefined { return this._height; } @@ -929,7 +973,6 @@ export class SCMViewlet extends PanelViewlet implements IViewModel { @IContextKeyService contextKeyService: IContextKeyService, @IKeybindingService protected keybindingService: IKeybindingService, @IMessageService protected messageService: IMessageService, - @IListService protected listService: IListService, @IContextMenuService contextMenuService: IContextMenuService, @IThemeService protected themeService: IThemeService, @ICommandService protected commandService: ICommandService, @@ -1014,6 +1057,12 @@ export class SCMViewlet extends PanelViewlet implements IViewModel { } } + setVisible(visible: boolean): TPromise { + const result = super.setVisible(visible); + this._onDidChangeVisibility.fire(visible); + return result; + } + getOptimalWidth(): number { return 400; } diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index c7ac091d433..7827ddfed6a 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -6,7 +6,6 @@ 'use strict'; import * as arrays from 'vs/base/common/arrays'; -import * as objects from 'vs/base/common/objects'; import { TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); import { ThrottledDelayer } from 'vs/base/common/async'; @@ -18,8 +17,6 @@ import { FileEntry, OpenFileHandler, FileQuickOpenModel } from 'vs/workbench/par import * as openSymbolHandler from 'vs/workbench/parts/search/browser/openSymbolHandler'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { ISearchStats, ICachedSearchStats, IUncachedSearchStats } from 'vs/platform/search/common/search'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWorkbenchSearchConfiguration } from 'vs/workbench/parts/search/common/search'; import { IRange } from 'vs/editor/common/core/range'; @@ -27,88 +24,11 @@ import { compareItemsByScore, scoreItem, ScorerCache, prepareQuery } from 'vs/ba export import OpenSymbolHandler = openSymbolHandler.OpenSymbolHandler; // OpenSymbolHandler is used from an extension and must be in the main bundle file so it can load -const objects_assign: (destination: T, source: U) => T & U = objects.assign; - interface ISearchWithRange { search: string; range: IRange; } -/* __GDPR__FRAGMENT__ - "ITimerEventData" : { - "searchLength" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "unsortedResultDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "sortedResultDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "resultCount": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "symbols.fromCache": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.fromCache": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.unsortedResultDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.sortedResultDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.resultCount": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.traversal": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.errors": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.fileWalkStartDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.fileWalkResultDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.directoriesWalked": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.filesWalked": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.cmdForkStartTime": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.cmdForkResultTime": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.cmdResultCount": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.cacheLookupStartDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.cacheFilterStartDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.cacheLookupResultDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "files.cacheEntryCount": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "${wildcard}": [ - { - "${prefix}": "files.joined", - "${classification}": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } - } - ] - } -*/ -interface ITimerEventData { - searchLength: number; - unsortedResultDuration: number; - sortedResultDuration: number; - resultCount: number; - symbols: { - fromCache: boolean; - }; - files: { - fromCache: boolean; - unsortedResultDuration: number; - sortedResultDuration: number; - resultCount: number; - } & ({ - traversal: string; - errors: string[]; - fileWalkStartDuration: number; - fileWalkResultDuration: number; - directoriesWalked: number; - filesWalked: number; - cmdForkStartTime?: number; - cmdForkResultTime?: number; - cmdResultCount?: number; - } | { - cacheLookupStartDuration: number; - cacheFilterStartDuration: number; - cacheLookupResultDuration: number; - cacheEntryCount: number; - joined?: any; - }); -} - -interface ITelemetryData { - searchLength: number; - unsortedResultTime: number; - sortedResultTime: number; - resultCount: number; - symbols: { - fromCache: boolean; - }; - files: ISearchStats; -} - export class OpenAnythingHandler extends QuickOpenHandler { public static readonly ID = 'workbench.picker.anything'; @@ -131,8 +51,7 @@ export class OpenAnythingHandler extends QuickOpenHandler { constructor( @IMessageService private messageService: IMessageService, @IInstantiationService instantiationService: IInstantiationService, - @IConfigurationService private configurationService: IConfigurationService, - @ITelemetryService private telemetryService: ITelemetryService + @IConfigurationService private configurationService: IConfigurationService ) { super(); @@ -168,8 +87,6 @@ export class OpenAnythingHandler extends QuickOpenHandler { } public getResults(searchValue: string): TPromise { - const startTime = Date.now(); - this.cancelPendingSearch(); this.isClosed = false; // Treat this call as the handler being in use @@ -212,10 +129,8 @@ export class OpenAnythingHandler extends QuickOpenHandler { const mergedResults = [].concat(...results.map(r => r.entries)); // Sort - const unsortedResultTime = Date.now(); const compare = (elementA: QuickOpenEntry, elementB: QuickOpenEntry) => compareItemsByScore(elementA, elementB, query, true, QuickOpenItemAccessor, this.scorerCache); const viewResults = arrays.top(mergedResults, compare, OpenAnythingHandler.MAX_DISPLAYED_RESULTS); - const sortedResultTime = Date.now(); // Apply range and highlights to file entries viewResults.forEach(entry => { @@ -227,28 +142,6 @@ export class OpenAnythingHandler extends QuickOpenHandler { } }); - const duration = new Date().getTime() - startTime; - filePromise.then(fileModel => { - const data = this.createTimerEventData(startTime, { - searchLength: query.value.length, - unsortedResultTime, - sortedResultTime, - resultCount: mergedResults.length, - symbols: { fromCache: false }, - files: fileModel.stats, - }); - - /* __GDPR__ - "openAnything" : { - "duration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "${include}": [ - "${ITimerEventData}" - ] - } - */ - this.telemetryService.publicLog('openAnything', objects.assign(data, { duration })); - }); - return TPromise.as(new QuickOpenModel(viewResults)); }, (error: Error[]) => { this.pendingSearch = null; @@ -366,43 +259,4 @@ export class OpenAnythingHandler extends QuickOpenHandler { this.pendingSearch = null; } } - - private createTimerEventData(startTime: number, telemetry: ITelemetryData): ITimerEventData { - return { - searchLength: telemetry.searchLength, - unsortedResultDuration: telemetry.unsortedResultTime - startTime, - sortedResultDuration: telemetry.sortedResultTime - startTime, - resultCount: telemetry.resultCount, - symbols: telemetry.symbols, - files: telemetry.files && this.createFileEventData(startTime, telemetry.files) - }; - } - - private createFileEventData(startTime: number, stats: ISearchStats) { - const cached = stats as ICachedSearchStats; - const uncached = stats as IUncachedSearchStats; - - return objects_assign({ - fromCache: stats.fromCache, - unsortedResultDuration: stats.unsortedResultTime && stats.unsortedResultTime - startTime, - sortedResultDuration: stats.sortedResultTime && stats.sortedResultTime - startTime, - resultCount: stats.resultCount - }, stats.fromCache ? { - cacheLookupStartDuration: cached.cacheLookupStartTime - startTime, - cacheFilterStartDuration: cached.cacheFilterStartTime - startTime, - cacheLookupResultDuration: cached.cacheLookupResultTime - startTime, - cacheEntryCount: cached.cacheEntryCount, - joined: cached.joined && this.createFileEventData(startTime, cached.joined) - } : { - traversal: uncached.traversal, - errors: uncached.errors, - fileWalkStartDuration: uncached.fileWalkStartTime - startTime, - fileWalkResultDuration: uncached.fileWalkResultTime - startTime, - directoriesWalked: uncached.directoriesWalked, - filesWalked: uncached.filesWalked, - cmdForkStartDuration: uncached.cmdForkStartTime && uncached.cmdForkStartTime - startTime, - cmdForkResultDuration: uncached.cmdForkResultTime && uncached.cmdForkResultTime - startTime, - cmdResultCount: uncached.cmdResultCount - }); - } } \ No newline at end of file diff --git a/src/vs/workbench/parts/search/browser/openFileHandler.ts b/src/vs/workbench/parts/search/browser/openFileHandler.ts index 4e2a3042199..04e8cad5150 100644 --- a/src/vs/workbench/parts/search/browser/openFileHandler.ts +++ b/src/vs/workbench/parts/search/browser/openFileHandler.ts @@ -88,8 +88,8 @@ export class FileEntry extends EditorQuickOpenEntry { this.range = range; } - public isFile(): boolean { - return true; // TODO@Ben debt with editor history merging + public mergeWithEditorHistory(): boolean { + return true; } public getInput(): IResourceInput | EditorInput { @@ -142,6 +142,9 @@ export class OpenFileHandler extends QuickOpenHandler { return TPromise.as(new FileQuickOpenModel([])); } + // Untildify file pattern + searchValue = labels.untildify(searchValue, this.environmentService.userHome); + // Do find results return this.doFindResults(searchValue, this.cacheState.cacheKey, maxSortedResults); } diff --git a/src/vs/workbench/parts/search/browser/patternInputWidget.ts b/src/vs/workbench/parts/search/browser/patternInputWidget.ts index 82d85f89eea..56d9ee9c02c 100644 --- a/src/vs/workbench/parts/search/browser/patternInputWidget.ts +++ b/src/vs/workbench/parts/search/browser/patternInputWidget.ts @@ -15,7 +15,6 @@ import { KeyCode } from 'vs/base/common/keyCodes'; import CommonEvent, { Emitter } from 'vs/base/common/event'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { attachInputBoxStyler, attachCheckboxStyler } from 'vs/platform/theme/common/styler'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { HistoryNavigator } from 'vs/base/common/history'; export interface IOptions { @@ -199,7 +198,7 @@ export class PatternInputWidget extends Widget { export class ExcludePatternInputWidget extends PatternInputWidget { - constructor(parent: HTMLElement, contextViewProvider: IContextViewProvider, themeService: IThemeService, private telemetryService: ITelemetryService, options: IOptions = Object.create(null)) { + constructor(parent: HTMLElement, contextViewProvider: IContextViewProvider, themeService: IThemeService, options: IOptions = Object.create(null)) { super(parent, contextViewProvider, themeService, options); } @@ -228,10 +227,6 @@ export class ExcludePatternInputWidget extends PatternInputWidget { title: nls.localize('useExcludesAndIgnoreFilesDescription', "Use Exclude Settings and Ignore Files"), isChecked: true, onChange: (viaKeyboard) => { - /* __GDPR__ - "search.useExcludesAndIgnoreFiles.toggled" : {} - */ - this.telemetryService.publicLog('search.useExcludesAndIgnoreFiles.toggled'); this.onOptionChange(null); if (!viaKeyboard) { this.inputBox.focus(); diff --git a/src/vs/workbench/parts/search/browser/replaceService.ts b/src/vs/workbench/parts/search/browser/replaceService.ts index 11e4e80bf53..b44ce12bb71 100644 --- a/src/vs/workbench/parts/search/browser/replaceService.ts +++ b/src/vs/workbench/parts/search/browser/replaceService.ts @@ -18,7 +18,6 @@ import { Match, FileMatch, FileMatchOrMatch, ISearchWorkbenchService } from 'vs/ import { BulkEdit, IResourceEdit, createBulkEdit } from 'vs/editor/browser/services/bulkEdit'; import { IProgressRunner } from 'vs/platform/progress/common/progress'; import { IDiffEditor } from 'vs/editor/browser/editorBrowser'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IModel, ScrollType } from 'vs/editor/common/editorCommon'; @@ -92,10 +91,9 @@ export class ReplaceService implements IReplaceService { public _serviceBrand: any; constructor( - @ITelemetryService private telemetryService: ITelemetryService, @IFileService private fileService: IFileService, @IEditorService private editorService: IWorkbenchEditorService, - @ITextModelService private textModelResolverService: ITextModelService, + @ITextModelService private textModelResolverService: ITextModelService ) { } @@ -131,10 +129,6 @@ export class ReplaceService implements IReplaceService { } public openReplacePreview(element: FileMatchOrMatch, preserveFocus?: boolean, sideBySide?: boolean, pinned?: boolean): TPromise { - /* __GDPR__ - "replace.open.previewEditor" : {} - */ - this.telemetryService.publicLog('replace.open.previewEditor'); const fileMatch = element instanceof Match ? element.parent() : element; return this.editorService.openEditor({ diff --git a/src/vs/workbench/parts/search/browser/searchActions.ts b/src/vs/workbench/parts/search/browser/searchActions.ts index 08e2c920157..4145a5cc8b2 100644 --- a/src/vs/workbench/parts/search/browser/searchActions.ts +++ b/src/vs/workbench/parts/search/browser/searchActions.ts @@ -15,7 +15,6 @@ import { Match, FileMatch, FileMatchOrMatch, FolderMatch, RenderableMatch } from import { IReplaceService } from 'vs/workbench/parts/search/common/replace'; import * as Constants from 'vs/workbench/parts/search/common/constants'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ResolvedKeybinding, createKeybinding } from 'vs/base/common/keyCodes'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; @@ -188,7 +187,6 @@ export class ShowPreviousSearchTermAction extends Action { export class FocusNextInputAction extends Action { public static readonly ID = 'search.focus.nextInputBox'; - public static readonly LABEL = nls.localize('focusNextInputBox', "Focus Next Input Box"); constructor(id: string, label: string, @IViewletService private viewletService: IViewletService) { super(id, label); @@ -203,7 +201,6 @@ export class FocusNextInputAction extends Action { export class FocusPreviousInputAction extends Action { public static readonly ID = 'search.focus.previousInputBox'; - public static readonly LABEL = nls.localize('focusPreviousInputBox', "Focus Previous Input Box"); constructor(id: string, label: string, @IViewletService private viewletService: IViewletService) { super(id, label); @@ -224,17 +221,10 @@ export const FocusActiveEditorCommand = (accessor: ServicesAccessor) => { return TPromise.as(true); }; -export interface IFindOrReplaceActionOpts { - selectWidgetText: boolean; - focusReplace: boolean; - expandSearchReplaceWidget: boolean; - takeEditorText?: boolean; -} - export abstract class FindOrReplaceInFilesAction extends Action { constructor(id: string, label: string, private viewletService: IViewletService, - private options: IFindOrReplaceActionOpts) { + private expandSearchReplaceWidget: boolean, private selectWidgetText: boolean, private focusReplace: boolean) { super(id, label); } @@ -242,20 +232,13 @@ export abstract class FindOrReplaceInFilesAction extends Action { const viewlet = this.viewletService.getActiveViewlet(); const searchViewletWasOpen = viewlet && viewlet.getId() === Constants.VIEWLET_ID; return this.viewletService.openViewlet(Constants.VIEWLET_ID, true).then((viewlet) => { - if (this.options.takeEditorText) { - (viewlet).takeEditorText(); - } - - if (!searchViewletWasOpen || this.options.expandSearchReplaceWidget) { + if (!searchViewletWasOpen || this.expandSearchReplaceWidget) { const searchAndReplaceWidget = (viewlet).searchAndReplaceWidget; - searchAndReplaceWidget.toggleReplace(this.options.expandSearchReplaceWidget); - + searchAndReplaceWidget.toggleReplace(this.expandSearchReplaceWidget); // Focus replace only when there is text in the searchInput box - const focusReplace = this.options.focusReplace && searchAndReplaceWidget.searchInput.getValue(); - searchAndReplaceWidget.focus(this.options.selectWidgetText, !!focusReplace); + const focusReplace = this.focusReplace && searchAndReplaceWidget.searchInput.getValue(); + searchAndReplaceWidget.focus(this.selectWidgetText, !!focusReplace); } - - return viewlet; }); } } @@ -267,26 +250,7 @@ export class FindInFilesAction extends FindOrReplaceInFilesAction { public static readonly LABEL = nls.localize('findInFiles', "Find in Files"); constructor(id: string, label: string, @IViewletService viewletService: IViewletService) { - super(id, label, viewletService, { - expandSearchReplaceWidget: false, - selectWidgetText: true, - focusReplace: false - }); - } -} - -export class FindInFilesWithSelectedTextAction extends FindOrReplaceInFilesAction { - - public static readonly ID = 'workbench.action.findInFilesWithSelectedText'; - public static readonly LABEL = nls.localize('findInFilesWithSelectedText', "Find in Files With Selected Text"); - - constructor(id: string, label: string, @IViewletService viewletService: IViewletService) { - super(id, label, viewletService, { - expandSearchReplaceWidget: false, - selectWidgetText: true, - focusReplace: false, - takeEditorText: true - }); + super(id, label, viewletService, /*expandSearchReplaceWidget=*/false, /*selectWidgetText=*/true, /*focusReplace=*/false); } } @@ -296,26 +260,7 @@ export class ReplaceInFilesAction extends FindOrReplaceInFilesAction { public static readonly LABEL = nls.localize('replaceInFiles', "Replace in Files"); constructor(id: string, label: string, @IViewletService viewletService: IViewletService) { - super(id, label, viewletService, { - expandSearchReplaceWidget: true, - selectWidgetText: false, - focusReplace: true - }); - } -} - -export class ReplaceInFilesWithSelectedTextAction extends FindOrReplaceInFilesAction { - - public static readonly ID = 'workbench.action.replaceInFilesWithSelectedText'; - public static readonly LABEL = nls.localize('replaceInFilesWithSelectedText', "Replace in Files With Selected Text"); - - constructor(id: string, label: string, @IViewletService viewletService: IViewletService) { - super(id, label, viewletService, { - expandSearchReplaceWidget: true, - selectWidgetText: false, - focusReplace: true, - takeEditorText: true - }); + super(id, label, viewletService, /*expandSearchReplaceWidget=*/true, /*selectWidgetText=*/false, /*focusReplace=*/true); } } @@ -333,60 +278,103 @@ export class CloseReplaceAction extends Action { } } -export class RefreshAction extends Action { +export abstract class SearchAction extends Action { - constructor(private viewlet: SearchViewlet) { - super('refresh'); - - this.label = nls.localize('RefreshAction.label', "Refresh"); - this.enabled = false; - this.class = 'search-action refresh'; + constructor(id: string, label: string, @IViewletService protected viewletService: IViewletService) { + super(id, label); } - public run(): TPromise { - this.viewlet.onQueryChanged(true); + abstract update(): void; - return TPromise.as(null); - } -} - -export class CollapseDeepestExpandedLevelAction extends Action { - private viewer: ITree; - - constructor(viewlet: SearchViewlet, enabled: boolean = false) { - super('vs.tree.collapse', nls.localize('collapse', "Collapse"), 'monaco-tree-action collapse-all', enabled); - this.viewer = viewlet.getControl(); - this.class = 'search-action collapse'; - } - - public run(context?: any): TPromise { - if (this.viewer.getHighlight()) { - return TPromise.as(null); // Global action disabled if user is in edit mode from another action + protected getSearchViewlet(): SearchViewlet { + const activeViewlet = this.viewletService.getActiveViewlet(); + if (activeViewlet && activeViewlet.getId() === Constants.VIEWLET_ID) { + return activeViewlet as SearchViewlet; } + return null; + } +} - this.viewer.collapseDeepestExpandedLevel(); - this.viewer.clearSelection(); - this.viewer.clearFocus(); - this.viewer.DOMFocus(); - this.viewer.focusFirst(); +export class RefreshAction extends SearchAction { + static ID: string = 'search.action.refreshSearchResults'; + static LABEL: string = nls.localize('RefreshAction.label', "Refresh"); + + constructor(id: string, label: string, @IViewletService viewletService: IViewletService) { + super(id, label, viewletService); + this.class = 'search-action refresh'; + this.update(); + } + + update(): void { + const searchViewlet = this.getSearchViewlet(); + this.enabled = searchViewlet && searchViewlet.isSearchSubmitted(); + } + + public run(): TPromise { + const searchViewlet = this.getSearchViewlet(); + if (searchViewlet) { + searchViewlet.onQueryChanged(true); + } return TPromise.as(null); } } -export class ClearSearchResultsAction extends Action { +export class CollapseDeepestExpandedLevelAction extends SearchAction { - constructor(private viewlet: SearchViewlet) { - super('clearSearchResults'); + static ID: string = 'search.action.collapseSearchResults'; + static LABEL: string = nls.localize('CollapseDeepestExpandedLevelAction.label', "Collapse All"); - this.label = nls.localize('ClearSearchResultsAction.label', "Clear Search Results"); - this.enabled = false; - this.class = 'search-action clear-search-results'; + constructor(id: string, label: string, @IViewletService viewletService: IViewletService) { + super(id, label, viewletService); + this.class = 'search-action collapse'; + this.update(); + } + + update(): void { + const searchViewlet = this.getSearchViewlet(); + this.enabled = searchViewlet && searchViewlet.hasSearchResults(); } public run(): TPromise { - this.viewlet.clearSearchResults(); + const searchViewlet = this.getSearchViewlet(); + if (searchViewlet) { + const viewer = searchViewlet.getControl(); + if (viewer.getHighlight()) { + return TPromise.as(null); // Global action disabled if user is in edit mode from another action + } + viewer.collapseDeepestExpandedLevel(); + viewer.clearSelection(); + viewer.clearFocus(); + viewer.DOMFocus(); + viewer.focusFirst(); + } + return TPromise.as(null); + } +} + +export class ClearSearchResultsAction extends SearchAction { + + static ID: string = 'search.action.clearSearchResults'; + static LABEL: string = nls.localize('ClearSearchResultsAction.label', "Clear"); + + constructor(id: string, label: string, @IViewletService viewletService: IViewletService) { + super(id, label, viewletService); + this.class = 'search-action clear-search-results'; + this.update(); + } + + update(): void { + const searchViewlet = this.getSearchViewlet(); + this.enabled = searchViewlet && searchViewlet.hasSearchResults(); + } + + public run(): TPromise { + const searchViewlet = this.getSearchViewlet(); + if (searchViewlet) { + searchViewlet.clearSearchResults(); + } return TPromise.as(null); } } @@ -503,16 +491,11 @@ export class RemoveAction extends AbstractSearchAndReplaceAction { export class ReplaceAllAction extends AbstractSearchAndReplaceAction { constructor(private viewer: ITree, private fileMatch: FileMatch, private viewlet: SearchViewlet, - @IKeybindingService keyBindingService: IKeybindingService, - @ITelemetryService private telemetryService: ITelemetryService) { + @IKeybindingService keyBindingService: IKeybindingService) { super(Constants.ReplaceAllInFileActionId, appendKeyBindingLabel(nls.localize('file.replaceAll.label', "Replace All"), keyBindingService.lookupKeybinding(Constants.ReplaceAllInFileActionId), keyBindingService), 'action-replace-all'); } public run(): TPromise { - /* __GDPR__ - "replaceAll.action.selected" : {} - */ - this.telemetryService.publicLog('replaceAll.action.selected'); let nextFocusElement = this.getElementToFocusAfterRemoved(this.viewer, this.fileMatch); return this.fileMatch.parent().replace(this.fileMatch).then(() => { if (nextFocusElement) { @@ -527,17 +510,12 @@ export class ReplaceAllAction extends AbstractSearchAndReplaceAction { export class ReplaceAllInFolderAction extends AbstractSearchAndReplaceAction { constructor(private viewer: ITree, private folderMatch: FolderMatch, - @IKeybindingService keyBindingService: IKeybindingService, - @ITelemetryService private telemetryService: ITelemetryService + @IKeybindingService keyBindingService: IKeybindingService ) { super(Constants.ReplaceAllInFolderActionId, nls.localize('file.replaceAll.label', "Replace All"), 'action-replace-all'); } public async run(): TPromise { - /* __GDPR__ - "replaceAllInFolder.action.selected" : {} - */ - this.telemetryService.publicLog('replaceAllInFolder.action.selected'); let nextFocusElement = this.getElementToFocusAfterRemoved(this.viewer, this.folderMatch); await this.folderMatch.replaceAll(); @@ -553,17 +531,12 @@ export class ReplaceAction extends AbstractSearchAndReplaceAction { constructor(private viewer: ITree, private element: Match, private viewlet: SearchViewlet, @IReplaceService private replaceService: IReplaceService, @IKeybindingService keyBindingService: IKeybindingService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @ITelemetryService private telemetryService: ITelemetryService) { + @IWorkbenchEditorService private editorService: IWorkbenchEditorService) { super(Constants.ReplaceActionId, appendKeyBindingLabel(nls.localize('match.replace.label', "Replace"), keyBindingService.lookupKeybinding(Constants.ReplaceActionId), keyBindingService), 'action-replace'); } public run(): TPromise { this.enabled = false; - /* __GDPR__ - "replace.action.selected" : {} - */ - this.telemetryService.publicLog('replace.action.selected'); return this.element.parent().replace(this.element).then(() => { let elementToFocus = this.getElementToFocusAfterReplace(); diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 43c2dae7fbd..329d78f48fb 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -17,12 +17,11 @@ import URI from 'vs/base/common/uri'; import strings = require('vs/base/common/strings'); import * as paths from 'vs/base/common/paths'; import dom = require('vs/base/browser/dom'); -import { IAction, Action } from 'vs/base/common/actions'; +import { IAction } from 'vs/base/common/actions'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { Dimension, Builder, $ } from 'vs/base/browser/builder'; import { FindInput } from 'vs/base/browser/ui/findinput/findInput'; import { ITree, IFocusEvent } from 'vs/base/parts/tree/browser/tree'; -import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { Scope } from 'vs/workbench/common/memento'; import { IPreferencesService } from 'vs/workbench/parts/preferences/common/preferences'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; @@ -46,22 +45,22 @@ import { KeyCode } from 'vs/base/common/keyCodes'; import { PatternInputWidget, ExcludePatternInputWidget } from 'vs/workbench/parts/search/browser/patternInputWidget'; import { SearchRenderer, SearchDataSource, SearchSorter, SearchAccessibilityProvider, SearchFilter } from 'vs/workbench/parts/search/browser/searchResultsView'; import { SearchWidget, ISearchWidgetOptions } from 'vs/workbench/parts/search/browser/searchWidget'; -import { RefreshAction, CollapseDeepestExpandedLevelAction, ClearSearchResultsAction } from 'vs/workbench/parts/search/browser/searchActions'; +import { RefreshAction, CollapseDeepestExpandedLevelAction, ClearSearchResultsAction, SearchAction } from 'vs/workbench/parts/search/browser/searchActions'; import { IReplaceService } from 'vs/workbench/parts/search/common/replace'; import Severity from 'vs/base/common/severity'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { OpenFolderAction, OpenFileFolderAction } from 'vs/workbench/browser/actions/workspaceActions'; import * as Constants from 'vs/workbench/parts/search/common/constants'; -import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService, ITheme, ICssStyleCollector, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorFindMatchHighlight, diffInserted, diffRemoved, diffInsertedOutline, diffRemovedOutline, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import FileResultsNavigation from 'vs/workbench/parts/files/browser/fileResultsNavigation'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IOutputService } from 'vs/workbench/parts/output/common/output'; import { getOutOfWorkspaceEditorResources } from 'vs/workbench/parts/search/common/search'; import { PreferencesEditor } from 'vs/workbench/parts/preferences/browser/preferencesEditor'; import { SimpleFileResourceDragAndDrop } from 'vs/base/parts/tree/browser/treeDnd'; import { isDiffEditor, isCodeEditor, ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; +import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; export class SearchViewlet extends Viewlet { @@ -82,8 +81,9 @@ export class SearchViewlet extends Viewlet { private fileMatchFocused: IContextKey; private folderMatchFocused: IContextKey; private matchFocused: IContextKey; + private searchSubmitted: boolean; - private actionRegistry: { [key: string]: Action; }; + private actions: SearchAction[] = []; private tree: ITree; private viewletSettings: any; private messages: Builder; @@ -222,7 +222,7 @@ export class SearchViewlet extends Viewlet { let title = nls.localize('searchScope.excludes', "files to exclude"); builder.element('h4', { text: title }); - this.inputPatternExcludes = new ExcludePatternInputWidget(builder.getContainer(), this.contextViewService, this.themeService, this.telemetryService, { + this.inputPatternExcludes = new ExcludePatternInputWidget(builder.getContainer(), this.contextViewService, this.themeService, { ariaLabel: nls.localize('label.excludes', 'Search Exclude Patterns') }); @@ -249,11 +249,11 @@ export class SearchViewlet extends Viewlet { this.createSearchResultsView(builder); - this.actionRegistry = {}; - let actions: Action[] = [new CollapseDeepestExpandedLevelAction(this), new RefreshAction(this), new ClearSearchResultsAction(this)]; - actions.forEach((action) => { - this.actionRegistry[action.id] = action; - }); + this.actions = [ + this.instantiationService.createInstance(RefreshAction, RefreshAction.ID, RefreshAction.LABEL), + this.instantiationService.createInstance(CollapseDeepestExpandedLevelAction, CollapseDeepestExpandedLevelAction.ID, CollapseDeepestExpandedLevelAction.LABEL), + this.instantiationService.createInstance(ClearSearchResultsAction, ClearSearchResultsAction.ID, ClearSearchResultsAction.LABEL) + ]; if (filePatterns !== '' || patternExclusions !== '' || patternIncludes !== '' || queryDetailsExpanded !== '' || !useExcludesAndIgnoreFiles) { this.toggleQueryDetails(true, true, true); @@ -276,6 +276,12 @@ export class SearchViewlet extends Viewlet { return this.inputPatternExcludes; } + private updateActions(): void { + for (const action of this.actions) { + action.update(); + } + } + private createSearchWidget(builder: Builder): void { let contentPattern = this.viewletSettings['query.contentPattern'] || ''; let isRegex = this.viewletSettings['query.regex'] === true; @@ -392,7 +398,7 @@ export class SearchViewlet extends Viewlet { type: 'question' }; - if (this.messageService.confirmSync(confirmation)) { + if (this.messageService.confirm(confirmation)) { this.searchWidget.setReplaceAllActionState(false); this.viewModel.searchResult.replaceAll(progressRunner).then(() => { progressRunner.done(); @@ -491,7 +497,7 @@ export class SearchViewlet extends Viewlet { let dnd = new SimpleFileResourceDragAndDrop(obj => obj instanceof FileMatch ? obj.resource() : void 0); - this.tree = new Tree(div.getHTMLElement(), { + this.tree = new WorkbenchTree(div.getHTMLElement(), { dataSource: dataSource, renderer: renderer, sorter: new SearchSorter(), @@ -501,14 +507,11 @@ export class SearchViewlet extends Viewlet { }, { ariaLabel: nls.localize('treeAriaLabel', "Search Results"), keyboardSupport: false - }); - - this.toUnbind.push(attachListStyler(this.tree, this.themeService)); + }, this.contextKeyService, this.listService, this.themeService); this.tree.setInput(this.viewModel.searchResult); this.toUnbind.push(renderer); - this.toUnbind.push(this.listService.register(this.tree)); const fileResultsNavigation = this._register(new FileResultsNavigation(this.tree)); this._register(debounceEvent(fileResultsNavigation.openFile, (last, event) => event, 75, true)(options => { if (options.element instanceof Match) { @@ -667,15 +670,15 @@ export class SearchViewlet extends Viewlet { public focus(): void { super.focus(); - this.searchWidget.focus(); - } - - public takeEditorText(): void { - const selectedText = this.getSearchTextFromEditor(); - if (selectedText) { - this.searchWidget.searchInput.setValue(selectedText); - this.searchWidget.focus(); + const seedSearchStringFromSelection = this.configurationService.getValue('editor').find.seedSearchStringFromSelection; + if (seedSearchStringFromSelection) { + const selectedText = this.getSearchTextFromEditor(); + if (selectedText) { + this.searchWidget.searchInput.setValue(selectedText); + } } + + this.searchWidget.focus(); } public focusNextInputBox(): void { @@ -777,6 +780,14 @@ export class SearchViewlet extends Viewlet { return this.tree; } + public isSearchSubmitted(): boolean { + return this.searchSubmitted; + } + + public hasSearchResults(): boolean { + return !this.viewModel.searchResult.isEmpty(); + } + public clearSearchResults(): void { this.viewModel.searchResult.clear(); this.showEmptyStage(); @@ -865,11 +876,6 @@ export class SearchViewlet extends Viewlet { } public toggleQueryDetails(moveFocus?: boolean, show?: boolean, skipLayout?: boolean, reverse?: boolean): void { - /* __GDPR__ - "search.toggleQueryDetails" : {} - */ - this.telemetryService.publicLog('search.toggleQueryDetails'); - let cls = 'more'; show = typeof show === 'undefined' ? !dom.hasClass(this.queryDetails, cls) : Boolean(show); this.viewletSettings['query.queryDetailsExpanded'] = show; @@ -1085,9 +1091,8 @@ export class SearchViewlet extends Viewlet { let hasResults = !this.viewModel.searchResult.isEmpty(); - this.actionRegistry['refresh'].enabled = true; - this.actionRegistry['vs.tree.collapse'].enabled = hasResults; - this.actionRegistry['clearSearchResults'].enabled = hasResults; + this.searchSubmitted = true; + this.updateActions(); if (completed && completed.limitHit) { this.searchWidget.searchInput.showMessage({ @@ -1259,10 +1264,7 @@ export class SearchViewlet extends Viewlet { this.updateSearchResultCount(); } if (fileCount > 0) { - // since we have results now, enable some actions - if (!this.actionRegistry['vs.tree.collapse'].enabled) { - this.actionRegistry['vs.tree.collapse'].enabled = true; - } + this.updateActions(); } }, 100); @@ -1322,9 +1324,8 @@ export class SearchViewlet extends Viewlet { private showEmptyStage(): void { // disable 'result'-actions - this.actionRegistry['refresh'].enabled = false; - this.actionRegistry['vs.tree.collapse'].enabled = false; - this.actionRegistry['clearSearchResults'].enabled = false; + this.searchSubmitted = false; + this.updateActions(); // clean up ui // this.replaceService.disposeAllReplacePreviews(); @@ -1340,11 +1341,6 @@ export class SearchViewlet extends Viewlet { return TPromise.as(true); } - /* __GDPR__ - "searchResultChosen" : {} - */ - this.telemetryService.publicLog('searchResultChosen'); - return (this.viewModel.isReplaceActive() && !!this.viewModel.replaceString) ? this.replaceService.openReplacePreview(lineMatch, preserveFocus, sideBySide, pinned) : this.open(lineMatch, preserveFocus, sideBySide, pinned); @@ -1428,11 +1424,7 @@ export class SearchViewlet extends Viewlet { } public getActions(): IAction[] { - return [ - this.actionRegistry['refresh'], - this.actionRegistry['vs.tree.collapse'], - this.actionRegistry['clearSearchResults'] - ]; + return this.actions; } public shutdown(): void { diff --git a/src/vs/workbench/parts/search/common/queryBuilder.ts b/src/vs/workbench/parts/search/common/queryBuilder.ts index 5a31a2de651..9fb9b925183 100644 --- a/src/vs/workbench/parts/search/common/queryBuilder.ts +++ b/src/vs/workbench/parts/search/common/queryBuilder.ts @@ -10,7 +10,6 @@ import * as objects from 'vs/base/common/objects'; import * as collections from 'vs/base/common/collections'; import * as glob from 'vs/base/common/glob'; import * as paths from 'vs/base/common/paths'; -import * as strings from 'vs/base/common/strings'; import uri from 'vs/base/common/uri'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IPatternInfo, IQueryOptions, IFolderQuery, ISearchQuery, QueryType, ISearchConfiguration, getExcludes, pathIncludedInQuery } from 'vs/platform/search/common/search'; @@ -101,8 +100,8 @@ export class QueryBuilder { */ public parseSearchPaths(pattern: string): ISearchPathsResult { const isSearchPath = (segment: string) => { - // A segment is a search path if it is an absolute path or starts with ./ - return paths.isAbsolute(segment) || strings.startsWith(segment, './') || strings.startsWith(segment, '.\\'); + // A segment is a search path if it is an absolute path or starts with ./, ../, .\, or ..\ + return paths.isAbsolute(segment) || /^\.\.?[\/\\]/.test(segment); }; const segments = splitGlobPattern(pattern); @@ -176,7 +175,7 @@ export class QueryBuilder { .reduce((absExpr: glob.IExpression, key: string) => { if (expr[key] && !paths.isAbsolute(key)) { const absPattern = paths.join(root, key); - absExpr[absPattern] = true; + absExpr[absPattern] = expr[key]; } return absExpr; diff --git a/src/vs/workbench/parts/search/common/searchModel.ts b/src/vs/workbench/parts/search/common/searchModel.ts index 508d6cac22a..75071492b86 100644 --- a/src/vs/workbench/parts/search/common/searchModel.ts +++ b/src/vs/workbench/parts/search/common/searchModel.ts @@ -539,14 +539,18 @@ export class SearchResult extends Disposable { this._folderMatches.forEach((folderMatch) => rawPerFolder.set(folderMatch.resource(), [])); allRaw.forEach(rawFileMatch => { let folderMatch = this.getFolderMatch(rawFileMatch.resource); - rawPerFolder.get(folderMatch.resource()).push(rawFileMatch); + if (folderMatch) { + rawPerFolder.get(folderMatch.resource()).push(rawFileMatch); + } }); rawPerFolder.forEach((raw) => { if (!raw.length) { return; } let folderMatch = this.getFolderMatch(raw[0].resource); - folderMatch.add(raw, silent); + if (folderMatch) { + folderMatch.add(raw, silent); + } }); } @@ -607,10 +611,6 @@ export class SearchResult extends Disposable { return this.folderMatches().reduce((prev, match) => prev + match.fileCount(), 0); } - public folderCount(): number { - return this.folderMatches().reduce((prev, match) => prev + (match.fileCount() > 0 ? 1 : 0), 0); - } - public count(): number { return this.matches().reduce((prev, match) => prev + match.count(), 0); } diff --git a/src/vs/workbench/parts/search/electron-browser/search.contribution.ts b/src/vs/workbench/parts/search/electron-browser/search.contribution.ts index 8ab71e6de88..7ec9eebcb5e 100644 --- a/src/vs/workbench/parts/search/electron-browser/search.contribution.ts +++ b/src/vs/workbench/parts/search/electron-browser/search.contribution.ts @@ -14,7 +14,6 @@ import nls = require('vs/nls'); import { TPromise } from 'vs/base/common/winjs.base'; import { IAction, Action } from 'vs/base/common/actions'; import * as objects from 'vs/base/common/objects'; -import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { explorerItemToFileResource } from 'vs/workbench/parts/files/common/files'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; @@ -40,7 +39,6 @@ import { ToggleCaseSensitiveKeybinding, ToggleRegexKeybinding, ToggleWholeWordKe import { ISearchWorkbenchService, SearchWorkbenchService } from 'vs/workbench/parts/search/common/searchModel'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { SearchViewlet } from 'vs/workbench/parts/search/browser/searchViewlet'; -import { ListFocusContext } from 'vs/platform/list/browser/listService'; import { IOutputChannelRegistry, Extensions as OutputExt } from 'vs/workbench/parts/output/common/output'; import { defaultQuickOpenContextKey } from 'vs/workbench/browser/parts/quickopen/quickopen'; import { OpenSymbolHandler } from 'vs/workbench/parts/search/browser/openSymbolHandler'; @@ -49,6 +47,7 @@ import { registerLanguageCommand } from 'vs/editor/browser/editorExtensions'; import { getWorkspaceSymbols } from 'vs/workbench/parts/search/common/search'; import { illegalArgument } from 'vs/base/common/errors'; import { FindInFolderAction, findInFolderCommand, FindInWorkspaceAction } from 'vs/workbench/parts/search/electron-browser/searchActions'; +import { WorkbenchListFocusContextKey } from 'vs/platform/list/browser/listService'; registerSingleton(ISearchWorkbenchService, SearchWorkbenchService); replaceContributions(); @@ -95,7 +94,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ KeybindingsRegistry.registerCommandAndKeybindingRule({ id: Constants.CancelActionId, weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ContextKeyExpr.and(Constants.SearchViewletVisibleKey, ListFocusContext), + when: ContextKeyExpr.and(Constants.SearchViewletVisibleKey, WorkbenchListFocusContextKey), primary: KeyCode.Escape, handler: (accessor, args: any) => { const searchViewlet: SearchViewlet = accessor.get(IViewletService).getActiveViewlet(); @@ -277,18 +276,10 @@ Registry.as(ViewletExtensions.Viewlets).registerViewlet(new Vie const registry = Registry.as(ActionExtensions.WorkbenchActions); const category = nls.localize('search', "Search"); -// "Show Search" and "Find in Files" are redundant, but we will inevitably break keybindings if we remove one -registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.FindInFilesAction, Constants.VIEWLET_ID, searchActions.SHOW_SEARCH_LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_F }, - ContextKeyExpr.and(Constants.SearchViewletVisibleKey.toNegated(), EditorContextKeys.focus.toNegated())), 'View: Show Search', nls.localize('view', "View")); -registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.FindInFilesAction, Constants.FindInFilesActionId, searchActions.FindInFilesAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_F }, - ContextKeyExpr.and(Constants.SearchInputBoxFocusedKey.toNegated(), EditorContextKeys.focus.toNegated())), 'Find in Files', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.ReplaceInFilesAction, searchActions.ReplaceInFilesAction.ID, searchActions.ReplaceInFilesAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_H }, - EditorContextKeys.focus.toNegated()), 'Replace in Files', category); - -registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.FindInFilesWithSelectedTextAction, searchActions.FindInFilesWithSelectedTextAction.ID, searchActions.FindInFilesWithSelectedTextAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_F }, - EditorContextKeys.focus), 'Find in Files With Selected Text', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.ReplaceInFilesWithSelectedTextAction, searchActions.ReplaceInFilesWithSelectedTextAction.ID, searchActions.ReplaceInFilesWithSelectedTextAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_H }, - EditorContextKeys.focus), 'Replace in Files With Selected Text', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.FindInFilesAction, Constants.VIEWLET_ID, nls.localize('showSearchViewlet', "Show Search"), { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_F }, + Constants.SearchViewletVisibleKey.toNegated()), 'View: Show Search', nls.localize('view', "View")); +registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.FindInFilesAction, Constants.FindInFilesActionId, nls.localize('findInFiles', "Find in Files"), { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_F }, + Constants.SearchInputBoxFocusedKey.toNegated()), 'Find in Files', category); KeybindingsRegistry.registerCommandAndKeybindingRule({ id: Constants.FocusActiveEditorCommandId, @@ -301,6 +292,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.FocusNextSearchResultAction, searchActions.FocusNextSearchResultAction.ID, searchActions.FocusNextSearchResultAction.LABEL, { primary: KeyCode.F4 }), 'Focus Next Search Result', category); registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.FocusPreviousSearchResultAction, searchActions.FocusPreviousSearchResultAction.ID, searchActions.FocusPreviousSearchResultAction.LABEL, { primary: KeyMod.Shift | KeyCode.F4 }), 'Focus Previous Search Result', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.ReplaceInFilesAction, searchActions.ReplaceInFilesAction.ID, searchActions.ReplaceInFilesAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_H }), 'Replace in Files', category); + KeybindingsRegistry.registerCommandAndKeybindingRule(objects.assign({ id: Constants.ToggleCaseSensitiveCommandId, weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), diff --git a/src/vs/workbench/parts/search/electron-browser/searchActions.ts b/src/vs/workbench/parts/search/electron-browser/searchActions.ts index 68f6e35f5e9..ad6bc5404c4 100644 --- a/src/vs/workbench/parts/search/electron-browser/searchActions.ts +++ b/src/vs/workbench/parts/search/electron-browser/searchActions.ts @@ -39,9 +39,10 @@ export const findInFolderCommand = (accessor: ServicesAccessor, resource?: URI) const viewletService = accessor.get(IViewletService); if (!URI.isUri(resource)) { - const focused = listService.getFocused() ? listService.getFocused().getFocus() : void 0; - if (focused) { - const file = explorerItemToFileResource(focused); + const lastFocusedList = listService.lastFocusedList; + const focus = lastFocusedList ? lastFocusedList.getFocus() : void 0; + if (focus) { + const file = explorerItemToFileResource(focus); if (file) { resource = file.isDirectory ? file.resource : resources.dirname(file.resource); } diff --git a/src/vs/workbench/parts/search/test/common/queryBuilder.test.ts b/src/vs/workbench/parts/search/test/common/queryBuilder.test.ts index 959618c2176..6b39f0db4ae 100644 --- a/src/vs/workbench/parts/search/test/common/queryBuilder.test.ts +++ b/src/vs/workbench/parts/search/test/common/queryBuilder.test.ts @@ -73,7 +73,10 @@ suite('QueryBuilder', () => { mockConfigService.setUserConfiguration('search', { ...DEFAULT_USER_CONFIG, exclude: { - 'bar/**': true + 'bar/**': true, + 'foo/**': { + 'when': '$(basename).ts' + } } }); @@ -86,7 +89,12 @@ suite('QueryBuilder', () => { contentPattern: PATTERN_INFO, folderQueries: [{ folder: ROOT_1_URI, - excludePattern: { 'bar/**': true } + excludePattern: { + 'bar/**': true, + 'foo/**': { + 'when': '$(basename).ts' + } + } }], type: QueryType.Text }); @@ -126,7 +134,10 @@ suite('QueryBuilder', () => { mockConfigService.setUserConfiguration('search', { ...DEFAULT_USER_CONFIG, exclude: { - 'foo/**/*.js': true + 'foo/**/*.js': true, + 'bar/**': { + 'when': '$(basename).ts' + } } }); @@ -141,7 +152,12 @@ suite('QueryBuilder', () => { folderQueries: [{ folder: getUri(paths.join(ROOT_1, 'foo')) }], - excludePattern: { [paths.join(ROOT_1, 'foo/**/*.js')]: true }, + excludePattern: { + [paths.join(ROOT_1, 'foo/**/*.js')]: true, + [paths.join(ROOT_1, 'bar/**')]: { + 'when': '$(basename).ts' + } + }, type: QueryType.Text }); }); @@ -457,6 +473,14 @@ suite('QueryBuilder', () => { }] } ], + [ + '../', + { + searchPaths: [{ + searchPath: getUri('foo/') + }] + } + ] ]; cases.forEach(testIncludesDataItem); }); @@ -674,7 +698,7 @@ function normalizeExpression(expression: IExpression): IExpression { const normalized = Object.create(null); Object.keys(expression).forEach(key => { - normalized[key.replace(/\\/g, '/')] = true; + normalized[key.replace(/\\/g, '/')] = expression[key]; }); return normalized; diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts b/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts index d9341f13c3e..fa0e7cd8a3a 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts @@ -210,6 +210,7 @@ export class Snippet { const schemaId = 'vscode://schemas/snippets'; const schema: IJSONSchema = { 'id': schemaId, + 'allowComments': true, 'defaultSnippets': [{ 'label': nls.localize('snippetSchema.json.default', "Empty snippet"), 'body': { '${1:snippetName}': { 'prefix': '${2:prefix}', 'body': '${3:snippet}', 'description': '${4:description}' } } diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts index f164e3b2c5a..004b30292b8 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts @@ -226,6 +226,7 @@ class SnippetsService implements ISnippetsService { // not yet loaded return SnippetFile.fromFile(this._getUserSnippetFilepath(languageId), localize('source.snippet', "User Snippet")).then(file => { this._userSnippets.set(languageId, file.data); + bucket.push(...file.data); }, err => { this._userSnippets.set(languageId, null); }); diff --git a/src/vs/workbench/parts/stats/node/workspaceStats.ts b/src/vs/workbench/parts/stats/node/workspaceStats.ts index a937112e7ad..6ea817f0a70 100644 --- a/src/vs/workbench/parts/stats/node/workspaceStats.ts +++ b/src/vs/workbench/parts/stats/node/workspaceStats.ts @@ -210,34 +210,35 @@ export class WorkspaceStats implements IWorkbenchContribution { if (folders && folders.length && this.fileService) { return this.fileService.resolveFiles(folders.map(resource => ({ resource }))).then(results => { const names = ([]).concat(...results.map(result => result.success ? (result.stat.children || []) : [])).map(c => c.name); + const nameSet = names.reduce((s, n) => s.add(n.toLowerCase()), new Set()); - tags['workspace.grunt'] = this.searchArray(names, /^gruntfile\.js$/i); - tags['workspace.gulp'] = this.searchArray(names, /^gulpfile\.js$/i); - tags['workspace.jake'] = this.searchArray(names, /^jakefile\.js$/i); + tags['workspace.grunt'] = nameSet.has('gruntfile.js'); + tags['workspace.gulp'] = nameSet.has('gulpfile.js'); + tags['workspace.jake'] = nameSet.has('jakefile.js'); - tags['workspace.tsconfig'] = this.searchArray(names, /^tsconfig\.json$/i); - tags['workspace.jsconfig'] = this.searchArray(names, /^jsconfig\.json$/i); - tags['workspace.config.xml'] = this.searchArray(names, /^config\.xml/i); - tags['workspace.vsc.extension'] = this.searchArray(names, /^vsc-extension-quickstart\.md/i); + tags['workspace.tsconfig'] = nameSet.has('tsconfig.json'); + tags['workspace.jsconfig'] = nameSet.has('jsconfig.json'); + tags['workspace.config.xml'] = nameSet.has('config.xml'); + tags['workspace.vsc.extension'] = nameSet.has('vsc-extension-quickstart.md'); - tags['workspace.ASP5'] = this.searchArray(names, /^project\.json$/i) && this.searchArray(names, /^.+\.cs$/i); + tags['workspace.ASP5'] = nameSet.has('project.json') && this.searchArray(names, /^.+\.cs$/i); tags['workspace.sln'] = this.searchArray(names, /^.+\.sln$|^.+\.csproj$/i); - tags['workspace.unity'] = this.searchArray(names, /^Assets$/i) && this.searchArray(names, /^Library$/i) && this.searchArray(names, /^ProjectSettings/i); - tags['workspace.npm'] = this.searchArray(names, /^package\.json$|^node_modules$/i); - tags['workspace.bower'] = this.searchArray(names, /^bower\.json$|^bower_components$/i); + tags['workspace.unity'] = nameSet.has('assets') && nameSet.has('library') && nameSet.has('projectsettings'); + tags['workspace.npm'] = nameSet.has('package.json') || nameSet.has('node_modules'); + tags['workspace.bower'] = nameSet.has('bower.json') || nameSet.has('bower_components'); - tags['workspace.yeoman.code.ext'] = this.searchArray(names, /^vsc-extension-quickstart\.md$/i); + tags['workspace.yeoman.code.ext'] = nameSet.has('vsc-extension-quickstart.md'); - let mainActivity = this.searchArray(names, /^MainActivity\.cs$/i) || this.searchArray(names, /^MainActivity\.fs$/i); - let appDelegate = this.searchArray(names, /^AppDelegate\.cs$/i) || this.searchArray(names, /^AppDelegate\.fs$/i); - let androidManifest = this.searchArray(names, /^AndroidManifest\.xml$/i); + let mainActivity = nameSet.has('mainactivity.cs') || nameSet.has('mainactivity.fs'); + let appDelegate = nameSet.has('appdelegate.cs') || nameSet.has('appdelegate.fs'); + let androidManifest = nameSet.has('androidmanifest.xml'); - let platforms = this.searchArray(names, /^platforms$/i); - let plugins = this.searchArray(names, /^plugins$/i); - let www = this.searchArray(names, /^www$/i); - let properties = this.searchArray(names, /^Properties/i); - let resources = this.searchArray(names, /^Resources/i); - let jni = this.searchArray(names, /^JNI/i); + let platforms = nameSet.has('platforms'); + let plugins = nameSet.has('plugins'); + let www = nameSet.has('www'); + let properties = nameSet.has('properties'); + let resources = nameSet.has('resources'); + let jni = nameSet.has('jni'); if (tags['workspace.config.xml'] && !tags['workspace.language.cs'] && !tags['workspace.language.vb'] && !tags['workspace.language.aspx']) { @@ -260,8 +261,8 @@ export class WorkspaceStats implements IWorkbenchContribution { tags['workspace.android.cpp'] = true; } - tags['workspace.reactNative'] = this.searchArray(names, /^android$/i) && this.searchArray(names, /^ios$/i) && - this.searchArray(names, /^index\.android\.js$/i) && this.searchArray(names, /^index\.ios\.js$/i); + tags['workspace.reactNative'] = nameSet.has('android') && nameSet.has('ios') && + nameSet.has('index.android.js') && nameSet.has('index.ios.js'); return tags; }, error => { onUnexpectedError(error); return null; }); diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 55564f54c46..d3bf4705c50 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -1666,7 +1666,7 @@ class TaskService implements ITaskService { if (this._taskSystem instanceof TerminalTaskSystem) { return false; } - if (this._taskSystem.canAutoTerminate() || this.messageService.confirmSync({ + if (this._taskSystem.canAutoTerminate() || this.messageService.confirm({ message: nls.localize('TaskSystem.runningTask', 'There is a task running. Do you want to terminate it?'), primaryButton: nls.localize({ key: 'TaskSystem.terminateTask', comment: ['&& denotes a mnemonic'] }, "&&Terminate Task"), type: 'question' @@ -1687,7 +1687,7 @@ class TaskService implements ITaskService { this.disposeTaskSystemListeners(); return false; // no veto } else if (code && code === TerminateResponseCode.ProcessNotFound) { - return !this.messageService.confirmSync({ + return !this.messageService.confirm({ message: nls.localize('TaskSystem.noProcess', 'The launched task doesn\'t exist anymore. If the task spawned background processes exiting VS Code might result in orphaned processes. To avoid this start the last background process with a wait flag.'), primaryButton: nls.localize({ key: 'TaskSystem.exitAnyways', comment: ['&& denotes a mnemonic'] }, "&&Exit Anyways"), type: 'info' diff --git a/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.ts b/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.ts index 5ae1d3e6fb0..14553747832 100644 --- a/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.ts +++ b/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.ts @@ -88,7 +88,7 @@ export class TerminalPickerHandler extends QuickOpenHandler { const normalizedSearchValueLowercase = stripWildcards(searchValue).toLowerCase(); const terminalEntries: QuickOpenEntry[] = this.getTerminals(); - terminalEntries.push(new CreateTerminal(nls.localize("'workbench.action.terminal.newplus", "$(plus) Create New Integrated Terminal"), this.commandService)); + terminalEntries.push(new CreateTerminal(nls.localize("workbench.action.terminal.newplus", "$(plus) Create New Integrated Terminal"), this.commandService)); const entries = terminalEntries.filter(e => { if (!searchValue) { diff --git a/src/vs/workbench/parts/terminal/common/terminal.ts b/src/vs/workbench/parts/terminal/common/terminal.ts index 68add6effcc..850f7921cd8 100644 --- a/src/vs/workbench/parts/terminal/common/terminal.ts +++ b/src/vs/workbench/parts/terminal/common/terminal.ts @@ -349,16 +349,6 @@ export interface ITerminalInstance { */ setVisible(visible: boolean): void; - /** - * Attach a listener to the data stream from the terminal's pty process. - * - * @param listener The listener function which takes the processes' data stream (including - * ANSI escape sequences). - * - * @deprecated onLineData will replace this. - */ - onData(listener: (data: string) => void): IDisposable; - /** * Attach a listener to listen for new lines added to this terminal instance. * diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/scrollbar.css b/src/vs/workbench/parts/terminal/electron-browser/media/scrollbar.css index 0bff305aae4..70af76ab868 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/scrollbar.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/scrollbar.css @@ -26,6 +26,7 @@ .monaco-workbench .panel.integrated-terminal .xterm:focus .xterm-viewport, .monaco-workbench .panel.integrated-terminal .xterm:hover .xterm-viewport { transition: opacity 100ms linear; + cursor: default; } .monaco-workbench .panel.integrated-terminal .xterm .xterm-viewport::-webkit-scrollbar-thumb:hover { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 46cc64e1c2f..f5886a2d038 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -823,22 +823,6 @@ export class TerminalInstance implements ITerminalInstance { return env; } - public onData(listener: (data: string) => void): lifecycle.IDisposable { - let callback = (message) => { - if (message.type === 'data') { - listener(message.content); - } - }; - this._process.on('message', callback); - return { - dispose: () => { - if (this._process) { - this._process.removeListener('message', callback); - } - } - }; - } - public onLineData(listener: (lineData: string) => void): lifecycle.IDisposable { this._onLineDataListeners.push(listener); return { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 2dd16ba5775..626397cd57b 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -26,6 +26,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; import { PANEL_BACKGROUND } from 'vs/workbench/common/theme'; import { TERMINAL_BACKGROUND_COLOR } from 'vs/workbench/parts/terminal/electron-browser/terminalColorRegistry'; +import { DataTransfers } from 'vs/base/browser/dnd'; export class TerminalPanel extends Panel { @@ -256,7 +257,7 @@ export class TerminalPanel extends Panel { } // Check if the file was dragged from the tree explorer - let uri = e.dataTransfer.getData('URL'); + let uri = e.dataTransfer.getData(DataTransfers.URL); if (uri) { uri = URI.parse(uri).path; } else if (e.dataTransfer.files.length > 0) { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts index d498d16a71f..871138e90c6 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts @@ -180,6 +180,7 @@ export class TerminalService extends AbstractTerminalService implements ITermina `${process.env['ProgramW6432']}\\Git\\usr\\bin\\bash.exe`, `${process.env['ProgramFiles']}\\Git\\bin\\bash.exe`, `${process.env['ProgramFiles']}\\Git\\usr\\bin\\bash.exe`, + `${process.env['LocalAppData']}\\Programs\\Git\\bin\\bash.exe`, ] }; const promises: TPromise<[string, string]>[] = []; @@ -220,7 +221,7 @@ export class TerminalService extends AbstractTerminalService implements ITermina message = nls.localize('terminalService.terminalCloseConfirmationPlural', "There are {0} active terminal sessions, do you want to kill them?", this.terminalInstances.length); } - return !this._messageService.confirmSync({ + return !this._messageService.confirm({ message, type: 'warning', }); diff --git a/src/vs/workbench/parts/terminal/node/terminalProcess.ts b/src/vs/workbench/parts/terminal/node/terminalProcess.ts index 1f06c0d80e8..c3ad10ecc9e 100644 --- a/src/vs/workbench/parts/terminal/node/terminalProcess.ts +++ b/src/vs/workbench/parts/terminal/node/terminalProcess.ts @@ -113,7 +113,8 @@ function cleanEnv() { 'PTYSHELL', 'PTYCOLS', 'PTYROWS', - 'PTYSHELLCMDLINE' + 'PTYSHELLCMDLINE', + 'VSCODE_LOGS' ]; keys.forEach(function (key) { if (process.env[key]) { diff --git a/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts b/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts index ef5d0a5455f..bcc8babb008 100644 --- a/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts +++ b/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts @@ -50,7 +50,7 @@ export class SelectColorThemeAction extends Action { const picks: IPickOpenEntry[] = [].concat( toEntries(themes.filter(t => t.type === LIGHT), localize('themes.category.light', "light themes")), toEntries(themes.filter(t => t.type === DARK), localize('themes.category.dark', "dark themes"), true), - toEntries(themes.filter(t => t.type === HIGH_CONTRAST), localize('themes.category.hc', "high constrast themes"), true), + toEntries(themes.filter(t => t.type === HIGH_CONTRAST), localize('themes.category.hc', "high contrast themes"), true), configurationEntries(this.extensionGalleryService, this.viewletService, 'category:themes', localize('installColorThemes', "Install Additional Color Themes...")) ); @@ -198,7 +198,7 @@ class GenerateColorThemeAction extends Action { colors: resultingColors, tokenColors: theme.tokenColors }, null, '\t'); - return this.editorService.openEditor({ contents, language: 'json' }); + return this.editorService.openEditor({ contents, language: 'jsonc' }); } } diff --git a/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.ts b/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.ts index 08d6000f9b3..f338e06acd7 100644 --- a/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.ts +++ b/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.ts @@ -15,7 +15,6 @@ import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/ import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IPreferencesService } from 'vs/workbench/parts/preferences/common/preferences'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; @@ -33,7 +32,6 @@ class UnsupportedWorkspaceSettingsContribution implements IWorkbenchContribution @IWorkspaceConfigurationService private workspaceConfigurationService: IWorkspaceConfigurationService, @IPreferencesService private preferencesService: IPreferencesService, @IMessageService private messageService: IMessageService, - @ITelemetryService private telemetryService: ITelemetryService, @IStorageService private storageService: IStorageService ) { lifecycleService.onShutdown(this.dispose, this); @@ -69,39 +67,23 @@ class UnsupportedWorkspaceSettingsContribution implements IWorkbenchContribution const message = nls.localize('unsupportedWorkspaceSettings', 'This Workspace contains settings that can only be set in User Settings. ({0})', unsupportedKeys.join(', ')); const openWorkspaceSettings = new Action('unsupportedWorkspaceSettings.openWorkspaceSettings', nls.localize('openWorkspaceSettings', 'Open Workspace Settings'), '', true, () => { - /* __GDPR__ - "workspace.settings.unsupported.review" : {} - */ - this.telemetryService.publicLog('workspace.settings.unsupported.review'); this.rememberWarningWasShown(); return this.preferencesService.openWorkspaceSettings(); }); const openDocumentation = new Action('unsupportedWorkspaceSettings.openDocumentation', nls.localize('openDocumentation', 'Learn More'), '', true, () => { - /* __GDPR__ - "workspace.settings.unsupported.documentation" : {} - */ - this.telemetryService.publicLog('workspace.settings.unsupported.documentation'); this.rememberWarningWasShown(); window.open('https://go.microsoft.com/fwlink/?linkid=839878'); // Don't change link. return TPromise.as(true); }); const close = new Action('unsupportedWorkspaceSettings.Ignore', nls.localize('ignore', 'Ignore'), '', true, () => { - /* __GDPR__ - "workspace.settings.unsupported.ignore" : {} - */ - this.telemetryService.publicLog('workspace.settings.unsupported.ignore'); this.rememberWarningWasShown(); return TPromise.as(true); }); const actions = [openWorkspaceSettings, openDocumentation, close]; this.messageService.show(Severity.Warning, { message, actions }); - /* __GDPR__ - "workspace.settings.unsupported.warning" : {} - */ - this.telemetryService.publicLog('workspace.settings.unsupported.warning'); } } diff --git a/src/vs/workbench/parts/update/electron-browser/media/code-icon.svg b/src/vs/workbench/parts/update/electron-browser/media/code-icon.svg new file mode 100644 index 00000000000..cc61f81ea5a --- /dev/null +++ b/src/vs/workbench/parts/update/electron-browser/media/code-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/update/electron-browser/media/update.contribution.css b/src/vs/workbench/parts/update/electron-browser/media/update.contribution.css index a12923fce44..4e602f932a2 100644 --- a/src/vs/workbench/parts/update/electron-browser/media/update.contribution.css +++ b/src/vs/workbench/parts/update/electron-browser/media/update.contribution.css @@ -6,4 +6,10 @@ .update-activity { -webkit-mask: url('update.svg') no-repeat 50% 50%; -webkit-mask-size: 22px; +} + +/* TODO@Ben this is a hack to overwrite the icon for release notes eitor */ +.file-icons-enabled .show-file-icons .release-notes-ext-file-icon.file-icon::before { + content: ' '; + background-image: url('code-icon.svg'); } \ No newline at end of file diff --git a/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts b/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts index 7138a6e6e92..27632cdde54 100644 --- a/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts +++ b/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts @@ -23,12 +23,13 @@ import { WebviewEditor } from 'vs/workbench/parts/html/browser/webviewEditor'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { IMode } from 'vs/editor/common/modes'; +import { IMode, TokenizationRegistry } from 'vs/editor/common/modes'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { onUnexpectedError } from 'vs/base/common/errors'; import { addGAParameters } from 'vs/platform/telemetry/node/telemetryNodeUtils'; +import { generateTokensCSSForColorMap } from 'vs/editor/common/modes/supports/tokenization'; -function renderBody(body: string): string { +function renderBody(body: string, css: string): string { return ` @@ -36,6 +37,7 @@ function renderBody(body: string): string { + ${body} `; @@ -95,7 +97,9 @@ export class ReleaseNotesEditor extends WebviewEditor { return `${tokenizeToString(code, modeId)}`; }; - const body = renderBody(marked(text, { renderer })); + const colorMap = TokenizationRegistry.getColorMap(); + const css = generateTokensCSSForColorMap(colorMap); + const body = renderBody(marked(text, { renderer }), css); this._webview = new WebView(this.content, this.partService.getContainer(Parts.EDITOR_PART), this._contextViewService, this.contextKey, this.findInputFocusContextKey); if (this.input && this.input instanceof ReleaseNotesInput) { const state = this.loadViewState(this.input.version); diff --git a/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts b/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts index 83f6636b877..65be6da2398 100644 --- a/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts +++ b/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts @@ -8,6 +8,7 @@ import { localize } from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; import { EditorInput } from 'vs/workbench/common/editor'; +import URI from 'vs/base/common/uri'; export class ReleaseNotesInput extends EditorInput { @@ -20,6 +21,10 @@ export class ReleaseNotesInput extends EditorInput { super(); } + getResource(): URI { + return URI.from({ scheme: 'release-notes', path: `${this._version}.release-notes` }); + } + getTypeId(): string { return ReleaseNotesInput.ID; } diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index 887119d6283..82166e122cd 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -202,12 +202,13 @@ export class ProductContribution implements IWorkbenchContribution { @IStorageService storageService: IStorageService, @IInstantiationService instantiationService: IInstantiationService, @IMessageService messageService: IMessageService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService + @IWorkbenchEditorService editorService: IWorkbenchEditorService, + @IEnvironmentService environmentService: IEnvironmentService ) { const lastVersion = storageService.get(ProductContribution.KEY, StorageScope.GLOBAL, ''); // was there an update? if so, open release notes - if (product.releaseNotesUrl && lastVersion && pkg.version !== lastVersion) { + if (!environmentService.skipReleaseNotes && product.releaseNotesUrl && lastVersion && pkg.version !== lastVersion) { instantiationService.invokeFunction(loadReleaseNotes, pkg.version).then( text => editorService.openEditor(instantiationService.createInstance(ReleaseNotesInput, pkg.version, text), { pinned: true }), () => { diff --git a/src/vs/workbench/parts/watermark/electron-browser/watermark.ts b/src/vs/workbench/parts/watermark/electron-browser/watermark.ts index 59786dcadda..e750345e23c 100644 --- a/src/vs/workbench/parts/watermark/electron-browser/watermark.ts +++ b/src/vs/workbench/parts/watermark/electron-browser/watermark.ts @@ -21,7 +21,7 @@ import { OpenRecentAction } from 'vs/workbench/electron-browser/actions'; import { GlobalNewUntitledFileAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; import { OpenFolderAction, OpenFileFolderAction, OpenFileAction } from 'vs/workbench/browser/actions/workspaceActions'; import { ShowAllCommandsAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; -import { Parts, IPartService } from 'vs/workbench/services/part/common/partService'; +import { Parts, IPartService, Dimension } from 'vs/workbench/services/part/common/partService'; import { StartAction } from 'vs/workbench/parts/debug/browser/debugActions'; import { FindInFilesActionId } from 'vs/workbench/parts/search/common/constants'; import { ToggleTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; @@ -176,15 +176,12 @@ export class WatermarkContribution implements IWorkbenchContribution { }); }); }; - const layout = () => { - const { height } = container.getBoundingClientRect(); - container.classList[height <= 478 ? 'add' : 'remove']('max-height-478px'); - }; update(); this.watermark.build(container.firstElementChild as HTMLElement, 0); - layout(); this.toDispose.push(this.keybindingService.onDidUpdateKeybindings(update)); - this.toDispose.push(this.partService.onEditorLayout(layout)); + this.toDispose.push(this.partService.onEditorLayout(({ height }: Dimension) => { + container.classList[height <= 478 ? 'add' : 'remove']('max-height-478px'); + })); } private destroy(): void { diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 7e00386d74b..5be0939632b 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -38,6 +38,7 @@ import { IExtensionsWorkbenchService } from 'vs/workbench/parts/extensions/commo import { IStorageService } from 'vs/platform/storage/common/storage'; import { IWorkspaceIdentifier, getWorkspaceLabel, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; import { IEditorInputFactory, EditorInput } from 'vs/workbench/common/editor'; +import { getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/node/extensionManagementUtil'; used(); @@ -341,7 +342,7 @@ class WelcomePage { this.updateInstalledExtensions(container, installedExtensions); this.disposables.push(this.instantiationService.invokeFunction(onExtensionChanged)(ids => { for (const id of ids) { - if (container.querySelector(`.installExtension[data-extension="${id}"], .enabledExtension[data-extension="${id}"]`)) { + if (container.querySelector(`.installExtension[data-extension="${stripVersion(id.id)}"], .enabledExtension[data-extension="${stripVersion(id.id)}"]`)) { const installedExtensions = this.instantiationService.invokeFunction(getInstalledExtensions); this.updateInstalledExtensions(container, installedExtensions); break; @@ -398,7 +399,7 @@ class WelcomePage { extensionId: extensionSuggestion.id, }); this.instantiationService.invokeFunction(getInstalledExtensions).then(extensions => { - const installedExtension = arrays.first(extensions, extension => extension.identifier.id === extensionSuggestion.id); + const installedExtension = arrays.first(extensions, extension => stripVersion(extension.identifier.id) === extensionSuggestion.id); if (installedExtension && installedExtension.globallyEnabled) { /* __GDPR__FRAGMENT__ "WelcomePageInstalled-1" : { @@ -415,18 +416,18 @@ class WelcomePage { this.messageService.show(Severity.Info, strings.alreadyInstalled.replace('{0}', extensionSuggestion.name)); return; } - const foundAndInstalled = installedExtension ? TPromise.as(true) : this.extensionGalleryService.query({ names: [extensionSuggestion.id], source: telemetryFrom }) + const foundAndInstalled = installedExtension ? TPromise.as(installedExtension.identifier) : this.extensionGalleryService.query({ names: [extensionSuggestion.id], source: telemetryFrom }) .then(result => { const [extension] = result.firstPage; if (!extension) { - return false; + return null; } return this.extensionManagementService.installFromGallery(extension) .then(() => { // TODO: Do this as part of the install to avoid multiple events. - return this.extensionEnablementService.setEnablement({ id: extensionSuggestion.id }, EnablementState.Disabled); + return this.extensionEnablementService.setEnablement(extension.identifier, EnablementState.Disabled); }).then(() => { - return true; + return extension.identifier; }); }); this.messageService.show(Severity.Info, { @@ -444,10 +445,10 @@ class WelcomePage { .map(extension => { return this.extensionEnablementService.setEnablement(extension.identifier, EnablementState.Disabled); }) : []).then(() => { - return foundAndInstalled.then(found => { + return foundAndInstalled.then(foundExtension => { messageDelay.cancel(); - if (found) { - return this.extensionEnablementService.setEnablement({ id: extensionSuggestion.id }, EnablementState.Enabled) + if (foundExtension) { + return this.extensionEnablementService.setEnablement(foundExtension, EnablementState.Enabled) .then(() => { /* __GDPR__FRAGMENT__ "WelcomePageInstalled-2" : { @@ -558,7 +559,7 @@ class WelcomePage { elements[i].classList.remove('installed'); } extensions.filter(ext => ext.globallyEnabled) - .map(ext => ext.identifier) + .map(ext => stripVersion(ext.identifier.id)) .forEach(id => { const install = container.querySelectorAll(`.installExtension[data-extension="${id}"]`); for (let i = 0; i < install.length; i++) { @@ -577,6 +578,10 @@ class WelcomePage { } } +function stripVersion(id: string): string { + return getIdAndVersionFromLocalExtensionId(id).id; +} + export class WelcomeInputFactory implements IEditorInputFactory { diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 1e35f356649..422b30d7333 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -172,19 +172,7 @@ export class WalkThroughPart extends BaseEditor { if (node instanceof HTMLAnchorElement && node.href) { let baseElement = window.document.getElementsByTagName('base')[0] || window.location; if (baseElement && node.href.indexOf(baseElement.href) >= 0 && node.hash) { - let scrollTarget = this.content.querySelector(node.hash); - /* __GDPR__ - "revealInDocument" : { - "hash" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "broken": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('revealInDocument', { - hash: node.hash, - broken: !scrollTarget, - from: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined - }); + const scrollTarget = this.content.querySelector(node.hash); const innerContent = this.content.firstElementChild; if (scrollTarget && innerContent) { const targetTop = scrollTarget.getBoundingClientRect().top - 20; @@ -210,18 +198,6 @@ export class WalkThroughPart extends BaseEditor { } private open(uri: URI) { - if (uri.scheme === 'http' || uri.scheme === 'https') { - /* __GDPR__ - "openExternal" : { - "uri" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('openExternal', { - uri: uri.toString(true), - from: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined - }); - } if (uri.scheme === 'command' && uri.path === 'git.clone' && !CommandsRegistry.getCommand('git.clone')) { this.messageService.show(Severity.Info, localize('walkThrough.gitNotFound', "It looks like Git is not installed on your system.")); return; diff --git a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts index a534a77b13b..81b269fa5e6 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts @@ -13,8 +13,6 @@ import { telemetryURIDescriptor } from 'vs/platform/telemetry/common/telemetryUt import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { marked } from 'vs/base/common/marked/marked'; import { Schemas } from 'vs/base/common/network'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; import { IHashService } from 'vs/workbench/services/hash/common/hashService'; export class WalkThroughModel extends EditorModel { @@ -56,19 +54,15 @@ export class WalkThroughInput extends EditorInput { private promise: TPromise; - private resolveTime: number; private maxTopScroll = 0; private maxBottomScroll = 0; constructor( private options: WalkThroughInputOptions, - @ITelemetryService private telemetryService: ITelemetryService, - @ILifecycleService lifecycleService: ILifecycleService, @ITextModelService private textModelResolverService: ITextModelService, @IHashService private hashService: IHashService ) { super(); - this.disposables.push(lifecycleService.onShutdown(e => this.disposeTelemetry(e))); } getResource(): URI { @@ -110,7 +104,6 @@ export class WalkThroughInput extends EditorInput { resolve(refresh?: boolean): TPromise { if (!this.promise) { - this.resolveTelemetry(); this.promise = this.textModelResolverService.createModelReference(this.options.resource) .then(ref => { if (strings.endsWith(this.getResource().path, '.html')) { @@ -160,8 +153,6 @@ export class WalkThroughInput extends EditorInput { this.promise = null; } - this.disposeTelemetry(); - super.dispose(); } @@ -169,40 +160,4 @@ export class WalkThroughInput extends EditorInput { this.maxTopScroll = Math.max(this.maxTopScroll, topScroll); this.maxBottomScroll = Math.max(this.maxBottomScroll, bottomScroll); } - - private resolveTelemetry() { - if (!this.resolveTime) { - this.resolveTime = Date.now(); - /* __GDPR__ - "resolvingInput" : { - "target" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('resolvingInput', { - target: this.getTelemetryFrom(), - }); - } - } - - private disposeTelemetry(reason?: ShutdownReason) { - if (this.resolveTime) { - /* __GDPR__ - "disposingInput" : { - "target" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "timeSpent": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "reason": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "maxTopScroll": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "maxBottomScroll": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('disposingInput', { - target: this.getTelemetryFrom(), - timeSpent: (Date.now() - this.resolveTime) / 60, - reason: reason ? ShutdownReason[reason] : 'DISPOSE', - maxTopScroll: this.maxTopScroll, - maxBottomScroll: this.maxBottomScroll, - }); - this.resolveTime = null; - } - } } diff --git a/src/vs/workbench/services/backup/common/backup.ts b/src/vs/workbench/services/backup/common/backup.ts index c43688b8b48..25c3948dced 100644 --- a/src/vs/workbench/services/backup/common/backup.ts +++ b/src/vs/workbench/services/backup/common/backup.ts @@ -40,6 +40,14 @@ export interface IBackupFileService { */ loadBackupResource(resource: Uri): TPromise; + /** + * Given a resource, returns the associated backup resource. + * + * @param resource The resource to get the backup resource for. + * @return The backup resource. + */ + toBackupResource(resource: Uri): Uri; + /** * Backs up a resource. * diff --git a/src/vs/workbench/services/backup/node/backupFileService.ts b/src/vs/workbench/services/backup/node/backupFileService.ts index af5ca6bda2b..1a00d797b91 100644 --- a/src/vs/workbench/services/backup/node/backupFileService.ts +++ b/src/vs/workbench/services/backup/node/backupFileService.ts @@ -135,7 +135,7 @@ export class BackupFileService implements IBackupFileService { public loadBackupResource(resource: Uri): TPromise { return this.ready.then(model => { - const backupResource = this.getBackupResource(resource); + const backupResource = this.toBackupResource(resource); if (!backupResource) { return void 0; } @@ -155,7 +155,7 @@ export class BackupFileService implements IBackupFileService { } return this.ready.then(model => { - const backupResource = this.getBackupResource(resource); + const backupResource = this.toBackupResource(resource); if (!backupResource) { return void 0; } @@ -175,7 +175,7 @@ export class BackupFileService implements IBackupFileService { public discardResourceBackup(resource: Uri): TPromise { return this.ready.then(model => { - const backupResource = this.getBackupResource(resource); + const backupResource = this.toBackupResource(resource); if (!backupResource) { return void 0; } @@ -218,7 +218,7 @@ export class BackupFileService implements IBackupFileService { return textSource.lines.slice(1).join(textSource.EOL); // The first line of a backup text file is the file name } - protected getBackupResource(resource: Uri): Uri { + public toBackupResource(resource: Uri): Uri { if (!this.backupEnabled) { return null; } diff --git a/src/vs/workbench/services/backup/test/node/backupFileService.test.ts b/src/vs/workbench/services/backup/test/node/backupFileService.test.ts index 5309017f4ea..66be679cdde 100644 --- a/src/vs/workbench/services/backup/test/node/backupFileService.test.ts +++ b/src/vs/workbench/services/backup/test/node/backupFileService.test.ts @@ -41,8 +41,8 @@ class TestBackupFileService extends BackupFileService { super(workspaceBackupPath, fileService); } - public getBackupResource(resource: Uri): Uri { - return super.getBackupResource(resource); + public toBackupResource(resource: Uri): Uri { + return super.toBackupResource(resource); } } @@ -73,7 +73,7 @@ suite('BackupFileService', () => { const workspaceHash = crypto.createHash('md5').update(workspaceResource.fsPath).digest('hex'); const filePathHash = crypto.createHash('md5').update(backupResource.fsPath).digest('hex'); const expectedPath = Uri.file(path.join(backupHome, workspaceHash, 'file', filePathHash)).fsPath; - assert.equal(service.getBackupResource(backupResource).fsPath, expectedPath); + assert.equal(service.toBackupResource(backupResource).fsPath, expectedPath); }); test('should get the correct backup path for untitled files', () => { @@ -82,7 +82,7 @@ suite('BackupFileService', () => { const workspaceHash = crypto.createHash('md5').update(workspaceResource.fsPath).digest('hex'); const filePathHash = crypto.createHash('md5').update(backupResource.fsPath).digest('hex'); const expectedPath = Uri.file(path.join(backupHome, workspaceHash, 'untitled', filePathHash)).fsPath; - assert.equal(service.getBackupResource(backupResource).fsPath, expectedPath); + assert.equal(service.toBackupResource(backupResource).fsPath, expectedPath); }); }); diff --git a/src/vs/workbench/services/configuration/common/configurationExtensionPoint.ts b/src/vs/workbench/services/configuration/common/configurationExtensionPoint.ts index bc35c4cffb1..bdd9c346c22 100644 --- a/src/vs/workbench/services/configuration/common/configurationExtensionPoint.ts +++ b/src/vs/workbench/services/configuration/common/configurationExtensionPoint.ts @@ -149,6 +149,7 @@ function validateProperties(configuration: IConfigurationNode, extension: IExten const jsonRegistry = Registry.as(JSONExtensions.JSONContribution); jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', { + allowComments: true, default: { folders: [ { diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 79e24da0d55..983bf2b902f 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -24,6 +24,7 @@ import { JSONEditingService } from 'vs/workbench/services/configuration/node/jso import { WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; import { relative } from 'path'; +import { equals } from 'vs/base/common/objects'; // node.hs helper functions @@ -189,10 +190,9 @@ export class FolderConfiguration extends Disposable { } reprocess(): ConfigurationModel { - const oldKeys = this.getUnsupportedKeys(); + const oldContents = this._folderSettingsModelParser.folderSettingsModel.contents; this._folderSettingsModelParser.reprocess(); - const newKeys = this.getUnsupportedKeys(); - if (this.hasKeysChanged(oldKeys, newKeys)) { + if (!equals(oldContents, this._folderSettingsModelParser.folderSettingsModel.contents)) { this.consolidate(); } return this._cache; @@ -202,18 +202,6 @@ export class FolderConfiguration extends Disposable { return this._folderSettingsModelParser.folderSettingsModel.unsupportedKeys; } - private hasKeysChanged(oldKeys: string[], newKeys: string[]): boolean { - if (oldKeys.length !== newKeys.length) { - return true; - } - for (const key of oldKeys) { - if (newKeys.indexOf(key) === -1) { - return true; - } - } - return false; - } - private consolidate(): void { this._cache = this._folderSettingsModelParser.folderSettingsModel.merge(...this._standAloneConfigurations); } diff --git a/src/vs/workbench/services/configuration/node/configurationEditingService.ts b/src/vs/workbench/services/configuration/node/configurationEditingService.ts index 3c634052370..7d04f269ea9 100644 --- a/src/vs/workbench/services/configuration/node/configurationEditingService.ts +++ b/src/vs/workbench/services/configuration/node/configurationEditingService.ts @@ -156,7 +156,7 @@ export class ConfigurationEditingService { private writeToBuffer(model: editorCommon.IModel, operation: IConfigurationEditOperation, save: boolean): TPromise { const edit = this.getEdits(model, operation)[0]; - if (this.applyEditsToBuffer(edit, model) && save) { + if (edit && this.applyEditsToBuffer(edit, model) && save) { return this.textFileService.save(operation.resource, { skipSaveParticipants: true /* programmatic change */ }); } return TPromise.as(null); diff --git a/src/vs/workbench/services/configuration/node/configurationService.ts b/src/vs/workbench/services/configuration/node/configurationService.ts index dc36a6be722..d5c3af13b8b 100644 --- a/src/vs/workbench/services/configuration/node/configurationService.ts +++ b/src/vs/workbench/services/configuration/node/configurationService.ts @@ -25,7 +25,7 @@ import { IConfigurationChangeEvent, ConfigurationTarget, IConfigurationOverrides import { Configuration, WorkspaceConfigurationChangeEvent, AllKeysConfigurationChangeEvent } from 'vs/workbench/services/configuration/common/configurationModels'; import { IWorkspaceConfigurationService, FOLDER_CONFIG_FOLDER_NAME, defaultSettingsSchemaId, userSettingsSchemaId, workspaceSettingsSchemaId, folderSettingsSchemaId } from 'vs/workbench/services/configuration/common/configuration'; import { Registry } from 'vs/platform/registry/common/platform'; -import { IConfigurationNode, IConfigurationRegistry, Extensions, settingsSchema, resourceSettingsSchema } from 'vs/platform/configuration/common/configurationRegistry'; +import { IConfigurationNode, IConfigurationRegistry, Extensions, settingsSchema, resourceSettingsSchema, IConfigurationPropertySchema } from 'vs/platform/configuration/common/configurationRegistry'; import { createHash } from 'crypto'; import { getWorkspaceLabel, IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier, isWorkspaceIdentifier, IStoredWorkspaceFolder, isStoredWorkspaceFolder, IWorkspaceFolderCreationData } from 'vs/platform/workspaces/common/workspaces'; import { IWindowConfiguration } from 'vs/platform/windows/common/windows'; @@ -717,28 +717,33 @@ export class DefaultConfigurationExportHelper { } private getConfigModel(): IConfigurationExport { - const configurations = Registry.as(Extensions.Configuration).getConfigurations().slice(); + const configRegistry = Registry.as(Extensions.Configuration); + const configurations = configRegistry.getConfigurations().slice(); const settings: IExportedConfigurationNode[] = []; + + const processProperty = (name: string, prop: IConfigurationPropertySchema) => { + const propDetails: IExportedConfigurationNode = { + name, + description: prop.description, + default: prop.default, + type: prop.type + }; + + if (prop.enum) { + propDetails.enum = prop.enum; + } + + if (prop.enumDescriptions) { + propDetails.enumDescriptions = prop.enumDescriptions; + } + + settings.push(propDetails); + }; + const processConfig = (config: IConfigurationNode) => { if (config.properties) { for (let name in config.properties) { - const prop = config.properties[name]; - const propDetails: IExportedConfigurationNode = { - name, - description: prop.description, - default: prop.default, - type: prop.type - }; - - if (prop.enum) { - propDetails.enum = prop.enum; - } - - if (prop.enumDescriptions) { - propDetails.enumDescriptions = prop.enumDescriptions; - } - - settings.push(propDetails); + processProperty(name, config.properties[name]); } } @@ -749,6 +754,11 @@ export class DefaultConfigurationExportHelper { configurations.forEach(processConfig); + const excludedProps = configRegistry.getExcludedConfigurationProperties(); + for (let name in excludedProps) { + processProperty(name, excludedProps[name]); + } + const result: IConfigurationExport = { settings: settings.sort((a, b) => a.name.localeCompare(b.name)), buildTime: Date.now(), diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index f18818ca54c..f0d58534de4 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -205,6 +205,28 @@ suite('ConfigurationEditingService', () => { }); }); + test('remove an existing setting - existing file', () => { + fs.writeFileSync(globalSettingsFile, '{ "my.super.setting": "my.super.value", "configurationEditing.service.testSetting": "value" }'); + return testObject.writeConfiguration(ConfigurationTarget.USER, { key: 'configurationEditing.service.testSetting', value: undefined }) + .then(() => { + const contents = fs.readFileSync(globalSettingsFile).toString('utf8'); + const parsed = json.parse(contents); + assert.deepEqual(Object.keys(parsed), ['my.super.setting']); + assert.equal(parsed['my.super.setting'], 'my.super.value'); + }); + }); + + test('remove non existing setting - existing file', () => { + fs.writeFileSync(globalSettingsFile, '{ "my.super.setting": "my.super.value" }'); + return testObject.writeConfiguration(ConfigurationTarget.USER, { key: 'configurationEditing.service.testSetting', value: undefined }) + .then(() => { + const contents = fs.readFileSync(globalSettingsFile).toString('utf8'); + const parsed = json.parse(contents); + assert.deepEqual(Object.keys(parsed), ['my.super.setting']); + assert.equal(parsed['my.super.setting'], 'my.super.value'); + }); + }); + test('write workspace standalone setting - empty file', () => { return testObject.writeConfiguration(ConfigurationTarget.WORKSPACE, { key: 'tasks.service.testSetting', value: 'value' }) .then(() => { diff --git a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationService.test.ts index eaa5fa0c337..d41ac767a69 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationService.test.ts @@ -968,6 +968,26 @@ suite('WorkspaceConfigurationService - Multiroot', () => { }); }); + test('resource setting in folder is read after it is registered later', () => { + fs.writeFileSync(workspaceContextService.getWorkspace().folders[0].toResource('.vscode/settings.json').fsPath, '{ "configurationService.workspace.testNewResourceSetting2": "workspaceFolderValue" }'); + return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration, { key: 'settings', value: { 'configurationService.workspace.testNewResourceSetting2': 'workspaceValue' } }, true) + .then(() => testObject.reloadConfiguration()) + .then(() => { + configurationRegistry.registerConfiguration({ + 'id': '_test', + 'type': 'object', + 'properties': { + 'configurationService.workspace.testNewResourceSetting2': { + 'type': 'string', + 'default': 'isSet', + scope: ConfigurationScope.RESOURCE + } + } + }); + assert.equal(testObject.getValue('configurationService.workspace.testNewResourceSetting2', { resource: workspaceContextService.getWorkspace().folders[0].uri }), 'workspaceFolderValue'); + }); + }); + test('inspect', () => { let actual = testObject.inspect('something.missing'); assert.equal(actual.default, void 0); diff --git a/src/vs/workbench/services/editor/common/editorService.ts b/src/vs/workbench/services/editor/common/editorService.ts index d779f2ff94b..1debca50ef7 100644 --- a/src/vs/workbench/services/editor/common/editorService.ts +++ b/src/vs/workbench/services/editor/common/editorService.ts @@ -280,7 +280,7 @@ export class WorkbenchEditorService implements IWorkbenchEditorService { if (resourceDiffInput.leftResource && resourceDiffInput.rightResource) { const leftInput = this.createInput({ resource: resourceDiffInput.leftResource }); const rightInput = this.createInput({ resource: resourceDiffInput.rightResource }); - const label = resourceDiffInput.label || this.toDiffLabel(resourceDiffInput.leftResource, resourceDiffInput.rightResource, this.workspaceContextService, this.environmentService); + const label = resourceDiffInput.label || nls.localize('compareLabels', "{0} ↔ {1}", this.toDiffLabel(leftInput, this.workspaceContextService, this.environmentService), this.toDiffLabel(rightInput, this.workspaceContextService, this.environmentService)); return new DiffEditorInput(label, resourceDiffInput.description, leftInput, rightInput); } @@ -352,11 +352,16 @@ export class WorkbenchEditorService implements IWorkbenchEditorService { return input; } - private toDiffLabel(res1: URI, res2: URI, context: IWorkspaceContextService, environment: IEnvironmentService): string { - const leftName = getPathLabel(res1.fsPath, context, environment); - const rightName = getPathLabel(res2.fsPath, context, environment); + private toDiffLabel(input: EditorInput, context: IWorkspaceContextService, environment: IEnvironmentService): string { + const res = input.getResource(); - return nls.localize('compareLabels', "{0} ↔ {1}", leftName, rightName); + // Do not try to extract any paths from simple untitled editors + if (res.scheme === 'untitled' && !this.untitledEditorService.hasAssociatedFilePath(res)) { + return input.getName(); + } + + // Otherwise: for diff labels prefer to see the path as part of the label + return getPathLabel(res.fsPath, context, environment); } } diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts b/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts index df0c9c7e0e5..4e881ab0b2f 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts @@ -55,6 +55,7 @@ export class ExtensionHostProcessWorker { // Resources, in order they get acquired/created when .start() is called: private _namedPipeServer: Server; + private _inspectPort: number; private _extensionHostProcess: ChildProcess; private _extensionHostConnection: Socket; private _messageProtocol: TPromise; @@ -130,10 +131,9 @@ export class ExtensionHostProcessWorker { } if (!this._messageProtocol) { - this._messageProtocol = TPromise.join([this._tryListenOnPipe(), this._tryFindDebugPort()]).then((data: [string, number]) => { + this._messageProtocol = TPromise.join([this._tryListenOnPipe(), this._tryFindDebugPort()]).then(data => { const pipeName = data[0]; - // The port will be 0 if there's no need to debug or if a free port was not found - const port = data[1]; + const portData = data[1]; const opts = { env: objects.mixin(objects.deepClone(process.env), { @@ -151,12 +151,22 @@ export class ExtensionHostProcessWorker { // We detach because we have noticed that when the renderer exits, its child processes // (i.e. extension host) are taken down in a brutal fashion by the OS detached: !!isWindows, - execArgv: port - ? ['--nolazy', (this._isExtensionDevDebugBrk ? '--inspect-brk=' : '--inspect=') + port] - : undefined, + execArgv: undefined, silent: true }; + if (portData.actual) { + opts.execArgv = [ + '--nolazy', + (this._isExtensionDevDebugBrk ? '--inspect-brk=' : '--inspect=') + portData.actual + ]; + if (!portData.expected) { + // No one asked for 'inspect' or 'inspect-brk', only us. We add another + // option such that the extension host can manipulate the execArgv array + opts.env.VSCODE_PREVENT_FOREIGN_INSPECT = true; + } + } + const crashReporterOptions = this._crashReporterService.getChildProcessStartOptions('extensionHost'); if (crashReporterOptions) { opts.env.CRASH_REPORTER_START_OPTIONS = JSON.stringify(crashReporterOptions); @@ -207,15 +217,16 @@ export class ExtensionHostProcessWorker { this._extensionHostProcess.on('exit', (code: number, signal: string) => this._onExtHostProcessExit(code, signal)); // Notify debugger that we are ready to attach to the process if we run a development extension - if (this._isExtensionDevHost && port) { + if (this._isExtensionDevHost && portData.actual) { this._broadcastService.broadcast({ channel: EXTENSION_ATTACH_BROADCAST_CHANNEL, payload: { debugId: this._environmentService.debugExtensionHost.debugId, - port + port: portData.actual } }); } + this._inspectPort = portData.actual; // Help in case we fail to start it let startupTimeoutHandle: number; @@ -259,26 +270,27 @@ export class ExtensionHostProcessWorker { /** * Find a free port if extension host debugging is enabled. */ - private _tryFindDebugPort(): TPromise { - const extensionHostPort = this._environmentService.debugExtensionHost.port; - if (typeof extensionHostPort !== 'number') { - return TPromise.wrap(0); + private _tryFindDebugPort(): TPromise<{ expected: number; actual: number }> { + let expected: number; + let startPort = 9333; + if (typeof this._environmentService.debugExtensionHost.port === 'number') { + startPort = expected = this._environmentService.debugExtensionHost.port; } - return new TPromise((c, e) => { - findFreePort(extensionHostPort, 10 /* try 10 ports */, 5000 /* try up to 5 seconds */, (port) => { + return new TPromise((c, e) => { + return findFreePort(startPort, 10 /* try 10 ports */, 5000 /* try up to 5 seconds */).then(port => { if (!port) { console.warn('%c[Extension Host] %cCould not find a free port for debugging', 'color: blue', 'color: black'); - return c(void 0); - } - if (port !== extensionHostPort) { - console.warn(`%c[Extension Host] %cProvided debugging port ${extensionHostPort} is not free, using ${port} instead.`, 'color: blue', 'color: black'); - } - if (this._isExtensionDevDebugBrk) { - console.warn(`%c[Extension Host] %cSTOPPED on first line for debugging on port ${port}`, 'color: blue', 'color: black'); } else { - console.info(`%c[Extension Host] %cdebugger listening on port ${port}`, 'color: blue', 'color: black'); + if (expected && port !== expected) { + console.warn(`%c[Extension Host] %cProvided debugging port ${expected} is not free, using ${port} instead.`, 'color: blue', 'color: black'); + } + if (this._isExtensionDevDebugBrk) { + console.warn(`%c[Extension Host] %cSTOPPED on first line for debugging on port ${port}`, 'color: blue', 'color: black'); + } else { + console.info(`%c[Extension Host] %cdebugger listening on port ${port}`, 'color: blue', 'color: black'); + } } - return c(port); + return c({ expected, actual: port }); }); }); } @@ -363,7 +375,10 @@ export class ExtensionHostProcessWorker { extensions: extensionDescriptions, // Send configurations scopes only in development mode. configuration: !this._environmentService.isBuilt || this._environmentService.isExtensionDevelopment ? { ...configurationData, configurationScopes: getScopes(this._configurationService.keys().default) } : configurationData, - telemetryInfo + telemetryInfo, + args: this._environmentService.args, + execPath: this._environmentService.execPath, + windowId: this._windowService.getCurrentWindowId() }; return r; }); @@ -426,6 +441,10 @@ export class ExtensionHostProcessWorker { } } + public getInspectPort(): number { + return this._inspectPort; + } + public terminate(): void { if (this._terminating) { return; diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.ts b/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.ts new file mode 100644 index 00000000000..2b77e490063 --- /dev/null +++ b/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.ts @@ -0,0 +1,154 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { IExtensionService, IExtensionDescription, ProfileSession, IExtensionHostProfile, ProfileSegmentId } from 'vs/platform/extensions/common/extensions'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { localize } from 'vs/nls'; +import { TernarySearchTree } from 'vs/base/common/map'; +import { realpathSync } from 'vs/base/node/extfs'; +import { CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { IStatusbarService, StatusbarAlignment } from 'vs/platform/statusbar/common/statusbar'; +import { writeFile } from 'vs/base/node/pfs'; +import * as path from 'path'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { setTimeout } from 'timers'; +import { Profile, ProfileNode } from 'v8-inspect-profiler'; + +export class ExtensionHostProfiler { + + constructor(private readonly _port: number, @IExtensionService private readonly _extensionService: IExtensionService) { + } + + public start(): TPromise { + return TPromise.wrap(import('v8-inspect-profiler')).then(profiler => { + return profiler.startProfiling({ port: this._port }).then(session => { + return { + stop: () => { + return TPromise.wrap(session.stop()).then(profile => { + return this._extensionService.getExtensions().then(extensions => { + return this.distill(profile.profile, extensions); + }); + }); + } + }; + }); + }); + } + + private distill(profile: Profile, extensions: IExtensionDescription[]): IExtensionHostProfile { + let searchTree = TernarySearchTree.forPaths(); + for (let extension of extensions) { + searchTree.set(realpathSync(extension.extensionFolderPath), extension); + } + + let nodes = profile.nodes; + let idsToNodes = new Map(); + let idsToSegmentId = new Map(); + for (let node of nodes) { + idsToNodes.set(node.id, node); + } + + function visit(node: ProfileNode, segmentId: ProfileSegmentId) { + if (!segmentId) { + switch (node.callFrame.functionName) { + case '(root)': + break; + case '(program)': + segmentId = 'program'; + break; + case '(garbage collector)': + segmentId = 'gc'; + break; + default: + segmentId = 'self'; + break; + } + } else if (segmentId === 'self' && node.callFrame.url) { + let extension = searchTree.findSubstr(node.callFrame.url); + if (extension) { + segmentId = extension.id; + } + } + idsToSegmentId.set(node.id, segmentId); + + if (node.children) { + for (let child of node.children) { + visit(idsToNodes.get(child), segmentId); + } + } + } + visit(nodes[0], null); + + let samples = profile.samples; + let timeDeltas = profile.timeDeltas; + let distilledDeltas: number[] = []; + let distilledIds: ProfileSegmentId[] = []; + + let currSegmentTime = 0; + let currSegmentId = void 0; + for (let i = 0; i < samples.length; i++) { + let id = samples[i]; + let segmentId = idsToSegmentId.get(id); + if (segmentId !== currSegmentId) { + if (currSegmentId) { + distilledIds.push(currSegmentId); + distilledDeltas.push(currSegmentTime); + } + currSegmentId = segmentId; + currSegmentTime = 0; + } + currSegmentTime += timeDeltas[i]; + } + if (currSegmentId) { + distilledIds.push(currSegmentId); + distilledDeltas.push(currSegmentTime); + } + idsToNodes = null; + idsToSegmentId = null; + searchTree = null; + + return { + startTime: profile.startTime, + endTime: profile.endTime, + deltas: distilledDeltas, + ids: distilledIds, + data: profile, + getAggregatedTimes: () => { + let segmentsToTime = new Map(); + for (let i = 0; i < distilledIds.length; i++) { + let id = distilledIds[i]; + segmentsToTime.set(id, (segmentsToTime.get(id) || 0) + distilledDeltas[i]); + } + return segmentsToTime; + } + }; + } +} + + +CommandsRegistry.registerCommand('exthost.profile.start', async accessor => { + const statusbarService = accessor.get(IStatusbarService); + const extensionService = accessor.get(IExtensionService); + const environmentService = accessor.get(IEnvironmentService); + + const handle = statusbarService.addEntry({ text: localize('message', "$(zap) Profiling Extension Host...") }, StatusbarAlignment.LEFT); + + extensionService.startExtensionHostProfile().then(session => { + setTimeout(() => { + session.stop().then(result => { + result.getAggregatedTimes().forEach((val, index) => { + console.log(`${index} : ${Math.round(val / 1000)} ms`); + }); + let profilePath = path.join(environmentService.userHome, 'extHostProfile.cpuprofile'); + console.log(`Saving profile at ${profilePath}`); + return writeFile(profilePath, JSON.stringify(result.data)); + }).then(() => { + handle.dispose(); + }); + }, 5000); + }); +}); diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionPoints.ts b/src/vs/workbench/services/extensions/electron-browser/extensionPoints.ts index 4204b5715a1..b0b0f300177 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionPoints.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionPoints.ts @@ -6,30 +6,25 @@ 'use strict'; import * as nls from 'vs/nls'; -import * as Platform from 'vs/base/common/platform'; -import pfs = require('vs/base/node/pfs'); +import * as pfs from 'vs/base/node/pfs'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { TPromise } from 'vs/base/common/winjs.base'; -import { groupBy, values } from 'vs/base/common/collections'; import { join, normalize, extname } from 'path'; -import json = require('vs/base/common/json'); -import Types = require('vs/base/common/types'); +import * as json from 'vs/base/common/json'; +import * as types from 'vs/base/common/types'; import { isValidExtensionDescription } from 'vs/platform/extensions/node/extensionValidator'; import * as semver from 'semver'; -import { getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; +import { getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/node/extensionManagementUtil'; import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; +import { groupByExtension } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; const MANIFEST_FILE = 'package.json'; -const devMode = !!process.env['VSCODE_DEV']; -interface NlsConfiguration { - locale: string; - pseudo: boolean; +export interface NlsConfiguration { + readonly devMode: boolean; + readonly locale: string; + readonly pseudo: boolean; } -const nlsConfig: NlsConfiguration = { - locale: Platform.locale, - pseudo: Platform.locale === 'pseudo' -}; export interface ILog { error(source: string, message: string): void; @@ -39,11 +34,11 @@ export interface ILog { abstract class ExtensionManifestHandler { - protected _ourVersion: string; - protected _log: ILog; - protected _absoluteFolderPath: string; - protected _isBuiltin: boolean; - protected _absoluteManifestPath: string; + protected readonly _ourVersion: string; + protected readonly _log: ILog; + protected readonly _absoluteFolderPath: string; + protected readonly _isBuiltin: boolean; + protected readonly _absoluteManifestPath: string; constructor(ourVersion: string, log: ILog, absoluteFolderPath: string, isBuiltin: boolean) { this._ourVersion = ourVersion; @@ -82,6 +77,13 @@ class ExtensionManifestParser extends ExtensionManifestHandler { class ExtensionManifestNLSReplacer extends ExtensionManifestHandler { + private readonly _nlsConfig: NlsConfiguration; + + constructor(ourVersion: string, log: ILog, absoluteFolderPath: string, isBuiltin: boolean, nlsConfig: NlsConfiguration) { + super(ourVersion, log, absoluteFolderPath, isBuiltin); + this._nlsConfig = nlsConfig; + } + public replaceNLS(extensionDescription: IExtensionDescription): TPromise { let extension = extname(this._absoluteManifestPath); let basename = this._absoluteManifestPath.substr(0, this._absoluteManifestPath.length - extension.length); @@ -90,7 +92,7 @@ class ExtensionManifestNLSReplacer extends ExtensionManifestHandler { if (!exists) { return extensionDescription; } - return ExtensionManifestNLSReplacer.findMessageBundles(basename).then((messageBundle) => { + return ExtensionManifestNLSReplacer.findMessageBundles(this._nlsConfig, basename).then((messageBundle) => { if (!messageBundle.localized) { return extensionDescription; } @@ -106,7 +108,7 @@ class ExtensionManifestNLSReplacer extends ExtensionManifestHandler { return extensionDescription; } - ExtensionManifestNLSReplacer._replaceNLStrings(extensionDescription, messages, originalMessages, this._log, this._absoluteFolderPath); + ExtensionManifestNLSReplacer._replaceNLStrings(this._nlsConfig, extensionDescription, messages, originalMessages, this._log, this._absoluteFolderPath); return extensionDescription; }); }, (err) => { @@ -136,7 +138,7 @@ class ExtensionManifestNLSReplacer extends ExtensionManifestHandler { * Finds localized message bundle and the original (unlocalized) one. * If the localized file is not present, returns null for the original and marks original as localized. */ - private static findMessageBundles(basename: string): TPromise<{ localized: string, original: string }> { + private static findMessageBundles(nlsConfig: NlsConfiguration, basename: string): TPromise<{ localized: string, original: string }> { return new TPromise<{ localized: string, original: string }>((c, e, p) => { function loop(basename: string, locale: string): void { let toCheck = `${basename}.nls.${locale}.json`; @@ -154,7 +156,7 @@ class ExtensionManifestNLSReplacer extends ExtensionManifestHandler { }); } - if (devMode || nlsConfig.pseudo || !nlsConfig.locale) { + if (nlsConfig.devMode || nlsConfig.pseudo || !nlsConfig.locale) { return c({ localized: basename + '.nls.json', original: null }); } loop(basename, nlsConfig.locale); @@ -165,10 +167,10 @@ class ExtensionManifestNLSReplacer extends ExtensionManifestHandler { * This routine makes the following assumptions: * The root element is an object literal */ - private static _replaceNLStrings(literal: T, messages: { [key: string]: string; }, originalMessages: { [key: string]: string }, log: ILog, messageScope: string): void { + private static _replaceNLStrings(nlsConfig: NlsConfiguration, literal: T, messages: { [key: string]: string; }, originalMessages: { [key: string]: string }, log: ILog, messageScope: string): void { function processEntry(obj: any, key: string | number, command?: boolean) { let value = obj[key]; - if (Types.isString(value)) { + if (types.isString(value)) { let str = value; let length = str.length; if (length > 1 && str[0] === '%' && str[length - 1] === '%') { @@ -184,13 +186,13 @@ class ExtensionManifestNLSReplacer extends ExtensionManifestHandler { log.warn(messageScope, nls.localize('missingNLSKey', "Couldn't find message for key {0}.", messageKey)); } } - } else if (Types.isObject(value)) { + } else if (types.isObject(value)) { for (let k in value) { if (value.hasOwnProperty(k)) { k === 'commands' ? processEntry(value, k, true) : processEntry(value, k, command); } } - } else if (Types.isArray(value)) { + } else if (types.isArray(value)) { for (let i = 0; i < value.length; i++) { processEntry(value, i, command); } @@ -251,17 +253,48 @@ class ExtensionManifestValidator extends ExtensionManifestHandler { } } +export class ExtensionScannerInput { + + public mtime: number; + + constructor( + public readonly ourVersion: string, + public readonly commit: string, + public readonly locale: string, + public readonly devMode: boolean, + public readonly absoluteFolderPath: string, + public readonly isBuiltin: boolean + ) { + // Keep empty!! (JSON.parse) + } + + public static createNLSConfig(input: ExtensionScannerInput): NlsConfiguration { + return { + devMode: input.devMode, + locale: input.locale, + pseudo: input.locale === 'pseudo' + }; + } + + public static equals(a: ExtensionScannerInput, b: ExtensionScannerInput): boolean { + return ( + a.ourVersion === b.ourVersion + && a.commit === b.commit + && a.locale === b.locale + && a.devMode === b.devMode + && a.absoluteFolderPath === b.absoluteFolderPath + && a.isBuiltin === b.isBuiltin + && a.mtime === b.mtime + ); + } +} + export class ExtensionScanner { /** * Read the extension defined in `absoluteFolderPath` */ - public static scanExtension( - version: string, - log: ILog, - absoluteFolderPath: string, - isBuiltin: boolean - ): TPromise { + private static scanExtension(version: string, log: ILog, absoluteFolderPath: string, isBuiltin: boolean, nlsConfig: NlsConfiguration): TPromise { absoluteFolderPath = normalize(absoluteFolderPath); let parser = new ExtensionManifestParser(version, log, absoluteFolderPath, isBuiltin); @@ -270,7 +303,7 @@ export class ExtensionScanner { return null; } - let nlsReplacer = new ExtensionManifestNLSReplacer(version, log, absoluteFolderPath, isBuiltin); + let nlsReplacer = new ExtensionManifestNLSReplacer(version, log, absoluteFolderPath, isBuiltin, nlsConfig); return nlsReplacer.replaceNLS(extensionDescription); }).then((extensionDescription) => { if (extensionDescription === null) { @@ -285,81 +318,89 @@ export class ExtensionScanner { /** * Scan a list of extensions defined in `absoluteFolderPath` */ - public static scanExtensions( - version: string, - log: ILog, - absoluteFolderPath: string, - isBuiltin: boolean - ): TPromise { - let obsolete = TPromise.as({}); + public static async scanExtensions(input: ExtensionScannerInput, log: ILog): TPromise { + const absoluteFolderPath = input.absoluteFolderPath; + const isBuiltin = input.isBuiltin; - if (!isBuiltin) { - obsolete = pfs.readFile(join(absoluteFolderPath, '.obsolete'), 'utf8') - .then(raw => JSON.parse(raw)) - .then(null, err => ({})); - } + try { + let obsolete: { [folderName: string]: boolean; } = {}; + if (!isBuiltin) { + try { + const obsoleteFileContents = await pfs.readFile(join(absoluteFolderPath, '.obsolete'), 'utf8'); + obsolete = JSON.parse(obsoleteFileContents); + } catch (err) { + // Don't care + } + } - return obsolete.then(obsolete => { - return pfs.readDirsInDir(absoluteFolderPath) - .then(folders => { - if (isBuiltin) { - return folders; + const rawFolders = await pfs.readDirsInDir(absoluteFolderPath); + let folders: string[] = null; + if (isBuiltin) { + folders = rawFolders; + } else { + // TODO: align with extensionsService + const nonGallery: string[] = []; + const gallery: string[] = []; + + rawFolders.forEach(folder => { + if (obsolete[folder]) { + return; } - // TODO: align with extensionsService - const nonGallery: string[] = []; - const gallery: { folder: string; id: string; version: string; }[] = []; + const { id, version } = getIdAndVersionFromLocalExtensionId(folder); - folders.forEach(folder => { - if (obsolete[folder]) { - return; - } - - const { id, version } = getIdAndVersionFromLocalExtensionId(folder); - - if (!id || !version) { - nonGallery.push(folder); - return; - } - - gallery.push({ folder, id, version }); - }); - - const byId = values(groupBy(gallery, p => p.id)); - const latest = byId.map(p => p.sort((a, b) => semver.rcompare(a.version, b.version))[0]) - .map(a => a.folder); - - return [...nonGallery, ...latest]; - }) - .then(folders => TPromise.join(folders.map(f => this.scanExtension(version, log, join(absoluteFolderPath, f), isBuiltin)))) - .then(extensionDescriptions => extensionDescriptions.filter(item => item !== null)) - .then(null, err => { - log.error(absoluteFolderPath, err); - return []; + if (!id || !version) { + nonGallery.push(folder); + } else { + gallery.push(folder); + } }); - }); + + folders = [...nonGallery, ...gallery]; + } + + const nlsConfig = ExtensionScannerInput.createNLSConfig(input); + let extensionDescriptions = await TPromise.join(folders.map(f => this.scanExtension(input.ourVersion, log, join(absoluteFolderPath, f), isBuiltin, nlsConfig))); + extensionDescriptions = extensionDescriptions.filter(item => item !== null); + + if (!isBuiltin) { + // Filter out outdated extensions + const byExtension: IExtensionDescription[][] = groupByExtension(extensionDescriptions, e => ({ id: e.id, uuid: e.uuid })); + extensionDescriptions = byExtension.map(p => p.sort((a, b) => semver.rcompare(a.version, b.version))[0]); + } + + extensionDescriptions.sort((a, b) => { + if (a.extensionFolderPath < b.extensionFolderPath) { + return -1; + } + return 1; + }); + return extensionDescriptions; + } catch (err) { + log.error(absoluteFolderPath, err); + return []; + } } /** * Combination of scanExtension and scanExtensions: If an extension manifest is found at root, we load just this extension, * otherwise we assume the folder contains multiple extensions. */ - public static scanOneOrMultipleExtensions( - version: string, - log: ILog, - absoluteFolderPath: string, - isBuiltin: boolean - ): TPromise { + public static scanOneOrMultipleExtensions(input: ExtensionScannerInput, log: ILog): TPromise { + const absoluteFolderPath = input.absoluteFolderPath; + const isBuiltin = input.isBuiltin; + return pfs.fileExists(join(absoluteFolderPath, MANIFEST_FILE)).then((exists) => { if (exists) { - return this.scanExtension(version, log, absoluteFolderPath, isBuiltin).then((extensionDescription) => { + const nlsConfig = ExtensionScannerInput.createNLSConfig(input); + return this.scanExtension(input.ourVersion, log, absoluteFolderPath, isBuiltin, nlsConfig).then((extensionDescription) => { if (extensionDescription === null) { return []; } return [extensionDescription]; }); } - return this.scanExtensions(version, log, absoluteFolderPath, isBuiltin); + return this.scanExtensions(input, log); }, (err) => { log.error(absoluteFolderPath, err); return []; diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index 0ec9fc30dfd..01f086dea8d 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -6,18 +6,21 @@ import * as nls from 'vs/nls'; import * as errors from 'vs/base/common/errors'; +import * as objects from 'vs/base/common/objects'; import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; import pkg from 'vs/platform/node/package'; import * as path from 'path'; +import * as pfs from 'vs/base/node/pfs'; import URI from 'vs/base/common/uri'; +import * as platform from 'vs/base/common/platform'; import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/node/extensionDescriptionRegistry'; -import { IMessage, IExtensionDescription, IExtensionsStatus, IExtensionService, ExtensionPointContribution, ActivationTimes } from 'vs/platform/extensions/common/extensions'; +import { IMessage, IExtensionDescription, IExtensionsStatus, IExtensionService, ExtensionPointContribution, ActivationTimes, IExtensionHostInformation, ProfileSession, USER_MANIFEST_CACHE_FILE, BUILTIN_MANIFEST_CACHE_FILE, MANIFEST_CACHE_FOLDER } from 'vs/platform/extensions/common/extensions'; import { IExtensionEnablementService, IExtensionIdentifier, EnablementState } from 'vs/platform/extensionManagement/common/extensionManagement'; import { areSameExtensions, BetterMergeId, BetterMergeDisabledNowKey } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionsRegistry, ExtensionPoint, IExtensionPointUser, ExtensionMessageCollector, IExtensionPoint } from 'vs/platform/extensions/common/extensionsRegistry'; -import { ExtensionScanner, ILog } from 'vs/workbench/services/extensions/electron-browser/extensionPoints'; -import { IMessageService } from 'vs/platform/message/common/message'; +import { ExtensionScanner, ILog, ExtensionScannerInput } from 'vs/workbench/services/extensions/electron-browser/extensionPoints'; +import { IMessageService, CloseAction } from 'vs/platform/message/common/message'; import { ProxyIdentifier } from 'vs/workbench/services/thread/common/threadService'; import { ExtHostContext, ExtHostExtensionServiceShape, IExtHostContext, MainContext } from 'vs/workbench/api/node/extHost.protocol'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -30,11 +33,14 @@ import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; import { ExtHostCustomersRegistry } from 'vs/workbench/api/electron-browser/extHostCustomers'; import { IWindowService } from 'vs/platform/windows/common/windows'; import { Action } from 'vs/base/common/actions'; -import { IDisposable } from 'vs/base/common/lifecycle'; +import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; import { mark, time } from 'vs/base/common/performance'; import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { Barrier } from 'vs/base/common/async'; import Event, { Emitter } from 'vs/base/common/event'; +import { ExtensionHostProfiler } from 'vs/workbench/services/extensions/electron-browser/extensionHostProfiler'; +import { ReloadWindowAction } from 'vs/workbench/electron-browser/actions'; +import product from 'vs/platform/node/product'; const SystemExtensionsRoot = path.normalize(path.join(URI.parse(require.toUrl('')).fsPath, '..', 'extensions')); @@ -52,7 +58,7 @@ function messageWithSource2(source: string, message: string): string { const hasOwnProperty = Object.hasOwnProperty; const NO_OP_VOID_PROMISE = TPromise.wrap(void 0); -export class ExtensionService implements IExtensionService { +export class ExtensionService extends Disposable implements IExtensionService { public _serviceBrand: any; private _onDidRegisterExtensions: Emitter; @@ -60,9 +66,11 @@ export class ExtensionService implements IExtensionService { private _registry: ExtensionDescriptionRegistry; private readonly _installedExtensionsReady: Barrier; private readonly _isDev: boolean; - private readonly _extensionsStatus: { [id: string]: IExtensionsStatus }; + private readonly _extensionsMessages: { [id: string]: IMessage[] }; private _allRequestedActivateEvents: { [activationEvent: string]: boolean; }; + private readonly _onDidChangeExtensionsStatus: Emitter = this._register(new Emitter()); + public readonly onDidChangeExtensionsStatus: Event = this._onDidChangeExtensionsStatus.event; // --- Members used per extension host process @@ -71,6 +79,7 @@ export class ExtensionService implements IExtensionService { */ private _extensionHostProcessFinishedActivateEvents: { [activationEvent: string]: boolean; }; private _extensionHostProcessActivationTimes: { [id: string]: ActivationTimes; }; + private _extensionHostExtensionRuntimeErrors: { [id: string]: Error[]; }; private _extensionHostProcessWorker: ExtensionHostProcessWorker; private _extensionHostProcessThreadService: MainThreadService; private _extensionHostProcessCustomers: IDisposable[]; @@ -89,16 +98,18 @@ export class ExtensionService implements IExtensionService { @IWindowService private readonly _windowService: IWindowService, @ILifecycleService lifecycleService: ILifecycleService ) { + super(); this._registry = null; this._installedExtensionsReady = new Barrier(); this._isDev = !this._environmentService.isBuilt || this._environmentService.isExtensionDevelopment; - this._extensionsStatus = {}; + this._extensionsMessages = {}; this._allRequestedActivateEvents = Object.create(null); this._onDidRegisterExtensions = new Emitter(); this._extensionHostProcessFinishedActivateEvents = Object.create(null); this._extensionHostProcessActivationTimes = Object.create(null); + this._extensionHostExtensionRuntimeErrors = Object.create(null); this._extensionHostProcessWorker = null; this._extensionHostProcessThreadService = null; this._extensionHostProcessCustomers = []; @@ -112,10 +123,23 @@ export class ExtensionService implements IExtensionService { }); } + public dispose(): void { + super.dispose(); + } + public get onDidRegisterExtensions(): Event { return this._onDidRegisterExtensions.event; } + public getExtensionHostInformation(): IExtensionHostInformation { + if (!this._extensionHostProcessWorker) { + throw errors.illegalState(); + } + return { + inspectPort: this._extensionHostProcessWorker.getInspectPort() + }; + } + public restartExtensionHost(): void { this._stopExtensionHostProcess(); this._startExtensionHostProcess(Object.keys(this._allRequestedActivateEvents)); @@ -130,8 +154,11 @@ export class ExtensionService implements IExtensionService { } private _stopExtensionHostProcess(): void { + const previouslyActivatedExtensionIds = Object.keys(this._extensionHostProcessActivationTimes); + this._extensionHostProcessFinishedActivateEvents = Object.create(null); this._extensionHostProcessActivationTimes = Object.create(null); + this._extensionHostExtensionRuntimeErrors = Object.create(null); if (this._extensionHostProcessWorker) { this._extensionHostProcessWorker.dispose(); this._extensionHostProcessWorker = null; @@ -150,6 +177,8 @@ export class ExtensionService implements IExtensionService { } this._extensionHostProcessCustomers = []; this._extensionHostProcessProxy = null; + + this._onDidChangeExtensionsStatus.fire(previouslyActivatedExtensionIds); } private _startExtensionHostProcess(initialActivationEvents: string[]): void { @@ -292,11 +321,30 @@ export class ExtensionService implements IExtensionService { } public getExtensionsStatus(): { [id: string]: IExtensionsStatus; } { - return this._extensionsStatus; + let result: { [id: string]: IExtensionsStatus; } = Object.create(null); + if (this._registry) { + const extensions = this._registry.getAllExtensionDescriptions(); + for (let i = 0, len = extensions.length; i < len; i++) { + const extension = extensions[i]; + const id = extension.id; + result[id] = { + messages: this._extensionsMessages[id], + activationTimes: this._extensionHostProcessActivationTimes[id], + runtimeErrors: this._extensionHostExtensionRuntimeErrors[id], + }; + } + } + return result; } - public getExtensionsActivationTimes(): { [id: string]: ActivationTimes; } { - return this._extensionHostProcessActivationTimes; + public startExtensionHostProfile(): TPromise { + if (this._extensionHostProcessWorker) { + let port = this._extensionHostProcessWorker.getInspectPort(); + if (port) { + return this._instantiationService.createInstance(ExtensionHostProfiler, port).start(); + } + } + throw new Error('Extension host not running or no inspect port available'); } // ---- end IExtensionService @@ -305,37 +353,9 @@ export class ExtensionService implements IExtensionService { private _scanAndHandleExtensions(): void { - const log = new Logger((severity, source, message) => { - this._logOrShowMessage(severity, this._isDev ? messageWithSource2(source, message) : message); - }); - - ExtensionService._scanInstalledExtensions(this._environmentService, log) - .then((installedExtensions) => { - - // Migrate enablement service to use identifiers - this._extensionEnablementService.migrateToIdentifiers(installedExtensions); - - return this._getDisabledExtensions() - .then(disabledExtensions => { - /* __GDPR__ - "extensionsScanned" : { - "totalCount" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, - "disabledCount": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } - } - */ - this._telemetryService.publicLog('extensionsScanned', { - totalCount: installedExtensions.length, - disabledCount: disabledExtensions.length - }); - - if (disabledExtensions.length === 0) { - return installedExtensions; - } - return installedExtensions.filter(e => disabledExtensions.every(disabled => !areSameExtensions(disabled, e))); - }); - - }).then((extensionDescriptions) => { - this._registry = new ExtensionDescriptionRegistry(extensionDescriptions); + this._getRuntimeExtension() + .then(runtimeExtensons => { + this._registry = new ExtensionDescriptionRegistry(runtimeExtensons); let availableExtensions = this._registry.getAllExtensionDescriptions(); let extensionPoints = ExtensionsRegistry.getExtensionPoints(); @@ -354,30 +374,79 @@ export class ExtensionService implements IExtensionService { mark('extensionHostReady'); this._installedExtensionsReady.open(); this._onDidRegisterExtensions.fire(availableExtensions); + this._onDidChangeExtensionsStatus.fire(availableExtensions.map(e => e.id)); }); } - private _getDisabledExtensions(): TPromise { - return this._extensionEnablementService.getDisabledExtensions() - .then(disabledExtensions => { - const betterMergeExtensionIdentifier: IExtensionIdentifier = { id: BetterMergeId }; - if (disabledExtensions.some(d => d.id === betterMergeExtensionIdentifier.id)) { - return disabledExtensions; - } - return this._extensionEnablementService.setEnablement(betterMergeExtensionIdentifier, EnablementState.Disabled) - .then(() => { - this._storageService.store(BetterMergeDisabledNowKey, true); - return [...disabledExtensions, betterMergeExtensionIdentifier]; + private _getRuntimeExtension(): TPromise { + const log = new Logger((severity, source, message) => { + this._logOrShowMessage(severity, this._isDev ? messageWithSource2(source, message) : message); + }); + + return ExtensionService._scanInstalledExtensions(this._instantiationService, this._messageService, this._environmentService, log) + .then(({ system, user, development }) => { + this._extensionEnablementService.migrateToIdentifiers(user); // TODO: @sandy Remove it after couple of milestones + return this._extensionEnablementService.getDisabledExtensions() + .then(disabledExtensions => { + let result: { [extensionId: string]: IExtensionDescription; } = {}; + let extensionsToDisable: IExtensionIdentifier[] = []; + let userMigratedSystemExtensions: IExtensionIdentifier[] = [{ id: BetterMergeId }]; + + system.forEach((systemExtension) => { + // Disabling system extensions is not supported + result[systemExtension.id] = systemExtension; + }); + + user.forEach((userExtension) => { + if (result.hasOwnProperty(userExtension.id)) { + log.warn(userExtension.extensionFolderPath, nls.localize('overwritingExtension', "Overwriting extension {0} with {1}.", result[userExtension.id].extensionFolderPath, userExtension.extensionFolderPath)); + } + if (disabledExtensions.every(disabled => !areSameExtensions(disabled, userExtension))) { + // Check if the extension is changed to system extension + let userMigratedSystemExtension = userMigratedSystemExtensions.filter(userMigratedSystemExtension => areSameExtensions(userMigratedSystemExtension, { id: userExtension.id }))[0]; + if (userMigratedSystemExtension) { + extensionsToDisable.push(userMigratedSystemExtension); + } else { + result[userExtension.id] = userExtension; + } + } + }); + + development.forEach(developedExtension => { + log.info('', nls.localize('extensionUnderDevelopment', "Loading development extension at {0}", developedExtension.extensionFolderPath)); + if (result.hasOwnProperty(developedExtension.id)) { + log.warn(developedExtension.extensionFolderPath, nls.localize('overwritingExtension', "Overwriting extension {0} with {1}.", result[developedExtension.id].extensionFolderPath, developedExtension.extensionFolderPath)); + } + // Do not disable extensions under development + result[developedExtension.id] = developedExtension; + }); + + const runtimeExtensions = Object.keys(result).map(name => result[name]); + + this._telemetryService.publicLog('extensionsScanned', { + totalCount: runtimeExtensions.length, + disabledCount: disabledExtensions.length + }); + + if (extensionsToDisable.length) { + return TPromise.join(extensionsToDisable.map(e => this._extensionEnablementService.setEnablement(e, EnablementState.Disabled))) + .then(() => { + this._storageService.store(BetterMergeDisabledNowKey, true); + return runtimeExtensions; + }); + } else { + return runtimeExtensions; + } }); }); } private _handleExtensionPointMessage(msg: IMessage) { - if (!this._extensionsStatus[msg.source]) { - this._extensionsStatus[msg.source] = { messages: [] }; + if (!this._extensionsMessages[msg.source]) { + this._extensionsMessages[msg.source] = []; } - this._extensionsStatus[msg.source].messages.push(msg); + this._extensionsMessages[msg.source].push(msg); if (msg.source === this._environmentService.extensionDevelopmentPath) { // This message is about the extension currently being developed @@ -402,42 +471,157 @@ export class ExtensionService implements IExtensionService { } } - private static _scanInstalledExtensions(environmentService: IEnvironmentService, log: ILog): TPromise { - const version = pkg.version; - const builtinExtensions = ExtensionScanner.scanExtensions(version, log, SystemExtensionsRoot, true); - const userExtensions = environmentService.disableExtensions || !environmentService.extensionsPath ? TPromise.as([]) : ExtensionScanner.scanExtensions(version, log, environmentService.extensionsPath, false); - const developedExtensions = environmentService.disableExtensions || !environmentService.isExtensionDevelopment ? TPromise.as([]) : ExtensionScanner.scanOneOrMultipleExtensions(version, log, environmentService.extensionDevelopmentPath, false); + private static async _validateExtensionsCache(instantiationService: IInstantiationService, messageService: IMessageService, environmentService: IEnvironmentService, cacheKey: string, input: ExtensionScannerInput): TPromise { + const cacheFolder = path.join(environmentService.userDataPath, MANIFEST_CACHE_FOLDER); + const cacheFile = path.join(cacheFolder, cacheKey); - return TPromise.join([builtinExtensions, userExtensions, developedExtensions]).then((extensionDescriptions: IExtensionDescription[][]) => { - const builtinExtensions = extensionDescriptions[0]; - const userExtensions = extensionDescriptions[1]; - const developedExtensions = extensionDescriptions[2]; + const expected = await ExtensionScanner.scanExtensions(input, new NullLogger()); - let result: { [extensionId: string]: IExtensionDescription; } = {}; - builtinExtensions.forEach((builtinExtension) => { - result[builtinExtension.id] = builtinExtension; - }); - userExtensions.forEach((userExtension) => { - if (result.hasOwnProperty(userExtension.id)) { - log.warn(userExtension.extensionFolderPath, nls.localize('overwritingExtension', "Overwriting extension {0} with {1}.", result[userExtension.id].extensionFolderPath, userExtension.extensionFolderPath)); - } - result[userExtension.id] = userExtension; - }); - developedExtensions.forEach(developedExtension => { - log.info('', nls.localize('extensionUnderDevelopment', "Loading development extension at {0}", developedExtension.extensionFolderPath)); - if (result.hasOwnProperty(developedExtension.id)) { - log.warn(developedExtension.extensionFolderPath, nls.localize('overwritingExtension', "Overwriting extension {0} with {1}.", result[developedExtension.id].extensionFolderPath, developedExtension.extensionFolderPath)); - } - result[developedExtension.id] = developedExtension; - }); + const cacheContents = await this._readExtensionCache(environmentService, cacheKey); + const actual = cacheContents.result; - return Object.keys(result).map(name => result[name]); - }).then(null, err => { - log.error('', err); - return []; + if (objects.equals(expected, actual)) { + // Cache is valid and running with it is perfectly fine... + return; + } + + try { + await pfs.del(cacheFile); + } catch (err) { + errors.onUnexpectedError(err); + console.error(err); + } + + let message = nls.localize('extensionCache.invalid', "Extensions have been modified on disk. Please reload the window."); + messageService.show(Severity.Info, { + message: message, + actions: [ + instantiationService.createInstance(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL), + CloseAction + ] }); } + private static async _readExtensionCache(environmentService: IEnvironmentService, cacheKey: string): TPromise { + const cacheFolder = path.join(environmentService.userDataPath, MANIFEST_CACHE_FOLDER); + const cacheFile = path.join(cacheFolder, cacheKey); + + try { + const cacheRawContents = await pfs.readFile(cacheFile, 'utf8'); + return JSON.parse(cacheRawContents); + } catch (err) { + // That's ok... + } + + return null; + } + + private static async _writeExtensionCache(environmentService: IEnvironmentService, cacheKey: string, cacheContents: IExtensionCacheData): TPromise { + const cacheFolder = path.join(environmentService.userDataPath, MANIFEST_CACHE_FOLDER); + const cacheFile = path.join(cacheFolder, cacheKey); + + try { + await pfs.mkdirp(cacheFolder); + } catch (err) { + // That's ok... + } + + try { + await pfs.writeFile(cacheFile, JSON.stringify(cacheContents)); + } catch (err) { + // That's ok... + } + } + + private static async _scanExtensionsWithCache(instantiationService: IInstantiationService, messageService: IMessageService, environmentService: IEnvironmentService, cacheKey: string, input: ExtensionScannerInput, log: ILog): TPromise { + if (input.devMode) { + // Do not cache when running out of sources... + return ExtensionScanner.scanExtensions(input, log); + } + + try { + const folderStat = await pfs.stat(input.absoluteFolderPath); + input.mtime = folderStat.mtime.getTime(); + } catch (err) { + // That's ok... + } + + const cacheContents = await this._readExtensionCache(environmentService, cacheKey); + if (cacheContents && cacheContents.input && ExtensionScannerInput.equals(cacheContents.input, input)) { + // Validate the cache asynchronously after 5s + setTimeout(async () => { + try { + await this._validateExtensionsCache(instantiationService, messageService, environmentService, cacheKey, input); + } catch (err) { + errors.onUnexpectedError(err); + } + }, 5000); + return cacheContents.result; + } + + const counterLogger = new CounterLogger(log); + const result = await ExtensionScanner.scanExtensions(input, counterLogger); + if (counterLogger.errorCnt === 0) { + // Nothing bad happened => cache the result + const cacheContents: IExtensionCacheData = { + input: input, + result: result + }; + await this._writeExtensionCache(environmentService, cacheKey, cacheContents); + } + + return result; + } + + private static _scanInstalledExtensions(instantiationService: IInstantiationService, messageService: IMessageService, environmentService: IEnvironmentService, log: ILog): TPromise<{ system: IExtensionDescription[], user: IExtensionDescription[], development: IExtensionDescription[] }> { + const version = pkg.version; + const commit = product.commit; + const devMode = !!process.env['VSCODE_DEV']; + const locale = platform.locale; + + const builtinExtensions = this._scanExtensionsWithCache( + instantiationService, + messageService, + environmentService, + BUILTIN_MANIFEST_CACHE_FILE, + new ExtensionScannerInput(version, commit, locale, devMode, SystemExtensionsRoot, true), + log + ); + + const userExtensions = ( + environmentService.disableExtensions || !environmentService.extensionsPath + ? TPromise.as([]) + : this._scanExtensionsWithCache( + instantiationService, + messageService, + environmentService, + USER_MANIFEST_CACHE_FILE, + new ExtensionScannerInput(version, commit, locale, devMode, environmentService.extensionsPath, false), + log + ) + ); + + // Always load developed extensions while extensions development + const developedExtensions = ( + environmentService.isExtensionDevelopment + ? ExtensionScanner.scanOneOrMultipleExtensions( + new ExtensionScannerInput(version, commit, locale, devMode, environmentService.extensionDevelopmentPath, false), log + ) + : TPromise.as([]) + ); + + return TPromise.join([builtinExtensions, userExtensions, developedExtensions]) + .then((extensionDescriptions: IExtensionDescription[][]) => { + const system = extensionDescriptions[0]; + const user = extensionDescriptions[1]; + const development = extensionDescriptions[2]; + return { system, user, development }; + }).then(null, err => { + log.error('', err); + return { system: [], user: [], development: [] }; + }); + } + private static _handleExtensionPoint(extensionPoint: ExtensionPoint, availableExtensions: IExtensionDescription[], messageHandler: (msg: IMessage) => void): void { let users: IExtensionPointUser[] = [], usersLen = 0; for (let i = 0, len = availableExtensions.length; i < len; i++) { @@ -483,9 +667,37 @@ export class ExtensionService implements IExtensionService { } } - public _onExtensionActivated(extensionId: string, startup: boolean, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number): void { - this._extensionHostProcessActivationTimes[extensionId] = new ActivationTimes(startup, codeLoadingTime, activateCallTime, activateResolvedTime); + public _onExtensionActivated(extensionId: string, startup: boolean, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number, activationEvent: string): void { + this._extensionHostProcessActivationTimes[extensionId] = new ActivationTimes(startup, codeLoadingTime, activateCallTime, activateResolvedTime, activationEvent); + this._onDidChangeExtensionsStatus.fire([extensionId]); } + + public _onExtensionRuntimeError(extensionId: string, err: Error): void { + if (!this._extensionHostExtensionRuntimeErrors[extensionId]) { + this._extensionHostExtensionRuntimeErrors[extensionId] = []; + } + this._extensionHostExtensionRuntimeErrors[extensionId].push(err); + this._onDidChangeExtensionsStatus.fire([extensionId]); + } + + public _addMessage(extensionId: string, severity: Severity, message: string): void { + if (!this._extensionsMessages[extensionId]) { + this._extensionsMessages[extensionId] = []; + } + this._extensionsMessages[extensionId].push({ + type: severity, + message: message, + source: null, + extensionId: null, + extensionPointId: null + }); + this._onDidChangeExtensionsStatus.fire([extensionId]); + } +} + +interface IExtensionCacheData { + input: ExtensionScannerInput; + result: IExtensionDescription[]; } export class Logger implements ILog { @@ -510,3 +722,34 @@ export class Logger implements ILog { this._messageHandler(Severity.Info, source, message); } } + +class CounterLogger implements ILog { + + public errorCnt = 0; + public warnCnt = 0; + public infoCnt = 0; + + constructor(private readonly _actual: ILog) { + } + + public error(source: string, message: string): void { + this._actual.error(source, message); + } + + public warn(source: string, message: string): void { + this._actual.warn(source, message); + } + + public info(source: string, message: string): void { + this._actual.info(source, message); + } +} + +class NullLogger implements ILog { + public error(source: string, message: string): void { + } + public warn(source: string, message: string): void { + } + public info(source: string, message: string): void { + } +} diff --git a/src/vs/workbench/services/files/electron-browser/fileService.ts b/src/vs/workbench/services/files/electron-browser/fileService.ts index e6896e48d5a..18987ccf7e0 100644 --- a/src/vs/workbench/services/files/electron-browser/fileService.ts +++ b/src/vs/workbench/services/files/electron-browser/fileService.ts @@ -89,6 +89,8 @@ export class FileService implements IFileService { } private onFileServiceError(msg: string): void { + + // Forward to unexpected error handler errors.onUnexpectedError(msg); // Detect if we run < .NET Framework 4.5 diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index e2fb38062b7..c1c668826b1 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -768,7 +768,7 @@ export class FileService implements IFileService { const absolutePath = this.toAbsolutePath(resource); return pfs.stat(absolutePath).then(stat => { - return new StatResolver(resource, stat.isDirectory(), stat.mtime.getTime(), stat.size, this.options.verboseLogging); + return new StatResolver(resource, stat.isDirectory(), stat.mtime.getTime(), stat.size, this.options.verboseLogging ? this.options.errorLogger : void 0); }); } @@ -1000,9 +1000,9 @@ export class StatResolver { private name: string; private etag: string; private size: number; - private verboseLogging: boolean; + private errorLogger: (msg) => void; - constructor(resource: uri, isDirectory: boolean, mtime: number, size: number, verboseLogging: boolean) { + constructor(resource: uri, isDirectory: boolean, mtime: number, size: number, errorLogger?: (msg) => void) { assert.ok(resource && resource.scheme === 'file', 'Invalid resource: ' + resource); this.resource = resource; @@ -1012,7 +1012,7 @@ export class StatResolver { this.etag = etag(size, mtime); this.size = size; - this.verboseLogging = verboseLogging; + this.errorLogger = errorLogger; } public resolve(options: IResolveFileOptions): TPromise { @@ -1062,8 +1062,8 @@ export class StatResolver { private resolveChildren(absolutePath: string, absoluteTargetPaths: string[], resolveSingleChildDescendants: boolean, callback: (children: IFileStat[]) => void): void { extfs.readdir(absolutePath, (error: Error, files: string[]) => { if (error) { - if (this.verboseLogging) { - console.error(error); + if (this.errorLogger) { + this.errorLogger(error); } return callback(null); // return - we might not have permissions to read the folder @@ -1077,8 +1077,8 @@ export class StatResolver { flow.sequence( function onError(error: Error): void { - if ($this.verboseLogging) { - console.error(error); + if ($this.errorLogger) { + $this.errorLogger(error); } clb(null, null); // return - we might not have permissions to read the folder or stat the file diff --git a/src/vs/workbench/services/files/test/node/resolver.test.ts b/src/vs/workbench/services/files/test/node/resolver.test.ts index 7bbc269b714..cc314d67d75 100644 --- a/src/vs/workbench/services/files/test/node/resolver.test.ts +++ b/src/vs/workbench/services/files/test/node/resolver.test.ts @@ -19,7 +19,7 @@ function create(relativePath: string): StatResolver { let absolutePath = relativePath ? path.join(basePath, relativePath) : basePath; let fsStat = fs.statSync(absolutePath); - return new StatResolver(uri.file(absolutePath), fsStat.isDirectory(), fsStat.mtime.getTime(), fsStat.size, false); + return new StatResolver(uri.file(absolutePath), fsStat.isDirectory(), fsStat.mtime.getTime(), fsStat.size, void 0); } function toResource(relativePath: string): uri { diff --git a/src/vs/workbench/services/group/common/groupService.ts b/src/vs/workbench/services/group/common/groupService.ts index 5a614d5c9a4..94476c83187 100644 --- a/src/vs/workbench/services/group/common/groupService.ts +++ b/src/vs/workbench/services/group/common/groupService.ts @@ -22,9 +22,11 @@ export const IEditorGroupService = createDecorator('editorG export interface IEditorTabOptions { showTabs?: boolean; tabCloseButton?: 'left' | 'right' | 'off'; + tabSizing?: 'fit' | 'shrink'; showIcons?: boolean; previewEditors?: boolean; labelFormat?: 'default' | 'short' | 'medium' | 'long'; + iconTheme?: string; } export interface IMoveOptions { diff --git a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts index d3e29c3b221..acb735b407f 100644 --- a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts +++ b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts @@ -569,25 +569,22 @@ let schema: IJSONSchema = { let schemaRegistry = Registry.as(Extensions.JSONContribution); schemaRegistry.registerSchema(schemaId, schema); -if (OS === OperatingSystem.Macintosh || OS === OperatingSystem.Linux) { - - const configurationRegistry = Registry.as(ConfigExtensions.Configuration); - const keyboardConfiguration: IConfigurationNode = { - 'id': 'keyboard', - 'order': 15, - 'type': 'object', - 'title': nls.localize('keyboardConfigurationTitle', "Keyboard"), - 'overridable': true, - 'properties': { - 'keyboard.dispatch': { - 'type': 'string', - 'enum': ['code', 'keyCode'], - 'default': 'code', - 'description': nls.localize('dispatch', "Controls the dispatching logic for key presses to use either `code` (recommended) or `keyCode`.") - } +const configurationRegistry = Registry.as(ConfigExtensions.Configuration); +const keyboardConfiguration: IConfigurationNode = { + 'id': 'keyboard', + 'order': 15, + 'type': 'object', + 'title': nls.localize('keyboardConfigurationTitle', "Keyboard"), + 'overridable': true, + 'properties': { + 'keyboard.dispatch': { + 'type': 'string', + 'enum': ['code', 'keyCode'], + 'default': 'code', + 'description': nls.localize('dispatch', "Controls the dispatching logic for key presses to use either `code` (recommended) or `keyCode`."), + 'included': OS === OperatingSystem.Macintosh || OS === OperatingSystem.Linux } - }; + } +}; - configurationRegistry.registerConfiguration(keyboardConfiguration); - -} +configurationRegistry.registerConfiguration(keyboardConfiguration); diff --git a/src/vs/workbench/services/message/browser/messageService.ts b/src/vs/workbench/services/message/browser/messageService.ts index 9fe4dd36645..77a2a3ceb86 100644 --- a/src/vs/workbench/services/message/browser/messageService.ts +++ b/src/vs/workbench/services/message/browser/messageService.ts @@ -136,7 +136,7 @@ export class WorkbenchMessageService implements IMessageService { } } - public confirmSync(confirmation: IConfirmation): boolean { + public confirm(confirmation: IConfirmation): boolean { let messageText = confirmation.message; if (confirmation.detail) { messageText = messageText + '\n\n' + confirmation.detail; @@ -145,8 +145,8 @@ export class WorkbenchMessageService implements IMessageService { return window.confirm(messageText); } - public confirm(confirmation: IConfirmation): TPromise { - return TPromise.as({ confirmed: this.confirmSync(confirmation) } as IConfirmationResult); + public confirmWithCheckbox(confirmation: IConfirmation): TPromise { + return TPromise.as({ confirmed: this.confirm(confirmation) } as IConfirmationResult); } public dispose(): void { diff --git a/src/vs/workbench/services/message/electron-browser/messageService.ts b/src/vs/workbench/services/message/electron-browser/messageService.ts index f676f67dc54..079ccb80cac 100644 --- a/src/vs/workbench/services/message/electron-browser/messageService.ts +++ b/src/vs/workbench/services/message/electron-browser/messageService.ts @@ -26,10 +26,10 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe super(container, telemetryService); } - public confirm(confirmation: IConfirmation): TPromise { + public confirmWithCheckbox(confirmation: IConfirmation): TPromise { const opts = this.getConfirmOptions(confirmation); - return this.showMessageBox(opts).then(result => { + return this.showMessageBoxWithCheckbox(opts).then(result => { return { confirmed: result.button === 0 ? true : false, checkboxChecked: result.checkboxChecked @@ -37,10 +37,21 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe }); } - public confirmSync(confirmation: IConfirmation): boolean { + private showMessageBoxWithCheckbox(opts: Electron.MessageBoxOptions): TPromise { + opts = this.massageMessageBoxOptions(opts); + + return this.windowService.showMessageBoxWithCheckbox(opts).then(result => { + return { + button: isLinux ? opts.buttons.length - result.button - 1 : result.button, + checkboxChecked: result.checkboxChecked + } as IMessageBoxResult; + }); + } + + public confirm(confirmation: IConfirmation): boolean { const opts = this.getConfirmOptions(confirmation); - const result = this.showMessageBoxSync(opts); + const result = this.showMessageBox(opts); return result === 0 ? true : false; } @@ -86,7 +97,7 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe public choose(severity: Severity, message: string, options: string[], cancelId: number, modal: boolean = false): TPromise { if (modal) { const type: 'none' | 'info' | 'error' | 'question' | 'warning' = severity === Severity.Info ? 'question' : severity === Severity.Error ? 'error' : severity === Severity.Warning ? 'warning' : 'none'; - return TPromise.wrap(this.showMessageBoxSync({ message, buttons: options, type, cancelId })); + return TPromise.wrap(this.showMessageBox({ message, buttons: options, type, cancelId })); } let onCancel: () => void = null; @@ -105,21 +116,10 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe return promise; } - private showMessageBox(opts: Electron.MessageBoxOptions): TPromise { + private showMessageBox(opts: Electron.MessageBoxOptions): number { opts = this.massageMessageBoxOptions(opts); - return this.windowService.showMessageBox(opts).then(result => { - return { - button: isLinux ? opts.buttons.length - result.button - 1 : result.button, - checkboxChecked: result.checkboxChecked - } as IMessageBoxResult; - }); - } - - private showMessageBoxSync(opts: Electron.MessageBoxOptions): number { - opts = this.massageMessageBoxOptions(opts); - - const result = this.windowService.showMessageBoxSync(opts); + const result = this.windowService.showMessageBox(opts); return isLinux ? opts.buttons.length - result - 1 : result; } @@ -129,6 +129,8 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe if (opts.defaultId !== void 0) { opts.defaultId = isLinux ? opts.buttons.length - opts.defaultId - 1 : opts.defaultId; + } else if (isLinux) { + opts.defaultId = opts.buttons.length - 1; // since we reversed the buttons } if (opts.cancelId !== void 0) { diff --git a/src/vs/workbench/services/part/common/partService.ts b/src/vs/workbench/services/part/common/partService.ts index efe91aa8b69..0199e49527f 100644 --- a/src/vs/workbench/services/part/common/partService.ts +++ b/src/vs/workbench/services/part/common/partService.ts @@ -28,6 +28,11 @@ export interface ILayoutOptions { source?: Parts; } +export interface Dimension { + readonly width: number; + readonly height: number; +} + export const IPartService = createDecorator('partService'); export interface IPartService { @@ -41,7 +46,7 @@ export interface IPartService { /** * Emits when the editor part's layout changes. */ - onEditorLayout: Event; + onEditorLayout: Event; /** * Asks the part service to layout all parts. diff --git a/src/vs/workbench/services/progress/browser/progressService2.ts b/src/vs/workbench/services/progress/browser/progressService2.ts index b6de990d858..2e1c2e4153c 100644 --- a/src/vs/workbench/services/progress/browser/progressService2.ts +++ b/src/vs/workbench/services/progress/browser/progressService2.ts @@ -65,7 +65,7 @@ export class ProgressService2 implements IProgressService2 { // } - withProgress(options: IProgressOptions, task: (progress: IProgress<{ message?: string, percentage?: number }>) => TPromise): void { + withProgress(options: IProgressOptions, task: (progress: IProgress<{ message?: string, percentage?: number }>) => Thenable): void { const { location } = options; switch (location) { case ProgressLocation.Window: @@ -80,7 +80,7 @@ export class ProgressService2 implements IProgressService2 { } - private _withWindowProgress(options: IProgressOptions, callback: (progress: IProgress<{ message?: string, percentage?: number }>) => TPromise): void { + private _withWindowProgress(options: IProgressOptions, callback: (progress: IProgress<{ message?: string, percentage?: number }>) => Thenable): void { const task: [IProgressOptions, Progress] = [options, new Progress(() => this._updateWindowProgress())]; @@ -104,7 +104,7 @@ export class ProgressService2 implements IProgressService2 { }, 150); // cancel delay if promise finishes below 150ms - always(promise, () => clearTimeout(delayHandle)); + always(TPromise.wrap(promise), () => clearTimeout(delayHandle)); } private _updateWindowProgress(idx: number = 0) { @@ -138,14 +138,14 @@ export class ProgressService2 implements IProgressService2 { } } - private _withViewletProgress(viewletId: string, task: (progress: IProgress<{ message?: string, percentage?: number }>) => TPromise): void { + private _withViewletProgress(viewletId: string, task: (progress: IProgress<{ message?: string, percentage?: number }>) => Thenable): void { const promise = task(emptyProgress); // show in viewlet const viewletProgress = this._viewletService.getProgressIndicator(viewletId); if (viewletProgress) { - viewletProgress.showWhile(promise); + viewletProgress.showWhile(TPromise.wrap(promise)); } // show activity bar diff --git a/src/vs/workbench/services/scm/common/scmService.ts b/src/vs/workbench/services/scm/common/scmService.ts index dadee567ffa..db569fc7c57 100644 --- a/src/vs/workbench/services/scm/common/scmService.ts +++ b/src/vs/workbench/services/scm/common/scmService.ts @@ -8,6 +8,7 @@ import { IDisposable, toDisposable } from 'vs/base/common/lifecycle'; import Event, { Emitter } from 'vs/base/common/event'; import { ISCMService, ISCMProvider, ISCMInput, ISCMRepository } from './scm'; +import { ILogService } from 'vs/platform/log/common/log'; class SCMInput implements ISCMInput { @@ -76,9 +77,11 @@ export class SCMService implements ISCMService { private _onDidRemoveProvider = new Emitter(); get onDidRemoveRepository(): Event { return this._onDidRemoveProvider.event; } - constructor() { } + constructor( @ILogService private logService: ILogService) { } registerSCMProvider(provider: ISCMProvider): ISCMRepository { + this.logService.trace('SCMService#registerSCMProvider'); + if (this._providerIds.has(provider.id)) { throw new Error(`SCM Provider ${provider.id} already exists.`); } diff --git a/src/vs/workbench/services/search/node/fileSearch.ts b/src/vs/workbench/services/search/node/fileSearch.ts index 372fab93bdf..2e6d6ed3caa 100644 --- a/src/vs/workbench/services/search/node/fileSearch.ts +++ b/src/vs/workbench/services/search/node/fileSearch.ts @@ -26,6 +26,7 @@ import extfs = require('vs/base/node/extfs'); import flow = require('vs/base/node/flow'); import { IRawFileMatch, ISerializedSearchComplete, IRawSearch, ISearchEngine, IFolderSearch } from './search'; import { spawnRipgrepCmd } from './ripgrepFileSearch'; +import { rgErrorMsgForDisplay } from './ripgrepTextSearch'; enum Traversal { Node = 1, @@ -189,8 +190,9 @@ export class FileWalker { rootFolderDone(undefined, undefined); } }); - }, (err, result) => { - done(err ? err[0] : null, this.isLimitHit); + }, (errors, result) => { + const err = errors ? errors.filter(e => !!e)[0] : null; + done(err, this.isLimitHit); }); }); } @@ -389,13 +391,17 @@ export class FileWalker { this.forwardData(cmd.stdout, encoding, done); const stderr = this.collectData(cmd.stderr); + let gotData = false; + cmd.stdout.once('data', () => gotData = true); + cmd.on('error', (err: Error) => { done(err); }); cmd.on('close', (code: number) => { // ripgrep returns code=1 when no results are found - if (code !== 0 && (!isRipgrep || code !== 1)) { + let stderrText, displayMsg: string; + if (isRipgrep ? (!gotData && (stderrText = this.decodeData(stderr, encoding)) && (displayMsg = rgErrorMsgForDisplay(stderrText))) : code !== 0) { done(new Error(`command failed with error code ${code}: ${this.decodeData(stderr, encoding)}`)); } else { if (isRipgrep && this.exists && code === 0) { diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts index 51e417436a9..ac82683de63 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts @@ -121,7 +121,7 @@ export class RipgrepEngine { this.isDone = true; let displayMsg: string; process.removeListener('exit', this.killRgProcFn); - if (stderr && !gotData && (displayMsg = this.rgErrorMsgForDisplay(stderr))) { + if (stderr && !gotData && (displayMsg = rgErrorMsgForDisplay(stderr))) { done(new Error(displayMsg), { limitHit: false, stats: null @@ -136,27 +136,27 @@ export class RipgrepEngine { }); }); } +} - /** - * Read the first line of stderr and return an error for display or undefined, based on a whitelist. - * Ripgrep produces stderr output which is not from a fatal error, and we only want the search to be - * "failed" when a fatal error was produced. - */ - private rgErrorMsgForDisplay(msg: string): string | undefined { - const firstLine = msg.split('\n')[0]; +/** + * Read the first line of stderr and return an error for display or undefined, based on a whitelist. + * Ripgrep produces stderr output which is not from a fatal error, and we only want the search to be + * "failed" when a fatal error was produced. + */ +export function rgErrorMsgForDisplay(msg: string): string | undefined { + const firstLine = msg.split('\n')[0]; - if (strings.startsWith(firstLine, 'Error parsing regex')) { - return firstLine; - } - - if (strings.startsWith(firstLine, 'error parsing glob') || - strings.startsWith(firstLine, 'unsupported encoding')) { - // Uppercase first letter - return firstLine.charAt(0).toUpperCase() + firstLine.substr(1); - } - - return undefined; + if (strings.startsWith(firstLine, 'Error parsing regex')) { + return firstLine; } + + if (strings.startsWith(firstLine, 'error parsing glob') || + strings.startsWith(firstLine, 'unsupported encoding')) { + // Uppercase first letter + return firstLine.charAt(0).toUpperCase() + firstLine.substr(1); + } + + return undefined; } export class RipgrepParser extends EventEmitter { diff --git a/src/vs/workbench/services/search/node/searchService.ts b/src/vs/workbench/services/search/node/searchService.ts index 04c75203a10..b6307b38dd4 100644 --- a/src/vs/workbench/services/search/node/searchService.ts +++ b/src/vs/workbench/services/search/node/searchService.ts @@ -28,6 +28,7 @@ export class SearchService implements ISearchService { private diskSearch: DiskSearch; private readonly searchProvider: ISearchResultProvider[] = []; + private forwardingTelemetry: PPromise; constructor( @IModelService private modelService: IModelService, @@ -38,7 +39,6 @@ export class SearchService implements ISearchService { ) { this.diskSearch = new DiskSearch(!environmentService.isBuilt || environmentService.verbose, /*timeout=*/undefined, environmentService.debugSearch); this.registerSearchResultProvider(this.diskSearch); - this.forwardTelemetry(); } public registerSearchResultProvider(provider: ISearchResultProvider): IDisposable { @@ -76,6 +76,7 @@ export class SearchService implements ISearchService { } public search(query: ISearchQuery): PPromise { + this.forwardTelemetry(); let combinedPromise: TPromise; @@ -210,10 +211,12 @@ export class SearchService implements ISearchService { } private forwardTelemetry() { - this.diskSearch.fetchTelemetry() - .then(null, onUnexpectedError, event => { - this.telemetryService.publicLog(event.eventName, event.data); - }); + if (!this.forwardingTelemetry) { + this.forwardingTelemetry = this.diskSearch.fetchTelemetry() + .then(null, onUnexpectedError, event => { + this.telemetryService.publicLog(event.eventName, event.data); + }); + } } } diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index ee7360e86b3..4905dff62b3 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -145,8 +145,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil // We have received reports of users seeing delete events even though the file still // exists (network shares issue: https://github.com/Microsoft/vscode/issues/13665). // Since we do not want to mark the model as orphaned, we have to check if the - // file is really gone and not just a faulty file event (TODO@Ben revisit when we - // have a more stable file watcher in place for this scenario). + // file is really gone and not just a faulty file event. checkOrphanedPromise = TPromise.timeout(100).then(() => { if (this.disposed) { return true; diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index b3739579733..da197f08234 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -14,13 +14,12 @@ import Event, { Emitter } from 'vs/base/common/event'; import platform = require('vs/base/common/platform'); import { IWindowsService } from 'vs/platform/windows/common/windows'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; -import { IRevertOptions, IResult, ITextFileOperationResult, ITextFileService, IRawTextContent, IAutoSaveConfiguration, AutoSaveMode, SaveReason, ITextFileEditorModelManager, ITextFileEditorModel, ModelState, ISaveOptions } from 'vs/workbench/services/textfile/common/textfiles'; +import { IResult, ITextFileOperationResult, ITextFileService, IRawTextContent, IAutoSaveConfiguration, AutoSaveMode, SaveReason, ITextFileEditorModelManager, ITextFileEditorModel, ModelState, ISaveOptions } from 'vs/workbench/services/textfile/common/textfiles'; import { ConfirmResult } from 'vs/workbench/common/editor'; import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IFileService, IResolveContentOptions, IFilesConfiguration, FileOperationError, FileOperationResult, AutoSaveConfiguration, HotExitConfiguration } from 'vs/platform/files/common/files'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService'; @@ -31,6 +30,7 @@ import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { ResourceMap } from 'vs/base/common/map'; import { Schemas } from 'vs/base/common/network'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; +import { IRevertOptions } from 'vs/platform/editor/common/editor'; export interface IBackupResult { didBackup: boolean; @@ -62,7 +62,6 @@ export abstract class TextFileService implements ITextFileService { private lifecycleService: ILifecycleService, private contextService: IWorkspaceContextService, private configurationService: IConfigurationService, - private telemetryService: ITelemetryService, protected fileService: IFileService, private untitledEditorService: IUntitledEditorService, private instantiationService: IInstantiationService, @@ -87,15 +86,6 @@ export abstract class TextFileService implements ITextFileService { this.onFilesConfigurationChange(configuration); - /* __GDPR__ - "autoSave" : { - "${include}": [ - "${IAutoSaveConfiguration}" - ] - } - */ - this.telemetryService.publicLog('autoSave', this.getAutoSaveConfiguration()); - this.registerListeners(); } @@ -105,7 +95,7 @@ export abstract class TextFileService implements ITextFileService { abstract resolveTextContent(resource: URI, options?: IResolveContentOptions): TPromise; - abstract promptForPath(defaultPath?: string): string; + abstract promptForPath(defaultPath: string): string; abstract confirmSave(resources?: URI[]): ConfirmResult; @@ -222,16 +212,6 @@ export abstract class TextFileService implements ITextFileService { return TPromise.as({ didBackup: false }); } - // Telemetry - /* __GDPR__ - "hotExit:triggered" : { - "reason" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "windowCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "fileCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('hotExit:triggered', { reason, windowCount, fileCount: dirtyToBackup.length }); - // Backup return this.backupAll(dirtyToBackup, textFileEditorModelManager).then(() => { return { didBackup: true }; }); }); @@ -647,6 +627,11 @@ export abstract class TextFileService implements ITextFileService { return URI.file(paths.join(paths.dirname(lastActiveFile.fsPath), untitledFileName)).fsPath; } + const lastActiveFolder = this.historyService.getLastActiveWorkspaceRoot('file'); + if (lastActiveFolder) { + return URI.file(paths.join(lastActiveFolder.fsPath, untitledFileName)).fsPath; + } + return untitledFileName; } diff --git a/src/vs/workbench/services/textfile/common/textfiles.ts b/src/vs/workbench/services/textfile/common/textfiles.ts index 3a649cade6e..81c64fdf345 100644 --- a/src/vs/workbench/services/textfile/common/textfiles.ts +++ b/src/vs/workbench/services/textfile/common/textfiles.ts @@ -13,6 +13,7 @@ import { IBaseStat, IResolveContentOptions } from 'vs/platform/files/common/file import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { IRawTextSource } from 'vs/editor/common/model/textSource'; +import { IRevertOptions } from 'vs/platform/editor/common/editor'; /** * The save error handler can be installed on the text text file editor model to install code that executes when save errors occur. @@ -100,13 +101,6 @@ export interface IResult { success?: boolean; } -/* __GDPR__FRAGMENT__ - "IAutoSaveConfiguration" : { - "autoSaveDelay" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "autoSaveFocusChange": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "autoSaveApplicationChange": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } -*/ export interface IAutoSaveConfiguration { autoSaveDelay: number; autoSaveFocusChange: boolean; @@ -217,19 +211,6 @@ export interface ITextFileEditorModel extends ITextEditorModel, IEncodingSupport isDisposed(): boolean; } -export interface IRevertOptions { - - /** - * Forces to load the contents from disk again even if the file is not dirty. - */ - force?: boolean; - - /** - * A soft revert will clear dirty state of a file but not attempt to load the contents from disk. - */ - soft?: boolean; -} - export interface ITextFileService extends IDisposable { _serviceBrand: any; onAutoSaveConfigurationChange: Event; diff --git a/src/vs/workbench/services/textfile/electron-browser/textFileService.ts b/src/vs/workbench/services/textfile/electron-browser/textFileService.ts index 00fe49fd947..58049539538 100644 --- a/src/vs/workbench/services/textfile/electron-browser/textFileService.ts +++ b/src/vs/workbench/services/textfile/electron-browser/textFileService.ts @@ -18,7 +18,6 @@ import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/un import { IFileService, IResolveContentOptions } from 'vs/platform/files/common/files'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ModelBuilder } from 'vs/workbench/services/textfile/electron-browser/modelBuilder'; @@ -41,7 +40,6 @@ export class TextFileService extends AbstractTextFileService { @IUntitledEditorService untitledEditorService: IUntitledEditorService, @ILifecycleService lifecycleService: ILifecycleService, @IInstantiationService instantiationService: IInstantiationService, - @ITelemetryService telemetryService: ITelemetryService, @IConfigurationService configurationService: IConfigurationService, @IModeService private modeService: IModeService, @IWindowService private windowService: IWindowService, @@ -51,7 +49,7 @@ export class TextFileService extends AbstractTextFileService { @IWindowsService windowsService: IWindowsService, @IHistoryService historyService: IHistoryService ) { - super(lifecycleService, contextService, configurationService, telemetryService, fileService, untitledEditorService, instantiationService, messageService, environmentService, backupFileService, windowsService, historyService); + super(lifecycleService, contextService, configurationService, fileService, untitledEditorService, instantiationService, messageService, environmentService, backupFileService, windowsService, historyService); } public resolveTextContent(resource: URI, options?: IResolveContentOptions): TPromise { @@ -132,16 +130,16 @@ export class TextFileService extends AbstractTextFileService { opts.defaultId = 2; } - const choice = this.windowService.showMessageBoxSync(opts); + const choice = this.windowService.showMessageBox(opts); return buttons[choice].result; } - public promptForPath(defaultPath?: string): string { + public promptForPath(defaultPath: string): string { return this.windowService.showSaveDialog(this.getSaveDialogOptions(defaultPath)); } - private getSaveDialogOptions(defaultPath?: string): Electron.SaveDialogOptions { + private getSaveDialogOptions(defaultPath: string): Electron.SaveDialogOptions { const options: Electron.SaveDialogOptions = { defaultPath }; // Filters are only enabled on Windows where they work properly diff --git a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts index e81451b195a..b7ee1e4675d 100644 --- a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts +++ b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts @@ -49,6 +49,8 @@ class ResourceModelCollection extends ReferenceCollection { + // ignore }); } diff --git a/src/vs/workbench/services/themes/common/colorThemeSchema.ts b/src/vs/workbench/services/themes/common/colorThemeSchema.ts index 4e7c779283c..bfaae07ad34 100644 --- a/src/vs/workbench/services/themes/common/colorThemeSchema.ts +++ b/src/vs/workbench/services/themes/common/colorThemeSchema.ts @@ -184,6 +184,7 @@ export function tokenColorsSchema(description: string): IJSONSchema { const schemaId = 'vscode://schemas/color-theme'; const schema: IJSONSchema = { type: 'object', + allowComments: true, properties: { colors: colorsSchema, tokenColors: { diff --git a/src/vs/workbench/services/themes/common/fileIconThemeSchema.ts b/src/vs/workbench/services/themes/common/fileIconThemeSchema.ts index b26a44c5ab7..e9133b81d4a 100644 --- a/src/vs/workbench/services/themes/common/fileIconThemeSchema.ts +++ b/src/vs/workbench/services/themes/common/fileIconThemeSchema.ts @@ -11,6 +11,7 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema'; const schemaId = 'vscode://schemas/icon-theme'; const schema: IJSONSchema = { type: 'object', + allowComments: true, definitions: { folderExpanded: { type: 'string', diff --git a/src/vs/workbench/services/timer/node/timerService.ts b/src/vs/workbench/services/timer/node/timerService.ts index e140cd95814..2aafef25729 100644 --- a/src/vs/workbench/services/timer/node/timerService.ts +++ b/src/vs/workbench/services/timer/node/timerService.ts @@ -88,7 +88,7 @@ export class TimerService implements ITimerService { cpus = { count: rawCpus.length, speed: rawCpus[0].speed, model: rawCpus[0].model }; } } catch (error) { - console.error(error); // be on the safe side with these hardware method calls + // ignore, be on the safe side with these hardware method calls } this._startupMetrics = { diff --git a/src/vs/workbench/services/workspace/node/workspaceEditingService.ts b/src/vs/workbench/services/workspace/node/workspaceEditingService.ts index 5803459ade3..7bb21530f42 100644 --- a/src/vs/workbench/services/workspace/node/workspaceEditingService.ts +++ b/src/vs/workbench/services/workspace/node/workspaceEditingService.ts @@ -16,7 +16,7 @@ import { IWorkspaceIdentifier, IWorkspaceFolderCreationData } from 'vs/platform/ import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import { WorkspaceService } from 'vs/workbench/services/configuration/node/configurationService'; import { migrateStorageToMultiRootWorkspace } from 'vs/platform/storage/common/migration'; -import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { IStorageService } from 'vs/platform/storage/common/storage'; import { StorageService } from 'vs/platform/storage/common/storageService'; import { ConfigurationScope, IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; import { Registry } from 'vs/platform/registry/common/platform'; @@ -28,15 +28,11 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; import { distinct } from 'vs/base/common/arrays'; import { isLinux } from 'vs/base/common/platform'; import { isEqual } from 'vs/base/common/resources'; -import { Action } from 'vs/base/common/actions'; -import product from 'vs/platform/node/product'; export class WorkspaceEditingService implements IWorkspaceEditingService { public _serviceBrand: any; - private static readonly INFO_MESSAGE_KEY = 'enterWorkspace.message'; - constructor( @IJSONEditingService private jsonEditingService: IJSONEditingService, @IWorkspaceContextService private contextService: WorkspaceService, @@ -145,17 +141,14 @@ export class WorkspaceEditingService implements IWorkspaceEditingService { if (result) { return this.migrate(result.workspace).then(() => { - // Show message to user (once) if entering workspace state - if (this.contextService.getWorkbenchState() !== WorkbenchState.WORKSPACE) { - this.informUserOnce(); // TODO@Ben remove me after a couple of releases - } + // TODO@Ben TODO@Sandeep the following requires ugly casts and should probably have a service interface // Reinitialize backup service - const backupFileService = this.backupFileService as BackupFileService; // TODO@Ben ugly cast + const backupFileService = this.backupFileService as BackupFileService; backupFileService.initialize(result.backupPath); // Reinitialize configuration service - const workspaceImpl = this.contextService as WorkspaceService; // TODO@Ben TODO@Sandeep ugly cast + const workspaceImpl = this.contextService as WorkspaceService; return workspaceImpl.initialize(result.workspace); }); } @@ -168,53 +161,6 @@ export class WorkspaceEditingService implements IWorkspaceEditingService { }); } - private informUserOnce(): void { - if (product.quality !== 'stable') { - return; // only for stable - } - - if (this.storageService.getBoolean(WorkspaceEditingService.INFO_MESSAGE_KEY)) { - return; // user does not want to see it again - } - - const closeAction = new Action( - 'enterWorkspace.close', - nls.localize('enterWorkspace.close', "Close"), - null, - true, - () => TPromise.as(true) - ); - - const dontShowAgainAction = new Action( - 'enterWorkspace.dontShowAgain', - nls.localize('enterWorkspace.dontShowAgain', "Don't Show Again"), - null, - true, - () => { - this.storageService.store(WorkspaceEditingService.INFO_MESSAGE_KEY, true, StorageScope.GLOBAL); - - return TPromise.as(true); - } - ); - const moreInfoAction = new Action( - 'enterWorkspace.moreInfo', - nls.localize('enterWorkspace.moreInfo', "More Information"), - null, - true, - () => { - const uri = URI.parse('https://go.microsoft.com/fwlink/?linkid=861970'); - window.open(uri.toString(true)); - - return TPromise.as(true); - } - ); - - this.messageService.show(Severity.Info, { - message: nls.localize('enterWorkspace.prompt', "Learn more about working with multiple folders in VS Code."), - actions: [moreInfoAction, dontShowAgainAction, closeAction] - }); - } - private migrate(toWorkspace: IWorkspaceIdentifier): TPromise { // Storage (UI State) migration diff --git a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts index e8c7a63c6fb..b9fcbd97a82 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts @@ -32,6 +32,7 @@ import { ExtHostDiagnostics } from 'vs/workbench/api/node/extHostDiagnostics'; import * as vscode from 'vscode'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import 'vs/workbench/parts/search/electron-browser/search.contribution'; +import { NoopLogService } from 'vs/platform/log/common/log'; const defaultSelector = { scheme: 'far' }; const model: EditorCommon.IModel = EditorModel.createFromString( @@ -113,7 +114,7 @@ suite('ExtHostLanguageFeatureCommands', function () { const heapService = new ExtHostHeapService(); - commands = new ExtHostCommands(threadService, heapService); + commands = new ExtHostCommands(threadService, heapService, new NoopLogService()); threadService.set(ExtHostContext.ExtHostCommands, commands); threadService.setTestInstance(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); ExtHostApiCommands.register(commands); @@ -195,6 +196,22 @@ suite('ExtHostLanguageFeatureCommands', function () { }, done); }); + test('executeWorkspaceSymbolProvider should accept empty string, #39522', async function () { + + disposables.push(extHost.registerWorkspaceSymbolProvider({ + provideWorkspaceSymbols(query) { + return [new types.SymbolInformation('hello', types.SymbolKind.Array, new types.Range(0, 0, 0, 0), URI.parse('foo:bar'))]; + } + })); + + await threadService.sync(); + let symbols = await commands.executeCommand('vscode.executeWorkspaceSymbolProvider', ''); + assert.equal(symbols.length, 1); + + await threadService.sync(); + symbols = await commands.executeCommand('vscode.executeWorkspaceSymbolProvider', '*'); + assert.equal(symbols.length, 1); + }); // --- definition diff --git a/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts index 69759480fc2..9ea21cf75fa 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts @@ -12,6 +12,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { OneGetThreadService } from './testThreadService'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; +import { NoopLogService } from 'vs/platform/log/common/log'; suite('ExtHostCommands', function () { @@ -29,7 +30,7 @@ suite('ExtHostCommands', function () { } }; - const commands = new ExtHostCommands(OneGetThreadService(shape), undefined); + const commands = new ExtHostCommands(OneGetThreadService(shape), undefined, new NoopLogService()); commands.registerCommand('foo', (): any => { }).dispose(); assert.equal(lastUnregister, 'foo'); assert.equal(CommandsRegistry.getCommand('foo'), undefined); @@ -50,7 +51,7 @@ suite('ExtHostCommands', function () { } }; - const commands = new ExtHostCommands(OneGetThreadService(shape), undefined); + const commands = new ExtHostCommands(OneGetThreadService(shape), undefined, new NoopLogService()); const reg = commands.registerCommand('foo', (): any => { }); reg.dispose(); reg.dispose(); diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts index 06167349726..6e802feca8b 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts @@ -16,12 +16,23 @@ import { OneGetThreadService } from './testThreadService'; import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import * as vscode from 'vscode'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; +import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; suite('ExtHostDocumentSaveParticipant', () => { let resource = URI.parse('foo:bar'); let mainThreadEditors = new class extends mock() { }; let documents: ExtHostDocuments; + let nullExtensionDescription: IExtensionDescription = { + id: 'nullExtensionDescription', + name: 'Null Extension Description', + publisher: 'vscode', + enableProposedApi: false, + engines: undefined, + extensionFolderPath: undefined, + isBuiltin: false, + version: undefined + }; setup(() => { const documentsAndEditors = new ExtHostDocumentsAndEditors(OneGetThreadService(null)); @@ -47,7 +58,7 @@ suite('ExtHostDocumentSaveParticipant', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); let event: vscode.TextDocumentWillSaveEvent; - let sub = participant.onWillSaveTextDocumentEvent(function (e) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { event = e; }); @@ -64,7 +75,7 @@ suite('ExtHostDocumentSaveParticipant', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); let event: vscode.TextDocumentWillSaveEvent; - let sub = participant.onWillSaveTextDocumentEvent(function (e) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { event = e; }); @@ -79,7 +90,7 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, bad listener', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); - let sub = participant.onWillSaveTextDocumentEvent(function (e) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { throw new Error('💀'); }); @@ -94,11 +105,11 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, bad listener doesn\'t prevent more events', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); - let sub1 = participant.onWillSaveTextDocumentEvent(function (e) { + let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { throw new Error('💀'); }); let event: vscode.TextDocumentWillSaveEvent; - let sub2 = participant.onWillSaveTextDocumentEvent(function (e) { + let sub2 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { event = e; }); @@ -114,11 +125,11 @@ suite('ExtHostDocumentSaveParticipant', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); let counter = 0; - let sub1 = participant.onWillSaveTextDocumentEvent(function (event) { + let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { assert.equal(counter++, 0); }); - let sub2 = participant.onWillSaveTextDocumentEvent(function (event) { + let sub2 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { assert.equal(counter++, 1); }); @@ -128,42 +139,39 @@ suite('ExtHostDocumentSaveParticipant', () => { }); }); - test('event delivery, ignore bad listeners', () => { + test('event delivery, ignore bad listeners', async () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors, { timeout: 5, errors: 1 }); let callCount = 0; - let sub = participant.onWillSaveTextDocumentEvent(function (event) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { callCount += 1; throw new Error('boom'); }); - return TPromise.join([ - participant.$participateInSave(resource, SaveReason.EXPLICIT), - participant.$participateInSave(resource, SaveReason.EXPLICIT), - participant.$participateInSave(resource, SaveReason.EXPLICIT), - participant.$participateInSave(resource, SaveReason.EXPLICIT) + await participant.$participateInSave(resource, SaveReason.EXPLICIT); + await participant.$participateInSave(resource, SaveReason.EXPLICIT); + await participant.$participateInSave(resource, SaveReason.EXPLICIT); + await participant.$participateInSave(resource, SaveReason.EXPLICIT); - ]).then(values => { - sub.dispose(); - assert.equal(callCount, 2); - }); + sub.dispose(); + assert.equal(callCount, 2); }); test('event delivery, overall timeout', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors, { timeout: 20, errors: 5 }); let callCount = 0; - let sub1 = participant.onWillSaveTextDocumentEvent(function (event) { + let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { callCount += 1; event.waitUntil(TPromise.timeout(17)); }); - let sub2 = participant.onWillSaveTextDocumentEvent(function (event) { + let sub2 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { callCount += 1; event.waitUntil(TPromise.timeout(17)); }); - let sub3 = participant.onWillSaveTextDocumentEvent(function (event) { + let sub3 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { callCount += 1; }); @@ -180,7 +188,7 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, waitUntil', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); - let sub = participant.onWillSaveTextDocumentEvent(function (event) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { event.waitUntil(TPromise.timeout(10)); event.waitUntil(TPromise.timeout(10)); @@ -196,7 +204,7 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, waitUntil must be called sync', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); - let sub = participant.onWillSaveTextDocumentEvent(function (event) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { event.waitUntil(new TPromise((resolve, reject) => { setTimeout(() => { @@ -219,7 +227,7 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, waitUntil will timeout', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors, { timeout: 5, errors: 3 }); - let sub = participant.onWillSaveTextDocumentEvent(function (event) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { event.waitUntil(TPromise.timeout(15)); }); @@ -234,12 +242,12 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, waitUntil failure handling', () => { const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); - let sub1 = participant.onWillSaveTextDocumentEvent(function (e) { + let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { e.waitUntil(TPromise.wrapError(new Error('dddd'))); }); let event: vscode.TextDocumentWillSaveEvent; - let sub2 = participant.onWillSaveTextDocumentEvent(function (e) { + let sub2 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { event = e; }); @@ -260,7 +268,7 @@ suite('ExtHostDocumentSaveParticipant', () => { } }); - let sub = participant.onWillSaveTextDocumentEvent(function (e) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { e.waitUntil(TPromise.as([TextEdit.insert(new Position(0, 0), 'bar')])); e.waitUntil(TPromise.as([TextEdit.setEndOfLine(EndOfLine.CRLF)])); }); @@ -283,7 +291,7 @@ suite('ExtHostDocumentSaveParticipant', () => { } }); - let sub = participant.onWillSaveTextDocumentEvent(function (e) { + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { // concurrent change from somewhere documents.$acceptModelChanged(resource.toString(), { @@ -333,7 +341,7 @@ suite('ExtHostDocumentSaveParticipant', () => { const document = documents.getDocumentData(resource).document; - let sub1 = participant.onWillSaveTextDocumentEvent(function (e) { + let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { // the document state we started with assert.equal(document.version, 1); assert.equal(document.getText(), 'foo'); @@ -341,7 +349,7 @@ suite('ExtHostDocumentSaveParticipant', () => { e.waitUntil(TPromise.as([TextEdit.insert(new Position(0, 0), 'bar')])); }); - let sub2 = participant.onWillSaveTextDocumentEvent(function (e) { + let sub2 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { // the document state AFTER the first listener kicked in assert.equal(document.version, 2); assert.equal(document.getText(), 'barfoo'); diff --git a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts index 25248c8ed97..e1fb7ffbb5d 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts @@ -25,7 +25,7 @@ import { IHeapService } from 'vs/workbench/api/electron-browser/mainThreadHeapSe import { ExtHostDocuments } from 'vs/workbench/api/node/extHostDocuments'; import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/node/extHostDocumentsAndEditors'; import { getDocumentSymbols } from 'vs/editor/contrib/quickOpen/quickOpen'; -import { DocumentSymbolProviderRegistry, DocumentHighlightKind, Hover, Command } from 'vs/editor/common/modes'; +import { DocumentSymbolProviderRegistry, DocumentHighlightKind, Hover } from 'vs/editor/common/modes'; import { getCodeLensData } from 'vs/editor/contrib/codelens/codelens'; import { getDefinitionsAtPosition, getImplementationsAtPosition, getTypeDefinitionsAtPosition } from 'vs/editor/contrib/goToDeclaration/goToDeclaration'; import { getHover } from 'vs/editor/contrib/hover/getHover'; @@ -44,6 +44,7 @@ import { ExtHostDiagnostics } from 'vs/workbench/api/node/extHostDiagnostics'; import { ExtHostHeapService } from 'vs/workbench/api/node/extHostHeapService'; import * as vscode from 'vscode'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { NoopLogService } from 'vs/platform/log/common/log'; const defaultSelector = { scheme: 'far' }; const model: EditorCommon.IModel = EditorModel.createFromString( @@ -102,7 +103,7 @@ suite('ExtHostLanguageFeatures', function () { const heapService = new ExtHostHeapService(); - const commands = new ExtHostCommands(threadService, heapService); + const commands = new ExtHostCommands(threadService, heapService, new NoopLogService()); threadService.set(ExtHostContext.ExtHostCommands, commands); threadService.setTestInstance(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); @@ -655,11 +656,11 @@ suite('ExtHostLanguageFeatures', function () { return getCodeActions(model, model.getFullModelRange()).then(value => { assert.equal(value.length, 2); - const [first, second]: Command[] = value as any; + const [first, second] = value; assert.equal(first.title, 'Testing1'); - assert.equal(first.id, 'test1'); + assert.equal(first.command.id, 'test1'); assert.equal(second.title, 'Testing2'); - assert.equal(second.id, 'test2'); + assert.equal(second.command.id, 'test2'); }); }); }); diff --git a/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts b/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts index 1eaf46831e4..26c9913d5b6 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts @@ -17,27 +17,45 @@ import { TestInstantiationService } from 'vs/platform/instantiation/test/common/ import { MainThreadCommands } from 'vs/workbench/api/electron-browser/mainThreadCommands'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { TreeItemCollapsibleState, ITreeItem } from 'vs/workbench/common/views'; +import { NoopLogService } from 'vs/platform/log/common/log'; -suite('ExtHostConfiguration', function () { - +suite('ExtHostTreeView', function () { class RecordingShape extends mock() { - onRefresh = new Emitter(); + onRefresh = new Emitter<{ [treeItemHandle: string]: ITreeItem }>(); $registerView(treeViewId: string): void { } - $refresh(viewId: string, itemHandles: number[]): void { - this.onRefresh.fire(itemHandles); + $refresh(viewId: string, itemsToRefresh?: { [treeItemHandle: string]: ITreeItem }): void { + this.onRefresh.fire(itemsToRefresh); } } let testObject: ExtHostTreeViews; let target: RecordingShape; - let onDidChangeTreeData: Emitter; + let onDidChangeTreeNode: Emitter<{ key: string }>; + let onDidChangeTreeKey: Emitter; + let tree, labels, nodes; setup(() => { + tree = { + 'a': { + 'aa': {}, + 'ab': {} + }, + 'b': { + 'ba': {}, + 'bb': {} + } + }; + + labels = {}; + nodes = {}; + let threadService = new TestThreadService(); // Use IInstantiationService to get typechecking when instantiating let inst: IInstantiationService; @@ -48,97 +66,307 @@ suite('ExtHostConfiguration', function () { threadService.setTestInstance(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); target = new RecordingShape(); - testObject = new ExtHostTreeViews(target, new ExtHostCommands(threadService, new ExtHostHeapService())); - onDidChangeTreeData = new Emitter(); - testObject.registerTreeDataProvider('testDataProvider', aTreeDataProvider()); + testObject = new ExtHostTreeViews(target, new ExtHostCommands(threadService, new ExtHostHeapService(), new NoopLogService())); + onDidChangeTreeNode = new Emitter<{ key: string }>(); + onDidChangeTreeKey = new Emitter(); + testObject.registerTreeDataProvider('testNodeTreeProvider', aNodeTreeDataProvider()); + testObject.registerTreeDataProvider('testStringTreeProvider', aStringTreeDataProvider()); - testObject.$getElements('testDataProvider').then(elements => { + testObject.$getElements('testNodeTreeProvider').then(elements => { for (const element of elements) { - testObject.$getChildren('testDataProvider', element.handle); + testObject.$getChildren('testNodeTreeProvider', element.handle); } }); }); - test('refresh calls are throttled on roots', function (done) { + test('construct node tree', () => { + return testObject.$getElements('testNodeTreeProvider') + .then(elements => { + const actuals = elements.map(e => e.handle); + assert.deepEqual(actuals, ['0/0:a', '0/1:b']); + return TPromise.join([ + testObject.$getChildren('testNodeTreeProvider', '0/0:a') + .then(children => { + const actuals = children.map(e => e.handle); + assert.deepEqual(actuals, ['0/0:a/0:aa', '0/0:a/1:ab']); + return TPromise.join([ + testObject.$getChildren('testNodeTreeProvider', '0/0:a/0:aa').then(children => assert.equal(children.length, 0)), + testObject.$getChildren('testNodeTreeProvider', '0/0:a/1:ab').then(children => assert.equal(children.length, 0)) + ]); + }), + testObject.$getChildren('testNodeTreeProvider', '0/1:b') + .then(children => { + const actuals = children.map(e => e.handle); + assert.deepEqual(actuals, ['0/1:b/0:ba', '0/1:b/1:bb']); + return TPromise.join([ + testObject.$getChildren('testNodeTreeProvider', '0/1:b/0:ba').then(children => assert.equal(children.length, 0)), + testObject.$getChildren('testNodeTreeProvider', '0/1:b/1:bb').then(children => assert.equal(children.length, 0)) + ]); + }) + ]); + }); + }); + + test('construct string tree', () => { + return testObject.$getElements('testStringTreeProvider') + .then(elements => { + const actuals = elements.map(e => e.handle); + assert.deepEqual(actuals, ['a', 'b']); + return TPromise.join([ + testObject.$getChildren('testStringTreeProvider', 'a') + .then(children => { + const actuals = children.map(e => e.handle); + assert.deepEqual(actuals, ['aa', 'ab']); + return TPromise.join([ + testObject.$getChildren('testStringTreeProvider', 'aa').then(children => assert.equal(children.length, 0)), + testObject.$getChildren('testStringTreeProvider', 'ab').then(children => assert.equal(children.length, 0)) + ]); + }), + testObject.$getChildren('testStringTreeProvider', 'b') + .then(children => { + const actuals = children.map(e => e.handle); + assert.deepEqual(actuals, ['ba', 'bb']); + return TPromise.join([ + testObject.$getChildren('testStringTreeProvider', 'ba').then(children => assert.equal(children.length, 0)), + testObject.$getChildren('testStringTreeProvider', 'bb').then(children => assert.equal(children.length, 0)) + ]); + }) + ]); + }); + }); + + test('refresh root', function (done) { target.onRefresh.event(actuals => { - assert.equal(0, actuals.length); + assert.equal(undefined, actuals); done(); }); - onDidChangeTreeData.fire(); - onDidChangeTreeData.fire(); - onDidChangeTreeData.fire(); - onDidChangeTreeData.fire(); + onDidChangeTreeNode.fire(); + }); + + test('refresh a parent node', () => { + return new TPromise((c, e) => { + target.onRefresh.event(actuals => { + assert.deepEqual(['0/1:b'], Object.keys(actuals)); + assert.deepEqual(removeUnsetKeys(actuals['0/1:b']), { + handle: '0/1:b', + label: 'b', + }); + c(null); + }); + onDidChangeTreeNode.fire(getNode('b')); + }); + }); + + test('refresh a leaf node', function (done) { + target.onRefresh.event(actuals => { + assert.deepEqual(['0/1:b/1:bb'], Object.keys(actuals)); + assert.deepEqual(removeUnsetKeys(actuals['0/1:b/1:bb']), { + handle: '0/1:b/1:bb', + parentHandle: '0/1:b', + label: 'bb' + }); + done(); + }); + onDidChangeTreeNode.fire(getNode('bb')); + }); + + test('refresh parent and child node trigger refresh only on parent - scenario 1', function (done) { + target.onRefresh.event(actuals => { + assert.deepEqual(['0/1:b', '0/0:a/0:aa'], Object.keys(actuals)); + assert.deepEqual(removeUnsetKeys(actuals['0/1:b']), { + handle: '0/1:b', + label: 'b', + }); + assert.deepEqual(removeUnsetKeys(actuals['0/0:a/0:aa']), { + handle: '0/0:a/0:aa', + parentHandle: '0/0:a', + label: 'aa', + }); + done(); + }); + onDidChangeTreeNode.fire(getNode('b')); + onDidChangeTreeNode.fire(getNode('aa')); + onDidChangeTreeNode.fire(getNode('bb')); + }); + + test('refresh parent and child node trigger refresh only on parent - scenario 2', function (done) { + target.onRefresh.event(actuals => { + assert.deepEqual(['0/0:a/0:aa', '0/1:b'], Object.keys(actuals)); + assert.deepEqual(removeUnsetKeys(actuals['0/1:b']), { + handle: '0/1:b', + label: 'b', + }); + assert.deepEqual(removeUnsetKeys(actuals['0/0:a/0:aa']), { + handle: '0/0:a/0:aa', + parentHandle: '0/0:a', + label: 'aa', + }); + done(); + }); + onDidChangeTreeNode.fire(getNode('bb')); + onDidChangeTreeNode.fire(getNode('aa')); + onDidChangeTreeNode.fire(getNode('b')); + }); + + test('refresh an element for label change', function (done) { + labels['a'] = 'aa'; + target.onRefresh.event(actuals => { + assert.deepEqual(['0/0:a'], Object.keys(actuals)); + assert.deepEqual(removeUnsetKeys(actuals['0/0:a']), { + handle: '0/0:aa', + label: 'aa', + }); + done(); + }); + onDidChangeTreeNode.fire(getNode('a')); + }); + + test('refresh calls are throttled on roots', function (done) { + target.onRefresh.event(actuals => { + assert.equal(undefined, actuals); + done(); + }); + onDidChangeTreeNode.fire(); + onDidChangeTreeNode.fire(); + onDidChangeTreeNode.fire(); + onDidChangeTreeNode.fire(); }); test('refresh calls are throttled on elements', function (done) { target.onRefresh.event(actuals => { - assert.deepEqual([1, 2], actuals); + assert.deepEqual(['0/0:a', '0/1:b'], Object.keys(actuals)); done(); }); - onDidChangeTreeData.fire('a'); - onDidChangeTreeData.fire('b'); - onDidChangeTreeData.fire('b'); - onDidChangeTreeData.fire('a'); + onDidChangeTreeNode.fire(getNode('a')); + onDidChangeTreeNode.fire(getNode('b')); + onDidChangeTreeNode.fire(getNode('b')); + onDidChangeTreeNode.fire(getNode('a')); }); test('refresh calls are throttled on unknown elements', function (done) { target.onRefresh.event(actuals => { - assert.deepEqual([1, 2], actuals); + assert.deepEqual(['0/0:a', '0/1:b'], Object.keys(actuals)); done(); }); - onDidChangeTreeData.fire('a'); - onDidChangeTreeData.fire('b'); - onDidChangeTreeData.fire('g'); - onDidChangeTreeData.fire('a'); + onDidChangeTreeNode.fire(getNode('a')); + onDidChangeTreeNode.fire(getNode('b')); + onDidChangeTreeNode.fire(getNode('g')); + onDidChangeTreeNode.fire(getNode('a')); }); test('refresh calls are throttled on unknown elements and root', function (done) { target.onRefresh.event(actuals => { - assert.equal(0, actuals.length); + assert.equal(undefined, actuals); done(); }); - onDidChangeTreeData.fire('a'); - onDidChangeTreeData.fire('b'); - onDidChangeTreeData.fire('g'); - onDidChangeTreeData.fire(''); + onDidChangeTreeNode.fire(getNode('a')); + onDidChangeTreeNode.fire(getNode('b')); + onDidChangeTreeNode.fire(getNode('g')); + onDidChangeTreeNode.fire(); }); test('refresh calls are throttled on elements and root', function (done) { target.onRefresh.event(actuals => { - assert.equal(0, actuals.length); + assert.equal(undefined, actuals); done(); }); - onDidChangeTreeData.fire('a'); - onDidChangeTreeData.fire('b'); - onDidChangeTreeData.fire(); - onDidChangeTreeData.fire('a'); + onDidChangeTreeNode.fire(getNode('a')); + onDidChangeTreeNode.fire(getNode('b')); + onDidChangeTreeNode.fire(); + onDidChangeTreeNode.fire(getNode('a')); }); - function aTreeDataProvider(): TreeDataProvider { + test('generate unique handles from labels by escaping them', () => { + tree = { + 'a/0:b': {} + }; + + onDidChangeTreeNode.fire(); + + return testObject.$getElements('testNodeTreeProvider') + .then(elements => { + assert.deepEqual(elements.map(e => e.handle), ['0/0:a//0:b']); + }); + }); + + function removeUnsetKeys(obj: any): any { + const result = {}; + for (const key of Object.keys(obj)) { + if (obj[key] !== void 0) { + result[key] = obj[key]; + } + } + return result; + } + + function aNodeTreeDataProvider(): TreeDataProvider<{ key: string }> { return { - getChildren: (element: string): string[] => { - if (!element) { - return ['a', 'b']; - } - if (element === 'a') { - return ['aa', 'ab']; - } - if (element === 'b') { - return ['ba', 'bb']; - } - return []; + getChildren: (element: { key: string }): { key: string }[] => { + return getChildren(element ? element.key : undefined).map(key => getNode(key)); }, - getTreeItem: (element: string): TreeItem => { - return { - label: element - }; + getTreeItem: (element: { key: string }): TreeItem => { + return getTreeItem(element.key); }, - onDidChangeTreeData: onDidChangeTreeData.event + onDidChangeTreeData: onDidChangeTreeNode.event }; } + function aStringTreeDataProvider(): TreeDataProvider { + return { + getChildren: (element: string): string[] => { + return getChildren(element); + }, + getTreeItem: (element: string): TreeItem => { + return getTreeItem(element); + }, + onDidChangeTreeData: onDidChangeTreeKey.event + }; + } + + function getTreeElement(element): any { + let parent = tree; + for (let i = 0; i < element.length; i++) { + parent = parent[element.substring(0, i + 1)]; + if (!parent) { + return null; + } + } + return parent; + } + + function getChildren(key: string): string[] { + if (!key) { + return Object.keys(tree); + } + let treeElement = getTreeElement(key); + if (treeElement) { + const children = Object.keys(treeElement); + const collapsibleStateIndex = children.indexOf('collapsibleState'); + if (collapsibleStateIndex !== -1) { + children.splice(collapsibleStateIndex, 1); + } + return children; + } + return []; + } + + function getTreeItem(key: string): TreeItem { + const treeElement = getTreeElement(key); + return { + label: labels[key] || key, + collapsibleState: treeElement ? treeElement['collapsibleState'] : TreeItemCollapsibleState.Collapsed + }; + } + + function getNode(key: string): { key: string } { + if (!nodes[key]) { + nodes[key] = { key }; + } + return nodes[key]; + } + }); diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts index 8ad6d64fbd0..d8fe85cff6b 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts @@ -65,7 +65,6 @@ suite('MainThreadDocumentsAndEditors', () => { null, null, editorGroupService, - null ); /* tslint:enable */ }); diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts index a9e24acbef3..a0b70a56dc7 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts @@ -73,7 +73,6 @@ suite('MainThreadEditors', () => { null, null, editorGroupService, - null ); editors = new MainThreadEditors( @@ -84,7 +83,6 @@ suite('MainThreadEditors', () => { editorGroupService, null, null, - null, modelService ); }); diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts index e3e90a945e4..d6f3681d331 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts @@ -12,6 +12,8 @@ import { TestConfigurationService } from 'vs/platform/configuration/test/common/ import { workbenchInstantiationService, TestTextFileService } from 'vs/workbench/test/workbenchTestServices'; import { toResource } from 'vs/base/test/common/utils'; import { IModelService } from 'vs/editor/common/services/modelService'; +import { Range } from 'vs/editor/common/core/range'; +import { Selection } from 'vs/editor/common/core/selection'; import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel'; import { ITextFileService, SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import { TextFileEditorModelManager } from 'vs/workbench/services/textfile/common/textFileEditorModelManager'; @@ -112,4 +114,33 @@ suite('MainThreadSaveParticipant', function () { done(); }); }); + + test('trim final new lines bug#39750', function (done) { + const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/trim_final_new_line.txt'), 'utf8'); + + model.load().then(() => { + const configService = new TestConfigurationService(); + configService.setUserConfiguration('files', { 'trimFinalNewlines': true }); + + const participant = new TrimFinalNewLinesParticipant(configService, undefined); + + const textContent = 'Trim New Line'; + + // single line + let lineContent = `${textContent}`; + model.textEditorModel.setValue(lineContent); + // apply edits and push to undo stack. + let textEdits = [{ identifier: null, range: new Range(1, 14, 1, 14), text: '.', forceMoveMarkers: false }]; + model.textEditorModel.pushEditOperations([new Selection(1, 14, 1, 14)], textEdits, () => { return [new Selection(1, 15, 1, 15)]; }); + // undo + model.textEditorModel.undo(); + assert.equal(model.getValue(), `${textContent}`); + // trim final new lines should not mess the undo stack + participant.participate(model, { reason: SaveReason.EXPLICIT }); + model.textEditorModel.redo(); + assert.equal(model.getValue(), `${textContent}.`); + done(); + }); + }); + }); diff --git a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts index 7deb879a39c..23f83bea217 100644 --- a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts @@ -54,7 +54,7 @@ declare var __dirname: string; // git clone --separate-git-dir=testGit --no-checkout --single-branch https://chromium.googlesource.com/chromium/src testWorkspace // cd testWorkspace; git checkout 39a7f93d67f7 // Run from repository root folder with (test.bat on Windows): ./scripts/test.sh --grep QuickOpen.performance --timeout 180000 --testWorkspace -suite('QuickOpen performance (integration)', () => { +suite.skip('QuickOpen performance (integration)', () => { test('Measure', () => { if (process.env['VSCODE_PID']) { diff --git a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts index e4a382f3a78..abad8d1ee49 100644 --- a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts @@ -41,7 +41,7 @@ declare var __dirname: string; // git clone --separate-git-dir=testGit --no-checkout --single-branch https://chromium.googlesource.com/chromium/src testWorkspace // cd testWorkspace; git checkout 39a7f93d67f7 // Run from repository root folder with (test.bat on Windows): ./scripts/test-int-mocha.sh --grep TextSearch.performance --timeout 500000 --testWorkspace -suite('TextSearch performance (integration)', () => { +suite.skip('TextSearch performance (integration)', () => { test('Measure', () => { if (process.env['VSCODE_PID']) { diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index e0dccc45d3a..2d36b27c3b0 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -20,7 +20,7 @@ import Severity from 'vs/base/common/severity'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { IPartService, Parts, Position as PartPosition } from 'vs/workbench/services/part/common/partService'; +import { IPartService, Parts, Position as PartPosition, Dimension } from 'vs/workbench/services/part/common/partService'; import { TextModelResolverService } from 'vs/workbench/services/textmodelResolver/common/textModelResolverService'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IEditorInput, IEditorOptions, Position, Direction, IEditor, IResourceInput } from 'vs/platform/editor/common/editor'; @@ -168,7 +168,6 @@ export class TestTextFileService extends TextFileService { @ILifecycleService lifecycleService: ILifecycleService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IConfigurationService configurationService: IConfigurationService, - @ITelemetryService telemetryService: ITelemetryService, @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IFileService fileService: IFileService, @IUntitledEditorService untitledEditorService: IUntitledEditorService, @@ -178,7 +177,7 @@ export class TestTextFileService extends TextFileService { @IWindowsService windowsService: IWindowsService, @IHistoryService historyService: IHistoryService ) { - super(lifecycleService, contextService, configurationService, telemetryService, fileService, untitledEditorService, instantiationService, messageService, TestEnvironmentService, backupFileService, windowsService, historyService); + super(lifecycleService, contextService, configurationService, fileService, untitledEditorService, instantiationService, messageService, TestEnvironmentService, backupFileService, windowsService, historyService); } public setPromptPath(path: string): void { @@ -215,7 +214,7 @@ export class TestTextFileService extends TextFileService { }); } - public promptForPath(defaultPath?: string): string { + public promptForPath(defaultPath: string): string { return this.promptPath; } @@ -329,11 +328,11 @@ export class TestMessageService implements IMessageService { // No-op } - public confirmSync(confirmation: IConfirmation): boolean { + public confirm(confirmation: IConfirmation): boolean { return false; } - public confirm(confirmation: IConfirmation): Promise { + public confirmWithCheckbox(confirmation: IConfirmation): Promise { return TPromise.as({ confirmed: false }); } } @@ -343,13 +342,13 @@ export class TestPartService implements IPartService { public _serviceBrand: any; private _onTitleBarVisibilityChange = new Emitter(); - private _onEditorLayout = new Emitter(); + private _onEditorLayout = new Emitter(); public get onTitleBarVisibilityChange(): Event { return this._onTitleBarVisibilityChange.event; } - public get onEditorLayout(): Event { + public get onEditorLayout(): Event { return this._onEditorLayout.event; } @@ -832,7 +831,7 @@ export class TestBackupFileService implements IBackupFileService { public loadBackupResource(resource: URI): TPromise { return this.hasBackup(resource).then(hasBackup => { if (hasBackup) { - return this.getBackupResource(resource); + return this.toBackupResource(resource); } return void 0; @@ -847,7 +846,7 @@ export class TestBackupFileService implements IBackupFileService { return TPromise.as(void 0); } - public getBackupResource(resource: URI): URI { + public toBackupResource(resource: URI): URI { return null; } @@ -962,19 +961,19 @@ export class TestWindowService implements IWindowService { return TPromise.as(void 0); } - showMessageBoxSync(options: Electron.MessageBoxOptions): number { + showMessageBox(options: Electron.MessageBoxOptions): number { return 0; } - showMessageBox(options: Electron.MessageBoxOptions): Promise { + showMessageBoxWithCheckbox(options: Electron.MessageBoxOptions): Promise { return TPromise.as(void 0); } - showSaveDialog(options: Electron.SaveDialogOptions, callback?: (fileName: string) => void): string { + showSaveDialog(options: Electron.SaveDialogOptions): string { return void 0; } - showOpenDialog(options: Electron.OpenDialogOptions, callback?: (fileNames: string[]) => void): string[] { + showOpenDialog(options: Electron.OpenDialogOptions): string[] { return void 0; } diff --git a/test/electron/renderer.js b/test/electron/renderer.js index 93fb1472aa9..8afc71c35bf 100644 --- a/test/electron/renderer.js +++ b/test/electron/renderer.js @@ -12,6 +12,12 @@ const glob = require('glob'); const minimatch = require('minimatch'); const istanbul = require('istanbul'); const i_remap = require('remap-istanbul/lib/remap'); +const util = require('util'); + +// Disabled custom inspect. See #38847 +if (util.inspect && util.inspect['defaultOptions']) { + util.inspect['defaultOptions'].customInspect = false; +} let _tests_glob = '**/test/**/*.test.js'; let loader; diff --git a/test/smoke/README.md b/test/smoke/README.md index 48e4cd60acd..8856e454400 100644 --- a/test/smoke/README.md +++ b/test/smoke/README.md @@ -10,7 +10,7 @@ npm run smoketest npm run smoketest -- --build "path/to/code" # Data Migration tests -npm run smoketest -- --build "path/to/code-insiders" --stable "path/to/code" +npm run smoketest -- --build "path/to/code-insiders" --stable-build "path/to/code" ``` The script calls mocha, so all mocha arguments should work fine. For example, use `-f Git` to only run the `Git` tests. diff --git a/test/smoke/src/areas/css/css.test.ts b/test/smoke/src/areas/css/css.test.ts index 4a92af159e1..b7ee545445a 100644 --- a/test/smoke/src/areas/css/css.test.ts +++ b/test/smoke/src/areas/css/css.test.ts @@ -7,50 +7,52 @@ import * as assert from 'assert'; import { SpectronApplication } from '../../spectron/application'; import { ProblemSeverity, Problems } from '../problems/problems'; -describe('CSS', () => { - before(function () { - this.app.suiteName = 'CSS'; +export function setup() { + describe('CSS', () => { + before(function () { + this.app.suiteName = 'CSS'; + }); + + it('verifies quick outline', async function () { + const app = this.app as SpectronApplication; + await app.workbench.quickopen.openFile('style.css'); + + await app.workbench.editor.openOutline(); + await app.workbench.quickopen.waitForQuickOpenElements(names => names.length === 2); + }); + + it('verifies warnings for the empty rule', async function () { + const app = this.app as SpectronApplication; + await app.workbench.quickopen.openFile('style.css'); + await app.workbench.editor.waitForTypeInEditor('style.css', '.foo{}'); + + let warning = await app.client.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.WARNING)); + await app.screenCapturer.capture('CSS Warning in editor'); + assert.ok(warning, `Warning squiggle is not shown in 'style.css'.`); + + await app.workbench.problems.showProblemsView(); + warning = await app.client.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.WARNING)); + await app.screenCapturer.capture('CSS Warning in problems view'); + assert.ok(warning, 'Warning does not appear in Problems view.'); + await app.workbench.problems.hideProblemsView(); + }); + + it('verifies that warning becomes an error once setting changed', async function () { + const app = this.app as SpectronApplication; + await app.workbench.settingsEditor.addUserSetting('css.lint.emptyRules', '"error"'); + await app.workbench.quickopen.openFile('style.css'); + await app.workbench.editor.waitForTypeInEditor('style.css', '.foo{}'); + + let error = await app.client.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.ERROR)); + await app.screenCapturer.capture('CSS Error in editor'); + assert.ok(error, `Warning squiggle is not shown in 'style.css'.`); + + const problems = new Problems(app); + await problems.showProblemsView(); + error = await app.client.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.ERROR)); + await app.screenCapturer.capture('CSS Error in probles view'); + assert.ok(error, 'Warning does not appear in Problems view.'); + await problems.hideProblemsView(); + }); }); - - it('verifies quick outline', async function () { - const app = this.app as SpectronApplication; - await app.workbench.quickopen.openFile('style.css'); - - await app.workbench.editor.openOutline(); - await app.workbench.quickopen.waitForQuickOpenElements(names => names.length === 2); - }); - - it('verifies warnings for the empty rule', async function () { - const app = this.app as SpectronApplication; - await app.workbench.quickopen.openFile('style.css'); - await app.workbench.editor.waitForTypeInEditor('style.css', '.foo{}'); - - let warning = await app.client.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.WARNING)); - await app.screenCapturer.capture('CSS Warning in editor'); - assert.ok(warning, `Warning squiggle is not shown in 'style.css'.`); - - await app.workbench.problems.showProblemsView(); - warning = await app.client.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.WARNING)); - await app.screenCapturer.capture('CSS Warning in problems view'); - assert.ok(warning, 'Warning does not appear in Problems view.'); - await app.workbench.problems.hideProblemsView(); - }); - - it('verifies that warning becomes an error once setting changed', async function () { - const app = this.app as SpectronApplication; - await app.workbench.settingsEditor.addUserSetting('css.lint.emptyRules', '"error"'); - await app.workbench.quickopen.openFile('style.css'); - await app.workbench.editor.waitForTypeInEditor('style.css', '.foo{}'); - - let error = await app.client.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.ERROR)); - await app.screenCapturer.capture('CSS Error in editor'); - assert.ok(error, `Warning squiggle is not shown in 'style.css'.`); - - const problems = new Problems(app); - await problems.showProblemsView(); - error = await app.client.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.ERROR)); - await app.screenCapturer.capture('CSS Error in probles view'); - assert.ok(error, 'Warning does not appear in Problems view.'); - await problems.hideProblemsView(); - }); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/test/smoke/src/areas/debug/debug.test.ts b/test/smoke/src/areas/debug/debug.test.ts index 7ccef119531..3218911858d 100644 --- a/test/smoke/src/areas/debug/debug.test.ts +++ b/test/smoke/src/areas/debug/debug.test.ts @@ -11,144 +11,189 @@ import * as fs from 'fs'; import * as stripJsonComments from 'strip-json-comments'; import { SpectronApplication, Quality } from '../../spectron/application'; -describe('Debug', () => { +export function setup() { + describe('Debug', () => { + let skip = false; - before(async function () { - const app = this.app as SpectronApplication; + before(async function () { + const app = this.app as SpectronApplication; - if (app.quality === Quality.Dev) { - const extensionsPath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions'); + if (app.quality === Quality.Dev) { + const extensionsPath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions'); - const debugPath = path.join(extensionsPath, 'vscode-node-debug'); - const debugExists = fs.existsSync(debugPath); + const debugPath = path.join(extensionsPath, 'vscode-node-debug'); + const debugExists = fs.existsSync(debugPath); - const debug2Path = path.join(extensionsPath, 'vscode-node-debug2'); - const debug2Exists = fs.existsSync(debug2Path); + const debug2Path = path.join(extensionsPath, 'vscode-node-debug2'); + const debug2Exists = fs.existsSync(debug2Path); - if (!debugExists) { - console.warn(`Skipping debug tests because vscode-node-debug extension was not found in ${extensionsPath}`); + if (!debugExists) { + console.warn(`Skipping debug tests because vscode-node-debug extension was not found in ${extensionsPath}`); + skip = true; + return; + } + + if (!debug2Exists) { + console.warn(`Skipping debug tests because vscode-node-debug2 extension was not found in ${extensionsPath}`); + skip = true; + return; + } + + await new Promise((c, e) => fs.symlink(debugPath, path.join(app.extensionsPath, 'vscode-node-debug'), err => err ? e(err) : c())); + await new Promise((c, e) => fs.symlink(debug2Path, path.join(app.extensionsPath, 'vscode-node-debug2'), err => err ? e(err) : c())); + await app.reload(); + } + + this.app.suiteName = 'Debug'; + }); + + it('configure launch json', async function () { + if (skip) { + this.skip(); return; } - if (!debug2Exists) { - console.warn(`Skipping debug tests because vscode-node-debug2 extension was not found in ${extensionsPath}`); + const app = this.app as SpectronApplication; + + await app.workbench.debug.openDebugViewlet(); + await app.workbench.quickopen.openFile('app.js'); + await app.workbench.debug.configure(); + + const launchJsonPath = path.join(app.workspacePath, '.vscode', 'launch.json'); + const content = fs.readFileSync(launchJsonPath, 'utf8'); + const config = JSON.parse(stripJsonComments(content)); + config.configurations[0].protocol = 'inspector'; + fs.writeFileSync(launchJsonPath, JSON.stringify(config, undefined, 4), 'utf8'); + + await app.workbench.editor.waitForEditorContents('launch.json', contents => /"protocol": "inspector"/.test(contents)); + await app.screenCapturer.capture('launch.json file'); + + assert.equal(config.configurations[0].request, 'launch'); + assert.equal(config.configurations[0].type, 'node'); + if (process.platform === 'win32') { + assert.equal(config.configurations[0].program, '${workspaceFolder}\\bin\\www'); + } else { + assert.equal(config.configurations[0].program, '${workspaceFolder}/bin/www'); + } + }); + + it('breakpoints', async function () { + if (skip) { + this.skip(); return; } - await new Promise((c, e) => fs.symlink(debugPath, path.join(app.extensionsPath, 'vscode-node-debug'), err => err ? e(err) : c())); - await new Promise((c, e) => fs.symlink(debug2Path, path.join(app.extensionsPath, 'vscode-node-debug2'), err => err ? e(err) : c())); - await app.reload(); - } + const app = this.app as SpectronApplication; - this.app.suiteName = 'Debug'; - }); - - it('configure launch json', async function () { - const app = this.app as SpectronApplication; - - await app.workbench.debug.openDebugViewlet(); - await app.workbench.quickopen.openFile('app.js'); - await app.workbench.debug.configure(); - - const launchJsonPath = path.join(app.workspacePath, '.vscode', 'launch.json'); - const content = fs.readFileSync(launchJsonPath, 'utf8'); - const config = JSON.parse(stripJsonComments(content)); - config.configurations[0].protocol = 'inspector'; - fs.writeFileSync(launchJsonPath, JSON.stringify(config, undefined, 4), 'utf8'); - - await app.workbench.editor.waitForEditorContents('launch.json', contents => /"protocol": "inspector"/.test(contents)); - await app.screenCapturer.capture('launch.json file'); - - assert.equal(config.configurations[0].request, 'launch'); - assert.equal(config.configurations[0].type, 'node'); - if (process.platform === 'win32') { - assert.equal(config.configurations[0].program, '${workspaceFolder}\\bin\\www'); - } else { - assert.equal(config.configurations[0].program, '${workspaceFolder}/bin/www'); - } - }); - - it('breakpoints', async function () { - const app = this.app as SpectronApplication; - - await app.workbench.quickopen.openFile('index.js'); - await app.workbench.debug.setBreakpointOnLine(6); - await app.screenCapturer.capture('breakpoints are set'); - }); - - let port: number; - it('start debugging', async function () { - const app = this.app as SpectronApplication; - - port = await app.workbench.debug.startDebugging(); - await app.screenCapturer.capture('debugging has started'); - - await new Promise((c, e) => { - const request = http.get(`http://localhost:${port}`); - request.on('error', e); - app.workbench.debug.waitForStackFrame(sf => sf.name === 'index.js' && sf.lineNumber === 6, 'looking for index.js and line 6').then(c, e); + await app.workbench.quickopen.openFile('index.js'); + await app.workbench.debug.setBreakpointOnLine(6); + await app.screenCapturer.capture('breakpoints are set'); }); - await app.screenCapturer.capture('debugging is paused'); - }); + let port: number; + it('start debugging', async function () { + if (skip) { + this.skip(); + return; + } - it('focus stack frames and variables', async function () { - const app = this.app as SpectronApplication; + const app = this.app as SpectronApplication; - await app.client.waitFor(() => app.workbench.debug.getLocalVariableCount(), c => c === 4, 'there should be 4 local variables'); + port = await app.workbench.debug.startDebugging(); + await app.screenCapturer.capture('debugging has started'); - await app.workbench.debug.focusStackFrame('layer.js', 'looking for layer.js'); - await app.client.waitFor(() => app.workbench.debug.getLocalVariableCount(), c => c === 5, 'there should be 5 local variables'); + await new Promise((c, e) => { + const request = http.get(`http://localhost:${port}`); + request.on('error', e); + app.workbench.debug.waitForStackFrame(sf => sf.name === 'index.js' && sf.lineNumber === 6, 'looking for index.js and line 6').then(c, e); + }); - await app.workbench.debug.focusStackFrame('route.js', 'looking for route.js'); - await app.client.waitFor(() => app.workbench.debug.getLocalVariableCount(), c => c === 3, 'there should be 3 local variables'); - - await app.workbench.debug.focusStackFrame('index.js', 'looking for index.js'); - await app.client.waitFor(() => app.workbench.debug.getLocalVariableCount(), c => c === 4, 'there should be 4 local variables'); - }); - - it('stepOver, stepIn, stepOut', async function () { - const app = this.app as SpectronApplication; - - await app.workbench.debug.stepIn(); - await app.screenCapturer.capture('debugging has stepped in'); - - const first = await app.workbench.debug.waitForStackFrame(sf => sf.name === 'response.js', 'looking for response.js'); - await app.workbench.debug.stepOver(); - await app.screenCapturer.capture('debugging has stepped over'); - - await app.workbench.debug.waitForStackFrame(sf => sf.name === 'response.js' && sf.lineNumber === first.lineNumber + 1, `looking for response.js and line ${first.lineNumber + 1}`); - await app.workbench.debug.stepOut(); - await app.screenCapturer.capture('debugging has stepped out'); - - await app.workbench.debug.waitForStackFrame(sf => sf.name === 'index.js' && sf.lineNumber === 7, `looking for index.js and line 7`); - }); - - it('continue', async function () { - const app = this.app as SpectronApplication; - - await app.workbench.debug.continue(); - await app.screenCapturer.capture('debugging has continued'); - - await new Promise((c, e) => { - const request = http.get(`http://localhost:${port}`); - request.on('error', e); - app.workbench.debug.waitForStackFrame(sf => sf.name === 'index.js' && sf.lineNumber === 6, `looking for index.js and line 6`).then(c, e); + await app.screenCapturer.capture('debugging is paused'); }); - await app.screenCapturer.capture('debugging is paused'); + it('focus stack frames and variables', async function () { + if (skip) { + this.skip(); + return; + } + + const app = this.app as SpectronApplication; + + await app.client.waitFor(() => app.workbench.debug.getLocalVariableCount(), c => c === 4, 'there should be 4 local variables'); + + await app.workbench.debug.focusStackFrame('layer.js', 'looking for layer.js'); + await app.client.waitFor(() => app.workbench.debug.getLocalVariableCount(), c => c === 5, 'there should be 5 local variables'); + + await app.workbench.debug.focusStackFrame('route.js', 'looking for route.js'); + await app.client.waitFor(() => app.workbench.debug.getLocalVariableCount(), c => c === 3, 'there should be 3 local variables'); + + await app.workbench.debug.focusStackFrame('index.js', 'looking for index.js'); + await app.client.waitFor(() => app.workbench.debug.getLocalVariableCount(), c => c === 4, 'there should be 4 local variables'); + }); + + it('stepOver, stepIn, stepOut', async function () { + if (skip) { + this.skip(); + return; + } + + const app = this.app as SpectronApplication; + + await app.workbench.debug.stepIn(); + await app.screenCapturer.capture('debugging has stepped in'); + + const first = await app.workbench.debug.waitForStackFrame(sf => sf.name === 'response.js', 'looking for response.js'); + await app.workbench.debug.stepOver(); + await app.screenCapturer.capture('debugging has stepped over'); + + await app.workbench.debug.waitForStackFrame(sf => sf.name === 'response.js' && sf.lineNumber === first.lineNumber + 1, `looking for response.js and line ${first.lineNumber + 1}`); + await app.workbench.debug.stepOut(); + await app.screenCapturer.capture('debugging has stepped out'); + + await app.workbench.debug.waitForStackFrame(sf => sf.name === 'index.js' && sf.lineNumber === 7, `looking for index.js and line 7`); + }); + + it('continue', async function () { + if (skip) { + this.skip(); + return; + } + + const app = this.app as SpectronApplication; + + await app.workbench.debug.continue(); + await app.screenCapturer.capture('debugging has continued'); + + await new Promise((c, e) => { + const request = http.get(`http://localhost:${port}`); + request.on('error', e); + app.workbench.debug.waitForStackFrame(sf => sf.name === 'index.js' && sf.lineNumber === 6, `looking for index.js and line 6`).then(c, e); + }); + + await app.screenCapturer.capture('debugging is paused'); + }); + + it('debug console', async function () { + if (skip) { + this.skip(); + return; + } + + const app = this.app as SpectronApplication; + + await app.workbench.debug.waitForReplCommand('2 + 2', r => r === '4'); + }); + + it('stop debugging', async function () { + if (skip) { + this.skip(); + return; + } + + const app = this.app as SpectronApplication; + + await app.workbench.debug.stopDebugging(); + await app.screenCapturer.capture('debugging has stopped'); + }); }); - - it('debug console', async function () { - const app = this.app as SpectronApplication; - - await app.workbench.debug.waitForReplCommand('2 + 2', r => r === '4'); - }); - - it('stop debugging', async function () { - const app = this.app as SpectronApplication; - - await app.workbench.debug.stopDebugging(); - await app.screenCapturer.capture('debugging has stopped'); - }); -}); +} \ No newline at end of file diff --git a/test/smoke/src/areas/editor/editor.test.ts b/test/smoke/src/areas/editor/editor.test.ts index c6d588076ed..0911d100100 100644 --- a/test/smoke/src/areas/editor/editor.test.ts +++ b/test/smoke/src/areas/editor/editor.test.ts @@ -5,69 +5,71 @@ import { SpectronApplication } from '../../spectron/application'; -describe('Editor', () => { - before(function () { - this.app.suiteName = 'Editor'; +export function setup() { + describe('Editor', () => { + before(function () { + this.app.suiteName = 'Editor'; + }); + + it('shows correct quick outline', async function () { + const app = this.app as SpectronApplication; + await app.workbench.quickopen.openFile('www'); + + await app.workbench.editor.openOutline(); + await app.workbench.quickopen.waitForQuickOpenElements(names => names.length >= 6); + }); + + it(`finds 'All References' to 'app'`, async function () { + const app = this.app as SpectronApplication; + await app.workbench.quickopen.openFile('www'); + + const references = await app.workbench.editor.findReferences('app', 7); + + await references.waitForReferencesCountInTitle(3); + await references.waitForReferencesCount(3); + await references.close(); + }); + + it(`renames local 'app' variable`, async function () { + const app = this.app as SpectronApplication; + await app.workbench.quickopen.openFile('www'); + await app.workbench.editor.rename('www', 7, 'app', 'newApp'); + await app.workbench.editor.waitForEditorContents('www', contents => contents.indexOf('newApp') > -1); + await app.screenCapturer.capture('Rename result'); + }); + + // it('folds/unfolds the code correctly', async function () { + // await app.workbench.quickopen.openFile('www'); + + // // Fold + // await app.workbench.editor.foldAtLine(3); + // await app.workbench.editor.waitUntilShown(3); + // await app.workbench.editor.waitUntilHidden(4); + // await app.workbench.editor.waitUntilHidden(5); + + // // Unfold + // await app.workbench.editor.unfoldAtLine(3); + // await app.workbench.editor.waitUntilShown(3); + // await app.workbench.editor.waitUntilShown(4); + // await app.workbench.editor.waitUntilShown(5); + // }); + + it(`verifies that 'Go To Definition' works`, async function () { + const app = this.app as SpectronApplication; + await app.workbench.quickopen.openFile('app.js'); + + await app.workbench.editor.gotoDefinition('express', 11); + + await app.workbench.waitForActiveTab('index.d.ts'); + }); + + it(`verifies that 'Peek Definition' works`, async function () { + const app = this.app as SpectronApplication; + await app.workbench.quickopen.openFile('app.js'); + + const peek = await app.workbench.editor.peekDefinition('express', 11); + + await peek.waitForFile('index.d.ts'); + }); }); - - it('shows correct quick outline', async function () { - const app = this.app as SpectronApplication; - await app.workbench.quickopen.openFile('www'); - - await app.workbench.editor.openOutline(); - await app.workbench.quickopen.waitForQuickOpenElements(names => names.length >= 6); - }); - - it(`finds 'All References' to 'app'`, async function () { - const app = this.app as SpectronApplication; - await app.workbench.quickopen.openFile('www'); - - const references = await app.workbench.editor.findReferences('app', 7); - - await references.waitForReferencesCountInTitle(3); - await references.waitForReferencesCount(3); - await references.close(); - }); - - it(`renames local 'app' variable`, async function () { - const app = this.app as SpectronApplication; - await app.workbench.quickopen.openFile('www'); - await app.workbench.editor.rename('www', 7, 'app', 'newApp'); - await app.workbench.editor.waitForEditorContents('www', contents => contents.indexOf('newApp') > -1); - await app.screenCapturer.capture('Rename result'); - }); - - // it('folds/unfolds the code correctly', async function () { - // await app.workbench.quickopen.openFile('www'); - - // // Fold - // await app.workbench.editor.foldAtLine(3); - // await app.workbench.editor.waitUntilShown(3); - // await app.workbench.editor.waitUntilHidden(4); - // await app.workbench.editor.waitUntilHidden(5); - - // // Unfold - // await app.workbench.editor.unfoldAtLine(3); - // await app.workbench.editor.waitUntilShown(3); - // await app.workbench.editor.waitUntilShown(4); - // await app.workbench.editor.waitUntilShown(5); - // }); - - it(`verifies that 'Go To Definition' works`, async function () { - const app = this.app as SpectronApplication; - await app.workbench.quickopen.openFile('app.js'); - - await app.workbench.editor.gotoDefinition('express', 11); - - await app.workbench.waitForActiveTab('index.d.ts'); - }); - - it(`verifies that 'Peek Definition' works`, async function () { - const app = this.app as SpectronApplication; - await app.workbench.quickopen.openFile('app.js'); - - const peek = await app.workbench.editor.peekDefinition('express', 11); - - await peek.waitForFile('index.d.ts'); - }); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/test/smoke/src/areas/explorer/explorer.test.ts b/test/smoke/src/areas/explorer/explorer.test.ts index edf0088cf20..ab77642f6dd 100644 --- a/test/smoke/src/areas/explorer/explorer.test.ts +++ b/test/smoke/src/areas/explorer/explorer.test.ts @@ -5,38 +5,40 @@ import { SpectronApplication } from '../../spectron/application'; -describe('Explorer', () => { - before(function () { - this.app.suiteName = 'Explorer'; +export function setup() { + describe('Explorer', () => { + before(function () { + this.app.suiteName = 'Explorer'; + }); + + it('quick open search produces correct result', async function () { + const app = this.app as SpectronApplication; + const expectedNames = [ + '.eslintrc.json', + 'tasks.json', + 'app.js', + 'index.js', + 'users.js', + 'package.json', + 'jsconfig.json' + ]; + + await app.workbench.quickopen.openQuickOpen('.js'); + await app.workbench.quickopen.waitForQuickOpenElements(names => expectedNames.every(n => names.some(m => n === m))); + await app.client.keys(['Escape', 'NULL']); + }); + + it('quick open respects fuzzy matching', async function () { + const app = this.app as SpectronApplication; + const expectedNames = [ + 'tasks.json', + 'app.js', + 'package.json' + ]; + + await app.workbench.quickopen.openQuickOpen('a.s'); + await app.workbench.quickopen.waitForQuickOpenElements(names => expectedNames.every(n => names.some(m => n === m))); + await app.client.keys(['Escape', 'NULL']); + }); }); - - it('quick open search produces correct result', async function () { - const app = this.app as SpectronApplication; - const expectedNames = [ - '.eslintrc.json', - 'tasks.json', - 'app.js', - 'index.js', - 'users.js', - 'package.json', - 'jsconfig.json' - ]; - - await app.workbench.quickopen.openQuickOpen('.js'); - await app.workbench.quickopen.waitForQuickOpenElements(names => expectedNames.every(n => names.some(m => n === m))); - await app.client.keys(['Escape', 'NULL']); - }); - - it('quick open respects fuzzy matching', async function () { - const app = this.app as SpectronApplication; - const expectedNames = [ - 'tasks.json', - 'app.js', - 'package.json' - ]; - - await app.workbench.quickopen.openQuickOpen('a.s'); - await app.workbench.quickopen.waitForQuickOpenElements(names => expectedNames.every(n => names.some(m => n === m))); - await app.client.keys(['Escape', 'NULL']); - }); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/test/smoke/src/areas/extensions/extensions.test.ts b/test/smoke/src/areas/extensions/extensions.test.ts index 135b87403c3..33776a25405 100644 --- a/test/smoke/src/areas/extensions/extensions.test.ts +++ b/test/smoke/src/areas/extensions/extensions.test.ts @@ -6,31 +6,33 @@ import * as assert from 'assert'; import { SpectronApplication, Quality } from '../../spectron/application'; -describe('Extensions', () => { - before(function () { - this.app.suiteName = 'Extensions'; +export function setup() { + describe('Extensions', () => { + before(function () { + this.app.suiteName = 'Extensions'; + }); + + it(`install and activate vscode-smoketest-check extension`, async function () { + const app = this.app as SpectronApplication; + + if (app.quality === Quality.Dev) { + this.skip(); + return; + } + + const extensionName = 'vscode-smoketest-check'; + await app.workbench.extensions.openExtensionsViewlet(); + + const installed = await app.workbench.extensions.installExtension(extensionName); + assert.ok(installed); + + await app.reload(); + await app.workbench.extensions.waitForExtensionsViewlet(); + await app.workbench.quickopen.runCommand('Smoke Test Check'); + + const statusbarText = await app.workbench.statusbar.getStatusbarTextByTitle('smoke test'); + await app.screenCapturer.capture('Statusbar'); + assert.equal(statusbarText, 'VS Code Smoke Test Check'); + }); }); - - it(`install and activate vscode-smoketest-check extension`, async function () { - const app = this.app as SpectronApplication; - - if (app.quality === Quality.Dev) { - this.skip(); - return; - } - - const extensionName = 'vscode-smoketest-check'; - await app.workbench.extensions.openExtensionsViewlet(); - - const installed = await app.workbench.extensions.installExtension(extensionName); - assert.ok(installed); - - await app.reload(); - await app.workbench.extensions.waitForExtensionsViewlet(); - await app.workbench.quickopen.runCommand('Smoke Test Check'); - - const statusbarText = await app.workbench.statusbar.getStatusbarTextByTitle('smoke test'); - await app.screenCapturer.capture('Statusbar'); - assert.equal(statusbarText, 'VS Code Smoke Test Check'); - }); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/test/smoke/src/areas/git/git.test.ts b/test/smoke/src/areas/git/git.test.ts index d64a72f7d43..19f1c3e51d2 100644 --- a/test/smoke/src/areas/git/git.test.ts +++ b/test/smoke/src/areas/git/git.test.ts @@ -10,90 +10,79 @@ import { SpectronApplication } from '../../spectron/application'; const DIFF_EDITOR_LINE_INSERT = '.monaco-diff-editor .editor.modified .line-insert'; const SYNC_STATUSBAR = 'div[id="workbench.parts.statusbar"] .statusbar-entry a[title$="Synchronize Changes"]'; -describe('Git', () => { - before(function () { - this.app.suiteName = 'Git'; - }); +export function setup() { + describe('Git', () => { + before(function () { + this.app.suiteName = 'Git'; + }); - it('reflects working tree changes', async function () { - const app = this.app as SpectronApplication; + it('reflects working tree changes', async function () { + const app = this.app as SpectronApplication; - await app.workbench.scm.openSCMViewlet(); + await app.workbench.scm.openSCMViewlet(); - await app.workbench.quickopen.openFile('app.js'); - await app.workbench.editor.waitForTypeInEditor('app.js', '.foo{}'); - await app.workbench.saveOpenedFile(); + await app.workbench.quickopen.openFile('app.js'); + await app.workbench.editor.waitForTypeInEditor('app.js', '.foo{}'); + await app.workbench.saveOpenedFile(); - await app.workbench.quickopen.openFile('index.jade'); - await app.workbench.editor.waitForTypeInEditor('index.jade', 'hello world'); - await app.workbench.saveOpenedFile(); + await app.workbench.quickopen.openFile('index.jade'); + await app.workbench.editor.waitForTypeInEditor('index.jade', 'hello world'); + await app.workbench.saveOpenedFile(); - await app.workbench.scm.refreshSCMViewlet(); - const appJs = await app.workbench.scm.waitForChange(c => c.name === 'app.js'); - const indexJade = await app.workbench.scm.waitForChange(c => c.name === 'index.jade'); - await app.screenCapturer.capture('changes'); + await app.workbench.scm.refreshSCMViewlet(); + const appJs = await app.workbench.scm.waitForChange(c => c.name === 'app.js'); + const indexJade = await app.workbench.scm.waitForChange(c => c.name === 'index.jade'); + await app.screenCapturer.capture('changes'); - assert.equal(appJs.name, 'app.js'); - assert.equal(appJs.type, 'Modified'); + assert.equal(appJs.name, 'app.js'); + assert.equal(appJs.type, 'Modified'); - assert.equal(indexJade.name, 'index.jade'); - assert.equal(indexJade.type, 'Modified'); - }); + assert.equal(indexJade.name, 'index.jade'); + assert.equal(indexJade.type, 'Modified'); + }); - it('opens diff editor', async function () { - const app = this.app as SpectronApplication; + it('opens diff editor', async function () { + const app = this.app as SpectronApplication; - await app.workbench.scm.openSCMViewlet(); - const appJs = await app.workbench.scm.waitForChange(c => c.name === 'app.js'); - await app.workbench.scm.openChange(appJs); - await app.client.waitForElement(DIFF_EDITOR_LINE_INSERT); - }); + await app.workbench.scm.openSCMViewlet(); + const appJs = await app.workbench.scm.waitForChange(c => c.name === 'app.js'); + await app.workbench.scm.openChange(appJs); + await app.client.waitForElement(DIFF_EDITOR_LINE_INSERT); + }); - it('stages correctly', async function () { - const app = this.app as SpectronApplication; + it('stages correctly', async function () { + const app = this.app as SpectronApplication; - // TODO@joao get these working once joh fixes scm viewlet - if (!false) { - this.skip(); - return; - } + await app.workbench.scm.openSCMViewlet(); - await app.workbench.scm.openSCMViewlet(); + const appJs = await app.workbench.scm.waitForChange(c => c.name === 'app.js' && c.type === 'Modified'); + await app.workbench.scm.stage(appJs); - const appJs = await app.workbench.scm.waitForChange(c => c.name === 'app.js' && c.type === 'Modified'); - await app.workbench.scm.stage(appJs); + const indexAppJs = await app.workbench.scm.waitForChange(c => c.name === 'app.js' && c.type === 'Index Modified'); + await app.workbench.scm.unstage(indexAppJs); - const indexAppJs = await app.workbench.scm.waitForChange(c => c.name === 'app.js' && c.type === 'Index Modified'); - await app.workbench.scm.unstage(indexAppJs); + await app.workbench.scm.waitForChange(c => c.name === 'app.js' && c.type === 'Modified'); + }); - await app.workbench.scm.waitForChange(c => c.name === 'app.js' && c.type === 'Modified'); - }); + it(`stages, commits changes and verifies outgoing change`, async function () { + const app = this.app as SpectronApplication; - it(`stages, commits changes and verifies outgoing change`, async function () { - const app = this.app as SpectronApplication; + await app.workbench.scm.openSCMViewlet(); + + const appJs = await app.workbench.scm.waitForChange(c => c.name === 'app.js' && c.type === 'Modified'); + await app.workbench.scm.stage(appJs); + await app.workbench.scm.waitForChange(c => c.name === 'app.js' && c.type === 'Index Modified'); + + await app.workbench.scm.commit('first commit'); + await app.client.waitForText(SYNC_STATUSBAR, ' 0↓ 1↑'); + + await app.workbench.quickopen.runCommand('Git: Stage All Changes'); + await app.workbench.scm.waitForChange(c => c.name === 'index.jade' && c.type === 'Index Modified'); + + await app.workbench.scm.commit('second commit'); + await app.client.waitForText(SYNC_STATUSBAR, ' 0↓ 2↑'); - // TODO@joao get these working once joh fixes scm viewlet - if (!false) { cp.execSync('git reset --hard origin/master', { cwd: app.workspacePath }); - this.skip(); - return; - } - - await app.workbench.scm.openSCMViewlet(); - - const appJs = await app.workbench.scm.waitForChange(c => c.name === 'app.js' && c.type === 'Modified'); - await app.workbench.scm.stage(appJs); - await app.workbench.scm.waitForChange(c => c.name === 'app.js' && c.type === 'Index Modified'); - - await app.workbench.scm.commit('first commit'); - await app.client.waitForText(SYNC_STATUSBAR, ' 0↓ 1↑'); - - await app.workbench.quickopen.runCommand('Git: Stage All Changes'); - await app.workbench.scm.waitForChange(c => c.name === 'index.jade' && c.type === 'Index Modified'); - - await app.workbench.scm.commit('second commit'); - await app.client.waitForText(SYNC_STATUSBAR, ' 0↓ 2↑'); - - cp.execSync('git reset --hard origin/master', { cwd: app.workspacePath }); + }); }); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/test/smoke/src/areas/git/scm.ts b/test/smoke/src/areas/git/scm.ts index bc99619478a..ed33e320710 100644 --- a/test/smoke/src/areas/git/scm.ts +++ b/test/smoke/src/areas/git/scm.ts @@ -13,7 +13,7 @@ const SCM_RESOURCE = `${VIEWLET} .monaco-list-row > .resource`; const SCM_RESOURCE_GROUP = `${VIEWLET} .monaco-list-row > .resource-group`; const REFRESH_COMMAND = `div[id="workbench.parts.sidebar"] .actions-container a.action-label[title="Refresh"]`; const COMMIT_COMMAND = `div[id="workbench.parts.sidebar"] .actions-container a.action-label[title="Commit"]`; -const SCM_RESOURCE_CLICK = name => `${SCM_RESOURCE} .monaco-icon-label[title$="${name}"]`; +const SCM_RESOURCE_CLICK = name => `${SCM_RESOURCE} .monaco-icon-label[title*="${name}"]`; const SCM_RESOURCE_GROUP_COMMAND_CLICK = name => `${SCM_RESOURCE_GROUP} .actions .action-label[title="${name}"]`; export interface Change { @@ -49,7 +49,7 @@ export class SCM extends Viewlet { const result = await this.spectron.webclient.selectorExecute(SCM_RESOURCE, div => (Array.isArray(div) ? div : [div]).map(element => { const name = element.querySelector('.label-name') as HTMLElement; - const icon = element.querySelector('.monaco-icon-label') as HTMLElement; + const icon = element.querySelector('.decoration-icon') as HTMLElement; const actionElementList = element.querySelectorAll('.actions .action-label'); const actionElements: any[] = []; @@ -60,7 +60,7 @@ export class SCM extends Viewlet { return { name: name.textContent, - type: (icon.title || '').replace(/^([^,]+),.*$/, '$1'), + type: (icon.title || ''), element, actionElements }; diff --git a/test/smoke/src/areas/multiroot/multiroot.test.ts b/test/smoke/src/areas/multiroot/multiroot.test.ts index 9529fe3c324..3575dfedd70 100644 --- a/test/smoke/src/areas/multiroot/multiroot.test.ts +++ b/test/smoke/src/areas/multiroot/multiroot.test.ts @@ -6,32 +6,34 @@ import * as assert from 'assert'; import { SpectronApplication } from '../../spectron/application'; -describe('Multiroot', () => { +export function setup() { + describe('Multiroot', () => { - before(async function () { - this.app.suiteName = 'Multiroot'; + before(async function () { + this.app.suiteName = 'Multiroot'; - const app = this.app as SpectronApplication; + const app = this.app as SpectronApplication; - await app.restart([app.workspaceFilePath]); + await app.restart([app.workspaceFilePath]); - // for some reason Code opens 2 windows at this point - // so let's select the last one - await app.client.windowByIndex(2); + // for some reason Code opens 2 windows at this point + // so let's select the last one + await app.webclient.windowByIndex(1); + }); + + it('shows results from all folders', async function () { + const app = this.app as SpectronApplication; + await app.workbench.quickopen.openQuickOpen('*.*'); + + await app.workbench.quickopen.waitForQuickOpenElements(names => names.length >= 6); + await app.workbench.quickopen.closeQuickOpen(); + }); + + it('shows workspace name in title', async function () { + const app = this.app as SpectronApplication; + const title = await app.client.getTitle(); + await app.screenCapturer.capture('window title'); + assert.ok(title.indexOf('smoketest (Workspace)') >= 0); + }); }); - - it('shows results from all folders', async function () { - const app = this.app as SpectronApplication; - await app.workbench.quickopen.openQuickOpen('*.*'); - - await app.workbench.quickopen.waitForQuickOpenElements(names => names.length >= 6); - await app.workbench.quickopen.closeQuickOpen(); - }); - - it('shows workspace name in title', async function () { - const app = this.app as SpectronApplication; - const title = await app.client.getTitle(); - await app.screenCapturer.capture('window title'); - assert.ok(title.indexOf('smoketest (Workspace)') >= 0); - }); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/test/smoke/src/areas/preferences/preferences.test.ts b/test/smoke/src/areas/preferences/preferences.test.ts index 139997dfa82..f273d6a9c12 100644 --- a/test/smoke/src/areas/preferences/preferences.test.ts +++ b/test/smoke/src/areas/preferences/preferences.test.ts @@ -8,39 +8,41 @@ import * as assert from 'assert'; import { SpectronApplication } from '../../spectron/application'; import { ActivityBarPosition } from '../activitybar/activityBar'; -describe('Preferences', () => { - before(function () { - this.app.suiteName = 'Preferences'; +export function setup() { + describe('Preferences', () => { + before(function () { + this.app.suiteName = 'Preferences'; + }); + + it('turns off editor line numbers and verifies the live change', async function () { + const app = this.app as SpectronApplication; + + await app.workbench.explorer.openFile('app.js'); + let lineNumbers = await app.client.waitForElements('.line-numbers'); + await app.screenCapturer.capture('app.js has line numbers'); + assert.ok(!!lineNumbers.length, 'Line numbers are not present in the editor before disabling them.'); + + await app.workbench.settingsEditor.addUserSetting('editor.lineNumbers', '"off"'); + await app.workbench.selectTab('app.js'); + lineNumbers = await app.client.waitForElements('.line-numbers', result => !result || result.length === 0); + + await app.screenCapturer.capture('line numbers hidden'); + assert.ok(!lineNumbers.length, 'Line numbers are still present in the editor after disabling them.'); + }); + + it(`changes 'workbench.action.toggleSidebarPosition' command key binding and verifies it`, async function () { + const app = this.app as SpectronApplication; + assert.ok(await app.workbench.activitybar.getActivityBar(ActivityBarPosition.LEFT), 'Activity bar should be positioned on the left.'); + + await app.workbench.keybindingsEditor.updateKeybinding('workbench.action.toggleSidebarPosition', ['Control', 'u'], 'Control+U'); + + await app.client.keys(['Control', 'u', 'NULL']); + assert.ok(await app.workbench.activitybar.getActivityBar(ActivityBarPosition.RIGHT), 'Activity bar was not moved to right after toggling its position.'); + }); + + after(async function () { + const app = this.app as SpectronApplication; + await app.workbench.settingsEditor.clearUserSettings(); + }); }); - - it('turns off editor line numbers and verifies the live change', async function () { - const app = this.app as SpectronApplication; - - await app.workbench.explorer.openFile('app.js'); - let lineNumbers = await app.client.waitForElements('.line-numbers'); - await app.screenCapturer.capture('app.js has line numbers'); - assert.ok(!!lineNumbers.length, 'Line numbers are not present in the editor before disabling them.'); - - await app.workbench.settingsEditor.addUserSetting('editor.lineNumbers', '"off"'); - await app.workbench.selectTab('app.js'); - lineNumbers = await app.client.waitForElements('.line-numbers', result => !result || result.length === 0); - - await app.screenCapturer.capture('line numbers hidden'); - assert.ok(!lineNumbers.length, 'Line numbers are still present in the editor after disabling them.'); - }); - - it(`changes 'workbench.action.toggleSidebarPosition' command key binding and verifies it`, async function () { - const app = this.app as SpectronApplication; - assert.ok(await app.workbench.activitybar.getActivityBar(ActivityBarPosition.LEFT), 'Activity bar should be positioned on the left.'); - - await app.workbench.keybindingsEditor.updateKeybinding('workbench.action.toggleSidebarPosition', ['Control', 'u'], 'Control+U'); - - await app.client.keys(['Control', 'u', 'NULL']); - assert.ok(await app.workbench.activitybar.getActivityBar(ActivityBarPosition.RIGHT), 'Activity bar was not moved to right after toggling its position.'); - }); - - after(async function () { - const app = this.app as SpectronApplication; - await app.workbench.settingsEditor.clearUserSettings(); - }); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/test/smoke/src/areas/search/search.test.ts b/test/smoke/src/areas/search/search.test.ts index 6f43bbab341..a0e932298b6 100644 --- a/test/smoke/src/areas/search/search.test.ts +++ b/test/smoke/src/areas/search/search.test.ts @@ -5,52 +5,54 @@ import { SpectronApplication } from '../../spectron/application'; -describe('Search', () => { - before(function () { - this.app.suiteName = 'Search'; +export function setup() { + describe('Search', () => { + before(function () { + this.app.suiteName = 'Search'; + }); + + it('searches for body & checks for correct result number', async function () { + const app = this.app as SpectronApplication; + await app.workbench.search.openSearchViewlet(); + await app.workbench.search.searchFor('body'); + + await app.workbench.search.waitForResultText('14 results in 5 files'); + }); + + it('searches only for *.js files & checks for correct result number', async function () { + const app = this.app as SpectronApplication; + await app.workbench.search.searchFor('body'); + await app.workbench.search.showQueryDetails(); + await app.workbench.search.setFilesToIncludeText('*.js'); + await app.workbench.search.submitSearch(); + + await app.workbench.search.waitForResultText('4 results in 1 file'); + await app.workbench.search.setFilesToIncludeText(''); + await app.workbench.search.hideQueryDetails(); + }); + + it('dismisses result & checks for correct result number', async function () { + const app = this.app as SpectronApplication; + await app.workbench.search.searchFor('body'); + await app.workbench.search.removeFileMatch(1); + await app.workbench.search.waitForResultText('10 results in 4 files'); + }); + + it('replaces first search result with a replace term', async function () { + const app = this.app as SpectronApplication; + + await app.workbench.search.searchFor('body'); + await app.workbench.search.expandReplace(); + await app.workbench.search.setReplaceText('ydob'); + await app.workbench.search.replaceFileMatch(1); + await app.workbench.saveOpenedFile(); + + await app.workbench.search.waitForResultText('10 results in 4 files'); + + await app.workbench.search.searchFor('ydob'); + await app.workbench.search.setReplaceText('body'); + await app.workbench.search.replaceFileMatch(1); + await app.workbench.saveOpenedFile(); + }); }); - - it('searches for body & checks for correct result number', async function () { - const app = this.app as SpectronApplication; - await app.workbench.search.openSearchViewlet(); - await app.workbench.search.searchFor('body'); - - await app.workbench.search.waitForResultText('7 results in 4 files'); - }); - - it('searches only for *.js files & checks for correct result number', async function () { - const app = this.app as SpectronApplication; - await app.workbench.search.searchFor('body'); - await app.workbench.search.showQueryDetails(); - await app.workbench.search.setFilesToIncludeText('*.js'); - await app.workbench.search.submitSearch(); - - await app.workbench.search.waitForResultText('4 results in 1 file'); - await app.workbench.search.setFilesToIncludeText(''); - await app.workbench.search.hideQueryDetails(); - }); - - it('dismisses result & checks for correct result number', async function () { - const app = this.app as SpectronApplication; - await app.workbench.search.searchFor('body'); - await app.workbench.search.removeFileMatch(1); - await app.workbench.search.waitForResultText('3 results in 3 files'); - }); - - it('replaces first search result with a replace term', async function () { - const app = this.app as SpectronApplication; - - await app.workbench.search.searchFor('body'); - await app.workbench.search.expandReplace(); - await app.workbench.search.setReplaceText('ydob'); - await app.workbench.search.replaceFileMatch(1); - await app.workbench.saveOpenedFile(); - - await app.workbench.search.waitForResultText('3 results in 3 files'); - - await app.workbench.search.searchFor('ydob'); - await app.workbench.search.setReplaceText('body'); - await app.workbench.search.replaceFileMatch(1); - await app.workbench.saveOpenedFile(); - }); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/test/smoke/src/areas/statusbar/statusbar.test.ts b/test/smoke/src/areas/statusbar/statusbar.test.ts index d4bff75312a..044af05c8d9 100644 --- a/test/smoke/src/areas/statusbar/statusbar.test.ts +++ b/test/smoke/src/areas/statusbar/statusbar.test.ts @@ -8,90 +8,92 @@ import * as assert from 'assert'; import { SpectronApplication, Quality } from '../../spectron/application'; import { StatusBarElement } from './statusbar'; -describe('Statusbar', () => { - before(function () { - this.app.suiteName = 'Statusbar'; +export function setup() { + describe('Statusbar', () => { + before(function () { + this.app.suiteName = 'Statusbar'; + }); + + it('verifies presence of all default status bar elements', async function () { + const app = this.app as SpectronApplication; + + await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.BRANCH_STATUS); + if (app.quality !== Quality.Dev) { + await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.FEEDBACK_ICON); + } + await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.SYNC_STATUS); + await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.PROBLEMS_STATUS); + + await app.workbench.quickopen.openFile('app.js'); + await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.ENCODING_STATUS); + await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.EOL_STATUS); + await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.INDENTATION_STATUS); + await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.LANGUAGE_STATUS); + await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.SELECTION_STATUS); + }); + + it(`verifies that 'quick open' opens when clicking on status bar elements`, async function () { + const app = this.app as SpectronApplication; + + await app.workbench.statusbar.clickOn(StatusBarElement.BRANCH_STATUS); + await app.workbench.quickopen.waitForQuickOpenOpened(); + await app.workbench.quickopen.closeQuickOpen(); + + await app.workbench.quickopen.openFile('app.js'); + await app.workbench.statusbar.clickOn(StatusBarElement.INDENTATION_STATUS); + await app.workbench.quickopen.waitForQuickOpenOpened(); + await app.workbench.quickopen.closeQuickOpen(); + await app.workbench.statusbar.clickOn(StatusBarElement.ENCODING_STATUS); + await app.workbench.quickopen.waitForQuickOpenOpened(); + await app.workbench.quickopen.closeQuickOpen(); + await app.workbench.statusbar.clickOn(StatusBarElement.EOL_STATUS); + await app.workbench.quickopen.waitForQuickOpenOpened(); + await app.workbench.quickopen.closeQuickOpen(); + await app.workbench.statusbar.clickOn(StatusBarElement.LANGUAGE_STATUS); + await app.workbench.quickopen.waitForQuickOpenOpened(); + await app.workbench.quickopen.closeQuickOpen(); + }); + + it(`verifies that 'Problems View' appears when clicking on 'Problems' status element`, async function () { + const app = this.app as SpectronApplication; + + await app.workbench.statusbar.clickOn(StatusBarElement.PROBLEMS_STATUS); + await app.workbench.problems.waitForProblemsView(); + }); + + it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () { + const app = this.app as SpectronApplication; + + if (app.quality === Quality.Dev) { + return this.skip(); + } + + await app.workbench.statusbar.clickOn(StatusBarElement.FEEDBACK_ICON); + assert.ok(!!await app.client.waitForElement('.feedback-form')); + }); + + it(`checks if 'Go to Line' works if called from the status bar`, async function () { + const app = this.app as SpectronApplication; + + await app.workbench.quickopen.openFile('app.js'); + await app.workbench.statusbar.clickOn(StatusBarElement.SELECTION_STATUS); + + await app.workbench.quickopen.waitForQuickOpenOpened(); + + await app.workbench.quickopen.submit(':15'); + await app.workbench.editor.waitForHighlightingLine(15); + }); + + it(`verifies if changing EOL is reflected in the status bar`, async function () { + const app = this.app as SpectronApplication; + + await app.workbench.quickopen.openFile('app.js'); + await app.workbench.statusbar.clickOn(StatusBarElement.EOL_STATUS); + + await app.workbench.quickopen.waitForQuickOpenOpened(); + await app.workbench.quickopen.selectQuickOpenElement(1); + + await app.workbench.statusbar.waitForEOL('CRLF'); + }); }); - - it('verifies presence of all default status bar elements', async function () { - const app = this.app as SpectronApplication; - - await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.BRANCH_STATUS); - if (app.quality !== Quality.Dev) { - await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.FEEDBACK_ICON); - } - await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.SYNC_STATUS); - await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.PROBLEMS_STATUS); - - await app.workbench.quickopen.openFile('app.js'); - await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.ENCODING_STATUS); - await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.EOL_STATUS); - await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.INDENTATION_STATUS); - await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.LANGUAGE_STATUS); - await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.SELECTION_STATUS); - }); - - it(`verifies that 'quick open' opens when clicking on status bar elements`, async function () { - const app = this.app as SpectronApplication; - - await app.workbench.statusbar.clickOn(StatusBarElement.BRANCH_STATUS); - await app.workbench.quickopen.waitForQuickOpenOpened(); - await app.workbench.quickopen.closeQuickOpen(); - - await app.workbench.quickopen.openFile('app.js'); - await app.workbench.statusbar.clickOn(StatusBarElement.INDENTATION_STATUS); - await app.workbench.quickopen.waitForQuickOpenOpened(); - await app.workbench.quickopen.closeQuickOpen(); - await app.workbench.statusbar.clickOn(StatusBarElement.ENCODING_STATUS); - await app.workbench.quickopen.waitForQuickOpenOpened(); - await app.workbench.quickopen.closeQuickOpen(); - await app.workbench.statusbar.clickOn(StatusBarElement.EOL_STATUS); - await app.workbench.quickopen.waitForQuickOpenOpened(); - await app.workbench.quickopen.closeQuickOpen(); - await app.workbench.statusbar.clickOn(StatusBarElement.LANGUAGE_STATUS); - await app.workbench.quickopen.waitForQuickOpenOpened(); - await app.workbench.quickopen.closeQuickOpen(); - }); - - it(`verifies that 'Problems View' appears when clicking on 'Problems' status element`, async function () { - const app = this.app as SpectronApplication; - - await app.workbench.statusbar.clickOn(StatusBarElement.PROBLEMS_STATUS); - await app.workbench.problems.waitForProblemsView(); - }); - - it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () { - const app = this.app as SpectronApplication; - - if (app.quality === Quality.Dev) { - return this.skip(); - } - - await app.workbench.statusbar.clickOn(StatusBarElement.FEEDBACK_ICON); - assert.ok(!!await app.client.waitForElement('.feedback-form')); - }); - - it(`checks if 'Go to Line' works if called from the status bar`, async function () { - const app = this.app as SpectronApplication; - - await app.workbench.quickopen.openFile('app.js'); - await app.workbench.statusbar.clickOn(StatusBarElement.SELECTION_STATUS); - - await app.workbench.quickopen.waitForQuickOpenOpened(); - - await app.workbench.quickopen.submit(':15'); - await app.workbench.editor.waitForHighlightingLine(15); - }); - - it(`verifies if changing EOL is reflected in the status bar`, async function () { - const app = this.app as SpectronApplication; - - await app.workbench.quickopen.openFile('app.js'); - await app.workbench.statusbar.clickOn(StatusBarElement.EOL_STATUS); - - await app.workbench.quickopen.waitForQuickOpenOpened(); - await app.workbench.quickopen.selectQuickOpenElement(1); - - await app.workbench.statusbar.waitForEOL('CRLF'); - }); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/test/smoke/src/areas/workbench/data-loss.test.ts b/test/smoke/src/areas/workbench/data-loss.test.ts index 6f5131c49c8..8e6cb42d4ab 100644 --- a/test/smoke/src/areas/workbench/data-loss.test.ts +++ b/test/smoke/src/areas/workbench/data-loss.test.ts @@ -5,36 +5,38 @@ import { SpectronApplication } from '../../spectron/application'; -describe('Dataloss', () => { - before(function () { - this.app.suiteName = 'Dataloss'; +export function setup() { + describe('Dataloss', () => { + before(function () { + this.app.suiteName = 'Dataloss'; + }); + + it(`verifies that 'hot exit' works for dirty files`, async function () { + const app = this.app as SpectronApplication; + await app.workbench.newUntitledFile(); + + const untitled = 'Untitled-1'; + const textToTypeInUntitled = 'Hello, Unitled Code'; + await app.workbench.editor.waitForTypeInEditor(untitled, textToTypeInUntitled); + await app.screenCapturer.capture('Untitled file before reload'); + + const readmeMd = 'readme.md'; + const textToType = 'Hello, Code'; + await app.workbench.explorer.openFile(readmeMd); + await app.workbench.editor.waitForTypeInEditor(readmeMd, textToType); + await app.screenCapturer.capture(`${readmeMd} before reload`); + + await app.reload(); + await app.screenCapturer.capture('After reload'); + + await app.workbench.waitForActiveTab(readmeMd, true); + await app.screenCapturer.capture(`${readmeMd} after reload`); + await app.workbench.editor.waitForEditorContents(readmeMd, c => c.indexOf(textToType) > -1); + + await app.workbench.waitForTab(untitled, true); + await app.workbench.selectTab(untitled, true); + await app.screenCapturer.capture('Untitled file after reload'); + await app.workbench.editor.waitForEditorContents(untitled, c => c.indexOf(textToTypeInUntitled) > -1); + }); }); - - it(`verifies that 'hot exit' works for dirty files`, async function () { - const app = this.app as SpectronApplication; - await app.workbench.newUntitledFile(); - - const untitled = 'Untitled-1'; - const textToTypeInUntitled = 'Hello, Unitled Code'; - await app.workbench.editor.waitForTypeInEditor(untitled, textToTypeInUntitled); - await app.screenCapturer.capture('Untitled file before reload'); - - const readmeMd = 'readme.md'; - const textToType = 'Hello, Code'; - await app.workbench.explorer.openFile(readmeMd); - await app.workbench.editor.waitForTypeInEditor(readmeMd, textToType); - await app.screenCapturer.capture(`${readmeMd} before reload`); - - await app.reload(); - await app.screenCapturer.capture('After reload'); - - await app.workbench.waitForActiveTab(readmeMd, true); - await app.screenCapturer.capture(`${readmeMd} after reload`); - await app.workbench.editor.waitForEditorContents(readmeMd, c => c.indexOf(textToType) > -1); - - await app.workbench.waitForTab(untitled, true); - await app.workbench.selectTab(untitled, true); - await app.screenCapturer.capture('Untitled file after reload'); - await app.workbench.editor.waitForEditorContents(untitled, c => c.indexOf(textToTypeInUntitled) > -1); - }); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/test/smoke/src/areas/workbench/data-migration.test.ts b/test/smoke/src/areas/workbench/data-migration.test.ts index 98213b85803..7a2877ab4ad 100644 --- a/test/smoke/src/areas/workbench/data-migration.test.ts +++ b/test/smoke/src/areas/workbench/data-migration.test.ts @@ -3,85 +3,130 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -// import * as assert from 'assert'; +import * as assert from 'assert'; -// import { SpectronApplication, STABLE_PATH, LATEST_PATH } from '../../spectron/application'; -// import { Util } from '../../helpers/utilities'; +import { SpectronApplication, Quality } from '../../spectron/application'; +import * as rimraf from 'rimraf'; -// describe('Data Migration', () => { +export interface ICreateAppFn { + (quality: Quality): SpectronApplication | null; +} -// if (!STABLE_PATH) { -// return; -// } +export function setup(userDataDir: string, createApp: ICreateAppFn) { -// let app: SpectronApplication; -// afterEach(() => app.stop()); + describe('Data Migration', () => { + afterEach(async function () { + await new Promise((c, e) => rimraf(userDataDir, { maxBusyTries: 10 }, err => err ? e(err) : c())); + }); -// it('checks if the Untitled file is restored migrating from stable to latest', async function () { -// const textToType = 'Very dirty file'; + it('checks if the Untitled file is restored migrating from stable to latest', async function () { + const stableApp = createApp(Quality.Stable); -// // Setting up stable version -// let app = new SpectronApplication(STABLE_PATH); -// await app.start('Data Migration'); + if (!stableApp) { + this.skip(); + return; + } -// await app.workbench.newUntitledFile(); -// await app.workbench.editor.waitForTypeInEditor('Untitled-1', textToType); + await stableApp.start(); + stableApp.suiteName = 'Data Migration'; -// await app.stop(); -// await new Promise(c => setTimeout(c, 500)); // wait until all resources are released (e.g. locked local storage) -// // Checking latest version for the restored state + const textToType = 'Very dirty file'; -// app = new SpectronApplication(LATEST_PATH); -// await app.start('Data Migration'); + await stableApp.workbench.newUntitledFile(); + await stableApp.workbench.editor.waitForTypeInEditor('Untitled-1', textToType); -// assert.ok(await app.workbench.waitForActiveTab('Untitled-1', true), `Untitled-1 tab is not present after migration.`); + await stableApp.stop(); + await new Promise(c => setTimeout(c, 500)); // wait until all resources are released (e.g. locked local storage) -// await app.workbench.editor.waitForEditorContents('Untitled-1', c => c.indexOf(textToType) > -1); -// await app.screenCapturer.capture('Untitled file text'); -// }); + // Checking latest version for the restored state + const app = createApp(Quality.Insiders); -// it('checks if the newly created dirty file is restored migrating from stable to latest', async function () { -// const fileName = 'test_data/plainFile', -// firstTextPart = 'This is going to be an unsaved file', secondTextPart = '_that is dirty.'; + if (!app) { + return assert(false); + } -// // Setting up stable version -// let app = new SpectronApplication(STABLE_PATH, fileName); -// await Util.removeFile(`${fileName}`); -// await app.start('Data Migration'); + await app.start(false); + app.suiteName = 'Data Migration'; -// await app.workbench.editor.waitForTypeInEditor('plainFile', firstTextPart); -// await app.workbench.saveOpenedFile(); -// await app.workbench.editor.waitForTypeInEditor('plainFile', secondTextPart); + assert.ok(await app.workbench.waitForActiveTab('Untitled-1', true), `Untitled-1 tab is not present after migration.`); -// await app.stop(); -// await new Promise(c => setTimeout(c, 1000)); // wait until all resources are released (e.g. locked local storage) + await app.workbench.editor.waitForEditorContents('Untitled-1', c => c.indexOf(textToType) > -1); + await app.screenCapturer.capture('Untitled file text'); -// // Checking latest version for the restored state -// app = new SpectronApplication(LATEST_PATH); -// await app.start('Data Migration'); + await app.stop(); + }); -// const filename = fileName.split('/')[1]; -// assert.ok(await app.workbench.waitForActiveTab(filename), `Untitled-1 tab is not present after migration.`); -// await app.workbench.editor.waitForEditorContents(filename, c => c.indexOf(firstTextPart + secondTextPart) > -1); + it('checks if the newly created dirty file is restored migrating from stable to latest', async function () { + const stableApp = createApp(Quality.Stable); -// await Util.removeFile(`${fileName}`); -// }); + if (!stableApp) { + this.skip(); + return; + } -// it('cheks if opened tabs are restored migrating from stable to latest', async function () { -// const fileName1 = 'app.js', fileName2 = 'jsconfig.json', fileName3 = 'readme.md'; -// let app = new SpectronApplication(STABLE_PATH); -// await app.start('Data Migration'); + await stableApp.start(); + stableApp.suiteName = 'Data Migration'; -// await app.workbench.quickopen.openFile(fileName1); -// await app.workbench.quickopen.openFile(fileName2); -// await app.workbench.quickopen.openFile(fileName3); -// await app.stop(); + const fileName = 'app.js'; + const textPart = 'This is going to be an unsaved file'; -// app = new SpectronApplication(LATEST_PATH); -// await app.start('Data Migration'); + await stableApp.workbench.quickopen.openFile(fileName); -// assert.ok(await app.workbench.waitForTab(fileName1), `${fileName1} tab was not restored after migration.`); -// assert.ok(await app.workbench.waitForTab(fileName2), `${fileName2} tab was not restored after migration.`); -// assert.ok(await app.workbench.waitForTab(fileName3), `${fileName3} tab was not restored after migration.`); -// }); -// }); \ No newline at end of file + await stableApp.workbench.editor.waitForTypeInEditor(fileName, textPart); + + await stableApp.stop(); + await new Promise(c => setTimeout(c, 500)); // wait until all resources are released (e.g. locked local storage) + + // Checking latest version for the restored state + const app = createApp(Quality.Insiders); + + if (!app) { + return assert(false); + } + + await app.start(false); + app.suiteName = 'Data Migration'; + + assert.ok(await app.workbench.waitForActiveTab(fileName), `dirty file tab is not present after migration.`); + await app.workbench.editor.waitForEditorContents(fileName, c => c.indexOf(textPart) > -1); + + await app.stop(); + }); + + it('checks if opened tabs are restored migrating from stable to latest', async function () { + const stableApp = createApp(Quality.Stable); + + if (!stableApp) { + this.skip(); + return; + } + + await stableApp.start(); + stableApp.suiteName = 'Data Migration'; + + const fileName1 = 'app.js', fileName2 = 'jsconfig.json', fileName3 = 'readme.md'; + + await stableApp.workbench.quickopen.openFile(fileName1); + await stableApp.workbench.quickopen.runCommand('View: Keep Editor'); + await stableApp.workbench.quickopen.openFile(fileName2); + await stableApp.workbench.quickopen.runCommand('View: Keep Editor'); + await stableApp.workbench.quickopen.openFile(fileName3); + await stableApp.stop(); + + const app = createApp(Quality.Insiders); + + if (!app) { + return assert(false); + } + + await app.start(false); + app.suiteName = 'Data Migration'; + + assert.ok(await app.workbench.waitForTab(fileName1), `${fileName1} tab was not restored after migration.`); + assert.ok(await app.workbench.waitForTab(fileName2), `${fileName2} tab was not restored after migration.`); + assert.ok(await app.workbench.waitForTab(fileName3), `${fileName3} tab was not restored after migration.`); + + await app.stop(); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/areas/workbench/localization.test.ts b/test/smoke/src/areas/workbench/localization.test.ts index a259e8d52d3..14185a13803 100644 --- a/test/smoke/src/areas/workbench/localization.test.ts +++ b/test/smoke/src/areas/workbench/localization.test.ts @@ -7,48 +7,50 @@ import * as assert from 'assert'; import { SpectronApplication, Quality } from '../../spectron/application'; -describe('Localization', () => { - before(async function () { - const app = this.app as SpectronApplication; - this.app.suiteName = 'Localization'; +export function setup() { + describe('Localization', () => { + before(async function () { + const app = this.app as SpectronApplication; + this.app.suiteName = 'Localization'; - if (app.quality === Quality.Dev) { - return; - } + if (app.quality === Quality.Dev) { + return; + } - await app.restart(['--locale=DE']); + await app.restart(['--locale=DE']); + }); + + it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () { + const app = this.app as SpectronApplication; + + if (app.quality === Quality.Dev) { + this.skip(); + return; + } + + let text = await app.workbench.explorer.getOpenEditorsViewTitle(); + await app.screenCapturer.capture('Open editors title'); + assert(/geöffnete editoren/i.test(text)); + + await app.workbench.search.openSearchViewlet(); + text = await app.workbench.search.getTitle(); + await app.screenCapturer.capture('Search title'); + assert(/suchen/i.test(text)); + + await app.workbench.scm.openSCMViewlet(); + text = await app.workbench.scm.getTitle(); + await app.screenCapturer.capture('Scm title'); + assert(/quellcodeverwaltung/i.test(text)); + + await app.workbench.debug.openDebugViewlet(); + text = await app.workbench.debug.getTitle(); + await app.screenCapturer.capture('Debug title'); + assert(/debuggen/i.test(text)); + + await app.workbench.extensions.openExtensionsViewlet(); + text = await app.workbench.extensions.getTitle(); + await app.screenCapturer.capture('Extensions title'); + assert(/erweiterungen/i.test(text)); + }); }); - - it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () { - const app = this.app as SpectronApplication; - - if (app.quality === Quality.Dev) { - this.skip(); - return; - } - - let text = await app.workbench.explorer.getOpenEditorsViewTitle(); - await app.screenCapturer.capture('Open editors title'); - assert(/geöffnete editoren/i.test(text)); - - await app.workbench.search.openSearchViewlet(); - text = await app.workbench.search.getTitle(); - await app.screenCapturer.capture('Search title'); - assert(/suchen/i.test(text)); - - await app.workbench.scm.openSCMViewlet(); - text = await app.workbench.scm.getTitle(); - await app.screenCapturer.capture('Scm title'); - assert(/quellcodeverwaltung/i.test(text)); - - await app.workbench.debug.openDebugViewlet(); - text = await app.workbench.debug.getTitle(); - await app.screenCapturer.capture('Debug title'); - assert(/debuggen/i.test(text)); - - await app.workbench.extensions.openExtensionsViewlet(); - text = await app.workbench.extensions.getTitle(); - await app.screenCapturer.capture('Extensions title'); - assert(/erweiterungen/i.test(text)); - }); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/test/smoke/src/helpers/utilities.ts b/test/smoke/src/helpers/utilities.ts index bde4dde38b7..8b86d31c957 100644 --- a/test/smoke/src/helpers/utilities.ts +++ b/test/smoke/src/helpers/utilities.ts @@ -6,35 +6,6 @@ import * as fs from 'fs'; import { dirname } from 'path'; -/** - * Contains methods that are commonly used across test areas. - */ -export class Util { - constructor() { - // noop - } - - public removeFile(filePath: string): void { - try { - fs.unlinkSync(`${filePath}`); - } catch (e) { - if (e.code !== 'ENOENT') { - throw e; - } - } - } - - public static removeFile(filePath: string): void { - try { - fs.unlinkSync(`${filePath}`); - } catch (e) { - if (e.code !== 'ENOENT') { - throw e; - } - } - } -} - export function nfcall(fn: Function, ...args): Promise { return new Promise((c, e) => fn(...args, (err, r) => err ? e(err) : c(r))); } diff --git a/test/smoke/src/main.ts b/test/smoke/src/main.ts index 8c71329b907..41133e687b6 100644 --- a/test/smoke/src/main.ts +++ b/test/smoke/src/main.ts @@ -12,6 +12,21 @@ import * as tmp from 'tmp'; import * as rimraf from 'rimraf'; import * as mkdirp from 'mkdirp'; import { SpectronApplication, Quality } from './spectron/application'; +import { setup as setupDataMigrationTests } from './areas/workbench/data-migration.test'; + +import { setup as setupDataLossTests } from './areas/workbench/data-loss.test'; +import { setup as setupDataExplorerTests } from './areas/explorer/explorer.test'; +import { setup as setupDataPreferencesTests } from './areas/preferences/preferences.test'; +import { setup as setupDataSearchTests } from './areas/search/search.test'; +import { setup as setupDataCSSTests } from './areas/css/css.test'; +import { setup as setupDataEditorTests } from './areas/editor/editor.test'; +import { setup as setupDataDebugTests } from './areas/debug/debug.test'; +import { setup as setupDataGitTests } from './areas/git/git.test'; +import { setup as setupDataStatusbarTests } from './areas/statusbar/statusbar.test'; +import { setup as setupDataExtensionTests } from './areas/extensions/extensions.test'; +import { setup as setupDataMultirootTests } from './areas/multiroot/multiroot.test'; +import { setup as setupDataLocalizationTests } from './areas/workbench/localization.test'; +// import './areas/terminal/terminal.test'; const tmpDir = tmp.dirSync({ prefix: 't' }) as { name: string; removeCallback: Function; }; const testDataPath = tmpDir.name; @@ -83,12 +98,13 @@ function getBuildElectronPath(root: string): string { let testCodePath = opts.build; let stableCodePath = opts['stable-build']; let electronPath: string; +let stablePath: string; if (testCodePath) { electronPath = getBuildElectronPath(testCodePath); if (stableCodePath) { - process.env.VSCODE_STABLE_PATH = getBuildElectronPath(stableCodePath); + stablePath = getBuildElectronPath(stableCodePath); } } else { testCodePath = getDevElectronPath(); @@ -195,7 +211,7 @@ async function setup(): Promise { * @see https://github.com/webdriverio/webdriverio/issues/2076 */ // Filter out the following messages: -const wdioDeprecationWarning = /^WARNING: the "\w+" command will be depcrecated soon./; // [sic] +const wdioDeprecationWarning = /^WARNING: the "\w+" command will be deprecated soon../; // [sic] // Monkey patch: const warn = console.warn; console.warn = function suppressWebdriverWarnings(message) { @@ -203,14 +219,16 @@ console.warn = function suppressWebdriverWarnings(message) { warn.apply(console, arguments); }; -before(async function () { - // allow two minutes for setup - this.timeout(2 * 60 * 1000); - await setup(); +function createApp(quality: Quality): SpectronApplication | null { + const path = quality === Quality.Insiders ? electronPath : stablePath; - const app = new SpectronApplication({ + if (!path) { + return null; + } + + return new SpectronApplication({ quality, - electronPath, + electronPath: path, workspacePath, userDataDir, extensionsPath, @@ -218,27 +236,42 @@ before(async function () { workspaceFilePath, waitTime: parseInt(opts['wait-time'] || '0') || 20 }); - - await app.start(); - this.app = app; +} +before(async function () { + // allow two minutes for setup + this.timeout(2 * 60 * 1000); + await setup(); }); after(async function () { - await this.app.stop(); await new Promise((c, e) => rimraf(testDataPath, { maxBusyTries: 10 }, err => err ? e(err) : c())); }); -// import './areas/workbench/data-migration.test'; -import './areas/workbench/data-loss.test'; -import './areas/explorer/explorer.test'; -import './areas/preferences/preferences.test'; -import './areas/search/search.test'; -import './areas/css/css.test'; -import './areas/editor/editor.test'; -import './areas/debug/debug.test'; -import './areas/git/git.test'; -// import './areas/terminal/terminal.test'; -import './areas/statusbar/statusbar.test'; -import './areas/extensions/extensions.test'; -import './areas/multiroot/multiroot.test'; -import './areas/workbench/localization.test'; \ No newline at end of file +describe('Data Migration', () => { + setupDataMigrationTests(userDataDir, createApp); +}); + +describe('Everything Else', () => { + before(async function () { + const app = createApp(quality); + await app!.start(); + this.app = app; + }); + + after(async function () { + await this.app.stop(); + }); + + setupDataLossTests(); + setupDataExplorerTests(); + setupDataPreferencesTests(); + setupDataSearchTests(); + setupDataCSSTests(); + setupDataEditorTests(); + setupDataDebugTests(); + setupDataGitTests(); + setupDataStatusbarTests(); + setupDataExtensionTests(); + setupDataMultirootTests(); + setupDataLocalizationTests(); +}); diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index 22c1c23010d..7d8cdadbb9a 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -108,9 +108,12 @@ export class SpectronApplication { this._screenCapturer.suiteName = suiteName; } - async start(): Promise { + async start(waitForWelcome: boolean = true): Promise { await this._start(); - await this.waitForWelcome(); + + if (waitForWelcome) { + await this.waitForWelcome(); + } } async restart(codeArgs: string[] = []): Promise { @@ -159,6 +162,9 @@ export class SpectronApplication { // Prevent 'Getting Started' web page from opening on clean user-data-dir args.push('--skip-getting-started'); + // Prevent 'Getting Started' web page from opening on clean user-data-dir + args.push('--skip-release-notes'); + // Prevent Quick Open from closing when focus is stolen, this allows concurrent smoketest suite running args.push('--sticky-quickopen'); @@ -269,11 +275,19 @@ export class SpectronApplication { private async checkWindowReady(): Promise { await this.webclient.waitUntilWindowLoaded(); - // Spectron opens multiple terminals in Windows platform - // Workaround to focus the right window - https://github.com/electron/spectron/issues/60 - await this.client.windowByIndex(1); - // await this.app.browserWindow.focus(); - await this.client.waitForHTML('[id="workbench.main.container"]'); + + // Pick the first workbench window here + const count = await this.webclient.getWindowCount(); + + for (let i = 0; i < count; i++) { + await this.webclient.windowByIndex(i); + + if (/bootstrap\/index\.html/.test(await this.webclient.getUrl())) { + break; + } + } + + await this.client.waitForElement('.monaco-workbench'); } private async waitForWelcome(): Promise { diff --git a/test/smoke/src/spectron/client.ts b/test/smoke/src/spectron/client.ts index 9ec19afd2f5..428d6a18310 100644 --- a/test/smoke/src/spectron/client.ts +++ b/test/smoke/src/spectron/client.ts @@ -25,10 +25,6 @@ export class SpectronClient { this.retryCount = (waitTime * 1000) / this.retryDuration; } - windowByIndex(index: number): Promise { - return this.spectron.client.windowByIndex(index); - } - keys(keys: string[]): Promise { this.spectron.client.keys(keys); return Promise.resolve(); @@ -54,10 +50,6 @@ export class SpectronClient { return this.waitFor(() => this.spectron.client.getValue(selector), accept, `getValue with selector ${selector}`); } - async waitForHTML(selector: string, accept: (result: string) => boolean = (result: string) => !!result): Promise { - return this.waitFor(() => this.spectron.client.getHTML(selector), accept, `getHTML with selector ${selector}`); - } - async waitAndClick(selector: string): Promise { return this.waitFor(() => this.spectron.client.click(selector), void 0, `click with selector ${selector}`); } diff --git a/yarn.lock b/yarn.lock index d86b8a9d90a..f95110eef08 100644 --- a/yarn.lock +++ b/yarn.lock @@ -252,6 +252,10 @@ async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" +async-limiter@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" + async@1.x, async@^1.4.0, async@^1.5.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -383,7 +387,7 @@ binaryextensions@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-1.0.1.tgz#1e637488b35b58bda5f4774bf96a5212a8c90755" -bindings@^1.2.1: +bindings@^1.2.1, bindings@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7" @@ -580,6 +584,13 @@ cheerio@^1.0.0-rc.1: lodash "^4.15.0" parse5 "^3.0.1" +chrome-remote-interface@^0.25.3: + version "0.25.3" + resolved "https://registry.yarnpkg.com/chrome-remote-interface/-/chrome-remote-interface-0.25.3.tgz#b692ae538cd5af3a6dd285636bfab3d29a7006c1" + dependencies: + commander "2.11.x" + ws "3.3.x" + ci-info@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.1.tgz#47b44df118c48d2597b56d342e7e25791060171a" @@ -741,6 +752,10 @@ commander@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06" +commander@2.11.x, commander@^2.8.1, commander@^2.9.0, commander@~2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" + commander@2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.3.0.tgz#fd430e889832ec353b9acd1de217c11cb3eef873" @@ -751,10 +766,6 @@ commander@2.8.x: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.8.1, commander@^2.9.0, commander@~2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" - commandpost@^1.0.0: version "1.2.1" resolved "https://registry.yarnpkg.com/commandpost/-/commandpost-1.2.1.tgz#2e9c4c7508b9dc704afefaa91cab92ee6054cc68" @@ -2139,9 +2150,9 @@ grunt@0.4: underscore.string "~2.2.1" which "~1.0.5" -gulp-atom-electron@^1.11.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/gulp-atom-electron/-/gulp-atom-electron-1.14.1.tgz#1d19dbe179cb97c781abc7103fa775c161cc4e61" +gulp-atom-electron@1.15.1: + version "1.15.1" + resolved "https://registry.yarnpkg.com/gulp-atom-electron/-/gulp-atom-electron-1.15.1.tgz#ae13a4107a52e249d3335f584794981f5dcbf9be" dependencies: event-stream "^3.1.7" github-releases "^0.2.0" @@ -3719,7 +3730,7 @@ nan@^2.0.0, nan@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" -nan@^2.0.9, nan@^2.3.0, nan@^2.3.2: +nan@^2.0.9, nan@^2.3.0: version "2.4.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232" @@ -3727,6 +3738,10 @@ nan@^2.1.0: version "2.7.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" +nan@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" + native-keymap@1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/native-keymap/-/native-keymap-1.2.5.tgz#1035a9417b9a9340cf8097763a43c76d588165a5" @@ -3747,9 +3762,9 @@ negotiator@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" -node-pty@0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.7.3.tgz#4bb36a24a62ee9f3332e2e2310d6642d9daed1f7" +node-pty@0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.7.4.tgz#07146b2b40b76e432e57ce6750bda40f0da5c99f" dependencies: nan "^2.6.2" @@ -5023,6 +5038,14 @@ sparkles@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" +spdlog@0.3.7: + version "0.3.7" + resolved "https://registry.yarnpkg.com/spdlog/-/spdlog-0.3.7.tgz#5f068efab0b7c85efa1aaed6eacd3da1d978fe24" + dependencies: + bindings "^1.3.0" + mkdirp "^0.5.1" + nan "^2.8.0" + spdx-correct@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" @@ -5466,6 +5489,10 @@ uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" +ultron@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.0.tgz#b07a2e6a541a815fc6a34ccd4533baec307ca864" + unc-path-regex@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -5559,11 +5586,11 @@ uuid@^3.0.0, uuid@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" -v8-profiler@jrieken/v8-profiler#vscode: - version "5.6.5" - resolved "https://codeload.github.com/jrieken/v8-profiler/tar.gz/5e4a336693e1d5b079c7aecd286a1abcfbc10421" +v8-inspect-profiler@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/v8-inspect-profiler/-/v8-inspect-profiler-0.0.7.tgz#f3b3438680f71961b9647514fe7b9f8748abc462" dependencies: - nan "^2.3.2" + chrome-remote-interface "^0.25.3" v8flags@^2.0.2: version "2.1.1" @@ -5736,9 +5763,9 @@ vscode-chokidar@1.6.2: optionalDependencies: vscode-fsevents "0.3.8" -vscode-debugprotocol@1.25.0-pre.0: - version "1.25.0-pre.0" - resolved "https://registry.yarnpkg.com/vscode-debugprotocol/-/vscode-debugprotocol-1.25.0-pre.0.tgz#ad83e7bd95b19ac795df50fa0e2fe903462a72b6" +vscode-debugprotocol@1.25.0: + version "1.25.0" + resolved "https://registry.yarnpkg.com/vscode-debugprotocol/-/vscode-debugprotocol-1.25.0.tgz#7a7e38df4cad8839e37ebcd06ed903902d97a7e3" vscode-fsevents@0.3.8: version "0.3.8" @@ -5850,6 +5877,14 @@ write@^0.2.1: dependencies: mkdirp "^0.5.1" +ws@3.3.x: + version "3.3.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.2.tgz#96c1d08b3fefda1d5c1e33700d3bfaa9be2d5608" + dependencies: + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" + xml-name-validator@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-1.0.0.tgz#dcf82ee092322951ef8cc1ba596c9cbfd14a83f1" From 0af8e38d3919f94f7c39b5575e87ed333295c8f2 Mon Sep 17 00:00:00 2001 From: Kai Maetzel Date: Tue, 12 Dec 2017 00:51:17 -0800 Subject: [PATCH 108/615] adding pid to --status, implements #40055 (#40058) --- src/vs/code/electron-main/diagnostics.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/code/electron-main/diagnostics.ts b/src/vs/code/electron-main/diagnostics.ts index 82673450fe9..b3c83dfcf6e 100644 --- a/src/vs/code/electron-main/diagnostics.ts +++ b/src/vs/code/electron-main/diagnostics.ts @@ -145,7 +145,7 @@ function formatProcessList(info: IMainProcessInfo, rootProcess: ProcessItem): st const output: string[] = []; - output.push('CPU %\tMem MB\tProcess'); + output.push('CPU %\tMem MB\t PID\tProcess'); formatProcessItem(mapPidToWindowTitle, output, rootProcess, 0); @@ -169,7 +169,7 @@ function formatProcessItem(mapPidToWindowTitle: Map, output: str } } const memory = process.platform === 'win32' ? item.mem : (os.totalmem() * (item.mem / 100)); - output.push(`${pad(Number(item.load.toFixed(0)), 5, ' ')}\t${pad(Number((memory / MB).toFixed(0)), 6, ' ')}\t${name}`); + output.push(`${pad(Number(item.load.toFixed(0)), 5, ' ')}\t${pad(Number((memory / MB).toFixed(0)), 6, ' ')}\t${pad(Number((item.pid).toFixed(0)), 6, ' ')}\t${name}`); // Recurse into children if any if (Array.isArray(item.children)) { From 3023911908770e7919b80ff8d8a800a9f63adeb3 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 12 Dec 2017 10:22:54 +0100 Subject: [PATCH 109/615] scm.diffDecorations config setting fixes #21795 --- .../electron-browser/dirtydiffDecorator.ts | 77 ++++++++++--------- .../scm/electron-browser/scm.contribution.ts | 9 ++- 2 files changed, 45 insertions(+), 41 deletions(-) diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index 154be590d96..5f7fb1448e7 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -46,7 +46,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { basename } from 'vs/base/common/paths'; import { MenuId, IMenuService, IMenu, MenuItemAction } from 'vs/platform/actions/common/actions'; import { fillInActions, MenuItemActionItem } from 'vs/platform/actions/browser/menuItemActionItem'; -import { IChange, IEditorModel, ScrollType, IEditorContribution, OverviewRulerLane, IModel } from 'vs/editor/common/editorCommon'; +import { IChange, IEditorModel, ScrollType, IEditorContribution, OverviewRulerLane, IModel, IModelDecorationOptions } from 'vs/editor/common/editorCommon'; import { sortedDiff, firstIndex } from 'vs/base/common/arrays'; import { IMarginData } from 'vs/editor/browser/controller/mouseTarget'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; @@ -729,43 +729,46 @@ export const overviewRulerDeletedForeground = registerColor('editorOverviewRuler class DirtyDiffDecorator { - static MODIFIED_DECORATION_OPTIONS = ModelDecorationOptions.register({ - linesDecorationsClassName: 'dirty-diff-glyph dirty-diff-modified', - isWholeLine: true, - overviewRuler: { - color: themeColorFromId(overviewRulerModifiedForeground), - darkColor: themeColorFromId(overviewRulerModifiedForeground), - position: OverviewRulerLane.Left - } - }); + static createDecoration(className: string, foregroundColor: string, options: { gutter: boolean, overview: boolean }): ModelDecorationOptions { + const decorationOptions: IModelDecorationOptions = { + isWholeLine: true, + }; - static ADDED_DECORATION_OPTIONS = ModelDecorationOptions.register({ - linesDecorationsClassName: 'dirty-diff-glyph dirty-diff-added', - isWholeLine: true, - overviewRuler: { - color: themeColorFromId(overviewRulerAddedForeground), - darkColor: themeColorFromId(overviewRulerAddedForeground), - position: OverviewRulerLane.Left + if (options.gutter) { + decorationOptions.linesDecorationsClassName = `dirty-diff-glyph ${className}`; } - }); - static DELETED_DECORATION_OPTIONS = ModelDecorationOptions.register({ - linesDecorationsClassName: 'dirty-diff-glyph dirty-diff-deleted', - isWholeLine: true, - overviewRuler: { - color: themeColorFromId(overviewRulerDeletedForeground), - darkColor: themeColorFromId(overviewRulerDeletedForeground), - position: OverviewRulerLane.Left + if (options.overview) { + decorationOptions.overviewRuler = { + color: themeColorFromId(overviewRulerModifiedForeground), + darkColor: themeColorFromId(overviewRulerModifiedForeground), + position: OverviewRulerLane.Left + }; } - }); + return ModelDecorationOptions.createDynamic(decorationOptions); + } + + private modifiedOptions: ModelDecorationOptions; + private addedOptions: ModelDecorationOptions; + private deletedOptions: ModelDecorationOptions; private decorations: string[] = []; private disposables: IDisposable[] = []; constructor( private editorModel: IModel, - private model: DirtyDiffModel + private model: DirtyDiffModel, + @IConfigurationService configurationService: IConfigurationService ) { + const decorations = configurationService.getValue('scm.diffDecorations'); + const gutter = decorations === 'all' || decorations === 'gutter'; + const overview = decorations === 'all' || decorations === 'overview'; + const options = { gutter, overview }; + + this.modifiedOptions = DirtyDiffDecorator.createDecoration('dirty-diff-modified', overviewRulerModifiedForeground, options); + this.addedOptions = DirtyDiffDecorator.createDecoration('dirty-diff-added', overviewRulerAddedForeground, options); + this.deletedOptions = DirtyDiffDecorator.createDecoration('dirty-diff-deleted', overviewRulerDeletedForeground, options); + model.onDidChange(this.onDidChange, this, this.disposables); } @@ -782,7 +785,7 @@ class DirtyDiffDecorator { startLineNumber: startLineNumber, startColumn: 1, endLineNumber: endLineNumber, endColumn: 1 }, - options: DirtyDiffDecorator.ADDED_DECORATION_OPTIONS + options: this.addedOptions }; case ChangeType.Delete: return { @@ -790,7 +793,7 @@ class DirtyDiffDecorator { startLineNumber: startLineNumber, startColumn: 1, endLineNumber: startLineNumber, endColumn: 1 }, - options: DirtyDiffDecorator.DELETED_DECORATION_OPTIONS + options: this.deletedOptions }; case ChangeType.Modify: return { @@ -798,7 +801,7 @@ class DirtyDiffDecorator { startLineNumber: startLineNumber, startColumn: 1, endLineNumber: endLineNumber, endColumn: 1 }, - options: DirtyDiffDecorator.MODIFIED_DECORATION_OPTIONS + options: this.modifiedOptions }; } }); @@ -1012,13 +1015,13 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution, @IInstantiationService private instantiationService: IInstantiationService, @IConfigurationService private configurationService: IConfigurationService ) { - const onDidChangeEnablement = filterEvent(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.enableDiffDecorations')); - onDidChangeEnablement(this.onDidChangeEnablement, this, this.disposables); - this.onDidChangeEnablement(); + const onDidChangeConfiguration = filterEvent(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.diffDecorations')); + onDidChangeConfiguration(this.onDidChangeConfiguration, this, this.disposables); + this.onDidChangeConfiguration(); } - private onDidChangeEnablement(): void { - const enabled = this.configurationService.getValue('scm.enableDiffDecorations'); + private onDidChangeConfiguration(): void { + const enabled = this.configurationService.getValue('scm.diffDecorations') !== 'none'; if (enabled) { this.enable(); @@ -1029,7 +1032,7 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution, private enable(): void { if (this.enabled) { - return; + this.disable(); } this.transientDisposables.push(this.editorGroupService.onEditorsChanged(() => this.onEditorsChanged())); @@ -1083,7 +1086,7 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution, private onModelVisible(editorModel: IModel): void { const model = this.instantiationService.createInstance(DirtyDiffModel, editorModel); - const decorator = new DirtyDiffDecorator(editorModel, model); + const decorator = new DirtyDiffDecorator(editorModel, model, this.configurationService); this.items[editorModel.id] = new DirtyDiffItem(model, decorator); } diff --git a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts index fcbe4f68f73..d2a18a112ea 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -68,10 +68,11 @@ Registry.as(ConfigurationExtensions.Configuration).regis order: 5, type: 'object', properties: { - 'scm.enableDiffDecorations': { - 'type': 'boolean', - 'default': true, - 'description': localize('enableDiffDecorations', "Enables or disables diff decorations in the editor.") + 'scm.diffDecorations': { + type: 'string', + enum: ['all', 'gutter', 'overview', 'none'], + default: 'all', + description: localize('diffDecorations', "Controls diff decorations in the editor.") }, } }); \ No newline at end of file From eef38a2e150f9a3b71ddd7f1f1e4dd3aeb1d7e80 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 12 Dec 2017 10:28:47 +0100 Subject: [PATCH 110/615] log failures of on-will-save-listener, #40030 --- .../test/snippetController2.old.test.ts | 4 +- .../snippet/test/snippetController2.test.ts | 4 +- .../commands/test/commandService.test.ts | 12 ++--- src/vs/platform/log/common/log.ts | 2 +- src/vs/platform/log/node/spdlogService.ts | 4 +- src/vs/workbench/api/node/extHost.api.impl.ts | 2 +- .../node/extHostDocumentSaveParticipant.ts | 23 +++++---- .../api/extHostApiCommands.test.ts | 4 +- .../api/extHostCommands.test.ts | 6 +-- .../extHostDocumentSaveParticipant.test.ts | 51 +++++++++++++------ .../api/extHostLanguageFeatures.test.ts | 4 +- .../api/extHostTreeViews.test.ts | 4 +- 12 files changed, 73 insertions(+), 47 deletions(-) diff --git a/src/vs/editor/contrib/snippet/test/snippetController2.old.test.ts b/src/vs/editor/contrib/snippet/test/snippetController2.old.test.ts index 4ad7e0dec05..6979ff09551 100644 --- a/src/vs/editor/contrib/snippet/test/snippetController2.old.test.ts +++ b/src/vs/editor/contrib/snippet/test/snippetController2.old.test.ts @@ -12,7 +12,7 @@ import { TestCodeEditor, withTestCodeEditor } from 'vs/editor/test/browser/testC import { Cursor } from 'vs/editor/common/controller/cursor'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; -import { NoopLogService } from 'vs/platform/log/common/log'; +import { NullLogService } from 'vs/platform/log/common/log'; class TestSnippetController extends SnippetController2 { @@ -20,7 +20,7 @@ class TestSnippetController extends SnippetController2 { editor: ICodeEditor, @IContextKeyService private _contextKeyService: IContextKeyService ) { - super(editor, new NoopLogService(), _contextKeyService); + super(editor, new NullLogService(), _contextKeyService); } isInSnippetMode(): boolean { diff --git a/src/vs/editor/contrib/snippet/test/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/snippetController2.test.ts index 638047b4f7c..2145e74537e 100644 --- a/src/vs/editor/contrib/snippet/test/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/snippetController2.test.ts @@ -11,7 +11,7 @@ import { createTestCodeEditor } from 'vs/editor/test/browser/testCodeEditor'; import { Model } from 'vs/editor/common/model/model'; import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; -import { NoopLogService } from 'vs/platform/log/common/log'; +import { NullLogService } from 'vs/platform/log/common/log'; suite('SnippetController2', function () { @@ -32,7 +32,7 @@ suite('SnippetController2', function () { let editor: ICodeEditor; let model: Model; let contextKeys: MockContextKeyService; - let logService = new NoopLogService(); + let logService = new NullLogService(); setup(function () { contextKeys = new MockContextKeyService(); diff --git a/src/vs/platform/commands/test/commandService.test.ts b/src/vs/platform/commands/test/commandService.test.ts index 78207993cb0..9815e83aaf8 100644 --- a/src/vs/platform/commands/test/commandService.test.ts +++ b/src/vs/platform/commands/test/commandService.test.ts @@ -16,7 +16,7 @@ import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyServ import { SimpleConfigurationService } from 'vs/editor/standalone/browser/simpleServices'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import Event, { Emitter } from 'vs/base/common/event'; -import { NoopLogService } from 'vs/platform/log/common/log'; +import { NullLogService } from 'vs/platform/log/common/log'; class SimpleExtensionService implements IExtensionService { _serviceBrand: any; @@ -75,7 +75,7 @@ suite('CommandService', function () { lastEvent = activationEvent; return super.activateByEvent(activationEvent); } - }, new ContextKeyService(new SimpleConfigurationService()), new NoopLogService()); + }, new ContextKeyService(new SimpleConfigurationService()), new NullLogService()); return service.executeCommand('foo').then(() => { assert.ok(lastEvent, 'onCommand:foo'); @@ -93,7 +93,7 @@ suite('CommandService', function () { activateByEvent(activationEvent: string): TPromise { return TPromise.wrapError(new Error('bad_activate')); } - }, new ContextKeyService(new SimpleConfigurationService()), new NoopLogService()); + }, new ContextKeyService(new SimpleConfigurationService()), new NullLogService()); return service.executeCommand('foo').then(() => assert.ok(false), err => { assert.equal(err.message, 'bad_activate'); @@ -109,7 +109,7 @@ suite('CommandService', function () { whenInstalledExtensionsRegistered() { return new TPromise(_resolve => { /*ignore*/ }); } - }, new ContextKeyService(new SimpleConfigurationService()), new NoopLogService()); + }, new ContextKeyService(new SimpleConfigurationService()), new NullLogService()); service.executeCommand('bar'); assert.equal(callCounter, 1); @@ -126,7 +126,7 @@ suite('CommandService', function () { whenInstalledExtensionsRegistered() { return new TPromise(_resolve => { resolveFunc = _resolve; }); } - }, new ContextKeyService(new SimpleConfigurationService()), new NoopLogService()); + }, new ContextKeyService(new SimpleConfigurationService()), new NullLogService()); let r = service.executeCommand('bar'); assert.equal(callCounter, 0); @@ -146,7 +146,7 @@ suite('CommandService', function () { new InstantiationService(), new SimpleExtensionService(), contextKeyService, - new NoopLogService() + new NullLogService() ); let counter = 0; diff --git a/src/vs/platform/log/common/log.ts b/src/vs/platform/log/common/log.ts index 95bd211f019..823ec1cd2e0 100644 --- a/src/vs/platform/log/common/log.ts +++ b/src/vs/platform/log/common/log.ts @@ -236,7 +236,7 @@ export class MultiplexLogService implements ILogService { } } -export class NoopLogService implements ILogService { +export class NullLogService implements ILogService { _serviceBrand: any; setLevel(level: LogLevel): void { } getLevel(): LogLevel { return LogLevel.Info; } diff --git a/src/vs/platform/log/node/spdlogService.ts b/src/vs/platform/log/node/spdlogService.ts index ffdd39e2d23..726bd185dcb 100644 --- a/src/vs/platform/log/node/spdlogService.ts +++ b/src/vs/platform/log/node/spdlogService.ts @@ -6,7 +6,7 @@ 'use strict'; import * as path from 'path'; -import { ILogService, LogLevel, NoopLogService } from 'vs/platform/log/common/log'; +import { ILogService, LogLevel, NullLogService } from 'vs/platform/log/common/log'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { RotatingLogger, setAsyncMode } from 'spdlog'; @@ -21,7 +21,7 @@ export function createLogService(processName: string, environmentService: IEnvir } catch (e) { console.error(e); } - return new NoopLogService(); + return new NullLogService(); } class SpdLogService implements ILogService { diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index feb0e727eb6..ed71e123c75 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -92,7 +92,7 @@ export function createApiFactory( const extHostDocumentsAndEditors = threadService.set(ExtHostContext.ExtHostDocumentsAndEditors, new ExtHostDocumentsAndEditors(threadService)); const extHostDocuments = threadService.set(ExtHostContext.ExtHostDocuments, new ExtHostDocuments(threadService, extHostDocumentsAndEditors)); const extHostDocumentContentProviders = threadService.set(ExtHostContext.ExtHostDocumentContentProviders, new ExtHostDocumentContentProvider(threadService, extHostDocumentsAndEditors)); - const extHostDocumentSaveParticipant = threadService.set(ExtHostContext.ExtHostDocumentSaveParticipant, new ExtHostDocumentSaveParticipant(extHostDocuments, threadService.get(MainContext.MainThreadEditors))); + const extHostDocumentSaveParticipant = threadService.set(ExtHostContext.ExtHostDocumentSaveParticipant, new ExtHostDocumentSaveParticipant(logService, extHostDocuments, threadService.get(MainContext.MainThreadEditors))); const extHostEditors = threadService.set(ExtHostContext.ExtHostEditors, new ExtHostEditors(threadService, extHostDocumentsAndEditors)); const extHostCommands = threadService.set(ExtHostContext.ExtHostCommands, new ExtHostCommands(threadService, extHostHeapService, logService)); const extHostTreeViews = threadService.set(ExtHostContext.ExtHostTreeViews, new ExtHostTreeViews(threadService.get(MainContext.MainThreadTreeViews), extHostCommands)); diff --git a/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts b/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts index da949bda937..80b9ae90671 100644 --- a/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts +++ b/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts @@ -16,21 +16,22 @@ import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import * as vscode from 'vscode'; import { LinkedList } from 'vs/base/common/linkedList'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; +import { ILogService } from 'vs/platform/log/common/log'; type Listener = [Function, any, IExtensionDescription]; export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSaveParticipantShape { - private _documents: ExtHostDocuments; - private _mainThreadEditors: MainThreadEditorsShape; - private _callbacks = new LinkedList(); - private _badListeners = new WeakMap(); - private _thresholds: { timeout: number; errors: number; }; + private readonly _callbacks = new LinkedList(); + private readonly _badListeners = new WeakMap(); - constructor(documents: ExtHostDocuments, mainThreadEditors: MainThreadEditorsShape, thresholds: { timeout: number; errors: number; } = { timeout: 1500, errors: 3 }) { - this._documents = documents; - this._mainThreadEditors = mainThreadEditors; - this._thresholds = thresholds; + constructor( + private readonly _logService: ILogService, + private readonly _documents: ExtHostDocuments, + private readonly _mainThreadEditors: MainThreadEditorsShape, + private readonly _thresholds: { timeout: number; errors: number; } = { timeout: 1500, errors: 3 } + ) { + // } dispose(): void { @@ -81,6 +82,10 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic return true; }, err => { + + this._logService.error('[onWillSaveTextDocument]', extension.id); + this._logService.error(err); + if (!(err instanceof Error) || (err).message !== 'concurrent_edits') { const errors = this._badListeners.get(listener); this._badListeners.set(listener, !errors ? 1 : errors + 1); diff --git a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts index b9fcbd97a82..c23c9c69e42 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts @@ -32,7 +32,7 @@ import { ExtHostDiagnostics } from 'vs/workbench/api/node/extHostDiagnostics'; import * as vscode from 'vscode'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import 'vs/workbench/parts/search/electron-browser/search.contribution'; -import { NoopLogService } from 'vs/platform/log/common/log'; +import { NullLogService } from 'vs/platform/log/common/log'; const defaultSelector = { scheme: 'far' }; const model: EditorCommon.IModel = EditorModel.createFromString( @@ -114,7 +114,7 @@ suite('ExtHostLanguageFeatureCommands', function () { const heapService = new ExtHostHeapService(); - commands = new ExtHostCommands(threadService, heapService, new NoopLogService()); + commands = new ExtHostCommands(threadService, heapService, new NullLogService()); threadService.set(ExtHostContext.ExtHostCommands, commands); threadService.setTestInstance(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); ExtHostApiCommands.register(commands); diff --git a/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts index 9ea21cf75fa..98029fe424b 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts @@ -12,7 +12,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { OneGetThreadService } from './testThreadService'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; -import { NoopLogService } from 'vs/platform/log/common/log'; +import { NullLogService } from 'vs/platform/log/common/log'; suite('ExtHostCommands', function () { @@ -30,7 +30,7 @@ suite('ExtHostCommands', function () { } }; - const commands = new ExtHostCommands(OneGetThreadService(shape), undefined, new NoopLogService()); + const commands = new ExtHostCommands(OneGetThreadService(shape), undefined, new NullLogService()); commands.registerCommand('foo', (): any => { }).dispose(); assert.equal(lastUnregister, 'foo'); assert.equal(CommandsRegistry.getCommand('foo'), undefined); @@ -51,7 +51,7 @@ suite('ExtHostCommands', function () { } }; - const commands = new ExtHostCommands(OneGetThreadService(shape), undefined, new NoopLogService()); + const commands = new ExtHostCommands(OneGetThreadService(shape), undefined, new NullLogService()); const reg = commands.registerCommand('foo', (): any => { }); reg.dispose(); reg.dispose(); diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts index 6e802feca8b..7782fcff951 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts @@ -17,12 +17,14 @@ import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import * as vscode from 'vscode'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; +import { NullLogService } from 'vs/platform/log/common/log'; suite('ExtHostDocumentSaveParticipant', () => { let resource = URI.parse('foo:bar'); let mainThreadEditors = new class extends mock() { }; let documents: ExtHostDocuments; + let nullLogService = new NullLogService(); let nullExtensionDescription: IExtensionDescription = { id: 'nullExtensionDescription', name: 'Null Extension Description', @@ -50,12 +52,12 @@ suite('ExtHostDocumentSaveParticipant', () => { }); test('no listeners, no problem', () => { - const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, mainThreadEditors); return participant.$participateInSave(resource, SaveReason.EXPLICIT).then(() => assert.ok(true)); }); test('event delivery', () => { - const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, mainThreadEditors); let event: vscode.TextDocumentWillSaveEvent; let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { @@ -72,7 +74,7 @@ suite('ExtHostDocumentSaveParticipant', () => { }); test('event delivery, immutable', () => { - const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, mainThreadEditors); let event: vscode.TextDocumentWillSaveEvent; let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { @@ -88,7 +90,7 @@ suite('ExtHostDocumentSaveParticipant', () => { }); test('event delivery, bad listener', () => { - const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, mainThreadEditors); let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { throw new Error('💀'); @@ -103,7 +105,7 @@ suite('ExtHostDocumentSaveParticipant', () => { }); test('event delivery, bad listener doesn\'t prevent more events', () => { - const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, mainThreadEditors); let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { throw new Error('💀'); @@ -122,7 +124,7 @@ suite('ExtHostDocumentSaveParticipant', () => { }); test('event delivery, in subscriber order', () => { - const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, mainThreadEditors); let counter = 0; let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { @@ -140,7 +142,7 @@ suite('ExtHostDocumentSaveParticipant', () => { }); test('event delivery, ignore bad listeners', async () => { - const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors, { timeout: 5, errors: 1 }); + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, mainThreadEditors, { timeout: 5, errors: 1 }); let callCount = 0; let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { @@ -158,7 +160,7 @@ suite('ExtHostDocumentSaveParticipant', () => { }); test('event delivery, overall timeout', () => { - const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors, { timeout: 20, errors: 5 }); + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, mainThreadEditors, { timeout: 20, errors: 5 }); let callCount = 0; let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { @@ -186,7 +188,7 @@ suite('ExtHostDocumentSaveParticipant', () => { }); test('event delivery, waitUntil', () => { - const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, mainThreadEditors); let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { @@ -202,7 +204,7 @@ suite('ExtHostDocumentSaveParticipant', () => { }); test('event delivery, waitUntil must be called sync', () => { - const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, mainThreadEditors); let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { @@ -225,7 +227,7 @@ suite('ExtHostDocumentSaveParticipant', () => { }); test('event delivery, waitUntil will timeout', () => { - const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors, { timeout: 5, errors: 3 }); + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, mainThreadEditors, { timeout: 5, errors: 3 }); let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (event) { event.waitUntil(TPromise.timeout(15)); @@ -240,7 +242,7 @@ suite('ExtHostDocumentSaveParticipant', () => { }); test('event delivery, waitUntil failure handling', () => { - const participant = new ExtHostDocumentSaveParticipant(documents, mainThreadEditors); + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, mainThreadEditors); let sub1 = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { e.waitUntil(TPromise.wrapError(new Error('dddd'))); @@ -261,7 +263,7 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, pushEdits sync', () => { let edits: IWorkspaceResourceEdit[]; - const participant = new ExtHostDocumentSaveParticipant(documents, new class extends mock() { + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, new class extends mock() { $tryApplyWorkspaceEdit(_edits: IWorkspaceResourceEdit[]) { edits = _edits; return TPromise.as(true); @@ -284,7 +286,7 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, concurrent change', () => { let edits: IWorkspaceResourceEdit[]; - const participant = new ExtHostDocumentSaveParticipant(documents, new class extends mock() { + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, new class extends mock() { $tryApplyWorkspaceEdit(_edits: IWorkspaceResourceEdit[]) { edits = _edits; return TPromise.as(true); @@ -318,7 +320,7 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, two listeners -> two document states', () => { - const participant = new ExtHostDocumentSaveParticipant(documents, new class extends mock() { + const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, new class extends mock() { $tryApplyWorkspaceEdit(_edits: IWorkspaceResourceEdit[]) { for (const { resource, edits } of _edits) { @@ -367,4 +369,23 @@ suite('ExtHostDocumentSaveParticipant', () => { }); }); + + test('Log failing listener', function () { + let didLogSomething = false; + let participant = new ExtHostDocumentSaveParticipant(new class extends NullLogService { + error(message: string | Error, ...args: any[]): void { + didLogSomething = true; + } + }, documents, mainThreadEditors); + + + let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { + throw new Error('boom'); + }); + + return participant.$participateInSave(resource, SaveReason.EXPLICIT).then(() => { + sub.dispose(); + assert.equal(didLogSomething, true); + }); + }); }); diff --git a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts index e1fb7ffbb5d..c5959a51943 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts @@ -44,7 +44,7 @@ import { ExtHostDiagnostics } from 'vs/workbench/api/node/extHostDiagnostics'; import { ExtHostHeapService } from 'vs/workbench/api/node/extHostHeapService'; import * as vscode from 'vscode'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { NoopLogService } from 'vs/platform/log/common/log'; +import { NullLogService } from 'vs/platform/log/common/log'; const defaultSelector = { scheme: 'far' }; const model: EditorCommon.IModel = EditorModel.createFromString( @@ -103,7 +103,7 @@ suite('ExtHostLanguageFeatures', function () { const heapService = new ExtHostHeapService(); - const commands = new ExtHostCommands(threadService, heapService, new NoopLogService()); + const commands = new ExtHostCommands(threadService, heapService, new NullLogService()); threadService.set(ExtHostContext.ExtHostCommands, commands); threadService.setTestInstance(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); diff --git a/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts b/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts index 26c9913d5b6..9b1ecf276cf 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts @@ -19,7 +19,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { mock } from 'vs/workbench/test/electron-browser/api/mock'; import { TPromise } from 'vs/base/common/winjs.base'; import { TreeItemCollapsibleState, ITreeItem } from 'vs/workbench/common/views'; -import { NoopLogService } from 'vs/platform/log/common/log'; +import { NullLogService } from 'vs/platform/log/common/log'; suite('ExtHostTreeView', function () { @@ -66,7 +66,7 @@ suite('ExtHostTreeView', function () { threadService.setTestInstance(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); target = new RecordingShape(); - testObject = new ExtHostTreeViews(target, new ExtHostCommands(threadService, new ExtHostHeapService(), new NoopLogService())); + testObject = new ExtHostTreeViews(target, new ExtHostCommands(threadService, new ExtHostHeapService(), new NullLogService())); onDidChangeTreeNode = new Emitter<{ key: string }>(); onDidChangeTreeKey = new Emitter(); testObject.registerTreeDataProvider('testNodeTreeProvider', aNodeTreeDataProvider()); From 41ba9e66322ada2ba30347776ccfcc108d92920c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 12 Dec 2017 10:37:14 +0100 Subject: [PATCH 111/615] fix #40078 --- extensions/git/src/repository.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 098ee2bd954..d9e3a41445b 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -862,7 +862,7 @@ export class Repository implements Disposable { const { status, didHitLimit } = await this.repository.getStatus(); const config = workspace.getConfiguration('git'); const shouldIgnore = config.get('ignoreLimitWarning') === true; - const useIcons = config.get('decorations.enabled', true); + const useIcons = !config.get('decorations.enabled', true); this.isRepositoryHuge = didHitLimit; From 7639207583563b3d5c6ad85ff85a4c98fbc2ee0c Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 12 Dec 2017 10:52:01 +0100 Subject: [PATCH 112/615] status - add process.argv to output --- src/vs/code/electron-main/diagnostics.ts | 1 + src/vs/code/electron-main/launch.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/vs/code/electron-main/diagnostics.ts b/src/vs/code/electron-main/diagnostics.ts index b3c83dfcf6e..285e9c504a6 100644 --- a/src/vs/code/electron-main/diagnostics.ts +++ b/src/vs/code/electron-main/diagnostics.ts @@ -135,6 +135,7 @@ function formatEnvironment(info: IMainProcessInfo): string { } output.push(`VM: ${Math.round((virtualMachineHint.value() * 100))}%`); output.push(`Screen Reader: ${app.isAccessibilitySupportEnabled() ? 'yes' : 'no'}`); + output.push(`Process Argv: ${info.mainArguments.join(' ')}`); return output.join('\n'); } diff --git a/src/vs/code/electron-main/launch.ts b/src/vs/code/electron-main/launch.ts index 31125cac105..91d3f39378a 100644 --- a/src/vs/code/electron-main/launch.ts +++ b/src/vs/code/electron-main/launch.ts @@ -33,6 +33,7 @@ export interface IWindowInfo { export interface IMainProcessInfo { mainPID: number; + mainArguments: string[]; windows: IWindowInfo[]; } @@ -159,6 +160,7 @@ export class LaunchService implements ILaunchService { return TPromise.wrap({ mainPID: process.pid, + mainArguments: process.argv, windows: this.windowsMainService.getWindows().map(window => { return this.getWindowInfo(window); }) From 1005a523a3ccdee1d63537fc613277c82c28b720 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 12 Dec 2017 10:57:19 +0100 Subject: [PATCH 113/615] fixes #40060 --- .../parts/debug/electron-browser/debugConfigurationManager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts index 452bd2314cb..a5a554cb112 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts @@ -380,8 +380,8 @@ export class ConfigurationManager implements IConfigurationManager { public canSetBreakpointsIn(model: IModel): boolean { const modeId = model ? model.getLanguageIdentifier().language : null; - if (!modeId || modeId === 'jsonc') { - // do not allow breakpoints in our settings files + if (!modeId || modeId === 'jsonc' || modeId === 'log') { + // do not allow breakpoints in our settings files and output return false; } if (this.configurationService.getValue('debug').allowBreakpointsEverywhere) { From d989c9555862ab363e9418e234832c93340c3d4f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 12 Dec 2017 11:11:23 +0100 Subject: [PATCH 114/615] withProgress should return the promise/thenable of the nested task --- src/vs/platform/progress/common/progress.ts | 2 +- .../progress/browser/progressService2.ts | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vs/platform/progress/common/progress.ts b/src/vs/platform/progress/common/progress.ts index 358d61cabb9..75addbff74d 100644 --- a/src/vs/platform/progress/common/progress.ts +++ b/src/vs/platform/progress/common/progress.ts @@ -78,5 +78,5 @@ export interface IProgressService2 { _serviceBrand: any; - withProgress(options: IProgressOptions, task: (progress: IProgress) => Thenable): void; + withProgress

, R=any>(options: IProgressOptions, task: (progress: IProgress) => P): P; } diff --git a/src/vs/workbench/services/progress/browser/progressService2.ts b/src/vs/workbench/services/progress/browser/progressService2.ts index 2e1c2e4153c..33cbb054baf 100644 --- a/src/vs/workbench/services/progress/browser/progressService2.ts +++ b/src/vs/workbench/services/progress/browser/progressService2.ts @@ -65,22 +65,21 @@ export class ProgressService2 implements IProgressService2 { // } - withProgress(options: IProgressOptions, task: (progress: IProgress<{ message?: string, percentage?: number }>) => Thenable): void { + withProgress

, R=any>(options: IProgressOptions, task: (progress: IProgress) => P): P { + const { location } = options; switch (location) { case ProgressLocation.Window: - this._withWindowProgress(options, task); - break; + return this._withWindowProgress(options, task); case ProgressLocation.Scm: - this._withViewletProgress('workbench.view.scm', task); - break; + return this._withViewletProgress('workbench.view.scm', task); default: console.warn(`Bad progress location: ${location}`); + return undefined; } } - - private _withWindowProgress(options: IProgressOptions, callback: (progress: IProgress<{ message?: string, percentage?: number }>) => Thenable): void { + private _withWindowProgress

, R=any>(options: IProgressOptions, callback: (progress: IProgress<{ message?: string, percentage?: number }>) => P): P { const task: [IProgressOptions, Progress] = [options, new Progress(() => this._updateWindowProgress())]; @@ -105,6 +104,7 @@ export class ProgressService2 implements IProgressService2 { // cancel delay if promise finishes below 150ms always(TPromise.wrap(promise), () => clearTimeout(delayHandle)); + return promise; } private _updateWindowProgress(idx: number = 0) { @@ -138,7 +138,7 @@ export class ProgressService2 implements IProgressService2 { } } - private _withViewletProgress(viewletId: string, task: (progress: IProgress<{ message?: string, percentage?: number }>) => Thenable): void { + private _withViewletProgress

, R=any>(viewletId: string, task: (progress: IProgress<{ message?: string, percentage?: number }>) => P): P { const promise = task(emptyProgress); @@ -147,7 +147,7 @@ export class ProgressService2 implements IProgressService2 { if (viewletProgress) { viewletProgress.showWhile(TPromise.wrap(promise)); } - + return promise; // show activity bar // let activityProgress: IDisposable; // let delayHandle = setTimeout(() => { From db328de17ae74ca800e7d7ba92379d05168af76e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 12 Dec 2017 11:19:41 +0100 Subject: [PATCH 115/615] show generic progress message when running save hooks, #40030 --- .../mainThreadSaveParticipant.ts | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts index e1508fc1f4c..2701a1575bd 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts @@ -24,8 +24,14 @@ import { EditOperation } from 'vs/editor/common/core/editOperation'; import { extHostCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import { IProgressService2, ProgressLocation } from 'vs/platform/progress/common/progress'; +import { localize } from 'vs/nls'; -class TrimWhitespaceParticipant implements ISaveParticipant { +export interface ISaveParticipantParticipant extends ISaveParticipant { + // progressMessage: string; +} + +class TrimWhitespaceParticipant implements ISaveParticipantParticipant { constructor( @IConfigurationService private configurationService: IConfigurationService, @@ -81,7 +87,7 @@ function findEditor(model: IModel, codeEditorService: ICodeEditorService): ICode return candidate; } -export class FinalNewLineParticipant implements ISaveParticipant { +export class FinalNewLineParticipant implements ISaveParticipantParticipant { constructor( @IConfigurationService private configurationService: IConfigurationService, @@ -119,7 +125,7 @@ export class FinalNewLineParticipant implements ISaveParticipant { } } -export class TrimFinalNewLinesParticipant implements ISaveParticipant { +export class TrimFinalNewLinesParticipant implements ISaveParticipantParticipant { constructor( @IConfigurationService private configurationService: IConfigurationService, @@ -168,7 +174,7 @@ export class TrimFinalNewLinesParticipant implements ISaveParticipant { } } -class FormatOnSaveParticipant implements ISaveParticipant { +class FormatOnSaveParticipant implements ISaveParticipantParticipant { constructor( @ICodeEditorService private _editorService: ICodeEditorService, @@ -236,7 +242,7 @@ class FormatOnSaveParticipant implements ISaveParticipant { } } -class ExtHostSaveParticipant implements ISaveParticipant { +class ExtHostSaveParticipant implements ISaveParticipantParticipant { private _proxy: ExtHostDocumentSaveParticipantShape; @@ -263,24 +269,20 @@ class ExtHostSaveParticipant implements ISaveParticipant { @extHostCustomer export class SaveParticipant implements ISaveParticipant { - private _saveParticipants: ISaveParticipant[]; + private _saveParticipants: ISaveParticipantParticipant[]; constructor( extHostContext: IExtHostContext, - @IInstantiationService instantiationService: IInstantiationService, - @IConfigurationService configurationService: IConfigurationService, - @ICodeEditorService codeEditorService: ICodeEditorService, - @IEditorWorkerService editorWorkerService: IEditorWorkerService + @IProgressService2 private _progressService: IProgressService2, + @IInstantiationService instantiationService: IInstantiationService ) { - this._saveParticipants = [ - new TrimWhitespaceParticipant(configurationService, codeEditorService), - new FormatOnSaveParticipant(codeEditorService, editorWorkerService, configurationService), - new FinalNewLineParticipant(configurationService, codeEditorService), - new TrimFinalNewLinesParticipant(configurationService, codeEditorService), - new ExtHostSaveParticipant(extHostContext) + instantiationService.createInstance(TrimWhitespaceParticipant), + instantiationService.createInstance(FormatOnSaveParticipant), + instantiationService.createInstance(FinalNewLineParticipant), + instantiationService.createInstance(TrimFinalNewLinesParticipant), + instantiationService.createInstance(ExtHostSaveParticipant, extHostContext), ]; - // Hook into model TextFileEditorModel.setSaveParticipant(this); } @@ -290,10 +292,12 @@ export class SaveParticipant implements ISaveParticipant { } participate(model: ITextFileEditorModel, env: { reason: SaveReason }): Thenable { - const promiseFactory = this._saveParticipants.map(p => () => { - return Promise.resolve(p.participate(model, env)); + return this._progressService.withProgress({ location: ProgressLocation.Window }, progress => { + progress.report({ message: localize('saveParticipants', "Running Save Participants...") }); + const promiseFactory = this._saveParticipants.map(p => () => { + return Promise.resolve(p.participate(model, env)); + }); + return sequence(promiseFactory).then(() => { }); }); - - return sequence(promiseFactory).then(() => { }); } } From 9f0383f1631e5e5b2d76b909896540fcc605c59d Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 12 Dec 2017 11:22:39 +0100 Subject: [PATCH 116/615] Add "(Administrator)" suffix to window title when running as administrator in Windows (fixes #19707) --- build/gulpfile.vscode.js | 1 + package.json | 1 + src/typings/native-is-elevated.d.ts | 10 +++++ .../browser/parts/titlebar/titlebarPart.ts | 37 +++++++++++------- src/vs/workbench/electron-browser/shell.ts | 6 --- src/vs/workbench/electron-browser/window.ts | 39 +++++++++++++++++-- .../services/title/common/titleService.ts | 10 +++++ yarn.lock | 4 ++ 8 files changed, 83 insertions(+), 25 deletions(-) create mode 100644 src/typings/native-is-elevated.d.ts diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index a74246fa4d6..587e8ab262a 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -296,6 +296,7 @@ function packageTask(platform, arch, opts) { .pipe(util.cleanNodeModule('oniguruma', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/*.js'])) .pipe(util.cleanNodeModule('windows-mutex', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('native-keymap', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node'])) + .pipe(util.cleanNodeModule('native-is-elevated', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('native-watchdog', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('spdlog', ['binding.gyp', 'build/**', 'deps/**', 'src/**', 'test/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('jschardet', ['dist/**'])) diff --git a/package.json b/package.json index 8535979bdf1..942a65274d4 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "jschardet": "1.6.0", "keytar": "^4.0.5", "minimist": "1.2.0", + "native-is-elevated": "^0.2.1", "native-keymap": "1.2.5", "native-watchdog": "0.3.0", "node-pty": "0.7.4", diff --git a/src/typings/native-is-elevated.d.ts b/src/typings/native-is-elevated.d.ts new file mode 100644 index 00000000000..1b79764d6a0 --- /dev/null +++ b/src/typings/native-is-elevated.d.ts @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +declare module 'native-is-elevated' { + function isElevated(): boolean; + + export = isElevated; +} \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts index bd5633c031b..0b7eceecfcd 100644 --- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts +++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts @@ -11,7 +11,7 @@ import { Builder, $, Dimension } from 'vs/base/browser/builder'; import * as DOM from 'vs/base/browser/dom'; import * as paths from 'vs/base/common/paths'; import { Part } from 'vs/workbench/browser/part'; -import { ITitleService } from 'vs/workbench/services/title/common/titleService'; +import { ITitleService, ITitleProperties } from 'vs/workbench/services/title/common/titleService'; import { getZoomFactor } from 'vs/base/browser/browser'; import { IWindowService, IWindowsService } from 'vs/platform/windows/common/windows'; import * as errors from 'vs/base/common/errors'; @@ -19,7 +19,6 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import { IAction, Action } from 'vs/base/common/actions'; import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; -import { IIntegrityService } from 'vs/platform/integrity/common/integrity'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -31,7 +30,7 @@ import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/ import { Verbosity } from 'vs/platform/editor/common/editor'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { TITLE_BAR_ACTIVE_BACKGROUND, TITLE_BAR_ACTIVE_FOREGROUND, TITLE_BAR_INACTIVE_FOREGROUND, TITLE_BAR_INACTIVE_BACKGROUND, TITLE_BAR_BORDER } from 'vs/workbench/common/theme'; -import { isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh, isWindows } from 'vs/base/common/platform'; import URI from 'vs/base/common/uri'; import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; @@ -40,6 +39,7 @@ export class TitlebarPart extends Part implements ITitleService { public _serviceBrand: any; private static readonly NLS_UNSUPPORTED = nls.localize('patchedWindowTitle', "[Unsupported]"); + private static readonly NLS_USER_IS_ADMIN = isWindows ? nls.localize('userIsAdmin', "[Administrator]") : nls.localize('userIsSudo', "[Superuser]"); private static readonly NLS_EXTENSION_HOST = nls.localize('devExtensionWindowTitlePrefix', "[Extension Development Host]"); private static readonly TITLE_DIRTY = '\u25cf '; private static readonly TITLE_SEPARATOR = isMacintosh ? ' — ' : ' - '; // macOS uses special - separator @@ -52,7 +52,7 @@ export class TitlebarPart extends Part implements ITitleService { private isInactive: boolean; - private isPure: boolean; + private properties: ITitleProperties; private activeEditorListeners: IDisposable[]; constructor( @@ -63,7 +63,6 @@ export class TitlebarPart extends Part implements ITitleService { @IWindowsService private windowsService: IWindowsService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IEditorGroupService private editorGroupService: IEditorGroupService, - @IIntegrityService private integrityService: IIntegrityService, @IEnvironmentService private environmentService: IEnvironmentService, @IWorkspaceContextService private contextService: IWorkspaceContextService, @IThemeService themeService: IThemeService, @@ -71,7 +70,7 @@ export class TitlebarPart extends Part implements ITitleService { ) { super(id, { hasTitle: false }, themeService); - this.isPure = true; + this.properties = { isPure: true, isAdmin: false }; this.activeEditorListeners = []; this.init(); @@ -83,14 +82,6 @@ export class TitlebarPart extends Part implements ITitleService { // Initial window title when loading is done this.lifecycleService.when(LifecyclePhase.Running).then(() => this.setTitle(this.getWindowTitle())); - - // Integrity for window title - this.integrityService.isPure().then(r => { - if (!r.isPure) { - this.isPure = false; - this.setTitle(this.getWindowTitle()); - } - }); } private registerListeners(): void { @@ -149,7 +140,11 @@ export class TitlebarPart extends Part implements ITitleService { title = this.environmentService.appNameLong; } - if (!this.isPure) { + if (this.properties.isAdmin) { + title = `${title} ${TitlebarPart.NLS_USER_IS_ADMIN}`; + } + + if (!this.properties.isPure) { title = `${title} ${TitlebarPart.NLS_UNSUPPORTED}`; } @@ -161,6 +156,18 @@ export class TitlebarPart extends Part implements ITitleService { return title; } + public updateProperties(properties: ITitleProperties): void { + const isAdmin = typeof properties.isAdmin === 'boolean' ? properties.isAdmin : this.properties.isAdmin; + const isPure = typeof properties.isPure === 'boolean' ? properties.isPure : this.properties.isPure; + + if (isAdmin !== this.properties.isAdmin || isPure !== this.properties.isPure) { + this.properties.isAdmin = isAdmin; + this.properties.isPure = isPure; + + this.setTitle(this.getWindowTitle()); + } + } + /** * Possible template values: * diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index cf13abcc7cc..c2db51033d8 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -7,7 +7,6 @@ import 'vs/css!./media/shell'; -import * as nls from 'vs/nls'; import * as platform from 'vs/base/common/platform'; import { Dimension, Builder, $ } from 'vs/base/browser/builder'; import dom = require('vs/base/browser/dom'); @@ -193,11 +192,6 @@ export class WorkbenchShell { // Startup Telemetry this.logStartupTelemetry(info); - // Root Warning - if ((platform.isLinux || platform.isMacintosh) && process.getuid() === 0) { - this.messageService.show(Severity.Warning, nls.localize('runningAsRoot', "It is recommended not to run Code as 'root'.")); - } - // Set lifecycle phase to `Runnning` so that other contributions can now do something this.lifecycleService.phase = LifecyclePhase.Running; diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index 77b52b1db13..4919828d54f 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -6,7 +6,6 @@ 'use strict'; import nls = require('vs/nls'); -import platform = require('vs/base/common/platform'); import URI from 'vs/base/common/uri'; import errors = require('vs/base/common/errors'); import types = require('vs/base/common/types'); @@ -46,6 +45,9 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; import { LifecyclePhase, ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IWorkspaceFolderCreationData } from 'vs/platform/workspaces/common/workspaces'; +import { IIntegrityService } from 'vs/platform/integrity/common/integrity'; +import { AccessibilitySupport, isRootUser, isWindows, isMacintosh } from 'vs/base/common/platform'; +import product from 'vs/platform/node/product'; const TextInputActions: IAction[] = [ new Action('undo', nls.localize('undo', "Undo"), null, true, () => document.execCommand('undo') && TPromise.as(true)), @@ -91,7 +93,8 @@ export class ElectronWindow extends Themable { @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService, @IFileService private fileService: IFileService, @IMenuService private menuService: IMenuService, - @ILifecycleService private lifecycleService: ILifecycleService + @ILifecycleService private lifecycleService: ILifecycleService, + @IIntegrityService private integrityService: IIntegrityService ) { super(themeService); @@ -239,7 +242,7 @@ export class ElectronWindow extends Themable { // keyboard layout changed event ipc.on('vscode:accessibilitySupportChanged', (_event: any, accessibilitySupportEnabled: boolean) => { - browser.setAccessibilitySupport(accessibilitySupportEnabled ? platform.AccessibilitySupport.Enabled : platform.AccessibilitySupport.Disabled); + browser.setAccessibilitySupport(accessibilitySupportEnabled ? AccessibilitySupport.Enabled : AccessibilitySupport.Disabled); }); // Zoom level changes @@ -317,10 +320,38 @@ export class ElectronWindow extends Themable { // Touchbar Support this.updateTouchbarMenu(); + + // Integrity warning + this.integrityService.isPure().then(res => this.titleService.updateProperties({ isPure: res.isPure })); + + // Root warning + this.lifecycleService.when(LifecyclePhase.Running).then(() => { + let isAdminPromise: Promise; + if (isWindows) { + isAdminPromise = import('native-is-elevated').then(isElevated => isElevated()); + } else { + isAdminPromise = Promise.resolve(isRootUser); + } + + return isAdminPromise.then(isAdmin => { + + // Update title + this.titleService.updateProperties({ isAdmin }); + + // Show warning message + if (isAdmin) { + if (isWindows) { + this.messageService.show(Severity.Warning, nls.localize('runningAsAdmin', "It is not recommended to run {0} as Administrator.", product.nameShort)); + } else { + this.messageService.show(Severity.Warning, nls.localize('runningAsRoot', "It is not recommended to run {0} as root user.", product.nameShort)); + } + } + }); + }); } private updateTouchbarMenu(): void { - if (!platform.isMacintosh) { + if (!isMacintosh) { return; // macOS only } diff --git a/src/vs/workbench/services/title/common/titleService.ts b/src/vs/workbench/services/title/common/titleService.ts index 3a74b1efe28..6a5b10c7bd0 100644 --- a/src/vs/workbench/services/title/common/titleService.ts +++ b/src/vs/workbench/services/title/common/titleService.ts @@ -8,6 +8,11 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export const ITitleService = createDecorator('titleService'); +export interface ITitleProperties { + isPure?: boolean; + isAdmin?: boolean; +} + export interface ITitleService { _serviceBrand: any; @@ -20,4 +25,9 @@ export interface ITitleService { * Set the represented file name to the title if any. */ setRepresentedFilename(path: string): void; + + /** + * Update some environmental title properties. + */ + updateProperties(properties: ITitleProperties): void; } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index f95110eef08..93ff0a1f9ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3742,6 +3742,10 @@ nan@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" +native-is-elevated@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/native-is-elevated/-/native-is-elevated-0.2.1.tgz#70a2123a8575b9f624a3ef465d98cb74ae017385" + native-keymap@1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/native-keymap/-/native-keymap-1.2.5.tgz#1035a9417b9a9340cf8097763a43c76d588165a5" From 14ac7514b6c24b08e65f07eb99601e6befee13c7 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 12 Dec 2017 11:40:30 +0100 Subject: [PATCH 117/615] Move license entries to root OSSREADME.json --- .vscode/settings.json | 5 +- OSSREADME.json | 366 +++++++++--------- ThirdPartyNotices.txt | 2 +- extensions/markdown/OSSREADME.json | 51 --- .../ms-vscode.node-debug/OSSREADME.json | 16 - .../ms-vscode.node-debug2/OSSREADME.json | 23 -- extensions/typescript/OSSREADME.json | 66 ---- 7 files changed, 184 insertions(+), 345 deletions(-) delete mode 100644 extensions/ms-vscode.node-debug/OSSREADME.json delete mode 100644 extensions/ms-vscode.node-debug2/OSSREADME.json diff --git a/.vscode/settings.json b/.vscode/settings.json index d4cdcdbedd8..d3e36aa8ebf 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,6 +10,9 @@ "when": "$(basename).ts" } }, + "files.associations": { + "OSSREADME.json": "jsonc" + }, "search.exclude": { "**/node_modules": true, "**/bower_components": true, @@ -36,4 +39,4 @@ } ], "typescript.tsdk": "node_modules/typescript/lib" -} \ No newline at end of file +} diff --git a/OSSREADME.json b/OSSREADME.json index ccc6ceb8c2e..b24bd919d93 100644 --- a/OSSREADME.json +++ b/OSSREADME.json @@ -1,65 +1,5 @@ // Listing in here platform dependencies that come in at build time - -[{ - "isLicense": true, - "name": "async-each", - "repositoryURL": "https://github.com/paulmillr/async-each", - "license": "MIT", - "licenseDetail": [ - "The MIT License (MIT)", - "", - "Copyright (c) 2016 Paul Miller [(paulmillr.com)](http://paulmillr.com)", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the “Softwareâ€), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in", - "all copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED “AS ISâ€, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN", - "THE SOFTWARE." - ], - "isProd": true -}, -{ - "isLicense": true, - "name": "chokidar", - "repositoryURL": "https://github.com/paulmillr/chokidar", - "license": "MIT", - "licenseDetail": [ - "The MIT license.", - "", - "Copyright (c) 2012 - 2016 Paul Miller [paulmillr.com](http://paulmillr.com) & Elan Shanker", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy of", - "this software and associated documentation files (the \"Software\"), to deal in", - "the Software without restriction, including without limitation the rights to", - "use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies", - "of the Software, and to permit persons to whom the Software is furnished to do", - "so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", - "SOFTWARE." - ], - "isProd": true -}, +[ { "name": "chromium", "version": "58.0.3029.110", @@ -123,40 +63,56 @@ "isProd": true }, { - "isLicense": true, - "name": "ripgrep", - "repositoryURL": "https://github.com/BurntSushi/ripgrep", + "name": "spdlog original", + "version": "0.14.0", + "repositoryURL": "https://github.com/gabime/spdlog", "license": "MIT", + "isProd": true +}, + +// -------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------- +// ONLY LICENSE TEXT AFTER THIS MARKER +// Each license entry should contain precisely the following fields: +// "isLicense": true +// "name": string +// "licenseDetail": string[] +// Furthermore, each license entry should contain a clear reason for existance. + +{ + // Reason: Added here because the repo at https://github.com/paulmillr/async-each + // does not include a LICENSE file that can be machine processed. + "isLicense": true, + "name": "async-each", "licenseDetail": [ "The MIT License (MIT)", "", - "Copyright (c) 2015 Andrew Gallant", + "Copyright (c) 2016 Paul Miller [(paulmillr.com)](http://paulmillr.com)", "", - "Permission is hereby granted, free of charge, to any person obtaining a copy of", - "this software and associated documentation files (the \"Software\"), to deal in", - "the Software without restriction, including without limitation the rights to", - "use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies", - "of the Software, and to permit persons to whom the Software is furnished to do", - "so, subject to the following conditions:", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and associated documentation files (the “Softwareâ€), to deal", + "in the Software without restriction, including without limitation the rights", + "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", + "copies of the Software, and to permit persons to whom the Software is", + "furnished to do so, subject to the following conditions:", "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", + "The above copyright notice and this permission notice shall be included in", + "all copies or substantial portions of the Software.", "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", + "THE SOFTWARE IS PROVIDED “AS ISâ€, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", - "SOFTWARE." - ], - "isProd": true + "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN", + "THE SOFTWARE." + ] }, { + // Reason: The license at https://github.com/aadsm/jschardet/blob/master/LICENSE + // does not include a clear Copyright statement and does not credit authors. "isLicense": true, "name": "jschardet", - "repositoryURL": "https://github.com/aadsm/jschardet", - "license": "LGPL", "licenseDetail": [ "Chardet was originally ported from C++ by Mark Pilgrim. It is now maintained", " by Dan Blanchard and Ian Cordasco, and was formerly maintained by Erik Rose.", @@ -670,12 +626,117 @@ " Ty Coon, President of Vice", "", "That's all there is to it!" - ], - "isProd": true + ] +}, +{ + // Added here because the module `parse5` has a dependency to it. + // The module `parse5` is shipped via the `extension-editing` built-in extension. + // The module `parse5` does not want to remove it https://github.com/inikulin/parse5/issues/225 + "isLicense": true, + "name": "@types/node", + "licenseDetail": [ + "This project is licensed under the MIT license.", + "Copyrights are respective of each contributor listed at the beginning of each definition file.", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + ] +}, +{ + // We override the license that gets discovered at + // https://github.com/Microsoft/TypeScript/blob/master/LICENSE.txt + // because it does not contain a Copyright statement + "isLicense": true, + "name": "typescript", + "licenseDetail": [ + "Copyright (c) Microsoft Corporation. All rights reserved.", + "", + "Apache License", + "", + "Version 2.0, January 2004", + "", + "http://www.apache.org/licenses/", + "", + "TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION", + "", + "1. Definitions.", + "", + "\"License\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.", + "", + "\"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.", + "", + "\"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.", + "", + "\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License.", + "", + "\"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.", + "", + "\"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.", + "", + "\"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).", + "", + "\"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.", + "", + "\"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\"", + "", + "\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.", + "", + "2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.", + "", + "3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.", + "", + "4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:", + "", + "You must give any other recipients of the Work or Derivative Works a copy of this License; and", + "", + "You must cause any modified files to carry prominent notices stating that You changed the files; and", + "", + "You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and", + "", + "If the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.", + "", + "5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.", + "", + "6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.", + "", + "7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.", + "", + "8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.", + "", + "9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.", + "", + "END OF TERMS AND CONDITIONS" + ] }, { "isLicense": true, - "name": "@types/node", + "name": "noice-json-rpc", + "repositoryURL": "https://github.com/nojvek/noice-json-rpc", + "license": "MIT", + "licenseDetail": [ + "Copyright (c) Manoj Patel", + "", + "MIT License", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation", + "files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy,", + "modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software", + "is furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES", + "OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS", + "BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT", + "OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + ] +}, +{ + "isLicense": true, + "name": "@types/source-map", "repositoryURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", "license": "MIT", "licenseDetail": [ @@ -687,126 +748,57 @@ "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", "", "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." - ], - "isProd": true + ] }, { "isLicense": true, - "name": "jsonfile", - "repositoryURL": "https+ssh://git@github.com/jprichardson/node-jsonfile", - "license": "MIT", + "name": "markdown-it-named-headers", "licenseDetail": [ - "(The MIT License)", + "Copyright (c) markdown-it-named-headers authors", "", - "Copyright (c) 2012-2015, JP Richardson ", + "This is free and unencumbered software released into the public domain.", "", - "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files", - "(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,", - " merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is", - " furnished to do so, subject to the following conditions:", + "Anyone is free to copy, modify, publish, use, compile, sell, or", + "distribute this software, either in source code form or as a compiled", + "binary, for any purpose, commercial or non-commercial, and by any", + "means.", "", - "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", + "In jurisdictions that recognize copyright laws, the author or authors", + "of this software dedicate any and all copyright interest in the", + "software to the public domain. We make this dedication for the benefit", + "of the public at large and to the detriment of our heirs and", + "successors. We intend this dedication to be an overt act of", + "relinquishment in perpetuity of all present and future rights to this", + "software under copyright law.", "", - "THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE", - "WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS", - "OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,", - " ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." - ], - "isProd": true + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,", + "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF", + "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.", + "IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR", + "OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,", + "ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR", + "OTHER DEALINGS IN THE SOFTWARE.", + "", + "For more information, please refer to " + ] }, { "isLicense": true, - "name": "string_decoder", - "repositoryURL": "https://github.com/rvagg/string_decoder", - "license": "MIT", + "name": "uc.micro", "licenseDetail": [ - "The MIT License (MIT)", + " DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE", + " Version 2, December 2004", "", - "Node.js is licensed for use as follows:", + " Copyright (C) 2004 Sam Hocevar ", "", - "\"\"\"", - "Copyright Node.js contributors. All rights reserved.", + " Everyone is permitted to copy and distribute verbatim or modified", + " copies of this license document, and changing it is allowed as long", + " as the name is changed.", "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to", - "deal in the Software without restriction, including without limitation the", - "rights to use, copy, modify, merge, publish, distribute, sublicense, and/or", - "sell copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", + " DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE", + " TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION", "", - "The above copyright notice and this permission notice shall be included in", - "all copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING", - "FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS", - "IN THE SOFTWARE.", - "\"\"\"", - "", - "This license applies to parts of Node.js originating from the", - "https://github.com/joyent/node repository:", - "", - "\"\"\"", - "Copyright Joyent, Inc. and other Node contributors. All rights reserved.", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to", - "deal in the Software without restriction, including without limitation the", - "rights to use, copy, modify, merge, publish, distribute, sublicense, and/or", - "sell copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in", - "all copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING", - "FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS", - "IN THE SOFTWARE.", - "\"\"\"" - ], - "isProd": true -}, -{ - "name": "spdlog original", - "version": "0.14.0", - "repositoryURL": "https://github.com/gabime/spdlog", - "license": "MIT", - "isProd": true -}, -{ - "isLicense": true, - "name": "spdlog", - "version": "0.14.0", - "repositoryURL": "https://github.com/gabime/spdlog", - "license": "MIT", - "licenseDetail": [ - "MIT License", - "", - "Copyright (c) Microsoft Corporation. All rights reserved.", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", - "SOFTWARE" + " 0. You just DO WHAT THE FUCK YOU WANT TO." ] } ] diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt index 00e7f5e3da9..6911462197f 100644 --- a/ThirdPartyNotices.txt +++ b/ThirdPartyNotices.txt @@ -1846,4 +1846,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ========================================= -END OF vscode-swift NOTICES AND INFORMATION +END OF vscode-swift NOTICES AND INFORMATION \ No newline at end of file diff --git a/extensions/markdown/OSSREADME.json b/extensions/markdown/OSSREADME.json index 79c18ea56c0..33c460e00c0 100644 --- a/extensions/markdown/OSSREADME.json +++ b/extensions/markdown/OSSREADME.json @@ -15,38 +15,6 @@ "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." ] }, -{ - "isLicense": true, - "name": "markdown-it-named-headers", - "licenseDetail": [ - "Copyright (c) markdown-it-named-headers authors", - "", - "This is free and unencumbered software released into the public domain.", - "", - "Anyone is free to copy, modify, publish, use, compile, sell, or", - "distribute this software, either in source code form or as a compiled", - "binary, for any purpose, commercial or non-commercial, and by any", - "means.", - "", - "In jurisdictions that recognize copyright laws, the author or authors", - "of this software dedicate any and all copyright interest in the", - "software to the public domain. We make this dedication for the benefit", - "of the public at large and to the detriment of our heirs and", - "successors. We intend this dedication to be an overt act of", - "relinquishment in perpetuity of all present and future rights to this", - "software under copyright law.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,", - "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF", - "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.", - "IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR", - "OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,", - "ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR", - "OTHER DEALINGS IN THE SOFTWARE.", - "", - "For more information, please refer to " - ] -}, { "name": "textmate/markdown.tmbundle", "version": "0.0.0", @@ -67,23 +35,4 @@ "to the base-name name of the original file, and an extension of txt, html, or similar. For example", "\"tidy\" is accompanied by \"tidy-license.txt\"." ] -}, -{ - "isLicense": true, - "name": "uc.micro", - "licenseDetail": [ - " DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE", - " Version 2, December 2004", - "", - " Copyright (C) 2004 Sam Hocevar ", - "", - " Everyone is permitted to copy and distribute verbatim or modified", - " copies of this license document, and changing it is allowed as long", - " as the name is changed.", - "", - " DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE", - " TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION", - "", - " 0. You just DO WHAT THE FUCK YOU WANT TO." - ] }] diff --git a/extensions/ms-vscode.node-debug/OSSREADME.json b/extensions/ms-vscode.node-debug/OSSREADME.json deleted file mode 100644 index 215c33cbe0f..00000000000 --- a/extensions/ms-vscode.node-debug/OSSREADME.json +++ /dev/null @@ -1,16 +0,0 @@ -[{ - "isLicense": true, - "name": "@types/source-map", - "repositoryURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", - "license": "MIT", - "licenseDetail": [ - "This project is licensed under the MIT license.", - "Copyrights are respective of each contributor listed at the beginning of each definition file.", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." - ] -}] diff --git a/extensions/ms-vscode.node-debug2/OSSREADME.json b/extensions/ms-vscode.node-debug2/OSSREADME.json deleted file mode 100644 index 83ffc0884d2..00000000000 --- a/extensions/ms-vscode.node-debug2/OSSREADME.json +++ /dev/null @@ -1,23 +0,0 @@ -[{ - "isLicense": true, - "name": "noice-json-rpc", - "repositoryURL": "https://github.com/nojvek/noice-json-rpc", - "license": "MIT", - "licenseDetail": [ - "Copyright (c) Manoj Patel", - "", - "MIT License", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation", - "files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy,", - "modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software", - "is furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES", - "OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS", - "BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT", - "OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." - ] -}] diff --git a/extensions/typescript/OSSREADME.json b/extensions/typescript/OSSREADME.json index d9220b9f35b..160da003cd8 100644 --- a/extensions/typescript/OSSREADME.json +++ b/extensions/typescript/OSSREADME.json @@ -4,70 +4,4 @@ "license": "MIT", "repositoryURL": "https://github.com/Microsoft/TypeScript-TmLanguage", "description": "The files syntaxes/TypeScript.tmLanguage.json and syntaxes/TypeScriptReact.tmLanguage.json were derived from TypeScript.tmLanguage and TypeScriptReact.tmLanguage in https://github.com/Microsoft/TypeScript-TmLanguage." -}, -{ - // We override the license that gets discovered at - // https://github.com/Microsoft/TypeScript/blob/master/LICENSE.txt - // because it does not contain a Copyright statement - "isLicense": true, - "name": "typescript", - "licenseDetail": [ - "Copyright (c) Microsoft Corporation. All rights reserved.", - "", - "Apache License", - "", - "Version 2.0, January 2004", - "", - "http://www.apache.org/licenses/", - "", - "TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION", - "", - "1. Definitions.", - "", - "\"License\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.", - "", - "\"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.", - "", - "\"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.", - "", - "\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License.", - "", - "\"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.", - "", - "\"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.", - "", - "\"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).", - "", - "\"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.", - "", - "\"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\"", - "", - "\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.", - "", - "2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.", - "", - "3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.", - "", - "4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:", - "", - "You must give any other recipients of the Work or Derivative Works a copy of this License; and", - "", - "You must cause any modified files to carry prominent notices stating that You changed the files; and", - "", - "You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and", - "", - "If the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.", - "", - "5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.", - "", - "6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.", - "", - "7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.", - "", - "8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.", - "", - "9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.", - "", - "END OF TERMS AND CONDITIONS" - ] }] From f76e3da7ae8bd932c2f2b4706ed5b42f568945a3 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 12 Dec 2017 11:41:31 +0100 Subject: [PATCH 118/615] eng - less TPromise use in tests --- .../contrib/quickFix/test/quickFixModel.test.ts | 4 ++-- .../editor/contrib/suggest/test/suggestModel.test.ts | 11 +++++------ .../api/extHostDocumentsAndEditors.test.ts | 4 +--- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/vs/editor/contrib/quickFix/test/quickFixModel.test.ts b/src/vs/editor/contrib/quickFix/test/quickFixModel.test.ts index 0631075c94a..f161a0f47f9 100644 --- a/src/vs/editor/contrib/quickFix/test/quickFixModel.test.ts +++ b/src/vs/editor/contrib/quickFix/test/quickFixModel.test.ts @@ -80,7 +80,7 @@ suite('QuickFix', () => { editor.setPosition({ lineNumber: 2, column: 1 }); - return new TPromise((resolve, reject) => { + return new Promise((resolve, reject) => { const oracle = new QuickFixOracle(editor, markerService, e => { assert.equal(e.type, 'auto'); @@ -157,7 +157,7 @@ suite('QuickFix', () => { }]); // case 1 - drag selection over multiple lines -> range of enclosed marker, position or marker - await new TPromise(resolve => { + await new Promise(resolve => { let oracle = new QuickFixOracle(editor, markerService, e => { assert.equal(e.type, 'auto'); diff --git a/src/vs/editor/contrib/suggest/test/suggestModel.test.ts b/src/vs/editor/contrib/suggest/test/suggestModel.test.ts index d0c081f90a5..b8a9b9d0079 100644 --- a/src/vs/editor/contrib/suggest/test/suggestModel.test.ts +++ b/src/vs/editor/contrib/suggest/test/suggestModel.test.ts @@ -8,7 +8,6 @@ import * as assert from 'assert'; import Event from 'vs/base/common/event'; import URI from 'vs/base/common/uri'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { TPromise } from 'vs/base/common/winjs.base'; import { Model } from 'vs/editor/common/model/model'; import { Handler } from 'vs/editor/common/editorCommon'; import { ISuggestSupport, ISuggestResult, SuggestRegistry, SuggestTriggerKind } from 'vs/editor/common/modes'; @@ -105,9 +104,9 @@ suite('SuggestModel - TriggerAndCancelOracle', function () { disposables.push(model); }); - function withOracle(callback: (model: SuggestModel, editor: TestCodeEditor) => any): TPromise { + function withOracle(callback: (model: SuggestModel, editor: TestCodeEditor) => any): Promise { - return new TPromise((resolve, reject) => { + return new Promise((resolve, reject) => { const editor = createMockEditor(model); const oracle = new SuggestModel(editor); disposables.push(oracle, editor); @@ -121,7 +120,7 @@ suite('SuggestModel - TriggerAndCancelOracle', function () { } function assertEvent(event: Event, action: () => any, assert: (e: E) => any) { - return new TPromise((resolve, reject) => { + return new Promise((resolve, reject) => { const sub = event(e => { sub.dispose(); try { @@ -141,7 +140,7 @@ suite('SuggestModel - TriggerAndCancelOracle', function () { test('events - cancel/trigger', function () { return withOracle(model => { - return TPromise.join([ + return Promise.all([ assertEvent(model.onDidCancel, function () { model.cancel(); }, function (event) { @@ -188,7 +187,7 @@ suite('SuggestModel - TriggerAndCancelOracle', function () { disposables.push(SuggestRegistry.register({ scheme: 'test' }, alwaysEmptySupport)); return withOracle(model => { - return TPromise.join([ + return Promise.all([ assertEvent(model.onDidCancel, function () { model.trigger({ auto: true }); }, function (event) { diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts index e7be9b92b3a..934633cac14 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts @@ -8,8 +8,6 @@ import * as assert from 'assert'; import URI from 'vs/base/common/uri'; import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/node/extHostDocumentsAndEditors'; -import { TPromise } from 'vs/base/common/winjs.base'; - suite('ExtHostDocumentsAndEditors', () => { @@ -37,7 +35,7 @@ suite('ExtHostDocumentsAndEditors', () => { }] }); - return new TPromise((resolve, reject) => { + return new Promise((resolve, reject) => { editors.onDidRemoveDocuments(e => { try { From 146efa52f0d58e7fe3eaf9ac9c45812d40ec94fe Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 12 Dec 2017 12:15:19 +0100 Subject: [PATCH 119/615] debug: add configuratino do not trigger suggest if launch.json just created fixes #39908 --- src/vs/workbench/parts/debug/common/debug.ts | 2 +- .../workbench/parts/debug/electron-browser/debugCommands.ts | 6 +++--- .../debug/electron-browser/debugConfigurationManager.ts | 6 +++--- .../workbench/parts/debug/electron-browser/debugService.ts | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index 912b7131c86..5ac07d38490 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -465,7 +465,7 @@ export interface ILaunch { /** * Opens the launch.json file. Creates if it does not exist. */ - openConfigFile(sideBySide: boolean, type?: string): TPromise; + openConfigFile(sideBySide: boolean, type?: string): TPromise<{ editor: IEditor; configFileCreated: boolean; }>; } // Debug service interfaces diff --git a/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts b/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts index 689ba933e35..37e840a1666 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts @@ -170,9 +170,9 @@ export function registerCommands(): void { } const launch = manager.getLaunches().filter(l => l.workspace.uri.toString() === workspaceUri).pop() || manager.selectedLaunch; - return launch.openConfigFile(false).done(editor => { - if (editor) { - const codeEditor = editor.getControl(); + return launch.openConfigFile(false).done(result => { + if (result.editor && !result.configFileCreated) { + const codeEditor = result.editor.getControl(); if (codeEditor) { return codeEditor.getContribution(EDITOR_CONTRIBUTION_ID).addLaunchConfiguration(); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts index a5a554cb112..b78b1a5b0f0 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts @@ -515,7 +515,7 @@ class Launch implements ILaunch { return this.workspace.uri.with({ path: paths.join(this.workspace.uri.path, '/.vscode/launch.json') }); } - public openConfigFile(sideBySide: boolean, type?: string): TPromise { + public openConfigFile(sideBySide: boolean, type?: string): TPromise<{ editor: IEditor; configFileCreated: boolean; }> { const resource = this.uri; let configFileCreated = false; @@ -545,7 +545,7 @@ class Launch implements ILaunch { }); }).then(content => { if (!content) { - return undefined; + return { editor: undefined, configFileCreated }; } const index = content.value.indexOf(`"${this.configurationManager.selectedName}"`); let startLineNumber = 1; @@ -564,7 +564,7 @@ class Launch implements ILaunch { pinned: configFileCreated, // pin only if config file is created #8727 revealIfVisible: true }, - }, sideBySide); + }, sideBySide).then(editor => ({ editor, configFileCreated })); }, (error) => { throw new Error(nls.localize('DebugConfig.failed', "Unable to create 'launch.json' file inside the '.vscode' folder ({0}).", error)); }); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 59f9d612c4d..451c413ffe3 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -720,7 +720,7 @@ export class DebugService implements debug.IDebugService { return this.createProcess(root, config, sessionId); } if (launch) { - return launch.openConfigFile(false, type).then(editor => undefined); + return launch.openConfigFile(false, type).then(() => undefined); } return undefined; @@ -797,8 +797,8 @@ export class DebugService implements debug.IDebugService { return undefined; } - return this.configurationManager.selectedLaunch.openConfigFile(false).then(openend => { - if (openend) { + return this.configurationManager.selectedLaunch.openConfigFile(false).then(result => { + if (result.configFileCreated) { this.messageService.show(severity.Info, nls.localize('NewLaunchConfig', "Please set up the launch configuration file for your application. {0}", err.message)); } return undefined; From 18c18ddffaad294cdf95218670cc5e4041184dc8 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 12 Dec 2017 12:32:08 +0100 Subject: [PATCH 120/615] debug: do not display debug status when there are no launch configs fixes #39833 --- src/vs/workbench/parts/debug/browser/debugStatus.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugStatus.ts b/src/vs/workbench/parts/debug/browser/debugStatus.ts index 6e2ef96a9d9..da4007a0a80 100644 --- a/src/vs/workbench/parts/debug/browser/debugStatus.ts +++ b/src/vs/workbench/parts/debug/browser/debugStatus.ts @@ -92,8 +92,13 @@ export class DebugStatus extends Themable implements IStatusbarItem { private setLabel(): void { if (this.label && this.statusBarItem) { const manager = this.debugService.getConfigurationManager(); - const name = manager.selectedName || ''; - this.label.textContent = manager.getLaunches().length > 1 ? `${name} (${manager.selectedLaunch.workspace.name})` : name; + if (manager.selectedName) { + const name = manager.selectedName; + this.statusBarItem.style.display = 'block'; + this.label.textContent = manager.getLaunches().length > 1 ? `${name} (${manager.selectedLaunch.workspace.name})` : name; + } else { + this.statusBarItem.style.display = 'none'; + } } } From 678fae8e42e6a65edb71b8458381cf96c5c3fdde Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 12 Dec 2017 12:41:38 +0100 Subject: [PATCH 121/615] Double click in watch panel triggers to add a new watch expression fixes #39719 --- .../parts/debug/electron-browser/watchExpressionsView.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts b/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts index aba0c419a6d..e03c1690042 100644 --- a/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts @@ -344,6 +344,10 @@ class WatchExpressionsController extends BaseDebugController { const expression = element; this.debugService.getViewModel().setSelectedExpression(expression); return true; + } else if (element instanceof Model && event.detail === 2) { + // Double click in watch panel triggers to add a new watch expression + this.debugService.addWatchExpression().done(undefined, errors.onUnexpectedError); + return true; } return super.onLeftClick(tree, element, event); From ffd09fb4966d5a1460e1ba32e9cd57e20fb7541a Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 12 Dec 2017 14:58:03 +0100 Subject: [PATCH 122/615] check standalone editor also on tfs --- build/tfs/darwin/build.sh | 3 +++ build/tfs/linux/build.sh | 3 +++ build/tfs/win32/1_build.ps1 | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index b7d45aad6e0..9c0b7a6f52a 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -19,6 +19,9 @@ step "Install dependencies" \ step "Hygiene" \ npm run gulp -- hygiene +step "Monaco Editor Check" \ + ./node_modules/.bin/tsc -p ./src/tsconfig.monaco.json --noEmit + step "Mix in repository from vscode-distro" \ npm run gulp -- mixin diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh index 9d9b33de8a0..e23049b5cf4 100755 --- a/build/tfs/linux/build.sh +++ b/build/tfs/linux/build.sh @@ -22,6 +22,9 @@ step "Install dependencies" \ step "Hygiene" \ npm run gulp -- hygiene +step "Monaco Editor Check" \ + ./node_modules/.bin/tsc -p ./src/tsconfig.monaco.json --noEmit + step "Mix in repository from vscode-distro" \ npm run gulp -- mixin diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 0dac2d1fcbf..bc6ade13de3 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -24,6 +24,10 @@ step "Hygiene" { exec { & npm run gulp -- hygiene } } +step "Monaco Editor Check" { + exec { & .\node_modules\.bin\tsc -p .\src\tsconfig.monaco.json --noEmit } +} + $env:VSCODE_MIXIN_PASSWORD = $mixinPassword step "Mix in repository from vscode-distro" { exec { & npm run gulp -- mixin } From 42cd98df93d2c9b2c29d85b7c7c1f13a2e7b575f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 12 Dec 2017 15:27:44 +0100 Subject: [PATCH 123/615] eng - less WinJS-promise construction --- src/vs/workbench/api/node/extHostTerminalService.ts | 9 ++++----- src/vs/workbench/parts/html/browser/webview.ts | 7 +++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index dd7e1c10b60..9fa99d2e1eb 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -5,7 +5,6 @@ 'use strict'; import vscode = require('vscode'); -import { TPromise, TValueCallback } from 'vs/base/common/winjs.base'; import Event, { Emitter } from 'vs/base/common/event'; import { ExtHostTerminalServiceShape, MainContext, MainThreadTerminalServiceShape, IMainContext } from './extHost.protocol'; @@ -16,8 +15,8 @@ export class ExtHostTerminal implements vscode.Terminal { private _proxy: MainThreadTerminalServiceShape; private _disposed: boolean; private _queuedRequests: ApiRequest[]; - private _pidPromise: TPromise; - private _pidPromiseComplete: TValueCallback; + private _pidPromise: Promise; + private _pidPromiseComplete: (value: number) => any; constructor( proxy: MainThreadTerminalServiceShape, @@ -30,7 +29,7 @@ export class ExtHostTerminal implements vscode.Terminal { this._name = name; this._queuedRequests = []; this._proxy = proxy; - this._pidPromise = new TPromise(c => { + this._pidPromise = new Promise(c => { this._pidPromiseComplete = c; }); this._proxy.$createTerminal(name, shellPath, shellArgs, env, waitOnExit).then((id) => { @@ -172,4 +171,4 @@ class ApiRequest { public run(proxy: MainThreadTerminalServiceShape, id: number) { this._callback.apply(proxy, [id].concat(this._args)); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/parts/html/browser/webview.ts b/src/vs/workbench/parts/html/browser/webview.ts index 4e207e563b9..8589995213b 100644 --- a/src/vs/workbench/parts/html/browser/webview.ts +++ b/src/vs/workbench/parts/html/browser/webview.ts @@ -6,7 +6,6 @@ 'use strict'; import URI from 'vs/base/common/uri'; -import { TPromise } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import Event, { Emitter } from 'vs/base/common/event'; import { addDisposableListener, addClass } from 'vs/base/browser/dom'; @@ -43,7 +42,7 @@ export default class Webview { private static index: number = 0; private readonly _webview: Electron.WebviewTag; - private _ready: TPromise; + private _ready: Promise; private _disposables: IDisposable[] = []; private _onDidClickLink = new Emitter(); @@ -78,7 +77,7 @@ export default class Webview { this._webview.preload = require.toUrl('./webview-pre.js'); this._webview.src = require.toUrl('./webview.html'); - this._ready = new TPromise(resolve => { + this._ready = new Promise(resolve => { const subscription = addDisposableListener(this._webview, 'ipc-message', (event) => { if (event.channel === 'webview-ready') { // console.info('[PID Webview] ' event.args[0]); @@ -219,7 +218,7 @@ export default class Webview { private _send(channel: string, ...args: any[]): void { this._ready .then(() => this._webview.send(channel, ...args)) - .done(void 0, console.error); + .catch(err => console.error(err)); } set initialScrollProgress(value: number) { From a3b54d342b17320b620912046487440130cfae69 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 12 Dec 2017 15:32:21 +0100 Subject: [PATCH 124/615] eng - less WinJS promise construction --- src/vs/workbench/node/extensionHostProcess.ts | 17 ++++++++--------- .../electron-browser/api/testThreadService.ts | 10 ++++------ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/node/extensionHostProcess.ts b/src/vs/workbench/node/extensionHostProcess.ts index d44ebcc379c..a2e904f9625 100644 --- a/src/vs/workbench/node/extensionHostProcess.ts +++ b/src/vs/workbench/node/extensionHostProcess.ts @@ -6,7 +6,6 @@ 'use strict'; import { onUnexpectedError } from 'vs/base/common/errors'; -import { TPromise } from 'vs/base/common/winjs.base'; import { ExtensionHostMain, exit } from 'vs/workbench/node/extensionHostMain'; import { RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol'; import { parse } from 'vs/base/common/marshalling'; @@ -27,11 +26,11 @@ let onTerminate = function () { exit(); }; -function createExtHostProtocol(): TPromise { +function createExtHostProtocol(): Promise { const pipeName = process.env.VSCODE_IPC_HOOK_EXTHOST; - return new TPromise((resolve, reject) => { + return new Promise((resolve, reject) => { const socket = createConnection(pipeName, () => { socket.removeListener('error', reject); @@ -63,8 +62,8 @@ function createExtHostProtocol(): TPromise { }); } -function connectToRenderer(protocol: IMessagePassingProtocol): TPromise { - return new TPromise((c, e) => { +function connectToRenderer(protocol: IMessagePassingProtocol): Promise { + return new Promise((c, e) => { // Listen init data message const first = protocol.onMessage(raw => { @@ -76,8 +75,8 @@ function connectToRenderer(protocol: IMessagePassingProtocol): TPromise[] = []; - process.on('unhandledRejection', (reason: any, promise: TPromise) => { + const unhandledPromises: Promise[] = []; + process.on('unhandledRejection', (reason: any, promise: Promise) => { unhandledPromises.push(promise); setTimeout(() => { const idx = unhandledPromises.indexOf(promise); @@ -88,7 +87,7 @@ function connectToRenderer(protocol: IMessagePassingProtocol): TPromise) => { + process.on('rejectionHandled', (promise: Promise) => { const idx = unhandledPromises.indexOf(promise); if (idx >= 0) { unhandledPromises.splice(idx, 1); @@ -130,7 +129,7 @@ createExtHostProtocol().then(protocol => { const extensionHostMain = new ExtensionHostMain(renderer.rpcProtocol, renderer.initData); onTerminate = () => extensionHostMain.terminate(); return extensionHostMain.start(); -}).done(null, err => console.error(err)); +}).catch(err => console.error(err)); diff --git a/src/vs/workbench/test/electron-browser/api/testThreadService.ts b/src/vs/workbench/test/electron-browser/api/testThreadService.ts index 901935ee7a9..0f26f144bfc 100644 --- a/src/vs/workbench/test/electron-browser/api/testThreadService.ts +++ b/src/vs/workbench/test/electron-browser/api/testThreadService.ts @@ -81,7 +81,7 @@ export class TestThreadService extends AbstractTestThreadService implements IThr } private _callCountValue: number = 0; - private _idle: TPromise; + private _idle: Promise; private _completeIdle: Function; private get _callCount(): number { @@ -98,18 +98,16 @@ export class TestThreadService extends AbstractTestThreadService implements IThr } } - sync(): TPromise { - return new TPromise((c) => { + sync(): Promise { + return new Promise((c) => { setTimeout(c, 0); }).then(() => { if (this._callCount === 0) { return undefined; } if (!this._idle) { - this._idle = new TPromise((c, e) => { + this._idle = new Promise((c, e) => { this._completeIdle = c; - }, function () { - // no cancel }); } return this._idle; From e0978e3e21e7e6c666ffd990ee5be8409b00a40b Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 12 Dec 2017 12:09:13 +0100 Subject: [PATCH 125/615] #37189 - Fix remembering view sizes when a view is hidden and shown --- .../browser/parts/views/viewsViewlet.ts | 70 +++++++++---------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/src/vs/workbench/browser/parts/views/viewsViewlet.ts b/src/vs/workbench/browser/parts/views/viewsViewlet.ts index cd2d2213b2d..afb99b00024 100644 --- a/src/vs/workbench/browser/parts/views/viewsViewlet.ts +++ b/src/vs/workbench/browser/parts/views/viewsViewlet.ts @@ -289,7 +289,7 @@ export class ViewsViewlet extends PanelViewlet { async create(parent: Builder): TPromise { await super.create(parent); - this._register(this.onDidSashChange(() => this.updateAllViewsSizes())); + this._register(this.onDidSashChange(() => this.snapshotViewsStates())); this._register(ViewsRegistry.onViewsRegistered(this.onViewsRegistered, this)); this._register(ViewsRegistry.onViewsDeregistered(this.onViewsDeregistered, this)); this._register(this.contextKeyService.onDidChangeContext(this.onContextChanged, this)); @@ -326,12 +326,13 @@ export class ViewsViewlet extends PanelViewlet { layout(dimension: Dimension): void { super.layout(dimension); - if (!this.didLayout) { + if (this.didLayout) { + this.snapshotViewsStates(); + } else { this.didLayout = true; - this._resizePanels(); + this.resizePanels(); } - this.updateAllViewsSizes(); } getOptimalWidth(): number { @@ -357,7 +358,7 @@ export class ViewsViewlet extends PanelViewlet { viewState = viewState || this.createViewState(view); viewState.isHidden = true; } else { - viewState = viewState || { collapsed: true, size: void 0, isHidden: false, order: void 0 }; + viewState = viewState || { collapsed: true, size: 200, isHidden: false, order: void 0 }; viewState.isHidden = false; } this.viewsStates.set(id, viewState); @@ -414,19 +415,12 @@ export class ViewsViewlet extends PanelViewlet { const toCreate: ViewsViewletPanel[] = []; if (toAdd.length || toRemove.length) { - const panels = [...this.viewsViewletPanels]; - for (const view of panels) { - let viewState = this.viewsStates.get(view.id); - if (!viewState || typeof viewState.size === 'undefined' || !view.isExpanded() !== viewState.collapsed) { - this.updateViewStateSize(view); - } - } + this.snapshotViewsStates(); if (toRemove.length) { for (const viewDescriptor of toRemove) { let view = this.getView(viewDescriptor.id); - this.updateViewStateSize(view); this.removePanel(view); this.viewsViewletPanels.splice(this.viewsViewletPanels.indexOf(view), 1); } @@ -448,35 +442,33 @@ export class ViewsViewlet extends PanelViewlet { const size = (viewState && viewState.size) || viewDescriptor.size || 200; this.addPanel(view, size, index); this.viewsViewletPanels.splice(index, 0, view); - - this.updateViewStateSize(view); } return TPromise.join(toCreate.map(view => view.create())) .then(() => this.onViewsUpdated()) - .then(() => this._resizePanels()) - .then(() => toCreate); + .then(() => { + this.resizePanels(toCreate); + return toCreate; + }); } return TPromise.as([]); } - private updateAllViewsSizes(): void { - for (const view of this.viewsViewletPanels) { - this.updateViewStateSize(view); - } - } - - private _resizePanels(): void { + private resizePanels(panels: ViewsViewletPanel[] = this.viewsViewletPanels): void { if (!this.didLayout) { + // Do not do anything if layout has not happened yet return; } - for (const panel of this.viewsViewletPanels) { + for (const panel of panels) { const viewState = this.viewsStates.get(panel.id); - const size = (viewState && viewState.size) || 200; + const viewDescriptor = this.getViewDescriptorsFromRegistry().filter(viewDescriptor => viewDescriptor.id === panel.id)[0]; + const size = (viewState && viewState.size) || viewDescriptor.size || 200; this.resizePanel(panel, size); } + + this.snapshotViewsStates(); } movePanel(from: ViewletPanel, to: ViewletPanel): void { @@ -616,22 +608,28 @@ export class ViewsViewlet extends PanelViewlet { return this.viewsViewletPanels.filter(view => view.id === id)[0]; } - private updateViewStateSize(view: ViewsViewletPanel): void { - const currentState = this.viewsStates.get(view.id); - if (currentState && !this.didLayout) { - // Do not update to new state if the layout has not happened yet - return; - } + private snapshotViewsStates(): void { + for (const view of this.viewsViewletPanels) { + const currentState = this.viewsStates.get(view.id); + if (currentState && !this.didLayout) { + // Do not update to new state if the layout has not happened yet + return; + } - const newViewState = this.createViewState(view); - const stateToUpdate = currentState ? { ...currentState, collapsed: newViewState.collapsed, size: newViewState.size } : newViewState; - this.viewsStates.set(view.id, stateToUpdate); + const newViewState = this.createViewState(view); + if (currentState) { + newViewState.isHidden = currentState.isHidden; + newViewState.size = newViewState.collapsed ? currentState.size : newViewState.size; + } + this.viewsStates.set(view.id, newViewState); + } } protected createViewState(view: ViewsViewletPanel): IViewState { + const viewDescriptor = this.getViewDescriptorsFromRegistry().filter(viewDescriptor => viewDescriptor.id === view.id)[0]; return { collapsed: !view.isExpanded(), - size: this.getPanelSize(view), + size: this.didLayout ? this.getPanelSize(view) : viewDescriptor.size || 200, // Take the default value incase of layout not happened yet. isHidden: false, order: this.viewsViewletPanels.indexOf(view) }; From 68ad87119046cb987bfe89bc9d4ecbae25ae0eed Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 12 Dec 2017 15:35:52 +0100 Subject: [PATCH 126/615] #40098 Updated jsonc version dependency --- extensions/configuration-editing/package.json | 7 ++++--- extensions/configuration-editing/yarn.lock | 10 ++++------ extensions/extension-editing/package.json | 2 +- extensions/extension-editing/yarn.lock | 10 ++++------ 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/extensions/configuration-editing/package.json b/extensions/configuration-editing/package.json index 9659fdcbc96..17394b271f5 100644 --- a/extensions/configuration-editing/package.json +++ b/extensions/configuration-editing/package.json @@ -10,7 +10,8 @@ "Other" ], "activationEvents": [ - "onLanguage:json", "onLanguage:jsonc" + "onLanguage:json", + "onLanguage:jsonc" ], "main": "./out/extension", "scripts": { @@ -18,7 +19,7 @@ "watch": "gulp watch-extension:configuration-editing" }, "dependencies": { - "jsonc-parser": "^0.3.1", + "jsonc-parser": "^1.0.0", "vscode-nls": "^2.0.1" }, "contributes": { @@ -76,4 +77,4 @@ "devDependencies": { "@types/node": "7.0.4" } -} +} \ No newline at end of file diff --git a/extensions/configuration-editing/yarn.lock b/extensions/configuration-editing/yarn.lock index b1e6a363c9d..6e178dd74ea 100644 --- a/extensions/configuration-editing/yarn.lock +++ b/extensions/configuration-editing/yarn.lock @@ -6,12 +6,10 @@ version "7.0.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.4.tgz#9aabc135979ded383325749f508894c662948c8b" -jsonc-parser@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-0.3.1.tgz#6ebf5c75224368d4b07ef4c26f9434e657472e95" - dependencies: - vscode-nls "^2.0.2" +jsonc-parser@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-1.0.0.tgz#ddcc864ae708e60a7a6dd36daea00172fa8d9272" -vscode-nls@^2.0.1, vscode-nls@^2.0.2: +vscode-nls@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da" diff --git a/extensions/extension-editing/package.json b/extensions/extension-editing/package.json index 3dbda782d60..8f4b631803e 100644 --- a/extensions/extension-editing/package.json +++ b/extensions/extension-editing/package.json @@ -20,7 +20,7 @@ "watch": "gulp watch-extension:extension-editing" }, "dependencies": { - "jsonc-parser": "^0.3.1", + "jsonc-parser": "^1.0.0", "markdown-it": "^8.3.1", "parse5": "^3.0.2", "vscode-nls": "^2.0.1" diff --git a/extensions/extension-editing/yarn.lock b/extensions/extension-editing/yarn.lock index b7d1eacebe0..903a9f4e191 100644 --- a/extensions/extension-editing/yarn.lock +++ b/extensions/extension-editing/yarn.lock @@ -20,11 +20,9 @@ entities@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" -jsonc-parser@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-0.3.1.tgz#6ebf5c75224368d4b07ef4c26f9434e657472e95" - dependencies: - vscode-nls "^2.0.2" +jsonc-parser@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-1.0.0.tgz#ddcc864ae708e60a7a6dd36daea00172fa8d9272" linkify-it@^2.0.0: version "2.0.3" @@ -60,6 +58,6 @@ uc.micro@^1.0.1, uc.micro@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192" -vscode-nls@^2.0.1, vscode-nls@^2.0.2: +vscode-nls@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da" From a4e30c12236aa19604e0a5c4fe46de86750f8c82 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 12 Dec 2017 15:42:23 +0100 Subject: [PATCH 127/615] running extensions: option to disable extension fixes #40088 --- .../electron-browser/runtimeExtensionsEditor.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts b/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts index ed0034b4bb3..80a35a88b1d 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts @@ -26,7 +26,7 @@ import { IExtensionService, IExtensionDescription, IExtensionsStatus, IExtension import { IDelegate, IRenderer } from 'vs/base/browser/ui/list/list'; import { WorkbenchList, IListService } from 'vs/platform/list/browser/listService'; import { append, $, addClass, toggleClass } from 'vs/base/browser/dom'; -import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; +import { ActionBar, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { RunOnceScheduler } from 'vs/base/common/async'; @@ -39,6 +39,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { memoize } from 'vs/base/common/decorators'; import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import Event from 'vs/base/common/event'; +import { DisableForWorkspaceAction, DisableGloballyAction } from 'vs/workbench/parts/extensions/browser/extensionsActions'; export const IExtensionHostProfileService = createDecorator('extensionHostProfileService'); @@ -373,7 +374,13 @@ export class RuntimeExtensionsEditor extends BaseEditor { this._list.onContextMenu((e) => { const actions: IAction[] = []; - actions.push(this.saveExtensionHostProfileAction, this.extensionHostProfileAction); + if (e.element.marketplaceInfo.type === LocalExtensionType.User) { + actions.push(this._instantiationService.createInstance(DisableForWorkspaceAction, DisableForWorkspaceAction.LABEL)); + actions.push(this._instantiationService.createInstance(DisableGloballyAction, DisableGloballyAction.LABEL)); + actions.forEach((a: DisableForWorkspaceAction | DisableGloballyAction) => a.extension = e.element.marketplaceInfo); + actions.push(new Separator()); + } + actions.push(this.extensionHostProfileAction, this.saveExtensionHostProfileAction); this._contextMenuService.showContextMenu({ getAnchor: () => e.anchor, From 0ef13b6d5486b457daaf36c92c908e5135e99de3 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 12 Dec 2017 16:03:25 +0100 Subject: [PATCH 128/615] Allow to save files that need user elevation (fixes #1614) (#40107) --- package.json | 1 + src/typings/sudo-prompt.d.ts | 9 +++ src/vs/code/node/cli.ts | 26 +++++++ .../environment/common/environment.ts | 2 + src/vs/platform/environment/node/argv.ts | 3 +- .../environment/node/environmentService.ts | 39 +++++++++- src/vs/platform/files/common/files.ts | 7 ++ .../electron-browser/saveErrorHandler.ts | 14 +++- .../files/electron-browser/fileService.ts | 9 ++- .../services/files/node/fileService.ts | 76 +++++++++++++++++-- .../textfile/common/textFileEditorModel.ts | 3 +- .../textfile/common/textFileService.ts | 16 ++-- .../services/textfile/common/textfiles.ts | 8 +- yarn.lock | 4 + 14 files changed, 195 insertions(+), 22 deletions(-) create mode 100644 src/typings/sudo-prompt.d.ts diff --git a/package.json b/package.json index 942a65274d4..0865bc7d251 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "nsfw": "1.0.16", "semver": "4.3.6", "spdlog": "0.3.7", + "sudo-prompt": "^8.0.0", "v8-inspect-profiler": "^0.0.7", "vscode-chokidar": "1.6.2", "vscode-debugprotocol": "1.25.0", diff --git a/src/typings/sudo-prompt.d.ts b/src/typings/sudo-prompt.d.ts new file mode 100644 index 00000000000..4a204229051 --- /dev/null +++ b/src/typings/sudo-prompt.d.ts @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +declare module 'sudo-prompt' { + + export function exec(cmd: string, options: { name?: string, icns?: string }, callback: (error: string, stdout: string, stderr: string) => void); +} \ No newline at end of file diff --git a/src/vs/code/node/cli.ts b/src/vs/code/node/cli.ts index fe645ff4e0d..4da3a6af5fc 100644 --- a/src/vs/code/node/cli.ts +++ b/src/vs/code/node/cli.ts @@ -17,6 +17,7 @@ import { whenDeleted } from 'vs/base/node/pfs'; import { findFreePort } from 'vs/base/node/ports'; import { resolveTerminalEncoding } from 'vs/base/node/encoding'; import * as iconv from 'iconv-lite'; +import { writeFileAndFlushSync } from 'vs/base/node/extfs'; function shouldSpawnCliProcess(argv: ParsedArgs): boolean { return !!argv['install-source'] @@ -55,6 +56,31 @@ export async function main(argv: string[]): TPromise { return mainCli.then(cli => cli.main(args)); } + // Write Elevated + else if (args['write-elevated-helper']) { + const source = args._[0]; + const target = args._[1]; + + // Validate + if ( + !source || !target || source === target || // make sure source and target are provided and are not the same + !paths.isAbsolute(source) || !paths.isAbsolute(target) || // make sure both source and target are absolute paths + !fs.existsSync(source) || !fs.statSync(source).isFile() || // make sure source exists as file + !fs.existsSync(target) || !fs.statSync(target).isFile() // make sure target exists as file + ) { + return TPromise.wrapError(new Error('Using --write-elevated-helper with invalid arguments.')); + } + + // Write source to target + try { + writeFileAndFlushSync(target, fs.readFileSync(source)); + } catch (error) { + return TPromise.wrapError(new Error(`Using --write-elevated-helper resulted in an error: ${error}`)); + } + + return TPromise.as(null); + } + // Just Code else { const env = assign({}, process.env, { diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts index 932af88fa1e..d3fc28397ff 100644 --- a/src/vs/platform/environment/common/environment.ts +++ b/src/vs/platform/environment/common/environment.ts @@ -52,6 +52,7 @@ export interface ParsedArgs { 'disable-updates'?: string; 'disable-crash-reporter'?: string; 'skip-add-to-recently-opened'?: boolean; + 'write-elevated-helper'?: boolean; } export const IEnvironmentService = createDecorator('environmentService'); @@ -71,6 +72,7 @@ export interface IEnvironmentService { args: ParsedArgs; execPath: string; + cliPath: string; appRoot: string; userHome: string; diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index 5de73213eff..d546e1511ec 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -54,7 +54,8 @@ const options: minimist.Opts = { 'disable-updates', 'disable-crash-reporter', 'skip-add-to-recently-opened', - 'status' + 'status', + 'write-elevated-helper' ], alias: { add: 'a', diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts index 4e7728abac0..b5e01b791cc 100644 --- a/src/vs/platform/environment/node/environmentService.ts +++ b/src/vs/platform/environment/node/environmentService.ts @@ -14,6 +14,7 @@ import pkg from 'vs/platform/node/package'; import product from 'vs/platform/node/product'; import { LogLevel } from 'vs/platform/log/common/log'; import { toLocalISOString } from 'vs/base/common/date'; +import { isWindows, isLinux } from 'vs/base/common/platform'; // Read this before there's any chance it is overwritten // Related to https://github.com/Microsoft/vscode/issues/30624 @@ -29,15 +30,44 @@ function getNixIPCHandle(userDataPath: string, type: string): string { function getWin32IPCHandle(userDataPath: string, type: string): string { const scope = crypto.createHash('md5').update(userDataPath).digest('hex'); + return `\\\\.\\pipe\\${scope}-${pkg.version}-${type}-sock`; } function getIPCHandle(userDataPath: string, type: string): string { - if (process.platform === 'win32') { + if (isWindows) { return getWin32IPCHandle(userDataPath, type); - } else { - return getNixIPCHandle(userDataPath, type); } + + return getNixIPCHandle(userDataPath, type); +} + +function getCLIPath(execPath: string, appRoot: string, isBuilt: boolean): string { + + // Windows + if (isWindows) { + if (isBuilt) { + return path.join(path.dirname(execPath), 'bin', `${product.applicationName}.cmd`); + } + + return path.join(appRoot, 'scripts', 'code-cli.bat'); + } + + // Linux + if (isLinux) { + if (isBuilt) { + return path.join(path.dirname(execPath), 'bin', `${product.applicationName}`); + } + + return path.join(appRoot, 'scripts', 'code-cli.sh'); + } + + // macOS + if (isBuilt) { + return path.join(appRoot, 'bin', 'code'); + } + + return path.join(appRoot, 'scripts', 'code-cli.sh'); } export class EnvironmentService implements IEnvironmentService { @@ -51,6 +81,9 @@ export class EnvironmentService implements IEnvironmentService { get execPath(): string { return this._execPath; } + @memoize + get cliPath(): string { return getCLIPath(this.execPath, this.appRoot, this.isBuilt); } + readonly logsPath: string; @memoize diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 262916172b6..1f2c999da9f 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -525,6 +525,12 @@ export interface IUpdateContentOptions { */ overwriteReadonly?: boolean; + /** + * Wether to write to the file as elevated (admin) user. When setting this option a prompt will + * ask the user to authenticate as super user. + */ + writeElevated?: boolean; + /** * The last known modification time of the file. This can be used to prevent dirty writes. */ @@ -569,6 +575,7 @@ export enum FileOperationResult { FILE_MODIFIED_SINCE, FILE_MOVE_CONFLICT, FILE_READ_ONLY, + FILE_PERMISSION_DENIED, FILE_TOO_LARGE, FILE_INVALID_PATH } diff --git a/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts b/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts index 586fd2cbc05..21c71d72ea6 100644 --- a/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts +++ b/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts @@ -118,8 +118,20 @@ export class SaveErrorHandler implements ISaveErrorHandler, IWorkbenchContributi // Any other save error else { const isReadonly = (error).fileOperationResult === FileOperationResult.FILE_READ_ONLY; + const isPermissionDenied = (error).fileOperationResult === FileOperationResult.FILE_PERMISSION_DENIED; const actions: Action[] = []; + // Save Elevated + if (isPermissionDenied) { + actions.push(new Action('workbench.files.action.saveElevated', nls.localize('saveElevated', "Retry as Admin..."), null, true, () => { + if (!model.isDisposed()) { + model.save({ writeElevated: true }).done(null, errors.onUnexpectedError); + } + + return TPromise.as(true); + })); + } + // Save As actions.push(new Action('workbench.files.action.saveAs', SaveFileAsAction.LABEL, null, true, () => { const saveAsAction = this.instantiationService.createInstance(SaveFileAsAction, SaveFileAsAction.ID, SaveFileAsAction.LABEL); @@ -147,7 +159,7 @@ export class SaveErrorHandler implements ISaveErrorHandler, IWorkbenchContributi return TPromise.as(true); })); - } else { + } else if (!isPermissionDenied) { actions.push(new Action('workbench.files.action.retry', nls.localize('retry', "Retry"), null, true, () => { const saveFileAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); saveFileAction.setResource(resource); diff --git a/src/vs/workbench/services/files/electron-browser/fileService.ts b/src/vs/workbench/services/files/electron-browser/fileService.ts index 18987ccf7e0..bcd10448f92 100644 --- a/src/vs/workbench/services/files/electron-browser/fileService.ts +++ b/src/vs/workbench/services/files/electron-browser/fileService.ts @@ -24,6 +24,8 @@ import Event, { Emitter } from 'vs/base/common/event'; import { shell } from 'electron'; import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; +import { isMacintosh } from 'vs/base/common/platform'; +import product from 'vs/platform/node/product'; export class FileService implements IFileService { @@ -70,7 +72,12 @@ export class FileService implements IFileService { encodingOverride: this.getEncodingOverrides(), watcherIgnoredPatterns, verboseLogging: environmentService.verbose, - useExperimentalFileWatcher: configuration.files.useExperimentalFileWatcher + useExperimentalFileWatcher: configuration.files.useExperimentalFileWatcher, + elevationSupport: { + cliPath: this.environmentService.cliPath, + promptTitle: this.environmentService.appNameLong, + promptIcnsPath: (isMacintosh && this.environmentService.isBuilt) ? paths.join(paths.dirname(this.environmentService.appRoot), `${product.nameShort}.icns`) : void 0 + } }; // create service diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index c1c668826b1..c1551e21910 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -10,6 +10,7 @@ import fs = require('fs'); import os = require('os'); import crypto = require('crypto'); import assert = require('assert'); +import sudoPrompt = require('sudo-prompt'); import { isParent, FileOperation, FileOperationEvent, IContent, IFileService, IResolveFileOptions, IResolveFileResult, IResolveContentOptions, IFileStat, IStreamContent, FileOperationError, FileOperationResult, IUpdateContentOptions, FileChangeType, IImportResult, FileChangesEvent, ICreateFileOptions, IContentData } from 'vs/platform/files/common/files'; import { MAX_FILE_SIZE } from 'vs/platform/files/node/files'; @@ -40,6 +41,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation'; import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { getBaseLabel } from 'vs/base/common/labels'; +import { assign } from 'vs/base/common/objects'; export interface IEncodingOverride { resource: uri; @@ -54,6 +56,12 @@ export interface IFileServiceOptions { disableWatcher?: boolean; verboseLogging?: boolean; useExperimentalFileWatcher?: boolean; + writeElevated?: (source: string, target: string) => TPromise; + elevationSupport?: { + cliPath: string; + promptTitle: string; + promptIcnsPath?: string; + }; } function etag(stat: fs.Stats): string; @@ -351,9 +359,6 @@ export class FileService implements IFileService { }); } - //#region data stream - - private resolveFileData(resource: uri, options: IResolveContentOptions, token: CancellationToken): Thenable { const chunkBuffer = BufferPool._64K.acquire(); @@ -484,9 +489,15 @@ export class FileService implements IFileService { }); } - //#endregion - public updateContent(resource: uri, value: string, options: IUpdateContentOptions = Object.create(null)): TPromise { + if (this.options.elevationSupport && options.writeElevated) { + return this.doUpdateContentElevated(resource, value, options); + } + + return this.doUpdateContent(resource, value, options); + } + + private doUpdateContent(resource: uri, value: string, options: IUpdateContentOptions = Object.create(null)): TPromise { const absolutePath = this.toAbsolutePath(resource); // 1.) check file @@ -539,6 +550,15 @@ export class FileService implements IFileService { }); }); }); + }).then(null, error => { + if (error.code === 'EACCES' || error.code === 'EPERM') { + return TPromise.wrapError(new FileOperationError( + nls.localize('filePermission', "Permission denied writing to file ({0})", resource.toString(true)), + FileOperationResult.FILE_PERMISSION_DENIED + )); + } + + return TPromise.wrapError(error); }); } @@ -564,6 +584,51 @@ export class FileService implements IFileService { }); } + private doUpdateContentElevated(resource: uri, value: string, options: IUpdateContentOptions = Object.create(null)): TPromise { + const absolutePath = this.toAbsolutePath(resource); + + // 1.) check file + return this.checkFile(absolutePath, options).then(exists => { + const writeOptions: IUpdateContentOptions = assign(Object.create(null), options); + writeOptions.writeElevated = false; + writeOptions.encoding = this.getEncoding(resource, options.encoding); + + // 2.) write to a temporary file to be able to copy over later + const tmpPath = paths.join(this.tmpPath, `code-elevated-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 6)}`); + return this.updateContent(uri.file(tmpPath), value, writeOptions).then(() => { + + // 3.) invoke our CLI as super user + return new TPromise((c, e) => { + const promptOptions = { name: this.options.elevationSupport.promptTitle.replace('-', ''), icns: this.options.elevationSupport.promptIcnsPath }; + sudoPrompt.exec(`"${this.options.elevationSupport.cliPath}" --write-elevated-helper "${tmpPath}" "${absolutePath}"`, promptOptions, (error: string, stdout: string, stderr: string) => { + if (error || stderr) { + e(error || stderr); + } else { + c(void 0); + } + }); + }).then(() => { + + // 3.) resolve again + return this.resolve(resource); + }); + }); + }).then(null, error => { + if (this.options.verboseLogging) { + this.options.errorLogger(`Unable to write to file '${resource.toString(true)}' as elevated user (${error})`); + } + + if (!(error instanceof FileOperationError)) { + error = new FileOperationError( + nls.localize('filePermission', "Permission denied writing to file ({0})", resource.toString(true)), + FileOperationResult.FILE_PERMISSION_DENIED + ); + } + + return TPromise.wrapError(error); + }); + } + public createFile(resource: uri, content: string = '', options: ICreateFileOptions = Object.create(null)): TPromise { const absolutePath = this.toAbsolutePath(resource); @@ -865,6 +930,7 @@ export class FileService implements IFileService { if (readonly) { mode = mode | 128; + return pfs.chmod(absolutePath, mode).then(() => exists); } diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index 4905dff62b3..edeb287757f 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -712,7 +712,8 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil overwriteEncoding: options.overwriteEncoding, mtime: this.lastResolvedDiskStat.mtime, encoding: this.getEncoding(), - etag: this.lastResolvedDiskStat.etag + etag: this.lastResolvedDiskStat.etag, + writeElevated: options.writeElevated }).then(stat => { diag(`doSave(${versionId}) - after updateContent()`, this.resource, new Date()); diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index da197f08234..27f62da126d 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -526,7 +526,7 @@ export abstract class TextFileService implements ITextFileService { return this.getFileModels(arg1).filter(model => model.isDirty()); } - public saveAs(resource: URI, target?: URI): TPromise { + public saveAs(resource: URI, target?: URI, options?: ISaveOptions): TPromise { // Get to target resource if (!target) { @@ -547,14 +547,14 @@ export abstract class TextFileService implements ITextFileService { // Just save if target is same as models own resource if (resource.toString() === target.toString()) { - return this.save(resource).then(() => resource); + return this.save(resource, options).then(() => resource); } // Do it - return this.doSaveAs(resource, target); + return this.doSaveAs(resource, target, options); } - private doSaveAs(resource: URI, target?: URI): TPromise { + private doSaveAs(resource: URI, target?: URI, options?: ISaveOptions): TPromise { // Retrieve text model from provided resource if any let modelPromise: TPromise = TPromise.as(null); @@ -568,7 +568,7 @@ export abstract class TextFileService implements ITextFileService { // We have a model: Use it (can be null e.g. if this file is binary and not a text file or was never opened before) if (model) { - return this.doSaveTextFileAs(model, resource, target); + return this.doSaveTextFileAs(model, resource, target, options); } // Otherwise we can only copy @@ -584,7 +584,7 @@ export abstract class TextFileService implements ITextFileService { }); } - private doSaveTextFileAs(sourceModel: ITextFileEditorModel | UntitledEditorModel, resource: URI, target: URI): TPromise { + private doSaveTextFileAs(sourceModel: ITextFileEditorModel | UntitledEditorModel, resource: URI, target: URI, options?: ISaveOptions): TPromise { let targetModelResolver: TPromise; // Prefer an existing model if it is already loaded for the given target resource @@ -607,12 +607,12 @@ export abstract class TextFileService implements ITextFileService { targetModel.textEditorModel.setValue(sourceModel.getValue()); // save model - return targetModel.save(); + return targetModel.save(options); }, error => { // binary model: delete the file and run the operation again if ((error).fileOperationResult === FileOperationResult.FILE_IS_BINARY || (error).fileOperationResult === FileOperationResult.FILE_TOO_LARGE) { - return this.fileService.del(target).then(() => this.doSaveTextFileAs(sourceModel, resource, target)); + return this.fileService.del(target).then(() => this.doSaveTextFileAs(sourceModel, resource, target, options)); } return TPromise.wrapError(error); diff --git a/src/vs/workbench/services/textfile/common/textfiles.ts b/src/vs/workbench/services/textfile/common/textfiles.ts index 81c64fdf345..7ffbcd960ad 100644 --- a/src/vs/workbench/services/textfile/common/textfiles.ts +++ b/src/vs/workbench/services/textfile/common/textfiles.ts @@ -179,6 +179,7 @@ export interface ISaveOptions { overwriteReadonly?: boolean; overwriteEncoding?: boolean; skipSaveParticipants?: boolean; + writeElevated?: boolean; } export interface ITextFileEditorModel extends ITextEditorModel, IEncodingSupport { @@ -246,17 +247,20 @@ export interface ITextFileService extends IDisposable { * Saves the resource. * * @param resource the resource to save + * @param options optional save options * @return true if the resource was saved. */ save(resource: URI, options?: ISaveOptions): TPromise; /** - * Saves the provided resource asking the user for a file name. + * Saves the provided resource asking the user for a file name or using the provided one. * * @param resource the resource to save as. + * @param targetResource the optional target to save to. + * @param options optional save options * @return true if the file was saved. */ - saveAs(resource: URI, targetResource?: URI): TPromise; + saveAs(resource: URI, targetResource?: URI, options?: ISaveOptions): TPromise; /** * Saves the set of resources and returns a promise with the operation result. diff --git a/yarn.lock b/yarn.lock index 93ff0a1f9ae..e7285af727a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5209,6 +5209,10 @@ strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" +sudo-prompt@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-8.0.0.tgz#a7b4a1ca6cbcca0e705b90a89dfc81d11034cba9" + sumchecker@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-2.0.2.tgz#0f42c10e5d05da5d42eea3e56c3399a37d6c5b3e" From 7f64599c798b59e62e79f881238bacbe926db592 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 12 Dec 2017 10:49:44 +0100 Subject: [PATCH 129/615] lipstick --- extensions/git/src/commands.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 1cfd67bd4ab..b8237688caa 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -362,7 +362,6 @@ export class CommandCenter { try { window.withProgress({ location: ProgressLocation.SourceControl, title: localize('cloning', "Cloning git repository...") }, () => clonePromise); - // window.withProgress({ location: ProgressLocation.Window, title: localize('cloning', "Cloning git repository...") }, () => clonePromise); const repositoryPath = await clonePromise; From da6ae730b22e79692e78e8274affcc96c535c8e5 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 12 Dec 2017 11:48:19 +0100 Subject: [PATCH 130/615] fixes #39880 --- .../electron-browser/media/shell.css | 6 +++-- src/vs/workbench/electron-browser/shell.ts | 25 ++++++++++--------- .../scm/electron-browser/media/scmViewlet.css | 1 + 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/electron-browser/media/shell.css b/src/vs/workbench/electron-browser/media/shell.css index 166dc1f5b07..4da763a8f93 100644 --- a/src/vs/workbench/electron-browser/media/shell.css +++ b/src/vs/workbench/electron-browser/media/shell.css @@ -124,7 +124,8 @@ outline-style: solid; } -.monaco-shell .monaco-tree.focused.no-focused-item:focus:before { +.monaco-shell .monaco-tree.focused.no-focused-item:focus:before, +.monaco-shell .monaco-list:not(.element-focused):focus:before { position: absolute; top: 0; left: 0; @@ -157,7 +158,8 @@ outline: 0 !important; /* outline is not going well with decoration */ } -.monaco-shell .monaco-tree.focused:focus { +.monaco-shell .monaco-tree.focused:focus, +.monaco-shell .monaco-list:focus { outline: 0 !important; /* tree indicates focus not via outline but through the focused item */ } diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index c2db51033d8..ef000919213 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -564,18 +564,19 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { const focusOutline = theme.getColor(focusBorder); if (focusOutline) { collector.addRule(` - .monaco-shell [tabindex="0"]:focus, - .monaco-shell .synthetic-focus, - .monaco-shell select:focus, - .monaco-shell .monaco-tree.focused.no-focused-item:focus:before, - .monaco-shell input[type="button"]:focus, - .monaco-shell input[type="text"]:focus, - .monaco-shell button:focus, - .monaco-shell textarea:focus, - .monaco-shell input[type="search"]:focus, - .monaco-shell input[type="checkbox"]:focus { - outline-color: ${focusOutline}; - } + .monaco-shell [tabindex="0"]:focus, + .monaco-shell .synthetic-focus, + .monaco-shell select:focus, + .monaco-shell .monaco-tree.focused.no-focused-item:focus:before, + .monaco-shell .monaco-list:not(.element-focused):focus:before, + .monaco-shell input[type="button"]:focus, + .monaco-shell input[type="text"]:focus, + .monaco-shell button:focus, + .monaco-shell textarea:focus, + .monaco-shell input[type="search"]:focus, + .monaco-shell input[type="checkbox"]:focus { + outline-color: ${focusOutline}; + } `); } }); diff --git a/src/vs/workbench/parts/scm/electron-browser/media/scmViewlet.css b/src/vs/workbench/parts/scm/electron-browser/media/scmViewlet.css index fa1b724f9fc..f6e3ec0c18a 100644 --- a/src/vs/workbench/parts/scm/electron-browser/media/scmViewlet.css +++ b/src/vs/workbench/parts/scm/electron-browser/media/scmViewlet.css @@ -25,6 +25,7 @@ .scm-viewlet .scm-status { height: 100%; + position: relative; } .scm-viewlet .monaco-list-row > .scm-provider { From 66339481a2996384bf99ecfac3eea3bf33deda33 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 12 Dec 2017 15:30:58 +0100 Subject: [PATCH 131/615] fix yarn build issue? --- build/tfs/win32/node.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/tfs/win32/node.ps1 b/build/tfs/win32/node.ps1 index fdfe25ae362..14ccd0008b2 100644 --- a/build/tfs/win32/node.ps1 +++ b/build/tfs/win32/node.ps1 @@ -1,7 +1,7 @@ # install node $env:Path = $env:NVM_HOME + ";" + $env:NVM_SYMLINK + ";" + $env:Path $NodeVersion = "8.9.1" -nvm install $NodeVersion -nvm use $NodeVersion -npm install -g yarn +# nvm install $NodeVersion +# nvm use $NodeVersion +# npm install -g yarn $env:Path = $env:NVM_HOME + "\v" + $NodeVersion + ";" + $env:Path \ No newline at end of file From 135b261f884410b427c9ec8bd56059a792a352ad Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 12 Dec 2017 15:55:40 +0100 Subject: [PATCH 132/615] fixes #40079 --- extensions/git/src/repository.ts | 87 +++++++++++++------ extensions/git/src/util.ts | 10 +++ .../parts/activitybar/activitybarPart.ts | 4 +- .../parts/compositebar/compositeBar.ts | 19 +++- .../parts/compositebar/compositeBarActions.ts | 1 + .../activity/browser/activityService.ts | 4 +- .../services/activity/common/activity.ts | 2 +- .../progress/browser/progressService2.ts | 62 +++++++------ 8 files changed, 126 insertions(+), 63 deletions(-) diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index d9e3a41445b..e96d54d708e 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -7,7 +7,7 @@ import { Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, DecorationData, Memento } from 'vscode'; import { Repository as BaseRepository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash, RefType, GitError } from './git'; -import { anyEvent, filterEvent, eventToPromise, dispose, find, isDescendant } from './util'; +import { anyEvent, filterEvent, eventToPromise, dispose, find, isDescendant, IDisposable, onceEvent, EmptyDisposable, debounceEvent } from './util'; import { memoize, throttle, debounce } from './decorators'; import { toGitUri } from './uri'; import { AutoFetcher } from './autofetch'; @@ -330,6 +330,7 @@ function shouldShowProgress(operation: Operation): boolean { export interface Operations { isIdle(): boolean; + shouldShowProgress(): boolean; isRunning(operation: Operation): boolean; } @@ -366,6 +367,18 @@ class OperationsImpl implements Operations { return true; } + + shouldShowProgress(): boolean { + const operations = this.operations.keys(); + + for (const operation of operations) { + if (shouldShowProgress(operation)) { + return true; + } + } + + return false; + } } export interface CommitOptions { @@ -384,6 +397,29 @@ export interface OperationResult { error: any; } +class ProgressManager { + + private disposable: IDisposable = EmptyDisposable; + + constructor(private repository: Repository) { + const start = onceEvent(filterEvent(repository.onDidChangeOperations, () => repository.operations.shouldShowProgress())); + const end = onceEvent(filterEvent(debounceEvent(repository.onDidChangeOperations, 300), () => !repository.operations.shouldShowProgress())); + + const setup = () => { + this.disposable = start(() => { + const promise = eventToPromise(end).then(() => setup()); + window.withProgress({ location: ProgressLocation.SourceControl }, () => promise); + }); + }; + + setup(); + } + + dispose(): void { + this.disposable.dispose(); + } +} + export class Repository implements Disposable { private _onDidChangeRepository = new EventEmitter(); @@ -503,6 +539,9 @@ export class Repository implements Disposable { statusBar.onDidChange(() => this._sourceControl.statusBarCommands = statusBar.commands, null, this.disposables); this._sourceControl.statusBarCommands = statusBar.commands; + const progressManager = new ProgressManager(this); + this.disposables.push(progressManager); + this.updateCommitTemplate(); this.status(); } @@ -806,37 +845,31 @@ export class Repository implements Disposable { throw new Error('Repository not initialized'); } - const run = async () => { - let error: any = null; + let error: any = null; - this._operations.start(operation); - this._onRunOperation.fire(operation); + this._operations.start(operation); + this._onRunOperation.fire(operation); - try { - const result = await this.retryRun(runOperation); + try { + const result = await this.retryRun(runOperation); - if (!isReadOnly(operation)) { - await this.updateModelState(); - } - - return result; - } catch (err) { - error = err; - - if (err.gitErrorCode === GitErrorCodes.NotAGitRepository) { - this.state = RepositoryState.Disposed; - } - - throw err; - } finally { - this._operations.end(operation); - this._onDidRunOperation.fire({ operation, error }); + if (!isReadOnly(operation)) { + await this.updateModelState(); } - }; - return shouldShowProgress(operation) - ? window.withProgress({ location: ProgressLocation.SourceControl }, run) - : run(); + return result; + } catch (err) { + error = err; + + if (err.gitErrorCode === GitErrorCodes.NotAGitRepository) { + this.state = RepositoryState.Disposed; + } + + throw err; + } finally { + this._operations.end(operation); + this._onDidRunOperation.fire({ operation, error }); + } } private async retryRun(runOperation: () => Promise = () => Promise.resolve(null)): Promise { diff --git a/extensions/git/src/util.ts b/extensions/git/src/util.ts index 6831fea9428..35561e8801e 100644 --- a/extensions/git/src/util.ts +++ b/extensions/git/src/util.ts @@ -69,6 +69,16 @@ export function onceEvent(event: Event): Event { }; } +export function debounceEvent(event: Event, delay: number): Event { + return (listener, thisArgs = null, disposables?) => { + let timer: NodeJS.Timer; + return event(e => { + clearTimeout(timer); + timer = setTimeout(() => listener.call(thisArgs, e), delay); + }, null, disposables); + }; +} + export function eventToPromise(event: Event): Promise { return new Promise(c => onceEvent(event)(c)); } diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index d0c3072491e..9d52f097832 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -88,9 +88,9 @@ export class ActivitybarPart extends Part { this.toUnbind.push(this.compositeBar.onDidContextMenu(e => this.showContextMenu(e))); } - public showActivity(viewletOrActionId: string, badge: IBadge, clazz?: string): IDisposable { + public showActivity(viewletOrActionId: string, badge: IBadge, clazz?: string, priority?: number): IDisposable { if (this.viewletService.getViewlet(viewletOrActionId)) { - return this.compositeBar.showActivity(viewletOrActionId, badge, clazz); + return this.compositeBar.showActivity(viewletOrActionId, badge, clazz, priority); } return this.showGlobalActivity(viewletOrActionId, badge); diff --git a/src/vs/workbench/browser/parts/compositebar/compositeBar.ts b/src/vs/workbench/browser/parts/compositebar/compositeBar.ts index 24b4a899842..c3fd8725e4f 100644 --- a/src/vs/workbench/browser/parts/compositebar/compositeBar.ts +++ b/src/vs/workbench/browser/parts/compositebar/compositeBar.ts @@ -100,14 +100,27 @@ export class CompositeBar implements ICompositeBar { } } - public showActivity(compositeId: string, badge: IBadge, clazz?: string): IDisposable { + public showActivity(compositeId: string, badge: IBadge, clazz?: string, priority?: number): IDisposable { if (!badge) { throw illegalArgument('badge'); } - const activity = { badge, clazz }; + if (typeof priority !== 'number') { + priority = 0; + } + + const activity: ICompositeActivity = { badge, clazz, priority }; const stack = this.compositeIdToActivityStack[compositeId] || (this.compositeIdToActivityStack[compositeId] = []); - stack.unshift(activity); + + for (let i = 0; i <= stack.length; i++) { + if (i === stack.length) { + stack.push(activity); + break; + } else if (stack[i].priority <= priority) { + stack.splice(i, 0, activity); + break; + } + } this.updateActivity(compositeId); diff --git a/src/vs/workbench/browser/parts/compositebar/compositeBarActions.ts b/src/vs/workbench/browser/parts/compositebar/compositeBarActions.ts index 543b77fab64..6c4f3102f84 100644 --- a/src/vs/workbench/browser/parts/compositebar/compositeBarActions.ts +++ b/src/vs/workbench/browser/parts/compositebar/compositeBarActions.ts @@ -26,6 +26,7 @@ import Event, { Emitter } from 'vs/base/common/event'; export interface ICompositeActivity { badge: IBadge; clazz: string; + priority: number; } export interface ICompositeBar { diff --git a/src/vs/workbench/services/activity/browser/activityService.ts b/src/vs/workbench/services/activity/browser/activityService.ts index 4f328baa8ae..c45b8556c40 100644 --- a/src/vs/workbench/services/activity/browser/activityService.ts +++ b/src/vs/workbench/services/activity/browser/activityService.ts @@ -21,11 +21,11 @@ export class ActivityService implements IActivityService { @IPanelService private panelService: IPanelService ) { } - public showActivity(compositeOrActionId: string, badge: IBadge, clazz?: string): IDisposable { + public showActivity(compositeOrActionId: string, badge: IBadge, clazz?: string, priority?: number): IDisposable { if (this.panelService.getPanels().filter(p => p.id === compositeOrActionId).length) { return this.panelPart.showActivity(compositeOrActionId, badge, clazz); } - return this.activitybarPart.showActivity(compositeOrActionId, badge, clazz); + return this.activitybarPart.showActivity(compositeOrActionId, badge, clazz, priority); } } diff --git a/src/vs/workbench/services/activity/common/activity.ts b/src/vs/workbench/services/activity/common/activity.ts index e2f5286ba2e..6167a730512 100644 --- a/src/vs/workbench/services/activity/common/activity.ts +++ b/src/vs/workbench/services/activity/common/activity.ts @@ -66,5 +66,5 @@ export interface IActivityService { /** * Show activity in the panel for the given panel or in the activitybar for the given viewlet or global action. */ - showActivity(compositeOrActionId: string, badge: IBadge, clazz?: string): IDisposable; + showActivity(compositeOrActionId: string, badge: IBadge, clazz?: string, priority?: number): IDisposable; } diff --git a/src/vs/workbench/services/progress/browser/progressService2.ts b/src/vs/workbench/services/progress/browser/progressService2.ts index 33cbb054baf..250beeea43a 100644 --- a/src/vs/workbench/services/progress/browser/progressService2.ts +++ b/src/vs/workbench/services/progress/browser/progressService2.ts @@ -7,7 +7,7 @@ import 'vs/css!./media/progressService2'; import * as dom from 'vs/base/browser/dom'; import { localize } from 'vs/nls'; -import { IDisposable } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IProgressService2, IProgressOptions, ProgressLocation, IProgress, IProgressStep, Progress, emptyProgress } from 'vs/platform/progress/common/progress'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { OcticonLabel } from 'vs/base/browser/ui/octiconLabel/octiconLabel'; @@ -15,6 +15,7 @@ import { Registry } from 'vs/platform/registry/common/platform'; import { StatusbarAlignment, IStatusbarRegistry, StatusbarItemDescriptor, Extensions, IStatusbarItem } from 'vs/workbench/browser/parts/statusbar/statusbar'; import { TPromise } from 'vs/base/common/winjs.base'; import { always } from 'vs/base/common/async'; +import { ProgressBadge, IActivityService } from 'vs/workbench/services/activity/common/activity'; class WindowProgressItem implements IStatusbarItem { @@ -60,6 +61,7 @@ export class ProgressService2 implements IProgressService2 { private _stack: [IProgressOptions, Progress][] = []; constructor( + @IActivityService private _activityBar: IActivityService, @IViewletService private _viewletService: IViewletService ) { // @@ -149,34 +151,38 @@ export class ProgressService2 implements IProgressService2 { } return promise; // show activity bar - // let activityProgress: IDisposable; - // let delayHandle = setTimeout(() => { - // delayHandle = undefined; - // const handle = this._activityBar.showActivity( - // viewletId, - // new ProgressBadge(() => ''), - // 'progress-badge' - // ); - // const startTimeVisible = Date.now(); - // const minTimeVisible = 300; - // activityProgress = { - // dispose() { - // const d = Date.now() - startTimeVisible; - // if (d < minTimeVisible) { - // // should at least show for Nms - // setTimeout(() => handle.dispose(), minTimeVisible - d); - // } else { - // // shown long enough - // handle.dispose(); - // } - // } - // }; - // }, 300); + let activityProgress: IDisposable; + let delayHandle = setTimeout(() => { + delayHandle = undefined; + const handle = this._activityBar.showActivity( + viewletId, + new ProgressBadge(() => ''), + 'progress-badge', + 100 + ); + const startTimeVisible = Date.now(); + const minTimeVisible = 300; + activityProgress = { + dispose() { + const d = Date.now() - startTimeVisible; + if (d < minTimeVisible) { + // should at least show for Nms + setTimeout(() => handle.dispose(), minTimeVisible - d); + } else { + // shown long enough + console.log('so long progress'); + handle.dispose(); + } + } + }; + }, 300); - // always(promise, () => { - // clearTimeout(delayHandle); - // dispose(activityProgress); - // }); + const onDone = () => { + clearTimeout(delayHandle); + dispose(activityProgress); + }; + + promise.then(onDone, onDone); } } From 6f2adf7dc7be1406da7fa4e148eda83c105eaaf5 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 12 Dec 2017 16:07:04 +0100 Subject: [PATCH 133/615] Fix #37189 --- .../browser/parts/views/viewsRegistry.ts | 2 +- .../browser/parts/views/viewsViewlet.ts | 78 ++++++++++++------- .../electron-browser/debug.contribution.ts | 8 +- .../electron-browser/extensionsViewlet.ts | 12 +-- 4 files changed, 60 insertions(+), 40 deletions(-) diff --git a/src/vs/workbench/browser/parts/views/viewsRegistry.ts b/src/vs/workbench/browser/parts/views/viewsRegistry.ts index be3861f6162..aa8ccb4bdca 100644 --- a/src/vs/workbench/browser/parts/views/viewsRegistry.ts +++ b/src/vs/workbench/browser/parts/views/viewsRegistry.ts @@ -45,7 +45,7 @@ export interface IViewDescriptor { readonly order?: number; - readonly size?: number; + readonly weight?: number; readonly collapsed?: boolean; diff --git a/src/vs/workbench/browser/parts/views/viewsViewlet.ts b/src/vs/workbench/browser/parts/views/viewsViewlet.ts index afb99b00024..a8c84baf99d 100644 --- a/src/vs/workbench/browser/parts/views/viewsViewlet.ts +++ b/src/vs/workbench/browser/parts/views/viewsViewlet.ts @@ -266,6 +266,7 @@ export class ViewsViewlet extends PanelViewlet { private readonly viewsContextKeys: Set = new Set(); private viewsViewletPanels: ViewsViewletPanel[] = []; private didLayout = false; + private dimension: Dimension; protected viewsStates: Map = new Map(); private areExtensionsReady: boolean = false; @@ -325,7 +326,7 @@ export class ViewsViewlet extends PanelViewlet { layout(dimension: Dimension): void { super.layout(dimension); - + this.dimension = dimension; if (this.didLayout) { this.snapshotViewsStates(); } else { @@ -350,18 +351,11 @@ export class ViewsViewlet extends PanelViewlet { const view = this.getView(id); let viewState = this.viewsStates.get(id); - if ((visible === true && view) || (visible === false && !view)) { + if (!viewState || (visible === true && view) || (visible === false && !view)) { return; } - if (view) { - viewState = viewState || this.createViewState(view); - viewState.isHidden = true; - } else { - viewState = viewState || { collapsed: true, size: 200, isHidden: false, order: void 0 }; - viewState.isHidden = false; - } - this.viewsStates.set(id, viewState); + viewState.isHidden = !!view; this.updateViews(); } @@ -439,7 +433,7 @@ export class ViewsViewlet extends PanelViewlet { }); toCreate.push(view); - const size = (viewState && viewState.size) || viewDescriptor.size || 200; + const size = (viewState && viewState.size) || 200; this.addPanel(view, size, index); this.viewsViewletPanels.splice(index, 0, view); } @@ -461,16 +455,38 @@ export class ViewsViewlet extends PanelViewlet { return; } + let initialSizes; for (const panel of panels) { const viewState = this.viewsStates.get(panel.id); - const viewDescriptor = this.getViewDescriptorsFromRegistry().filter(viewDescriptor => viewDescriptor.id === panel.id)[0]; - const size = (viewState && viewState.size) || viewDescriptor.size || 200; - this.resizePanel(panel, size); + if (viewState && viewState.size) { + this.resizePanel(panel, viewState.size); + } else { + initialSizes = initialSizes ? initialSizes : this.computeInitialSizes(); + this.resizePanel(panel, initialSizes[panel.id] || 200); + } } this.snapshotViewsStates(); } + private computeInitialSizes(): { [id: string]: number } { + let sizes = {}; + if (this.dimension) { + let totalWeight = 0; + const allViewDescriptors = this.getViewDescriptorsFromRegistry(); + const viewDescriptors: IViewDescriptor[] = []; + for (const panel of this.viewsViewletPanels) { + const viewDescriptor = allViewDescriptors.filter(viewDescriptor => viewDescriptor.id === panel.id)[0]; + totalWeight = totalWeight + (viewDescriptor.weight || 20); + viewDescriptors.push(viewDescriptor); + } + for (const viewDescriptor of viewDescriptors) { + sizes[viewDescriptor.id] = this.dimension.height * (viewDescriptor.weight || 20) / totalWeight; + } + } + return sizes; + } + movePanel(from: ViewletPanel, to: ViewletPanel): void { const fromIndex = firstIndex(this.viewsViewletPanels, panel => panel === from); const toIndex = firstIndex(this.viewsViewletPanels, panel => panel === to); @@ -616,24 +632,23 @@ export class ViewsViewlet extends PanelViewlet { return; } - const newViewState = this.createViewState(view); + const collapsed = !view.isExpanded(); + const order = this.viewsViewletPanels.indexOf(view); + const panelSize = this.getPanelSize(view); if (currentState) { - newViewState.isHidden = currentState.isHidden; - newViewState.size = newViewState.collapsed ? currentState.size : newViewState.size; + currentState.collapsed = collapsed; + currentState.size = collapsed ? currentState.size : panelSize; + currentState.order = order; + } else { + this.viewsStates.set(view.id, { + collapsed, + size: this.didLayout ? panelSize : void 0, + isHidden: false, + order, + }); } - this.viewsStates.set(view.id, newViewState); } } - - protected createViewState(view: ViewsViewletPanel): IViewState { - const viewDescriptor = this.getViewDescriptorsFromRegistry().filter(viewDescriptor => viewDescriptor.id === view.id)[0]; - return { - collapsed: !view.isExpanded(), - size: this.didLayout ? this.getPanelSize(view) : viewDescriptor.size || 200, // Take the default value incase of layout not happened yet. - isHidden: false, - order: this.viewsViewletPanels.indexOf(view) - }; - } } export class PersistentViewsViewlet extends ViewsViewlet { @@ -672,7 +687,12 @@ export class PersistentViewsViewlet extends ViewsViewlet { const view = this.getView(id); if (view) { - viewsStates[id] = this.createViewState(view); + viewsStates[id] = { + collapsed: !view.isExpanded(), + size: this.getPanelSize(view), + isHidden: false, + order: viewState.order + }; } else { const viewDescriptor = registeredViewDescriptors.filter(v => v.id === id)[0]; if (viewDescriptor) { diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index b393541ca3f..043476e62ce 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -107,10 +107,10 @@ Registry.as(PanelExtensions.Panels).registerPanel(new PanelDescri Registry.as(PanelExtensions.Panels).setDefaultPanelId(REPL_ID); // Register default debug views -ViewsRegistry.registerViews([{ id: VARIABLES_VIEW_ID, name: nls.localize('variables', "Variables"), ctor: VariablesView, order: 10, size: 40, location: ViewLocation.Debug, canToggleVisibility: true }]); -ViewsRegistry.registerViews([{ id: WATCH_VIEW_ID, name: nls.localize('watch', "Watch"), ctor: WatchExpressionsView, order: 20, size: 10, location: ViewLocation.Debug, canToggleVisibility: true }]); -ViewsRegistry.registerViews([{ id: CALLSTACK_VIEW_ID, name: nls.localize('callStack', "Call Stack"), ctor: CallStackView, order: 30, size: 30, location: ViewLocation.Debug, canToggleVisibility: true }]); -ViewsRegistry.registerViews([{ id: BREAKPOINTS_VIEW_ID, name: nls.localize('breakpoints', "Breakpoints"), ctor: BreakpointsView, order: 40, size: 20, location: ViewLocation.Debug, canToggleVisibility: true }]); +ViewsRegistry.registerViews([{ id: VARIABLES_VIEW_ID, name: nls.localize('variables', "Variables"), ctor: VariablesView, order: 10, weight: 40, location: ViewLocation.Debug, canToggleVisibility: true }]); +ViewsRegistry.registerViews([{ id: WATCH_VIEW_ID, name: nls.localize('watch', "Watch"), ctor: WatchExpressionsView, order: 20, weight: 10, location: ViewLocation.Debug, canToggleVisibility: true }]); +ViewsRegistry.registerViews([{ id: CALLSTACK_VIEW_ID, name: nls.localize('callStack', "Call Stack"), ctor: CallStackView, order: 30, weight: 30, location: ViewLocation.Debug, canToggleVisibility: true }]); +ViewsRegistry.registerViews([{ id: BREAKPOINTS_VIEW_ID, name: nls.localize('breakpoints', "Breakpoints"), ctor: BreakpointsView, order: 40, weight: 20, location: ViewLocation.Debug, canToggleVisibility: true }]); // register action to open viewlet const registry = Registry.as(WorkbenchActionRegistryExtensions.WorkbenchActions); diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts index d3981741f79..5adfee8f751 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts @@ -133,7 +133,7 @@ export class ExtensionsViewlet extends PersistentViewsViewlet implements IExtens location: ViewLocation.Extensions, ctor: ExtensionsListView, when: ContextKeyExpr.and(ContextKeyExpr.has('searchExtensions'), ContextKeyExpr.not('searchInstalledExtensions'), ContextKeyExpr.not('recommendedExtensions')), - size: 100 + weight: 100 }; } @@ -144,7 +144,7 @@ export class ExtensionsViewlet extends PersistentViewsViewlet implements IExtens location: ViewLocation.Extensions, ctor: InstalledExtensionsView, when: ContextKeyExpr.and(ContextKeyExpr.not('searchExtensions')), - size: 200 + weight: 30 }; } @@ -155,7 +155,7 @@ export class ExtensionsViewlet extends PersistentViewsViewlet implements IExtens location: ViewLocation.Extensions, ctor: InstalledExtensionsView, when: ContextKeyExpr.and(ContextKeyExpr.has('searchInstalledExtensions')), - size: 50 + weight: 100 }; } @@ -166,7 +166,7 @@ export class ExtensionsViewlet extends PersistentViewsViewlet implements IExtens location: ViewLocation.Extensions, ctor: RecommendedExtensionsView, when: ContextKeyExpr.and(ContextKeyExpr.not('searchExtensions')), - size: 600, + weight: 70, canToggleVisibility: true }; } @@ -178,7 +178,7 @@ export class ExtensionsViewlet extends PersistentViewsViewlet implements IExtens location: ViewLocation.Extensions, ctor: RecommendedExtensionsView, when: ContextKeyExpr.and(ContextKeyExpr.has('recommendedExtensions')), - size: 600, + weight: 50, canToggleVisibility: true, order: 2 }; @@ -191,7 +191,7 @@ export class ExtensionsViewlet extends PersistentViewsViewlet implements IExtens location: ViewLocation.Extensions, ctor: WorkspaceRecommendedExtensionsView, when: ContextKeyExpr.and(ContextKeyExpr.has('recommendedExtensions'), ContextKeyExpr.has('nonEmptyWorkspace')), - size: 200, + weight: 50, canToggleVisibility: true, order: 1 }; From 4ff607dd76a8f8ffd4f8ecf0af5b59e84b62f1c2 Mon Sep 17 00:00:00 2001 From: Till Date: Tue, 12 Dec 2017 16:13:55 +0100 Subject: [PATCH 134/615] Fix #38623 --- src/vs/editor/contrib/quickFix/quickFix.ts | 47 ++++++-- .../contrib/quickFix/test/quickFix.test.ts | 100 +++++++++++++++--- 2 files changed, 120 insertions(+), 27 deletions(-) diff --git a/src/vs/editor/contrib/quickFix/quickFix.ts b/src/vs/editor/contrib/quickFix/quickFix.ts index 3a13fc98684..0d20c86a61a 100644 --- a/src/vs/editor/contrib/quickFix/quickFix.ts +++ b/src/vs/editor/contrib/quickFix/quickFix.ts @@ -31,30 +31,55 @@ export function getCodeActions(model: IReadOnlyModel, range: Range): TPromise - allResults.sort(codeActionsAndCommandsComparator) + return TPromise.join(promises).then( + () => allResults.sort(codeActionsComparator) ); } -function isCommand(quickFix: CodeAction | Command): quickFix is Command { - return (quickFix).id !== undefined; -} +function codeActionsComparator(a: CodeAction, b: CodeAction): number { -function codeActionsAndCommandsComparator(a: (CodeAction | Command), b: (CodeAction | Command)): number { - if (isCommand(a)) { - if (isCommand(b)) { + if (a.command) { + if (b.command) { return a.title.localeCompare(b.title); } else { return 1; } } + else if (b.command) { + return -1; + } else { - if (isCommand(b)) { - return -1; + return suggestionsComparator(a, b); + } +} + +function suggestionsComparator(a: CodeAction, b: CodeAction): number { + + if (a.diagnostics) { + if (b.diagnostics) { + if (a.diagnostics.length) { + if (b.diagnostics.length) { + return a.diagnostics[0].message.localeCompare(b.diagnostics[0].message); + } else { + return -1; + } + } else { + if (b.diagnostics.length) { + return 1; + } else { + return a.title.localeCompare(b.title); // both have diagnostics - but empty + } + } } else { - return a.title.localeCompare(b.title); + return -1; } } + else if (b.diagnostics) { + return 1; + } + else { + return a.title.localeCompare(b.title); // both have no diagnostics + } } registerLanguageCommand('_executeCodeActionProvider', function (accessor, args) { diff --git a/src/vs/editor/contrib/quickFix/test/quickFix.test.ts b/src/vs/editor/contrib/quickFix/test/quickFix.test.ts index 315d5b56e31..c356a030617 100644 --- a/src/vs/editor/contrib/quickFix/test/quickFix.test.ts +++ b/src/vs/editor/contrib/quickFix/test/quickFix.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import URI from 'vs/base/common/uri'; import Severity from 'vs/base/common/severity'; import { Model } from 'vs/editor/common/model/model'; -import { CodeActionProviderRegistry, LanguageIdentifier, CodeActionProvider } from 'vs/editor/common/modes'; +import { CodeActionProviderRegistry, LanguageIdentifier, CodeActionProvider, Command, WorkspaceEdit, IResourceEdit } from 'vs/editor/common/modes'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Range } from 'vs/editor/common/core/range'; import { getCodeActions } from 'vs/editor/contrib/quickFix/quickFix'; @@ -19,6 +19,64 @@ suite('QuickFix', () => { let uri = URI.parse('untitled:path'); let model: Model; let disposables: IDisposable[] = []; + let testData = { + diagnostics: { + abc: { + title: 'bTitle', + diagnostics: [{ + startLineNumber: 1, + startColumn: 1, + endLineNumber: 2, + endColumn: 1, + severity: Severity.Error, + message: 'abc' + }] + }, + bcd: { + title: 'aTitle', + diagnostics: [{ + startLineNumber: 1, + startColumn: 1, + endLineNumber: 2, + endColumn: 1, + severity: Severity.Error, + message: 'bcd' + }] + } + }, + command: { + abc: { + command: new class implements Command { + id: '1'; + title: 'abc'; + }, + title: 'Extract to inner function in function "test"' + } + }, + spelling: { + bcd: { + diagnostics: [], + edits: new class implements WorkspaceEdit { + edits: IResourceEdit[]; + }, + title: 'abc' + } + }, + tsLint: { + abc: { + $ident: 57, + arguments: [], + id: '_internal_command_delegation', + title: 'abc' + }, + bcd: { + $ident: 47, + arguments: [], + id: '_internal_command_delegation', + title: 'bcd' + } + } + }; setup(function () { model = Model.createFromString('test1\ntest2\ntest3', undefined, langId, uri); @@ -29,30 +87,40 @@ suite('QuickFix', () => { dispose(disposables); }); - test('basics', async function () { + test('CodeActions are sorted by type, #38623', async function () { + + let expected = [ + // CodeActions with a diagnostics array are shown first + testData.diagnostics.abc, + testData.diagnostics.bcd, + testData.spelling.bcd, // empty diagnostics array + + // CodeActions without a diagnostics or command object + testData.tsLint.abc, + testData.tsLint.bcd, + + // CodeActions with a command object are shown last + testData.command.abc + ]; const provider = new class implements CodeActionProvider { provideCodeActions() { - return [{ - title: 'Testing1', - diagnostics: [{ - startLineNumber: 1, - startColumn: 1, - endLineNumber: 2, - endColumn: 1, - severity: Severity.Error, - message: 'some error' - }] - }, { - title: 'Testing2' - }]; + return [ + testData.command.abc, + testData.diagnostics.bcd, + testData.spelling.bcd, + testData.tsLint.bcd, + testData.tsLint.abc, + testData.diagnostics.abc + ]; } }; disposables.push(CodeActionProviderRegistry.register('fooLang', provider)); const actions = await getCodeActions(model, new Range(1, 1, 2, 1)); - assert.equal(actions.length, 2); + assert.equal(actions.length, 6); + assert.deepEqual(actions, expected); }); }); From ec51963052c2066cceae8262b1ddfbae5720c58e Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 12 Dec 2017 16:14:10 +0100 Subject: [PATCH 135/615] :lipstick: --- .../extensionManagement/node/extensionManagementService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index 0a8bac15123..93146f92d37 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -241,7 +241,7 @@ export class ExtensionManagementService implements IExtensionManagementService { return this.galleryService.loadCompatibleVersion(extension) .then(compatible => { if (!compatible) { - return TPromise.wrapError(new ExtensionManagementError(nls.localize('notFoundCompatible', "Unable to install because, the extension '{0}' compatible with current version '{1}' of VS Code is not found.", extension.identifier.id, pkg.version), INSTALL_ERROR_INCOMPATIBLE)); + return TPromise.wrapError(new ExtensionManagementError(nls.localize('notFoundCompatible', "Unable to install '{0}'; there is no available version compatible with VS Code '{1}'.", extension.identifier.id, pkg.version), INSTALL_ERROR_INCOMPATIBLE)); } return this.getDependenciesToInstall(compatible.properties.dependencies) .then( From d86d4ab5876b8aa0a814091ea514cdc1bdd4e0b8 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 12 Dec 2017 16:14:20 +0100 Subject: [PATCH 136/615] Remove diff2.ts (fixes #38490) --- src/vs/base/common/diff/diff2.ts | 325 ---------------------- src/vs/base/test/common/diff/diff.test.ts | 6 - 2 files changed, 331 deletions(-) delete mode 100644 src/vs/base/common/diff/diff2.ts diff --git a/src/vs/base/common/diff/diff2.ts b/src/vs/base/common/diff/diff2.ts deleted file mode 100644 index 3bb52c68b94..00000000000 --- a/src/vs/base/common/diff/diff2.ts +++ /dev/null @@ -1,325 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { DiffChange } from 'vs/base/common/diff/diffChange'; - -export interface ISequence { - getLength(): number; - getElementHash(index: number): string; - [index: number]: string; -} - -export interface IDiffChange { - /** - * The position of the first element in the original sequence which - * this change affects. - */ - originalStart: number; - - /** - * The number of elements from the original sequence which were - * affected. - */ - originalLength: number; - - /** - * The position of the first element in the modified sequence which - * this change affects. - */ - modifiedStart: number; - - /** - * The number of elements from the modified sequence which were - * affected (added). - */ - modifiedLength: number; -} - -export interface IContinueProcessingPredicate { - (furthestOriginalIndex: number, originalSequence: ISequence, matchLengthOfLongest: number): boolean; -} - -export interface IHashFunction { - (sequence: ISequence, index: number): string; -} - -/** - * An implementation of the difference algorithm described by Hirschberg - */ -export class LcsDiff2 { - - private x: ISequence; - private y: ISequence; - - private ids_for_x: number[]; - private ids_for_y: number[]; - - private resultX: boolean[]; - private resultY: boolean[]; - private forwardPrev: number[]; - private forwardCurr: number[]; - private backwardPrev: number[]; - private backwardCurr: number[]; - - constructor(originalSequence: ISequence, newSequence: ISequence, continueProcessingPredicate: IContinueProcessingPredicate, hashFunc: IHashFunction) { - this.x = originalSequence; - this.y = newSequence; - this.ids_for_x = []; - this.ids_for_y = []; - - this.resultX = []; - this.resultY = []; - this.forwardPrev = []; - this.forwardCurr = []; - this.backwardPrev = []; - this.backwardCurr = []; - - for (let i = 0, length = this.x.getLength(); i < length; i++) { - this.resultX[i] = false; - } - - for (let i = 0, length = this.y.getLength(); i <= length; i++) { - this.resultY[i] = false; - } - - this.ComputeUniqueIdentifiers(); - } - - private ComputeUniqueIdentifiers() { - let xLength = this.x.getLength(); - let yLength = this.y.getLength(); - this.ids_for_x = new Array(xLength); - this.ids_for_y = new Array(yLength); - - // Create a new hash table for unique elements from the original - // sequence. - let hashTable: { [key: string]: number; } = {}; - let currentUniqueId = 1; - let i: number; - - // Fill up the hash table for unique elements - for (i = 0; i < xLength; i++) { - let xElementHash = this.x.getElementHash(i); - if (!hashTable.hasOwnProperty(xElementHash)) { - // No entry in the hashtable so this is a new unique element. - // Assign the element a new unique identifier and add it to the - // hash table - this.ids_for_x[i] = currentUniqueId++; - hashTable[xElementHash] = this.ids_for_x[i]; - } else { - this.ids_for_x[i] = hashTable[xElementHash]; - } - } - - // Now match up modified elements - for (i = 0; i < yLength; i++) { - let yElementHash = this.y.getElementHash(i); - if (!hashTable.hasOwnProperty(yElementHash)) { - this.ids_for_y[i] = currentUniqueId++; - hashTable[yElementHash] = this.ids_for_y[i]; - } else { - this.ids_for_y[i] = hashTable[yElementHash]; - } - } - } - - private ElementsAreEqual(xIndex: number, yIndex: number): boolean { - return this.ids_for_x[xIndex] === this.ids_for_y[yIndex]; - } - - public ComputeDiff(): IDiffChange[] { - let xLength = this.x.getLength(); - let yLength = this.y.getLength(); - - this.execute(0, xLength - 1, 0, yLength - 1); - - // Construct the changes - let i = 0; - let j = 0; - let xChangeStart: number, yChangeStart: number; - let changes: DiffChange[] = []; - while (i < xLength && j < yLength) { - if (this.resultX[i] && this.resultY[j]) { - // No change - i++; - j++; - } else { - xChangeStart = i; - yChangeStart = j; - while (i < xLength && !this.resultX[i]) { - i++; - } - while (j < yLength && !this.resultY[j]) { - j++; - } - changes.push(new DiffChange(xChangeStart, i - xChangeStart, yChangeStart, j - yChangeStart)); - } - } - if (i < xLength) { - changes.push(new DiffChange(i, xLength - i, yLength, 0)); - } - if (j < yLength) { - changes.push(new DiffChange(xLength, 0, j, yLength - j)); - } - return changes; - } - - private forward(xStart: number, xStop: number, yStart: number, yStop: number): number[] { - let prev = this.forwardPrev, - curr = this.forwardCurr, - tmp: number[], - i: number, - j: number; - - // First line - prev[yStart] = this.ElementsAreEqual(xStart, yStart) ? 1 : 0; - for (j = yStart + 1; j <= yStop; j++) { - prev[j] = this.ElementsAreEqual(xStart, j) ? 1 : prev[j - 1]; - } - - for (i = xStart + 1; i <= xStop; i++) { - // First column - curr[yStart] = this.ElementsAreEqual(i, yStart) ? 1 : prev[yStart]; - - for (j = yStart + 1; j <= yStop; j++) { - if (this.ElementsAreEqual(i, j)) { - curr[j] = prev[j - 1] + 1; - } else { - curr[j] = prev[j] > curr[j - 1] ? prev[j] : curr[j - 1]; - } - } - - // Swap prev & curr - tmp = curr; - curr = prev; - prev = tmp; - } - - // Result is always in prev - return prev; - } - - private backward(xStart: number, xStop: number, yStart: number, yStop: number): number[] { - let prev = this.backwardPrev, - curr = this.backwardCurr, - tmp: number[], - i: number, - j: number; - - // Last line - prev[yStop] = this.ElementsAreEqual(xStop, yStop) ? 1 : 0; - for (j = yStop - 1; j >= yStart; j--) { - prev[j] = this.ElementsAreEqual(xStop, j) ? 1 : prev[j + 1]; - } - - for (i = xStop - 1; i >= xStart; i--) { - // Last column - curr[yStop] = this.ElementsAreEqual(i, yStop) ? 1 : prev[yStop]; - - for (j = yStop - 1; j >= yStart; j--) { - if (this.ElementsAreEqual(i, j)) { - curr[j] = prev[j + 1] + 1; - } else { - curr[j] = prev[j] > curr[j + 1] ? prev[j] : curr[j + 1]; - } - } - - // Swap prev & curr - tmp = curr; - curr = prev; - prev = tmp; - } - - // Result is always in prev - return prev; - } - - private findCut(xStart: number, xStop: number, yStart: number, yStop: number, middle: number): number { - let L1 = this.forward(xStart, middle, yStart, yStop); - let L2 = this.backward(middle + 1, xStop, yStart, yStop); - - // First cut - let max = L2[yStart], cut = yStart - 1; - - // Middle cut - for (let j = yStart; j < yStop; j++) { - if (L1[j] + L2[j + 1] > max) { - max = L1[j] + L2[j + 1]; - cut = j; - } - } - - // Last cut - if (L1[yStop] > max) { - max = L1[yStop]; - cut = yStop; - } - - return cut; - } - - private execute(xStart: number, xStop: number, yStart: number, yStop: number) { - // Do some prefix trimming - while (xStart <= xStop && yStart <= yStop && this.ElementsAreEqual(xStart, yStart)) { - this.resultX[xStart] = true; - xStart++; - this.resultY[yStart] = true; - yStart++; - } - - // Do some suffix trimming - while (xStart <= xStop && yStart <= yStop && this.ElementsAreEqual(xStop, yStop)) { - this.resultX[xStop] = true; - xStop--; - this.resultY[yStop] = true; - yStop--; - } - - if (xStart > xStop || yStart > yStop) { - return; - } - - let found: number, i: number; - if (xStart === xStop) { - found = -1; - for (i = yStart; i <= yStop; i++) { - if (this.ElementsAreEqual(xStart, i)) { - found = i; - break; - } - } - if (found >= 0) { - this.resultX[xStart] = true; - this.resultY[found] = true; - } - } else if (yStart === yStop) { - found = -1; - for (i = xStart; i <= xStop; i++) { - if (this.ElementsAreEqual(i, yStart)) { - found = i; - break; - } - } - - if (found >= 0) { - this.resultX[found] = true; - this.resultY[yStart] = true; - } - } else { - let middle = Math.floor((xStart + xStop) / 2); - let cut = this.findCut(xStart, xStop, yStart, yStop, middle); - - if (yStart <= cut) { - this.execute(xStart, middle, yStart, cut); - } - - if (cut + 1 <= yStop) { - this.execute(middle + 1, xStop, cut + 1, yStop); - } - } - } - -} diff --git a/src/vs/base/test/common/diff/diff.test.ts b/src/vs/base/test/common/diff/diff.test.ts index a822586e7c4..0c07a30b7c9 100644 --- a/src/vs/base/test/common/diff/diff.test.ts +++ b/src/vs/base/test/common/diff/diff.test.ts @@ -7,7 +7,6 @@ import * as assert from 'assert'; import { LcsDiff, IDiffChange } from 'vs/base/common/diff/diff'; -import { LcsDiff2 } from 'vs/base/common/diff/diff2'; class StringDiffSequence { @@ -116,11 +115,6 @@ suite('Diff', () => { this.timeout(10000); lcsTests(LcsDiff); }); - - test('LcsDiff2 - different strings tests', function () { - this.timeout(10000); - lcsTests(LcsDiff2); - }); }); suite('Diff - Ported from VS', () => { From e2f8e0dde77ee907844da7dd93ca41d159819878 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 12 Dec 2017 16:21:51 +0100 Subject: [PATCH 137/615] open editors: reuse elementCount #39734 --- .../electron-browser/views/openEditorsView.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index 723e076b864..04ef95b9a05 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -333,11 +333,13 @@ export class OpenEditorsView extends ViewsViewletPanel { } } + private get elementCount(): number { + return this.model.groups.map(g => g.count) + .reduce((first, second) => first + second, this.model.groups.length > 1 ? this.model.groups.length : 0); + } + private getMaxExpandedBodySize(): number { - const elementCount = this.model.groups.map(g => g.count) - .reduce((first, second) => first + second, this.model.groups.length > 1 - ? this.model.groups.length : 0); - return elementCount * OpenEditorsDelegate.ITEM_HEIGHT; + return this.elementCount * OpenEditorsDelegate.ITEM_HEIGHT; } private getMinExpandedBodySize(): number { @@ -357,9 +359,7 @@ export class OpenEditorsView extends ViewsViewletPanel { private computeMinExpandedBodySize(visibleOpenEditors = OpenEditorsView.DEFAULT_VISIBLE_OPEN_EDITORS, dynamicHeight = OpenEditorsView.DEFAULT_DYNAMIC_HEIGHT): number { let itemsToShow: number; if (dynamicHeight) { - const elementCount = this.model.groups.map(g => g.count) - .reduce((first, second) => first + second, this.model.groups.length > 1 ? this.model.groups.length : 0); - itemsToShow = Math.min(Math.max(visibleOpenEditors, 1), elementCount); + itemsToShow = Math.min(Math.max(visibleOpenEditors, 1), this.elementCount); } else { itemsToShow = Math.max(visibleOpenEditors, 1); } From d80c7fe080f013feb6c4f7c9ebfde583b45892dd Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 12 Dec 2017 16:22:16 +0100 Subject: [PATCH 138/615] :lipstick: --- src/vs/workbench/browser/parts/views/viewsViewlet.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/browser/parts/views/viewsViewlet.ts b/src/vs/workbench/browser/parts/views/viewsViewlet.ts index a8c84baf99d..0238302847f 100644 --- a/src/vs/workbench/browser/parts/views/viewsViewlet.ts +++ b/src/vs/workbench/browser/parts/views/viewsViewlet.ts @@ -359,7 +359,7 @@ export class ViewsViewlet extends PanelViewlet { this.updateViews(); } - private onViewsRegistered(views: IViewDescriptor[]): TPromise { + private onViewsRegistered(views: IViewDescriptor[]): void { this.viewsContextKeys.clear(); for (const viewDescriptor of this.getViewDescriptorsFromRegistry()) { if (viewDescriptor.when) { @@ -369,11 +369,11 @@ export class ViewsViewlet extends PanelViewlet { } } - return this.updateViews(); + this.updateViews(); } - private onViewsDeregistered(views: IViewDescriptor[]): TPromise { - return this.updateViews(views); + private onViewsDeregistered(views: IViewDescriptor[]): void { + this.updateViews(views); } private onContextChanged(event: IContextKeyChangeEvent): void { From ff9c9e596605d673ece74c534814d4afc70f93b6 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 12 Dec 2017 16:25:30 +0100 Subject: [PATCH 139/615] allow to run CLI as root when running --write-elevated-helper --- resources/linux/bin/code.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/linux/bin/code.sh b/resources/linux/bin/code.sh index 088bcf8b2ab..83886cc2c91 100755 --- a/resources/linux/bin/code.sh +++ b/resources/linux/bin/code.sh @@ -3,15 +3,15 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# If root, ensure that --user-data-dir is specified +# If root, ensure that --user-data-dir or --write-elevated-helper is specified if [ "$(id -u)" = "0" ]; then for i in $@ do - if [[ $i == --user-data-dir=* ]]; then - DATA_DIR_SET=1 + if [[ $i == --user-data-dir=* || $i == --write-elevated-helper ]]; then + CAN_LAUNCH_AS_ROOT=1 fi done - if [ -z $DATA_DIR_SET ]; then + if [ -z $CAN_LAUNCH_AS_ROOT ]; then echo "You are trying to start vscode as a super user which is not recommended. If you really want to, you must specify an alternate user data directory using the --user-data-dir argument." 1>&2 exit 1 fi From 115fd0b1b80ae025e0942ab7d568dadeb4f8bde1 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 12 Dec 2017 16:29:10 +0100 Subject: [PATCH 140/615] Remove editable range code (fixes #38633) --- .../editor/browser/controller/coreCommands.ts | 48 ++++----------- .../currentLineHighlight.ts | 9 --- .../currentLineMarginHighlight.ts | 9 --- .../viewParts/viewCursors/viewCursor.ts | 9 +-- .../viewParts/viewCursors/viewCursors.ts | 10 ++-- src/vs/editor/common/controller/cursor.ts | 22 +------ .../editor/common/controller/cursorCommon.ts | 44 -------------- .../common/controller/cursorMoveCommands.ts | 16 ----- src/vs/editor/common/editorCommon.ts | 18 ------ .../editor/common/model/editableTextModel.ts | 60 +------------------ src/vs/editor/common/view/viewEvents.ts | 7 +-- src/vs/editor/contrib/find/findModel.ts | 16 ++--- .../contrib/find/test/findModel.test.ts | 40 ------------- .../editor/contrib/multicursor/multicursor.ts | 12 +--- src/vs/editor/contrib/suggest/suggestModel.ts | 16 ----- 15 files changed, 30 insertions(+), 306 deletions(-) diff --git a/src/vs/editor/browser/controller/coreCommands.ts b/src/vs/editor/browser/controller/coreCommands.ts index 313479b1766..be5019013e0 100644 --- a/src/vs/editor/browser/controller/coreCommands.ts +++ b/src/vs/editor/browser/controller/coreCommands.ts @@ -455,10 +455,7 @@ export namespace CoreNavigationCommands { cursors.setStates( source, CursorChangeReason.Explicit, - CursorState.ensureInEditableRange( - cursors.context, - CursorMoveCommands.move(cursors.context, cursors.getAll(), args) - ) + CursorMoveCommands.move(cursors.context, cursors.getAll(), args) ); cursors.reveal(true, RevealTarget.Primary, editorCommon.ScrollType.Smooth); } @@ -707,7 +704,7 @@ export namespace CoreNavigationCommands { public runCoreEditorCommand(cursors: ICursors, args: any): void { const context = cursors.context; - if (context.config.readOnly || context.model.hasEditableRange()) { + if (context.config.readOnly) { return; } @@ -772,7 +769,7 @@ export namespace CoreNavigationCommands { public runCoreEditorCommand(cursors: ICursors, args: any): void { const context = cursors.context; - if (context.config.readOnly || context.model.hasEditableRange()) { + if (context.config.readOnly) { return; } @@ -804,10 +801,7 @@ export namespace CoreNavigationCommands { cursors.setStates( args.source, CursorChangeReason.Explicit, - CursorState.ensureInEditableRange( - cursors.context, - CursorMoveCommands.moveToBeginningOfLine(cursors.context, cursors.getAll(), this._inSelectionMode) - ) + CursorMoveCommands.moveToBeginningOfLine(cursors.context, cursors.getAll(), this._inSelectionMode) ); cursors.reveal(true, RevealTarget.Primary, editorCommon.ScrollType.Smooth); } @@ -856,10 +850,7 @@ export namespace CoreNavigationCommands { cursors.setStates( args.source, CursorChangeReason.Explicit, - CursorState.ensureInEditableRange( - cursors.context, - this._exec(cursors.context, cursors.getAll()) - ) + this._exec(cursors.context, cursors.getAll()) ); cursors.reveal(true, RevealTarget.Primary, editorCommon.ScrollType.Smooth); } @@ -889,10 +880,7 @@ export namespace CoreNavigationCommands { cursors.setStates( args.source, CursorChangeReason.Explicit, - CursorState.ensureInEditableRange( - cursors.context, - CursorMoveCommands.moveToEndOfLine(cursors.context, cursors.getAll(), this._inSelectionMode) - ) + CursorMoveCommands.moveToEndOfLine(cursors.context, cursors.getAll(), this._inSelectionMode) ); cursors.reveal(true, RevealTarget.Primary, editorCommon.ScrollType.Smooth); } @@ -941,10 +929,7 @@ export namespace CoreNavigationCommands { cursors.setStates( args.source, CursorChangeReason.Explicit, - CursorState.ensureInEditableRange( - cursors.context, - this._exec(cursors.context, cursors.getAll()) - ) + this._exec(cursors.context, cursors.getAll()) ); cursors.reveal(true, RevealTarget.Primary, editorCommon.ScrollType.Smooth); } @@ -975,10 +960,7 @@ export namespace CoreNavigationCommands { cursors.setStates( args.source, CursorChangeReason.Explicit, - CursorState.ensureInEditableRange( - cursors.context, - CursorMoveCommands.moveToBeginningOfBuffer(cursors.context, cursors.getAll(), this._inSelectionMode) - ) + CursorMoveCommands.moveToBeginningOfBuffer(cursors.context, cursors.getAll(), this._inSelectionMode) ); cursors.reveal(true, RevealTarget.Primary, editorCommon.ScrollType.Smooth); } @@ -1022,10 +1004,7 @@ export namespace CoreNavigationCommands { cursors.setStates( args.source, CursorChangeReason.Explicit, - CursorState.ensureInEditableRange( - cursors.context, - CursorMoveCommands.moveToEndOfBuffer(cursors.context, cursors.getAll(), this._inSelectionMode) - ) + CursorMoveCommands.moveToEndOfBuffer(cursors.context, cursors.getAll(), this._inSelectionMode) ); cursors.reveal(true, RevealTarget.Primary, editorCommon.ScrollType.Smooth); } @@ -1272,7 +1251,7 @@ export namespace CoreNavigationCommands { public runCoreEditorCommand(cursors: ICursors, args: any): void { const context = cursors.context; - if (context.config.readOnly || context.model.hasEditableRange()) { + if (context.config.readOnly) { return; } @@ -1335,7 +1314,7 @@ export namespace CoreNavigationCommands { public runCoreEditorCommand(cursors: ICursors, args: any): void { const context = cursors.context; - if (context.config.readOnly || context.model.hasEditableRange()) { + if (context.config.readOnly) { return; } @@ -1383,10 +1362,7 @@ export namespace CoreNavigationCommands { cursors.setStates( args.source, CursorChangeReason.Explicit, - CursorState.ensureInEditableRange( - cursors.context, - CursorMoveCommands.expandLineSelection(cursors.context, cursors.getAll()) - ) + CursorMoveCommands.expandLineSelection(cursors.context, cursors.getAll()) ); cursors.reveal(true, RevealTarget.Primary, editorCommon.ScrollType.Smooth); } diff --git a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts index 096cb21474a..312129a2457 100644 --- a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts @@ -18,7 +18,6 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { private _lineHeight: number; private _renderLineHighlight: 'none' | 'gutter' | 'line' | 'all'; private _selectionIsEmpty: boolean; - private _primaryCursorIsInEditableRange: boolean; private _primaryCursorLineNumber: number; private _scrollWidth: number; private _contentWidth: number; @@ -30,7 +29,6 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { this._renderLineHighlight = this._context.configuration.editor.viewInfo.renderLineHighlight; this._selectionIsEmpty = true; - this._primaryCursorIsInEditableRange = true; this._primaryCursorLineNumber = 1; this._scrollWidth = 0; this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; @@ -61,11 +59,6 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { let hasChanged = false; - if (this._primaryCursorIsInEditableRange !== e.isInEditableRange) { - this._primaryCursorIsInEditableRange = e.isInEditableRange; - hasChanged = true; - } - const primaryCursorLineNumber = e.selections[0].positionLineNumber; if (this._primaryCursorLineNumber !== primaryCursorLineNumber) { this._primaryCursorLineNumber = primaryCursorLineNumber; @@ -127,14 +120,12 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { return ( (this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all') && this._selectionIsEmpty - && this._primaryCursorIsInEditableRange ); } private _willRenderMarginCurrentLine(): boolean { return ( (this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all') - && this._primaryCursorIsInEditableRange ); } } diff --git a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts index 23e482db0c1..cc3fd73eb6f 100644 --- a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts @@ -18,7 +18,6 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { private _lineHeight: number; private _renderLineHighlight: 'none' | 'gutter' | 'line' | 'all'; private _selectionIsEmpty: boolean; - private _primaryCursorIsInEditableRange: boolean; private _primaryCursorLineNumber: number; private _contentLeft: number; @@ -29,7 +28,6 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { this._renderLineHighlight = this._context.configuration.editor.viewInfo.renderLineHighlight; this._selectionIsEmpty = true; - this._primaryCursorIsInEditableRange = true; this._primaryCursorLineNumber = 1; this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; @@ -59,11 +57,6 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { let hasChanged = false; - if (this._primaryCursorIsInEditableRange !== e.isInEditableRange) { - this._primaryCursorIsInEditableRange = e.isInEditableRange; - hasChanged = true; - } - const primaryCursorLineNumber = e.selections[0].positionLineNumber; if (this._primaryCursorLineNumber !== primaryCursorLineNumber) { this._primaryCursorLineNumber = primaryCursorLineNumber; @@ -120,7 +113,6 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { private _shouldShowCurrentLine(): boolean { return ( (this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all') - && this._primaryCursorIsInEditableRange ); } @@ -128,7 +120,6 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { return ( (this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all') && this._selectionIsEmpty - && this._primaryCursorIsInEditableRange ); } } diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts index 5288f92d7ea..34582c5ddf7 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts @@ -48,7 +48,6 @@ export class ViewCursor { private _isVisible: boolean; private _position: Position; - private _isInEditableRange: boolean; private _lastRenderedContent: string; private _renderData: ViewCursorRenderData; @@ -77,7 +76,6 @@ export class ViewCursor { this._domNode.setDisplay('none'); this.updatePosition(new Position(1, 1)); - this._isInEditableRange = true; this._lastRenderedContent = ''; this._renderData = null; @@ -87,10 +85,6 @@ export class ViewCursor { return this._domNode; } - public getIsInEditableRange(): boolean { - return this._isInEditableRange; - } - public getPosition(): Position { return this._position; } @@ -123,9 +117,8 @@ export class ViewCursor { return true; } - public onCursorPositionChanged(position: Position, isInEditableRange: boolean): boolean { + public onCursorPositionChanged(position: Position): boolean { this.updatePosition(position); - this._isInEditableRange = isInEditableRange; return true; } diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts index 175a78f6464..c54b332a631 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts @@ -101,8 +101,8 @@ export class ViewCursors extends ViewPart { } return true; } - private _onCursorPositionChanged(position: Position, secondaryPositions: Position[], isInEditableRange: boolean): void { - this._primaryCursor.onCursorPositionChanged(position, isInEditableRange); + private _onCursorPositionChanged(position: Position, secondaryPositions: Position[]): void { + this._primaryCursor.onCursorPositionChanged(position); this._updateBlinking(); if (this._secondaryCursors.length < secondaryPositions.length) { @@ -123,7 +123,7 @@ export class ViewCursors extends ViewPart { } for (let i = 0; i < secondaryPositions.length; i++) { - this._secondaryCursors[i].onCursorPositionChanged(secondaryPositions[i], isInEditableRange); + this._secondaryCursors[i].onCursorPositionChanged(secondaryPositions[i]); } } @@ -132,7 +132,7 @@ export class ViewCursors extends ViewPart { for (let i = 0, len = e.selections.length; i < len; i++) { positions[i] = e.selections[i].getPosition(); } - this._onCursorPositionChanged(positions[0], positions.slice(1), e.isInEditableRange); + this._onCursorPositionChanged(positions[0], positions.slice(1)); const selectionIsEmpty = e.selections[0].isEmpty(); if (this._selectionIsEmpty !== selectionIsEmpty) { @@ -198,7 +198,7 @@ export class ViewCursors extends ViewPart { if (!this._editorHasFocus) { return TextEditorCursorBlinkingStyle.Hidden; } - if (this._readOnly || !this._primaryCursor.getIsInEditableRange()) { + if (this._readOnly) { return TextEditorCursorBlinkingStyle.Solid; } return this._cursorBlinking; diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index d238e11869a..cb1ea9e9abc 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -369,20 +369,11 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { return false; } - - let isInEditableRange: boolean = true; - if (this._model.hasEditableRange()) { - const editableRange = this._model.getEditableRange(); - if (!editableRange.containsPosition(newState.cursorState[0].modelState.position)) { - isInEditableRange = false; - } - } - const selections = this._cursors.getSelections(); const viewSelections = this._cursors.getViewSelections(); // Let the view get the event first. - this._emit([new viewEvents.ViewCursorStateChangedEvent(viewSelections, isInEditableRange)]); + this._emit([new viewEvents.ViewCursorStateChangedEvent(viewSelections)]); // Only after the view has been notified, let the rest of the world know... if (!oldState @@ -601,17 +592,6 @@ class CommandExecutor { const rawOperations = commandsData.operations; - const editableRange = ctx.model.getEditableRange(); - const editableRangeStart = editableRange.getStartPosition(); - const editableRangeEnd = editableRange.getEndPosition(); - for (let i = 0, len = rawOperations.length; i < len; i++) { - const operationRange = rawOperations[i].range; - if (!editableRangeStart.isBeforeOrEqual(operationRange.getStartPosition()) || !operationRange.getEndPosition().isBeforeOrEqual(editableRangeEnd)) { - // These commands are outside of the editable range - return null; - } - } - const loserCursorsMap = this._getLoserCursorMap(rawOperations); if (loserCursorsMap.hasOwnProperty('0')) { // These commands are very messed up diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index 65743dc7253..576b0020171 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -381,50 +381,6 @@ export class CursorState { return states; } - public static ensureInEditableRange(context: CursorContext, states: CursorState[]): CursorState[] { - const model = context.model; - if (!model.hasEditableRange()) { - return states; - } - - const modelEditableRange = model.getEditableRange(); - const viewEditableRange = context.convertModelRangeToViewRange(modelEditableRange); - - let result: CursorState[] = []; - for (let i = 0, len = states.length; i < len; i++) { - const state = states[i]; - - if (state.modelState) { - const newModelState = CursorState._ensureInEditableRange(state.modelState, modelEditableRange); - result[i] = newModelState ? CursorState.fromModelState(newModelState) : state; - } else { - const newViewState = CursorState._ensureInEditableRange(state.viewState, viewEditableRange); - result[i] = newViewState ? CursorState.fromViewState(newViewState) : state; - } - } - return result; - } - - private static _ensureInEditableRange(state: SingleCursorState, editableRange: Range): SingleCursorState { - const position = state.position; - - if (position.lineNumber < editableRange.startLineNumber || (position.lineNumber === editableRange.startLineNumber && position.column < editableRange.startColumn)) { - return new SingleCursorState( - state.selectionStart, state.selectionStartLeftoverVisibleColumns, - new Position(editableRange.startLineNumber, editableRange.startColumn), 0 - ); - } - - if (position.lineNumber > editableRange.endLineNumber || (position.lineNumber === editableRange.endLineNumber && position.column > editableRange.endColumn)) { - return new SingleCursorState( - state.selectionStart, state.selectionStartLeftoverVisibleColumns, - new Position(editableRange.endLineNumber, editableRange.endColumn), 0 - ); - } - - return null; - } - readonly modelState: SingleCursorState; readonly viewState: SingleCursorState; diff --git a/src/vs/editor/common/controller/cursorMoveCommands.ts b/src/vs/editor/common/controller/cursorMoveCommands.ts index c3320572991..a39ec7751a0 100644 --- a/src/vs/editor/common/controller/cursorMoveCommands.ts +++ b/src/vs/editor/common/controller/cursorMoveCommands.ts @@ -155,22 +155,6 @@ export class CursorMoveCommands { } public static selectAll(context: CursorContext, cursor: CursorState): CursorState { - - if (context.model.hasEditableRange()) { - // Toggle between selecting editable range and selecting the entire buffer - - const editableRange = context.model.getEditableRange(); - const selection = cursor.modelState.selection; - - if (!selection.equalsRange(editableRange)) { - // Selection is not editable range => select editable range - return CursorState.fromModelState(new SingleCursorState( - new Range(editableRange.startLineNumber, editableRange.startColumn, editableRange.startLineNumber, editableRange.startColumn), 0, - new Position(editableRange.endLineNumber, editableRange.endColumn), 0 - )); - } - } - const lineCount = context.model.getLineCount(); const maxColumn = context.model.getLineMaxColumn(lineCount); diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 4133daa1337..6a67ca9f218 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -1071,24 +1071,6 @@ export interface IEditableTextModel extends ITextModel { * @internal */ redo(): Selection[]; - - /** - * Set an editable range on the model. - * @internal - */ - setEditableRange(range: IRange): void; - - /** - * Check if the model has an editable range. - * @internal - */ - hasEditableRange(): boolean; - - /** - * Get the editable range on the model. - * @internal - */ - getEditableRange(): Range; } /** diff --git a/src/vs/editor/common/model/editableTextModel.ts b/src/vs/editor/common/model/editableTextModel.ts index f91f7844d95..f6b12e96990 100644 --- a/src/vs/editor/common/model/editableTextModel.ts +++ b/src/vs/editor/common/model/editableTextModel.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { Range, IRange } from 'vs/editor/common/core/range'; +import { Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { EditStack } from 'vs/editor/common/model/editStack'; import { ILineEdit, IModelLine } from 'vs/editor/common/model/modelLine'; -import { TextModelWithDecorations, ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import { TextModelWithDecorations } from 'vs/editor/common/model/textModelWithDecorations'; import * as strings from 'vs/base/common/strings'; import * as arrays from 'vs/base/common/arrays'; import { Selection } from 'vs/editor/common/core/selection'; @@ -39,10 +39,6 @@ export class EditableTextModel extends TextModelWithDecorations implements edito private _isUndoing: boolean; private _isRedoing: boolean; - // editable range - private _hasEditableRange: boolean; - private _editableRangeId: string; - private _trimAutoWhitespaceLines: number[]; constructor(rawTextSource: IRawTextSource, creationOptions: editorCommon.ITextModelCreationOptions, languageIdentifier: LanguageIdentifier) { @@ -53,8 +49,6 @@ export class EditableTextModel extends TextModelWithDecorations implements edito this._isUndoing = false; this._isRedoing = false; - this._hasEditableRange = false; - this._editableRangeId = null; this._trimAutoWhitespaceLines = null; } @@ -68,8 +62,6 @@ export class EditableTextModel extends TextModelWithDecorations implements edito // Destroy my edit history and settings this._commandManager = new EditStack(this); - this._hasEditableRange = false; - this._editableRangeId = null; this._trimAutoWhitespaceLines = null; } @@ -325,16 +317,6 @@ export class EditableTextModel extends TextModelWithDecorations implements edito operations = this._reduceOperations(operations); } - let editableRange = this.getEditableRange(); - let editableRangeStart = editableRange.getStartPosition(); - let editableRangeEnd = editableRange.getEndPosition(); - for (let i = 0; i < operations.length; i++) { - let operationRange = operations[i].range; - if (!editableRangeStart.isBeforeOrEqual(operationRange.getStartPosition()) || !operationRange.getEndPosition().isBeforeOrEqual(editableRangeEnd)) { - throw new Error('Editing outside of editable range not allowed!'); - } - } - // Delta encode operations let reverseRanges = EditableTextModel._getInverseEditRanges(operations); let reverseOperations: editorCommon.IIdentifiedSingleEditOperation[] = []; @@ -704,42 +686,4 @@ export class EditableTextModel extends TextModelWithDecorations implements edito this._eventEmitter.endDeferredEmit(); } } - - public setEditableRange(range: IRange): void { - this._commandManager.clear(); - - if (!this._hasEditableRange && !range) { - // Nothing to do - return; - } - - this.changeDecorations((changeAccessor) => { - if (this._hasEditableRange) { - changeAccessor.removeDecoration(this._editableRangeId); - this._editableRangeId = null; - this._hasEditableRange = false; - } - - if (range) { - this._hasEditableRange = true; - this._editableRangeId = changeAccessor.addDecoration(range, EditableTextModel._DECORATION_OPTION); - } - }); - } - - private static readonly _DECORATION_OPTION = ModelDecorationOptions.register({ - stickiness: editorCommon.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges - }); - - public hasEditableRange(): boolean { - return this._hasEditableRange; - } - - public getEditableRange(): Range { - if (this._hasEditableRange) { - return this.getDecorationRange(this._editableRangeId); - } else { - return this.getFullModelRange(); - } - } } diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index 46244956a30..c850e4249e9 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -70,14 +70,9 @@ export class ViewCursorStateChangedEvent { * The primary selection is always at index 0. */ public readonly selections: Selection[]; - /** - * Is the primary cursor in the editable range? - */ - public readonly isInEditableRange: boolean; - constructor(selections: Selection[], isInEditableRange: boolean) { + constructor(selections: Selection[]) { this.selections = selections; - this.isInEditableRange = isInEditableRange; } } diff --git a/src/vs/editor/contrib/find/findModel.ts b/src/vs/editor/contrib/find/findModel.ts index 22012b05cb7..c84eb165267 100644 --- a/src/vs/editor/contrib/find/findModel.ts +++ b/src/vs/editor/contrib/find/findModel.ts @@ -147,14 +147,8 @@ export class FindModelBoundToEditorModel { } } - private static _getSearchRange(model: editorCommon.IModel, searchOnlyEditableRange: boolean, findScope: Range): Range { - let searchRange: Range; - - if (searchOnlyEditableRange) { - searchRange = model.getEditableRange(); - } else { - searchRange = model.getFullModelRange(); - } + private static _getSearchRange(model: editorCommon.IModel, findScope: Range): Range { + let searchRange = model.getFullModelRange(); // If we have set now or before a find scope, use it for computing the search range if (findScope) { @@ -226,7 +220,7 @@ export class FindModelBoundToEditorModel { } let findScope = this._decorations.getFindScope(); - let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), this._state.isReplaceRevealed, findScope); + let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), findScope); // ...(----)...|... if (searchRange.getEndPosition().isBefore(before)) { @@ -297,7 +291,7 @@ export class FindModelBoundToEditorModel { } let findScope = this._decorations.getFindScope(); - let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), this._state.isReplaceRevealed, findScope); + let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), findScope); // ...(----)...|... if (searchRange.getEndPosition().isBefore(after)) { @@ -389,7 +383,7 @@ export class FindModelBoundToEditorModel { } private _findMatches(findScope: Range, captureMatches: boolean, limitResultCount: number): editorCommon.FindMatch[] { - let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), this._state.isReplaceRevealed, findScope); + let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), findScope); return this._editor.getModel().findMatches(this._state.searchString, searchRange, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, captureMatches, limitResultCount); } diff --git a/src/vs/editor/contrib/find/test/findModel.test.ts b/src/vs/editor/contrib/find/test/findModel.test.ts index 31c3f449e11..41c52e122cb 100644 --- a/src/vs/editor/contrib/find/test/findModel.test.ts +++ b/src/vs/editor/contrib/find/test/findModel.test.ts @@ -1475,46 +1475,6 @@ suite('FindModel', () => { findState.dispose(); }); - findTest('finds only in editable range if replace is shown', (editor, cursor) => { - editor.getModel().setEditableRange({ - startLineNumber: 6, - startColumn: 1, - endLineNumber: 8, - endColumn: 1 - }); - - let findState = new FindReplaceState(); - findState.change({ searchString: 'hello', replaceString: 'hi', wholeWord: true }, false); - let findModel = new FindModelBoundToEditorModel(editor, findState); - - assertFindState( - editor, - [1, 1, 1, 1], - null, - [ - [6, 14, 6, 19], - [6, 27, 6, 32], - [7, 14, 7, 19], - [8, 14, 8, 19] - ] - ); - - findState.change({ isReplaceRevealed: true }, false); - assertFindState( - editor, - [1, 1, 1, 1], - null, - [ - [6, 14, 6, 19], - [6, 27, 6, 32], - [7, 14, 7, 19] - ] - ); - - findModel.dispose(); - findState.dispose(); - }); - findTest('listens to model content changes', (editor, cursor) => { let findState = new FindReplaceState(); findState.change({ searchString: 'hello', replaceString: 'hi', wholeWord: true }, false); diff --git a/src/vs/editor/contrib/multicursor/multicursor.ts b/src/vs/editor/contrib/multicursor/multicursor.ts index 2366fbb8968..1ac5268c802 100644 --- a/src/vs/editor/contrib/multicursor/multicursor.ts +++ b/src/vs/editor/contrib/multicursor/multicursor.ts @@ -15,7 +15,7 @@ import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { CursorChangeReason, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { CursorMoveCommands } from 'vs/editor/common/controller/cursorMoveCommands'; -import { CursorState, RevealTarget } from 'vs/editor/common/controller/cursorCommon'; +import { RevealTarget } from 'vs/editor/common/controller/cursorCommon'; import { Constants } from 'vs/editor/common/core/uint'; import { DocumentHighlightProviderRegistry } from 'vs/editor/common/modes'; import { CommonFindController } from 'vs/editor/contrib/find/findController'; @@ -55,10 +55,7 @@ export class InsertCursorAbove extends EditorAction { cursors.setStates( args.source, CursorChangeReason.Explicit, - CursorState.ensureInEditableRange( - context, - CursorMoveCommands.addCursorUp(context, cursors.getAll()) - ) + CursorMoveCommands.addCursorUp(context, cursors.getAll()) ); cursors.reveal(true, RevealTarget.TopMost, ScrollType.Smooth); } @@ -94,10 +91,7 @@ export class InsertCursorBelow extends EditorAction { cursors.setStates( args.source, CursorChangeReason.Explicit, - CursorState.ensureInEditableRange( - context, - CursorMoveCommands.addCursorDown(context, cursors.getAll()) - ) + CursorMoveCommands.addCursorDown(context, cursors.getAll()) ); cursors.reveal(true, RevealTarget.BottomMost, ScrollType.Smooth); } diff --git a/src/vs/editor/contrib/suggest/suggestModel.ts b/src/vs/editor/contrib/suggest/suggestModel.ts index 6e3f371d09f..b4f8c0978a2 100644 --- a/src/vs/editor/contrib/suggest/suggestModel.ts +++ b/src/vs/editor/contrib/suggest/suggestModel.ts @@ -59,18 +59,6 @@ export class LineContext { return true; } - static isInEditableRange(editor: ICodeEditor): boolean { - const model = editor.getModel(); - const position = editor.getPosition(); - if (model.hasEditableRange()) { - const editableRange = model.getEditableRange(); - if (!editableRange.containsPosition(position)) { - return false; - } - } - return true; - } - readonly lineNumber: number; readonly column: number; readonly leadingLineContent: string; @@ -352,10 +340,6 @@ export class SuggestModel implements IDisposable { const auto = context.auto; const ctx = new LineContext(model, this._editor.getPosition(), auto); - if (!LineContext.isInEditableRange(this._editor)) { - return; - } - // Cancel previous requests, change state & update UI this.cancel(retrigger); this._state = auto ? State.Auto : State.Manual; From d0fef122982a05785dbd56fe0f810564496a2ff9 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 12 Dec 2017 16:31:14 +0100 Subject: [PATCH 141/615] fix not reachable code --- src/vs/workbench/services/progress/browser/progressService2.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/progress/browser/progressService2.ts b/src/vs/workbench/services/progress/browser/progressService2.ts index 250beeea43a..3f2a157ef17 100644 --- a/src/vs/workbench/services/progress/browser/progressService2.ts +++ b/src/vs/workbench/services/progress/browser/progressService2.ts @@ -149,7 +149,7 @@ export class ProgressService2 implements IProgressService2 { if (viewletProgress) { viewletProgress.showWhile(TPromise.wrap(promise)); } - return promise; + // show activity bar let activityProgress: IDisposable; let delayHandle = setTimeout(() => { @@ -183,6 +183,7 @@ export class ProgressService2 implements IProgressService2 { }; promise.then(onDone, onDone); + return promise; } } From 16874c1878ac6321813a14b1d5196b4d9d582c80 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 12 Dec 2017 16:15:27 +0100 Subject: [PATCH 142/615] debt - remove before/afterLoadWorkbenchMain, those are already perf-entries --- src/vs/base/common/performance.d.ts | 4 +++- src/vs/base/common/performance.js | 19 +++++++++++++++++-- .../electron-browser/bootstrap/index.js | 6 ++---- .../services/timer/common/timerService.ts | 3 --- .../services/timer/node/timerService.ts | 12 +++--------- 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/vs/base/common/performance.d.ts b/src/vs/base/common/performance.d.ts index 804f290b7f2..4258c8d76af 100644 --- a/src/vs/base/common/performance.d.ts +++ b/src/vs/base/common/performance.d.ts @@ -11,7 +11,8 @@ export interface PerformanceEntry { } export function mark(name: string): void; -export function measure(name: string, from?: string, to?: string): void; + +export function measure(name: string, from?: string, to?: string): PerformanceEntry; /** * Time something, shorthant for `mark` and `measure` @@ -23,6 +24,7 @@ export function time(name: string): { stop(): void }; */ export function getEntries(type: 'mark' | 'measure'): PerformanceEntry[]; +export function getEntry(type: 'mark' | 'measure', name: string): PerformanceEntry; type ExportData = any[]; export function importEntries(data: ExportData): void; diff --git a/src/vs/base/common/performance.js b/src/vs/base/common/performance.js index c4cd3c7a544..8cfcb4794bd 100644 --- a/src/vs/base/common/performance.js +++ b/src/vs/base/common/performance.js @@ -34,11 +34,11 @@ define([], function () { return global._performanceEntries.splice(0); } - function getEntries(type) { + function getEntries(type, name) { const result = []; const entries = global._performanceEntries; for (let i = 0; i < entries.length; i += 4) { - if (entries[i] === type) { + if (entries[i] === type && (name === void 0 || entries[i + 1] === name)) { result.push({ type: entries[i], name: entries[i + 1], @@ -53,6 +53,20 @@ define([], function () { }); } + function getEntry(type, name) { + const entries = global._performanceEntries; + for (let i = 0; i < entries.length; i += 4) { + if (entries[i] === type && entries[i + 1] === name) { + return { + type: entries[i], + name: entries[i + 1], + startTime: entries[i + 2], + duration: entries[i + 3], + }; + } + } + } + function mark(name) { global._performanceEntries.push('mark', name, _now(), 0); if (typeof console.timeStamp === 'function') { @@ -103,6 +117,7 @@ define([], function () { measure: measure, time: time, getEntries: getEntries, + getEntry: getEntry, importEntries: importEntries, exportEntries: exportEntries }; diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index 4fcb345a224..4ba96f7418f 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -171,13 +171,12 @@ function main() { } // Perf Counters - const timers = window.MonacoEnvironment.timers = { + window.MonacoEnvironment.timers = { isInitialStartup: !!configuration.isInitialStartup, hasAccessibilitySupport: !!configuration.accessibilitySupport, start: configuration.perfStartTime, appReady: configuration.perfAppReady, - windowLoad: configuration.perfWindowLoadTime, - beforeLoadWorkbenchMain: Date.now() + windowLoad: configuration.perfWindowLoadTime }; const workbenchMainClock = perf.time('loadWorkbenchMain'); @@ -187,7 +186,6 @@ function main() { 'vs/css!vs/workbench/workbench.main' ], function () { workbenchMainClock.stop(); - timers.afterLoadWorkbenchMain = Date.now(); process.lazyEnv.then(function () { perf.mark('main/startup'); diff --git a/src/vs/workbench/services/timer/common/timerService.ts b/src/vs/workbench/services/timer/common/timerService.ts index fb523a04dc4..e3d4887ddbd 100644 --- a/src/vs/workbench/services/timer/common/timerService.ts +++ b/src/vs/workbench/services/timer/common/timerService.ts @@ -88,9 +88,6 @@ export interface IInitData { windowLoad: number; - beforeLoadWorkbenchMain: number; - afterLoadWorkbenchMain: number; - isInitialStartup: boolean; hasAccessibilitySupport: boolean; } diff --git a/src/vs/workbench/services/timer/node/timerService.ts b/src/vs/workbench/services/timer/node/timerService.ts index 2aafef25729..4e3817cd0b6 100644 --- a/src/vs/workbench/services/timer/node/timerService.ts +++ b/src/vs/workbench/services/timer/node/timerService.ts @@ -6,7 +6,7 @@ import { ITimerService, IStartupMetrics, IInitData, IMemoryInfo } from 'vs/workbench/services/timer/common/timerService'; import { virtualMachineHint } from 'vs/base/node/id'; - +import * as perf from 'vs/base/common/performance'; import * as os from 'os'; export class TimerService implements ITimerService { @@ -17,9 +17,6 @@ export class TimerService implements ITimerService { public readonly appReady: number; public readonly windowLoad: number; - public readonly beforeLoadWorkbenchMain: number; - public readonly afterLoadWorkbenchMain: number; - public readonly isInitialStartup: boolean; public readonly hasAccessibilitySupport: boolean; @@ -43,9 +40,6 @@ export class TimerService implements ITimerService { this.appReady = initData.appReady; this.windowLoad = initData.windowLoad; - this.beforeLoadWorkbenchMain = initData.beforeLoadWorkbenchMain; - this.afterLoadWorkbenchMain = initData.afterLoadWorkbenchMain; - this.isInitialStartup = initData.isInitialStartup; this.hasAccessibilitySupport = initData.hasAccessibilitySupport; } @@ -97,11 +91,11 @@ export class TimerService implements ITimerService { timers: { ellapsedExtensions: this.afterExtensionLoad - this.beforeExtensionLoad, ellapsedExtensionsReady: this.afterExtensionLoad - start, - ellapsedRequire: this.afterLoadWorkbenchMain - this.beforeLoadWorkbenchMain, + ellapsedRequire: perf.getEntry('measure', 'loadWorkbenchMain').duration, ellapsedViewletRestore: this.restoreViewletDuration, ellapsedEditorRestore: this.restoreEditorsDuration, ellapsedWorkbench: this.workbenchStarted - this.beforeWorkbenchOpen, - ellapsedWindowLoadToRequire: this.beforeLoadWorkbenchMain - this.windowLoad, + ellapsedWindowLoadToRequire: perf.getEntry('mark', 'loadWorkbenchMain/start').startTime - this.windowLoad, ellapsedTimersToTimersComputed: Date.now() - now }, platform, From a44cbeec93ba141c416228a73350f6925f0a7930 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 12 Dec 2017 16:41:26 +0100 Subject: [PATCH 143/615] debt - more timer migration --- src/vs/base/common/performance.d.ts | 2 ++ src/vs/base/common/performance.js | 20 +++++++++++++++++++ .../electron-browser/bootstrap/index.js | 4 ++-- src/vs/workbench/electron-browser/shell.ts | 2 -- .../workbench/electron-browser/workbench.ts | 20 +++++-------------- .../services/timer/common/timerService.ts | 3 --- .../services/timer/node/timerService.ts | 12 ++++------- 7 files changed, 33 insertions(+), 30 deletions(-) diff --git a/src/vs/base/common/performance.d.ts b/src/vs/base/common/performance.d.ts index 4258c8d76af..e8fdbf4ef12 100644 --- a/src/vs/base/common/performance.d.ts +++ b/src/vs/base/common/performance.d.ts @@ -26,6 +26,8 @@ export function getEntries(type: 'mark' | 'measure'): PerformanceEntry[]; export function getEntry(type: 'mark' | 'measure', name: string): PerformanceEntry; +export function getDuration(from: string, to: string): number; + type ExportData = any[]; export function importEntries(data: ExportData): void; export function exportEntries(): ExportData; diff --git a/src/vs/base/common/performance.js b/src/vs/base/common/performance.js index 8cfcb4794bd..2bea079a8e2 100644 --- a/src/vs/base/common/performance.js +++ b/src/vs/base/common/performance.js @@ -67,6 +67,25 @@ define([], function () { } } + function getDuration(from, to) { + const entries = global._performanceEntries; + let name = from; + let startTime = 0; + for (let i = 0; i < entries.length; i += 4) { + if (entries[i + 1] === name) { + if (name === from) { + // found `from` (start of interval) + name = to; + startTime = entries[i + 2]; + } else { + // from `to` (end of interval) + return entries[i + 2] - startTime; + } + } + } + return 0; + } + function mark(name) { global._performanceEntries.push('mark', name, _now(), 0); if (typeof console.timeStamp === 'function') { @@ -118,6 +137,7 @@ define([], function () { time: time, getEntries: getEntries, getEntry: getEntry, + getDuration: getDuration, importEntries: importEntries, exportEntries: exportEntries }; diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index 4ba96f7418f..9357afcaeab 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -179,13 +179,13 @@ function main() { windowLoad: configuration.perfWindowLoadTime }; - const workbenchMainClock = perf.time('loadWorkbenchMain'); + perf.mark('willLoadWorkbenchMain'); require([ 'vs/workbench/workbench.main', 'vs/nls!vs/workbench/workbench.main', 'vs/css!vs/workbench/workbench.main' ], function () { - workbenchMainClock.stop(); + perf.mark('didLoadWorkbenchMain'); process.lazyEnv.then(function () { perf.mark('main/startup'); diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index ef000919213..27e140a7245 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -252,8 +252,6 @@ export class WorkbenchShell { // Telemetry: startup metrics this.timerService.workbenchStarted = Date.now(); - this.timerService.restoreEditorsDuration = info.restoreEditorsDuration; - this.timerService.restoreViewletDuration = info.restoreViewletDuration; this.extensionService.whenInstalledExtensionsRegistered().done(() => { /* __GDPR__ "startupTime" : { diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index be4fdf87384..b6215272493 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -15,8 +15,7 @@ import DOM = require('vs/base/browser/dom'); import { Builder, $ } from 'vs/base/browser/builder'; import { Delayer, RunOnceScheduler } from 'vs/base/common/async'; import * as browser from 'vs/base/browser/browser'; -import { StopWatch } from 'vs/base/common/stopwatch'; -import { time } from 'vs/base/common/performance'; +import * as perf from 'vs/base/common/performance'; import errors = require('vs/base/common/errors'); import { BackupFileService } from 'vs/workbench/services/backup/node/backupFileService'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; @@ -120,8 +119,6 @@ interface IZenModeSettings { export interface IWorkbenchStartedInfo { customKeybindingsCount: number; - restoreViewletDuration: number; - restoreEditorsDuration: number; pinnedViewlets: string[]; restoredViewlet: string; restoredEditors: string[]; @@ -319,8 +316,7 @@ export class Workbench implements IPartService { const restorePromises: TPromise[] = []; // Restore Editors - const editorRestoreStopWatch = StopWatch.create(); - const editorRestoreClock = time('restore:editors'); + perf.mark('willRestoreEditors'); const restoredEditors: string[] = []; restorePromises.push(this.resolveEditorsToOpen().then(inputs => { @@ -337,8 +333,7 @@ export class Workbench implements IPartService { return editorOpenPromise.then(editors => { this.handleEditorBackground(); // make sure we show the proper background in the editor area - editorRestoreClock.stop(); - editorRestoreStopWatch.stop(); + perf.mark('didRestoreEditors'); for (const editor of editors) { if (editor) { @@ -353,7 +348,6 @@ export class Workbench implements IPartService { })); // Restore Sidebar - let viewletRestoreStopWatch: StopWatch; let viewletIdToRestore: string; if (!this.sideBarHidden) { this.sideBarVisibleContext.set(true); @@ -366,11 +360,9 @@ export class Workbench implements IPartService { viewletIdToRestore = this.viewletService.getDefaultViewletId(); } - viewletRestoreStopWatch = StopWatch.create(); - const viewletRestoreClock = time('restore:viewlet'); + perf.mark('willRestoreViewlet'); restorePromises.push(this.viewletService.openViewlet(viewletIdToRestore).then(() => { - viewletRestoreStopWatch.stop(); - viewletRestoreClock.stop(); + perf.mark('didRestoreViewlet'); })); } @@ -395,8 +387,6 @@ export class Workbench implements IPartService { return { customKeybindingsCount: this.keybindingService.customKeybindingsCount(), - restoreViewletDuration: viewletRestoreStopWatch ? Math.round(viewletRestoreStopWatch.elapsed()) : 0, - restoreEditorsDuration: Math.round(editorRestoreStopWatch.elapsed()), pinnedViewlets: this.activitybarPart.getPinned(), restoredViewlet: viewletIdToRestore, restoredEditors diff --git a/src/vs/workbench/services/timer/common/timerService.ts b/src/vs/workbench/services/timer/common/timerService.ts index e3d4887ddbd..e4dfd46bbd9 100644 --- a/src/vs/workbench/services/timer/common/timerService.ts +++ b/src/vs/workbench/services/timer/common/timerService.ts @@ -104,8 +104,5 @@ export interface ITimerService extends IInitData { beforeExtensionLoad: number; afterExtensionLoad: number; - restoreViewletDuration: number; - restoreEditorsDuration: number; - readonly startupMetrics: IStartupMetrics; } diff --git a/src/vs/workbench/services/timer/node/timerService.ts b/src/vs/workbench/services/timer/node/timerService.ts index 4e3817cd0b6..9f30c82928b 100644 --- a/src/vs/workbench/services/timer/node/timerService.ts +++ b/src/vs/workbench/services/timer/node/timerService.ts @@ -29,10 +29,6 @@ export class TimerService implements ITimerService { public beforeExtensionLoad: number; public afterExtensionLoad: number; - public restoreViewletDuration: number; - public restoreEditorsDuration: number; - - private _startupMetrics: IStartupMetrics; constructor(initData: IInitData, private isEmptyWorkbench: boolean) { @@ -91,11 +87,11 @@ export class TimerService implements ITimerService { timers: { ellapsedExtensions: this.afterExtensionLoad - this.beforeExtensionLoad, ellapsedExtensionsReady: this.afterExtensionLoad - start, - ellapsedRequire: perf.getEntry('measure', 'loadWorkbenchMain').duration, - ellapsedViewletRestore: this.restoreViewletDuration, - ellapsedEditorRestore: this.restoreEditorsDuration, + ellapsedRequire: perf.getDuration('willLoadWorkbenchMain', 'didLoadWorkbenchMain'), + ellapsedEditorRestore: perf.getDuration('willRestoreEditors', 'didRestoreEditors'), + ellapsedViewletRestore: perf.getDuration('willRestoreViewlet', 'didRestoreViewlet'), ellapsedWorkbench: this.workbenchStarted - this.beforeWorkbenchOpen, - ellapsedWindowLoadToRequire: perf.getEntry('mark', 'loadWorkbenchMain/start').startTime - this.windowLoad, + ellapsedWindowLoadToRequire: perf.getEntry('mark', 'willLoadWorkbenchMain').startTime - this.windowLoad, ellapsedTimersToTimersComputed: Date.now() - now }, platform, From c64f16d339e23309a0539b79cb7520f656b76cef Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 12 Dec 2017 16:48:47 +0100 Subject: [PATCH 144/615] Inline OverviewRulerImpl (#38418) --- .../viewParts/overviewRuler/overviewRuler.ts | 188 +++++++++++-- .../overviewRuler/overviewRulerImpl.ts | 250 ------------------ 2 files changed, 167 insertions(+), 271 deletions(-) delete mode 100644 src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts index bb2b4ee58ce..d5f1311d3b1 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts @@ -6,37 +6,56 @@ import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { IOverviewRuler } from 'vs/editor/browser/editorBrowser'; -import { OverviewRulerImpl } from 'vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; -import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; +import { OverviewRulerZone, OverviewZoneManager, ColorZone } from 'vs/editor/common/view/overviewZoneManager'; +import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; +import { Color } from 'vs/base/common/color'; +import { LIGHT } from 'vs/platform/theme/common/themeService'; +import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { private _context: ViewContext; - private _overviewRuler: OverviewRulerImpl; + private _canvasLeftOffset: number; + private _domNode: FastDomNode; + private _lanesCount: number; + private _zoneManager: OverviewZoneManager; + private _background: Color; constructor(context: ViewContext, cssClassName: string, minimumHeight: number, maximumHeight: number) { super(); this._context = context; - this._overviewRuler = new OverviewRulerImpl( - 0, - cssClassName, - this._context.viewLayout.getScrollHeight(), - this._context.configuration.editor.lineHeight, - this._context.configuration.editor.pixelRatio, - minimumHeight, - maximumHeight, - (lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber) - ); + + this._canvasLeftOffset = 0; + + this._domNode = createFastDomNode(document.createElement('canvas')); + this._domNode.setClassName(cssClassName); + this._domNode.setPosition('absolute'); + this._domNode.setLayerHinting(true); + + this._lanesCount = 3; + + this._background = null; + + this._zoneManager = new OverviewZoneManager((lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber)); + this._zoneManager.setMinimumHeight(minimumHeight); + this._zoneManager.setMaximumHeight(maximumHeight); + this._zoneManager.setThemeType(LIGHT); + this._zoneManager.setDOMWidth(0); + this._zoneManager.setDOMHeight(0); + this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()); + this._zoneManager.setLineHeight(this._context.configuration.editor.lineHeight); + + this._zoneManager.setPixelRatio(this._context.configuration.editor.pixelRatio); this._context.addEventHandler(this); } public dispose(): void { this._context.removeEventHandler(this); - this._overviewRuler.dispose(); + this._zoneManager = null; super.dispose(); } @@ -44,11 +63,17 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { if (e.lineHeight) { - this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight, true); + this._zoneManager.setLineHeight(this._context.configuration.editor.lineHeight); + this.render(true); } if (e.pixelRatio) { - this._overviewRuler.setPixelRatio(this._context.configuration.editor.pixelRatio, true); + this._zoneManager.setPixelRatio(this._context.configuration.editor.pixelRatio); + this._domNode.setWidth(this._zoneManager.getDOMWidth()); + this._domNode.setHeight(this._zoneManager.getDOMHeight()); + this._domNode.domNode.width = this._zoneManager.getCanvasWidth(); + this._domNode.domNode.height = this._zoneManager.getCanvasHeight(); + this.render(true); } return true; @@ -59,7 +84,8 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { - this._overviewRuler.setScrollHeight(e.scrollHeight, true); + this._zoneManager.setOuterHeight(e.scrollHeight); + this.render(true); return super.onScrollChanged(e) || e.scrollHeightChanged; } @@ -70,14 +96,134 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { // ---- end view event handlers public getDomNode(): HTMLElement { - return this._overviewRuler.getDomNode(); + return this._domNode.domNode; } public setLayout(position: OverviewRulerPosition): void { - this._overviewRuler.setLayout(position, true); + this._domNode.setTop(position.top); + this._domNode.setRight(position.right); + + let hasChanged = false; + hasChanged = this._zoneManager.setDOMWidth(position.width) || hasChanged; + hasChanged = this._zoneManager.setDOMHeight(position.height) || hasChanged; + + if (hasChanged) { + this._domNode.setWidth(this._zoneManager.getDOMWidth()); + this._domNode.setHeight(this._zoneManager.getDOMHeight()); + this._domNode.domNode.width = this._zoneManager.getCanvasWidth(); + this._domNode.domNode.height = this._zoneManager.getCanvasHeight(); + + this.render(true); + } } public setZones(zones: OverviewRulerZone[]): void { - this._overviewRuler.setZones(zones, true); + this._zoneManager.setZones(zones); + this.render(false); } -} \ No newline at end of file + + public render(forceRender: boolean): boolean { + if (this._zoneManager.getOuterHeight() === 0) { + return false; + } + + const width = this._zoneManager.getCanvasWidth(); + const height = this._zoneManager.getCanvasHeight(); + + let colorZones = this._zoneManager.resolveColorZones(); + let id2Color = this._zoneManager.getId2Color(); + + let ctx = this._domNode.domNode.getContext('2d'); + if (this._background === null) { + ctx.clearRect(0, 0, width, height); + } else { + ctx.fillStyle = Color.Format.CSS.formatHex(this._background); + ctx.fillRect(0, 0, width, height); + } + + if (colorZones.length > 0) { + let remainingWidth = width - this._canvasLeftOffset; + + if (this._lanesCount >= 3) { + this._renderThreeLanes(ctx, colorZones, id2Color, remainingWidth); + } else if (this._lanesCount === 2) { + this._renderTwoLanes(ctx, colorZones, id2Color, remainingWidth); + } else if (this._lanesCount === 1) { + this._renderOneLane(ctx, colorZones, id2Color, remainingWidth); + } + } + + return true; + } + + + private _renderOneLane(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], w: number): void { + + this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Left | OverviewRulerLane.Center | OverviewRulerLane.Right, this._canvasLeftOffset, w); + + } + + private _renderTwoLanes(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], w: number): void { + + let leftWidth = Math.floor(w / 2); + let rightWidth = w - leftWidth; + let leftOffset = this._canvasLeftOffset; + let rightOffset = this._canvasLeftOffset + leftWidth; + + this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Left | OverviewRulerLane.Center, leftOffset, leftWidth); + this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Right, rightOffset, rightWidth); + } + + private _renderThreeLanes(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], w: number): void { + + let leftWidth = Math.floor(w / 3); + let rightWidth = Math.floor(w / 3); + let centerWidth = w - leftWidth - rightWidth; + let leftOffset = this._canvasLeftOffset; + let centerOffset = this._canvasLeftOffset + leftWidth; + let rightOffset = this._canvasLeftOffset + leftWidth + centerWidth; + + this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Left, leftOffset, leftWidth); + this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Center, centerOffset, centerWidth); + this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Right, rightOffset, rightWidth); + } + + private _renderVerticalPatch(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], laneMask: number, xpos: number, width: number): void { + + let currentColorId = 0; + let currentFrom = 0; + let currentTo = 0; + + for (let i = 0, len = colorZones.length; i < len; i++) { + let zone = colorZones[i]; + + if (!(zone.position & laneMask)) { + continue; + } + + let zoneColorId = zone.colorId; + let zoneFrom = zone.from; + let zoneTo = zone.to; + + if (zoneColorId !== currentColorId) { + ctx.fillRect(xpos, currentFrom, width, currentTo - currentFrom); + + currentColorId = zoneColorId; + ctx.fillStyle = id2Color[currentColorId]; + currentFrom = zoneFrom; + currentTo = zoneTo; + } else { + if (currentTo >= zoneFrom) { + currentTo = Math.max(currentTo, zoneTo); + } else { + ctx.fillRect(xpos, currentFrom, width, currentTo - currentFrom); + currentFrom = zoneFrom; + currentTo = zoneTo; + } + } + } + + ctx.fillRect(xpos, currentFrom, width, currentTo - currentFrom); + + } +} diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts deleted file mode 100644 index eec8530ef03..00000000000 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts +++ /dev/null @@ -1,250 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; -import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; -import { OverviewZoneManager, ColorZone, OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; -import { Color } from 'vs/base/common/color'; -import { OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; -import { ThemeType, LIGHT } from 'vs/platform/theme/common/themeService'; - -export class OverviewRulerImpl { - - private _canvasLeftOffset: number; - private _domNode: FastDomNode; - private _lanesCount: number; - private _zoneManager: OverviewZoneManager; - private _background: Color; - - constructor( - canvasLeftOffset: number, cssClassName: string, scrollHeight: number, lineHeight: number, - pixelRatio: number, minimumHeight: number, maximumHeight: number, - getVerticalOffsetForLine: (lineNumber: number) => number - ) { - this._canvasLeftOffset = canvasLeftOffset; - - this._domNode = createFastDomNode(document.createElement('canvas')); - - this._domNode.setClassName(cssClassName); - this._domNode.setPosition('absolute'); - this._domNode.setLayerHinting(true); - - this._lanesCount = 3; - - this._background = null; - - this._zoneManager = new OverviewZoneManager(getVerticalOffsetForLine); - this._zoneManager.setMinimumHeight(minimumHeight); - this._zoneManager.setMaximumHeight(maximumHeight); - this._zoneManager.setThemeType(LIGHT); - this._zoneManager.setDOMWidth(0); - this._zoneManager.setDOMHeight(0); - this._zoneManager.setOuterHeight(scrollHeight); - this._zoneManager.setLineHeight(lineHeight); - - this._zoneManager.setPixelRatio(pixelRatio); - } - - public dispose(): void { - this._zoneManager = null; - } - - public setLayout(position: OverviewRulerPosition, render: boolean): void { - this._domNode.setTop(position.top); - this._domNode.setRight(position.right); - - let hasChanged = false; - hasChanged = this._zoneManager.setDOMWidth(position.width) || hasChanged; - hasChanged = this._zoneManager.setDOMHeight(position.height) || hasChanged; - - if (hasChanged) { - this._domNode.setWidth(this._zoneManager.getDOMWidth()); - this._domNode.setHeight(this._zoneManager.getDOMHeight()); - this._domNode.domNode.width = this._zoneManager.getCanvasWidth(); - this._domNode.domNode.height = this._zoneManager.getCanvasHeight(); - - if (render) { - this.render(true); - } - } - } - - public getLanesCount(): number { - return this._lanesCount; - } - - public setLanesCount(newLanesCount: number, render: boolean): void { - this._lanesCount = newLanesCount; - - if (render) { - this.render(true); - } - } - - public setThemeType(themeType: ThemeType, render: boolean): void { - this._zoneManager.setThemeType(themeType); - - if (render) { - this.render(true); - } - } - - public setUseBackground(background: Color, render: boolean): void { - this._background = background; - - if (render) { - this.render(true); - } - } - - public getDomNode(): HTMLCanvasElement { - return this._domNode.domNode; - } - - public getPixelWidth(): number { - return this._zoneManager.getCanvasWidth(); - } - - public getPixelHeight(): number { - return this._zoneManager.getCanvasHeight(); - } - - public setScrollHeight(scrollHeight: number, render: boolean): void { - this._zoneManager.setOuterHeight(scrollHeight); - if (render) { - this.render(true); - } - } - - public setLineHeight(lineHeight: number, render: boolean): void { - this._zoneManager.setLineHeight(lineHeight); - if (render) { - this.render(true); - } - } - - public setPixelRatio(pixelRatio: number, render: boolean): void { - this._zoneManager.setPixelRatio(pixelRatio); - this._domNode.setWidth(this._zoneManager.getDOMWidth()); - this._domNode.setHeight(this._zoneManager.getDOMHeight()); - this._domNode.domNode.width = this._zoneManager.getCanvasWidth(); - this._domNode.domNode.height = this._zoneManager.getCanvasHeight(); - if (render) { - this.render(true); - } - } - - public setZones(zones: OverviewRulerZone[], render: boolean): void { - this._zoneManager.setZones(zones); - if (render) { - this.render(false); - } - } - - public render(forceRender: boolean): boolean { - if (this._zoneManager.getOuterHeight() === 0) { - return false; - } - - const width = this._zoneManager.getCanvasWidth(); - const height = this._zoneManager.getCanvasHeight(); - - let colorZones = this._zoneManager.resolveColorZones(); - let id2Color = this._zoneManager.getId2Color(); - - let ctx = this._domNode.domNode.getContext('2d'); - if (this._background === null) { - ctx.clearRect(0, 0, width, height); - } else { - ctx.fillStyle = Color.Format.CSS.formatHex(this._background); - ctx.fillRect(0, 0, width, height); - } - - if (colorZones.length > 0) { - let remainingWidth = width - this._canvasLeftOffset; - - if (this._lanesCount >= 3) { - this._renderThreeLanes(ctx, colorZones, id2Color, remainingWidth); - } else if (this._lanesCount === 2) { - this._renderTwoLanes(ctx, colorZones, id2Color, remainingWidth); - } else if (this._lanesCount === 1) { - this._renderOneLane(ctx, colorZones, id2Color, remainingWidth); - } - } - - return true; - } - - private _renderOneLane(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], w: number): void { - - this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Left | OverviewRulerLane.Center | OverviewRulerLane.Right, this._canvasLeftOffset, w); - - } - - private _renderTwoLanes(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], w: number): void { - - let leftWidth = Math.floor(w / 2); - let rightWidth = w - leftWidth; - let leftOffset = this._canvasLeftOffset; - let rightOffset = this._canvasLeftOffset + leftWidth; - - this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Left | OverviewRulerLane.Center, leftOffset, leftWidth); - this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Right, rightOffset, rightWidth); - } - - private _renderThreeLanes(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], w: number): void { - - let leftWidth = Math.floor(w / 3); - let rightWidth = Math.floor(w / 3); - let centerWidth = w - leftWidth - rightWidth; - let leftOffset = this._canvasLeftOffset; - let centerOffset = this._canvasLeftOffset + leftWidth; - let rightOffset = this._canvasLeftOffset + leftWidth + centerWidth; - - this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Left, leftOffset, leftWidth); - this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Center, centerOffset, centerWidth); - this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Right, rightOffset, rightWidth); - } - - private _renderVerticalPatch(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], laneMask: number, xpos: number, width: number): void { - - let currentColorId = 0; - let currentFrom = 0; - let currentTo = 0; - - for (let i = 0, len = colorZones.length; i < len; i++) { - let zone = colorZones[i]; - - if (!(zone.position & laneMask)) { - continue; - } - - let zoneColorId = zone.colorId; - let zoneFrom = zone.from; - let zoneTo = zone.to; - - if (zoneColorId !== currentColorId) { - ctx.fillRect(xpos, currentFrom, width, currentTo - currentFrom); - - currentColorId = zoneColorId; - ctx.fillStyle = id2Color[currentColorId]; - currentFrom = zoneFrom; - currentTo = zoneTo; - } else { - if (currentTo >= zoneFrom) { - currentTo = Math.max(currentTo, zoneTo); - } else { - ctx.fillRect(xpos, currentFrom, width, currentTo - currentFrom); - currentFrom = zoneFrom; - currentTo = zoneTo; - } - } - } - - ctx.fillRect(xpos, currentFrom, width, currentTo - currentFrom); - - } -} From 108327ba567efc08e7fc8e92d308b36b4f8f45b5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 12 Dec 2017 16:47:10 +0100 Subject: [PATCH 145/615] debt - more timer service debt --- src/vs/workbench/electron-browser/main.ts | 3 --- src/vs/workbench/electron-browser/shell.ts | 5 +++-- src/vs/workbench/services/timer/common/timerService.ts | 6 ------ src/vs/workbench/services/timer/node/timerService.ts | 10 ++-------- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index ed776746567..5483c618544 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -85,10 +85,7 @@ function openWorkbench(configuration: IWindowConfiguration): TPromise { const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, workspaceService.getWorkbenchState() === WorkbenchState.EMPTY); const storageService = createStorageService(workspaceService, environmentService); - timerService.beforeDOMContentLoaded = Date.now(); - return domContentLoaded().then(() => { - timerService.afterDOMContentLoaded = Date.now(); // Open Shell timerService.beforeWorkbenchOpen = Date.now(); diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 27e140a7245..43bc6e4d476 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -8,6 +8,7 @@ import 'vs/css!./media/shell'; import * as platform from 'vs/base/common/platform'; +import * as perf from 'vs/base/common/performance'; import { Dimension, Builder, $ } from 'vs/base/browser/builder'; import dom = require('vs/base/browser/dom'); import aria = require('vs/base/browser/ui/aria/aria'); @@ -352,9 +353,9 @@ export class WorkbenchShell { this.extensionService = instantiationService.createInstance(ExtensionService); serviceCollection.set(IExtensionService, this.extensionService); - this.timerService.beforeExtensionLoad = Date.now(); + perf.mark('willLoadExtensions'); this.extensionService.whenInstalledExtensionsRegistered().done(() => { - this.timerService.afterExtensionLoad = Date.now(); + perf.mark('didLoadExtensions'); }); this.themeService = instantiationService.createInstance(WorkbenchThemeService, document.body); diff --git a/src/vs/workbench/services/timer/common/timerService.ts b/src/vs/workbench/services/timer/common/timerService.ts index e4dfd46bbd9..e618522c18a 100644 --- a/src/vs/workbench/services/timer/common/timerService.ts +++ b/src/vs/workbench/services/timer/common/timerService.ts @@ -95,14 +95,8 @@ export interface IInitData { export interface ITimerService extends IInitData { _serviceBrand: any; - beforeDOMContentLoaded: number; - afterDOMContentLoaded: number; - beforeWorkbenchOpen: number; workbenchStarted: number; - beforeExtensionLoad: number; - afterExtensionLoad: number; - readonly startupMetrics: IStartupMetrics; } diff --git a/src/vs/workbench/services/timer/node/timerService.ts b/src/vs/workbench/services/timer/node/timerService.ts index 9f30c82928b..7609345de3b 100644 --- a/src/vs/workbench/services/timer/node/timerService.ts +++ b/src/vs/workbench/services/timer/node/timerService.ts @@ -20,15 +20,9 @@ export class TimerService implements ITimerService { public readonly isInitialStartup: boolean; public readonly hasAccessibilitySupport: boolean; - public beforeDOMContentLoaded: number; - public afterDOMContentLoaded: number; - public beforeWorkbenchOpen: number; public workbenchStarted: number; - public beforeExtensionLoad: number; - public afterExtensionLoad: number; - private _startupMetrics: IStartupMetrics; constructor(initData: IInitData, private isEmptyWorkbench: boolean) { @@ -85,8 +79,8 @@ export class TimerService implements ITimerService { version: 1, ellapsed: this.workbenchStarted - start, timers: { - ellapsedExtensions: this.afterExtensionLoad - this.beforeExtensionLoad, - ellapsedExtensionsReady: this.afterExtensionLoad - start, + ellapsedExtensions: perf.getDuration('willLoadExtensions', 'didLoadExtensions'), + ellapsedExtensionsReady: perf.getEntry('mark', 'didLoadExtensions').startTime - start, ellapsedRequire: perf.getDuration('willLoadWorkbenchMain', 'didLoadWorkbenchMain'), ellapsedEditorRestore: perf.getDuration('willRestoreEditors', 'didRestoreEditors'), ellapsedViewletRestore: perf.getDuration('willRestoreViewlet', 'didRestoreViewlet'), From b650ab8b4fa835eecb5a9348ad5e7e8d1d777308 Mon Sep 17 00:00:00 2001 From: Manzur Khan Sarguru Date: Tue, 12 Dec 2017 21:41:32 +0530 Subject: [PATCH 146/615] Update extHostTypes.ts --- src/vs/workbench/api/node/extHostTypes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index b0cc9b02062..eb0028b0b74 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -91,10 +91,10 @@ export class Position { constructor(line: number, character: number) { if (line < 0) { - throw illegalArgument('line must be positive'); + throw illegalArgument('line must be non-negative'); } if (character < 0) { - throw illegalArgument('character must be positive'); + throw illegalArgument('character must be non-negative'); } this._line = line; this._character = character; From 0d8a59bbc4b5e1bd9e3f3d6c2b4893b0e586095a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 12 Dec 2017 17:13:03 +0100 Subject: [PATCH 147/615] Fix #37084 --- .../browser/parts/views/viewsViewlet.ts | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/browser/parts/views/viewsViewlet.ts b/src/vs/workbench/browser/parts/views/viewsViewlet.ts index 0238302847f..7bc93ba609f 100644 --- a/src/vs/workbench/browser/parts/views/viewsViewlet.ts +++ b/src/vs/workbench/browser/parts/views/viewsViewlet.ts @@ -580,16 +580,22 @@ export class ViewsViewlet extends PanelViewlet { if (this.length > 1) { return false; } - // Check in cache so that view do not jump. See #29609 - if (ViewLocation.getContributedViewLocation(this.location.id) && !this.areExtensionsReady) { + + if (ViewLocation.getContributedViewLocation(this.location.id)) { let visibleViewsCount = 0; - this.viewsStates.forEach((viewState, id) => { - if (!viewState.isHidden) { - visibleViewsCount++; - } - }); + if (this.areExtensionsReady) { + visibleViewsCount = this.getViewDescriptorsFromRegistry().reduce((visibleViewsCount, v) => visibleViewsCount + (this.canBeVisible(v) ? 1 : 0), 0); + } else { + // Check in cache so that view do not jump. See #29609 + this.viewsStates.forEach((viewState, id) => { + if (!viewState.isHidden) { + visibleViewsCount++; + } + }); + } return visibleViewsCount === 1; } + return super.isSingleView(); } From a58e51c10c097d1965479db41624cb8444344654 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 12 Dec 2017 08:32:59 -0800 Subject: [PATCH 148/615] Dynamically import xterm.js This should save 30-40ms on start up Part of #30685 --- .../electron-browser/terminalInstance.ts | 210 +++++++++--------- .../electron-browser/terminalInstance.test.ts | 3 +- 2 files changed, 112 insertions(+), 101 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index f5886a2d038..9a550a732f0 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -39,10 +39,7 @@ import { PANEL_BACKGROUND } from 'vs/workbench/common/theme'; /** The amount of time to consider terminal errors to be related to the launch */ const LAUNCHING_DURATION = 500; -// Enable search functionality in xterm.js instance -XTermTerminal.loadAddon('search'); -// Enable the winpty compatibility addon which will simulate wraparound mode -XTermTerminal.loadAddon('winptyCompat'); +let Terminal: typeof XTermTerminal; enum ProcessState { // The process has not been initialized yet. @@ -97,6 +94,7 @@ export class TerminalInstance implements ITerminalInstance { private _initialCwd: string; private _windowsShellHelper: WindowsShellHelper; private _onLineDataListeners: ((lineData: string) => void)[]; + private _xtermReadyPromise: TPromise; private _widgetManager: TerminalWidgetManager; private _linkHandler: TerminalLinkHandler; @@ -150,7 +148,6 @@ export class TerminalInstance implements ITerminalInstance { this._initDimensions(); this._createProcess(); - this._createXterm(); if (platform.isWindows) { this._processReady.then(() => { @@ -160,10 +157,13 @@ export class TerminalInstance implements ITerminalInstance { }); } - // Only attach xterm.js to the DOM if the terminal panel has been opened before. - if (_container) { - this.attachToElement(_container); - } + this._xtermReadyPromise = this._createXterm(); + this._xtermReadyPromise.then(() => { + // Only attach xterm.js to the DOM if the terminal panel has been opened before. + if (_container) { + this.attachToElement(_container); + } + }); } public addDisposable(disposable: lifecycle.IDisposable): void { @@ -248,9 +248,17 @@ export class TerminalInstance implements ITerminalInstance { /** * Create xterm.js instance and attach data listeners. */ - protected _createXterm(): void { + protected async _createXterm(): TPromise { + if (!Terminal) { + console.log('load xterm now'); + Terminal = (await import('xterm')).Terminal; + // Enable search functionality in xterm.js instance + Terminal.loadAddon('search'); + // Enable the winpty compatibility addon which will simulate wraparound mode + Terminal.loadAddon('winptyCompat'); + } const font = this._configHelper.getFont(true); - this._xterm = new XTermTerminal({ + this._xterm = new Terminal({ scrollback: this._configHelper.config.scrollback, theme: this._getXtermTheme(), fontFamily: font.fontFamily, @@ -284,100 +292,102 @@ export class TerminalInstance implements ITerminalInstance { } public attachToElement(container: HTMLElement): void { - if (this._wrapperElement) { - throw new Error('The terminal instance has already been attached to a container'); - } - - this._container = container; - this._wrapperElement = document.createElement('div'); - dom.addClass(this._wrapperElement, 'terminal-wrapper'); - this._xtermElement = document.createElement('div'); - - // Attach the xterm object to the DOM, exposing it to the smoke tests - (this._wrapperElement).xterm = this._xterm; - - this._xterm.open(this._xtermElement); - this._xterm.attachCustomKeyEventHandler((event: KeyboardEvent) => { - // Disable all input if the terminal is exiting - if (this._isExiting) { - return false; + this._xtermReadyPromise.then(() => { + if (this._wrapperElement) { + throw new Error('The terminal instance has already been attached to a container'); } - // Skip processing by xterm.js of keyboard events that resolve to commands described - // within commandsToSkipShell - const standardKeyboardEvent = new StandardKeyboardEvent(event); - const resolveResult = this._keybindingService.softDispatch(standardKeyboardEvent, standardKeyboardEvent.target); - if (resolveResult && this._skipTerminalCommands.some(k => k === resolveResult.commandId)) { - event.preventDefault(); - return false; - } + this._container = container; + this._wrapperElement = document.createElement('div'); + dom.addClass(this._wrapperElement, 'terminal-wrapper'); + this._xtermElement = document.createElement('div'); - // If tab focus mode is on, tab is not passed to the terminal - if (TabFocus.getTabFocusMode() && event.keyCode === 9) { - return false; - } + // Attach the xterm object to the DOM, exposing it to the smoke tests + (this._wrapperElement).xterm = this._xterm; - return undefined; + this._xterm.open(this._xtermElement); + this._xterm.attachCustomKeyEventHandler((event: KeyboardEvent) => { + // Disable all input if the terminal is exiting + if (this._isExiting) { + return false; + } + + // Skip processing by xterm.js of keyboard events that resolve to commands described + // within commandsToSkipShell + const standardKeyboardEvent = new StandardKeyboardEvent(event); + const resolveResult = this._keybindingService.softDispatch(standardKeyboardEvent, standardKeyboardEvent.target); + if (resolveResult && this._skipTerminalCommands.some(k => k === resolveResult.commandId)) { + event.preventDefault(); + return false; + } + + // If tab focus mode is on, tab is not passed to the terminal + if (TabFocus.getTabFocusMode() && event.keyCode === 9) { + return false; + } + + return undefined; + }); + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'mouseup', (event: KeyboardEvent) => { + // Wait until mouseup has propagated through the DOM before + // evaluating the new selection state. + setTimeout(() => this._refreshSelectionContextKey(), 0); + })); + + // xterm.js currently drops selection on keyup as we need to handle this case. + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'keyup', (event: KeyboardEvent) => { + // Wait until keyup has propagated through the DOM before evaluating + // the new selection state. + setTimeout(() => this._refreshSelectionContextKey(), 0); + })); + + const xtermHelper: HTMLElement = this._xterm.element.querySelector('.xterm-helpers'); + const focusTrap: HTMLElement = document.createElement('div'); + focusTrap.setAttribute('tabindex', '0'); + dom.addClass(focusTrap, 'focus-trap'); + this._instanceDisposables.push(dom.addDisposableListener(focusTrap, 'focus', (event: FocusEvent) => { + let currentElement = focusTrap; + while (!dom.hasClass(currentElement, 'part')) { + currentElement = currentElement.parentElement; + } + const hidePanelElement = currentElement.querySelector('.hide-panel-action'); + hidePanelElement.focus(); + })); + xtermHelper.insertBefore(focusTrap, this._xterm.textarea); + + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'focus', (event: KeyboardEvent) => { + this._terminalFocusContextKey.set(true); + })); + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'blur', (event: KeyboardEvent) => { + this._terminalFocusContextKey.reset(); + this._refreshSelectionContextKey(); + })); + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'focus', (event: KeyboardEvent) => { + this._terminalFocusContextKey.set(true); + })); + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'blur', (event: KeyboardEvent) => { + this._terminalFocusContextKey.reset(); + this._refreshSelectionContextKey(); + })); + + this._wrapperElement.appendChild(this._xtermElement); + this._widgetManager = new TerminalWidgetManager(this._wrapperElement); + this._linkHandler.setWidgetManager(this._widgetManager); + this._container.appendChild(this._wrapperElement); + + const computedStyle = window.getComputedStyle(this._container); + const width = parseInt(computedStyle.getPropertyValue('width').replace('px', ''), 10); + const height = parseInt(computedStyle.getPropertyValue('height').replace('px', ''), 10); + this.layout(new Dimension(width, height)); + this.setVisible(this._isVisible); + this.updateConfig(); + + // If IShellLaunchConfig.waitOnExit was true and the process finished before the terminal + // panel was initialized. + if (this._xterm.getOption('disableStdin')) { + this._attachPressAnyKeyToCloseListener(); + } }); - this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'mouseup', (event: KeyboardEvent) => { - // Wait until mouseup has propagated through the DOM before - // evaluating the new selection state. - setTimeout(() => this._refreshSelectionContextKey(), 0); - })); - - // xterm.js currently drops selection on keyup as we need to handle this case. - this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'keyup', (event: KeyboardEvent) => { - // Wait until keyup has propagated through the DOM before evaluating - // the new selection state. - setTimeout(() => this._refreshSelectionContextKey(), 0); - })); - - const xtermHelper: HTMLElement = this._xterm.element.querySelector('.xterm-helpers'); - const focusTrap: HTMLElement = document.createElement('div'); - focusTrap.setAttribute('tabindex', '0'); - dom.addClass(focusTrap, 'focus-trap'); - this._instanceDisposables.push(dom.addDisposableListener(focusTrap, 'focus', (event: FocusEvent) => { - let currentElement = focusTrap; - while (!dom.hasClass(currentElement, 'part')) { - currentElement = currentElement.parentElement; - } - const hidePanelElement = currentElement.querySelector('.hide-panel-action'); - hidePanelElement.focus(); - })); - xtermHelper.insertBefore(focusTrap, this._xterm.textarea); - - this._instanceDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'focus', (event: KeyboardEvent) => { - this._terminalFocusContextKey.set(true); - })); - this._instanceDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'blur', (event: KeyboardEvent) => { - this._terminalFocusContextKey.reset(); - this._refreshSelectionContextKey(); - })); - this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'focus', (event: KeyboardEvent) => { - this._terminalFocusContextKey.set(true); - })); - this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'blur', (event: KeyboardEvent) => { - this._terminalFocusContextKey.reset(); - this._refreshSelectionContextKey(); - })); - - this._wrapperElement.appendChild(this._xtermElement); - this._widgetManager = new TerminalWidgetManager(this._wrapperElement); - this._linkHandler.setWidgetManager(this._widgetManager); - this._container.appendChild(this._wrapperElement); - - const computedStyle = window.getComputedStyle(this._container); - const width = parseInt(computedStyle.getPropertyValue('width').replace('px', ''), 10); - const height = parseInt(computedStyle.getPropertyValue('height').replace('px', ''), 10); - this.layout(new Dimension(width, height)); - this.setVisible(this._isVisible); - this.updateConfig(); - - // If IShellLaunchConfig.waitOnExit was true and the process finished before the terminal - // panel was initialized. - if (this._xterm.getOption('disableStdin')) { - this._attachPressAnyKeyToCloseListener(); - } } public registerLinkMatcher(regex: RegExp, handler: (url: string) => void, matchIndex?: number, validationCallback?: (uri: string, callback: (isValid: boolean) => void) => void): number { diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalInstance.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalInstance.test.ts index 608a9e5f8bc..a7f066b25bd 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalInstance.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalInstance.test.ts @@ -20,6 +20,7 @@ import { MockContextKeyService, MockKeybindingService } from 'vs/platform/keybin import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; +import { TPromise } from 'vs/base/common/winjs.base'; class TestTerminalInstance extends TerminalInstance { public _getCwd(shell: IShellLaunchConfig, root: Uri): string { @@ -27,7 +28,7 @@ class TestTerminalInstance extends TerminalInstance { } protected _createProcess(): void { } - protected _createXterm(): void { } + protected _createXterm(): TPromise { return TPromise.as(void 0); } } suite('Workbench - TerminalInstance', () => { From 801e0cadbf16ca7aaa9cd99ff6d54069fc0e2872 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 12 Dec 2017 17:01:07 +0100 Subject: [PATCH 149/615] Simplify OverviewRulerZone (#38418) --- .../editor/browser/widget/diffEditorWidget.ts | 16 ---------- .../editor/common/view/overviewZoneManager.ts | 29 +++++++++--------- .../common/view/overviewZoneManager.test.ts | 30 +++++++++---------- 3 files changed, 29 insertions(+), 46 deletions(-) diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 34bfc9c3f15..4aaa31c2ef3 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -1619,10 +1619,6 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd result.overviewZones.push(new OverviewRulerZone( lineChange.originalStartLineNumber, lineChange.originalEndLineNumber, - editorCommon.OverviewRulerLane.Full, - 0, - color, - color, color )); @@ -1683,10 +1679,6 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd result.overviewZones.push(new OverviewRulerZone( lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber, - editorCommon.OverviewRulerLane.Full, - 0, - color, - color, color )); @@ -1802,10 +1794,6 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor result.overviewZones.push(new OverviewRulerZone( lineChange.originalStartLineNumber, lineChange.originalEndLineNumber, - editorCommon.OverviewRulerLane.Full, - 0, - color, - color, color )); } @@ -1837,10 +1825,6 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor result.overviewZones.push(new OverviewRulerZone( lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber, - editorCommon.OverviewRulerLane.Full, - 0, - color, - color, color )); diff --git a/src/vs/editor/common/view/overviewZoneManager.ts b/src/vs/editor/common/view/overviewZoneManager.ts index 8bbf6e5e685..d95080db3bc 100644 --- a/src/vs/editor/common/view/overviewZoneManager.ts +++ b/src/vs/editor/common/view/overviewZoneManager.ts @@ -29,30 +29,29 @@ export class ColorZone { export class OverviewRulerZone { _overviewRulerZoneBrand: void; - startLineNumber: number; - endLineNumber: number; - position: OverviewRulerLane; - forceHeight: number; + public readonly startLineNumber: number; + public readonly endLineNumber: number; + public readonly position: OverviewRulerLane; + public readonly forceHeight: number; - private _color: string; - private _darkColor: string; - private _hcColor: string; + private readonly _color: string; + private readonly _darkColor: string; + private readonly _hcColor: string; private _colorZones: ColorZone[]; constructor( - startLineNumber: number, endLineNumber: number, - position: OverviewRulerLane, - forceHeight: number, - color: string, darkColor: string, hcColor: string + startLineNumber: number, + endLineNumber: number, + color: string ) { this.startLineNumber = startLineNumber; this.endLineNumber = endLineNumber; - this.position = position; - this.forceHeight = forceHeight; + this.position = OverviewRulerLane.Full; + this.forceHeight = 0; this._color = color; - this._darkColor = darkColor; - this._hcColor = hcColor; + this._darkColor = color; + this._hcColor = color; this._colorZones = null; } diff --git a/src/vs/editor/test/common/view/overviewZoneManager.test.ts b/src/vs/editor/test/common/view/overviewZoneManager.test.ts index 1cfc1a4a2b1..39928e19adf 100644 --- a/src/vs/editor/test/common/view/overviewZoneManager.test.ts +++ b/src/vs/editor/test/common/view/overviewZoneManager.test.ts @@ -25,15 +25,15 @@ suite('Editor View - OverviewZoneManager', () => { manager.setPixelRatio(1); manager.setZones([ - new OverviewRulerZone(1, 1, OverviewRulerLane.Full, 10, '1', '1', '1'), - new OverviewRulerZone(10, 10, OverviewRulerLane.Full, 0, '2', '2', '2'), - new OverviewRulerZone(30, 31, OverviewRulerLane.Full, 0, '3', '3', '3'), - new OverviewRulerZone(50, 50, OverviewRulerLane.Full, 0, '4', '4', '4'), + new OverviewRulerZone(1, 1, '1'), + new OverviewRulerZone(10, 10, '2'), + new OverviewRulerZone(30, 31, '3'), + new OverviewRulerZone(50, 50, '4'), ]); // one line = 12, but cap is at 6 assert.deepEqual(manager.resolveColorZones(), [ - new ColorZone(12, 22, 1, OverviewRulerLane.Full), // forced height of 10 + new ColorZone(15, 21, 1, OverviewRulerLane.Full), // new ColorZone(123, 129, 2, OverviewRulerLane.Full), // 120 -> 132 new ColorZone(363, 369, 3, OverviewRulerLane.Full), // 360 -> 372 [360 -> 384] new ColorZone(375, 381, 3, OverviewRulerLane.Full), // 372 -> 384 [360 -> 384] @@ -55,15 +55,15 @@ suite('Editor View - OverviewZoneManager', () => { manager.setPixelRatio(1); manager.setZones([ - new OverviewRulerZone(1, 1, OverviewRulerLane.Full, 10, '1', '1', '1'), - new OverviewRulerZone(10, 10, OverviewRulerLane.Full, 0, '2', '2', '2'), - new OverviewRulerZone(30, 31, OverviewRulerLane.Full, 0, '3', '3', '3'), - new OverviewRulerZone(50, 50, OverviewRulerLane.Full, 0, '4', '4', '4'), + new OverviewRulerZone(1, 1, '1'), + new OverviewRulerZone(10, 10, '2'), + new OverviewRulerZone(30, 31, '3'), + new OverviewRulerZone(50, 50, '4'), ]); // one line = 6, cap is at 6 assert.deepEqual(manager.resolveColorZones(), [ - new ColorZone(6, 16, 1, OverviewRulerLane.Full), // forced height of 10 + new ColorZone(6, 12, 1, OverviewRulerLane.Full), // new ColorZone(60, 66, 2, OverviewRulerLane.Full), // 60 -> 66 new ColorZone(180, 192, 3, OverviewRulerLane.Full), // 180 -> 192 new ColorZone(294, 300, 4, OverviewRulerLane.Full), // 294 -> 300 @@ -84,15 +84,15 @@ suite('Editor View - OverviewZoneManager', () => { manager.setPixelRatio(2); manager.setZones([ - new OverviewRulerZone(1, 1, OverviewRulerLane.Full, 10, '1', '1', '1'), - new OverviewRulerZone(10, 10, OverviewRulerLane.Full, 0, '2', '2', '2'), - new OverviewRulerZone(30, 31, OverviewRulerLane.Full, 0, '3', '3', '3'), - new OverviewRulerZone(50, 50, OverviewRulerLane.Full, 0, '4', '4', '4'), + new OverviewRulerZone(1, 1, '1'), + new OverviewRulerZone(10, 10, '2'), + new OverviewRulerZone(30, 31, '3'), + new OverviewRulerZone(50, 50, '4'), ]); // one line = 6, cap is at 12 assert.deepEqual(manager.resolveColorZones(), [ - new ColorZone(12, 32, 1, OverviewRulerLane.Full), // forced height of 10 => forced height of 20 + new ColorZone(12, 24, 1, OverviewRulerLane.Full), // new ColorZone(120, 132, 2, OverviewRulerLane.Full), // 120 -> 132 new ColorZone(360, 384, 3, OverviewRulerLane.Full), // 360 -> 384 new ColorZone(588, 600, 4, OverviewRulerLane.Full), // 588 -> 600 From 80281fde7510c06e1bff7449b049429b884a63a6 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 12 Dec 2017 17:53:28 +0100 Subject: [PATCH 150/615] Simplifications in OverviewZoneManager (#38418) --- src/vs/editor/browser/view/viewImpl.ts | 4 +- .../viewParts/overviewRuler/overviewRuler.ts | 6 +- .../editor/browser/widget/codeEditorWidget.ts | 4 +- .../editor/browser/widget/diffEditorWidget.ts | 4 +- .../editor/common/view/overviewZoneManager.ts | 199 ++++-------------- .../common/view/overviewZoneManager.test.ts | 36 ++-- 6 files changed, 65 insertions(+), 188 deletions(-) diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 08c9c688aed..f67e5b4e7cc 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -472,8 +472,8 @@ export class View extends ViewEventHandler { return this.outgoingEvents; } - public createOverviewRuler(cssClassName: string, minimumHeight: number, maximumHeight: number): OverviewRuler { - return new OverviewRuler(this._context, cssClassName, minimumHeight, maximumHeight); + public createOverviewRuler(cssClassName: string): OverviewRuler { + return new OverviewRuler(this._context, cssClassName); } public change(callback: (changeAccessor: editorBrowser.IViewZoneChangeAccessor) => any): boolean { diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts index d5f1311d3b1..ea5e1ba7cfb 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts @@ -12,7 +12,6 @@ import { OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; import { OverviewRulerZone, OverviewZoneManager, ColorZone } from 'vs/editor/common/view/overviewZoneManager'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { Color } from 'vs/base/common/color'; -import { LIGHT } from 'vs/platform/theme/common/themeService'; import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { @@ -24,7 +23,7 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { private _zoneManager: OverviewZoneManager; private _background: Color; - constructor(context: ViewContext, cssClassName: string, minimumHeight: number, maximumHeight: number) { + constructor(context: ViewContext, cssClassName: string) { super(); this._context = context; @@ -40,9 +39,6 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { this._background = null; this._zoneManager = new OverviewZoneManager((lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber)); - this._zoneManager.setMinimumHeight(minimumHeight); - this._zoneManager.setMaximumHeight(maximumHeight); - this._zoneManager.setThemeType(LIGHT); this._zoneManager.setDOMWidth(0); this._zoneManager.setDOMHeight(0); this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()); diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 34eb4d6e194..52c8dd723d2 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -157,8 +157,8 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito super.dispose(); } - public createOverviewRuler(cssClassName: string, minimumHeight: number, maximumHeight: number): editorBrowser.IOverviewRuler { - return this._view.createOverviewRuler(cssClassName, minimumHeight, maximumHeight); + public createOverviewRuler(cssClassName: string): editorBrowser.IOverviewRuler { + return this._view.createOverviewRuler(cssClassName); } public getDomNode(): HTMLElement { diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 4aaa31c2ef3..2b2a0ab662d 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -361,14 +361,14 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()); this._originalOverviewRuler.dispose(); } - this._originalOverviewRuler = this.originalEditor.createOverviewRuler('original diffOverviewRuler', 4, Number.MAX_VALUE); + this._originalOverviewRuler = this.originalEditor.createOverviewRuler('original diffOverviewRuler'); this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode()); if (this._modifiedOverviewRuler) { this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()); this._modifiedOverviewRuler.dispose(); } - this._modifiedOverviewRuler = this.modifiedEditor.createOverviewRuler('modified diffOverviewRuler', 4, Number.MAX_VALUE); + this._modifiedOverviewRuler = this.modifiedEditor.createOverviewRuler('modified diffOverviewRuler'); this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode()); this._layoutOverviewRulers(); diff --git a/src/vs/editor/common/view/overviewZoneManager.ts b/src/vs/editor/common/view/overviewZoneManager.ts index d95080db3bc..6d200c3c7f5 100644 --- a/src/vs/editor/common/view/overviewZoneManager.ts +++ b/src/vs/editor/common/view/overviewZoneManager.ts @@ -5,7 +5,11 @@ 'use strict'; import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; -import { ThemeType, DARK, HIGH_CONTRAST, LIGHT } from 'vs/platform/theme/common/themeService'; +import { ThemeType } from 'vs/platform/theme/common/themeService'; + +const enum Constants { + MINIMUM_HEIGHT = 4 +} export class ColorZone { _colorZoneBrand: void; @@ -15,11 +19,11 @@ export class ColorZone { colorId: number; position: OverviewRulerLane; - constructor(from: number, to: number, colorId: number, position: OverviewRulerLane) { + constructor(from: number, to: number, colorId: number) { this.from = from | 0; this.to = to | 0; this.colorId = colorId | 0; - this.position = position | 0; + this.position = OverviewRulerLane.Full; } } @@ -31,14 +35,9 @@ export class OverviewRulerZone { public readonly startLineNumber: number; public readonly endLineNumber: number; - public readonly position: OverviewRulerLane; - public readonly forceHeight: number; + public readonly color: string; - private readonly _color: string; - private readonly _darkColor: string; - private readonly _hcColor: string; - - private _colorZones: ColorZone[]; + private _colorZone: ColorZone; constructor( startLineNumber: number, @@ -47,55 +46,33 @@ export class OverviewRulerZone { ) { this.startLineNumber = startLineNumber; this.endLineNumber = endLineNumber; - this.position = OverviewRulerLane.Full; - this.forceHeight = 0; - this._color = color; - this._darkColor = color; - this._hcColor = color; - this._colorZones = null; + this.color = color; + this._colorZone = null; } public getColor(themeType: ThemeType): string { - switch (themeType) { - case HIGH_CONTRAST: - return this._hcColor; - case DARK: - return this._darkColor; - } - return this._color; + return this.color; } public compareTo(other: OverviewRulerZone): number { if (this.startLineNumber === other.startLineNumber) { if (this.endLineNumber === other.endLineNumber) { - if (this.forceHeight === other.forceHeight) { - if (this.position === other.position) { - if (this._darkColor === other._darkColor) { - if (this._color === other._color) { - if (this._hcColor === other._hcColor) { - return 0; - } - return this._hcColor < other._hcColor ? -1 : 1; - } - return this._color < other._color ? -1 : 1; - } - return this._darkColor < other._darkColor ? -1 : 1; - } - return this.position - other.position; + if (this.color === other.color) { + return 0; } - return this.forceHeight - other.forceHeight; + return this.color < other.color ? -1 : 1; } return this.endLineNumber - other.endLineNumber; } return this.startLineNumber - other.startLineNumber; } - public setColorZones(colorZones: ColorZone[]): void { - this._colorZones = colorZones; + public setColorZone(colorZone: ColorZone): void { + this._colorZone = colorZone; } - public getColorZones(): ColorZone[] { - return this._colorZones; + public getColorZones(): ColorZone { + return this._colorZone; } } @@ -108,9 +85,6 @@ export class OverviewZoneManager { private _domWidth: number; private _domHeight: number; private _outerHeight: number; - private _maximumHeight: number; - private _minimumHeight: number; - private _themeType: ThemeType; private _pixelRatio: number; private _lastAssignedId: number; @@ -125,9 +99,6 @@ export class OverviewZoneManager { this._domWidth = 0; this._domHeight = 0; this._outerHeight = 0; - this._maximumHeight = 0; - this._minimumHeight = 0; - this._themeType = LIGHT; this._pixelRatio = 1; this._lastAssignedId = 0; @@ -236,97 +207,53 @@ export class OverviewZoneManager { return true; } - public setMaximumHeight(maximumHeight: number): boolean { - if (this._maximumHeight === maximumHeight) { - return false; - } - this._maximumHeight = maximumHeight; - this._colorZonesInvalid = true; - return true; - } - - public setMinimumHeight(minimumHeight: number): boolean { - if (this._minimumHeight === minimumHeight) { - return false; - } - this._minimumHeight = minimumHeight; - this._colorZonesInvalid = true; - return true; - } - - public setThemeType(themeType: ThemeType): boolean { - if (this._themeType === themeType) { - return false; - } - this._themeType = themeType; - this._colorZonesInvalid = true; - return true; - } - public resolveColorZones(): ColorZone[] { const colorZonesInvalid = this._colorZonesInvalid; const lineHeight = Math.floor(this._lineHeight); // @perf const totalHeight = Math.floor(this.getCanvasHeight()); // @perf - const maximumHeight = Math.floor(this._maximumHeight * this._pixelRatio); // @perf - const minimumHeight = Math.floor(this._minimumHeight * this._pixelRatio); // @perf - const themeType = this._themeType; // @perf const outerHeight = Math.floor(this._outerHeight); // @perf const heightRatio = totalHeight / outerHeight; let allColorZones: ColorZone[] = []; for (let i = 0, len = this._zones.length; i < len; i++) { - let zone = this._zones[i]; + const zone = this._zones[i]; if (!colorZonesInvalid) { - let colorZones = zone.getColorZones(); - if (colorZones) { - for (let j = 0, lenJ = colorZones.length; j < lenJ; j++) { - allColorZones.push(colorZones[j]); - } + const colorZone = zone.getColorZones(); + if (colorZone) { + allColorZones.push(colorZone); continue; } } - let colorZones: ColorZone[] = []; - if (zone.forceHeight) { - let forcedHeight = Math.floor(zone.forceHeight * this._pixelRatio); + const y1 = Math.floor(heightRatio * (this._getVerticalOffsetForLine(zone.startLineNumber))); + const y2 = Math.floor(heightRatio * (this._getVerticalOffsetForLine(zone.endLineNumber) + lineHeight)); - let y1 = Math.floor(this._getVerticalOffsetForLine(zone.startLineNumber)); - y1 = Math.floor(y1 * heightRatio); + let ycenter = Math.floor((y1 + y2) / 2); + let halfHeight = (y2 - ycenter); - let y2 = y1 + forcedHeight; - colorZones.push(this.createZone(totalHeight, y1, y2, forcedHeight, forcedHeight, zone.getColor(themeType), zone.position)); - } else { - let y1 = Math.floor(this._getVerticalOffsetForLine(zone.startLineNumber)); - let y2 = Math.floor(this._getVerticalOffsetForLine(zone.endLineNumber)) + lineHeight; - - y1 = Math.floor(y1 * heightRatio); - y2 = Math.floor(y2 * heightRatio); - - // Figure out if we can render this in one continuous zone - let zoneLineNumbers = zone.endLineNumber - zone.startLineNumber + 1; - let zoneMaximumHeight = zoneLineNumbers * maximumHeight; - - if (y2 - y1 > zoneMaximumHeight) { - // We need to draw one zone per line - for (let lineNumber = zone.startLineNumber; lineNumber <= zone.endLineNumber; lineNumber++) { - y1 = Math.floor(this._getVerticalOffsetForLine(lineNumber)); - y2 = y1 + lineHeight; - - y1 = Math.floor(y1 * heightRatio); - y2 = Math.floor(y2 * heightRatio); - - colorZones.push(this.createZone(totalHeight, y1, y2, minimumHeight, maximumHeight, zone.getColor(themeType), zone.position)); - } - } else { - colorZones.push(this.createZone(totalHeight, y1, y2, minimumHeight, zoneMaximumHeight, zone.getColor(themeType), zone.position)); - } + if (halfHeight < Constants.MINIMUM_HEIGHT / 2) { + halfHeight = Constants.MINIMUM_HEIGHT / 2; } - zone.setColorZones(colorZones); - for (let j = 0, lenJ = colorZones.length; j < lenJ; j++) { - allColorZones.push(colorZones[j]); + if (ycenter - halfHeight < 0) { + ycenter = halfHeight; } + if (ycenter + halfHeight > totalHeight) { + ycenter = totalHeight - halfHeight; + } + + const color = zone.color; + let colorId = this._color2Id[color]; + if (!colorId) { + colorId = (++this._lastAssignedId); + this._color2Id[color] = colorId; + this._id2Color[colorId] = color; + } + const colorZone = new ColorZone(ycenter - halfHeight, ycenter + halfHeight, colorId); + + zone.setColorZone(colorZone); + allColorZones.push(colorZone); } this._colorZonesInvalid = false; @@ -344,38 +271,4 @@ export class OverviewZoneManager { allColorZones.sort(sortFunc); return allColorZones; } - - public createZone(totalHeight: number, y1: number, y2: number, minimumHeight: number, maximumHeight: number, color: string, position: OverviewRulerLane): ColorZone { - totalHeight = Math.floor(totalHeight); // @perf - y1 = Math.floor(y1); // @perf - y2 = Math.floor(y2); // @perf - minimumHeight = Math.floor(minimumHeight); // @perf - maximumHeight = Math.floor(maximumHeight); // @perf - - let ycenter = Math.floor((y1 + y2) / 2); - let halfHeight = (y2 - ycenter); - - - if (halfHeight > maximumHeight / 2) { - halfHeight = maximumHeight / 2; - } - if (halfHeight < minimumHeight / 2) { - halfHeight = minimumHeight / 2; - } - - if (ycenter - halfHeight < 0) { - ycenter = halfHeight; - } - if (ycenter + halfHeight > totalHeight) { - ycenter = totalHeight - halfHeight; - } - - let colorId = this._color2Id[color]; - if (!colorId) { - colorId = (++this._lastAssignedId); - this._color2Id[color] = colorId; - this._id2Color[colorId] = color; - } - return new ColorZone(ycenter - halfHeight, ycenter + halfHeight, colorId, position); - } } diff --git a/src/vs/editor/test/common/view/overviewZoneManager.test.ts b/src/vs/editor/test/common/view/overviewZoneManager.test.ts index 39928e19adf..1781b29855b 100644 --- a/src/vs/editor/test/common/view/overviewZoneManager.test.ts +++ b/src/vs/editor/test/common/view/overviewZoneManager.test.ts @@ -5,9 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; import { OverviewZoneManager, ColorZone, OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; -import { LIGHT } from 'vs/platform/theme/common/themeService'; suite('Editor View - OverviewZoneManager', () => { @@ -15,9 +13,6 @@ suite('Editor View - OverviewZoneManager', () => { const LINE_COUNT = 50; const LINE_HEIGHT = 20; let manager = new OverviewZoneManager((lineNumber) => LINE_HEIGHT * lineNumber); - manager.setMinimumHeight(6); - manager.setMaximumHeight(6); - manager.setThemeType(LIGHT); manager.setDOMWidth(30); manager.setDOMHeight(600); manager.setOuterHeight(LINE_COUNT * LINE_HEIGHT); @@ -33,11 +28,10 @@ suite('Editor View - OverviewZoneManager', () => { // one line = 12, but cap is at 6 assert.deepEqual(manager.resolveColorZones(), [ - new ColorZone(15, 21, 1, OverviewRulerLane.Full), // - new ColorZone(123, 129, 2, OverviewRulerLane.Full), // 120 -> 132 - new ColorZone(363, 369, 3, OverviewRulerLane.Full), // 360 -> 372 [360 -> 384] - new ColorZone(375, 381, 3, OverviewRulerLane.Full), // 372 -> 384 [360 -> 384] - new ColorZone(594, 600, 4, OverviewRulerLane.Full), // 588 -> 600 + new ColorZone(12, 24, 1), // + new ColorZone(120, 132, 2), // 120 -> 132 + new ColorZone(360, 384, 3), // 360 -> 372 [360 -> 384] + new ColorZone(588, 600, 4), // 588 -> 600 ]); }); @@ -45,9 +39,6 @@ suite('Editor View - OverviewZoneManager', () => { const LINE_COUNT = 50; const LINE_HEIGHT = 20; let manager = new OverviewZoneManager((lineNumber) => LINE_HEIGHT * lineNumber); - manager.setMinimumHeight(6); - manager.setMaximumHeight(6); - manager.setThemeType(LIGHT); manager.setDOMWidth(30); manager.setDOMHeight(300); manager.setOuterHeight(LINE_COUNT * LINE_HEIGHT); @@ -63,10 +54,10 @@ suite('Editor View - OverviewZoneManager', () => { // one line = 6, cap is at 6 assert.deepEqual(manager.resolveColorZones(), [ - new ColorZone(6, 12, 1, OverviewRulerLane.Full), // - new ColorZone(60, 66, 2, OverviewRulerLane.Full), // 60 -> 66 - new ColorZone(180, 192, 3, OverviewRulerLane.Full), // 180 -> 192 - new ColorZone(294, 300, 4, OverviewRulerLane.Full), // 294 -> 300 + new ColorZone(6, 12, 1), // + new ColorZone(60, 66, 2), // 60 -> 66 + new ColorZone(180, 192, 3), // 180 -> 192 + new ColorZone(294, 300, 4), // 294 -> 300 ]); }); @@ -74,9 +65,6 @@ suite('Editor View - OverviewZoneManager', () => { const LINE_COUNT = 50; const LINE_HEIGHT = 20; let manager = new OverviewZoneManager((lineNumber) => LINE_HEIGHT * lineNumber); - manager.setMinimumHeight(6); - manager.setMaximumHeight(6); - manager.setThemeType(LIGHT); manager.setDOMWidth(30); manager.setDOMHeight(300); manager.setOuterHeight(LINE_COUNT * LINE_HEIGHT); @@ -92,10 +80,10 @@ suite('Editor View - OverviewZoneManager', () => { // one line = 6, cap is at 12 assert.deepEqual(manager.resolveColorZones(), [ - new ColorZone(12, 24, 1, OverviewRulerLane.Full), // - new ColorZone(120, 132, 2, OverviewRulerLane.Full), // 120 -> 132 - new ColorZone(360, 384, 3, OverviewRulerLane.Full), // 360 -> 384 - new ColorZone(588, 600, 4, OverviewRulerLane.Full), // 588 -> 600 + new ColorZone(12, 24, 1), // + new ColorZone(120, 132, 2), // 120 -> 132 + new ColorZone(360, 384, 3), // 360 -> 384 + new ColorZone(588, 600, 4), // 588 -> 600 ]); }); }); From 946d872acbe0087466110c7da9d813c135120870 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 12 Dec 2017 17:54:28 +0100 Subject: [PATCH 151/615] input box length warnings introduces scm.inputCounter --- extensions/git/src/repository.ts | 2 +- src/vs/vscode.d.ts | 4 +- .../api/electron-browser/mainThreadSCM.ts | 4 +- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- src/vs/workbench/api/node/extHostSCM.ts | 12 ++--- .../scm/electron-browser/scm.contribution.ts | 6 +++ .../parts/scm/electron-browser/scmViewlet.ts | 47 +++++++++++++++---- src/vs/workbench/services/scm/common/scm.ts | 2 +- .../services/scm/common/scmService.ts | 10 +--- 9 files changed, 58 insertions(+), 31 deletions(-) diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index abdd8184ffa..4ee58c70fff 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -519,7 +519,7 @@ export class Repository implements Disposable { this._sourceControl.inputBox.placeholder = localize('commitMessage', "Message (press {0} to commit)"); this._sourceControl.acceptInputCommand = { command: 'git.commitWithInput', title: localize('commit', "Commit"), arguments: [this._sourceControl] }; this._sourceControl.quickDiffProvider = this; - this._sourceControl.inputBox.warningLength = 72; + this._sourceControl.inputBox.lineWarningLength = 72; this.disposables.push(this._sourceControl); this._mergeGroup = this._sourceControl.createResourceGroup('merge', localize('merge changes', "Merge Changes")); diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 31988396618..86982258339 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -5784,9 +5784,9 @@ declare module 'vscode' { placeholder: string; /** - * The warning threshold for commit messages. + * The warning threshold for lines in the input box. */ - warningLength: number | undefined; + lineWarningLength: number | undefined; } interface QuickDiffProvider { diff --git a/src/vs/workbench/api/electron-browser/mainThreadSCM.ts b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts index 7e728e798bd..2541503baa9 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSCM.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts @@ -392,13 +392,13 @@ export class MainThreadSCM implements MainThreadSCMShape { repository.input.placeholder = placeholder; } - $setWarningLength(sourceControlHandle: number, warningLength: number): void { + $setLineWarningLength(sourceControlHandle: number, lineWarningLength: number): void { const repository = this._repositories[sourceControlHandle]; if (!repository) { return; } - repository.input.warningLength = warningLength; + repository.input.lineWarningLength = lineWarningLength; } } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index d3efe056b8d..f9fd93dfa20 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -410,7 +410,7 @@ export interface MainThreadSCMShape extends IDisposable { $setInputBoxValue(sourceControlHandle: number, value: string): void; $setInputBoxPlaceholder(sourceControlHandle: number, placeholder: string): void; - $setWarningLength(sourceControlHandle: number, warningLength: number): void; + $setLineWarningLength(sourceControlHandle: number, lineWarningLength: number): void; } export type DebugSessionUUID = string; diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 2f8ea94d5b6..37a6b752ab1 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -140,15 +140,15 @@ export class ExtHostSCMInputBox implements vscode.SourceControlInputBox { this._placeholder = placeholder; } - private _warningLength: number | undefined; + private _lineWarningLength: number | undefined; - get warningLength(): number | undefined { - return this._warningLength; + get lineWarningLength(): number | undefined { + return this._lineWarningLength; } - set warningLength(warningLength: number) { - this._proxy.$setWarningLength(this._sourceControlHandle, warningLength); - this._warningLength = warningLength; + set lineWarningLength(lineWarningLength: number) { + this._proxy.$setLineWarningLength(this._sourceControlHandle, lineWarningLength); + this._lineWarningLength = lineWarningLength; } constructor(private _proxy: MainThreadSCMShape, private _sourceControlHandle: number) { diff --git a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts index d2a18a112ea..bce5b81ee3c 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -74,5 +74,11 @@ Registry.as(ConfigurationExtensions.Configuration).regis default: 'all', description: localize('diffDecorations', "Controls diff decorations in the editor.") }, + 'scm.inputCounter': { + type: 'string', + enum: ['always', 'warn', 'off'], + default: 'warn', + description: localize('inputCounter', "Controls when to display the input counter.") + } } }); \ No newline at end of file diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index 982d059e337..af7f2a6a9b6 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -8,7 +8,7 @@ import 'vs/css!./media/scmViewlet'; import { localize } from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; -import Event, { Emitter, chain, mapEvent } from 'vs/base/common/event'; +import Event, { Emitter, chain, mapEvent, anyEvent } from 'vs/base/common/event'; import { domEvent, stop } from 'vs/base/browser/event'; import { basename } from 'vs/base/common/paths'; import { onUnexpectedError } from 'vs/base/common/errors'; @@ -56,6 +56,7 @@ import { format } from 'vs/base/common/strings'; import { ISpliceable, ISequence, ISplice } from 'vs/base/common/sequence'; import { firstIndex } from 'vs/base/common/arrays'; import { WorkbenchList, IListService } from 'vs/platform/list/browser/listService'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; // TODO@Joao // Need to subclass MenuItemActionItem in order to respect @@ -695,7 +696,8 @@ export class RepositoryPanel extends ViewletPanel { @IWorkbenchEditorService protected editorService: IWorkbenchEditorService, @IEditorGroupService protected editorGroupService: IEditorGroupService, @IContextKeyService protected contextKeyService: IContextKeyService, - @IInstantiationService protected instantiationService: IInstantiationService + @IInstantiationService protected instantiationService: IInstantiationService, + @IConfigurationService protected configurationService: IConfigurationService ) { super(repository.provider.label, {}, keybindingService, contextMenuService); this.menus = instantiationService.createInstance(SCMMenus, repository.provider); @@ -754,23 +756,46 @@ export class RepositoryPanel extends ViewletPanel { }; const validation = (text: string): IMessage => { - const warningLength = this.repository.input.warningLength; - if (warningLength === undefined) { + const setting = this.configurationService.getValue<'always' | 'warn' | 'off'>('scm.inputCounter'); + + if (setting === 'off') { + return null; + } + + let position = this.inputBox.inputElement.selectionStart; + let start = 0, end; + let match: RegExpExecArray; + const regex = /\r?\n/g; + + while ((match = regex.exec(text)) && position > match.index) { + start = match.index + match[0].length; + } + + end = match ? match.index : text.length; + + const line = text.substring(start, end); + + const lineWarningLength = this.repository.input.lineWarningLength; + + if (lineWarningLength === undefined) { return { - content: localize('commitMessageInfo', "{0} characters", text.length), + content: localize('commitMessageInfo', "{0} characters in current line", text.length), type: MessageType.INFO }; } - const charactersLeft = warningLength - text.length; - if (charactersLeft > 0) { + if (line.length <= lineWarningLength) { + if (setting !== 'always') { + return null; + } + return { - content: localize('commitMessageCountdown', "{0} characters left", text.length), + content: localize('commitMessageCountdown', "{0} characters left in current line", lineWarningLength - line.length), type: MessageType.INFO }; } else { return { - content: localize('commitMessageWarning', "{0} characters over", text.length), + content: localize('commitMessageWarning', "{0} characters over {1} in current line", line.length - lineWarningLength, lineWarningLength), type: MessageType.WARNING }; } @@ -783,6 +808,10 @@ export class RepositoryPanel extends ViewletPanel { this.disposables.push(attachInputBoxStyler(this.inputBox, this.themeService)); this.disposables.push(this.inputBox); + const onKeyUp = domEvent(this.inputBox.inputElement, 'keyup'); + const onMouseUp = domEvent(this.inputBox.inputElement, 'mouseup'); + anyEvent(onKeyUp, onMouseUp)(() => this.inputBox.validate(), null, this.disposables); + this.inputBox.value = this.repository.input.value; this.inputBox.onDidChange(value => this.repository.input.value = value, null, this.disposables); this.repository.input.onDidChange(value => this.inputBox.value = value, null, this.disposables); diff --git a/src/vs/workbench/services/scm/common/scm.ts b/src/vs/workbench/services/scm/common/scm.ts index b10ab4dc7cc..78014460542 100644 --- a/src/vs/workbench/services/scm/common/scm.ts +++ b/src/vs/workbench/services/scm/common/scm.ts @@ -75,7 +75,7 @@ export interface ISCMInput { placeholder: string; readonly onDidChangePlaceholder: Event; - warningLength: number | undefined; + lineWarningLength: number | undefined; } export interface ISCMRepository extends IDisposable { diff --git a/src/vs/workbench/services/scm/common/scmService.ts b/src/vs/workbench/services/scm/common/scmService.ts index a16e88a7436..ad66331ddc1 100644 --- a/src/vs/workbench/services/scm/common/scmService.ts +++ b/src/vs/workbench/services/scm/common/scmService.ts @@ -40,15 +40,7 @@ class SCMInput implements ISCMInput { private _onDidChangePlaceholder = new Emitter(); get onDidChangePlaceholder(): Event { return this._onDidChangePlaceholder.event; } - private _warningLength: number | undefined; - - get warningLength(): number | undefined { - return this._warningLength; - } - - set warningLength(warningLength: number) { - this._warningLength = warningLength; - } + public lineWarningLength: number | undefined = undefined; } class SCMRepository implements ISCMRepository { From 06c9f76202efd73b4b80f415362719dbc5d44eb2 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Tue, 12 Dec 2017 17:57:42 +0100 Subject: [PATCH 152/615] node-debug@1.20.0 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 587e8ab262a..a68a796a764 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -45,7 +45,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.19.7' }, + { name: 'ms-vscode.node-debug', version: '1.20.0' }, { name: 'ms-vscode.node-debug2', version: '1.19.3' } ]; From b0f3ee17066e253860a5a62d98d61a8b5db7cb34 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 12 Dec 2017 18:15:12 +0100 Subject: [PATCH 153/615] Simplify OverviewRuler (fixes #38418) --- .../viewParts/overviewRuler/overviewRuler.ts | 104 ++++-------------- .../editor/browser/widget/diffEditorWidget.ts | 18 +-- .../editor/common/view/overviewZoneManager.ts | 87 ++++----------- 3 files changed, 53 insertions(+), 156 deletions(-) diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts index ea5e1ba7cfb..1b450611c58 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts @@ -11,33 +11,22 @@ import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; import { OverviewRulerZone, OverviewZoneManager, ColorZone } from 'vs/editor/common/view/overviewZoneManager'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; -import { Color } from 'vs/base/common/color'; -import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { private _context: ViewContext; - private _canvasLeftOffset: number; private _domNode: FastDomNode; - private _lanesCount: number; private _zoneManager: OverviewZoneManager; - private _background: Color; constructor(context: ViewContext, cssClassName: string) { super(); this._context = context; - this._canvasLeftOffset = 0; - this._domNode = createFastDomNode(document.createElement('canvas')); this._domNode.setClassName(cssClassName); this._domNode.setPosition('absolute'); this._domNode.setLayerHinting(true); - this._lanesCount = 3; - - this._background = null; - this._zoneManager = new OverviewZoneManager((lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber)); this._zoneManager.setDOMWidth(0); this._zoneManager.setDOMHeight(0); @@ -60,7 +49,7 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { if (e.lineHeight) { this._zoneManager.setLineHeight(this._context.configuration.editor.lineHeight); - this.render(true); + this._render(); } if (e.pixelRatio) { @@ -69,23 +58,24 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { this._domNode.setHeight(this._zoneManager.getDOMHeight()); this._domNode.domNode.width = this._zoneManager.getCanvasWidth(); this._domNode.domNode.height = this._zoneManager.getCanvasHeight(); - this.render(true); + this._render(); } return true; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + this._render(); return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { - this._zoneManager.setOuterHeight(e.scrollHeight); - this.render(true); - return super.onScrollChanged(e) || e.scrollHeightChanged; + if (e.scrollHeightChanged) { + this._zoneManager.setOuterHeight(e.scrollHeight); + this._render(); + } + return true; } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + this._render(); return true; } @@ -109,16 +99,16 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { this._domNode.domNode.width = this._zoneManager.getCanvasWidth(); this._domNode.domNode.height = this._zoneManager.getCanvasHeight(); - this.render(true); + this._render(); } } public setZones(zones: OverviewRulerZone[]): void { this._zoneManager.setZones(zones); - this.render(false); + this._render(); } - public render(forceRender: boolean): boolean { + private _render(): boolean { if (this._zoneManager.getOuterHeight() === 0) { return false; } @@ -130,79 +120,29 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { let id2Color = this._zoneManager.getId2Color(); let ctx = this._domNode.domNode.getContext('2d'); - if (this._background === null) { - ctx.clearRect(0, 0, width, height); - } else { - ctx.fillStyle = Color.Format.CSS.formatHex(this._background); - ctx.fillRect(0, 0, width, height); - } - + ctx.clearRect(0, 0, width, height); if (colorZones.length > 0) { - let remainingWidth = width - this._canvasLeftOffset; - - if (this._lanesCount >= 3) { - this._renderThreeLanes(ctx, colorZones, id2Color, remainingWidth); - } else if (this._lanesCount === 2) { - this._renderTwoLanes(ctx, colorZones, id2Color, remainingWidth); - } else if (this._lanesCount === 1) { - this._renderOneLane(ctx, colorZones, id2Color, remainingWidth); - } + this._renderOneLane(ctx, colorZones, id2Color, width); } return true; } - - private _renderOneLane(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], w: number): void { - - this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Left | OverviewRulerLane.Center | OverviewRulerLane.Right, this._canvasLeftOffset, w); - - } - - private _renderTwoLanes(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], w: number): void { - - let leftWidth = Math.floor(w / 2); - let rightWidth = w - leftWidth; - let leftOffset = this._canvasLeftOffset; - let rightOffset = this._canvasLeftOffset + leftWidth; - - this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Left | OverviewRulerLane.Center, leftOffset, leftWidth); - this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Right, rightOffset, rightWidth); - } - - private _renderThreeLanes(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], w: number): void { - - let leftWidth = Math.floor(w / 3); - let rightWidth = Math.floor(w / 3); - let centerWidth = w - leftWidth - rightWidth; - let leftOffset = this._canvasLeftOffset; - let centerOffset = this._canvasLeftOffset + leftWidth; - let rightOffset = this._canvasLeftOffset + leftWidth + centerWidth; - - this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Left, leftOffset, leftWidth); - this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Center, centerOffset, centerWidth); - this._renderVerticalPatch(ctx, colorZones, id2Color, OverviewRulerLane.Right, rightOffset, rightWidth); - } - - private _renderVerticalPatch(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], laneMask: number, xpos: number, width: number): void { + private _renderOneLane(ctx: CanvasRenderingContext2D, colorZones: ColorZone[], id2Color: string[], width: number): void { let currentColorId = 0; let currentFrom = 0; let currentTo = 0; for (let i = 0, len = colorZones.length; i < len; i++) { - let zone = colorZones[i]; + const zone = colorZones[i]; - if (!(zone.position & laneMask)) { - continue; - } - - let zoneColorId = zone.colorId; - let zoneFrom = zone.from; - let zoneTo = zone.to; + const zoneColorId = zone.colorId; + const zoneFrom = zone.from; + const zoneTo = zone.to; if (zoneColorId !== currentColorId) { - ctx.fillRect(xpos, currentFrom, width, currentTo - currentFrom); + ctx.fillRect(0, currentFrom, width, currentTo - currentFrom); currentColorId = zoneColorId; ctx.fillStyle = id2Color[currentColorId]; @@ -212,14 +152,14 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { if (currentTo >= zoneFrom) { currentTo = Math.max(currentTo, zoneTo); } else { - ctx.fillRect(xpos, currentFrom, width, currentTo - currentFrom); + ctx.fillRect(0, currentFrom, width, currentTo - currentFrom); currentFrom = zoneFrom; currentTo = zoneTo; } } } - ctx.fillRect(xpos, currentFrom, width, currentTo - currentFrom); + ctx.fillRect(0, currentFrom, width, currentTo - currentFrom); } } diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 2b2a0ab662d..23eaa557d14 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -1594,6 +1594,7 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd } _getOriginalEditorDecorations(lineChanges: editorCommon.ILineChange[], ignoreTrimWhitespace: boolean, renderIndicators: boolean, originalEditor: editorBrowser.ICodeEditor, modifiedEditor: editorBrowser.ICodeEditor): IEditorDiffDecorations { + const overviewZoneColor = this._removeColor.toString(); let result: IEditorDiffDecorations = { decorations: [], @@ -1614,12 +1615,10 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd result.decorations.push(createDecoration(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, Number.MAX_VALUE, DECORATIONS.charDeleteWholeLine)); } - let color = this._removeColor.toString(); - result.overviewZones.push(new OverviewRulerZone( lineChange.originalStartLineNumber, lineChange.originalEndLineNumber, - color + overviewZoneColor )); if (lineChange.charChanges) { @@ -1655,6 +1654,7 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd } _getModifiedEditorDecorations(lineChanges: editorCommon.ILineChange[], ignoreTrimWhitespace: boolean, renderIndicators: boolean, originalEditor: editorBrowser.ICodeEditor, modifiedEditor: editorBrowser.ICodeEditor): IEditorDiffDecorations { + const overviewZoneColor = this._insertColor.toString(); let result: IEditorDiffDecorations = { decorations: [], @@ -1675,11 +1675,10 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd if (!isChangeOrDelete(lineChange) || !lineChange.charChanges) { result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE, DECORATIONS.charInsertWholeLine)); } - let color = this._insertColor.toString(); result.overviewZones.push(new OverviewRulerZone( lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber, - color + overviewZoneColor )); if (lineChange.charChanges) { @@ -1775,6 +1774,8 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor } _getOriginalEditorDecorations(lineChanges: editorCommon.ILineChange[], ignoreTrimWhitespace: boolean, renderIndicators: boolean, originalEditor: editorBrowser.ICodeEditor, modifiedEditor: editorBrowser.ICodeEditor): IEditorDiffDecorations { + const overviewZoneColor = this._removeColor.toString(); + let result: IEditorDiffDecorations = { decorations: [], overviewZones: [] @@ -1790,11 +1791,10 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor options: DECORATIONS.lineDeleteMargin }); - let color = this._removeColor.toString(); result.overviewZones.push(new OverviewRulerZone( lineChange.originalStartLineNumber, lineChange.originalEndLineNumber, - color + overviewZoneColor )); } } @@ -1803,6 +1803,7 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor } _getModifiedEditorDecorations(lineChanges: editorCommon.ILineChange[], ignoreTrimWhitespace: boolean, renderIndicators: boolean, originalEditor: editorBrowser.ICodeEditor, modifiedEditor: editorBrowser.ICodeEditor): IEditorDiffDecorations { + const overviewZoneColor = this._insertColor.toString(); let result: IEditorDiffDecorations = { decorations: [], @@ -1821,11 +1822,10 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert) }); - let color = this._insertColor.toString(); result.overviewZones.push(new OverviewRulerZone( lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber, - color + overviewZoneColor )); if (lineChange.charChanges) { diff --git a/src/vs/editor/common/view/overviewZoneManager.ts b/src/vs/editor/common/view/overviewZoneManager.ts index 6d200c3c7f5..92759f72bbe 100644 --- a/src/vs/editor/common/view/overviewZoneManager.ts +++ b/src/vs/editor/common/view/overviewZoneManager.ts @@ -4,9 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; -import { ThemeType } from 'vs/platform/theme/common/themeService'; - const enum Constants { MINIMUM_HEIGHT = 4 } @@ -14,16 +11,24 @@ const enum Constants { export class ColorZone { _colorZoneBrand: void; - from: number; - to: number; - colorId: number; - position: OverviewRulerLane; + public readonly from: number; + public readonly to: number; + public readonly colorId: number; constructor(from: number, to: number, colorId: number) { this.from = from | 0; this.to = to | 0; this.colorId = colorId | 0; - this.position = OverviewRulerLane.Full; + } + + public static compare(a: ColorZone, b: ColorZone): number { + if (a.colorId === b.colorId) { + if (a.from === b.from) { + return a.to - b.to; + } + return a.from - b.from; + } + return a.colorId - b.colorId; } } @@ -50,21 +55,14 @@ export class OverviewRulerZone { this._colorZone = null; } - public getColor(themeType: ThemeType): string { - return this.color; - } - - public compareTo(other: OverviewRulerZone): number { - if (this.startLineNumber === other.startLineNumber) { - if (this.endLineNumber === other.endLineNumber) { - if (this.color === other.color) { - return 0; - } - return this.color < other.color ? -1 : 1; + public static compare(a: OverviewRulerZone, b: OverviewRulerZone): number { + if (a.color === b.color) { + if (a.startLineNumber === b.startLineNumber) { + return a.endLineNumber - b.endLineNumber; } - return this.endLineNumber - other.endLineNumber; + return a.startLineNumber - b.startLineNumber; } - return this.startLineNumber - other.startLineNumber; + return a.color < b.color ? -1 : 1; } public setColorZone(colorZone: ColorZone): void { @@ -111,39 +109,8 @@ export class OverviewZoneManager { } public setZones(newZones: OverviewRulerZone[]): void { - newZones.sort((a, b) => a.compareTo(b)); - - let oldZones = this._zones; - let oldIndex = 0; - let oldLength = this._zones.length; - let newIndex = 0; - let newLength = newZones.length; - - let result: OverviewRulerZone[] = []; - while (newIndex < newLength) { - let newZone = newZones[newIndex]; - - if (oldIndex >= oldLength) { - result.push(newZone); - newIndex++; - } else { - let oldZone = oldZones[oldIndex]; - let cmp = oldZone.compareTo(newZone); - if (cmp < 0) { - oldIndex++; - } else if (cmp > 0) { - result.push(newZone); - newIndex++; - } else { - // cmp === 0 - result.push(oldZone); - oldIndex++; - newIndex++; - } - } - } - - this._zones = result; + this._zones = newZones; + this._zones.sort(OverviewRulerZone.compare); } public setLineHeight(lineHeight: number): boolean { @@ -258,17 +225,7 @@ export class OverviewZoneManager { this._colorZonesInvalid = false; - let sortFunc = (a: ColorZone, b: ColorZone) => { - if (a.colorId === b.colorId) { - if (a.from === b.from) { - return a.to - b.to; - } - return a.from - b.from; - } - return a.colorId - b.colorId; - }; - - allColorZones.sort(sortFunc); + allColorZones.sort(ColorZone.compare); return allColorZones; } } From f472c7095970a8d25dd8e5a32ab03f6fc9732167 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Tue, 12 Dec 2017 18:24:50 +0100 Subject: [PATCH 154/615] update node-debug package-lock --- .../ms-vscode.node-debug/package-lock.json | 96 ++++++++++--------- 1 file changed, 53 insertions(+), 43 deletions(-) diff --git a/extensions/ms-vscode.node-debug/package-lock.json b/extensions/ms-vscode.node-debug/package-lock.json index 82260da1aa1..526e856f483 100644 --- a/extensions/ms-vscode.node-debug/package-lock.json +++ b/extensions/ms-vscode.node-debug/package-lock.json @@ -1,6 +1,6 @@ { "name": "node-debug", - "version": "1.19.2", + "version": "1.19.7", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -42,21 +42,21 @@ } }, "@types/mocha": { - "version": "2.2.42", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.42.tgz", - "integrity": "sha512-b6gVDoxEbAQGwbV7gSzeFw/hy3/eEAokztktdzl4bHvGgb9K5zW4mVQDlVYch2w31m8t/J7L2iqhQvz3r5edCQ==", + "version": "2.2.44", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.44.tgz", + "integrity": "sha512-k2tWTQU8G4+iSMvqKi0Q9IIsWAp/n8xzdZS4Q4YVIltApoMA00wFBFdlJnmoaK1/z7B0Cy0yPe6GgXteSmdUNw==", "dev": true }, "@types/node": { - "version": "6.0.52", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.52.tgz", - "integrity": "sha1-GsOpm0IyD55GNILyWvTCNZRzqqY=", + "version": "7.0.43", + "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.43.tgz", + "integrity": "sha512-7scYwwfHNppXvH/9JzakbVxk0o0QUILVk1Lv64GRaxwPuGpnF1QBiwdvhDpLcymb8BpomQL3KYoWKq3wUdDMhQ==", "dev": true }, "@types/source-map": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@types/source-map/-/source-map-0.5.1.tgz", - "integrity": "sha512-/GVAjL1Y8puvZab63n8tsuBiYwZt1bApMdx58/msQ9ID5T05ov+wm/ZV1DvYC/DKKEygpTJViqQvkh5Rhrl4CA==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@types/source-map/-/source-map-0.5.2.tgz", + "integrity": "sha512-++w4WmMbk3dS3UeHGzAG+xJOSz5Xqtjys/TBkqG3qp3SeWE7Wwezqe5eB7B51cxUyh4PW7bwVotpsLdBK0D8cw==", "dev": true }, "abbrev": { @@ -4755,9 +4755,9 @@ } }, "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.5.0.tgz", + "integrity": "sha512-v/jMDoK/qKptnTuC3YUNbIj8uUYvTCIHzVu9BHldKSWja48wusAtfjlcBlqnFrqClu3yf69ScDxBPrIyFnF51g==", "dev": true }, "mime-db": { @@ -5149,13 +5149,30 @@ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, + "parse-semver": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", + "integrity": "sha1-mkr9bfBj3Egm+T+6SpnPIj9mbLg=", + "dev": true, + "requires": { + "semver": "5.4.1" + }, + "dependencies": { + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + } + } + }, "parse5": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", "dev": true, "requires": { - "@types/node": "6.0.52" + "@types/node": "7.0.43" } }, "path-dirname": { @@ -6671,9 +6688,9 @@ } }, "vsce": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.32.0.tgz", - "integrity": "sha1-EN+pIyGCwg6r5r8xJdMzpLIG/j0=", + "version": "1.33.2", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.33.2.tgz", + "integrity": "sha1-NkX2mq+YTiL3TqSdNfON0Y1m/18=", "dev": true, "requires": { "cheerio": "1.0.0-rc.2", @@ -6682,9 +6699,10 @@ "glob": "7.1.2", "lodash": "4.17.4", "markdown-it": "8.4.0", - "mime": "1.4.1", + "mime": "1.5.0", "minimatch": "3.0.4", "osenv": "0.1.4", + "parse-semver": "1.1.1", "read": "1.0.7", "semver": "5.4.1", "tmp": "0.0.29", @@ -6709,9 +6727,9 @@ } }, "vscode": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.6.tgz", - "integrity": "sha1-Ru0a+iwbnWifY5TI8WvR1xkPdfs=", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.8.tgz", + "integrity": "sha512-kT6sIA1AEKR5M+us2fXk5dxwV9SR/IEdLHNmVW4/dl1wNBHoEvgIo1qMQwHNxPVTQmw70KTGZ9UVeVb8FbpNFA==", "dev": true, "requires": { "glob": "7.1.2", @@ -6739,34 +6757,26 @@ } }, "vscode-debugadapter": { - "version": "1.25.0-pre.0", - "resolved": "https://registry.npmjs.org/vscode-debugadapter/-/vscode-debugadapter-1.25.0-pre.0.tgz", - "integrity": "sha1-0pDsVH5h5Pvss2P/9ojSAyMZQmQ=", + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/vscode-debugadapter/-/vscode-debugadapter-1.25.0.tgz", + "integrity": "sha512-tsOtNNKKTbnQanARdkFfUxI8qKVKba+QHOKWC1reDDeeyvzoNKkLMGkL/xsiKn5vQDeaP3zFBcLY8Ysak9GrvQ==", "requires": { - "vscode-debugprotocol": "1.25.0-pre.0" - }, - "dependencies": { - "vscode-debugprotocol": { - "version": "1.25.0-pre.0", - "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.25.0-pre.0.tgz", - "integrity": "sha1-rYPnvZWxmseV31D6Di/pA0YqcrY=" - } + "vscode-debugprotocol": "1.25.0" } }, "vscode-debugadapter-testsupport": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/vscode-debugadapter-testsupport/-/vscode-debugadapter-testsupport-1.24.0.tgz", - "integrity": "sha1-rDZ1scU/wW+1JMvSt+znEhtiXng=", + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/vscode-debugadapter-testsupport/-/vscode-debugadapter-testsupport-1.25.0.tgz", + "integrity": "sha512-6E2N7CoH7B0KEDvI9mFVFt4H+dRFDhtj3PmLVjNojfZ1VZZS2yfhE0XO0E5Axdhef3zTpUU6WZoeOOMVFGZGIg==", "dev": true, "requires": { - "vscode-debugprotocol": "1.24.0" + "vscode-debugprotocol": "1.25.0" } }, "vscode-debugprotocol": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.24.0.tgz", - "integrity": "sha1-28EOjX2VsQJyehmvPw/O9+JSsI4=", - "dev": true + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.25.0.tgz", + "integrity": "sha512-e1EUy/5npqa0NlAwRCUu8A9LnVRf6tkwiPQcCLyUFCC9o2GxcAqH5Va4mqXDoxQ58ar3zODivKQeRb3z1KH7WA==" }, "vscode-nls": { "version": "2.0.2", @@ -6774,9 +6784,9 @@ "integrity": "sha1-gIUiOAhEuK0VNJmvXDsDkhrqAto=" }, "vscode-nls-dev": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/vscode-nls-dev/-/vscode-nls-dev-2.1.5.tgz", - "integrity": "sha1-GfqjsYp/MCIBA5pMlnu9IvoShE0=", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/vscode-nls-dev/-/vscode-nls-dev-2.1.6.tgz", + "integrity": "sha512-1IylC/ekENYqz1vEItfrzrMXS8LW9aZQnNTU6BfdwT0Jddzed+l+nvU8amgVKFFmC1/GoiMFk5wtC20zWBbEbw==", "dev": true, "requires": { "clone": "1.0.3", From 14a1996a228b25ada19f7f0f9e5cc419cba1da3e Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 12 Dec 2017 18:29:00 +0100 Subject: [PATCH 155/615] load sudo-prompt async --- .../services/files/node/fileService.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index c1551e21910..29546e8fb3d 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -10,7 +10,6 @@ import fs = require('fs'); import os = require('os'); import crypto = require('crypto'); import assert = require('assert'); -import sudoPrompt = require('sudo-prompt'); import { isParent, FileOperation, FileOperationEvent, IContent, IFileService, IResolveFileOptions, IResolveFileResult, IResolveContentOptions, IFileStat, IStreamContent, FileOperationError, FileOperationResult, IUpdateContentOptions, FileChangeType, IImportResult, FileChangesEvent, ICreateFileOptions, IContentData } from 'vs/platform/files/common/files'; import { MAX_FILE_SIZE } from 'vs/platform/files/node/files'; @@ -598,14 +597,16 @@ export class FileService implements IFileService { return this.updateContent(uri.file(tmpPath), value, writeOptions).then(() => { // 3.) invoke our CLI as super user - return new TPromise((c, e) => { - const promptOptions = { name: this.options.elevationSupport.promptTitle.replace('-', ''), icns: this.options.elevationSupport.promptIcnsPath }; - sudoPrompt.exec(`"${this.options.elevationSupport.cliPath}" --write-elevated-helper "${tmpPath}" "${absolutePath}"`, promptOptions, (error: string, stdout: string, stderr: string) => { - if (error || stderr) { - e(error || stderr); - } else { - c(void 0); - } + return (import('sudo-prompt')).then(sudoPrompt => { + return new TPromise((c, e) => { + const promptOptions = { name: this.options.elevationSupport.promptTitle.replace('-', ''), icns: this.options.elevationSupport.promptIcnsPath }; + sudoPrompt.exec(`"${this.options.elevationSupport.cliPath}" --write-elevated-helper "${tmpPath}" "${absolutePath}"`, promptOptions, (error: string, stdout: string, stderr: string) => { + if (error || stderr) { + e(error || stderr); + } else { + c(void 0); + } + }); }); }).then(() => { From 9eced630d270deae80b377ce743200a5ed558f90 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 12 Dec 2017 10:01:13 -0800 Subject: [PATCH 156/615] Remove trailing closing paren in --status OS version Fixes #40092 --- src/vs/code/electron-main/diagnostics.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/code/electron-main/diagnostics.ts b/src/vs/code/electron-main/diagnostics.ts index 285e9c504a6..23813aeaec6 100644 --- a/src/vs/code/electron-main/diagnostics.ts +++ b/src/vs/code/electron-main/diagnostics.ts @@ -124,7 +124,7 @@ function formatEnvironment(info: IMainProcessInfo): string { const output: string[] = []; output.push(`Version: ${pkg.name} ${pkg.version} (${product.commit || 'Commit unknown'}, ${product.date || 'Date unknown'})`); - output.push(`OS Version: ${os.type()} ${os.arch()} ${os.release()})`); + output.push(`OS Version: ${os.type()} ${os.arch()} ${os.release()}`); const cpus = os.cpus(); if (cpus && cpus.length > 0) { output.push(`CPUs: ${cpus[0].model} (${cpus.length} x ${cpus[0].speed})`); From 7b18e67e7aded18ace94e688b5a3aca7ff134183 Mon Sep 17 00:00:00 2001 From: Dustin Campbell Date: Tue, 12 Dec 2017 10:13:28 -0800 Subject: [PATCH 157/615] Update to latest C# TextMate grammar This fixes several syntax highlighting issues: * Parameters with a multi-dimensional array type does not break matching the rest of the parameter list. * Ensure that the closing brace of an anonymous object does not break matching further rules. * Ensure that throw expressions allow matching nested expressions. * Allow expression-bodied methods with generic constraints. --- .../csharp/syntaxes/csharp.tmLanguage.json | 76 ++++++++----------- 1 file changed, 32 insertions(+), 44 deletions(-) diff --git a/extensions/csharp/syntaxes/csharp.tmLanguage.json b/extensions/csharp/syntaxes/csharp.tmLanguage.json index 9a96c9bbbee..7ce7ce2fc41 100644 --- a/extensions/csharp/syntaxes/csharp.tmLanguage.json +++ b/extensions/csharp/syntaxes/csharp.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/dotnet/csharp-tmLanguage/commit/436456ee5ce44e29cb1752c3b29f493b1de08c42", + "version": "https://github.com/dotnet/csharp-tmLanguage/commit/a334939a6493290f874264712447107bc9545835", "name": "C#", "scopeName": "source.cs", "fileTypes": [ @@ -935,7 +935,7 @@ "name": "punctuation.separator.colon.cs" } }, - "end": "(?=\\{|where|;)", + "end": "(?=\\{|where|;|=>)", "patterns": [ { "name": "keyword.other.class.cs", @@ -2438,18 +2438,12 @@ ] }, "throw-expression": { - "begin": "(?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)", + "captures": { + "1": { + "name": "storage.modifier.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.variable.parameter.cs" + } + } + }, "argument-list": { "begin": "\\(", "beginCaptures": { From f4eca163a0b1939c1b15cb7aacbdc52119b6f061 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 12 Dec 2017 11:02:49 -0800 Subject: [PATCH 158/615] Relax vscode-nls deps --- extensions/markdown/package.json | 4 ++-- extensions/markdown/yarn.lock | 4 ++-- extensions/typescript/package.json | 4 ++-- extensions/typescript/yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/extensions/markdown/package.json b/extensions/markdown/package.json index f26564acd10..038c3f1b5e3 100644 --- a/extensions/markdown/package.json +++ b/extensions/markdown/package.json @@ -311,8 +311,8 @@ "highlight.js": "9.5.0", "markdown-it": "^8.4.0", "markdown-it-named-headers": "0.0.4", - "vscode-extension-telemetry": "0.0.8", - "vscode-nls": "2.0.2" + "vscode-extension-telemetry": "^0.0.8", + "vscode-nls": "^2.0.2" }, "devDependencies": { "@types/highlight.js": "9.1.10", diff --git a/extensions/markdown/yarn.lock b/extensions/markdown/yarn.lock index 2b58fcb5d2f..4baed92f526 100644 --- a/extensions/markdown/yarn.lock +++ b/extensions/markdown/yarn.lock @@ -155,14 +155,14 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -vscode-extension-telemetry@0.0.8: +vscode-extension-telemetry@^0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.8.tgz#2261bff986b6690a6f1f746a45ac5bd1f85d29e0" dependencies: applicationinsights "0.18.0" winreg "1.2.3" -vscode-nls@2.0.2: +vscode-nls@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da" diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index 1997b63f7f7..780ff87b24b 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -13,8 +13,8 @@ }, "dependencies": { "semver": "4.3.6", - "vscode-extension-telemetry": "0.0.8", - "vscode-nls": "2.0.1" + "vscode-extension-telemetry": "^0.0.8", + "vscode-nls": "^2.0.2" }, "devDependencies": { "@types/node": "8.0.33", diff --git a/extensions/typescript/yarn.lock b/extensions/typescript/yarn.lock index 7f42682066e..eb4fd8e25fd 100644 --- a/extensions/typescript/yarn.lock +++ b/extensions/typescript/yarn.lock @@ -18,16 +18,16 @@ semver@4.3.6: version "4.3.6" resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" -vscode-extension-telemetry@0.0.8: +vscode-extension-telemetry@^0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.8.tgz#2261bff986b6690a6f1f746a45ac5bd1f85d29e0" dependencies: applicationinsights "0.18.0" winreg "1.2.3" -vscode-nls@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.1.tgz#7853866e33f9c50ca415e51b9640d081800e36c6" +vscode-nls@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da" winreg@1.2.3: version "1.2.3" From 640cd6624e4bb8c4e87e3f768442f71e147fe44c Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 12 Dec 2017 11:07:10 -0800 Subject: [PATCH 159/615] Update request-light in JS extension #40101 --- extensions/javascript/package.json | 2 +- extensions/javascript/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/javascript/package.json b/extensions/javascript/package.json index 15da42cf0a9..e965afaf1a6 100644 --- a/extensions/javascript/package.json +++ b/extensions/javascript/package.json @@ -12,7 +12,7 @@ "main": "./out/javascriptMain", "dependencies": { "jsonc-parser": "^0.3.1", - "request-light": "^0.2.0", + "request-light": "^0.2.1", "vscode-nls": "^2.0.2" }, "scripts": { diff --git a/extensions/javascript/yarn.lock b/extensions/javascript/yarn.lock index 889a7bad9ce..8edc77e4984 100644 --- a/extensions/javascript/yarn.lock +++ b/extensions/javascript/yarn.lock @@ -46,9 +46,9 @@ ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" -request-light@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.2.0.tgz#922497791c2e68528124dfb82354cf37e4bb2cfc" +request-light@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.2.1.tgz#986f5a82893e9d1ca6a896ebe6f46c51c6b4557f" dependencies: http-proxy-agent "^0.2.6" https-proxy-agent "^0.3.5" From b1d931fef1d5c90efd458cec1674a8efb6079605 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 12 Dec 2017 11:07:28 -0800 Subject: [PATCH 160/615] Update lang server in emmet to the same version as others Fixes #40104 --- extensions/emmet/package.json | 2 +- extensions/emmet/yarn.lock | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/emmet/package.json b/extensions/emmet/package.json index 84196a8b658..498080ea9f4 100644 --- a/extensions/emmet/package.json +++ b/extensions/emmet/package.json @@ -318,7 +318,7 @@ "@emmetio/css-parser": "ramya-rao-a/css-parser#vscode", "@emmetio/math-expression": "^0.1.1", "vscode-emmet-helper": "^1.1.19", - "vscode-languageserver-types": "^3.0.3", + "vscode-languageserver-types": "^3.5.0", "image-size": "^0.5.2", "vscode-nls": "2.0.2" } diff --git a/extensions/emmet/yarn.lock b/extensions/emmet/yarn.lock index 8d8874a062d..697ec7fb017 100644 --- a/extensions/emmet/yarn.lock +++ b/extensions/emmet/yarn.lock @@ -2059,6 +2059,10 @@ vscode-languageserver-types@^3.0.3: version "3.3.0" resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.3.0.tgz#8964dc7c2247536fbefd2d6836bf3febac80dd00" +vscode-languageserver-types@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0.tgz#e48d79962f0b8e02de955e3f524908e2b19c0374" + vscode-nls@2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da" From 2c6e593cb703a98fab7b29a865b2b45ff2deab07 Mon Sep 17 00:00:00 2001 From: Till Date: Tue, 12 Dec 2017 20:11:26 +0100 Subject: [PATCH 161/615] Fix #38623 Only sort by diagnostics. --- src/vs/editor/contrib/quickFix/quickFix.ts | 46 ++++--------------- .../contrib/quickFix/test/quickFix.test.ts | 28 ++++++----- 2 files changed, 22 insertions(+), 52 deletions(-) diff --git a/src/vs/editor/contrib/quickFix/quickFix.ts b/src/vs/editor/contrib/quickFix/quickFix.ts index 0d20c86a61a..6c9de668262 100644 --- a/src/vs/editor/contrib/quickFix/quickFix.ts +++ b/src/vs/editor/contrib/quickFix/quickFix.ts @@ -13,6 +13,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { onUnexpectedExternalError, illegalArgument } from 'vs/base/common/errors'; import { IModelService } from 'vs/editor/common/services/modelService'; import { registerLanguageCommand } from 'vs/editor/browser/editorExtensions'; +import { isFalsyOrEmpty } from 'vs/base/common/arrays'; export function getCodeActions(model: IReadOnlyModel, range: Range): TPromise { @@ -38,47 +39,18 @@ export function getCodeActions(model: IReadOnlyModel, range: Range): TPromise { test('CodeActions are sorted by type, #38623', async function () { - let expected = [ - // CodeActions with a diagnostics array are shown first - testData.diagnostics.abc, - testData.diagnostics.bcd, - testData.spelling.bcd, // empty diagnostics array - - // CodeActions without a diagnostics or command object - testData.tsLint.abc, - testData.tsLint.bcd, - - // CodeActions with a command object are shown last - testData.command.abc - ]; - const provider = new class implements CodeActionProvider { provideCodeActions() { return [ @@ -118,9 +104,21 @@ suite('QuickFix', () => { disposables.push(CodeActionProviderRegistry.register('fooLang', provider)); + const expected = [ + // CodeActions with a diagnostics array are shown first ordered by diagnostics.message + testData.diagnostics.abc, + testData.diagnostics.bcd, + + // CodeActions without diagnostics are shown in the given order without any further sorting + testData.command.abc, + testData.spelling.bcd, // empty diagnostics array + testData.tsLint.bcd, + testData.tsLint.abc + ]; + const actions = await getCodeActions(model, new Range(1, 1, 2, 1)); assert.equal(actions.length, 6); + console.log(actions); assert.deepEqual(actions, expected); }); - }); From 43db454aa5b972401e715d03ae1a35e0c3df7170 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Tue, 12 Dec 2017 11:14:59 -0800 Subject: [PATCH 162/615] Run configurationResolver on terminal env vars (#40059) * Run configurationResolver on terminal env vars * Run configurationResolver on terminal env vars from api * Refactor per review comment * Resolve variables in their own function --- .../electron-browser/terminalInstance.ts | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index f5886a2d038..5824aa00c2e 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -35,6 +35,8 @@ import { IHistoryService } from 'vs/workbench/services/history/common/history'; import pkg from 'vs/platform/node/package'; import { ansiColorIdentifiers, TERMINAL_BACKGROUND_COLOR, TERMINAL_FOREGROUND_COLOR, TERMINAL_CURSOR_FOREGROUND_COLOR, TERMINAL_CURSOR_BACKGROUND_COLOR, TERMINAL_SELECTION_BACKGROUND_COLOR } from 'vs/workbench/parts/terminal/electron-browser/terminalColorRegistry'; import { PANEL_BACKGROUND } from 'vs/workbench/common/theme'; +import { IConfigurationResolverService } from 'vs/workbench/services/configurationResolver/common/configurationResolver'; +import { IWorkspaceContextService, IWorkspaceFolder } from 'vs/platform/workspace/common/workspace'; /** The amount of time to consider terminal errors to be related to the launch */ const LAUNCHING_DURATION = 500; @@ -123,7 +125,9 @@ export class TerminalInstance implements ITerminalInstance { @IInstantiationService private _instantiationService: IInstantiationService, @IClipboardService private _clipboardService: IClipboardService, @IHistoryService private _historyService: IHistoryService, - @IThemeService private _themeService: IThemeService + @IThemeService private _themeService: IThemeService, + @IConfigurationResolverService private _configurationResolverService: IConfigurationResolverService, + @IWorkspaceContextService private _workspaceContextService: IWorkspaceContextService ) { this._instanceDisposables = []; this._processDisposables = []; @@ -585,16 +589,24 @@ export class TerminalInstance implements ITerminalInstance { if (!this._shellLaunchConfig.executable) { this._configHelper.mergeDefaultShellPathAndArgs(this._shellLaunchConfig); } - this._initialCwd = this._getCwd(this._shellLaunchConfig, this._historyService.getLastActiveWorkspaceRoot('file')); + + const lastActiveWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot('file'); + this._initialCwd = this._getCwd(this._shellLaunchConfig, lastActiveWorkspaceRootUri); + + // Resolve env vars from config and shell + const lastActiveWorkspaceRoot = this._workspaceContextService.getWorkspaceFolder(lastActiveWorkspaceRootUri); + const platformKey = platform.isWindows ? 'windows' : (platform.isMacintosh ? 'osx' : 'linux'); + const envFromConfig = TerminalInstance.resolveConfigurationVariables(this._configurationResolverService, { ...this._configHelper.config.env[platformKey] }, lastActiveWorkspaceRoot); + const envFromShell = TerminalInstance.resolveConfigurationVariables(this._configurationResolverService, { ...this._shellLaunchConfig.env }, lastActiveWorkspaceRoot); + this._shellLaunchConfig.env = envFromShell; // Merge process env with the env from config - const envFromConfig = { ...process.env }; - const envSettingKey = platform.isWindows ? 'windows' : (platform.isMacintosh ? 'osx' : 'linux'); - TerminalInstance.mergeEnvironments(envFromConfig, this._configHelper.config.env[envSettingKey]); + const parentEnv = { ...process.env }; + TerminalInstance.mergeEnvironments(parentEnv, envFromConfig); // Continue env initialization, merging in the env from the launch // config and adding keys that are needed to create the process - const env = TerminalInstance.createTerminalEnv(envFromConfig, this._shellLaunchConfig, this._initialCwd, locale, this._cols, this._rows); + const env = TerminalInstance.createTerminalEnv(parentEnv, this._shellLaunchConfig, this._initialCwd, locale, this._cols, this._rows); this._process = cp.fork(Uri.parse(require.toUrl('bootstrap')).fsPath, ['--type=terminal'], { env, cwd: Uri.parse(path.dirname(require.toUrl('../node/terminalProcess'))).fsPath @@ -636,6 +648,16 @@ export class TerminalInstance implements ITerminalInstance { }, LAUNCHING_DURATION); } + // TODO: Should be protected + private static resolveConfigurationVariables(configurationResolverService: IConfigurationResolverService, env: IStringDictionary, lastActiveWorkspaceRoot: IWorkspaceFolder): IStringDictionary { + Object.keys(env).forEach((key) => { + if (typeof env[key] === 'string') { + env[key] = configurationResolverService.resolve(lastActiveWorkspaceRoot, env[key]); + } + }); + return env; + } + private _sendPtyDataToXterm(message: { type: string, content: string }): void { if (message.type === 'data') { if (this._widgetManager) { From 2a0027e8a2ebe4cc09b68c0fc6894ca73876a4ae Mon Sep 17 00:00:00 2001 From: Till Date: Tue, 12 Dec 2017 20:15:31 +0100 Subject: [PATCH 163/615] removed console.log --- src/vs/editor/contrib/quickFix/test/quickFix.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/editor/contrib/quickFix/test/quickFix.test.ts b/src/vs/editor/contrib/quickFix/test/quickFix.test.ts index ce9819fec01..4bd0a52c4f2 100644 --- a/src/vs/editor/contrib/quickFix/test/quickFix.test.ts +++ b/src/vs/editor/contrib/quickFix/test/quickFix.test.ts @@ -118,7 +118,6 @@ suite('QuickFix', () => { const actions = await getCodeActions(model, new Range(1, 1, 2, 1)); assert.equal(actions.length, 6); - console.log(actions); assert.deepEqual(actions, expected); }); }); From 8b4e8233e7ab28597d6524ca946d9474b29aaac4 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 12 Dec 2017 13:33:47 -0800 Subject: [PATCH 164/615] Remove log --- .../parts/terminal/electron-browser/terminalInstance.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index b2345bb2065..2bf830a0f1b 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -254,7 +254,6 @@ export class TerminalInstance implements ITerminalInstance { */ protected async _createXterm(): TPromise { if (!Terminal) { - console.log('load xterm now'); Terminal = (await import('xterm')).Terminal; // Enable search functionality in xterm.js instance Terminal.loadAddon('search'); From 4199874acb1e358e11073788cbee13bf970ba566 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 12 Dec 2017 14:23:44 -0800 Subject: [PATCH 165/615] Skip parsing docs when emmet suggestions are disabled --- extensions/emmet/src/defaultCompletionProvider.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/emmet/src/defaultCompletionProvider.ts b/extensions/emmet/src/defaultCompletionProvider.ts index 7d331f575b7..ad611574c05 100644 --- a/extensions/emmet/src/defaultCompletionProvider.ts +++ b/extensions/emmet/src/defaultCompletionProvider.ts @@ -23,6 +23,12 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi const isSyntaxMapped = mappedLanguages[document.languageId] ? true : false; let syntax = getEmmetMode((isSyntaxMapped ? mappedLanguages[document.languageId] : document.languageId), excludedLanguages); + if (!syntax + || emmetConfig['showExpandedAbbreviation'] === 'never' + || ((isSyntaxMapped || syntax === 'jsx') && emmetConfig['showExpandedAbbreviation'] !== 'always')) { + return; + } + const helper = getEmmetHelper(); const extractAbbreviationResults = helper.extractAbbreviation(document, position); if (!extractAbbreviationResults) { @@ -46,12 +52,6 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi } } - if (!syntax - || ((isSyntaxMapped || syntax === 'jsx') - && emmetConfig['showExpandedAbbreviation'] !== 'always')) { - return; - } - let noiseCheckPromise: Thenable = Promise.resolve(); // Fix for https://github.com/Microsoft/vscode/issues/32647 From b44e8b4607185e629844f2b7a3fc6c0e4b4df1f6 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 12 Dec 2017 14:51:02 -0800 Subject: [PATCH 166/615] Rename PUBLIC_GITHUB_TOKEN to GITHUB_TOKEN for use --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 12d94a22d1b..1f28f9d55cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,7 @@ addons: - libsecret-1-dev before_install: + - export GITHUB_TOKEN=$PUBLIC_GITHUB_TOKEN - git submodule update --init --recursive - git clone --depth 1 https://github.com/creationix/nvm.git ./.nvm - source ./.nvm/nvm.sh From 87c1b9b9528f560238fa44293a560d3dc3780da6 Mon Sep 17 00:00:00 2001 From: Nick Snyder Date: Tue, 12 Dec 2017 15:41:42 -0800 Subject: [PATCH 167/615] reset focus context key when the webview is disposed (#40130) --- src/vs/workbench/parts/html/browser/webview.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/parts/html/browser/webview.ts b/src/vs/workbench/parts/html/browser/webview.ts index 8589995213b..2df1213dadf 100644 --- a/src/vs/workbench/parts/html/browser/webview.ts +++ b/src/vs/workbench/parts/html/browser/webview.ts @@ -196,6 +196,10 @@ export default class Webview { this._onDidClickLink.dispose(); this._disposables = dispose(this._disposables); + if (this._contextKey) { + this._contextKey.reset(); + } + if (this._webview.parentElement) { this._webview.parentElement.removeChild(this._webview); const findWidgetDomNode = this._webviewFindWidget.getDomNode(); From 90fc6b1739022ef913e3012dccb2d97f69695ad3 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 12 Dec 2017 15:50:03 -0800 Subject: [PATCH 168/615] Update javascript jsonc Fixes #40098 --- extensions/javascript/package.json | 2 +- extensions/javascript/yarn.lock | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/extensions/javascript/package.json b/extensions/javascript/package.json index e965afaf1a6..42e28260ce3 100644 --- a/extensions/javascript/package.json +++ b/extensions/javascript/package.json @@ -11,7 +11,7 @@ ], "main": "./out/javascriptMain", "dependencies": { - "jsonc-parser": "^0.3.1", + "jsonc-parser": "^1.0.0", "request-light": "^0.2.1", "vscode-nls": "^2.0.2" }, diff --git a/extensions/javascript/yarn.lock b/extensions/javascript/yarn.lock index 8edc77e4984..03e618404f4 100644 --- a/extensions/javascript/yarn.lock +++ b/extensions/javascript/yarn.lock @@ -36,11 +36,9 @@ https-proxy-agent@^0.3.5: debug "2" extend "3" -jsonc-parser@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-0.3.1.tgz#6ebf5c75224368d4b07ef4c26f9434e657472e95" - dependencies: - vscode-nls "^2.0.2" +jsonc-parser@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-1.0.0.tgz#ddcc864ae708e60a7a6dd36daea00172fa8d9272" ms@0.7.1: version "0.7.1" From 0b597d0b114b5c0431b1e243377ee090a6da2ff2 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 12 Dec 2017 16:09:54 -0800 Subject: [PATCH 169/615] Use SnippetString to construct TS method snippet Fixes #40087 --- .../src/features/completionItemProvider.ts | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index f3800d5cd10..fb8fd36867d 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -399,8 +399,13 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP } private snippetForFunctionCall(detail: CompletionEntryDetails): SnippetString { - const suggestionArgumentNames: string[] = []; - let hasOptionalParemeters = false; + let hasOptionalParameters = false; + let hasAddedParameters = false; + + const snippet = new SnippetString(); + snippet.appendText(detail.name); + snippet.appendText('('); + let parenCount = 0; let i = 0; for (; i < detail.displayParts.length; ++i) { @@ -411,9 +416,13 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP // Skip optional parameters const nameIsFollowedByOptionalIndicator = next && next.text === '?'; if (!nameIsFollowedByOptionalIndicator) { - suggestionArgumentNames.push(`\${${i + 1}:${part.text}}`); + if (hasAddedParameters) { + snippet.appendText(', '); + } + hasAddedParameters = true; + snippet.appendPlaceholder(part.text); } - hasOptionalParemeters = hasOptionalParemeters || nameIsFollowedByOptionalIndicator; + hasOptionalParameters = hasOptionalParameters || nameIsFollowedByOptionalIndicator; } else if (part.kind === 'punctuation') { if (part.text === '(') { ++parenCount; @@ -421,13 +430,17 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP --parenCount; } else if (part.text === '...' && parenCount === 1) { // Found rest parmeter. Do not fill in any further arguments - hasOptionalParemeters = true; + hasOptionalParameters = true; break; } } } - const codeSnippet = `${detail.name}(${suggestionArgumentNames.join(', ')}${hasOptionalParemeters ? '${' + i + '}' : ''})$0`; - return new SnippetString(codeSnippet); + if (hasOptionalParameters) { + snippet.appendTabstop(); + } + snippet.appendText(')'); + snippet.appendTabstop(0); + return snippet; } private getConfiguration(resource: Uri): Configuration { From 9354489e988e203e2d0c1e0a3e17c0c4cfeea3bf Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 12 Dec 2017 16:57:49 -0800 Subject: [PATCH 170/615] Fix long failing windows search-integration tests due to wrong slashes --- .../search/test/node/textSearch.integrationTest.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/search/test/node/textSearch.integrationTest.ts b/src/vs/workbench/services/search/test/node/textSearch.integrationTest.ts index cdc6ada67da..2a18075876d 100644 --- a/src/vs/workbench/services/search/test/node/textSearch.integrationTest.ts +++ b/src/vs/workbench/services/search/test/node/textSearch.integrationTest.ts @@ -306,5 +306,10 @@ suite('Search-integration', function () { }); function makeExpression(...patterns: string[]): glob.IExpression { - return patterns.reduce((glob, cur) => { glob[cur] = true; return glob; }, Object.create(null)); -} \ No newline at end of file + return patterns.reduce((glob, pattern) => { + // glob.ts needs forward slashes + pattern = pattern.replace(/\\/g, '/'); + glob[pattern] = true; + return glob; + }, Object.create(null)); +} From 40c8d176e5351e7d839722ee9f11dfa4c40dc6af Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 12 Dec 2017 16:58:43 -0800 Subject: [PATCH 171/615] test-integration.bat must check the errorlevel after each 'call' --- scripts/test-integration.bat | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/test-integration.bat b/scripts/test-integration.bat index f62b80f5f79..b9a95fa62c9 100644 --- a/scripts/test-integration.bat +++ b/scripts/test-integration.bat @@ -10,14 +10,21 @@ set VSCODEUSERDATADIR=%TMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,5% :: Tests in the extension host call .\scripts\code.bat %~dp0\..\extensions\vscode-api-tests\testWorkspace --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out --disableExtensions --user-data-dir=%VSCODEUSERDATADIR% +if %errorlevel% neq 0 exit /b %errorlevel% + call .\scripts\code.bat %~dp0\..\extensions\vscode-colorize-tests\test --extensionDevelopmentPath=%~dp0\..\extensions\vscode-colorize-tests --extensionTestsPath=%~dp0\..\extensions\vscode-colorize-tests\out --disableExtensions --user-data-dir=%VSCODEUSERDATADIR% +if %errorlevel% neq 0 exit /b %errorlevel% + call .\scripts\code.bat $%~dp0\..\extensions\emmet\test-fixtures --extensionDevelopmentPath=%~dp0\..\extensions\emmet --extensionTestsPath=%~dp0\..\extensions\emmet\out\test --disableExtensions --user-data-dir=%VSCODEUSERDATADIR% +if %errorlevel% neq 0 exit /b %errorlevel% :: Integration & performance tests in AMD call .\scripts\test.bat --runGlob **\*.integrationTest.js %* +if %errorlevel% neq 0 exit /b %errorlevel% :: Tests in commonJS (language servers tests...) call .\scripts\node-electron.bat .\node_modules\mocha\bin\_mocha .\extensions\html\server\out\test\ +if %errorlevel% neq 0 exit /b %errorlevel% rmdir /s /q %VSCODEUSERDATADIR% From 4d42f3d7af74227126af4630e27b67a0f3b7c6d7 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 12 Dec 2017 17:03:30 -0800 Subject: [PATCH 172/615] Support extension-less links in the markdown preview Fixes #39945 --- extensions/markdown/media/main.js | 45 ++++++++++++++----- extensions/markdown/src/markdownEngine.ts | 7 ++- .../parts/html/browser/webview-pre.js | 3 +- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/extensions/markdown/media/main.js b/extensions/markdown/media/main.js index ddf21afbbb9..82edb45b983 100644 --- a/extensions/markdown/media/main.js +++ b/extensions/markdown/media/main.js @@ -2,7 +2,7 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - +// @ts-check 'use strict'; (function () { @@ -29,6 +29,13 @@ }; } + function postMessage(command, args) { + window.parent.postMessage({ + command: 'did-click-link', + data: `command:${command}?${encodeURIComponent(JSON.stringify(args))}` + }, 'file://'); + } + /** * Find the html elements that map to a specific target line in the editor. * @@ -196,14 +203,34 @@ const offset = event.pageY; const line = getEditorLineNumberForPageOffset(offset); if (!isNaN(line)) { - const args = [settings.source, line]; - window.parent.postMessage({ - command: "did-click-link", - data: `command:_markdown.didClick?${encodeURIComponent(JSON.stringify(args))}` - }, "file://"); + postMessage('_markdown.didClick', [settings.source, line]); } }); + document.addEventListener('click', event => { + if (!event) { + return; + } + + const baseElement = document.getElementsByTagName('base')[0]; + + /** @type {any} */ + let node = event.target; + while (node) { + if (node.tagName && node.tagName.toLowerCase() === 'a' && node.href) { + if (node.href.startsWith('file://')) { + const [path, frag] = node.href.replace(/^file:\/\//i, '').split('#'); + postMessage('_markdown.openDocumentLink', { path, frag }); + event.preventDefault(); + event.stopPropagation(); + break; + } + break; + } + node = node.parentNode; + } + }, true); + if (settings.scrollEditorWithPreview) { window.addEventListener('scroll', throttle(() => { if (scrollDisabled) { @@ -211,11 +238,7 @@ } else { const line = getEditorLineNumberForPageOffset(window.scrollY); if (!isNaN(line)) { - const args = [settings.source, line]; - window.parent.postMessage({ - command: 'did-click-link', - data: `command:_markdown.revealLine?${encodeURIComponent(JSON.stringify(args))}` - }, 'file://'); + postMessage('_markdown.revealLine', [settings.source, line]); } } }, 50)); diff --git a/extensions/markdown/src/markdownEngine.ts b/extensions/markdown/src/markdownEngine.ts index 4ed96316277..a4be37ed984 100644 --- a/extensions/markdown/src/markdownEngine.ts +++ b/extensions/markdown/src/markdownEngine.ts @@ -137,8 +137,9 @@ export class MarkdownEngine { md.normalizeLink = (link: string) => { try { let uri = vscode.Uri.parse(link); - if (!uri.scheme && uri.path && !uri.fragment) { + if (!uri.scheme && uri.path) { // Assume it must be a file + const fragment = uri.fragment; if (uri.path[0] === '/') { const root = vscode.workspace.getWorkspaceFolder(this.currentDocument); if (root) { @@ -147,6 +148,10 @@ export class MarkdownEngine { } else { uri = vscode.Uri.file(path.join(path.dirname(this.currentDocument.path), uri.path)); } + + if (fragment) { + uri = uri.with({ fragment }); + } return normalizeLink(uri.toString(true)); } } catch (e) { diff --git a/src/vs/workbench/parts/html/browser/webview-pre.js b/src/vs/workbench/parts/html/browser/webview-pre.js index 3cfc357897a..29af803b49c 100644 --- a/src/vs/workbench/parts/html/browser/webview-pre.js +++ b/src/vs/workbench/parts/html/browser/webview-pre.js @@ -46,11 +46,12 @@ if (!event || !event.view || !event.view.document) { return; } + + var baseElement = event.view.document.getElementsByTagName('base')[0]; /** @type {any} */ var node = event.target; while (node) { if (node.tagName && node.tagName.toLowerCase() === 'a' && node.href) { - var baseElement = event.view.document.getElementsByTagName('base')[0]; if (node.getAttribute('href') === '#') { event.view.scrollTo(0, 0); } else if (node.hash && (node.getAttribute('href') === node.hash || (baseElement && node.href.indexOf(baseElement.href) >= 0))) { From 1b579ed2c1db27ed1b3b212ab24e8fd43ae68038 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 12 Dec 2017 17:10:55 -0800 Subject: [PATCH 173/615] Use es2016 for JS/TS inferred projects by default Fixes #40094 --- extensions/typescript/src/typescriptServiceClient.ts | 2 +- extensions/typescript/src/utils/tsconfig.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 89964180240..f4c054772c9 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -478,7 +478,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient private getCompilerOptionsForInferredProjects(configuration: TypeScriptServiceConfiguration): Proto.ExternalProjectCompilerOptions { const compilerOptions: Proto.ExternalProjectCompilerOptions = { module: 'CommonJS' as Proto.ModuleKind, - target: 'ES6' as Proto.ScriptTarget, + target: 'Es2016' as Proto.ScriptTarget, allowSyntheticDefaultImports: true, allowNonTsExtensions: true, allowJs: true, diff --git a/extensions/typescript/src/utils/tsconfig.ts b/extensions/typescript/src/utils/tsconfig.ts index fd65741cf5b..62c41e4a7a1 100644 --- a/extensions/typescript/src/utils/tsconfig.ts +++ b/extensions/typescript/src/utils/tsconfig.ts @@ -16,7 +16,7 @@ function getEmptyConfig( config: TypeScriptServiceConfiguration ) { const compilerOptions = [ - '"target": "ES6"', + '"target": "es2016"', '"module": "commonjs"', '"jsx": "preserve"', ]; From 5ddb6c20be0f242a0f279b1bbe29100baebb28a3 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 13 Dec 2017 04:22:08 +0300 Subject: [PATCH 174/615] Remove unnecessary transparent border --- src/vs/workbench/parts/debug/browser/debugActionsWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts index 5c8b5433016..408617d9966 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts @@ -170,7 +170,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi this.$el.style('border', `1px solid ${contrastBorderColor}`); } else { this.$el.style({ - 'border': `1px solid ${borderColor ? borderColor : 'transparent'}`, + 'border': borderColor ? `1px solid ${borderColor}` : 'none', 'border-width': '1px 0' }); } From a845443e14fddde5cc290b05a56adeec88223259 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 12 Dec 2017 17:26:14 -0800 Subject: [PATCH 175/615] Clean up inferred project config logic --- .../typescript/src/typescriptServiceClient.ts | 15 ++----- extensions/typescript/src/utils/tsconfig.ts | 40 ++++++++++++------- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index f4c054772c9..b5cbdc98d73 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -27,6 +27,7 @@ import { TypeScriptServiceConfiguration, TsServerLogLevel } from './utils/config import { TypeScriptVersionProvider, TypeScriptVersion } from './utils/versionProvider'; import { TypeScriptVersionPicker } from './utils/versionPicker'; import * as fileSchemes from './utils/fileSchemes'; +import { inferredProjectConfig } from './utils/tsconfig'; const localize = nls.loadMessageBundle(); @@ -476,20 +477,12 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient } private getCompilerOptionsForInferredProjects(configuration: TypeScriptServiceConfiguration): Proto.ExternalProjectCompilerOptions { - const compilerOptions: Proto.ExternalProjectCompilerOptions = { - module: 'CommonJS' as Proto.ModuleKind, - target: 'Es2016' as Proto.ScriptTarget, + return { + ...inferredProjectConfig(configuration), + allowJs: true, allowSyntheticDefaultImports: true, allowNonTsExtensions: true, - allowJs: true, - jsx: 'Preserve' as Proto.JsxEmit }; - - if (this.apiVersion.has230Features()) { - compilerOptions.checkJs = configuration.checkJs; - compilerOptions.experimentalDecorators = configuration.experimentalDecorators; - } - return compilerOptions; } private serviceExited(restart: boolean): void { diff --git a/extensions/typescript/src/utils/tsconfig.ts b/extensions/typescript/src/utils/tsconfig.ts index 62c41e4a7a1..93f87894377 100644 --- a/extensions/typescript/src/utils/tsconfig.ts +++ b/extensions/typescript/src/utils/tsconfig.ts @@ -5,27 +5,39 @@ import * as vscode from 'vscode'; import * as path from 'path'; +import * as Proto from '../protocol'; + import { TypeScriptServiceConfiguration } from './configuration'; export function isImplicitProjectConfigFile(configFileName: string) { return configFileName.indexOf('/dev/null/') === 0; } -function getEmptyConfig( - isTypeScriptProject: boolean, +export function inferredProjectConfig( + config: TypeScriptServiceConfiguration +): Proto.ExternalProjectCompilerOptions { + const base: Proto.ExternalProjectCompilerOptions = { + module: 'commonjs' as Proto.ModuleKind, + target: 'es2016' as Proto.ScriptTarget, + jsx: 'preserve' as Proto.JsxEmit + }; + + if (config.checkJs) { + base.checkJs = true; + } + + if (config.experimentalDecorators) { + base.experimentalDecorators = true; + } + + return base; +} + +function getEmptyConfigSnippet( config: TypeScriptServiceConfiguration ) { - const compilerOptions = [ - '"target": "es2016"', - '"module": "commonjs"', - '"jsx": "preserve"', - ]; - if (!isTypeScriptProject && config.checkJs) { - compilerOptions.push('"checkJs": true'); - } - if (!isTypeScriptProject && config.experimentalDecorators) { - compilerOptions.push('"experimentalDecorators": true'); - } + const baseConfig = inferredProjectConfig(config); + const compilerOptions = Object.keys(baseConfig).map(key => `"${key}": ${JSON.stringify(baseConfig[key])}`); return new vscode.SnippetString(`{ "compilerOptions": { ${compilerOptions.join(',\n\t\t')}$0 @@ -51,7 +63,7 @@ export async function openOrCreateConfigFile( const doc = await vscode.workspace.openTextDocument(configFile.with({ scheme: 'untitled' })); const editor = await vscode.window.showTextDocument(doc, col); if (editor.document.getText().length === 0) { - await editor.insertSnippet(getEmptyConfig(isTypeScriptProject, config)); + await editor.insertSnippet(getEmptyConfigSnippet(config)); } return editor; } From 8ab94979981d3df7a2fb034d97a84972dff88924 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 12 Dec 2017 17:32:33 -0800 Subject: [PATCH 176/615] Make name clearer --- extensions/typescript/src/utils/tsconfig.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/typescript/src/utils/tsconfig.ts b/extensions/typescript/src/utils/tsconfig.ts index 93f87894377..91293a8cc11 100644 --- a/extensions/typescript/src/utils/tsconfig.ts +++ b/extensions/typescript/src/utils/tsconfig.ts @@ -33,7 +33,7 @@ export function inferredProjectConfig( return base; } -function getEmptyConfigSnippet( +function inferredProjectConfigSnippet( config: TypeScriptServiceConfiguration ) { const baseConfig = inferredProjectConfig(config); @@ -63,7 +63,7 @@ export async function openOrCreateConfigFile( const doc = await vscode.workspace.openTextDocument(configFile.with({ scheme: 'untitled' })); const editor = await vscode.window.showTextDocument(doc, col); if (editor.document.getText().length === 0) { - await editor.insertSnippet(getEmptyConfigSnippet(config)); + await editor.insertSnippet(inferredProjectConfigSnippet(config)); } return editor; } From 161c47988f0b1d364c1eff2ad26fa94bd8db603d Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 12 Dec 2017 17:52:36 -0800 Subject: [PATCH 177/615] Remove logging of TS Server start error message --- extensions/typescript/src/typescriptServiceClient.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index b5cbdc98d73..e823eaba480 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -331,11 +331,9 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient this.error('Starting TSServer failed with error.', err); window.showErrorMessage(localize('serverCouldNotBeStarted', 'TypeScript language server couldn\'t be started. Error message is: {0}', err.message || err)); /* __GDPR__ - "error" : { - "message": { "classification": "CustomerContent", "purpose": "PerformanceAndHealth" } - } + "error" : {} */ - this.logTelemetry('error', { message: err.message }); + this.logTelemetry('error'); this.resetClientVersion(); return; } From 2652b3f9b8b77a9184d8d47f610905758ce32a19 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 12 Dec 2017 18:11:14 -0800 Subject: [PATCH 178/615] Support link with line number in md editor Fixes #40140 --- extensions/markdown/src/commands.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/extensions/markdown/src/commands.ts b/extensions/markdown/src/commands.ts index 0051c2fa0f8..af92114b50a 100644 --- a/extensions/markdown/src/commands.ts +++ b/extensions/markdown/src/commands.ts @@ -264,6 +264,16 @@ export class OpenDocumentLinkCommand implements Command { new vscode.Range(line, 0, line, 0), vscode.TextEditorRevealType.AtTop); } + + const lineNumberFragment = args.fragment.match(/^L(\d+)$/); + if (lineNumberFragment) { + const line = +lineNumberFragment[1] - 1; + if (!isNaN(line)) { + return editor.revealRange( + new vscode.Range(line, 0, line, 0), + vscode.TextEditorRevealType.AtTop); + } + } } }; From 6ccc79823dd30b5e3316f4e04fdcb4d3b546efdf Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 12 Dec 2017 18:12:57 -0800 Subject: [PATCH 179/615] Fix fragment name --- extensions/markdown/media/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/markdown/media/main.js b/extensions/markdown/media/main.js index 82edb45b983..4b5cf807476 100644 --- a/extensions/markdown/media/main.js +++ b/extensions/markdown/media/main.js @@ -219,8 +219,8 @@ while (node) { if (node.tagName && node.tagName.toLowerCase() === 'a' && node.href) { if (node.href.startsWith('file://')) { - const [path, frag] = node.href.replace(/^file:\/\//i, '').split('#'); - postMessage('_markdown.openDocumentLink', { path, frag }); + const [path, fragment] = node.href.replace(/^file:\/\//i, '').split('#'); + postMessage('_markdown.openDocumentLink', { path, fragment }); event.preventDefault(); event.stopPropagation(); break; From daa3a0ec2ec5a54dad8b8adf9da2b7c039524096 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 12 Dec 2017 19:07:41 -0800 Subject: [PATCH 180/615] Add ExtHostLogService with logger and lazily created log folder per extension --- src/vs/platform/log/node/spdlogService.ts | 5 +- src/vs/vscode.d.ts | 30 ++++++ src/vs/workbench/api/node/extHost.api.impl.ts | 8 +- src/vs/workbench/api/node/extHost.protocol.ts | 7 +- .../api/node/extHostExtensionService.ts | 6 +- .../workbench/api/node/extHostLogService.ts | 95 +++++++++++++++++++ src/vs/workbench/api/node/extHostTypes.ts | 10 ++ src/vs/workbench/node/extensionHostMain.ts | 2 +- 8 files changed, 156 insertions(+), 7 deletions(-) create mode 100644 src/vs/workbench/api/node/extHostLogService.ts diff --git a/src/vs/platform/log/node/spdlogService.ts b/src/vs/platform/log/node/spdlogService.ts index 726bd185dcb..d39af82182d 100644 --- a/src/vs/platform/log/node/spdlogService.ts +++ b/src/vs/platform/log/node/spdlogService.ts @@ -10,10 +10,11 @@ import { ILogService, LogLevel, NullLogService } from 'vs/platform/log/common/lo import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { RotatingLogger, setAsyncMode } from 'spdlog'; -export function createLogService(processName: string, environmentService: IEnvironmentService): ILogService { +export function createLogService(processName: string, environmentService: IEnvironmentService, logsSubfolder?: string): ILogService { try { setAsyncMode(8192, 2000); - const logfilePath = path.join(environmentService.logsPath, `${processName}.log`); + const logsDirPath = logsSubfolder ? path.join(environmentService.logsPath, logsSubfolder) : environmentService.logsPath; + const logfilePath = path.join(logsDirPath, `${processName}.log`); const logger = new RotatingLogger(processName, logfilePath, 1024 * 1024 * 5, 6); logger.setLevel(0); diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 86982258339..65354174c44 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -4325,6 +4325,29 @@ declare module 'vscode' { resolveTask(task: Task, token?: CancellationToken): ProviderResult; } + export enum LogLevel { + Trace = 1, + Debug = 2, + Info = 3, + Warning = 4, + Error = 5, + Critical = 6, + Off = 7 + } + + export interface ILogger { + onDidChangeLogLevel: Event; + getLevel(): LogLevel; + getLogDirectory(): Thenable; + + trace(message: string, ...args: any[]): void; + debug(message: string, ...args: any[]): void; + info(message: string, ...args: any[]): void; + warn(message: string, ...args: any[]): void; + error(message: string | Error, ...args: any[]): void; + critical(message: string | Error, ...args: any[]): void; + } + /** * Namespace describing the environment the editor runs in. */ @@ -4365,6 +4388,13 @@ declare module 'vscode' { * @readonly */ export let sessionId: string; + + /** + * Something + * + * @readonly + */ + export let logger: ILogger; } /** diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index ed71e123c75..6c3cdb9f832 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -59,6 +59,8 @@ import { toGlobPattern, toLanguageSelector } from 'vs/workbench/api/node/extHost import { ExtensionActivatedByAPI } from 'vs/workbench/api/node/extHostExtensionActivator'; import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import { ILogService } from 'vs/platform/log/common/log'; +import { ExtHostLogService } from 'vs/workbench/api/node/extHostLogService'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; export interface IExtensionApiFactory { (extension: IExtensionDescription): typeof vscode; @@ -83,7 +85,8 @@ export function createApiFactory( extHostWorkspace: ExtHostWorkspace, extHostConfiguration: ExtHostConfiguration, extensionService: ExtHostExtensionService, - logService: ILogService + logService: ILogService, + environmentService: IEnvironmentService ): IExtensionApiFactory { // Addressable instances @@ -121,6 +124,7 @@ export function createApiFactory( const extHostProgress = new ExtHostProgress(threadService.get(MainContext.MainThreadProgress)); const extHostOutputService = new ExtHostOutputService(threadService); const extHostLanguages = new ExtHostLanguages(threadService); + const extHostLogService = new ExtHostLogService(environmentService); // Register API-ish commands ExtHostApiCommands.register(extHostCommands); @@ -202,6 +206,7 @@ export function createApiFactory( get language() { return Platform.language; }, get appName() { return product.nameLong; }, get appRoot() { return initData.environment.appRoot; }, + get logger() { return extHostLogService.getExtLogger(extension.id); }, }); // namespace: extensions @@ -570,6 +575,7 @@ export function createApiFactory( Hover: extHostTypes.Hover, IndentAction: languageConfiguration.IndentAction, Location: extHostTypes.Location, + LogLevel: extHostTypes.LogLevel, MarkdownString: extHostTypes.MarkdownString, OverviewRulerLane: EditorCommon.OverviewRulerLane, ParameterInformation: extHostTypes.ParameterInformation, diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index f9fd93dfa20..67091188abb 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -33,7 +33,7 @@ import { IConfigurationData, ConfigurationTarget, IConfigurationModel } from 'vs import { IPickOpenEntry, IPickOptions } from 'vs/platform/quickOpen/common/quickOpen'; import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import { TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions'; -import { EndOfLine, TextEditorLineNumbersStyle } from 'vs/workbench/api/node/extHostTypes'; +import { EndOfLine, TextEditorLineNumbersStyle, LogLevel } from 'vs/workbench/api/node/extHostTypes'; import { TaskSet } from 'vs/workbench/parts/tasks/common/tasks'; @@ -673,6 +673,10 @@ export interface ExtHostWindowShape { $onDidChangeWindowFocus(value: boolean): void; } +export interface ExtHostLogServiceShape { + $acceptLogLevelChanged(logLevel: LogLevel): void; +} + // --- proxy identifiers export const MainContext = { @@ -723,6 +727,7 @@ export const ExtHostContext = { ExtHostLanguageFeatures: createExtId('ExtHostLanguageFeatures'), ExtHostQuickOpen: createExtId('ExtHostQuickOpen'), ExtHostExtensionService: createExtId('ExtHostExtensionService'), + // ExtHostLogService: createExtId('ExtHostLogService'), ExtHostTerminalService: createExtId('ExtHostTerminalService'), ExtHostSCM: createExtId('ExtHostSCM'), ExtHostTask: createExtId('ExtHostTask'), diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 71a56b06be4..321b24b8f2b 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -21,6 +21,7 @@ import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { TernarySearchTree } from 'vs/base/common/map'; import { Barrier } from 'vs/base/common/async'; import { ILogService } from 'vs/platform/log/common/log'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; class ExtensionMemento implements IExtensionMemento { @@ -127,7 +128,8 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { threadService: ExtHostThreadService, extHostWorkspace: ExtHostWorkspace, extHostConfiguration: ExtHostConfiguration, - logService: ILogService + logService: ILogService, + environmentService: IEnvironmentService ) { this._barrier = new Barrier(); this._registry = new ExtensionDescriptionRegistry(initData.extensions); @@ -140,7 +142,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { this._activator = null; // initialize API first (i.e. do not release barrier until the API is initialized) - const apiFactory = createApiFactory(initData, threadService, extHostWorkspace, extHostConfiguration, this, logService); + const apiFactory = createApiFactory(initData, threadService, extHostWorkspace, extHostConfiguration, this, logService, environmentService); initializeExtensionApi(this, apiFactory).then(() => { diff --git a/src/vs/workbench/api/node/extHostLogService.ts b/src/vs/workbench/api/node/extHostLogService.ts new file mode 100644 index 00000000000..347dc8c6be0 --- /dev/null +++ b/src/vs/workbench/api/node/extHostLogService.ts @@ -0,0 +1,95 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as path from 'path'; +import * as vscode from 'vscode'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { mkdirp, dirExists } from 'vs/base/node/pfs'; +import Event, { Emitter } from 'vs/base/common/event'; +import { ExtHostLogServiceShape } from './extHost.protocol'; +import { LogLevel } from 'vs/workbench/api/node/extHostTypes'; +import { ILogService } from 'vs/platform/log/common/log'; +import { createLogService } from 'vs/platform/log/node/spdlogService'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; + +export class ExtHostLogService implements ExtHostLogServiceShape { + private _loggers: Map = new Map(); + + private _onDidChangeLogLevel: Emitter; + get onDidChangeLogLevel(): Event { return this._onDidChangeLogLevel.event; } + + constructor(private _environmentService: IEnvironmentService) { + this._onDidChangeLogLevel = new Emitter(); + } + + $acceptLogLevelChanged(logLevel: LogLevel): void { + this._onDidChangeLogLevel.fire(logLevel); + } + + getExtLogger(extensionID: string): ExtHostLogger { + if (!this._loggers.has(extensionID)) { + const logService = createLogService(extensionID, this._environmentService, extensionID); + const logsDirPath = path.join(this._environmentService.logsPath, extensionID); + this._loggers.set(extensionID, new ExtHostLogger(this, logService, logsDirPath)); + } + + return this._loggers.get(extensionID); + } +} + +export class ExtHostLogger implements vscode.ILogger { + private _currentLevel: LogLevel; + + get onDidChangeLogLevel(): Event { return this._extHostLogService.onDidChangeLogLevel; } + + constructor( + private readonly _extHostLogService: ExtHostLogService, + private readonly _logService: ILogService, + private readonly _logDirectory: string + ) { + this._extHostLogService.onDidChangeLogLevel(logLevel => this._currentLevel = logLevel); + } + + getLogDirectory(): TPromise { + return dirExists(this._logDirectory).then(exists => { + if (exists) { + return TPromise.wrap(null); + } else { + return mkdirp(this._logDirectory); + } + }).then(() => { + return this._logDirectory; + }); + } + + getLevel(): vscode.LogLevel { + return this._currentLevel; + } + + trace(message: string, ...args: any[]): void { + return this._logService.trace(message, ...args); + } + + debug(message: string, ...args: any[]): void { + return this._logService.debug(message, ...args); + } + + info(message: string, ...args: any[]): void { + return this._logService.info(message, ...args); + } + + warn(message: string, ...args: any[]): void { + return this._logService.warn(message, ...args); + } + + error(message: string | Error, ...args: any[]): void { + return this._logService.error(message, ...args); + } + + critical(message: string | Error, ...args: any[]): void { + return this._logService.critical(message, ...args); + } +} diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index b0cc9b02062..a81d0c845eb 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1531,3 +1531,13 @@ export class FunctionBreakpoint extends Breakpoint { this.functionName = functionName; } } + +export enum LogLevel { + Trace = 1, + Debug = 2, + Info = 3, + Warning = 4, + Error = 5, + Critical = 6, + Off = 7 +} diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index 952ef7e4f96..122a62f3277 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -98,7 +98,7 @@ export class ExtensionHostMain { this._logService.trace('initData', initData); this._extHostConfiguration = new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), extHostWorkspace, initData.configuration); - this._extensionService = new ExtHostExtensionService(initData, threadService, extHostWorkspace, this._extHostConfiguration, this._logService); + this._extensionService = new ExtHostExtensionService(initData, threadService, extHostWorkspace, this._extHostConfiguration, this._logService, environmentService); // error forwarding and stack trace scanning const extensionErrors = new WeakMap(); From b3fde70cb49072334d6db70262b168a2d86f2c7c Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 12 Dec 2017 19:23:24 -0800 Subject: [PATCH 181/615] Move extension logger to extension context --- src/vs/vscode.d.ts | 12 +++++------- src/vs/workbench/api/node/extHost.api.impl.ts | 7 +------ .../workbench/api/node/extHostExtensionActivator.ts | 2 ++ src/vs/workbench/api/node/extHostExtensionService.ts | 9 +++++++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 65354174c44..4b45a1d37c9 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3930,6 +3930,11 @@ declare module 'vscode' { * [`globalState`](#ExtensionContext.globalState) to store key value data. */ storagePath: string | undefined; + + /** + * A logger + */ + logger: ILogger; } /** @@ -4388,13 +4393,6 @@ declare module 'vscode' { * @readonly */ export let sessionId: string; - - /** - * Something - * - * @readonly - */ - export let logger: ILogger; } /** diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 6c3cdb9f832..4647ecd9814 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -59,8 +59,6 @@ import { toGlobPattern, toLanguageSelector } from 'vs/workbench/api/node/extHost import { ExtensionActivatedByAPI } from 'vs/workbench/api/node/extHostExtensionActivator'; import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import { ILogService } from 'vs/platform/log/common/log'; -import { ExtHostLogService } from 'vs/workbench/api/node/extHostLogService'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; export interface IExtensionApiFactory { (extension: IExtensionDescription): typeof vscode; @@ -85,8 +83,7 @@ export function createApiFactory( extHostWorkspace: ExtHostWorkspace, extHostConfiguration: ExtHostConfiguration, extensionService: ExtHostExtensionService, - logService: ILogService, - environmentService: IEnvironmentService + logService: ILogService ): IExtensionApiFactory { // Addressable instances @@ -124,7 +121,6 @@ export function createApiFactory( const extHostProgress = new ExtHostProgress(threadService.get(MainContext.MainThreadProgress)); const extHostOutputService = new ExtHostOutputService(threadService); const extHostLanguages = new ExtHostLanguages(threadService); - const extHostLogService = new ExtHostLogService(environmentService); // Register API-ish commands ExtHostApiCommands.register(extHostCommands); @@ -206,7 +202,6 @@ export function createApiFactory( get language() { return Platform.language; }, get appName() { return product.nameLong; }, get appRoot() { return initData.environment.appRoot; }, - get logger() { return extHostLogService.getExtLogger(extension.id); }, }); // namespace: extensions diff --git a/src/vs/workbench/api/node/extHostExtensionActivator.ts b/src/vs/workbench/api/node/extHostExtensionActivator.ts index 5038d467d3b..b0949051e4f 100644 --- a/src/vs/workbench/api/node/extHostExtensionActivator.ts +++ b/src/vs/workbench/api/node/extHostExtensionActivator.ts @@ -10,6 +10,7 @@ import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/node/extensionDescriptionRegistry'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; +import { ExtHostLogger } from 'vs/workbench/api/node/extHostLogService'; const hasOwnProperty = Object.hasOwnProperty; const NO_OP_VOID_PROMISE = TPromise.wrap(void 0); @@ -26,6 +27,7 @@ export interface IExtensionContext { extensionPath: string; storagePath: string; asAbsolutePath(relativePath: string): string; + logger: ExtHostLogger; } /** diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 321b24b8f2b..92f57ca8706 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -22,6 +22,7 @@ import { TernarySearchTree } from 'vs/base/common/map'; import { Barrier } from 'vs/base/common/async'; import { ILogService } from 'vs/platform/log/common/log'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { ExtHostLogService } from 'vs/workbench/api/node/extHostLogService'; class ExtensionMemento implements IExtensionMemento { @@ -119,6 +120,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { private readonly _storagePath: ExtensionStoragePath; private readonly _proxy: MainThreadExtensionServiceShape; private readonly _logService: ILogService; + private readonly _extHostLogService: ExtHostLogService; private _activator: ExtensionsActivator; private _extensionPathIndex: TPromise>; /** @@ -140,9 +142,10 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { this._storagePath = new ExtensionStoragePath(initData.workspace, initData.environment); this._proxy = this._threadService.get(MainContext.MainThreadExtensionService); this._activator = null; + this._extHostLogService = new ExtHostLogService(environmentService); // initialize API first (i.e. do not release barrier until the API is initialized) - const apiFactory = createApiFactory(initData, threadService, extHostWorkspace, extHostConfiguration, this, logService, environmentService); + const apiFactory = createApiFactory(initData, threadService, extHostWorkspace, extHostConfiguration, this, logService); initializeExtensionApi(this, apiFactory).then(() => { @@ -334,13 +337,15 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { workspaceState.whenReady, this._storagePath.whenReady ]).then(() => { + const that = this; return Object.freeze({ globalState, workspaceState, subscriptions: [], get extensionPath() { return extensionDescription.extensionFolderPath; }, storagePath: this._storagePath.value(extensionDescription), - asAbsolutePath: (relativePath: string) => { return join(extensionDescription.extensionFolderPath, relativePath); } + asAbsolutePath: (relativePath: string) => { return join(extensionDescription.extensionFolderPath, relativePath); }, + get logger() { return that._extHostLogService.getExtLogger(extensionDescription.id); } }); }); } From 76662d7b9361104b4ca5c28d787a819c9dd73967 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 12 Dec 2017 21:01:42 -0800 Subject: [PATCH 182/615] Bump node-debug2 (loc) --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index a68a796a764..98c32784879 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -46,7 +46,7 @@ const nodeModules = ['electron', 'original-fs'] const builtInExtensions = [ { name: 'ms-vscode.node-debug', version: '1.20.0' }, - { name: 'ms-vscode.node-debug2', version: '1.19.3' } + { name: 'ms-vscode.node-debug2', version: '1.19.4' } ]; const excludedExtensions = [ From ef592066d76f65de2afd0c4abeeb11833ac32bd3 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 13 Dec 2017 07:43:53 +0100 Subject: [PATCH 183/615] Menu: keybinding Cmd+O does not show up in File menu (fixes #40145) --- src/vs/code/electron-main/menus.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index a3207fa5aa6..70870dafe13 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -1097,11 +1097,6 @@ export class CodeMenu { const enabled = typeof arg3 === 'boolean' ? arg3 : this.windowsMainService.getWindowCount() > 0; const checked = typeof arg4 === 'boolean' ? arg4 : false; - let commandId: string; - if (typeof arg2 === 'string') { - commandId = arg2; - } - const options: Electron.MenuItemConstructorOptions = { label, click, @@ -1113,6 +1108,13 @@ export class CodeMenu { options['checked'] = checked; } + let commandId: string; + if (typeof arg2 === 'string') { + commandId = arg2; + } else if (Array.isArray(arg2)) { + commandId = arg2[0]; + } + return new MenuItem(this.withKeybinding(commandId, options)); } From 32d43295f0a1b7b3f4bdc2fbee724362e7e9a17a Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 12 Dec 2017 17:42:44 +0100 Subject: [PATCH 184/615] debt - remove last public writeable field from timer service --- src/vs/workbench/electron-browser/main.ts | 3 ++- src/vs/workbench/electron-browser/shell.ts | 2 +- src/vs/workbench/services/timer/common/timerService.ts | 3 --- src/vs/workbench/services/timer/node/timerService.ts | 7 ++----- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index 5483c618544..719c6d914d6 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -6,6 +6,7 @@ 'use strict'; import nls = require('vs/nls'); +import * as perf from 'vs/base/common/performance'; import { TPromise } from 'vs/base/common/winjs.base'; import { WorkbenchShell } from 'vs/workbench/electron-browser/shell'; import * as browser from 'vs/base/browser/browser'; @@ -88,7 +89,7 @@ function openWorkbench(configuration: IWindowConfiguration): TPromise { return domContentLoaded().then(() => { // Open Shell - timerService.beforeWorkbenchOpen = Date.now(); + perf.mark('willStartWorkbench'); const shell = new WorkbenchShell(document.body, { contextService: workspaceService, configurationService: workspaceService, diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 43bc6e4d476..ace1369afb0 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -252,7 +252,7 @@ export class WorkbenchShell { }); // Telemetry: startup metrics - this.timerService.workbenchStarted = Date.now(); + perf.mark('didStartWorkbench'); this.extensionService.whenInstalledExtensionsRegistered().done(() => { /* __GDPR__ "startupTime" : { diff --git a/src/vs/workbench/services/timer/common/timerService.ts b/src/vs/workbench/services/timer/common/timerService.ts index e618522c18a..5b06fc4cdef 100644 --- a/src/vs/workbench/services/timer/common/timerService.ts +++ b/src/vs/workbench/services/timer/common/timerService.ts @@ -95,8 +95,5 @@ export interface IInitData { export interface ITimerService extends IInitData { _serviceBrand: any; - beforeWorkbenchOpen: number; - workbenchStarted: number; - readonly startupMetrics: IStartupMetrics; } diff --git a/src/vs/workbench/services/timer/node/timerService.ts b/src/vs/workbench/services/timer/node/timerService.ts index 7609345de3b..972dae9b351 100644 --- a/src/vs/workbench/services/timer/node/timerService.ts +++ b/src/vs/workbench/services/timer/node/timerService.ts @@ -20,9 +20,6 @@ export class TimerService implements ITimerService { public readonly isInitialStartup: boolean; public readonly hasAccessibilitySupport: boolean; - public beforeWorkbenchOpen: number; - public workbenchStarted: number; - private _startupMetrics: IStartupMetrics; constructor(initData: IInitData, private isEmptyWorkbench: boolean) { @@ -77,14 +74,14 @@ export class TimerService implements ITimerService { this._startupMetrics = { version: 1, - ellapsed: this.workbenchStarted - start, + ellapsed: perf.getEntry('mark', 'didStartWorkbench').startTime - start, timers: { ellapsedExtensions: perf.getDuration('willLoadExtensions', 'didLoadExtensions'), ellapsedExtensionsReady: perf.getEntry('mark', 'didLoadExtensions').startTime - start, ellapsedRequire: perf.getDuration('willLoadWorkbenchMain', 'didLoadWorkbenchMain'), ellapsedEditorRestore: perf.getDuration('willRestoreEditors', 'didRestoreEditors'), ellapsedViewletRestore: perf.getDuration('willRestoreViewlet', 'didRestoreViewlet'), - ellapsedWorkbench: this.workbenchStarted - this.beforeWorkbenchOpen, + ellapsedWorkbench: perf.getDuration('willStartWorkbench', 'didStartWorkbench'), ellapsedWindowLoadToRequire: perf.getEntry('mark', 'willLoadWorkbenchMain').startTime - this.windowLoad, ellapsedTimersToTimersComputed: Date.now() - now }, From 57c37e0cba1b81e4451c28adf5beeb20960f58d4 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 13 Dec 2017 10:19:29 +0100 Subject: [PATCH 185/615] :lipstick: --- src/vs/base/browser/ui/splitview/splitview.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 525365b8638..9c6657154b8 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -95,6 +95,7 @@ export class SplitView implements IDisposable { get length(): number { return this.viewItems.length; } + constructor(container: HTMLElement, options: ISplitViewOptions = {}) { this.orientation = types.isUndefined(options.orientation) ? Orientation.VERTICAL : options.orientation; From 8335810fb1db04a6b9cc7fcbd29fe3546bfd0c1b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 10:36:30 +0100 Subject: [PATCH 186/615] lazy load gc-signals #40147 --- .../electron-browser/mainThreadHeapService.ts | 101 +++++++++--------- 1 file changed, 52 insertions(+), 49 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts b/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts index e962c85b7ac..5ffe57fc296 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts @@ -5,14 +5,14 @@ 'use strict'; -import { TPromise } from 'vs/base/common/winjs.base'; import { ExtHostContext, ObjectIdentifier, IExtHostContext } from '../node/extHost.protocol'; -import { consumeSignals, GCSignal } from 'gc-signals'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import Event, { Emitter } from 'vs/base/common/event'; import { IDisposable } from 'vs/base/common/lifecycle'; import { extHostCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; +import { isThenable } from 'vs/base/common/async'; +import { isNullOrUndefined } from 'util'; export const IHeapService = createDecorator('heapService'); @@ -25,16 +25,9 @@ export interface IHeapService { * Track gc-collection for all new objects that * have the $ident-value set. */ - trackRecursive(p: TPromise): TPromise; - - /** - * Track gc-collection for all new objects that - * have the $ident-value set. - */ - trackRecursive(obj: T): T; + trackRecursive(obj: T | Thenable): Thenable; } - export class HeapService implements IHeapService { _serviceBrand: any; @@ -42,75 +35,85 @@ export class HeapService implements IHeapService { private _onGarbageCollection: Emitter = new Emitter(); public readonly onGarbageCollection: Event = this._onGarbageCollection.event; - private _activeSignals = new WeakMap(); + private _activeSignals = new WeakMap(); private _activeIds = new Set(); private _consumeHandle: number; constructor() { - this._consumeHandle = setInterval(() => { - const ids = consumeSignals(); - - if (ids.length > 0) { - // local book-keeping - for (const id of ids) { - this._activeIds.delete(id); - } - - // fire event - this._onGarbageCollection.fire(ids); - } - - }, 15 * 1000); + // } dispose() { clearInterval(this._consumeHandle); } - trackRecursive(p: TPromise): TPromise; - trackRecursive(obj: T): T; - trackRecursive(obj: any): any { - if (TPromise.is(obj)) { + trackRecursive(obj: T | Thenable): Thenable { + if (isThenable(obj)) { return obj.then(result => this.trackRecursive(result)); } else { return this._doTrackRecursive(obj); } } - private _doTrackRecursive(obj: any): any { + private _doTrackRecursive(obj: any): Promise { - const stack = [obj]; - while (stack.length > 0) { + if (isNullOrUndefined(obj)) { + return Promise.resolve(obj); + } - // remove first element - let obj = stack.shift(); + return import('gc-signals').then(({ GCSignal, consumeSignals }) => { - if (!obj || typeof obj !== 'object') { - continue; + if (this._consumeHandle === void 0) { + // ensure that there is one consumer of signals + this._consumeHandle = setInterval(() => { + const ids = consumeSignals(); + + if (ids.length > 0) { + // local book-keeping + for (const id of ids) { + this._activeIds.delete(id); + } + + // fire event + this._onGarbageCollection.fire(ids); + } + + }, 15 * 1000); } - for (let key in obj) { - if (!Object.prototype.hasOwnProperty.call(obj, key)) { + const stack = [obj]; + while (stack.length > 0) { + + // remove first element + let obj = stack.shift(); + + if (!obj || typeof obj !== 'object') { continue; } - const value = obj[key]; - // recurse -> object/array - if (typeof value === 'object') { - stack.push(value); + for (let key in obj) { + if (!Object.prototype.hasOwnProperty.call(obj, key)) { + continue; + } - } else if (key === ObjectIdentifier.name) { - // track new $ident-objects + const value = obj[key]; + // recurse -> object/array + if (typeof value === 'object') { + stack.push(value); - if (typeof value === 'number' && !this._activeIds.has(value)) { - this._activeIds.add(value); - this._activeSignals.set(obj, new GCSignal(value)); + } else if (key === ObjectIdentifier.name) { + // track new $ident-objects + + if (typeof value === 'number' && !this._activeIds.has(value)) { + this._activeIds.add(value); + this._activeSignals.set(obj, new GCSignal(value)); + } } } } - } - return obj; + return obj; + }); } } From 430d61688aafa594ea17feeef78a02f6d622be3a Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 13 Dec 2017 10:49:16 +0100 Subject: [PATCH 187/615] debug: first set active session then fire event --- src/vs/workbench/parts/debug/electron-browser/debugService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 451c413ffe3..2c40cabf0a3 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -870,8 +870,8 @@ export class DebugService implements debug.IDebugService { if (session.disconnected) { return TPromise.as(null); } - this._onDidNewProcess.fire(process); this.focusStackFrameAndEvaluate(null, process); + this._onDidNewProcess.fire(process); const internalConsoleOptions = configuration.internalConsoleOptions || this.configurationService.getValue('debug').internalConsoleOptions; if (internalConsoleOptions === 'openOnSessionStart' || (this.firstSessionStart && internalConsoleOptions === 'openOnFirstSessionStart')) { From 09f3da07b8a91f88e8687d810ba69cc18a9416d4 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 13 Dec 2017 10:59:52 +0100 Subject: [PATCH 188/615] debug: no need for 1px to be specified in border --- src/vs/workbench/parts/debug/browser/debugActionsWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts index 408617d9966..be703eb3c65 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts @@ -170,7 +170,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi this.$el.style('border', `1px solid ${contrastBorderColor}`); } else { this.$el.style({ - 'border': borderColor ? `1px solid ${borderColor}` : 'none', + 'border': borderColor ? `solid ${borderColor}` : 'none', 'border-width': '1px 0' }); } From c219c3f73382e57847bcc76f56106dc05d392db6 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 11:18:04 +0100 Subject: [PATCH 189/615] debt - remove appReady from timerService, use perf-marks --- src/main.js | 1 - src/vs/code/electron-main/window.ts | 1 - src/vs/workbench/electron-browser/bootstrap/index.js | 1 - src/vs/workbench/services/timer/common/timerService.ts | 4 ---- src/vs/workbench/services/timer/node/timerService.ts | 6 ++---- 5 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/main.js b/src/main.js index 3192f1f086c..6e29b5203a6 100644 --- a/src/main.js +++ b/src/main.js @@ -219,7 +219,6 @@ var nodeCachedDataDir = getNodeCachedDataDir().then(function (value) { // Load our code once ready app.once('ready', function () { perf.mark('main:appReady'); - global.perfAppReady = Date.now(); var nlsConfig = getNLSConfiguration(); process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig); diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index bdf16efb1f5..4c37dd6e993 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -587,7 +587,6 @@ export class CodeWindow implements ICodeWindow { // Perf Counters windowConfiguration.perfEntries = exportEntries(); windowConfiguration.perfStartTime = global.perfStartTime; - windowConfiguration.perfAppReady = global.perfAppReady; windowConfiguration.perfWindowLoadTime = Date.now(); // Config (combination of process.argv and window configuration) diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index 9357afcaeab..867ed81842e 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -175,7 +175,6 @@ function main() { isInitialStartup: !!configuration.isInitialStartup, hasAccessibilitySupport: !!configuration.accessibilitySupport, start: configuration.perfStartTime, - appReady: configuration.perfAppReady, windowLoad: configuration.perfWindowLoadTime }; diff --git a/src/vs/workbench/services/timer/common/timerService.ts b/src/vs/workbench/services/timer/common/timerService.ts index 5b06fc4cdef..f6ca71866cb 100644 --- a/src/vs/workbench/services/timer/common/timerService.ts +++ b/src/vs/workbench/services/timer/common/timerService.ts @@ -83,11 +83,7 @@ export interface IStartupMetrics { export interface IInitData { start: number; - - appReady: number; - windowLoad: number; - isInitialStartup: boolean; hasAccessibilitySupport: boolean; } diff --git a/src/vs/workbench/services/timer/node/timerService.ts b/src/vs/workbench/services/timer/node/timerService.ts index 972dae9b351..7a49b00ba65 100644 --- a/src/vs/workbench/services/timer/node/timerService.ts +++ b/src/vs/workbench/services/timer/node/timerService.ts @@ -14,7 +14,6 @@ export class TimerService implements ITimerService { public _serviceBrand: any; public readonly start: number; - public readonly appReady: number; public readonly windowLoad: number; public readonly isInitialStartup: boolean; @@ -24,7 +23,6 @@ export class TimerService implements ITimerService { constructor(initData: IInitData, private isEmptyWorkbench: boolean) { this.start = initData.start; - this.appReady = initData.appReady; this.windowLoad = initData.windowLoad; this.isInitialStartup = initData.isInitialStartup; @@ -100,8 +98,8 @@ export class TimerService implements ITimerService { }; if (initialStartup) { - this._startupMetrics.timers.ellapsedAppReady = this.appReady - this.start; - this._startupMetrics.timers.ellapsedWindowLoad = this.windowLoad - this.appReady; + this._startupMetrics.timers.ellapsedAppReady = perf.getDuration('main:started', 'main:appReady'); + this._startupMetrics.timers.ellapsedWindowLoad = this.windowLoad - perf.getEntry('mark', 'main:appReady').startTime; } } } From 13bb4c9b85e3a70ee2a9124c3861e58ca3d04815 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 13 Dec 2017 12:03:53 +0100 Subject: [PATCH 190/615] detect submodules, make them a part of status --- extensions/git/src/git.ts | 92 ++++++++++++++++++++++++----- extensions/git/src/model.ts | 51 ++++++++-------- extensions/git/src/repository.ts | 35 +++-------- extensions/git/src/test/git.test.ts | 42 ++++++++++++- extensions/git/src/util.ts | 4 ++ 5 files changed, 156 insertions(+), 68 deletions(-) diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 0d053a55635..dbadd2003f6 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -15,7 +15,7 @@ import * as filetype from 'file-type'; import { assign, uniqBy, groupBy, denodeify, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent } from './util'; import { CancellationToken } from 'vscode'; -const readfile = denodeify(fs.readFile); +const readfile = denodeify(fs.readFile); export interface IGit { path: string; @@ -34,11 +34,6 @@ export interface Remote { url: string; } -export interface ISubmodule { - Root: string; - Status: string; -} - export interface Stash { index: number; description: string; @@ -540,6 +535,68 @@ export class GitStatusParser { } } +export interface Submodule { + name: string; + path: string; + url: string; +} + +export function parseGitmodules(raw: string): Submodule[] { + const regex = /\r?\n/g; + let position = 0; + let match: RegExpExecArray | null = null; + + const result: Submodule[] = []; + let submodule: Partial = {}; + + function parseLine(line: string): void { + const sectionMatch = /^\s*\[submodule "([^"]+)"\]\s*$/.exec(line); + + if (sectionMatch) { + if (submodule.name && submodule.path && submodule.url) { + result.push(submodule as Submodule); + } + + const name = sectionMatch[1]; + + if (name) { + submodule = { name }; + return; + } + } + + if (!submodule) { + return; + } + + const propertyMatch = /^\s*(\w+) = (.*)$/.exec(line); + + if (!propertyMatch) { + return; + } + + const [, key, value] = propertyMatch; + + switch (key) { + case 'path': submodule.path = value; break; + case 'url': submodule.url = value; break; + } + } + + while (match = regex.exec(raw)) { + parseLine(raw.substring(position, match.index)); + position = match.index + match[0].length; + } + + parseLine(raw.substring(position)); + + if (submodule.name && submodule.path && submodule.url) { + result.push(submodule as Submodule); + } + + return result; +} + export class Repository { constructor( @@ -1113,16 +1170,19 @@ export class Repository { return uniqBy(rawRemotes, remote => remote.name); } - async getSubmodules(): Promise { - const result = await this.run(['submodule', 'status']); - const regex = /^([ \+\-U])\w* (\w*)( \(.*\))?/; - const submodules = result.stdout.split('\n') - .filter(b => !!b) - .map(line => regex.exec(line)) - .filter(g => !!g) - .map((groups: RegExpExecArray) => ({ Root: path.join(this.repositoryRoot, groups[2]), Status: groups[1] })); - //this._git.onOutput.emit('log', submodules); - return submodules; + async getSubmodules(): Promise { + const gitmodulesPath = path.join(this.root, '.gitmodules'); + + try { + const gitmodulesRaw = await readfile(gitmodulesPath, 'utf8'); + return parseGitmodules(gitmodulesRaw); + } catch (err) { + if (/ENOENT/.test(err.message)) { + return []; + } + + throw err; + } } async getBranch(name: string): Promise { diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 19098b0d39a..1d40618a5e2 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -101,8 +101,11 @@ export class Model { } private onPossibleGitRepositoryChange(uri: Uri): void { - const possibleGitRepositoryPath = uri.fsPath.replace(/\.git.*$/, ''); - this.possibleGitRepositoryPaths.add(possibleGitRepositoryPath); + this.eventuallyScanPossibleGitRepository(uri.fsPath.replace(/\.git.*$/, '')); + } + + private eventuallyScanPossibleGitRepository(path: string) { + this.possibleGitRepositoryPaths.add(path); this.eventuallyScanPossibleGitRepositories(); } @@ -173,23 +176,6 @@ export class Model { }); } - private async scanForSubmodules(repository: Repository): Promise { - const submodules = await repository.getSubmodules(); - //console.log(`Opening ${submoduleRoot} as git repository`); - - for (const submodule of submodules) { - try { - // We can't call tryOpenRepository, because a submodule is going to be under an open repository, so will fail. - const subRepository = new Repository(this.git.open((submodule.Root)), this.globalState); - this.open(subRepository); - } catch (err) { - if (err.gitErrorCode === GitErrorCodes.NotAGitRepository) { - return; - } - } - } - } - @sequentialize async tryOpenRepository(path: string): Promise { if (this.getRepository(path)) { @@ -230,11 +216,20 @@ export class Model { const disappearListener = onDidDisappearRepository(() => dispose()); const changeListener = repository.onDidChangeRepository(uri => this._onDidChangeRepository.fire({ repository, uri })); const originalResourceChangeListener = repository.onDidChangeOriginalResource(uri => this._onDidChangeOriginalResource.fire({ repository, uri })); + const scanSubmodules = () => { + repository.submodules + .map(r => path.join(repository.root, r.path)) + .forEach(p => this.eventuallyScanPossibleGitRepository(p)); + }; + + const statusListener = repository.onDidRunGitStatus(scanSubmodules); + scanSubmodules(); const dispose = () => { disappearListener.dispose(); changeListener.dispose(); originalResourceChangeListener.dispose(); + statusListener.dispose(); repository.dispose(); this.openRepositories = this.openRepositories.filter(e => e !== openRepository); @@ -244,7 +239,6 @@ export class Model { const openRepository = { repository, dispose }; this.openRepositories.push(openRepository); this._onDidOpenRepository.fire(repository); - this.scanForSubmodules(repository); } close(repository: Repository): void { @@ -299,12 +293,21 @@ export class Model { if (hint instanceof Uri) { const resourcePath = hint.fsPath; + outer: for (const liveRepository of this.openRepositories.sort((a, b) => b.repository.root.length - a.repository.root.length)) { - const relativePath = path.relative(liveRepository.repository.root, resourcePath); - - if (isDescendant(liveRepository.repository.root, resourcePath)) { - return liveRepository; + if (!isDescendant(liveRepository.repository.root, resourcePath)) { + continue; } + + for (const submodule of liveRepository.repository.submodules) { + const submoduleRoot = path.join(liveRepository.repository.root, submodule.path); + + if (isDescendant(submoduleRoot, resourcePath)) { + continue outer; + } + } + + return liveRepository; } return undefined; diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index dd65e5b417a..d65c8880200 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -6,7 +6,7 @@ 'use strict'; import { Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, DecorationData, Memento } from 'vscode'; -import { Repository as BaseRepository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash, RefType, GitError, ISubmodule } from './git'; +import { Repository as BaseRepository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash, RefType, GitError, Submodule } from './git'; import { anyEvent, filterEvent, eventToPromise, dispose, find, isDescendant, IDisposable, onceEvent, EmptyDisposable, debounceEvent } from './util'; import { memoize, throttle, debounce } from './decorators'; import { toGitUri } from './uri'; @@ -420,18 +420,6 @@ class ProgressManager { } } -export enum SubmoduleStatus { - Uninitialized, - Current, - Conflict, - Modified -} - -export interface Submodule { - Root: string; - Status: SubmoduleStatus; -} - export class Repository implements Disposable { private _onDidChangeRepository = new EventEmitter(); @@ -486,6 +474,11 @@ export class Repository implements Disposable { return this._remotes; } + private _submodules: Submodule[] = []; + get submodules(): Submodule[] { + return this._submodules; + } + private _operations = new OperationsImpl(); get operations(): Operations { return this._operations; } @@ -769,19 +762,6 @@ export class Repository implements Disposable { return this.run(Operation.Show, () => this.repository.detectObjectType(object)); } - async getSubmodules(): Promise { - const submodules: ISubmodule[] = await this.repository.getSubmodules(); - return submodules.map(isub => { - var status = SubmoduleStatus.Current; - switch (isub.Status) { - case '-': { status = SubmoduleStatus.Uninitialized; break; } - case '+': { status = SubmoduleStatus.Modified; break; } - case 'U': { status = SubmoduleStatus.Conflict; break; } - } - return { Root: isub.Root, Status: status }; - }); - } - async getStashes(): Promise { return await this.repository.getStashes(); } @@ -954,11 +934,12 @@ export class Repository implements Disposable { // noop } - const [refs, remotes] = await Promise.all([this.repository.getRefs(), this.repository.getRemotes()]); + const [refs, remotes, submodules] = await Promise.all([this.repository.getRefs(), this.repository.getRemotes(), this.repository.getSubmodules()]); this._HEAD = HEAD; this._refs = refs; this._remotes = remotes; + this._submodules = submodules; const index: Resource[] = []; const workingTree: Resource[] = []; diff --git a/extensions/git/src/test/git.test.ts b/extensions/git/src/test/git.test.ts index d8c1eb405ad..09661eebc9c 100644 --- a/extensions/git/src/test/git.test.ts +++ b/extensions/git/src/test/git.test.ts @@ -6,7 +6,7 @@ 'use strict'; import 'mocha'; -import { GitStatusParser } from '../git'; +import { GitStatusParser, parseGitmodules } from '../git'; import * as assert from 'assert'; suite('git', () => { @@ -135,4 +135,44 @@ suite('git', () => { ]); }); }); + + suite('parseGitmodules', () => { + test('empty', () => { + assert.deepEqual(parseGitmodules(''), []); + }); + + test('sample', () => { + const sample = `[submodule "deps/spdlog"] + path = deps/spdlog + url = https://github.com/gabime/spdlog.git +`; + + assert.deepEqual(parseGitmodules(sample), [ + { name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' } + ]); + }); + + test('big', () => { + const sample = `[submodule "deps/spdlog"] + path = deps/spdlog + url = https://github.com/gabime/spdlog.git +[submodule "deps/spdlog2"] + path = deps/spdlog2 + url = https://github.com/gabime/spdlog.git +[submodule "deps/spdlog3"] + path = deps/spdlog3 + url = https://github.com/gabime/spdlog.git +[submodule "deps/spdlog4"] + path = deps/spdlog4 + url = https://github.com/gabime/spdlog4.git +`; + + assert.deepEqual(parseGitmodules(sample), [ + { name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' }, + { name: 'deps/spdlog2', path: 'deps/spdlog2', url: 'https://github.com/gabime/spdlog.git' }, + { name: 'deps/spdlog3', path: 'deps/spdlog3', url: 'https://github.com/gabime/spdlog.git' }, + { name: 'deps/spdlog4', path: 'deps/spdlog4', url: 'https://github.com/gabime/spdlog4.git' } + ]); + }); + }); }); \ No newline at end of file diff --git a/extensions/git/src/util.ts b/extensions/git/src/util.ts index 35561e8801e..6e26257de41 100644 --- a/extensions/git/src/util.ts +++ b/extensions/git/src/util.ts @@ -126,6 +126,10 @@ export function groupBy(arr: T[], fn: (el: T) => string): { [key: string]: T[ }, Object.create(null)); } +export function denodeify(fn: Function): (a: A, b: B, c: C) => Promise; +export function denodeify(fn: Function): (a: A, b: B) => Promise; +export function denodeify(fn: Function): (a: A) => Promise; +export function denodeify(fn: Function): (...args: any[]) => Promise; export function denodeify(fn: Function): (...args: any[]) => Promise { return (...args) => new Promise((c, e) => fn(...args, (err: any, r: any) => err ? e(err) : c(r))); } From a946fcae88068397e3c42a797e4bac80061216eb Mon Sep 17 00:00:00 2001 From: Sylvain Joyeux Date: Tue, 12 Dec 2017 10:33:28 -0200 Subject: [PATCH 191/615] separate lines with \r\n on Windows --- src/vs/platform/markers/common/problemMatcher.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/markers/common/problemMatcher.ts b/src/vs/platform/markers/common/problemMatcher.ts index 6a8ac03cb5d..357588fb977 100644 --- a/src/vs/platform/markers/common/problemMatcher.ts +++ b/src/vs/platform/markers/common/problemMatcher.ts @@ -12,6 +12,7 @@ import * as Assert from 'vs/base/common/assert'; import * as Paths from 'vs/base/common/paths'; import * as Types from 'vs/base/common/types'; import * as UUID from 'vs/base/common/uuid'; +import * as Platform from 'vs/base/common/platform'; import Severity from 'vs/base/common/severity'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -189,6 +190,8 @@ export function createLineMatcher(matcher: ProblemMatcher): ILineMatcher { } } +const endOfLine: string = Platform.OS === Platform.OperatingSystem.Windows ? '\r\n' : '\n'; + abstract class AbstractLineMatcher implements ILineMatcher { private matcher: ProblemMatcher; @@ -227,7 +230,7 @@ abstract class AbstractLineMatcher implements ILineMatcher { if (trim) { value = Strings.trim(value); } - data[property] += '\n' + value; + data[property] += endOfLine + value; } } From 50b7c7bd0705cb933cad905cc6caa73324b9f32c Mon Sep 17 00:00:00 2001 From: Daniel Ye Date: Tue, 12 Dec 2017 12:53:30 -0800 Subject: [PATCH 192/615] 2017-12-12. Merged in translations from Transifex. --- i18n/chs/extensions/emmet/package.i18n.json | 5 ++++- i18n/chs/extensions/git/out/commands.i18n.json | 6 +++--- i18n/chs/extensions/git/out/main.i18n.json | 4 ++-- i18n/chs/extensions/git/package.i18n.json | 4 ++-- i18n/chs/src/vs/code/node/cliProcessMain.i18n.json | 1 + .../common/config/commonEditorConfig.i18n.json | 3 ++- .../common/view/editorColorRegistry.i18n.json | 4 ++-- .../vs/editor/contrib/folding/folding.i18n.json | 2 ++ .../electron-browser/menusExtensionPoint.i18n.json | 12 ++++++------ .../vs/platform/environment/node/argv.i18n.json | 3 ++- .../extensions/common/extensionsRegistry.i18n.json | 8 ++++---- .../workbench/electron-browser/actions.i18n.json | 3 ++- .../debug/electron-browser/debugService.i18n.json | 2 ++ .../extensions/browser/extensionEditor.i18n.json | 2 +- .../extensions/browser/extensionsWidgets.i18n.json | 3 ++- .../extensions/css/client/out/cssMain.i18n.json | 4 +++- i18n/cht/extensions/emmet/package.i18n.json | 5 ++++- i18n/cht/extensions/git/out/autofetch.i18n.json | 4 +++- i18n/cht/extensions/git/out/commands.i18n.json | 4 ++++ i18n/cht/extensions/git/out/main.i18n.json | 3 +++ i18n/cht/extensions/git/package.i18n.json | 2 ++ .../extensions/html/client/out/htmlMain.i18n.json | 4 +++- .../cht/extensions/markdown/out/security.i18n.json | 3 +++ .../extensions/merge-conflict/package.i18n.json | 1 + .../out/features/completionItemProvider.i18n.json | 1 + i18n/cht/src/vs/code/electron-main/main.i18n.json | 1 + i18n/cht/src/vs/code/electron-main/menus.i18n.json | 4 ++++ i18n/cht/src/vs/code/node/cliProcessMain.i18n.json | 1 + .../common/config/commonEditorConfig.i18n.json | 1 + .../vs/editor/contrib/folding/folding.i18n.json | 2 ++ .../vs/platform/environment/node/argv.i18n.json | 1 + .../extensions/common/extensionsRegistry.i18n.json | 1 + .../compositebar/compositeBarActions.i18n.json | 1 + .../workbench/electron-browser/actions.i18n.json | 14 +++++++++++++- .../electron-browser/main.contribution.i18n.json | 2 ++ .../electron-browser/debug.contribution.i18n.json | 4 ++++ .../debug/electron-browser/debugService.i18n.json | 2 ++ .../extensions/browser/extensionsWidgets.i18n.json | 5 ++++- .../extensionProfileService.i18n.json | 4 +++- .../extensions.contribution.i18n.json | 4 +++- .../runtimeExtensionsEditor.i18n.json | 13 ++++++++++++- .../parts/markers/browser/markersPanel.i18n.json | 5 ++++- .../parts/markers/common/messages.i18n.json | 1 + .../browser/keybindingWidgets.i18n.json | 1 + .../browser/preferencesActions.i18n.json | 1 + .../browser/preferencesWidgets.i18n.json | 4 +++- .../electron-browser/task.contribution.i18n.json | 1 + .../parts/tasks/node/taskConfiguration.i18n.json | 2 ++ .../terminal.contribution.i18n.json | 1 + .../electron-browser/themes.contribution.i18n.json | 1 + .../browser/decorationsService.i18n.json | 4 +++- .../extensionHostProfiler.i18n.json | 4 +++- .../electron-browser/extensionService.i18n.json | 3 ++- .../electron-browser/keybindingService.i18n.json | 3 ++- .../textfile/common/textFileService.i18n.json | 4 +++- .../extensions/css/client/out/cssMain.i18n.json | 4 +++- i18n/deu/extensions/emmet/package.i18n.json | 5 ++++- i18n/deu/extensions/git/out/autofetch.i18n.json | 4 +++- i18n/deu/extensions/git/out/commands.i18n.json | 3 +++ i18n/deu/extensions/git/out/main.i18n.json | 2 ++ i18n/deu/extensions/git/package.i18n.json | 3 +++ .../extensions/html/client/out/htmlMain.i18n.json | 4 +++- .../deu/extensions/markdown/out/security.i18n.json | 3 +++ .../extensions/merge-conflict/package.i18n.json | 1 + .../out/features/completionItemProvider.i18n.json | 1 + i18n/deu/extensions/typescript/package.i18n.json | 1 + i18n/deu/src/vs/code/electron-main/main.i18n.json | 4 ++++ i18n/deu/src/vs/code/electron-main/menus.i18n.json | 4 ++++ i18n/deu/src/vs/code/node/cliProcessMain.i18n.json | 1 + .../common/config/commonEditorConfig.i18n.json | 3 +++ .../vs/editor/contrib/folding/folding.i18n.json | 2 ++ .../vs/platform/environment/node/argv.i18n.json | 4 ++++ .../node/extensionManagementService.i18n.json | 4 ++++ .../extensions/common/extensionsRegistry.i18n.json | 2 ++ .../browser/actions/toggleTabsVisibility.i18n.json | 1 + .../compositebar/compositeBarActions.i18n.json | 1 + .../browser/parts/editor/editorCommands.i18n.json | 1 + .../browser/parts/editor/editorStatus.i18n.json | 3 ++- .../workbench/electron-browser/actions.i18n.json | 14 +++++++++++++- .../electron-browser/main.contribution.i18n.json | 2 ++ .../electron-browser/debug.contribution.i18n.json | 5 +++++ .../debug/electron-browser/debugService.i18n.json | 2 ++ .../extensions/browser/extensionEditor.i18n.json | 2 ++ .../extensions/browser/extensionsWidgets.i18n.json | 5 ++++- .../extensionProfileService.i18n.json | 4 +++- .../extensions.contribution.i18n.json | 4 +++- .../runtimeExtensionsEditor.i18n.json | 13 ++++++++++++- .../files/electron-browser/fileActions.i18n.json | 4 +++- .../electron-browser/views/emptyView.i18n.json | 1 + .../views/explorerViewer.i18n.json | 1 + .../parts/markers/browser/markersPanel.i18n.json | 5 ++++- .../parts/markers/common/messages.i18n.json | 1 + .../browser/keybindingWidgets.i18n.json | 1 + .../browser/preferencesActions.i18n.json | 1 + .../browser/preferencesWidgets.i18n.json | 5 ++++- .../search/browser/patternInputWidget.i18n.json | 3 ++- .../electron-browser/task.contribution.i18n.json | 2 ++ .../electron-browser/terminalTaskSystem.i18n.json | 1 + .../parts/tasks/node/taskConfiguration.i18n.json | 2 ++ .../terminal.contribution.i18n.json | 1 + .../electron-browser/themes.contribution.i18n.json | 3 +++ .../browser/decorationsService.i18n.json | 4 +++- .../extensionHostProfiler.i18n.json | 4 +++- .../electron-browser/extensionService.i18n.json | 3 ++- .../electron-browser/keybindingService.i18n.json | 3 ++- .../textfile/common/textFileService.i18n.json | 4 +++- i18n/esn/extensions/emmet/package.i18n.json | 5 ++++- i18n/esn/src/vs/code/node/cliProcessMain.i18n.json | 1 + .../common/config/commonEditorConfig.i18n.json | 1 + .../vs/editor/contrib/folding/folding.i18n.json | 2 ++ .../vs/platform/environment/node/argv.i18n.json | 1 + .../workbench/electron-browser/actions.i18n.json | 3 ++- .../debug/electron-browser/debugService.i18n.json | 2 ++ .../extensions/browser/extensionsWidgets.i18n.json | 3 ++- .../terminal/browser/terminalQuickOpen.i18n.json | 1 + .../electron-browser/themes.contribution.i18n.json | 1 + .../extensionHostProfiler.i18n.json | 4 +++- i18n/fra/extensions/emmet/package.i18n.json | 5 ++++- i18n/fra/src/vs/code/node/cliProcessMain.i18n.json | 1 + .../common/config/commonEditorConfig.i18n.json | 1 + .../vs/editor/contrib/folding/folding.i18n.json | 2 ++ .../vs/platform/environment/node/argv.i18n.json | 1 + .../workbench/electron-browser/actions.i18n.json | 3 ++- .../debug/electron-browser/debugService.i18n.json | 2 ++ .../extensions/browser/extensionsWidgets.i18n.json | 3 ++- .../extensions/css/client/out/cssMain.i18n.json | 4 +++- i18n/hun/extensions/emmet/package.i18n.json | 5 ++++- i18n/hun/extensions/git/out/commands.i18n.json | 1 + .../extensions/html/client/out/htmlMain.i18n.json | 4 +++- .../vs/editor/contrib/folding/folding.i18n.json | 2 +- .../vs/platform/environment/node/argv.i18n.json | 2 +- .../debug/electron-browser/debugService.i18n.json | 1 + .../extensions/browser/extensionsWidgets.i18n.json | 5 ++++- .../extensionProfileService.i18n.json | 4 +++- .../extensions.contribution.i18n.json | 4 +++- .../runtimeExtensionsEditor.i18n.json | 13 ++++++++++++- .../electron-browser/themes.contribution.i18n.json | 1 + .../extensionHostProfiler.i18n.json | 4 +++- .../electron-browser/extensionService.i18n.json | 3 ++- .../extensions/css/client/out/cssMain.i18n.json | 4 +++- i18n/ita/extensions/emmet/package.i18n.json | 5 ++++- i18n/ita/extensions/git/out/autofetch.i18n.json | 4 +++- i18n/ita/extensions/git/out/commands.i18n.json | 3 +++ i18n/ita/extensions/git/out/main.i18n.json | 2 ++ i18n/ita/extensions/git/package.i18n.json | 2 ++ .../extensions/html/client/out/htmlMain.i18n.json | 4 +++- .../ita/extensions/markdown/out/commands.i18n.json | 1 + .../ita/extensions/markdown/out/security.i18n.json | 3 +++ .../extensions/merge-conflict/package.i18n.json | 1 + .../out/features/completionItemProvider.i18n.json | 1 + i18n/ita/src/vs/code/electron-main/main.i18n.json | 4 ++++ i18n/ita/src/vs/code/electron-main/menus.i18n.json | 3 +++ i18n/ita/src/vs/code/node/cliProcessMain.i18n.json | 1 + .../common/config/commonEditorConfig.i18n.json | 3 +++ .../vs/editor/contrib/folding/folding.i18n.json | 3 +++ .../vs/platform/environment/node/argv.i18n.json | 4 ++++ .../node/extensionGalleryService.i18n.json | 4 +++- .../node/extensionManagementService.i18n.json | 6 ++++++ .../extensions/common/extensionsRegistry.i18n.json | 2 ++ .../compositebar/compositeBarActions.i18n.json | 1 + .../browser/parts/editor/editorCommands.i18n.json | 1 + .../workbench/electron-browser/actions.i18n.json | 14 +++++++++++++- .../electron-browser/main.contribution.i18n.json | 2 ++ .../electron-browser/debug.contribution.i18n.json | 4 ++++ .../debug/electron-browser/debugService.i18n.json | 2 ++ .../extensions/browser/extensionEditor.i18n.json | 2 ++ .../extensions/browser/extensionsWidgets.i18n.json | 5 ++++- .../extensionProfileService.i18n.json | 4 +++- .../extensions.contribution.i18n.json | 4 +++- .../runtimeExtensionsEditor.i18n.json | 13 ++++++++++++- .../fileActions.contribution.i18n.json | 4 +++- .../files/electron-browser/fileActions.i18n.json | 5 ++++- .../electron-browser/files.contribution.i18n.json | 1 + .../electron-browser/views/emptyView.i18n.json | 1 + .../views/explorerDecorationsProvider.i18n.json | 3 ++- .../parts/markers/browser/markersPanel.i18n.json | 5 ++++- .../parts/markers/common/messages.i18n.json | 1 + .../browser/keybindingWidgets.i18n.json | 1 + .../browser/preferencesActions.i18n.json | 1 + .../browser/preferencesWidgets.i18n.json | 4 +++- .../parts/tasks/node/taskConfiguration.i18n.json | 1 + .../terminal.contribution.i18n.json | 1 + .../electron-browser/themes.contribution.i18n.json | 1 + .../extensionHostProfiler.i18n.json | 4 +++- .../electron-browser/extensionService.i18n.json | 3 ++- .../electron-browser/keybindingService.i18n.json | 3 ++- .../textfile/common/textFileService.i18n.json | 4 +++- i18n/jpn/extensions/emmet/package.i18n.json | 5 ++++- i18n/jpn/src/vs/code/node/cliProcessMain.i18n.json | 1 + .../common/config/commonEditorConfig.i18n.json | 1 + .../vs/editor/contrib/folding/folding.i18n.json | 2 ++ .../vs/platform/environment/node/argv.i18n.json | 1 + .../workbench/electron-browser/actions.i18n.json | 3 ++- .../debug/electron-browser/debugService.i18n.json | 2 ++ .../extensions/browser/extensionsWidgets.i18n.json | 3 ++- .../electron-browser/extensionService.i18n.json | 2 +- .../extensions/css/client/out/cssMain.i18n.json | 4 +++- i18n/kor/extensions/emmet/package.i18n.json | 5 ++++- i18n/kor/extensions/git/out/autofetch.i18n.json | 4 +++- i18n/kor/extensions/git/out/commands.i18n.json | 7 +++++++ i18n/kor/extensions/git/out/main.i18n.json | 3 +++ i18n/kor/extensions/git/package.i18n.json | 5 +++++ .../extensions/html/client/out/htmlMain.i18n.json | 4 +++- .../kor/extensions/markdown/out/commands.i18n.json | 1 + .../kor/extensions/markdown/out/security.i18n.json | 3 +++ .../extensions/merge-conflict/package.i18n.json | 1 + .../out/features/completionItemProvider.i18n.json | 1 + i18n/kor/extensions/typescript/package.i18n.json | 1 + i18n/kor/src/vs/code/electron-main/main.i18n.json | 4 ++++ i18n/kor/src/vs/code/electron-main/menus.i18n.json | 4 ++++ i18n/kor/src/vs/code/node/cliProcessMain.i18n.json | 1 + .../common/config/commonEditorConfig.i18n.json | 1 + .../vs/editor/contrib/folding/folding.i18n.json | 2 ++ .../vs/platform/environment/node/argv.i18n.json | 4 ++++ .../node/extensionGalleryService.i18n.json | 4 +++- .../node/extensionManagementService.i18n.json | 6 ++++++ .../extensions/common/extensionsRegistry.i18n.json | 2 ++ .../browser/actions/toggleTabsVisibility.i18n.json | 1 + .../compositebar/compositeBarActions.i18n.json | 1 + .../browser/parts/editor/editorCommands.i18n.json | 1 + .../browser/parts/editor/editorStatus.i18n.json | 3 ++- .../workbench/electron-browser/actions.i18n.json | 14 +++++++++++++- .../electron-browser/main.contribution.i18n.json | 2 ++ .../electron-browser/debug.contribution.i18n.json | 5 +++++ .../debug/electron-browser/debugService.i18n.json | 2 ++ .../extensions/browser/extensionEditor.i18n.json | 2 ++ .../extensions/browser/extensionsWidgets.i18n.json | 5 ++++- .../extensionProfileService.i18n.json | 4 +++- .../extensions.contribution.i18n.json | 4 +++- .../runtimeExtensionsEditor.i18n.json | 13 ++++++++++++- .../files/electron-browser/fileActions.i18n.json | 4 +++- .../electron-browser/views/emptyView.i18n.json | 1 + .../parts/markers/browser/markersPanel.i18n.json | 5 ++++- .../parts/markers/common/messages.i18n.json | 1 + .../browser/keybindingWidgets.i18n.json | 1 + .../browser/preferencesActions.i18n.json | 1 + .../browser/preferencesEditor.i18n.json | 1 + .../browser/preferencesWidgets.i18n.json | 5 ++++- .../search/browser/patternInputWidget.i18n.json | 3 ++- .../electron-browser/searchActions.i18n.json | 5 ++++- .../electron-browser/task.contribution.i18n.json | 2 ++ .../electron-browser/terminalTaskSystem.i18n.json | 1 + .../parts/tasks/node/taskConfiguration.i18n.json | 2 ++ .../terminal.contribution.i18n.json | 1 + .../electron-browser/themes.contribution.i18n.json | 3 +++ .../browser/decorationsService.i18n.json | 4 +++- .../extensionHostProfiler.i18n.json | 4 +++- .../electron-browser/extensionService.i18n.json | 3 ++- .../electron-browser/keybindingService.i18n.json | 3 ++- .../textfile/common/textFileService.i18n.json | 4 +++- i18n/ptb/extensions/emmet/package.i18n.json | 5 ++++- i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json | 1 + .../common/config/commonEditorConfig.i18n.json | 1 + .../vs/editor/contrib/folding/folding.i18n.json | 2 ++ .../vs/platform/environment/node/argv.i18n.json | 1 + .../workbench/electron-browser/actions.i18n.json | 3 ++- .../electron-browser/debug.contribution.i18n.json | 2 ++ .../debug/electron-browser/debugService.i18n.json | 2 ++ .../extensions/browser/extensionsWidgets.i18n.json | 3 ++- .../extensions.contribution.i18n.json | 3 ++- .../runtimeExtensionsEditor.i18n.json | 5 ++++- .../extensionHostProfiler.i18n.json | 4 +++- .../extensions/css/client/out/cssMain.i18n.json | 4 +++- i18n/rus/extensions/emmet/package.i18n.json | 5 ++++- i18n/rus/extensions/git/out/autofetch.i18n.json | 4 +++- i18n/rus/extensions/git/out/commands.i18n.json | 7 +++++++ i18n/rus/extensions/git/out/main.i18n.json | 3 +++ i18n/rus/extensions/git/package.i18n.json | 5 +++++ .../extensions/html/client/out/htmlMain.i18n.json | 4 +++- .../rus/extensions/markdown/out/commands.i18n.json | 1 + .../rus/extensions/markdown/out/security.i18n.json | 3 +++ .../extensions/merge-conflict/package.i18n.json | 1 + .../out/features/completionItemProvider.i18n.json | 1 + i18n/rus/extensions/typescript/package.i18n.json | 1 + i18n/rus/src/vs/code/electron-main/main.i18n.json | 4 ++++ i18n/rus/src/vs/code/electron-main/menus.i18n.json | 5 +++++ i18n/rus/src/vs/code/node/cliProcessMain.i18n.json | 1 + .../common/config/commonEditorConfig.i18n.json | 8 ++++++++ .../vs/editor/contrib/folding/folding.i18n.json | 3 +++ .../vs/platform/environment/node/argv.i18n.json | 4 ++++ .../node/extensionGalleryService.i18n.json | 4 +++- .../node/extensionManagementService.i18n.json | 6 ++++++ .../extensions/common/extensionsRegistry.i18n.json | 2 ++ .../browser/actions/toggleTabsVisibility.i18n.json | 1 + .../compositebar/compositeBarActions.i18n.json | 1 + .../browser/parts/editor/editorCommands.i18n.json | 1 + .../browser/parts/editor/editorStatus.i18n.json | 3 ++- .../workbench/electron-browser/actions.i18n.json | 14 +++++++++++++- .../electron-browser/main.contribution.i18n.json | 2 ++ .../electron-browser/debug.contribution.i18n.json | 5 +++++ .../debug/electron-browser/debugService.i18n.json | 2 ++ .../extensions/browser/extensionEditor.i18n.json | 2 ++ .../extensions/browser/extensionsWidgets.i18n.json | 5 ++++- .../extensionProfileService.i18n.json | 4 +++- .../extensions.contribution.i18n.json | 4 +++- .../runtimeExtensionsEditor.i18n.json | 13 ++++++++++++- .../files/electron-browser/fileActions.i18n.json | 5 ++++- .../electron-browser/views/emptyView.i18n.json | 2 ++ .../views/explorerViewer.i18n.json | 2 ++ .../parts/markers/browser/markersPanel.i18n.json | 5 ++++- .../parts/markers/common/messages.i18n.json | 1 + .../browser/keybindingWidgets.i18n.json | 1 + .../browser/preferencesActions.i18n.json | 1 + .../browser/preferencesWidgets.i18n.json | 5 ++++- .../search/browser/patternInputWidget.i18n.json | 3 ++- .../electron-browser/searchActions.i18n.json | 5 ++++- .../electron-browser/task.contribution.i18n.json | 2 ++ .../electron-browser/terminalTaskSystem.i18n.json | 1 + .../parts/tasks/node/taskConfiguration.i18n.json | 2 ++ .../terminal.contribution.i18n.json | 1 + .../electron-browser/themes.contribution.i18n.json | 3 +++ .../browser/decorationsService.i18n.json | 4 +++- .../extensionHostProfiler.i18n.json | 4 +++- .../electron-browser/extensionService.i18n.json | 3 ++- .../electron-browser/keybindingService.i18n.json | 3 ++- .../textfile/common/textFileService.i18n.json | 4 +++- .../extensions/css/client/out/cssMain.i18n.json | 4 +++- i18n/trk/extensions/emmet/package.i18n.json | 5 ++++- .../extensions/html/client/out/htmlMain.i18n.json | 4 +++- .../common/config/commonEditorConfig.i18n.json | 1 + .../vs/platform/environment/node/argv.i18n.json | 2 +- .../workbench/electron-browser/actions.i18n.json | 14 +++++++++++++- .../debug/electron-browser/debugService.i18n.json | 2 +- .../extensions/browser/extensionsWidgets.i18n.json | 5 ++++- .../extensionProfileService.i18n.json | 4 +++- .../extensions.contribution.i18n.json | 4 +++- .../runtimeExtensionsEditor.i18n.json | 13 ++++++++++++- 327 files changed, 918 insertions(+), 159 deletions(-) diff --git a/i18n/chs/extensions/emmet/package.i18n.json b/i18n/chs/extensions/emmet/package.i18n.json index c956f42aa07..631e7728eee 100644 --- a/i18n/chs/extensions/emmet/package.i18n.json +++ b/i18n/chs/extensions/emmet/package.i18n.json @@ -49,5 +49,8 @@ "emmetPreferencesBemModifierSeparator": "在使用 BEM 过滤器时,类å使用的修饰符分隔符", "emmetPreferencesFilterCommentBefore": "使用注释过滤器时,应置于匹é…å…ƒç´ å‰æ³¨é‡Šçš„定义。", "emmetPreferencesFilterCommentAfter": "使用注释过滤器时,应置于匹é…å…ƒç´ åŽæ³¨é‡Šçš„定义。", - "emmetPreferencesFilterCommentTrigger": "用åŠè§’é€—å· (\",\") 隔开的属性å缩写的数组,将由注释筛选器应用" + "emmetPreferencesFilterCommentTrigger": "用åŠè§’é€—å· (\",\") 隔开的属性å缩写的数组,将由注释筛选器应用", + "emmetPreferencesFormatNoIndentTags": "表示ä¸åº”å‘内缩进的标记å称数组", + "emmetPreferencesFormatForceIndentTags": "表示应始终å‘内缩进的标记å称数组", + "emmetPreferencesAllowCompactBoolean": "若为 \"true\",将生æˆç´§å‡‘型布尔属性" } \ No newline at end of file diff --git a/i18n/chs/extensions/git/out/commands.i18n.json b/i18n/chs/extensions/git/out/commands.i18n.json index 2b05a1b187d..8f5f2a83f79 100644 --- a/i18n/chs/extensions/git/out/commands.i18n.json +++ b/i18n/chs/extensions/git/out/commands.i18n.json @@ -11,7 +11,7 @@ "parent": "父目录", "cancel": "$(sync~spin) 正在克隆存储库... ç‚¹å‡»å–æ¶ˆ", "cancel tooltip": "å–æ¶ˆå…‹éš†", - "cloning": "正在克隆 GIT 存储库...", + "cloning": "正在克隆 Git 存储库...", "openrepo": "打开存储库", "proposeopen": "是å¦è¦æ‰“开已克隆存储库?", "init": "选择用于åˆå§‹åŒ– Git 储存库的工作区文件夹", @@ -78,7 +78,7 @@ "pick stash to pop": "选择è¦å¼¹å‡ºçš„储è—", "clean repo": "在签出å‰ï¼Œè¯·æ¸…ç†å­˜å‚¨åº“工作树。", "cant push": "æ— æ³•æŽ¨é€ refs 到远端。您å¯ä»¥è¯•ç€è¿è¡Œâ€œæ‹‰å–â€åŠŸèƒ½ï¼Œæ•´åˆæ‚¨çš„æ›´æ”¹ã€‚", - "git error details": "Git:{0}", + "git error details": "Git: {0}", "git error": "Git 错误", - "open git log": "打开 GIT 日志" + "open git log": "打开 Git 日志" } \ No newline at end of file diff --git a/i18n/chs/extensions/git/out/main.i18n.json b/i18n/chs/extensions/git/out/main.i18n.json index 19364485e2e..99ef376ae53 100644 --- a/i18n/chs/extensions/git/out/main.i18n.json +++ b/i18n/chs/extensions/git/out/main.i18n.json @@ -5,10 +5,10 @@ // Do not edit this file. It is machine generated. { "looking": "在 {0} 查找 Git 中", - "using git": "使用 {1} 中的 GIT {0}", + "using git": "使用 {1} 中的 Git {0}", "downloadgit": "下载 Git", "neverShowAgain": "ä¸å†æ˜¾ç¤º", "notfound": "未找到 Git。请安装 Git,或在 \"git.path\" 设置中é…置。", - "updateGit": "æ›´æ–° GIT", + "updateGit": "æ›´æ–° Git", "git20": "你似乎已安装 Git {0}。Code å’Œ Git 版本 >=2 一起工作最佳" } \ No newline at end of file diff --git a/i18n/chs/extensions/git/package.i18n.json b/i18n/chs/extensions/git/package.i18n.json index 3f973cac673..cb8443b7aec 100644 --- a/i18n/chs/extensions/git/package.i18n.json +++ b/i18n/chs/extensions/git/package.i18n.json @@ -46,7 +46,7 @@ "command.sync": "åŒæ­¥", "command.syncRebase": "åŒæ­¥(å˜åŸº)", "command.publish": "å‘布分支", - "command.showOutput": "显示 GIT 输出", + "command.showOutput": "显示 Git 输出", "command.ignore": "将文件添加到 .gitignore", "command.stashIncludeUntracked": "储è—(åŒ…å«æœªè·Ÿè¸ª)", "command.stash": "储è—", @@ -57,7 +57,7 @@ "config.autorefresh": "是å¦å¯ç”¨è‡ªåŠ¨åˆ·æ–°", "config.autofetch": "是å¦å¯ç”¨è‡ªåŠ¨æ‹‰å–", "config.enableLongCommitWarning": "是å¦é’ˆå¯¹é•¿æ®µæäº¤æ¶ˆæ¯è¿›è¡Œè­¦å‘Š", - "config.confirmSync": "åŒæ­¥ Git 存储库å‰è¿›è¡Œç¡®è®¤", + "config.confirmSync": "åŒæ­¥ GIT 存储库å‰è¯·å…ˆè¿›è¡Œç¡®è®¤", "config.countBadge": "控制 Git 徽章计数器。“allâ€è®¡ç®—所有更改。“trackedâ€åªè®¡ç®—跟踪的更改。“offâ€å…³é—­æ­¤åŠŸèƒ½ã€‚", "config.checkoutType": "控制è¿è¡Œâ€œç­¾å‡ºåˆ°...â€å‘½ä»¤æ—¶åˆ—出的分支的类型。\"all\" 显示所有 refs,\"local\" åªæ˜¾ç¤ºæœ¬åœ°åˆ†æ”¯ï¼Œ\"tags\" åªæ˜¾ç¤ºæ ‡è®°ï¼Œ\"remote\" åªæ˜¾ç¤ºè¿œç¨‹åˆ†æ”¯ã€‚", "config.ignoreLegacyWarning": "忽略旧版 Git 警告", diff --git a/i18n/chs/src/vs/code/node/cliProcessMain.i18n.json b/i18n/chs/src/vs/code/node/cliProcessMain.i18n.json index 39c71863011..0b63356dd40 100644 --- a/i18n/chs/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/chs/src/vs/code/node/cliProcessMain.i18n.json @@ -8,6 +8,7 @@ "notInstalled": "未安装扩展“{0}â€ã€‚", "useId": "ç¡®ä¿ä½¿ç”¨å®Œæ•´æ‰©å±• ID,包括å‘布æœåŠ¡å™¨ï¼Œå¦‚: {0}", "successVsixInstall": "å·²æˆåŠŸå®‰è£…æ‰©å±•â€œ{0}â€!", + "cancelVsixInstall": "已喿¶ˆå®‰è£…扩展“{0}â€ã€‚", "alreadyInstalled": "已安装扩展“{0}â€ã€‚", "foundExtension": "在商店中找到了“{0}â€ã€‚", "installing": "正在安装...", diff --git a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json index 3aa5c1a68d4..9c145d8c4d9 100644 --- a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -31,6 +31,7 @@ "minimap.maxColumn": "é™åˆ¶æœ€å°æ˜ å°„的宽度,尽é‡å¤šåœ°å‘ˆçŽ°ç‰¹å®šæ•°é‡çš„列", "find.seedSearchStringFromSelection": "控制是å¦å°†ç¼–辑器的选中内容作为æœç´¢è¯å¡«å…¥åˆ°æŸ¥æ‰¾ç»„ä»¶", "find.autoFindInSelection": "控制当编辑器中选中多个字符或多行文字时是å¦å¼€å¯â€œåœ¨é€‰å®šå†…容中查找â€é€‰é¡¹ ", + "find.globalFindClipboard": "控制查找å°ç»„件是å¦åº”在 macOS ä¸Šè¯»å–æˆ–修改在应用间共享的查找剪贴æ¿", "wordWrap.off": "æ°¸ä¸æ¢è¡Œã€‚", "wordWrap.on": "将在视区宽度处æ¢è¡Œã€‚", "wordWrap.wordWrapColumn": "将在 \"editor.wordWrapColumn\" 处æ¢è¡Œã€‚", @@ -77,7 +78,7 @@ "renderControlCharacters": "控制编辑器是å¦åº”呈现控制字符", "renderIndentGuides": "控制编辑器是å¦åº”呈现缩进å‚考线", "renderLineHighlight": "控制编辑器应如何呈现当å‰è¡Œçªå‡ºæ˜¾ç¤ºï¼Œå¯èƒ½ä¸ºâ€œæ— â€ã€â€œè£…订线â€ã€â€œçº¿â€å’Œâ€œå…¨éƒ¨â€ã€‚", - "codeLens": "æŽ§åˆ¶ç¼–è¾‘å™¨æ˜¯å¦æ˜¾ç¤ºä»£ç æ»¤é•œ", + "codeLens": "æŽ§åˆ¶ç¼–è¾‘å™¨æ˜¯å¦æ˜¾ç¤º CodeLens", "folding": "控制编辑器是å¦å¯ç”¨ä»£ç æŠ˜å åŠŸèƒ½", "showFoldingControls": "控制是å¦è‡ªåЍéšè—å¯¼èˆªçº¿ä¸Šçš„æŠ˜å æŽ§ä»¶ã€‚", "matchBrackets": "当选择其中一项时,将çªå‡ºæ˜¾ç¤ºåŒ¹é…的括å·ã€‚", diff --git a/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json index ad84081b84e..168dd2fb958 100644 --- a/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -6,7 +6,7 @@ { "lineHighlight": "光标所在行高亮内容的背景颜色。", "lineHighlightBorderBox": "光标所在行四周边框的背景颜色。", - "rangeHighlight": "çªå‡ºæ˜¾ç¤ºèŒƒå›´çš„背景颜色,例如 \"Quick Open\" 和“查找â€åŠŸèƒ½ã€‚", + "rangeHighlight": "高亮范围的背景色,例如由 \"Quick Open\" 和“查找â€åŠŸèƒ½é«˜äº®çš„èŒƒå›´ã€‚", "caret": "编辑器光标颜色。", "editorCursorBackground": "编辑器光标的背景色。å¯ä»¥è‡ªå®šä¹‰å—型光标覆盖字符的颜色。", "editorWhitespaces": "编辑器中空白字符的颜色。", @@ -15,7 +15,7 @@ "editorRuler": "编辑器标尺的颜色。", "editorCodeLensForeground": "编辑器 CodeLens çš„å‰æ™¯è‰²", "editorBracketMatchBackground": "åŒ¹é…æ‹¬å·çš„背景色", - "editorBracketMatchBorder": "åŒ¹é…æ‹¬å·å¤–框颜色", + "editorBracketMatchBorder": "åŒ¹é…æ‹¬å·å¤–框的颜色", "editorOverviewRulerBorder": "概览标尺边框的颜色。", "editorGutter": "编辑器导航线的背景色。导航线包括边缘符å·å’Œè¡Œå·ã€‚", "errorForeground": "ç¼–è¾‘å™¨ä¸­é”™è¯¯æ³¢æµªçº¿çš„å‰æ™¯è‰²ã€‚", diff --git a/i18n/chs/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/chs/src/vs/editor/contrib/folding/folding.i18n.json index 90d90c3c8ff..6ad3874f3bb 100644 --- a/i18n/chs/src/vs/editor/contrib/folding/folding.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/folding/folding.i18n.json @@ -9,6 +9,8 @@ "foldAction.label": "折å ", "foldRecursivelyAction.label": "ä»¥é€’å½’æ–¹å¼æŠ˜å ", "foldAllBlockComments.label": "æŠ˜å æ‰€æœ‰å—注释", + "foldAllMarkerRegions.label": "æŠ˜å æ‰€æœ‰åŒºåŸŸ", + "unfoldAllMarkerRegions.label": "展开所有区域", "foldAllAction.label": "全部折å ", "unfoldAllAction.label": "全部展开", "foldLevelAction.label": "折å çº§åˆ« {0}" diff --git a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 21c4685e274..d14243882a7 100644 --- a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -8,8 +8,8 @@ "requirestring": "属性“{0}â€æ˜¯å¿…è¦å±žæ€§ï¼Œå…¶ç±»åž‹å¿…须是“stringâ€", "optstring": "属性“{0}â€å¯ä»¥è¢«çœç•¥ï¼Œå¦åˆ™å…¶ç±»åž‹å¿…须为“stringâ€", "vscode.extension.contributes.menuItem.command": "è¦æ‰§è¡Œçš„命令的标识符。该命令必须在 \"commands\" 部分中声明", - "vscode.extension.contributes.menuItem.alt": "è¦æ‰§è¡Œçš„æ›¿ä»£å‘½ä»¤çš„æ ‡è¯†ç¬¦ã€‚该命令必须在“命令â€éƒ¨åˆ†ä¸­å£°æ˜Ž", - "vscode.extension.contributes.menuItem.when": "为显示此项必须为 \"ture\" çš„æ¡ä»¶", + "vscode.extension.contributes.menuItem.alt": "è¦æ‰§è¡Œçš„æ›¿ä»£å‘½ä»¤çš„æ ‡è¯†ç¬¦ã€‚该命令必须在 â€commands\" 部分中声明", + "vscode.extension.contributes.menuItem.when": "为显示此项必须为 \"true\" çš„æ¡ä»¶", "vscode.extension.contributes.menuItem.group": "此命令所属的组", "vscode.extension.contributes.menus": "å‘编辑器æä¾›èœå•项", "menus.commandPalette": "命令颿¿", @@ -26,9 +26,9 @@ "view.viewTitle": "æä¾›çš„视图的标题èœå•", "view.itemContext": "æä¾›çš„视图中的项目的上下文èœå•", "nonempty": "应为éžç©ºå€¼ã€‚", - "opticon": "å¯ä»¥çœç•¥å±žæ€§â€œå›¾æ ‡â€æˆ–者它必须是一个字符串或类似“{dark, light}â€çš„æ–‡æœ¬", - "requireStringOrObject": "属性“{0}â€ä¸ºå¿…éœ€ä¸”å…¶ç±»åž‹å¿…é¡»ä¸ºâ€œå­—ç¬¦ä¸²â€æˆ–“对象â€", - "requirestrings": "属性“{0}â€å’Œâ€œ{1}`â€ä¸ºå¿…需且其类型必须为“字符串â€", + "opticon": "属性 \"icon\" å¯ä»¥çœç•¥ï¼Œå¦åˆ™å…¶å¿…须为字符串或是类似 \"{dark, light}\" 的文本", + "requireStringOrObject": "属性“{0}â€æ˜¯å¿…è¦å±žæ€§ï¼Œå…¶ç±»åž‹å¿…须是 \"string\" 或 \"object\"", + "requirestrings": "属性“{0}â€å’Œâ€œ{1}â€æ˜¯å¿…è¦å±žæ€§ï¼Œå…¶ç±»åž‹å¿…须是 \"string\"", "vscode.extension.contributes.commandType.command": "è¦æ‰§è¡Œçš„命令的标识符", "vscode.extension.contributes.commandType.title": "在 UI 䏭便®å…¶è¡¨ç¤ºå‘½ä»¤çš„æ ‡é¢˜", "vscode.extension.contributes.commandType.category": "(å¯é€‰)类别字符串按命令在 UI 中分组", @@ -36,7 +36,7 @@ "vscode.extension.contributes.commandType.icon.light": "使用浅色主题时的图标路径", "vscode.extension.contributes.commandType.icon.dark": "使用深色主题时的图标路径", "vscode.extension.contributes.commands": "坹命令颿¿æä¾›å‘½ä»¤ã€‚", - "dup": "命令“{0}â€å¤šæ¬¡å‡ºçŽ°åœ¨â€œå‘½ä»¤â€éƒ¨åˆ†ã€‚", + "dup": "命令“{0}â€åœ¨ \"commands\" 部分é‡å¤å‡ºçŽ°ã€‚", "menuId.invalid": "“{0}â€ä¸ºæ— æ•ˆèœå•标识符", "missing.command": "èœå•项引用未在“命令â€éƒ¨åˆ†è¿›è¡Œå®šä¹‰çš„命令“{0}â€ã€‚", "missing.altCommand": "èœå•项引用了未在 \"commands\" 部分定义的替代命令“{0}â€ã€‚", diff --git a/i18n/chs/src/vs/platform/environment/node/argv.i18n.json b/i18n/chs/src/vs/platform/environment/node/argv.i18n.json index 77d5d77fd7b..9a1faa5d983 100644 --- a/i18n/chs/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/chs/src/vs/platform/environment/node/argv.i18n.json @@ -7,7 +7,7 @@ "gotoValidation": "\"--goto\" 模å¼ä¸­çš„傿•°æ ¼å¼åº”为 \"FILE(:LINE(:CHARACTER))\"。", "diff": "将两个文件相互比较。", "add": "将文件夹添加到最åŽä¸€ä¸ªæ´»åŠ¨çª—å£ã€‚", - "goto": "打开路径下的文件并定ä½åˆ°ç‰¹å®šè¡Œå’Œç‰¹å®šå­—符。", + "goto": "打开路径下的文件并定ä½åˆ°ç‰¹å®šè¡Œå’Œç‰¹å®šåˆ—。", "locale": "è¦ä½¿ç”¨çš„区域设置(例如 en-US 或 zh-TW)。", "newWindow": "强制创建一个新的 Code 实例。", "performance": "通过å¯ç”¨ \"Developer: Startup Performance\" 命令开始。", @@ -16,6 +16,7 @@ "inspect-brk-extensions": "å…许在扩展主机在å¯åŠ¨åŽæš‚åœæ—¶è¿›è¡Œæ‰©å±•的调试与分æžã€‚检查开å‘人员工具å¯èŽ·å–连接 URI。", "reuseWindow": "在上一活动窗å£ä¸­å¼ºåˆ¶æ‰“开文件或文件夹。", "userDataDir": "指定存放用户数æ®çš„目录。此目录在以 root 身份è¿è¡Œæ—¶å分有用。", + "log": "使用的日志级别。默认值为 \"info\"。å…许的值为 \"critical\" (关键)ã€\"error\" (错误)ã€\"warn\" (警告)ã€\"info\" (ä¿¡æ¯)ã€\"debug\" (调试)ã€\"trace\" (跟踪) å’Œ \"off\" (关闭)。", "verbose": "打å°è¯¦ç»†è¾“出(éšå« --wait 傿•°)。", "wait": "等文件关闭åŽå†è¿”回。", "extensionHomePath": "设置扩展的根路径。", diff --git a/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 66040db95cc..992b3f197f4 100644 --- a/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.engines.vscode": "对于 VS Code 扩展程åºï¼ŒæŒ‡å®šè¯¥æ‰©å±•程åºä¸Žä¹‹å…¼å®¹çš„ VS Code 版本。ä¸èƒ½ä¸º *. 例如: ^0.10.5 表示最低兼容 VS Code 版本 0.10.5。", + "vscode.extension.engines.vscode": "对于 VS Code 扩展,指定与其兼容的 VS Code 版本。ä¸èƒ½ä¸º *。 例如: ^0.10.5 表示最低兼容 VS Code 版本 0.10.5。", "vscode.extension.publisher": "VS Code 扩展的å‘布者。", "vscode.extension.displayName": "VS Code 库中使用的扩展的显示å称。", "vscode.extension.categories": "VS Code 库用于对扩展进行分类的类别。", - "vscode.extension.galleryBanner": "在 VS Code 商店中使用的横幅。", + "vscode.extension.galleryBanner": "VS Code 商城使用的横幅。", "vscode.extension.galleryBanner.color": "VS Code 商城页标题上的横幅颜色。", "vscode.extension.galleryBanner.theme": "横幅文字的颜色主题。", "vscode.extension.contributes": "由此包表示的 VS Code 扩展的所有贡献。", - "vscode.extension.preview": "在商店中将扩展标记为“预览版â€", + "vscode.extension.preview": "在 Marketplace 中设置扩展,将其标记为“预览â€ã€‚", "vscode.extension.activationEvents": "VS Code 扩展的激活事件。", "vscode.extension.activationEvents.onLanguage": "在打开被解æžä¸ºæŒ‡å®šè¯­è¨€çš„æ–‡ä»¶æ—¶å‘出的激活事件。", "vscode.extension.activationEvents.onCommand": "在调用指定命令时å‘出的激活事件。", @@ -22,7 +22,7 @@ "vscode.extension.activationEvents.workspaceContains": "在打开至少包å«ä¸€ä¸ªåŒ¹é…指定 glob 模å¼çš„æ–‡ä»¶çš„æ–‡ä»¶å¤¹æ—¶å‘出的激活事件。", "vscode.extension.activationEvents.onView": "在指定视图被展开时å‘出的激活事件。", "vscode.extension.activationEvents.star": "在 VS Code å¯åŠ¨æ—¶å‘出的激活事件。为确ä¿è‰¯å¥½çš„æœ€ç»ˆç”¨æˆ·ä½“验,请仅在其他激活事件组åˆä¸é€‚用于你的情况时,æ‰åœ¨æ‰©å±•中使用此事件。", - "vscode.extension.badges": "在商店扩展页é¢ä¾§è¾¹æ ä¸­æ˜¾ç¤ºçš„徽章的数组。", + "vscode.extension.badges": "在 Marketplace 的扩展页边æ ä¸­æ˜¾ç¤ºçš„徽章数组。", "vscode.extension.badges.url": "å¾½ç« å›¾åƒ URL。", "vscode.extension.badges.href": "徽章链接。", "vscode.extension.badges.description": "徽章说明。", diff --git a/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json index 8b65741ef0b..24ec2fcb7bd 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json @@ -67,5 +67,6 @@ "warn": "警告", "err": "错误", "critical": "关键", - "off": "关闭" + "off": "关闭", + "selectLogLevel": "选择日志级别" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 0623903445b..361a7a420b1 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,6 +11,8 @@ "breakpointAdded": "已添加断点,行 {0}, 文件 {1}", "breakpointRemoved": "已删除断点,行 {0},文件 {1}", "compoundMustHaveConfigurations": "å¤åˆé¡¹å¿…须拥有 \"configurations\" 属性集,æ‰èƒ½å¯åŠ¨å¤šä¸ªé…置。", + "configMissing": "\"launch.json\" 中缺少é…置“{0}â€ã€‚", + "launchJsonDoesNotExist": "\"launch.json\" ä¸å­˜åœ¨ã€‚", "debugRequestNotSupported": "所选调试é…置的属性“{0}â€çš„值“{1}â€ä¸å—支æŒã€‚", "debugRequesMissing": "所选的调试é…置缺少属性“{0}â€ã€‚", "debugTypeNotSupported": "é…置的类型“{0}â€ä¸å—支æŒã€‚", diff --git a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 3f110c4b49d..a463252daaf 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,7 +6,7 @@ { "name": "扩展å", "extension id": "扩展标识符", - "preview": "预览", + "preview": "预览版", "publisher": "å‘布æœåС噍åç§°", "install count": "安装计数", "rating": "评级", diff --git a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json index e4ad4894419..a6c445fa00d 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "ratedByUsers": "评价æ¥è‡ª {0} ä½ç”¨æˆ·" + "ratedByUsers": "评价æ¥è‡ª {0} ä½ç”¨æˆ·", + "ratedBySingleUser": "评价æ¥è‡ª 1 ä½ç”¨æˆ·" } \ No newline at end of file diff --git a/i18n/cht/extensions/css/client/out/cssMain.i18n.json b/i18n/cht/extensions/css/client/out/cssMain.i18n.json index 114a1822e0a..a7dadfd1a6a 100644 --- a/i18n/cht/extensions/css/client/out/cssMain.i18n.json +++ b/i18n/cht/extensions/css/client/out/cssMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "cssserver.name": "CSS 語言伺æœå™¨" + "cssserver.name": "CSS 語言伺æœå™¨", + "folding.start": "摺疊å€åŸŸé–‹å§‹", + "folding.end": "摺疊å€åŸŸçµå°¾" } \ No newline at end of file diff --git a/i18n/cht/extensions/emmet/package.i18n.json b/i18n/cht/extensions/emmet/package.i18n.json index 7d6aff82b16..efdcb2b4198 100644 --- a/i18n/cht/extensions/emmet/package.i18n.json +++ b/i18n/cht/extensions/emmet/package.i18n.json @@ -49,5 +49,8 @@ "emmetPreferencesBemModifierSeparator": "使用 BEM ç¯©é¸æ™‚用於類別的修飾詞分隔符號", "emmetPreferencesFilterCommentBefore": "å¥—ç”¨è¨»è§£ç¯©é¸æ™‚必須置於相符元素å‰çš„註解定義。", "emmetPreferencesFilterCommentAfter": "å¥—ç”¨è¨»è§£ç¯©é¸æ™‚必須置於相符元素後的註解定義。 ", - "emmetPreferencesFilterCommentTrigger": "必須採用縮寫以套用註解篩é¸çš„屬性å稱逗點分隔清單" + "emmetPreferencesFilterCommentTrigger": "必須採用縮寫以套用註解篩é¸çš„屬性å稱逗點分隔清單", + "emmetPreferencesFormatNoIndentTags": "陣列的標籤åç¨±ä¸æ‡‰å‘內縮排", + "emmetPreferencesFormatForceIndentTags": "陣列的標籤å稱應總是å‘內縮排", + "emmetPreferencesAllowCompactBoolean": "若為 true,則生æˆå¸ƒæž—屬性的嚴謹表示法" } \ No newline at end of file diff --git a/i18n/cht/extensions/git/out/autofetch.i18n.json b/i18n/cht/extensions/git/out/autofetch.i18n.json index bd190303079..78cd65caa1f 100644 --- a/i18n/cht/extensions/git/out/autofetch.i18n.json +++ b/i18n/cht/extensions/git/out/autofetch.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "yes": "是", - "no": "å¦" + "no": "å¦", + "not now": "䏿˜¯ç¾åœ¨", + "suggest auto fetch": "是å¦å•Ÿç”¨ Git 儲存庫的自動擷å–?" } \ No newline at end of file diff --git a/i18n/cht/extensions/git/out/commands.i18n.json b/i18n/cht/extensions/git/out/commands.i18n.json index 24b380b69e3..1ace18f1610 100644 --- a/i18n/cht/extensions/git/out/commands.i18n.json +++ b/i18n/cht/extensions/git/out/commands.i18n.json @@ -9,10 +9,12 @@ "create branch": "$(plus) 建立新的分支", "repourl": "儲存庫 URL", "parent": "父目錄", + "cancel": "$ (åŒæ­¥ ~ 旋轉) 複製儲存庫.. æŒ‰ä¸€ä¸‹ä»¥å–æ¶ˆ", "cancel tooltip": "å–æ¶ˆè¤‡è£½", "cloning": "正在複製 Git 儲存庫...", "openrepo": "開啟儲存庫", "proposeopen": "è¦é–‹å•Ÿè¤‡è£½çš„儲存庫嗎?", + "init": "鏿“‡å·¥ä½œå€è³‡æ–™å¤¾ä»¥åˆå§‹åŒ– git 儲存庫", "init repo": "åˆå§‹åŒ–儲存庫", "create repo": "åˆå§‹åŒ–儲存庫", "are you sure": "這會建立一個 Git 儲存庫在 '{0}'。確定è¦ç¹¼çºŒå—Žï¼Ÿ", @@ -58,6 +60,7 @@ "provide tag name": "è«‹æä¾›æ¨™ç±¤å稱", "tag message": "訊æ¯", "provide tag message": "è«‹æä¾›è¨Šæ¯ä»¥æ¨™è¨»æ¨™ç±¤", + "no remotes to fetch": "æ‚¨çš„å„²å­˜åº«æœªè¨­å®šè¦æ“·å–çš„é ç«¯ä¾†æºã€‚", "no remotes to pull": "æ‚¨çš„å„²å­˜åº«æœªè¨­å®šè¦æå–çš„é ç«¯ä¾†æºã€‚", "pick remote pull repo": "挑é¸è¦å°‡åˆ†æ”¯æå–出的é ç«¯", "no remotes to push": "æ‚¨çš„å„²å­˜åº«æœªè¨­å®šè¦æŽ¨é€çš„é ç«¯ç›®æ¨™ã€‚", @@ -74,6 +77,7 @@ "no stashes": "沒有è¦éš±è—å¯ä¾›é‚„原。", "pick stash to pop": "請挑é¸è¦å¿«é¡¯çš„éš±è—", "clean repo": "請先清除您的本地儲存庫工作å€å†ç°½å‡ºã€‚", + "cant push": "無法將åƒè€ƒæŽ¨é€åˆ°é ç«¯ã€‚請先嘗試執行 'æå–' ä»¥æ•´åˆæ‚¨çš„變更。", "git error details": "Git: {0}", "git error": "Git 錯誤", "open git log": "開啟 Git 記錄" diff --git a/i18n/cht/extensions/git/out/main.i18n.json b/i18n/cht/extensions/git/out/main.i18n.json index 1705b21123c..b9e759fe018 100644 --- a/i18n/cht/extensions/git/out/main.i18n.json +++ b/i18n/cht/extensions/git/out/main.i18n.json @@ -4,8 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "looking": "尋找 git : {0}", "using git": "正在使用來自 {1} çš„ git {0}", + "downloadgit": "下載 Git", "neverShowAgain": "ä¸è¦å†é¡¯ç¤º", + "notfound": "找ä¸åˆ° Git。安è£å®ƒæˆ–使用 \"git. path\" 設置。", "updateGit": "æ›´æ–° Git", "git20": "æ‚¨ä¼¼ä¹Žå·²å®‰è£ Git {0}。Code æ­é… Git >= 2 的執行效果最佳" } \ No newline at end of file diff --git a/i18n/cht/extensions/git/package.i18n.json b/i18n/cht/extensions/git/package.i18n.json index c21ef005686..5bb3d198bb4 100644 --- a/i18n/cht/extensions/git/package.i18n.json +++ b/i18n/cht/extensions/git/package.i18n.json @@ -36,6 +36,7 @@ "command.renameBranch": "釿–°å‘½å分支...", "command.merge": "åˆä½µåˆ†æ”¯...", "command.createTag": "建立標籤", + "command.fetch": "æ“·å–", "command.pull": "æå–", "command.pullRebase": "æå– (é‡è¨‚基底)", "command.pullFrom": "從...æå–", @@ -60,6 +61,7 @@ "config.countBadge": "控制 git 徽章計數器。[全部] 會計算所有變更。[已追蹤] åªæœƒè¨ˆç®—追蹤的變更。[關閉] 會將其關閉。", "config.checkoutType": "控制在執行 [簽出至...] 時,會列出那些類型的分支。[全部] 會顯示所有åƒè€ƒï¼Œ[本機] åªæœƒé¡¯ç¤ºæœ¬æ©Ÿåˆ†æ”¯ï¼Œ[標記] åªæœƒé¡¯ç¤ºæ¨™è¨˜ï¼Œ[é ç«¯] åªæœƒé¡¯ç¤ºé ç«¯åˆ†æ”¯ã€‚", "config.ignoreLegacyWarning": "ç•¥éŽèˆŠçš„ Git 警告", + "config.ignoreMissingGitWarning": "å¿½ç•¥éºæ¼ Git 時的警告", "config.ignoreLimitWarning": "當儲存庫中有éŽå¤šè®Šæ›´æ™‚,略éŽè­¦å‘Šã€‚", "config.defaultCloneDirectory": "複製 Git 儲存庫的é è¨­ä½ç½®", "config.enableSmartCommit": "無暫存變更時æäº¤æ‰€æœ‰è®Šæ›´ã€‚", diff --git a/i18n/cht/extensions/html/client/out/htmlMain.i18n.json b/i18n/cht/extensions/html/client/out/htmlMain.i18n.json index 7a77e714d97..d6e7c1e3a63 100644 --- a/i18n/cht/extensions/html/client/out/htmlMain.i18n.json +++ b/i18n/cht/extensions/html/client/out/htmlMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "htmlserver.name": "HTML 語言伺æœå™¨" + "htmlserver.name": "HTML 語言伺æœå™¨", + "folding.start": "摺疊å€åŸŸé–‹å§‹", + "folding.end": "摺疊å€åŸŸçµæŸ" } \ No newline at end of file diff --git a/i18n/cht/extensions/markdown/out/security.i18n.json b/i18n/cht/extensions/markdown/out/security.i18n.json index 870789578bf..4aaab7a1cbd 100644 --- a/i18n/cht/extensions/markdown/out/security.i18n.json +++ b/i18n/cht/extensions/markdown/out/security.i18n.json @@ -11,5 +11,8 @@ "disable.title": "åœç”¨", "disable.description": "å…許所有內容與指令碼執行。ä¸å»ºè­°", "moreInfo.title": "詳細資訊", + "enableSecurityWarning.title": "在此工作å€ä¸­å•Ÿç”¨é è¦½å®‰å…¨è­¦å‘Š", + "disableSecurityWarning.title": "ç¦ç”¨æ­¤å·¥ä½œå€ä¸­çš„é è¦½å®‰å…¨è­¦å‘Š", + "toggleSecurityWarning.description": "ä¸å½±éŸ¿å…§å®¹å®‰å…¨ç´šåˆ¥", "preview.showPreviewSecuritySelector.title": "鏿“‡æ­¤å·¥ä½œå€ Markdown é è¦½çš„安全性設定" } \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/package.i18n.json b/i18n/cht/extensions/merge-conflict/package.i18n.json index 21711a0ff32..7189e30af1b 100644 --- a/i18n/cht/extensions/merge-conflict/package.i18n.json +++ b/i18n/cht/extensions/merge-conflict/package.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "åˆä½µè¡çª", + "command.accept.all-current": "æŽ¥å—æ‰€æœ‰ç•¶å‰é …ç›®", "command.accept.all-incoming": "æŽ¥å—æ‰€æœ‰ä¾†æº", "command.accept.all-both": "接å—兩者所有項目", "command.accept.current": "接å—ç•¶å‰é …ç›®", diff --git a/i18n/cht/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/cht/extensions/typescript/out/features/completionItemProvider.i18n.json index f75533e302e..c42d9c7db98 100644 --- a/i18n/cht/extensions/typescript/out/features/completionItemProvider.i18n.json +++ b/i18n/cht/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "selectCodeAction": "鏿“‡è¦å¥—用的程å¼ç¢¼å‹•作", "acquiringTypingsLabel": "æ­£åœ¨æ“·å– typings...", "acquiringTypingsDetail": "正在為 IntelliSense æ“·å– typings 定義。", "autoImportLabel": "自動從 {0} 匯入" diff --git a/i18n/cht/src/vs/code/electron-main/main.i18n.json b/i18n/cht/src/vs/code/electron-main/main.i18n.json index 0311ac8ba64..e36aac75610 100644 --- a/i18n/cht/src/vs/code/electron-main/main.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/main.i18n.json @@ -6,6 +6,7 @@ { "secondInstanceNoResponse": "å¦ä¸€å€‹ {0} 執行個體正在執行,但沒有回應", "secondInstanceNoResponseDetail": "請關閉其他所有執行個體,然後å†è©¦ä¸€æ¬¡ã€‚", + "secondInstanceAdmin": "{0} 的第二個實例已作為管ç†å“¡é‹è¡Œã€‚", "secondInstanceAdminDetail": "請關閉其他執行個體,然後å†è©¦ä¸€æ¬¡ã€‚", "close": "關閉(&&C)" } \ No newline at end of file diff --git a/i18n/cht/src/vs/code/electron-main/menus.i18n.json b/i18n/cht/src/vs/code/electron-main/menus.i18n.json index 4aad58bdfe6..a9c5252b3c1 100644 --- a/i18n/cht/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/menus.i18n.json @@ -22,10 +22,12 @@ "miQuit": "çµæŸ {0}", "miNewFile": "新增檔案(&&N)", "miOpen": "開啟(&&O)...", + "miOpenWorkspace": "é–‹å•Ÿå·¥ä½œå€ (&&k)...", "miOpenFolder": "開啟資料夾(&&F)...", "miOpenFile": "開啟檔案(&&O)...", "miOpenRecent": "開啟最近的檔案(&&R)", "miSaveWorkspaceAs": "å¦å­˜å·¥ä½œå€ç‚º...", + "miAddFolderToWorkspace": "æ–°å¢žè³‡æ–™å¤¾è‡³å·¥ä½œå€ (&&A)...", "miSave": "儲存(&&S)", "miSaveAs": "å¦å­˜æ–°æª”(&&A)...", "miSaveAll": "全部儲存(&&L)", @@ -155,6 +157,7 @@ "mMergeAllWindows": "åˆä½µæ‰€æœ‰è¦–窗", "miToggleDevTools": "切æ›é–‹ç™¼äººå“¡å·¥å…·(&&T)", "miAccessibilityOptions": "å”助工具é¸é …(&&O)", + "miReportIssue": "回報å•題 (&&I)", "miWelcome": "歡迎使用(&&W)", "miInteractivePlayground": "Interactive Playground(&&I)", "miDocumentation": "文件(&&D)", @@ -181,6 +184,7 @@ "miDownloadingUpdate": "正在下載更新...", "miInstallingUpdate": "æ­£åœ¨å®‰è£æ›´æ–°...", "miCheckForUpdates": "æŸ¥çœ‹æ˜¯å¦æœ‰æ›´æ–°", + "aboutDetail": "版本 {0} \nèªå¯ {1} \n日期 {2} \nShell {3} \n轉譯器 {4} \n節點 {5} \næž¶æ§‹ {6}", "okButton": "確定", "copy": "複製(&&C)" } \ No newline at end of file diff --git a/i18n/cht/src/vs/code/node/cliProcessMain.i18n.json b/i18n/cht/src/vs/code/node/cliProcessMain.i18n.json index 02ee16e48c2..df13867eaad 100644 --- a/i18n/cht/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/cht/src/vs/code/node/cliProcessMain.i18n.json @@ -8,6 +8,7 @@ "notInstalled": "æœªå®‰è£æ“´å……功能 '{0}'。", "useId": "請確定您使用完整擴充功能識別碼 (包括發行者),例如: {0}", "successVsixInstall": "å·²æˆåŠŸå®‰è£å»¶ä¼¸æ¨¡çµ„ '{0}'!", + "cancelVsixInstall": "已喿¶ˆå®‰è£æ“´å……功能 \"{0}\"。", "alreadyInstalled": "已安è£éŽæ“´å……功能 '{0}'。", "foundExtension": "在市集中找到 '{0}'。", "installing": "正在安è£...", diff --git a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json index dd7847676ef..71be40322db 100644 --- a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -31,6 +31,7 @@ "minimap.maxColumn": "é™åˆ¶è¿·ä½ åœ°åœ–çš„å¯¬åº¦ï¼Œä»¥å‘ˆç¾æœ€å¤šçš„資料行", "find.seedSearchStringFromSelection": "控制編譯器é¸å–ç¯„åœæ˜¯å¦é è¨­ç‚ºå°‹æ‰¾å·¥å…·çš„æœå°‹å­—ä¸²", "find.autoFindInSelection": "控制編譯器內é¸å–多字元或多行內文是å¦é–‹å•Ÿé¸å–範åœå°‹æ‰¾åŠŸèƒ½", + "find.globalFindClipboard": "控制尋找å°å·¥å…·æ˜¯å¦åœ¨ macOS ä¸Šè®€å–æˆ–修改共用尋找剪貼簿  ", "wordWrap.off": "䏀律䏿›è¡Œã€‚", "wordWrap.on": "便ª¢è¦–å€å¯¬åº¦æ›è¡Œã€‚", "wordWrap.wordWrapColumn": "æ–¼ 'editor.wordWrapColumn' æ›è¡Œã€‚", diff --git a/i18n/cht/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/cht/src/vs/editor/contrib/folding/folding.i18n.json index 0a6abe06965..5ca5c126d3a 100644 --- a/i18n/cht/src/vs/editor/contrib/folding/folding.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/folding/folding.i18n.json @@ -9,6 +9,8 @@ "foldAction.label": "摺疊", "foldRecursivelyAction.label": "以éžè¿´æ–¹å¼æ‘ºç–Š", "foldAllBlockComments.label": "摺疊全部å€å¡Šè¨»è§£", + "foldAllMarkerRegions.label": "折疊所有å€åŸŸ", + "unfoldAllMarkerRegions.label": "展開所有å€åŸŸ", "foldAllAction.label": "全部摺疊", "unfoldAllAction.label": "全部展開", "foldLevelAction.label": "摺疊層級 {0}" diff --git a/i18n/cht/src/vs/platform/environment/node/argv.i18n.json b/i18n/cht/src/vs/platform/environment/node/argv.i18n.json index 09f8c0cfeaf..0874564b4c9 100644 --- a/i18n/cht/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/cht/src/vs/platform/environment/node/argv.i18n.json @@ -16,6 +16,7 @@ "inspect-brk-extensions": "å…è¨±å°æ“´å±•ä¸»æ©Ÿåœ¨å•Ÿå‹•å¾Œæš«åœæ“´å……功能進行除錯和分æžã€‚檢查開發工具中的連接 uri。", "reuseWindow": "強制在最近使用的視窗中開啟檔案或資料夾。", "userDataDir": "指定ä¿ç•™ä½¿ç”¨è€…資料的目錄,這在以根目錄身分執行時有用。", + "log": "使用的日誌級別。é è¨­ç‚º\"訊æ¯\"。å…許的值是 \"é—œéµ\"ã€\"錯誤\"ã€\"警告\"ã€\"訊æ¯\"ã€\"åµéŒ¯\"ã€\"追蹤\"ã€\"關閉\"。", "verbose": "列å°è©³ç´°è³‡è¨Šè¼¸å‡º (表示 --wait)。", "wait": "等候檔案在傳回å‰é—œé–‰ã€‚", "extensionHomePath": "設定擴充功能的根路徑。", diff --git a/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 36f7fd1af50..3bffab1e21e 100644 --- a/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -18,6 +18,7 @@ "vscode.extension.activationEvents.onCommand": "當指定的命令被調用時激發該事件", "vscode.extension.activationEvents.onDebug": "當使用者正è¦é–‹å§‹åµéŒ¯æˆ–是設定åµéŒ¯çµ„態時激發該事件", "vscode.extension.activationEvents.onDebugInitialConfigurations": "需è¦å»ºç«‹ \"launch.json\" 來觸發啟動事件 (並且需è¦å‘¼å«æ‰€æœ‰ provideDebugConfigurations 方法)。", + "vscode.extension.activationEvents.onDebugResolve": "需è¦ç‰¹å®šé¡žåž‹åµéŒ¯å·¥ä½œéšŽæ®µå•Ÿå‹•來觸發啟動事件 (並且呼å«ç›¸å°æ‡‰ resolveDebugConfiguration 方法)", "vscode.extension.activationEvents.workspaceContains": "當開啟指定的文件夾包å«glob模å¼åŒ¹é…的文件時激發該事件", "vscode.extension.activationEvents.onView": "當指定的檢視被擴展時激發該事件", "vscode.extension.activationEvents.star": "ç•¶VS Code啟動時激發該事件,ç‚ºäº†ç¢ºä¿æœ€å¥½çš„使用者體驗,當您的擴充功能沒有其他組åˆä½œæ¥­æ™‚,請激活此事件.", diff --git a/i18n/cht/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json index 45d26626e60..479d20a33a8 100644 --- a/i18n/cht/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "largeNumberBadge": "10 k +", "badgeTitle": "{0} - {1}", "additionalViews": "其他檢視", "numberBadge": "{0} ({1})", diff --git a/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json index b7ccbfd6338..daf7e22d21e 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json @@ -53,8 +53,20 @@ "doc": "如需支æ´çš„語言清單,請åƒé–± {0}。", "restart": "改變設定值後需è¦é‡æ–°å•Ÿå‹• VSCode.", "fail.createSettings": "無法建立 '{0}' ({1})。", + "openLogsFolder": "開啟紀錄資料夾", + "showLogs": "顯示紀錄...。", + "mainProcess": "主è¦", + "sharedProcess": "共用", + "rendererProcess": "轉譯器", + "extensionHost": "延伸主機", + "selectProcess": "é¸å–程åº", + "setLogLevel": "設定記錄層級", + "trace": "追蹤", "debug": "åµéŒ¯", "info": "資訊", "warn": "警告", - "err": "錯誤" + "err": "錯誤", + "critical": "é—œéµ", + "off": "關閉", + "selectLogLevel": "鏿“‡æ—¥èªŒç´šåˆ¥" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json index 26b36bafb2e..33e2c22230a 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -16,6 +16,7 @@ "workbench.editor.labelFormat.long": "顯示檔案的å稱,並在å稱後接著該檔案的絕å°è·¯å¾‘。", "tabDescription": "控制編輯器的標籤格å¼ã€‚變更此設定具有多項優點,例如å¯è®“檔案的ä½ç½®æ›´åŠ æ¸…æ¥š:\n-簡短: 'parent'\n-中等: 'workspace/src/parent'\n-完整: '/home/user/workspace/src/parent'\n-é è¨­: '.../parent',當å¦ä¸€å€‹ç´¢å¼•標籤共用相åŒçš„æ¨™é¡Œï¼Œæˆ–若路徑åœç”¨ï¼Œå»å…±ç”¨ç›¸é—œçš„工作å€è·¯å¾‘時", "editorTabCloseButton": "控制編輯器的索引標籤關閉按鈕ä½ç½®ï¼Œæˆ–在設為 'off' 時將其åœç”¨ã€‚", + "tabSizing": "控制編輯器索引標籤的大å°èª¿æ•´ã€‚設定為 \"最é©å¤§å°\" å¯è®“索引標籤永é ä¿æŒè¶³å¤ ç©ºé–“來顯示完整的編輯器標籤。設定為 \"縮å°\" å¯åœ¨å¯ç”¨ç©ºé–“ä¸è¶³ä»¥åŒæ™‚顯示所有索引標籤時,縮å°ç´¢å¼•標籤。", "showIcons": "æŽ§åˆ¶é–‹å•Ÿçš„ç·¨è¼¯å™¨æ˜¯å¦æ­é…圖示顯示。這需è¦åŒæ™‚啟用圖示佈景主題。", "enablePreview": "控制已開啟的編輯器是å¦é¡¯ç¤ºç‚ºé è¦½ã€‚é è¦½ç·¨è¼¯å™¨æœƒé‡è¤‡ä½¿ç”¨åˆ°è¢«ä¿ç•™ (例如按兩下或進行編輯) 並以斜體字型樣å¼é¡¯ç¤ºç‚ºæ­¢ã€‚", "enablePreviewFromQuickOpen": "控制é€éŽ Quick Open 所開啟的編輯器是å¦é¡¯ç¤ºç‚ºé è¦½ã€‚é è¦½ç·¨è¼¯å™¨æœƒé‡è¤‡ä½¿ç”¨åˆ°è¢«ä¿ç•™ (例如按兩下或進行編輯) 為止。", @@ -29,6 +30,7 @@ "statusBarVisibility": "控制 Workbench 底端狀態列的å¯è¦–性。", "activityBarVisibility": "控制活動列在 workbench 中的å¯è¦‹åº¦ã€‚", "closeOnFileDelete": "æŽ§åˆ¶é¡¯ç¤ºæª”æ¡ˆçš„ç·¨è¼¯å™¨æ˜¯å¦æ‡‰åœ¨å…¶ä»–處ç†åºåˆªé™¤æˆ–釿–°å‘½å該檔案時自動關閉。若åœç”¨æ­¤é¸é …,當發生å‰è¿°ç‹€æ³æ™‚ï¼Œç·¨è¼¯å™¨æœƒä¿æŒé–‹å•Ÿï¼Œä¸¦å‘ˆç¾å·²è®Šæ›´çš„狀態。請注æ„,從應用程å¼å…§åˆªé™¤ä¸€å¾‹æœƒé—œé–‰ç·¨è¼¯å™¨ï¼Œä½†å·²è®Šæ›´çš„æª”案在資料未儲存å‰ä¸€å¾‹ä¸æœƒé—œé–‰ã€‚", + "enableNaturalLanguageSettingsSearch": "控制是å¦å•Ÿç”¨è‡ªç„¶èªžè¨€æœå°‹æ¨¡å¼ã€‚", "fontAliasing": "在 Workbench 中控制字型鋸齒化的方法。- é è¨­: å­åƒç´ å­—型平滑處ç†ã€‚åœ¨å¤§éƒ¨åˆ†éž Retina 顯示器上會顯示出最銳利的文字- 已消除鋸齒: ç›¸å°æ–¼å­åƒç´ ï¼Œæ ¹æ“šåƒç´ å±¤ç´šå¹³æ»‘字型。å¯è®“字型整體顯得較細- ç„¡: åœç”¨å­—型平滑處ç†ã€‚文字會以鋸齒狀的銳邊顯示 ", "workbench.fontAliasing.default": "å­åƒç´ å­—型平滑處ç†ã€‚åœ¨å¤§éƒ¨åˆ†éž Retina 顯示器上會顯示出最銳利的文字。", "workbench.fontAliasing.antialiased": "ç›¸å°æ–¼å­åƒç´ ï¼Œæ ¹æ“šåƒç´ å±¤ç´šå¹³æ»‘字型。å¯ä»¥è®“字型整體顯得較細。", diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index ff4a8ed693f..e0175b5cdfc 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,6 +20,10 @@ "openExplorerOnEnd": "自動於åµéŒ¯å·¥ä½œéšŽæ®µçµæŸæ™‚開啟總管檢視", "inlineValues": "在åµéŒ¯æ™‚於編輯器以內嵌方å¼é¡¯ç¤ºè®Šæ•¸å€¼", "hideActionBar": "æŽ§åˆ¶æ˜¯å¦æ‡‰éš±è—浮點åµéŒ¯å‹•作列", + "never": "一律ä¸åœ¨ç‹€æ…‹åˆ—顯示åµéŒ¯", + "always": "é ç”¨åœ¨ç‹€æ…‹åˆ—中顯示åµéŒ¯", + "onFirstSessionStart": "åªæœ‰ç¬¬ä¸€æ¬¡å•Ÿå‹•åµéŒ¯å¾Œæ‰åœ¨ç‹€æ…‹åˆ—中顯示åµéŒ¯", "showInStatusBar": "控制何時應該顯示åµéŒ¯ç‹€æ…‹åˆ—", + "openDebug": "控制åµéŒ¯ viewlet 是å¦åœ¨ debugging session 啟動時開啟。", "launch": "全域åµéŒ¯å•Ÿå‹•組態。應當åšåœ¨å·¥ä½œå€ä¹‹é–“共用的 'launch.json' 替代方案使用" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 4a1b22f7293..4deaf2ddc5d 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,6 +11,8 @@ "breakpointAdded": "已新增中斷點,行 {0},檔案 {1}", "breakpointRemoved": "已移除中斷點,行 {0},檔案 {1}", "compoundMustHaveConfigurations": "複åˆå¿…須設有 \"configurations\" 屬性,æ‰èƒ½å•Ÿå‹•多個組態。", + "configMissing": "'launch.json' ä¸­éºæ¼çµ„æ…‹ '{0}'。", + "launchJsonDoesNotExist": "'launch.json' ä¸å­˜åœ¨ã€‚", "debugRequestNotSupported": "在é¸å–çš„åµéŒ¯çµ„態中,屬性 `{0}` å…·æœ‰ä¸æ”¯æ´çš„值 '{1}'。", "debugRequesMissing": "所é¸çš„åµéŒ¯çµ„æ…‹éºæ¼å±¬æ€§ '{0}'。", "debugTypeNotSupported": "䏿”¯æ´è¨­å®šçš„åµéŒ¯é¡žåž‹ '{0}'。", diff --git a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json index 8b6ad71cd4e..64f3c6488bc 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ratedByUsers": "ç”± {0} 使用者評等", + "ratedBySingleUser": "ç”± 1 ä½ä½¿ç”¨è€…è©•ç­‰" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 8b6ad71cd4e..eb4eee28be7 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectAndStartDebug": "æŒ‰ä¸€ä¸‹ä»¥åœæ­¢æ€§èƒ½åˆ†æžã€‚" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 67a25ef1452..aaea0f3774b 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -7,9 +7,11 @@ "extensionsCommands": "ç®¡ç†æ“´å……功能", "galleryExtensionsCommands": "安è£è³‡æºåº«æ“´å……功能", "extension": "擴充功能", + "runtimeExtension": "正在執行擴充功能", "extensions": "擴充功能", "view": "檢視", "developer": "開發人員", "extensionsConfigurationTitle": "擴充功能", - "extensionsAutoUpdate": "自動更新擴充功能" + "extensionsAutoUpdate": "自動更新擴充功能", + "extensionsIgnoreRecommendations": "如果設定為 trueï¼Œæ“´å……åŠŸèƒ½å»ºè­°é€šçŸ¥å°‡åœæ­¢é¡¯ç¤ºã€‚" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json index 8ab5d602c3a..be9d2e3a838 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -4,5 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "reportExtensionIssue": "回報å•題" + "starActivation": "在開始時啟動", + "workspaceContainsGlobActivation": "已啟動,因為與 {0} 相符的檔案存在您的工作å€ä¸­", + "workspaceContainsFileActivation": "已啟動,因為檔案 {0} 存在您的工作å€ä¸­", + "languageActivation": "已啟動,因為您打開了 {0} 檔案", + "workspaceGenericActivation": "已在 {0} 上啟動", + "errors": "{0} 未攔截錯誤", + "extensionsInputName": "正在執行擴充功能", + "showRuntimeExtensions": "顯示正在執行的擴充功能", + "reportExtensionIssue": "回報å•題", + "extensionHostProfileStart": "啟動延伸主機設定檔", + "extensionHostProfileStop": "åœæ­¢å»¶ä¼¸ä¸»æ©Ÿè¨­å®šæª”", + "saveExtensionHostProfile": "儲存延伸主機設定檔" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/cht/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json index 8b6ad71cd4e..898e5d9f617 100644 --- a/i18n/cht/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "totalProblems": "å…± {0} é …å•題", + "filteredProblems": "顯示 {1} çš„ {0} å•題" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/cht/src/vs/workbench/parts/markers/common/messages.i18n.json index af077309e72..7fd5ffaf852 100644 --- a/i18n/cht/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,6 +6,7 @@ { "viewCategory": "檢視", "problems.view.toggle.label": "切æ›å•題", + "problems.view.focus.label": "èšç„¦å•題", "problems.panel.configuration.title": "[å•題] 檢視", "problems.panel.configuration.autoreveal": "控制 [å•題] æª¢è¦–æ˜¯å¦æ‡‰è‡ªå‹•在開啟檔案時加以顯示", "markers.panel.title.problems": "å•題", diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 1d840c42cf9..450c57bf7a0 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "defineKeybinding.initial": "按下所需按éµçµ„åˆï¼Œç„¶å¾ŒæŒ‰ ENTER。", "defineKeybinding.chordsTo": "åŒæ­¥åˆ°" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 21867210659..f81891ad4c2 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "openRawDefaultSettings": "開啟原始é è¨­è¨­ç½®", "openGlobalSettings": "開啟使用者設定", "openGlobalKeybindings": "開啟éµç›¤å¿«é€Ÿéµ", "openGlobalKeybindingsFile": "開啟éµç›¤å¿«é€Ÿéµæª”案", diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index 5c3acf7c7d6..480c3d2dbc2 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,10 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "defaultSettingsFuzzyPrompt": "試試自然語言æœå°‹ï¼", "defaultSettings": "å°‡æ‚¨çš„è¨­å®šæ”¾ç½®æ–¼å³æ–¹ç·¨è¼¯å™¨ä¸­ä»¥è¦†å¯«ã€‚", "noSettingsFound": "找ä¸åˆ°ä»»ä½•設定。", "settingsSwitcherBarAriaLabel": "設定切æ›å™¨", "userSettings": "使用者設定", "workspaceSettings": "工作å€è¨­å®š", - "folderSettings": "資料夾設定" + "folderSettings": "資料夾設定", + "enableFuzzySearch": "啟用自然語言æœå°‹" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 9ec03d55932..c5e55c9814a 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -51,6 +51,7 @@ "TaslService.noEntryToRun": "找ä¸åˆ°ä»»ä½•è¦åŸ·è¡Œçš„工作。請設定工作...", "TaskService.fetchingBuildTasks": "正在擷å–組建工作...", "TaskService.pickBuildTask": "è«‹é¸å–è¦åŸ·è¡Œçš„組建工作", + "TaskService.noBuildTask": "找ä¸åˆ°ä»»ä½•è¦åŸ·è¡Œçš„組建工作。請設定建置工作...", "TaskService.fetchingTestTasks": "æ­£åœ¨æ“·å–æ¸¬è©¦å·¥ä½œ...", "TaskService.pickTestTask": "è«‹é¸å–è¦åŸ·è¡Œçš„æ¸¬è©¦å·¥ä½œ", "TaskService.noTestTaskTerminal": "找ä¸åˆ°ä»»ä½•è¦åŸ·è¡Œçš„æ¸¬è©¦å·¥ä½œã€‚請設定工作...", diff --git a/i18n/cht/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index 381d6bbb407..6f6536eb134 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,6 +14,8 @@ "ConfigurationParser.noTypeDefinition": "錯誤: 沒有已註冊工作類型 '{0}'。您是å¦å¿˜è¨˜å®‰è£æä¾›ç›¸æ‡‰å·¥ä½œæä¾›è€…的延伸模組?", "ConfigurationParser.missingRequiredProperty": "錯誤: 工作組態 '{0}' ç¼ºå°‘è¦æ±‚的屬性 '{1}'。會略éŽå·¥ä½œçµ„態。", "ConfigurationParser.notCustom": "錯誤: 未將工作宣告為自訂工作。將會忽略該組態。\n{0}\n", + "ConfigurationParser.noTaskName": "錯誤: 一項工作必須æä¾›æ¨™ç±¤å±¬æ€§ã€‚å³å°‡å¿½ç•¥æ­¤å·¥ä½œã€‚\n{0}\n", + "taskConfiguration.shellArgs": "警告: 工作 '{0}' 是 shell 命令 ,其中一個引數å¯èƒ½æœ‰æœªé€¸å‡ºçš„空格。若è¦ç¢ºä¿å‘½ä»¤åˆ—正確引述,請將引數åˆä½µåˆ°å‘½ä»¤ä¸­ã€‚", "taskConfiguration.noCommandOrDependsOn": "錯誤: 工作 '{0}' 未指定命令與 dependsOn 屬性。將會略éŽè©²å·¥ä½œã€‚其定義為: \n{1}", "taskConfiguration.noCommand": "錯誤: 工作 '{0}' 未定義命令。å³å°‡ç•¥éŽè©²å·¥ä½œã€‚其定義為:\n{1}", "TaskParse.noOsSpecificGlobalTasks": "工作版本 2.0.0 䏿”¯æ´å…¨åŸŸ OS 特定工作。請使用 OS 特定命令來轉æ›é€™äº›å·¥ä½œã€‚å—影響的工作為:\n{0}" diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index a6aa09a9aa9..80abe8bb59c 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.rightClickCopyPaste": "如有設定,這會防止在終端機內按滑鼠å³éµæ™‚顯示æ“作功能表,而是在有é¸å–é …ç›®æ™‚è¤‡è£½ã€æ²’有é¸å–項目時貼上。", "terminal.integrated.fontFamily": "控制終端機的字型家æ—,é è¨­ç‚º editor.fontFamily 的值。", "terminal.integrated.fontSize": "æŽ§åˆ¶çµ‚ç«¯æ©Ÿçš„å­—åž‹å¤§å° (以åƒç´ ç‚ºå–®ä½)。", + "terminal.integrated.lineHeight": "控制終端機的行高,此數字會乘上終端機字型大å°ï¼Œä»¥å–得以åƒç´ ç‚ºå–®ä½çš„實際行高。", "terminal.integrated.enableBold": "是å¦è¦åœ¨çµ‚端機中啟用粗體文字,請注æ„,此動作須有終端機殼層的支æ´ã€‚", "terminal.integrated.cursorBlinking": "控制終端機資料指標是å¦é–ƒçˆã€‚", "terminal.integrated.cursorStyle": "控制終端機資料指標的樣å¼ã€‚", diff --git a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index c2b6d2e3885..86e37b541ca 100644 --- a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -7,6 +7,7 @@ "selectTheme.label": "色彩佈景主題", "themes.category.light": "淺色主題", "themes.category.dark": "深色主題", + "themes.category.hc": "é«˜å°æ¯”主題", "installColorThemes": "安è£å…¶ä»–的色彩佈景主題...", "themes.selectTheme": "é¸å–色彩主題(上/下éµé è¦½)", "selectIconTheme.label": "檔案圖示佈景主題", diff --git a/i18n/cht/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/cht/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index 8b6ad71cd4e..40b81b62803 100644 --- a/i18n/cht/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "bubbleTitle": "包å«å¼·èª¿é …ç›®" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/cht/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json index 8b6ad71cd4e..178e97d6b83 100644 --- a/i18n/cht/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json +++ b/i18n/cht/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "message": "$(zap) 分æžå»¶ä¼¸ä¸»æ©Ÿ..." +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/cht/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index e9e580ceb96..86661838eb1 100644 --- a/i18n/cht/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -9,5 +9,6 @@ "extensionHostProcess.crash": "延伸主機æ„外終止。", "extensionHostProcess.unresponsiveCrash": "因為延伸主機沒有回應,所以æ„外終止。", "overwritingExtension": "正在以 {1} 覆寫延伸模組 {0}。", - "extensionUnderDevelopment": "æ­£åœ¨è¼‰å…¥ä½æ–¼ {0} 的開發延伸模組" + "extensionUnderDevelopment": "æ­£åœ¨è¼‰å…¥ä½æ–¼ {0} 的開發延伸模組", + "extensionCache.invalid": "擴充功能在ç£ç¢Ÿä¸Šå·²ä¿®æ”¹ã€‚è«‹é‡æ–°è¼‰å…¥è¦–窗。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 6cf70a55716..3d15720ddec 100644 --- a/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -21,5 +21,6 @@ "keybindings.json.command": "所è¦åŸ·è¡Œå‘½ä»¤çš„å稱", "keybindings.json.when": "按éµç‚ºä½¿ç”¨ä¸­æ™‚çš„æ¢ä»¶ã€‚", "keybindings.json.args": "è¦å‚³éžè‡³å‘½ä»¤åŠ ä»¥åŸ·è¡Œçš„å¼•æ•¸ã€‚", - "keyboardConfigurationTitle": "éµç›¤" + "keyboardConfigurationTitle": "éµç›¤", + "dispatch": "æŽ§åˆ¶æŒ‰ä¸‹æŒ‰éµæ™‚的分派é‚輯 (使用 'code' (建議使用) 或 'keyCode')。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/cht/src/vs/workbench/services/textfile/common/textFileService.i18n.json index 8b6ad71cd4e..83d4c0bd31e 100644 --- a/i18n/cht/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "files.backup.failSave": "檔案變更無法寫入備份å€åŸŸ (錯誤: {0})ã€‚è«‹å˜—è©¦å„²å­˜æ‚¨çš„æª”æ¡ˆå¾ŒçµæŸã€‚" +} \ No newline at end of file diff --git a/i18n/deu/extensions/css/client/out/cssMain.i18n.json b/i18n/deu/extensions/css/client/out/cssMain.i18n.json index 139e2e24da4..254ee717d96 100644 --- a/i18n/deu/extensions/css/client/out/cssMain.i18n.json +++ b/i18n/deu/extensions/css/client/out/cssMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "cssserver.name": "CSS-Sprachserver" + "cssserver.name": "CSS-Sprachserver", + "folding.start": "Regionsanfang wird gefaltet", + "folding.end": "Regionsende wird gefaltet" } \ No newline at end of file diff --git a/i18n/deu/extensions/emmet/package.i18n.json b/i18n/deu/extensions/emmet/package.i18n.json index 0ad73e29fcc..079d0046ed5 100644 --- a/i18n/deu/extensions/emmet/package.i18n.json +++ b/i18n/deu/extensions/emmet/package.i18n.json @@ -49,5 +49,8 @@ "emmetPreferencesBemModifierSeparator": "Modifizierertrennzeichen für Klassen unter Verwendung des BEM-Filters", "emmetPreferencesFilterCommentBefore": "Eine Kommentardefinition, die vor dem abgeglichenen Element platziert werden muss, wenn ein Kommentarfilter angewendet wird.", "emmetPreferencesFilterCommentAfter": "Eine Kommentardefinition, die nach dem abgeglichenen Element platziert werden muss, wenn ein Kommentarfilter angewendet wird.", - "emmetPreferencesFilterCommentTrigger": "Eine durch Trennzeichen getrennte Liste von Attributnamen, die in abgekürzter Form vorliegen müssen, damit der Kommentarfilter angewendet werden kann" + "emmetPreferencesFilterCommentTrigger": "Eine durch Trennzeichen getrennte Liste von Attributnamen, die in abgekürzter Form vorliegen müssen, damit der Kommentarfilter angewendet werden kann", + "emmetPreferencesFormatNoIndentTags": "Ein Array von Tagnamen, die keinen inneren Einzug erhalten", + "emmetPreferencesFormatForceIndentTags": "Ein Array von Tagnamen, die immer einen inneren Einzug erhalten", + "emmetPreferencesAllowCompactBoolean": "Bei TRUE wird eine kompakte Notation boolescher Attribute erzeugt" } \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/autofetch.i18n.json b/i18n/deu/extensions/git/out/autofetch.i18n.json index 304f70941e2..e1242008fcf 100644 --- a/i18n/deu/extensions/git/out/autofetch.i18n.json +++ b/i18n/deu/extensions/git/out/autofetch.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "yes": "Ja", - "no": "Nein" + "no": "Nein", + "not now": "Nicht jetzt", + "suggest auto fetch": "Möchten Sie das automatische Abrufen von Git-Repositorys aktivieren?" } \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/commands.i18n.json b/i18n/deu/extensions/git/out/commands.i18n.json index 9f89fe2f662..27787e3b3d4 100644 --- a/i18n/deu/extensions/git/out/commands.i18n.json +++ b/i18n/deu/extensions/git/out/commands.i18n.json @@ -14,6 +14,7 @@ "cloning": "Git-Repository wird geklont...", "openrepo": "Repository öffnen", "proposeopen": "Möchten Sie das geklonte Repository öffnen?", + "init": "Arbeitsbereichsordner auswählen, in dem das Git-Repository initialisiert wird", "init repo": "Repository initialisieren", "create repo": "Repository initialisieren", "are you sure": "Erstellt ein Git-Repository unter '{0}'. Sind Sie sicher das Sie weiterfahren möchten?", @@ -59,6 +60,7 @@ "provide tag name": "Geben Sie einen Tagnamen an.", "tag message": "Nachricht", "provide tag message": "Geben Sie eine Meldung ein, um das Tag mit einer Anmerkung zu versehen.", + "no remotes to fetch": "In diesem Repository wurden keine Remoteelemente konfiguriert, aus denen ein Abrufen erfolgt.", "no remotes to pull": "In Ihrem Repository wurden keine Remoteelemente für den Pull konfiguriert.", "pick remote pull repo": "Remoteelement zum Pullen des Branch auswählen", "no remotes to push": "In Ihrem Repository wurden keine Remoteelemente für den Push konfiguriert.", @@ -75,6 +77,7 @@ "no stashes": "Es ist kein Stash zum Wiederherstellen vorhanden.", "pick stash to pop": "Wählen Sie einen Stash aus, für den ein Pop ausgeführt werden soll.", "clean repo": "Bereinigen Sie Ihre Repository-Arbeitsstruktur vor Auftragsabschluss.", + "cant push": "Verweise können nicht per Push an einen Remotespeicherort übertragen werden. Führen Sie zuerst \"Pull\" aus, um Ihre Änderungen zu integrieren.", "git error details": "Git: {0}", "git error": "Git-Fehler", "open git log": "Git-Protokoll öffnen" diff --git a/i18n/deu/extensions/git/out/main.i18n.json b/i18n/deu/extensions/git/out/main.i18n.json index 17a3a6ed127..49edb1c1faa 100644 --- a/i18n/deu/extensions/git/out/main.i18n.json +++ b/i18n/deu/extensions/git/out/main.i18n.json @@ -6,7 +6,9 @@ { "looking": "Suchen nach Git in: {0}", "using git": "Verwenden von Git {0} von {1}", + "downloadgit": "Git herunterladen", "neverShowAgain": "Nicht mehr anzeigen", + "notfound": "Git nicht gefunden. Installieren Sie es, oder konfigurieren Sie es mithilfe der Einstellung \"git.path\".", "updateGit": "Git aktualisieren", "git20": "Sie haben anscheinend Git {0} installiert. Code funktioniert am besten mit Git 2 oder neuer" } \ No newline at end of file diff --git a/i18n/deu/extensions/git/package.i18n.json b/i18n/deu/extensions/git/package.i18n.json index 88964f86644..de4d841dd21 100644 --- a/i18n/deu/extensions/git/package.i18n.json +++ b/i18n/deu/extensions/git/package.i18n.json @@ -36,6 +36,7 @@ "command.renameBranch": "Branch umbenennen...", "command.merge": "Branch zusammenführen...", "command.createTag": "Tag erstellen", + "command.fetch": "Abrufen", "command.pull": "Pull", "command.pullRebase": "Pull (Rebase)", "command.pullFrom": "Pullen von...", @@ -47,6 +48,7 @@ "command.publish": "Branch veröffentlichen", "command.showOutput": "Git-Ausgabe anzeigen", "command.ignore": "Datei zu .gitignore hinzufügen", + "command.stashIncludeUntracked": "Stash (einschließlich nicht verfolgt)", "command.stash": " Stash ausführen", "command.stashPop": "Pop für Stash ausführen...", "command.stashPopLatest": "Pop für letzten Stash ausführen", @@ -59,6 +61,7 @@ "config.countBadge": "Steuert die Git-Badgeanzahl. \"Alle\" zählt alle Änderungen. \"tracked\" (Nachverfolgt) zählt nur die nachverfolgten Änderungen. \"off\" (Aus) deaktiviert dies.", "config.checkoutType": "Steuert, welcher Branchtyp beim Ausführen von \"Auschecken an...\" aufgelistet wird. \"Alle\" zeigt alle Verweise an, \"Lokal\" nur die lokalen Branches, \"Tags\" zeigt nur Tags an, und \"Remote\" zeigt nur Remotebranches an.", "config.ignoreLegacyWarning": "Ignoriert die Legacy-Git-Warnung.", + "config.ignoreMissingGitWarning": "Ignoriert die Warnung, wenn Git fehlt", "config.ignoreLimitWarning": "Ignoriert Warnung bei zu hoher Anzahl von Änderungen in einem Repository", "config.defaultCloneDirectory": "Das Standard-Verzeichnis für einen Klon eines Git-Repositorys", "config.enableSmartCommit": "Alle Änderungen committen, wenn keine bereitgestellten Änderungen vorhanden sind.", diff --git a/i18n/deu/extensions/html/client/out/htmlMain.i18n.json b/i18n/deu/extensions/html/client/out/htmlMain.i18n.json index b2bef37b9bd..c3c7dcb8f4e 100644 --- a/i18n/deu/extensions/html/client/out/htmlMain.i18n.json +++ b/i18n/deu/extensions/html/client/out/htmlMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "htmlserver.name": "HTML-Sprachserver" + "htmlserver.name": "HTML-Sprachserver", + "folding.start": "Regionsanfang wird gefaltet", + "folding.end": "Regionsende wird gefaltet" } \ No newline at end of file diff --git a/i18n/deu/extensions/markdown/out/security.i18n.json b/i18n/deu/extensions/markdown/out/security.i18n.json index 70533ed2e5d..cd3ce408e9b 100644 --- a/i18n/deu/extensions/markdown/out/security.i18n.json +++ b/i18n/deu/extensions/markdown/out/security.i18n.json @@ -11,5 +11,8 @@ "disable.title": "Deaktivieren", "disable.description": "Alle Inhalte und Skriptausführung zulassen. Nicht empfohlen.", "moreInfo.title": "Weitere Informationen", + "enableSecurityWarning.title": "Vorschau von Sicherheitswarnungen in diesem Arbeitsbereich aktivieren", + "disableSecurityWarning.title": "Vorschau von Sicherheitswarnungen in diesem Arbeitsbereich deaktivieren ", + "toggleSecurityWarning.description": "Kein Einfluss auf Inhalt Sicherheitsebene", "preview.showPreviewSecuritySelector.title": "Sicherheitseinstellungen für die Markdown-Vorschau in diesem Arbeitsbereich auswählen" } \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/package.i18n.json b/i18n/deu/extensions/merge-conflict/package.i18n.json index 5bbe54989dc..bc7d0cf1cf7 100644 --- a/i18n/deu/extensions/merge-conflict/package.i18n.json +++ b/i18n/deu/extensions/merge-conflict/package.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "Merge-Konflikt", + "command.accept.all-current": "Alle aktuellen akzeptieren", "command.accept.all-incoming": "Alle eingehenden akzeptieren", "command.accept.all-both": "Alle beide akzeptieren", "command.accept.current": "Aktuelles akzeptieren", diff --git a/i18n/deu/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/deu/extensions/typescript/out/features/completionItemProvider.i18n.json index 87035b7816f..fceb3f1c9e0 100644 --- a/i18n/deu/extensions/typescript/out/features/completionItemProvider.i18n.json +++ b/i18n/deu/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "selectCodeAction": "Anzuwendende Codeaktion auswählen", "acquiringTypingsLabel": "Eingaben werden abgerufen...", "acquiringTypingsDetail": "Eingabedefinitionen für IntelliSense werden abgerufen.", "autoImportLabel": "Automatischer Import von {0}" diff --git a/i18n/deu/extensions/typescript/package.i18n.json b/i18n/deu/extensions/typescript/package.i18n.json index 11769f91e3f..baf9f4497a7 100644 --- a/i18n/deu/extensions/typescript/package.i18n.json +++ b/i18n/deu/extensions/typescript/package.i18n.json @@ -39,6 +39,7 @@ "typescript.openTsServerLog.title": "TS Server-Protokolldatei öffnen", "typescript.restartTsServer": "TS Server neu starten", "typescript.selectTypeScriptVersion.title": "TypeScript-Version wählen", + "typescript.reportStyleChecksAsWarnings": "Formatvorlagenprüfungen als Warnungen melden", "jsDocCompletion.enabled": "Automatische JSDoc-Kommentare aktivieren/deaktivieren", "javascript.implicitProjectConfig.checkJs": "Aktiviert/deaktiviert die Semantikprüfung bei JavaScript-Dateien. Diese Einstellung wird von vorhandenen \"jsconfig.json\"- oder \"tsconfig.json\"-Dateien außer Kraft gesetzt. Erfordert TypeScript 2.3.1 oder höher.", "typescript.npm": "Gibt den Pfad zur ausführbaren NPM-Datei an, die für die automatische Typerfassung verwendet wird. Hierfür ist TypeScript 2.3.4 oder höher erforderlich.", diff --git a/i18n/deu/src/vs/code/electron-main/main.i18n.json b/i18n/deu/src/vs/code/electron-main/main.i18n.json index b88bee0ef1d..2a8df2c0128 100644 --- a/i18n/deu/src/vs/code/electron-main/main.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/main.i18n.json @@ -4,5 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "secondInstanceNoResponse": "Eine andere Instanz von {0} läuft, reagiert aber nicht", + "secondInstanceNoResponseDetail": "Bitte schließen Sie alle anderen Instanzen, und versuchen Sie es erneut.", + "secondInstanceAdmin": "Eine zweite Instanz von {0} wird bereits als Administrator ausgeführt.", + "secondInstanceAdminDetail": "Bitte schließen Sie die andere Instanz, und versuchen Sie es erneut.", "close": "&&Schließen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/code/electron-main/menus.i18n.json b/i18n/deu/src/vs/code/electron-main/menus.i18n.json index 8dcc363ec8e..edb7ae515e1 100644 --- a/i18n/deu/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/menus.i18n.json @@ -22,10 +22,12 @@ "miQuit": "{0} beenden", "miNewFile": "&&Neue Datei", "miOpen": "&&Öffnen...", + "miOpenWorkspace": "Ar&&beitsbereich öffnen...", "miOpenFolder": "&&Ordner öffnen...", "miOpenFile": "Datei &&öffnen...", "miOpenRecent": "&&Zuletzt verwendete öffnen", "miSaveWorkspaceAs": "Arbeitsbereich speichern unter...", + "miAddFolderToWorkspace": "Or&&dner zu Arbeitsbereich hinzufügen...", "miSave": "&&Speichern", "miSaveAs": "Speichern &&unter...", "miSaveAll": "A&&lles speichern", @@ -155,6 +157,7 @@ "mMergeAllWindows": "Alle Fenster zusammenführen", "miToggleDevTools": "&&Entwicklertools umschalten", "miAccessibilityOptions": "&&Optionen für erleichterte Bedienung", + "miReportIssue": "&&Problem melden", "miWelcome": "&&Willkommen", "miInteractivePlayground": "&&Interactive Spielwiese", "miDocumentation": "&&Dokumentation", @@ -181,6 +184,7 @@ "miDownloadingUpdate": "Das Update wird heruntergeladen...", "miInstallingUpdate": "Update wird installiert...", "miCheckForUpdates": "Nach Aktualisierungen suchen...", + "aboutDetail": "\nVersion {0}\nCommit {1}\nDatum {2}\nShell {3}\nRenderer {4}\nNode {5}\nArchitektur {6}", "okButton": "OK", "copy": "&&Kopieren" } \ No newline at end of file diff --git a/i18n/deu/src/vs/code/node/cliProcessMain.i18n.json b/i18n/deu/src/vs/code/node/cliProcessMain.i18n.json index 75e98b75983..27bf37c7820 100644 --- a/i18n/deu/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/deu/src/vs/code/node/cliProcessMain.i18n.json @@ -8,6 +8,7 @@ "notInstalled": "Die Erweiterung \"{0}\" ist nicht installiert.", "useId": "Stellen Sie sicher, dass Sie die vollständige Erweiterungs-ID (einschließlich des Herausgebers) verwenden. Beispiel: {0}", "successVsixInstall": "Die Erweiterung \"{0}\" wurde erfolgreich installiert.", + "cancelVsixInstall": "Installation der Erweiterung \"{0}\" abgebrochen.", "alreadyInstalled": "Die Erweiterung \"{0}\" ist bereits installiert.", "foundExtension": "\"{0}\" wurde in Marketplace gefunden.", "installing": "Wird installiert...", diff --git a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json index 791032db29a..42d65e250ff 100644 --- a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -17,7 +17,9 @@ "lineNumbers": "Steuert die Anzeige von Zeilennummern. Mögliche Werte sind \"Ein\", \"Aus\" und \"Relativ\".", "rulers": "Vertikale Linien nach einer bestimmten Anzahl von Monospace Zeichen zeichnen. Verwenden Sie mehrere Werte für mehrere Linien. Keine Linie wird gezeichnet, wenn das Array leer ist.", "wordSeparators": "Zeichen, die als Worttrennzeichen verwendet werden, wenn wortbezogene Navigationen oder Vorgänge ausgeführt werden.", + "tabSize": "Die Anzahl der Leerzeichen, denen ein Tabstopp entspricht. Diese Einstellung wird basierend auf dem Inhalt der Datei überschrieben, wenn \"editor.detectIndentation\" aktiviert ist.", "tabSize.errorMessage": "\"number\" wurde erwartet. Beachten Sie, dass der Wert \"auto\" durch die Einstellung \"editor.detectIndentation\" ersetzt wurde.", + "insertSpaces": "Fügt beim Drücken der TAB-TASTE Leerzeichen ein. Diese Einstellung wird basierend auf dem Inhalt der Datei überschrieben, wenn \"editor.detectIndentation\" aktiviert ist.", "insertSpaces.errorMessage": "\"boolean\" wurde erwartet. Beachten Sie, dass der Wert \"auto\" durch die Einstellung \"editor.detectIndentation\" ersetzt wurde.", "detectIndentation": "Beim Öffnen einer Datei werden \"editor.tabSize\" und \"editor.insertSpaces\" basierend auf den Dateiinhalten erkannt.", "roundedSelection": "Steuert, ob die Auswahl runde Ecken aufweist.", @@ -29,6 +31,7 @@ "minimap.maxColumn": "Breite der Minikarte beschränken, um höchstens eine bestimmte Anzahl von Spalten zu rendern", "find.seedSearchStringFromSelection": "Steuert, ob wir für die Suchzeichenfolge im Suchwidget aus der Editorauswahl ein Seeding ausführen.", "find.autoFindInSelection": "Steuert, ob die Kennzeichnung \"In Auswahl suchen\" aktiviert ist, wenn mehrere Zeichen oder Textzeilen im Editor ausgewählt wurden.", + "find.globalFindClipboard": "Steuert, ob das Widget Suchen lesen oder die gemeinsame Such-Zwischenablage im MacOS ändern soll.", "wordWrap.off": "Zeilenumbrüche erfolgen nie.", "wordWrap.on": "Der Zeilenumbruch erfolgt an der Breite des Anzeigebereichs.", "wordWrap.wordWrapColumn": "Der Zeilenbereich erfolgt bei \"editor.wordWrapColumn\".", diff --git a/i18n/deu/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/deu/src/vs/editor/contrib/folding/folding.i18n.json index 113379281fd..4e3ffb44a69 100644 --- a/i18n/deu/src/vs/editor/contrib/folding/folding.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/folding/folding.i18n.json @@ -9,6 +9,8 @@ "foldAction.label": "Falten", "foldRecursivelyAction.label": "Rekursiv falten", "foldAllBlockComments.label": "Alle Blockkommentare falten", + "foldAllMarkerRegions.label": "Alle Regionen falten", + "unfoldAllMarkerRegions.label": "Alle Regionen auffalten", "foldAllAction.label": "Alle falten", "unfoldAllAction.label": "Alle auffalten", "foldLevelAction.label": "Faltebene {0}" diff --git a/i18n/deu/src/vs/platform/environment/node/argv.i18n.json b/i18n/deu/src/vs/platform/environment/node/argv.i18n.json index 25a0dca34be..e990ea9bf1e 100644 --- a/i18n/deu/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/deu/src/vs/platform/environment/node/argv.i18n.json @@ -12,8 +12,11 @@ "newWindow": "Erzwingt eine neue Instanz des Codes.", "performance": "Startet mit aktiviertem Befehl \"Developer: Startup Performance\".", "prof-startup": "CPU-Profiler beim Start ausführen", + "inspect-extensions": "Erlaubt Debugging und Profiling für Erweiterungen. Überprüfen Sie die Entwicklertools für die Verbindungs-URI.", + "inspect-brk-extensions": "Erlaubt Debugging und Profiling für Erweiterungen, wobei der Erweiterungs-Host nach dem Starten pausiert wird. Überprüfen Sie die Entwicklertools für die Verbindungs-URI.", "reuseWindow": "Erzwingt das Öffnen einer Datei oder eines Ordners im letzten aktiven Fenster.", "userDataDir": "Gibt das Verzeichnis an, in dem Benutzerdaten gespeichert werden. Nützlich, wenn die Ausführung als \"root\" erfolgt.", + "log": "Log-Level zu verwenden. Standardwert ist \"Info\". Zulässige Werte sind \"kritisch\", \"Fehler\", \"warnen\", \"Info\", \"debug\", \"verfolgen\", \"aus\".", "verbose": "Ausführliche Ausgabe (impliziert \"-wait\").", "wait": "Warten Sie, bis die Dateien geschlossen sind, bevor Sie zurück gehen können.", "extensionHomePath": "Legen Sie den Stammpfad für Extensions fest.", @@ -24,6 +27,7 @@ "experimentalApis": "Aktiviert vorgeschlagene API-Features für eine Erweiterung.", "disableExtensions": "Deaktiviert alle installierten Extensions.", "disableGPU": "Deaktiviert die GPU-Hardwarebeschleunigung.", + "status": "Prozessnutzungs- und Diagnose-Informationen ausgeben.", "version": "Gibt die Version aus.", "help": "Gibt die Syntax aus.", "usage": "Verwendung", diff --git a/i18n/deu/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/deu/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index 185a438a129..256756a3fdd 100644 --- a/i18n/deu/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/deu/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,8 +6,12 @@ { "invalidManifest": "Die Erweiterung ist ungültig: \"package.json\" ist keine JSON-Datei.", "restartCodeLocal": "Bitte starten Sie Code vor der Neuinstallation von {0} neu.", + "installingOutdatedExtension": "Eine neuere Version dieser Erweiterung ist bereits installiert. Möchten Sie diese mit der älteren Version überschreiben?", "override": "Überschreiben", "cancel": "Abbrechen", + "notFoundCompatible": "Kann nicht installiert werden, da die Erweiterung '{0}', die mit der aktuellen Version '{1}' von VS Code kompatibel ist, nicht gefunden werden kann.", + "quitCode": "Kann nicht installiert werden, da noch eine veraltete Instanz der Erweiterung ausgeführt wird. Bitte beenden und VS Code neu starten vor der Neuinstallation.", + "exitCode": "Kann nicht installiert werden, da noch eine veraltete Instanz der Erweiterung ausgeführt wird. Bitte beenden und VS Code neu starten vor der Neuinstallation.", "notFoundCompatibleDependency": "Kann nicht installiert werden, da die abhängige Erweiterung '{0}', die mit der aktuellen VS Code Version '{1}' kompatibel ist, nicht gefunden werden kann. ", "uninstallDependeciesConfirmation": "Möchten Sie nur \"{0}\" oder auch die zugehörigen Abhängigkeiten deinstallieren?", "uninstallOnly": "Nur", diff --git a/i18n/deu/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/deu/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index e0774394ce8..0e38f23ff50 100644 --- a/i18n/deu/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/deu/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -17,6 +17,8 @@ "vscode.extension.activationEvents.onLanguage": "Ein Aktivierungsereignis wird beim Öffnen einer Datei ausgegeben, die in die angegebene Sprache aufgelöst wird.", "vscode.extension.activationEvents.onCommand": "Ein Aktivierungsereignis wird beim Aufrufen des angegebenen Befehls ausgegeben.", "vscode.extension.activationEvents.onDebug": "Ein Aktivierungsereignis wird ausgesandt, wenn ein Benutzer eine Debugging startet, oder eine Debug-Konfiguration erstellt.", + "vscode.extension.activationEvents.onDebugInitialConfigurations": "Ein Aktivierungsereignis ausgegeben, wenn ein \"launch.json\" erstellt werden muss (und alle provideDebugConfigurations Methoden aufgerufen werden müssen).", + "vscode.extension.activationEvents.onDebugResolve": "Ein Aktivierungsereignis ausgegeben, wenn eine Debug-Sitzung mit dem spezifischen Typ gestartet wird (und eine entsprechende resolveDebugConfiguration-Methode aufgerufen werden muss).", "vscode.extension.activationEvents.workspaceContains": "Ein Aktivierungsereignis wird beim Öffnen eines Ordners ausgegeben, der mindestens eine Datei enthält, die mit dem angegebenen Globmuster übereinstimmt.", "vscode.extension.activationEvents.onView": "Ein Aktivierungsereignis wird beim Erweitern der angegebenen Ansicht ausgegeben.", "vscode.extension.activationEvents.star": "Ein Aktivierungsereignis wird beim Start von VS Code ausgegeben. Damit für die Endbenutzer eine bestmögliche Benutzerfreundlichkeit sichergestellt ist, verwenden Sie dieses Aktivierungsereignis in Ihrer Erweiterung nur dann, wenn in Ihrem Anwendungsfall keine andere Kombination an Aktivierungsereignissen funktioniert.", diff --git a/i18n/deu/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/deu/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json index c0039e0b445..b1c16b877d2 100644 --- a/i18n/deu/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "toggleTabs": "Registerkartensichtbarkeit umschalten", "view": "Anzeigen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json index ced21f95b89..22d3bb268e9 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "largeNumberBadge": "10k+", "badgeTitle": "{0} - {1}", "additionalViews": "Zusätzliche Ansichten", "numberBadge": "{0} ({1})", diff --git a/i18n/deu/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index 963d490097f..2b4ef55801b 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,6 +6,7 @@ { "editorCommand.activeEditorMove.description": "Aktiven Editor nach Tabstopps oder Gruppen verschieben", "editorCommand.activeEditorMove.arg.name": "Argument zum Verschieben des aktiven Editors", + "editorCommand.activeEditorMove.arg.description": "Argumenteigenschaften:\n\t* \"to\": Ein Zeichenfolgenwert, der das Ziel des Verschiebungsvorgangs angibt.\n\t* \"by\": Ein Zeichenfolgenwert, der die Einheit für die Verschiebung angibt (nach Registerkarte oder nach Gruppe).\n\t* \"value\": Ein Zahlenwert, der angibt, um wie viele Positionen verschoben wird. Es kann auch die absolute Position für die Verschiebung angegeben werden.\n", "commandDeprecated": "Der Befehl **{0}** wurde entfernt. Sie können stattdessen **{1}** verwenden.", "openKeybindings": "Tastenkombinationen konfigurieren" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 56317ca59e3..afbb07198da 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -52,5 +52,6 @@ "screenReaderDetectedExplanation.question": "Verwenden Sie eine Sprachausgabe zum Bedienen von VS Code?", "screenReaderDetectedExplanation.answerYes": "Ja", "screenReaderDetectedExplanation.answerNo": "Nein", - "screenReaderDetectedExplanation.body1": "VS Code ist jetzt für die Verwendung mit einer Sprachausgabe optimiert. " + "screenReaderDetectedExplanation.body1": "VS Code ist jetzt für die Verwendung mit einer Sprachausgabe optimiert. ", + "screenReaderDetectedExplanation.body2": "Einige Editorfunktionen weisen ein anderes Verhalten auf, z. B. in Bezug auf den Zeilenumbruch, die Faltung usw." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json index 9c274f7fb04..7331216a594 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json @@ -53,8 +53,20 @@ "doc": "Unter {0} finden Sie eine Liste der unterstützten Sprachen.", "restart": "Das Ändern dieses Wertes erfordert einen Neustart von VSCode.", "fail.createSettings": "{0} ({1}) kann nicht erstellt werden.", + "openLogsFolder": "Protokollordner öffnen", + "showLogs": "Protokolle anzeigen...", + "mainProcess": "Main", + "sharedProcess": "Geteilt", + "rendererProcess": "Renderer", + "extensionHost": "Erweiterungshost", + "selectProcess": "Prozess auswählen", + "setLogLevel": "Protokollstufe festlegen", + "trace": "Spur", "debug": "Debuggen", "info": "Info", "warn": "Warnung", - "err": "Fehler" + "err": "Fehler", + "critical": "Kritisch", + "off": "Aus", + "selectLogLevel": "Protokollstufe auswählen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json index f90e322ae5f..2a2af0f320b 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -16,6 +16,7 @@ "workbench.editor.labelFormat.long": "Zeigt den Namen der Datei an, gefolgt von ihrem absoluten Pfad.", "tabDescription": "Steuert das Format der Beschriftung für einen Editor. Wenn Sie diese Einstellung ändern, ist beispielsweise der Speicherort einer Datei besser ersichtlich:\n- kurz: \"parent\"\n- mittel: \"workspace/src/parent\"\n- lang: \"/home/user/workspace/src/parent\"\n- Standard: \".../parent\", wenn eine andere Registerkarte denselben Titel hat, oder den relativen Arbeitsbereichspfad, wenn Registerkarten deaktiviert sind.", "editorTabCloseButton": "Steuert die Position der Schließen-Schaltflächen der Editor-Registerkarten oder deaktiviert sie bei der Einstellung \"off\".", + "tabSizing": "Steuert die Größe von Editor-Registerkarten. Bei \"Anpassen\" sind die Registerkarten immer groß genug, damit die gesamte Editor-Bezeichnung angezeigt wird. Mit \"Verkleinern\" werden die Registerkarten kleiner, wenn der verfügbare Platz nicht ausreicht, um alle Registerkarten gleichzeitig anzuzeigen.", "showIcons": "Steuert, ob geöffnete Editoren mit einem Symbol angezeigt werden sollen. Hierzu muss auch ein Symboldesign aktiviert werden.", "enablePreview": "Steuert, ob geöffnete Editoren als Vorschau angezeigt werden. Vorschau-Editoren werden wiederverwendet, bis sie gespeichert werden (z. B. über Doppelklicken oder Bearbeiten), und sie werden mit kursivem Schriftschnitt angezeigt.", "enablePreviewFromQuickOpen": "Steuert, ob geöffnete Editoren aus Quick Open als Vorschau angezeigt werden. Vorschau-Editoren werden wiederverwendet, bis sie gespeichert werden (z. B. über Doppelklicken oder Bearbeiten).", @@ -29,6 +30,7 @@ "statusBarVisibility": "Steuert die Sichtbarkeit der Statusleiste im unteren Bereich der Workbench.", "activityBarVisibility": "Steuert die Sichtbarkeit der Aktivitätsleiste in der Workbench.", "closeOnFileDelete": "Steuert, ob Editoren, die eine Datei anzeigen, automatisch geschlossen werden sollen, wenn die Datei von einem anderen Prozess umbenannt oder gelöscht wird. Wenn Sie diese Option deaktivieren, bleibt der Editor bei einem solchen Ereignis als geändert offen. Bei Löschvorgängen innerhalb der Anwendung wird der Editor immer geschlossen, und geänderte Dateien werden nie geschlossen, damit Ihre Daten nicht verloren gehen.", + "enableNaturalLanguageSettingsSearch": "Steuert, ob der Suchmodus mit natürlicher Sprache für die Einstellungen aktiviert werden soll.", "fontAliasing": "Steuert die Schriftartaliasingmethode in der Workbench.\n- default: Subpixel-Schriftartglättung. Auf den meisten Nicht-Retina-Displays wird Text bei dieser Einstellung am schärfsten dargestellt.\n- antialiased: Glättet die Schriftart auf der Pixelebene (im Gegensatz zur Subpixelebene). Bei dieser Einstellung kann die Schriftart insgesamt heller wirken.\n- none: Deaktiviert die Schriftartglättung. Text wird mit gezackten scharfen Kanten dargestellt.\n", "workbench.fontAliasing.default": "Subpixel-Schriftartglättung. Auf den meisten Nicht-Retina-Displays wird Text bei dieser Einstellung am schärfsten dargestellt.", "workbench.fontAliasing.antialiased": "Glättet die Schriftart auf der Pixelebene (im Gegensatz zur Subpixelebene). Bei dieser Einstellung kann die Schriftart insgesamt heller wirken.", diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index e95c2dc9747..3906b91b973 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,5 +20,10 @@ "openExplorerOnEnd": "Hiermit wird am Ende einer Debugsitzung automatisch eine Explorer-Ansicht geöffnet.", "inlineValues": "Variablenwerte beim Debuggen in Editor eingebunden anzeigen", "hideActionBar": "Steuert, ob die unverankerte Debugaktionsleiste ausgeblendet werden soll", + "never": "Debuggen nie in Statusleiste anzeigen", + "always": "Debuggen immer in Statusleiste anzeigen", + "onFirstSessionStart": "Debuggen nur in Statusleiste anzeigen, nachdem das Debuggen erstmals gestartet wurde", + "showInStatusBar": "Steuert, wann die Debug-Statusleiste angezeigt werden soll", + "openDebug": "Steuert, ob das Debug-Viewlet beim Start der Debugsitzung offen ist.", "launch": "Startkonfiguration für globales Debuggen. Sollte als Alternative zu \"launch.json\" verwendet werden, das übergreifend von mehreren Arbeitsbereichen genutzt wird" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 374a6cc5550..bbb736c2010 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,6 +11,8 @@ "breakpointAdded": "Der Haltepunkt wurde hinzugefügt. Zeile {0}, Datei \"{1}\".", "breakpointRemoved": "Der Haltepunkt wurde entfernt. Zeile {0}, Datei \"{1}\".", "compoundMustHaveConfigurations": "Für den Verbund muss das Attribut \"configurations\" festgelegt werden, damit mehrere Konfigurationen gestartet werden können.", + "configMissing": "Konfiguration \"{0}\" fehlt in \"launch.json\".", + "launchJsonDoesNotExist": "\"launch.json\" ist nicht vorhanden.", "debugRequestNotSupported": "Das Attribut \"{0}\" hat in der ausgewählten Debugkonfiguration den nicht unterstützten Wert \"{1}\".", "debugRequesMissing": "Das Attribut \"{0}\" fehlt in der ausgewählten Debugkonfiguration.", "debugTypeNotSupported": "Der konfigurierte Debugtyp \"{0}\" wird nicht unterstützt.", diff --git a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 2d51a131a66..358babc2103 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,9 +6,11 @@ { "name": "Erweiterungsname", "extension id": "Erweiterungsbezeichner", + "preview": "Vorschau", "publisher": "Name des Herausgebers", "install count": "Installationsanzahl", "rating": "Bewertung", + "repository": "Repository", "license": "Lizenz", "details": "Details", "contributions": "Beiträge", diff --git a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json index 8b6ad71cd4e..d63121a5b96 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ratedByUsers": "Von {0} Benutzern bewertet", + "ratedBySingleUser": "Von 1 Benutzer bewertet" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 8b6ad71cd4e..25343125096 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectAndStartDebug": "Klicken Sie, um die Profilerstellung zu beenden." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 576288a75d3..6259913b4c2 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -7,9 +7,11 @@ "extensionsCommands": "Erweiterungen verwalten", "galleryExtensionsCommands": "Katalogerweiterungen installieren", "extension": "Erweiterung", + "runtimeExtension": "Laufende Erweiterungen", "extensions": "Erweiterungen", "view": "Anzeigen", "developer": "Entwickler", "extensionsConfigurationTitle": "Erweiterungen", - "extensionsAutoUpdate": "Erweiterungen automatisch aktualisieren" + "extensionsAutoUpdate": "Erweiterungen automatisch aktualisieren", + "extensionsIgnoreRecommendations": "Bei TRUE werden Benachrichtigungen für Erweiterungsempfehlungen nicht mehr angezeigt." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json index af3cf450594..3da4122d140 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -4,5 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "reportExtensionIssue": "Problem melden" + "starActivation": "Beim Start aktiviert", + "workspaceContainsGlobActivation": "Aktiviert, da eine mit {0} übereinstimmende Datei in Ihrem Arbeitsbereich vorhanden ist", + "workspaceContainsFileActivation": "Aktiviert, da die Datei {0} in Ihrem Arbeitsbereich vorhanden ist", + "languageActivation": "Aktiviert, da Sie eine {0}-Datei geöffnet haben", + "workspaceGenericActivation": "Aktiviert am {0}", + "errors": "{0} nicht abgefangene Fehler", + "extensionsInputName": "Ausgeführte Erweiterungen", + "showRuntimeExtensions": "Ausgeführte Erweiterungen anzeigen", + "reportExtensionIssue": "Problem melden", + "extensionHostProfileStart": "Erweiterungshostprofil starten", + "extensionHostProfileStop": "Erweiterungshostprofil beenden", + "saveExtensionHostProfile": "Erweiterungshostprofil speichern" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json index 146bfaf2e06..4d300a15634 100644 --- a/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -69,5 +69,7 @@ "invalidFileNameError": "Der Name **{0}** ist als Datei- oder Ordnername ungültig. Bitte wählen Sie einen anderen Namen aus.", "filePathTooLongError": "Der Name **{0}** führt zu einem Pfad, der zu lang ist. Wählen Sie einen kürzeren Namen.", "compareWithSaved": "Aktive Datei mit gespeicherter Datei vergleichen", - "modifiedLabel": "{0} (auf Datenträger) ↔ {1}" + "modifiedLabel": "{0} (auf Datenträger) ↔ {1}", + "compareWithClipboard": "Aktive Datei mit Zwischenablage vergleichen", + "clipboardComparisonLabel": "Zwischenablage ↔ {0}" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json index 47a84100588..e3de54fe532 100644 --- a/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -7,6 +7,7 @@ "noWorkspace": "Es ist kein Ordner geöffnet.", "explorerSection": "Datei-Explorer-Abschnitt", "noWorkspaceHelp": "Sie haben noch keinen Ordner zum Arbeitsbereich hinzugefügt.", + "addFolder": "Ordner hinzufügen", "noFolderHelp": "Sie haben noch keinen Ordner geöffnet.", "openFolder": "Ordner öffnen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json index 9ec12051af9..d10b1d29c06 100644 --- a/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -10,6 +10,7 @@ "dropFolder": "Möchten Sie den Ordner zum Arbeitsbereich hinzufügen?", "addFolders": "&&Ordner hinzufügen", "addFolder": "&&Ordner hinzufügen", + "confirmMove": "Möchten Sie \"{0}\" wirklich verschieben?", "doNotAskAgain": "Nicht erneut fragen", "moveButtonLabel": "&&Verschieben", "confirmOverwriteMessage": "{0} ist im Zielordner bereits vorhanden. Möchten Sie das Element ersetzen?", diff --git a/i18n/deu/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/deu/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json index 8b6ad71cd4e..7b31df50f74 100644 --- a/i18n/deu/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "totalProblems": "Insgesamt {0} Probleme", + "filteredProblems": "Zeigt {0} von {1} Problemen an" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/deu/src/vs/workbench/parts/markers/common/messages.i18n.json index 162edd8cdb4..f9df98f6f17 100644 --- a/i18n/deu/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,6 +6,7 @@ { "viewCategory": "Anzeigen", "problems.view.toggle.label": "Probleme umschalten", + "problems.view.focus.label": "Probleme fokussieren", "problems.panel.configuration.title": "Ansicht \"Probleme\"", "problems.panel.configuration.autoreveal": "Steuert, ob die Ansicht \"Probleme\" automatisch Dateien anzeigen sollte, wenn diese geöffnet werden.", "markers.panel.title.problems": "Probleme", diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 80ed5ad6589..ea9ccbd99b2 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "defineKeybinding.initial": "Drücken Sie die gewünschte Tastenkombination, und betätigen Sie anschließend die EINGABETASTE.", "defineKeybinding.chordsTo": "Tastenkombination zu" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 503c8aa631f..fccfd818d55 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "openRawDefaultSettings": "Raw-Standardeinstellungen öffnen", "openGlobalSettings": "Benutzereinstellungen öffnen", "openGlobalKeybindings": "Tastaturkurzbefehle öffnen", "openGlobalKeybindingsFile": "Datei mit Tastaturkurzbefehlen öffnen", diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index bd64052e34b..26e5d28d658 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "defaultSettingsFuzzyPrompt": "Testen Sie das Suchen mit natürlicher Sprache!", "defaultSettings": "Platzieren Sie Ihre Einstellungen zum Überschreiben im Editor auf der rechten Seite.", "noSettingsFound": "Keine Einstellungen gefunden.", "settingsSwitcherBarAriaLabel": "Einstellungsumschaltung", "userSettings": "Benutzereinstellungen", - "workspaceSettings": "Arbeitsbereichseinstellungen" + "workspaceSettings": "Arbeitsbereichseinstellungen", + "folderSettings": "Ordnereinstellungen", + "enableFuzzySearch": "Suchen mit natürlicher Sprache aktivieren" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/deu/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index 103e50639f4..a3591ad9724 100644 --- a/i18n/deu/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultLabel": "Eingabe" + "defaultLabel": "Eingabe", + "useExcludesAndIgnoreFilesDescription": "Ausschlusseinstellungen und Ignorieren von Dateien verwenden" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 00be7fe56b6..46c50def351 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -8,6 +8,7 @@ "ConfigureTaskRunnerAction.label": "Aufgabe konfigurieren", "CloseMessageAction.label": "Schließen", "problems": "Probleme", + "building": "Wird gebaut...", "manyMarkers": "mehr als 99", "runningTasks": "Aktive Aufgaben anzeigen", "tasks": "Aufgaben", @@ -50,6 +51,7 @@ "TaslService.noEntryToRun": "Es wurde keine auszuführende Aufgabe gefunden. Aufgaben konfigurieren...", "TaskService.fetchingBuildTasks": "Buildaufgaben werden abgerufen...", "TaskService.pickBuildTask": "Auszuführende Buildaufgabe auswählen", + "TaskService.noBuildTask": "Keine auszuführende Buildaufgabe gefunden. Buildaufgabe konfigurieren...", "TaskService.fetchingTestTasks": "Testaufgaben werden abgerufen...", "TaskService.pickTestTask": "Auszuführende Testaufgabe auswählen", "TaskService.noTestTaskTerminal": "Es wurde keine auszuführende Testaufgabe gefunden. Aufgaben konfigurieren...", diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 197256b0631..094d55db2fa 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -7,6 +7,7 @@ "TerminalTaskSystem.unknownError": "Unbekannter Fehler beim Ausführen eines Tasks. Details finden Sie im Taskausgabeprotokoll.", "dependencyFailed": "Die abhängige Aufgabe \"{0}\" im Arbeitsbereichsordner \"{1}\" konnte nicht aufgelöst werden.", "TerminalTaskSystem.terminalName": "Aufgabe - {0}", + "closeTerminal": "Betätigen Sie eine beliebige Taste, um das Terminal zu schließen.", "reuseTerminal": "Das Terminal wird von Aufgaben wiederverwendet, drücken Sie zum Schließen eine beliebige Taste.", "TerminalTaskSystem": "Ein Shell-Befehl kann nicht auf einem UNC-Laufwerk ausgeführt werden.", "unkownProblemMatcher": "Der Problemabgleicher {0} kann nicht aufgelöst werden. Der Abgleicher wird ignoriert." diff --git a/i18n/deu/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index 5b756d8c221..0899849a39b 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,6 +14,8 @@ "ConfigurationParser.noTypeDefinition": "Fehler: Der registrierte Aufgabentyp \"{0}\" ist nicht vorhanden. Wurde möglicherweise eine Erweiterung nicht installiert, die den entsprechenden Aufgabenanbieter bereitstellt?", "ConfigurationParser.missingRequiredProperty": "Fehler: Die Aufgabenkonfiguration \"{0}\" enthält die erforderlich Eigenschaft \"{1}\" nicht. Die Aufgabenkonfiguration wird ignoriert.", "ConfigurationParser.notCustom": "Fehler: Die Aufgabe ist nicht als benutzerdefinierte Aufgabe deklariert. Die Konfiguration wird ignoriert.\n{0}\n", + "ConfigurationParser.noTaskName": "Fehler: Eine Aufgabe muss eine label-Eigenschaft angeben. Die Aufgabe wird ignoriert.\n{0}\n", + "taskConfiguration.shellArgs": "Warnung: Die Aufgabe \"{0}\" ist ein Shellbefehl, und eines seiner Argumente enthält Leerzeichen ohne Escapezeichen. Führen Sie Argumente im Befehl zusammen, um eine korrekte Angabe der Befehlszeile sicherzustellen.", "taskConfiguration.noCommandOrDependsOn": "Fehler: Aufgabe \"{0}\" definiert keinen Befehl bzw. keine depondsOn-Eigenschaft. Die Aufgabe wird ignoriert. Die Definition lautet:\n{1}", "taskConfiguration.noCommand": "Fehler: Aufgabe \"{0}\" definiert keinen Befehl. Die Aufgabe wird ignoriert. Die Definition lautet:\n{1}", "TaskParse.noOsSpecificGlobalTasks": "Die Aufgabenversion 2.0.0 unterstützt globale betriebssystemspezifische Aufgaben nicht. Konvertieren Sie sie in eine Aufgabe mit einem betriebssystemspezifischen Befehl. Folgende Aufgaben sind hiervon betroffen:\n{0}" diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index aa687c62c7d..bc6dee18ad0 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.rightClickCopyPaste": "Wenn dies festgelegt ist, erscheint das Kontextmenü bei einem Rechtsklick im Terminal nicht mehr. Stattdessen erfolgen die Vorgänge Kopieren, wenn eine Auswahl vorgenommen wurde, sowie Einfügen, wenn keine Auswahl vorgenommen wurde.", "terminal.integrated.fontFamily": "Steuert die Schriftartfamilie des Terminals. Der Standardwert ist \"editor.fontFamily\".", "terminal.integrated.fontSize": "Steuert den Schriftgrad des Terminals in Pixeln.", + "terminal.integrated.lineHeight": "Steuert die Zeilenhöhe für das Terminal. Dieser Wert wird mit dem Schriftgrad des Terminals multipliziert, um die tatsächliche Zeilenhöhe in Pixeln zu erhalten.", "terminal.integrated.enableBold": "Gibt an, ob Fettdruck im Terminal aktiviert wird. Dies muss durch die Terminalshell unterstützt werden.", "terminal.integrated.cursorBlinking": "Steuert, ob der Terminalcursor blinkt.", "terminal.integrated.cursorStyle": "Steuert den Stil des Terminalcursors.", diff --git a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index ec4d01388da..b5dcbbd3ffc 100644 --- a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,6 +5,9 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "Farbdesign", + "themes.category.light": "Light Themen", + "themes.category.dark": "Dunkle Themen", + "themes.category.hc": "Hohe Kontrast Themen", "installColorThemes": "Zusätzliche Farbschemas installieren...", "themes.selectTheme": "Farbdesign auswählen (eine Vorschau wird mit den Tasten NACH OBEN/NACH UNTEN angezeigt)", "selectIconTheme.label": "Dateisymboldesign", diff --git a/i18n/deu/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/deu/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index 8b6ad71cd4e..727ecbfc255 100644 --- a/i18n/deu/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "bubbleTitle": "Enthält hervorgehobene Elemente" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/deu/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json index 8b6ad71cd4e..b92206c2f58 100644 --- a/i18n/deu/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json +++ b/i18n/deu/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "message": "$(zap) Profilieren des Erweiterungshost..." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/deu/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index 9dfb4d17cca..37b2e129894 100644 --- a/i18n/deu/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -9,5 +9,6 @@ "extensionHostProcess.crash": "Der Erweiterungshost wurde unerwartet beendet.", "extensionHostProcess.unresponsiveCrash": "Der Erweiterungshost wurde beendet, weil er nicht reagiert hat.", "overwritingExtension": "Die Erweiterung \"{0}\" wird mit \"{1}\" überschrieben.", - "extensionUnderDevelopment": "Die Entwicklungserweiterung unter \"{0}\" wird geladen." + "extensionUnderDevelopment": "Die Entwicklungserweiterung unter \"{0}\" wird geladen.", + "extensionCache.invalid": "Erweiterungen wurden auf der Festplatte geändert. Bitte laden Sie das Fenster erneut." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 9e3cbe8e7cb..32304e03cea 100644 --- a/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -21,5 +21,6 @@ "keybindings.json.command": "Der Name des auszuführenden Befehls.", "keybindings.json.when": "Die Bedingung, wann der Schlüssel aktiv ist.", "keybindings.json.args": "Argumente, die an den auszuführenden Befehl übergeben werden sollen.", - "keyboardConfigurationTitle": "Tastatur" + "keyboardConfigurationTitle": "Tastatur", + "dispatch": "Steuert die Abgangslogik, sodass bei einem Tastendruck entweder \"code\" (empfohlen) oder \"keyCode\" verwendet wird." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/deu/src/vs/workbench/services/textfile/common/textFileService.i18n.json index 8b6ad71cd4e..aa9c6a50280 100644 --- a/i18n/deu/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "files.backup.failSave": "Dateien, die geändert wurden, konnten nicht in den Sicherungsspeicherort geschrieben werden (Fehler: {0}). Speichern Sie zuerst Ihre Dateien, und beenden Sie dann den Vorgang." +} \ No newline at end of file diff --git a/i18n/esn/extensions/emmet/package.i18n.json b/i18n/esn/extensions/emmet/package.i18n.json index 5f790214764..eb90ccea6de 100644 --- a/i18n/esn/extensions/emmet/package.i18n.json +++ b/i18n/esn/extensions/emmet/package.i18n.json @@ -49,5 +49,8 @@ "emmetPreferencesBemModifierSeparator": "Separador de modificador utilizado para las clases cuando se utiliza el filtro BEM", "emmetPreferencesFilterCommentBefore": "Una definición de comentario que debe ser colocado antes de elemento emparejado cuando se aplica el filtro de comentarios.", "emmetPreferencesFilterCommentAfter": "Una definición de comentario que debe colocarse después de elemento emparejado cuando se aplica el filtro de comentarios.", - "emmetPreferencesFilterCommentTrigger": "Una lista separada por comas de nombres de atributos que debe existir en la abreviatura para el filtro de comentarios ser aplicado" + "emmetPreferencesFilterCommentTrigger": "Una lista separada por comas de nombres de atributos que debe existir en la abreviatura para el filtro de comentarios ser aplicado", + "emmetPreferencesFormatNoIndentTags": "Una matriz de nombres de etiqueta que no debería recibir una sangría interna", + "emmetPreferencesFormatForceIndentTags": "Una matriz de nombres de etiqueta que siempre debería recibir una sangría interna", + "emmetPreferencesAllowCompactBoolean": "Si es 'true', se produce una anotación compacta de atributos booleanos" } \ No newline at end of file diff --git a/i18n/esn/src/vs/code/node/cliProcessMain.i18n.json b/i18n/esn/src/vs/code/node/cliProcessMain.i18n.json index d6be2f08ce4..9ce3d98ae5d 100644 --- a/i18n/esn/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/esn/src/vs/code/node/cliProcessMain.i18n.json @@ -8,6 +8,7 @@ "notInstalled": "La extensión '{0}' no está instalada.", "useId": "Asegúrese de usar el identificador de extensión completo, incluido el publicador, por ejemplo: {0}.", "successVsixInstall": "La extensión '{0}' se ha instalado correctamente.", + "cancelVsixInstall": "Cancelar instalación de extensión '{0}'.", "alreadyInstalled": "La extensión '{0}' ya está instalada.", "foundExtension": "Se encontró '{0}' en Marketplace.", "installing": "Instalando...", diff --git a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json index 97f2cfda15a..582dfe7c78f 100644 --- a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -31,6 +31,7 @@ "minimap.maxColumn": "Limitar el ancho del minimapa para presentar como mucho un número de columnas determinado", "find.seedSearchStringFromSelection": "Controla si se inicializa la cadena de búsqueda en Buscar widget en la selección del editor", "find.autoFindInSelection": "Controla si el indicador Buscar en selección se activa cuando se seleccionan varios caracteres o líneas de texto en el editor", + "find.globalFindClipboard": "Controla si el widget de búsqueda debería leer o modificar el portapapeles de busqueda compartido en macOS", "wordWrap.off": "Las líneas no se ajustarán nunca.", "wordWrap.on": "Las líneas se ajustarán en el ancho de la ventanilla.", "wordWrap.wordWrapColumn": "Las líneas se ajustarán en \"editor.wordWrapColumn\".", diff --git a/i18n/esn/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/esn/src/vs/editor/contrib/folding/folding.i18n.json index 69ac193ad0d..0db9b485ab2 100644 --- a/i18n/esn/src/vs/editor/contrib/folding/folding.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/folding/folding.i18n.json @@ -9,6 +9,8 @@ "foldAction.label": "Plegar", "foldRecursivelyAction.label": "Plegar de forma recursiva", "foldAllBlockComments.label": "Cerrar todos los comentarios de bloqueo", + "foldAllMarkerRegions.label": "Plegar todas las regiones", + "unfoldAllMarkerRegions.label": "Desplegar Todas las Regiones", "foldAllAction.label": "Plegar todo", "unfoldAllAction.label": "Desplegar todo", "foldLevelAction.label": "Nivel de plegamiento {0}" diff --git a/i18n/esn/src/vs/platform/environment/node/argv.i18n.json b/i18n/esn/src/vs/platform/environment/node/argv.i18n.json index e7d97465a8c..37027504432 100644 --- a/i18n/esn/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/esn/src/vs/platform/environment/node/argv.i18n.json @@ -16,6 +16,7 @@ "inspect-brk-extensions": "Permitir la depuración y el perfil de las extensiones con el host de la extensión pausado después del inicio. Revisar las herramientas de desarrollador para la conexión uri.", "reuseWindow": "Fuerce la apertura de un archivo o carpeta en la última ventana activa.", "userDataDir": "Especifica el directorio en que se conservan los datos de usuario; es útil cuando se ejecuta como raíz.", + "log": "Nivel de registro a utilizar. Por defecto es 'info'. Los valores permitidos son 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'.", "verbose": "Imprima salidas detalladas (implica --wait).", "wait": "Espere a que los archivos sean cerrados antes de volver.", "extensionHomePath": "Establezca la ruta de acceso raíz para las extensiones.", diff --git a/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json index 69c31d25805..81432663720 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json @@ -67,5 +67,6 @@ "warn": "Advertencia", "err": "Error", "critical": "Crítico", - "off": "Apagado" + "off": "Apagado", + "selectLogLevel": "Seleccione el nivel de registro" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index b7bc040a66a..4a2a19ab863 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,6 +11,8 @@ "breakpointAdded": "Punto de interrupción agregado, línea {0}, archivo {1}", "breakpointRemoved": "Punto de interrupción quitado, línea {0}, archivo {1}", "compoundMustHaveConfigurations": "El compuesto debe tener configurado el atributo \"configurations\" a fin de iniciar varias configuraciones.", + "configMissing": "La configuración \"{0}\" falta en \"launch.json\".", + "launchJsonDoesNotExist": "'launch.json' no existe.", "debugRequestNotSupported": "El atributo '{0}' tiene un valor no admitido '{1}' en la configuración de depuración seleccionada.", "debugRequesMissing": "El atributo '{0}' está ausente en la configuración de depuración elegida. ", "debugTypeNotSupported": "El tipo de depuración '{0}' configurado no es compatible.", diff --git a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json index 9671e111767..4d8d31b0d54 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "ratedByUsers": "Calificado por {0} usuarios" + "ratedByUsers": "Calificado por {0} usuarios", + "ratedBySingleUser": "Calificado por 1 usuario" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json index e86ad1697c1..09f3e4dd167 100644 --- a/i18n/esn/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.i18n.json @@ -6,6 +6,7 @@ { "termEntryAriaLabel": "{0}, selector de terminal", "termCreateEntryAriaLabel": "{0}, crear nueva terminal", + "workbench.action.terminal.newplus": "$(plus) Crear nueva terminal integrada", "noTerminalsMatching": "No hay terminales coincidentes", "noTerminalsFound": "No hay terminales abiertos" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index dad0465be35..ce5331764d6 100644 --- a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -7,6 +7,7 @@ "selectTheme.label": "Tema de color", "themes.category.light": "temas claros", "themes.category.dark": "temas oscuros", + "themes.category.hc": "temas de alto contraste", "installColorThemes": "Instalar temas de color adicionales...", "themes.selectTheme": "Seleccione el tema de color (flecha arriba/abajo para vista previa)", "selectIconTheme.label": "Tema de icono de archivo", diff --git a/i18n/esn/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/esn/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json index 8b6ad71cd4e..41edb4e2c27 100644 --- a/i18n/esn/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json +++ b/i18n/esn/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "message": "Perfiles del Host de Extensiones $(zap)... " +} \ No newline at end of file diff --git a/i18n/fra/extensions/emmet/package.i18n.json b/i18n/fra/extensions/emmet/package.i18n.json index 175d70aeb65..d8ebfe9b25c 100644 --- a/i18n/fra/extensions/emmet/package.i18n.json +++ b/i18n/fra/extensions/emmet/package.i18n.json @@ -49,5 +49,8 @@ "emmetPreferencesBemModifierSeparator": "Séparateur de modificateur utilisé pour les classes lorsque le filtre BEM est utilisé", "emmetPreferencesFilterCommentBefore": "Une définition de commentaire qui doit être placée avant l’élément correspondant quand le filtre de commentaire est appliqué.", "emmetPreferencesFilterCommentAfter": "Une définition de commentaire qui doit être placée après l’élément correspondant quand un filtre de commentaire est appliqué.", - "emmetPreferencesFilterCommentTrigger": "Une liste séparée par des virgules de noms d’attributs qui devraient exister en abrégé pour que le filtre de commentaire soit appliqué" + "emmetPreferencesFilterCommentTrigger": "Une liste séparée par des virgules de noms d’attributs qui devraient exister en abrégé pour que le filtre de commentaire soit appliqué", + "emmetPreferencesFormatNoIndentTags": "Un tableau de noms de balises qui ne devraient pas être indentées", + "emmetPreferencesFormatForceIndentTags": "Un tableau de noms de balises qui devraient toujours être indentées", + "emmetPreferencesAllowCompactBoolean": "Si true, la notation compacte des attributs booléens est produite" } \ No newline at end of file diff --git a/i18n/fra/src/vs/code/node/cliProcessMain.i18n.json b/i18n/fra/src/vs/code/node/cliProcessMain.i18n.json index 0a97aaf8721..839a1ac0317 100644 --- a/i18n/fra/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/fra/src/vs/code/node/cliProcessMain.i18n.json @@ -8,6 +8,7 @@ "notInstalled": "L'extension '{0}' n'est pas installée.", "useId": "Veillez à utiliser l'ID complet de l'extension (serveur de publication inclus). Exemple : {0}", "successVsixInstall": "L'extension '{0}' a été installée correctement !", + "cancelVsixInstall": "Installation annulée de l'Extension '{0}'.", "alreadyInstalled": "L'extension '{0}' est déjà installée.", "foundExtension": "'{0}' trouvé dans le Marketplace.", "installing": "Installation...", diff --git a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json index f74e6c1fbc0..dd19016cb45 100644 --- a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -31,6 +31,7 @@ "minimap.maxColumn": "Limiter la largeur de la minicarte pour afficher au maximum un certain nombre de colonnes", "find.seedSearchStringFromSelection": "Contrôle si nous remplissons la chaîne à rechercher dans le Widget Recherche à partir de la sélection de l'éditeur", "find.autoFindInSelection": "Contrôle si l'indicateur Rechercher dans la sélection est activé quand plusieurs caractères ou lignes de texte sont sélectionnés dans l'éditeur", + "find.globalFindClipboard": "Contrôle si le Widget Recherche doit lire ou modifier le presse-papiers partagé sur macOS", "wordWrap.off": "Le retour automatique à la ligne n'est jamais effectué.", "wordWrap.on": "Le retour automatique à la ligne s'effectue en fonction de la largeur de la fenêtre d'affichage.", "wordWrap.wordWrapColumn": "Le retour automatique à la ligne s'effectue en fonction de 'editor.wordWrapColumn'.", diff --git a/i18n/fra/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/fra/src/vs/editor/contrib/folding/folding.i18n.json index a019089db96..475f08c4a6f 100644 --- a/i18n/fra/src/vs/editor/contrib/folding/folding.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/folding/folding.i18n.json @@ -9,6 +9,8 @@ "foldAction.label": "Plier", "foldRecursivelyAction.label": "Plier de manière récursive", "foldAllBlockComments.label": "Replier tous les commentaires de bloc", + "foldAllMarkerRegions.label": "Replier toutes les régions", + "unfoldAllMarkerRegions.label": "Déplier toutes les régions", "foldAllAction.label": "Plier tout", "unfoldAllAction.label": "Déplier tout", "foldLevelAction.label": "Niveau de pliage {0}" diff --git a/i18n/fra/src/vs/platform/environment/node/argv.i18n.json b/i18n/fra/src/vs/platform/environment/node/argv.i18n.json index f1c7f8375eb..f676e6c787f 100644 --- a/i18n/fra/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/fra/src/vs/platform/environment/node/argv.i18n.json @@ -16,6 +16,7 @@ "inspect-brk-extensions": "Autorise le débogage et le profilage des extensions avec l'hôte d'extensions en pause après le démarrage. Vérifier les outils de développement pour l'uri de connexion.", "reuseWindow": "Forcez l'ouverture d'un fichier ou dossier dans la dernière fenêtre active.", "userDataDir": "Spécifie le répertoire où sont conservées les données des utilisateurs. S'avère utile pour une exécution en tant que root.", + "log": "Niveau de journalisation à utiliser. La valeur par défaut est 'info'. Les valeurs autorisées sont 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off.", "verbose": "Affichez la sortie détaillée (implique --wait).", "wait": "Attendre que les fichiers soient fermés avant de retourner.", "extensionHomePath": "Définissez le chemin racine des extensions.", diff --git a/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json index 0e453c54e87..541429a5408 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json @@ -67,5 +67,6 @@ "warn": "Avertissement", "err": "Erreur", "critical": "Critique", - "off": "Désactivé" + "off": "Désactivé", + "selectLogLevel": "Sélectionner le niveau de journalisation (log)" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 3aa86189407..2833b451b28 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,6 +11,8 @@ "breakpointAdded": "Point d'arrêt ajouté, ligne {0}, fichier {1}", "breakpointRemoved": "Point d'arrêt supprimé, ligne {0}, fichier {1}", "compoundMustHaveConfigurations": "L'attribut \"configurations\" du composé doit être défini pour permettre le démarrage de plusieurs configurations.", + "configMissing": "Il manque la configuration '{0}' dans 'launch.json'.", + "launchJsonDoesNotExist": "'launch.json' n’existe pas.", "debugRequestNotSupported": "L’attribut '{0}' a une valeur '{1}' non prise en charge dans la configuration de débogage sélectionnée.", "debugRequesMissing": "L’attribut '{0}' est introuvable dans la configuration de débogage choisie.", "debugTypeNotSupported": "Le type de débogage '{0}' configuré n'est pas pris en charge.", diff --git a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json index e686f1aac70..6a9b09723ba 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "ratedByUsers": "Évaluée par {0} utilisateurs" + "ratedByUsers": "Évaluée par {0} utilisateurs", + "ratedBySingleUser": "Évaluée par 1 utilisateur" } \ No newline at end of file diff --git a/i18n/hun/extensions/css/client/out/cssMain.i18n.json b/i18n/hun/extensions/css/client/out/cssMain.i18n.json index ded2c0dd476..e5331e1a5ac 100644 --- a/i18n/hun/extensions/css/client/out/cssMain.i18n.json +++ b/i18n/hun/extensions/css/client/out/cssMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "cssserver.name": "CSS nyelvi szerver" + "cssserver.name": "CSS nyelvi szerver", + "folding.start": "Összecsukható tartomány kezdete", + "folding.end": "Összecsukható tartomány vége" } \ No newline at end of file diff --git a/i18n/hun/extensions/emmet/package.i18n.json b/i18n/hun/extensions/emmet/package.i18n.json index 99db67d814e..65869470a93 100644 --- a/i18n/hun/extensions/emmet/package.i18n.json +++ b/i18n/hun/extensions/emmet/package.i18n.json @@ -49,5 +49,8 @@ "emmetPreferencesBemModifierSeparator": "Módosító elválasztó osztályok megadásánál BEM-szűrÅ‘ használata esetén", "emmetPreferencesFilterCommentBefore": "Annak a megjegyzésnek a definíciója, ami az illeszkedÅ‘ elem elé kerül a megjegyzésszűrÅ‘ alkalmazása esetén.", "emmetPreferencesFilterCommentAfter": "Annak a megjegyzésnek a definíciója, ami az illeszkedÅ‘ elem mögé kerül a megjegyzésszűrÅ‘ alkalmazása esetén.", - "emmetPreferencesFilterCommentTrigger": "Attribútumnevek vesszÅ‘vel elválasztott listája, amelyeknek léteznie kell a megjegyzésszűrÅ‘ alkalmazásához." + "emmetPreferencesFilterCommentTrigger": "Attribútumnevek vesszÅ‘vel elválasztott listája, amelyeknek léteznie kell a megjegyzésszűrÅ‘ alkalmazásához.", + "emmetPreferencesFormatNoIndentTags": "Azon elemek neveit tartalmazó tömb, melyek nem kapnak belsÅ‘ indentálást", + "emmetPreferencesFormatForceIndentTags": "Azon elemek neveit tartalmazó tömb, melyek mindig kapnak belsÅ‘ indentálást", + "emmetPreferencesAllowCompactBoolean": "Ha az értéke true, a logikai értékeket tartalmazó attribútumok esetén a rövidített jelölés lesz használva" } \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/commands.i18n.json b/i18n/hun/extensions/git/out/commands.i18n.json index 75a82e6ba00..d2dfa251e5d 100644 --- a/i18n/hun/extensions/git/out/commands.i18n.json +++ b/i18n/hun/extensions/git/out/commands.i18n.json @@ -14,6 +14,7 @@ "cloning": "Git-forráskódtár klónozása...", "openrepo": "Forráskódtár megnyitása", "proposeopen": "Szeretné megnyitni a klónozott forráskódtárat?", + "init": "Válasszon munkaterületi mappát a Git-forráskódtár inicializálásához!", "init repo": "Forráskódtár elÅ‘készítése", "create repo": "Forráskódtár elÅ‘készítése", "are you sure": "A művelet egy Git forráskódtárat hoz létre a következÅ‘ helyen: '{0}. Biztosan szeretné folytatni?", diff --git a/i18n/hun/extensions/html/client/out/htmlMain.i18n.json b/i18n/hun/extensions/html/client/out/htmlMain.i18n.json index 3aff5dce6a0..c7c371e8738 100644 --- a/i18n/hun/extensions/html/client/out/htmlMain.i18n.json +++ b/i18n/hun/extensions/html/client/out/htmlMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "htmlserver.name": "HTML nyelvi szerver" + "htmlserver.name": "HTML nyelvi szerver", + "folding.start": "Összecsukható tartomány kezdete", + "folding.end": "Összecsukható tartomány vége" } \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/hun/src/vs/editor/contrib/folding/folding.i18n.json index ffe920fbb79..510a0072235 100644 --- a/i18n/hun/src/vs/editor/contrib/folding/folding.i18n.json +++ b/i18n/hun/src/vs/editor/contrib/folding/folding.i18n.json @@ -9,7 +9,7 @@ "foldAction.label": "Bezárás", "foldRecursivelyAction.label": "Bezárás rekurzívan", "foldAllBlockComments.label": "Összes megjegyzésblokk bezárása", - "foldAllMarkerRegions.label": "Összes régió bezárása", + "foldAllMarkerRegions.label": "Összes tartomány bezárása", "unfoldAllMarkerRegions.label": "Összes régió kinyitása", "foldAllAction.label": "Az összes bezárása", "unfoldAllAction.label": "Az összes kinyitása", diff --git a/i18n/hun/src/vs/platform/environment/node/argv.i18n.json b/i18n/hun/src/vs/platform/environment/node/argv.i18n.json index 0346bdf3589..acbe400a835 100644 --- a/i18n/hun/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/hun/src/vs/platform/environment/node/argv.i18n.json @@ -16,7 +16,7 @@ "inspect-brk-extensions": "Hibakeresés és profilozás engedélyezése a kiegészítÅ‘kben, úgy, hogy a kiegészítÅ‘ gazdafolyamata szüneteltetve lesz az indítás után. EllenÅ‘rizze a fejlesztÅ‘i eszközöket a csatlakozási URI-hoz. ", "reuseWindow": "Fájl vagy mappa megnyitása a legutoljára aktív ablakban.", "userDataDir": "Meghatározza a könyvtárat, ahol a felhasználói adatok vannak tárolva. Hasznás, ha rootként van futtatva.", - "log": "A naplózott események szintje. Lehetséges értékek: 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'.", + "log": "A naplózott események szintje.Az 'info' az alapértelmezett értéke. Lehetséges értékek: 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'.", "verbose": "Részletes kimenet kiírása (magába foglalja a --wait kapcsolót)", "wait": "Várjon a fájlok bezárására a visszatérés elÅ‘tt.", "extensionHomePath": "A kiegészítÅ‘k gyökérkönyvtárának beállítása.", diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 99cb4104dec..8ea74e99bd6 100644 --- a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,6 +11,7 @@ "breakpointAdded": "Töréspont hozzáadva, {0}. sor, fájl: {1}", "breakpointRemoved": "Töréspont eltávoíltva, {0}. sor, fájl: {1}", "compoundMustHaveConfigurations": "A kombinációk \"configurations\" tulajdonságát be kell állítani több konfiguráció elindításához.", + "configMissing": "A(z) '{0}' konfiguráció hiányzik a 'launch.json'-ból.", "launchJsonDoesNotExist": "A 'launch.json' nem létezik.", "debugRequestNotSupported": "A(z) `{0}` attribútumnak nem támogatott értéke van ('{1}') a kiválasztott hibakeresési konfigurációban.", "debugRequesMissing": "A(z) '{0}' attribútum hiányzik a kiválasztott hibakeresési konfigurációból.", diff --git a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json index 8b6ad71cd4e..9bf53a3a15a 100644 --- a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ratedByUsers": "{0} felhasználó értékelte", + "ratedBySingleUser": "1 felhasználó értékelte" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 8b6ad71cd4e..e51e9974cf6 100644 --- a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectAndStartDebug": "Kattintson a profilozás leállításához!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 661261d0b48..871b3dc27b8 100644 --- a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -7,9 +7,11 @@ "extensionsCommands": "KiegészítÅ‘k kezelése", "galleryExtensionsCommands": "KiegészítÅ‘k telepítése a galériából", "extension": "KiegészítÅ‘", + "runtimeExtension": "Futó kiegészítÅ‘k", "extensions": "KiegészítÅ‘k", "view": "Nézet", "developer": "FejlesztÅ‘i", "extensionsConfigurationTitle": "KiegészítÅ‘k", - "extensionsAutoUpdate": "KiegészítÅ‘k automatikus frissítése" + "extensionsAutoUpdate": "KiegészítÅ‘k automatikus frissítése", + "extensionsIgnoreRecommendations": "Ha az értéke true, nem jelenik meg több kiegészítÅ‘ajánlást tartalmazó értesítés." } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json index 89b9332aaf7..43614d6d37b 100644 --- a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -4,5 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "reportExtensionIssue": "Probléma jelentése" + "starActivation": "Indulásnál aktiválódott", + "workspaceContainsGlobActivation": "Azért aktiválódott, mert a következÅ‘re illeszkedÅ‘ fájl létezik a munkaterületen: {0}", + "workspaceContainsFileActivation": "Azért aktiválódott, mert {0} nevű fájl létezik a munkaterületen", + "languageActivation": "Azért aktiválódott, mert megnyitott egy {0} fájlt.", + "workspaceGenericActivation": "A következÅ‘ miatt aktiválódott: {0}", + "errors": "{0} kezeletlen hiba", + "extensionsInputName": "Futó kiegészítÅ‘k", + "showRuntimeExtensions": "Futó kiegészítÅ‘k megjelenítése", + "reportExtensionIssue": "Probléma jelentése", + "extensionHostProfileStart": "KiegészítÅ‘ gazdafolyamat profilozásának elindítása", + "extensionHostProfileStop": "KiegészítÅ‘ gazdafolyamat profilozásának leállítása", + "saveExtensionHostProfile": "KiegészítÅ‘ gazdafolyamat profiljának elmentése" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index b4c839776a9..7ff857a3c18 100644 --- a/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -7,6 +7,7 @@ "selectTheme.label": "Színtéma", "themes.category.light": "világos témák", "themes.category.dark": "sötét témák", + "themes.category.hc": "kontrasztos témák", "installColorThemes": "További színtémák telepítése...", "themes.selectTheme": "Válasszon színtémát! (ElÅ‘nézet a fel/le billentyűvel.)", "selectIconTheme.label": "Fájlikontéma", diff --git a/i18n/hun/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/hun/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json index 8b6ad71cd4e..18419b7630f 100644 --- a/i18n/hun/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json +++ b/i18n/hun/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "message": "$(zap) KiegészítÅ‘ gazdafolyamat profilozása..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/hun/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index dd506bf2042..50fa8eeeefc 100644 --- a/i18n/hun/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/hun/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -9,5 +9,6 @@ "extensionHostProcess.crash": "A kiegészítÅ‘ gazdafolyamata váratlanul leállt.", "extensionHostProcess.unresponsiveCrash": "A kiegészítÅ‘ gazdafolyamata le lett állítva, mert nem válaszolt.", "overwritingExtension": "A(z) {0} kiegészítÅ‘ felülírása a következÅ‘vel: {1}.", - "extensionUnderDevelopment": "A(z) {0} elérési úton található fejlesztÅ‘i kiegészítÅ‘ betöltése" + "extensionUnderDevelopment": "A(z) {0} elérési úton található fejlesztÅ‘i kiegészítÅ‘ betöltése", + "extensionCache.invalid": "A kiegészítÅ‘k módosultak a lemezen. Töltse újra az ablakot!" } \ No newline at end of file diff --git a/i18n/ita/extensions/css/client/out/cssMain.i18n.json b/i18n/ita/extensions/css/client/out/cssMain.i18n.json index 0fb3f4a3ac8..ba180eb1499 100644 --- a/i18n/ita/extensions/css/client/out/cssMain.i18n.json +++ b/i18n/ita/extensions/css/client/out/cssMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "cssserver.name": "Server di linguaggio CSS" + "cssserver.name": "Server di linguaggio CSS", + "folding.start": "Inizio di una regione riducibile", + "folding.end": "Fine di una regione riducibile" } \ No newline at end of file diff --git a/i18n/ita/extensions/emmet/package.i18n.json b/i18n/ita/extensions/emmet/package.i18n.json index d4e654204c0..01c2ca68c29 100644 --- a/i18n/ita/extensions/emmet/package.i18n.json +++ b/i18n/ita/extensions/emmet/package.i18n.json @@ -49,5 +49,8 @@ "emmetPreferencesBemModifierSeparator": "Separatore di modificatore utilizzato per le classi quando si utilizza il filtro BEM", "emmetPreferencesFilterCommentBefore": "Una definizione di commento che deve essere inserita prima dell'elemento corrispondente quando viene applicato il filtro commenti.", "emmetPreferencesFilterCommentAfter": "Una definizione di commento che deve essere posizionato dopo l'elemento corrispondente quando viene applicato il filtro commenti.", - "emmetPreferencesFilterCommentTrigger": "Un elenco delimitato da virgole di nomi di attributi che dovrebbero esistere come abbreviazione per il filtro commenti da applicare" + "emmetPreferencesFilterCommentTrigger": "Un elenco delimitato da virgole di nomi di attributi che dovrebbero esistere come abbreviazione per il filtro commenti da applicare", + "emmetPreferencesFormatNoIndentTags": "Una matrice di nomi di tag che non dovrebbe ottenere il rientro interno", + "emmetPreferencesFormatForceIndentTags": "Una matrice di nomi di tag che dovrebbe sempre ottenere il rientro interno", + "emmetPreferencesAllowCompactBoolean": "Se true, viene prodotta una notazione compatta degli attributi booleani" } \ No newline at end of file diff --git a/i18n/ita/extensions/git/out/autofetch.i18n.json b/i18n/ita/extensions/git/out/autofetch.i18n.json index 93fbf7a8a39..b51df7e140d 100644 --- a/i18n/ita/extensions/git/out/autofetch.i18n.json +++ b/i18n/ita/extensions/git/out/autofetch.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "yes": "Sì", - "no": "No" + "no": "No", + "not now": "Non ora", + "suggest auto fetch": "Vorresti attivare il fetching automatico di repository Git?" } \ No newline at end of file diff --git a/i18n/ita/extensions/git/out/commands.i18n.json b/i18n/ita/extensions/git/out/commands.i18n.json index 3d1d3e71eae..b544cb5ca24 100644 --- a/i18n/ita/extensions/git/out/commands.i18n.json +++ b/i18n/ita/extensions/git/out/commands.i18n.json @@ -14,6 +14,7 @@ "cloning": "Clonazione del repository GIT...", "openrepo": "Apri repository", "proposeopen": "Aprire il repository clonato?", + "init": "Selezionare la cartella dell'area di lavoro in cui inizializzare il Git repo", "init repo": "Inizializza repository", "create repo": "Inizializza repository", "are you sure": "Questo creerà un repository Git in '{0}'. Sei sicuro di voler continuare?", @@ -59,6 +60,7 @@ "provide tag name": "Specificare un nome di tag", "tag message": "Messaggio", "provide tag message": "Specificare un messaggio per aggiungere un'annotazione per il tag", + "no remotes to fetch": "Questo repository non ha remote configurati da cui eseguire un fetch.", "no remotes to pull": "Il repository non contiene elementi remoti configurati come origini del pull.", "pick remote pull repo": "Selezionare un repository remoto da cui effettuare il pull del ramo", "no remotes to push": "Il repository non contiene elementi remoti configurati come destinazione del push.", @@ -75,6 +77,7 @@ "no stashes": "Non ci sono accantonamenti da ripristinare.", "pick stash to pop": "Scegli un accantonamento da prelevare", "clean repo": "Pulire l'albero di lavoro del repository prima dell'estrazione.", + "cant push": "Impossibile fare push dei ref su remoto. Provare a eseguire un 'Pull' prima, per integrare le modifiche.", "git error details": "GIT: {0}", "git error": "Errore GIT", "open git log": "Apri log GIT" diff --git a/i18n/ita/extensions/git/out/main.i18n.json b/i18n/ita/extensions/git/out/main.i18n.json index 7fc7257ad8e..657b68a5882 100644 --- a/i18n/ita/extensions/git/out/main.i18n.json +++ b/i18n/ita/extensions/git/out/main.i18n.json @@ -6,7 +6,9 @@ { "looking": "Ricerca di git in: {0}", "using git": "Uso di GIT {0} da {1}", + "downloadgit": "Scarica Git", "neverShowAgain": "Non visualizzare più questo messaggio", + "notfound": "Git non trovato. Installarlo o configurarlo utilizzando l'impostazione 'git.path'.", "updateGit": "Aggiorna GIT", "git20": "La versione installata di GIT è la {0}. Per il corretto funzionamento di Code è consigliabile usare una versione di GIT non inferiore alla 2." } \ No newline at end of file diff --git a/i18n/ita/extensions/git/package.i18n.json b/i18n/ita/extensions/git/package.i18n.json index 4c23aba5a2e..9e6cd77fdcb 100644 --- a/i18n/ita/extensions/git/package.i18n.json +++ b/i18n/ita/extensions/git/package.i18n.json @@ -36,6 +36,7 @@ "command.renameBranch": "Rinomina Branch...", "command.merge": "Merge ramo...", "command.createTag": "Crea tag", + "command.fetch": "Fetch", "command.pull": "Esegui pull", "command.pullRebase": "Esegui pull (Riassegna)", "command.pullFrom": "Pull da...", @@ -60,6 +61,7 @@ "config.countBadge": "Controlla il contatore delle notifiche git. Con `all` vengono conteggiate tutte le modifiche. Con `tracked` vengono conteggiate solo le revisioni. Con `off` il contatore è disattivato.", "config.checkoutType": "Controlla il tipo di branch mostrati eseguendo il comando `Checkout in...`. `all` mostra tutti i refs, `local` mostra solamente i branch locali, `tags` mostra solamente i tag e `remote` mostra solamente i branch remoti.", "config.ignoreLegacyWarning": "Ignora l'avvertimento legacy di Git", + "config.ignoreMissingGitWarning": "Ignora il messaggio di avviso quando manca Git", "config.ignoreLimitWarning": "Ignora il messaggio di avviso quando ci sono troppi cambiamenti in un repository", "config.defaultCloneDirectory": "Il percorso predefinito dove clonare un repository GIT", "config.enableSmartCommit": "Eseguire il commit di tutte le modifiche quando non ci sono modifiche preparate.", diff --git a/i18n/ita/extensions/html/client/out/htmlMain.i18n.json b/i18n/ita/extensions/html/client/out/htmlMain.i18n.json index dd2cc39c679..81abd3e7997 100644 --- a/i18n/ita/extensions/html/client/out/htmlMain.i18n.json +++ b/i18n/ita/extensions/html/client/out/htmlMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "htmlserver.name": "Server di linguaggio HTML" + "htmlserver.name": "Server di linguaggio HTML", + "folding.start": "Inizio di una regione riducibile", + "folding.end": "Fine regione riducibile" } \ No newline at end of file diff --git a/i18n/ita/extensions/markdown/out/commands.i18n.json b/i18n/ita/extensions/markdown/out/commands.i18n.json index 2448cc1f0e0..385404beefc 100644 --- a/i18n/ita/extensions/markdown/out/commands.i18n.json +++ b/i18n/ita/extensions/markdown/out/commands.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "previewTitle": "Anteprima {0}", "onPreviewStyleLoadError": "Impossibile caricare 'markdown.styles': {0}" } \ No newline at end of file diff --git a/i18n/ita/extensions/markdown/out/security.i18n.json b/i18n/ita/extensions/markdown/out/security.i18n.json index 0b73b98c61c..82c72e77e6a 100644 --- a/i18n/ita/extensions/markdown/out/security.i18n.json +++ b/i18n/ita/extensions/markdown/out/security.i18n.json @@ -11,5 +11,8 @@ "disable.title": "Disabilita", "disable.description": "Consente l'esecuzione di tutti i contenuti e script. Scelta non consigliata", "moreInfo.title": "Altre informazioni", + "enableSecurityWarning.title": "Abilita anteprima degli avvisi di protezione in questa area di lavoro", + "disableSecurityWarning.title": "Disabilita anteprima degli avvisi di protezione in questa area di lavoro", + "toggleSecurityWarning.description": "Non influenza il livello di sicurezza del contenuto", "preview.showPreviewSecuritySelector.title": "Seleziona impostazioni di protezione per le anteprime Markdown in questa area di lavoro" } \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/package.i18n.json b/i18n/ita/extensions/merge-conflict/package.i18n.json index 323397967e1..fc64b94112d 100644 --- a/i18n/ita/extensions/merge-conflict/package.i18n.json +++ b/i18n/ita/extensions/merge-conflict/package.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "Esegui merge del conflitto", + "command.accept.all-current": "Accettare tutte le modifiche correnti", "command.accept.all-incoming": "Accettare tutte le modifiche in ingresso", "command.accept.all-both": "Accettare tutte in entrambe", "command.accept.current": "Accettare corrente", diff --git a/i18n/ita/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/ita/extensions/typescript/out/features/completionItemProvider.i18n.json index 70df4761df5..c662f167afb 100644 --- a/i18n/ita/extensions/typescript/out/features/completionItemProvider.i18n.json +++ b/i18n/ita/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "selectCodeAction": "Selezionare l'azione codice da applicare", "acquiringTypingsLabel": "Acquisizione dei file typings...", "acquiringTypingsDetail": "Acquisizione delle definizioni dei file typings per IntelliSense.", "autoImportLabel": "Importazione automatica da {0}" diff --git a/i18n/ita/src/vs/code/electron-main/main.i18n.json b/i18n/ita/src/vs/code/electron-main/main.i18n.json index 90fdc6f7bc0..9c1ef35e983 100644 --- a/i18n/ita/src/vs/code/electron-main/main.i18n.json +++ b/i18n/ita/src/vs/code/electron-main/main.i18n.json @@ -4,5 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "secondInstanceNoResponse": "Un'altra istanza di {0} è in esecuzione ma non risponde", + "secondInstanceNoResponseDetail": "Chiudere tutte le altre istanze e riprovare.", + "secondInstanceAdmin": "Una seconda istanza di {0} è già in esecuzione come amministratore.", + "secondInstanceAdminDetail": "Chiudere l'altra istanza e riprovare.", "close": "&&Chiudi" } \ No newline at end of file diff --git a/i18n/ita/src/vs/code/electron-main/menus.i18n.json b/i18n/ita/src/vs/code/electron-main/menus.i18n.json index d476d47bdc5..728d24a7061 100644 --- a/i18n/ita/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/ita/src/vs/code/electron-main/menus.i18n.json @@ -26,6 +26,7 @@ "miOpenFolder": "Apri &&cartella...", "miOpenFile": "&&Apri file...", "miOpenRecent": "Apri &&recenti", + "miSaveWorkspaceAs": "Salva area di lavoro con nome...", "miAddFolderToWorkspace": "A&&ggiungere cartella all'area di lavoro...", "miSave": "&&Salva", "miSaveAs": "Salva con nome...", @@ -156,6 +157,7 @@ "mMergeAllWindows": "Unisci tutte le finestre", "miToggleDevTools": "&&Attiva/Disattiva strumenti di sviluppo", "miAccessibilityOptions": "&&Opzioni accessibilità", + "miReportIssue": "&&Segnala problema", "miWelcome": "&&Benvenuti", "miInteractivePlayground": "Playground &&interattivo", "miDocumentation": "&&Documentazione", @@ -182,6 +184,7 @@ "miDownloadingUpdate": "Download dell'aggiornamento...", "miInstallingUpdate": "Installazione dell'aggiornamento...", "miCheckForUpdates": "Verifica disponibilità aggiornamenti...", + "aboutDetail": "Versione {0}\nCommit {1}\nData {2}\nShell {3}\nRenderer {4}\nNodo {5}\nArchitettura {6}", "okButton": "OK", "copy": "&&Copia" } \ No newline at end of file diff --git a/i18n/ita/src/vs/code/node/cliProcessMain.i18n.json b/i18n/ita/src/vs/code/node/cliProcessMain.i18n.json index 814141efbe9..65d929e5fb3 100644 --- a/i18n/ita/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/ita/src/vs/code/node/cliProcessMain.i18n.json @@ -8,6 +8,7 @@ "notInstalled": "L'estensione '{0}' non è installata.", "useId": "Assicurarsi di usare l'ID estensione completo, incluso l'editore, ad esempio {0}", "successVsixInstall": "L'estensione '{0}' è stata installata.", + "cancelVsixInstall": "Installazione dell'estensione '{0}' annullata.", "alreadyInstalled": "L'estensione '{0}' è già installata.", "foundExtension": "L'estensione '{0}' è stata trovata nel Marketplace.", "installing": "Installazione...", diff --git a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json index 1c04d1c06ae..99d10858e07 100644 --- a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -17,7 +17,9 @@ "lineNumbers": "Controlla la visualizzazione dei numeri di riga. I valori possibili sono 'on', 'off' e 'relativi'.", "rulers": "Mostra righelli verticali dopo un certo numero di caratteri a spaziatura fissa. Utilizza più valori per più righelli. Nessun righello viene disegnati se la matrice è vuota", "wordSeparators": "Caratteri che verranno usati come separatori di parola quando si eseguono operazioni o spostamenti correlati a parole", + "tabSize": "Il numero di spazi corrispondenti ad un carattere Tab. Questa impostazione viene sottoposta a override in base al contenuto dei file quando 'editor.detectIndentation' è 'on'.", "tabSize.errorMessage": "È previsto 'number'. Nota: il valore \"auto\" è stato sostituito dall'impostazione `editor.detectIndentation`.", + "insertSpaces": "Inserire spazi quando si preme Tab. Questa impostazione viene sottoposta a override in base al contenuto dei file quando è 'editor.detectIndentation' è 'on'.", "insertSpaces.errorMessage": "È previsto 'boolean'. Nota: il valore \"auto\" è stato sostituito dall'impostazione `editor.detectIndentation`.", "detectIndentation": "All'apertura di un file, `editor.tabSize` e `editor.insertSpaces` verranno rilevati in base al contenuto del file.", "roundedSelection": "Controlla se gli angoli delle selezioni sono arrotondati", @@ -29,6 +31,7 @@ "minimap.maxColumn": "Limita la larghezza della mini mappa in modo da eseguire il rendering al massimo di un certo numero di colonne", "find.seedSearchStringFromSelection": "Controlla se inizializzare la stringa di ricerca nel Widget Trova con il testo selezionato nell'editor", "find.autoFindInSelection": "Controlla se l'impostazione Trova nella selezione è attivata quando vengono selezionati più caratteri o righe di testo nell'editor", + "find.globalFindClipboard": "Controlla se il widget Trova debba leggere o modificare gli appunti ricerche condivise su macOS", "wordWrap.off": "Il wrapping delle righe non viene eseguito.", "wordWrap.on": "Verrà eseguito il wrapping delle righe in base alla larghezza del viewport.", "wordWrap.wordWrapColumn": "Verrà eseguito il wrapping delle righe alla posizione corrispondente a `editor.wordWrapColumn`.", diff --git a/i18n/ita/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/ita/src/vs/editor/contrib/folding/folding.i18n.json index cebd48ad3bd..2a546151b45 100644 --- a/i18n/ita/src/vs/editor/contrib/folding/folding.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/folding/folding.i18n.json @@ -8,6 +8,9 @@ "unFoldRecursivelyAction.label": "Espandi in modo ricorsivo", "foldAction.label": "Riduci", "foldRecursivelyAction.label": "Riduci in modo ricorsivo", + "foldAllBlockComments.label": "Riduci tutti i blocchi commento", + "foldAllMarkerRegions.label": "Riduci tutte le regioni", + "unfoldAllMarkerRegions.label": "Espandi tutte le regioni", "foldAllAction.label": "Riduci tutto", "unfoldAllAction.label": "Espandi tutto", "foldLevelAction.label": "Livello riduzione {0}" diff --git a/i18n/ita/src/vs/platform/environment/node/argv.i18n.json b/i18n/ita/src/vs/platform/environment/node/argv.i18n.json index 871d55bf6d3..194dc9d937c 100644 --- a/i18n/ita/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/ita/src/vs/platform/environment/node/argv.i18n.json @@ -12,8 +12,11 @@ "newWindow": "Forza una nuova istanza di Code.", "performance": "Eseguire l'avvio con il comando 'Developer: Startup Performance' abilitato.", "prof-startup": "Esegui il profiler della CPU durante l'avvio", + "inspect-extensions": "Consentire il debug e profiling delle estensioni. Controllare gli strumenti di sviluppo per l'uri di connessione.", + "inspect-brk-extensions": "Consentire il debug e profiling delle estensioni con l'host di estensione in pausa dopo inizio. Controllare gli strumenti di sviluppo per l'uri di connessione.", "reuseWindow": "Forza l'apertura di un file o di una cartella nell'ultima finestra attiva.", "userDataDir": "Consente di specificare la directory in cui si trovano i dati utente. Utile quando viene eseguito come root.", + "log": "Livello di logging da utilizzare. Il valore predefinito è 'info'. I valori consentiti sono 'critical, 'error', 'warn', 'info', 'debug', 'trace', 'off'.", "verbose": "Visualizza l'output dettagliato (implica --wait).", "wait": "Attendere la chiusura dei file prima della restituzione.", "extensionHomePath": "Impostare il percorso radice per le estensioni.", @@ -24,6 +27,7 @@ "experimentalApis": "Abilita funzionalità di API proposte per un'estensione specifica.", "disableExtensions": "Disabilita tutte le estensioni installate.", "disableGPU": "Disabilita l'accelerazione hardware della GPU.", + "status": "Stampare le informazioni di utilizzo e diagnostica di processo.", "version": "Visualizza la versione.", "help": "Visualizza la sintassi.", "usage": "Utilizzo", diff --git a/i18n/ita/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/ita/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index 8b6ad71cd4e..e535e7a4f8b 100644 --- a/i18n/ita/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/ita/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "notCompatibleDownload": "Impossibile scaricare perché non è stata trovata l'estensione compatibile con la versione corrente '{0}' di VS Code." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/ita/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index 39a1c28e54e..f8230336461 100644 --- a/i18n/ita/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/ita/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,7 +6,13 @@ { "invalidManifest": "Estensione non valida: package.json non è un file JSON.", "restartCodeLocal": "Riavviare Code prima di reinstallare {0}.", + "installingOutdatedExtension": "Una versione più recente di questa estensione è già installata. Vuoi eseguire l'override di questa con la versione precedente?", + "override": "Eseguire l'override", "cancel": "Annulla", + "notFoundCompatible": "Impossibile installare perché non è stata trovata l'estensione '{0}' compatibile con la versione corrente '{1}' di VS Code.", + "quitCode": "Impossibile installare perché un'istanza obsoleta dell'estensione è ancora in esecuzione. Si prega di uscire e riavviare VS Code prima di reinstallare.", + "exitCode": "Impossibile installare perché un'istanza obsoleta dell'estensione è ancora in esecuzione. Si prega di uscire e riavviare VS Code prima di reinstallare.", + "notFoundCompatibleDependency": "Impossibile installare perché non è stata trovata l'estensione dipendente '{0}' compatibile con la versione corrente '{1}' di VS Code.", "uninstallDependeciesConfirmation": "Disinstallare solo '{0}' o anche le relative dipendenze?", "uninstallOnly": "Solo", "uninstallAll": "Tutto", diff --git a/i18n/ita/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/ita/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 20c377c8508..1eabda0d35d 100644 --- a/i18n/ita/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -17,6 +17,8 @@ "vscode.extension.activationEvents.onLanguage": "Un evento di attivazione emesso ogni volta che viene aperto un file che risolve nella lingua specificata.", "vscode.extension.activationEvents.onCommand": "Un evento di attivazione emesso ogni volta che viene invocato il comando specificato.", "vscode.extension.activationEvents.onDebug": "Un evento di attivazione emesso ogni volta che un utente sta per avviare il debug o sta per impostare le configurazioni di debug.", + "vscode.extension.activationEvents.onDebugInitialConfigurations": "Un evento di attivazione emesso ogni volta che un \"launch.json\" deve essere creato (e tutti i metodi di provideDebugConfigurations devono essere chiamati).", + "vscode.extension.activationEvents.onDebugResolve": "Un evento di attivazione emesso ogni volta che una sessione di debug di tipo specifico sta per essere lanciata (e un corrispondente metodo resolveDebugConfiguration deve essere chiamato).", "vscode.extension.activationEvents.workspaceContains": "Un evento di attivazione emesso ogni volta che si apre una cartella che contiene almeno un file corrispondente al criterio GLOB specificato.", "vscode.extension.activationEvents.onView": "Un evento di attivazione emesso ogni volta che la visualizzazione specificata viene espansa.", "vscode.extension.activationEvents.star": "Un evento di attivazione emesso all'avvio di VS Code. Per garantire la migliore esperienza per l'utente finale, sei pregato di utilizzare questo evento di attivazione nella tua estensione solo quando nessun'altra combinazione di eventi di attivazione funziona nel tuo caso.", diff --git a/i18n/ita/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json index 7564483e276..f174c284bff 100644 --- a/i18n/ita/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "largeNumberBadge": "Più di 10.000", "badgeTitle": "{0} - {1}", "additionalViews": "Visualizzazioni aggiuntive", "numberBadge": "{0} ({1})", diff --git a/i18n/ita/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index 29413ba4c6c..0e49511fa54 100644 --- a/i18n/ita/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,6 +6,7 @@ { "editorCommand.activeEditorMove.description": "Consente di spostare l'editor attivo per schede o gruppi", "editorCommand.activeEditorMove.arg.name": "Argomento per spostamento editor attivo", + "editorCommand.activeEditorMove.arg.description": "Proprietà degli argomenti:\n\t* 'to': valore stringa che specifica dove eseguire lo spostamento.\n\t* 'by': valore stringa che specifica l'unità per lo spostamento, ovvero per scheda o per gruppo.\n\t* 'value': valore numerico che specifica il numero di posizioni o una posizione assoluta per lo spostamento.", "commandDeprecated": "Il comando **{0}** è stato rimosso. In alternativa, usare **{1}**", "openKeybindings": "Configura tasti di scelta rapida" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json index 702864ad03a..ac85b55822e 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json @@ -53,8 +53,20 @@ "doc": "Per un elenco delle lingue supportate, vedere {0}.", "restart": "Se si modifica il valore, è necessario riavviare VSCode.", "fail.createSettings": "Non è possibile creare '{0}' ({1}).", + "openLogsFolder": "Apri cartella dei log", + "showLogs": "Mostra log...", + "mainProcess": "Principale", + "sharedProcess": "Condiviso", + "rendererProcess": "Renderer", + "extensionHost": "Host dell'estensione", + "selectProcess": "Seleziona il processo", + "setLogLevel": "Imposta livello log", + "trace": "Analisi", "debug": "Debug", "info": "Informazioni", "warn": "Avviso", - "err": "Errore" + "err": "Errore", + "critical": "Errori critici", + "off": "Disattivato", + "selectLogLevel": "Seleziona il livello log" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json index 0f9e509d30b..14e407b8a5d 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -16,6 +16,7 @@ "workbench.editor.labelFormat.long": "Visualizza il nome del file seguito dal relativo percorso assoluto.", "tabDescription": "Controlla il formato dell'etichetta per un editor. Se si modifica questa impostazione, ad esempio, risulterà più agevole individuare il percorso di un file:\n- short: 'parent'\n- medium: 'workspace/src/parent'\n- long: '/home/user/workspace/src/parent'\n- default: '.../parent', quando un'altra scheda condivide lo stesso titolo, oppure il percorso relativo dell'area di lavoro se le schede sono disabilitate", "editorTabCloseButton": "Controlla la posizione dei pulsanti di chiusura delle schede dell'editor oppure li disabilita quando è impostata su 'off'.", + "tabSizing": "Controlla il ridimensionamento delle schede dell'editor. Impostare su 'fit' per adattare le dimensioni delle schede in modo che l'intera etichetta dell'editor sia visibile. Impostare su 'shrink' per consentire il ridimensionamento delle schede qaundo lo spazio disponibile è insufficiente per visualizzare tutte le schede contemporaneamente.", "showIcons": "Controlla se visualizzare o meno un'icona per gli editor aperti. Richiede l'abilitazione anche di un tema dell'icona.", "enablePreview": "Controlla se gli editor aperti vengono visualizzati come anteprima. Le anteprime editor vengono riutilizzate finché vengono mantenute (ad esempio tramite doppio clic o modifica) e vengono visualizzate in corsivo.", "enablePreviewFromQuickOpen": "Controlla se gli editor aperti da Quick Open vengono visualizzati come anteprima. Le anteprime editor vengono riutilizzate finché vengono mantenute, ad esempio tramite doppio clic o modifica.", @@ -29,6 +30,7 @@ "statusBarVisibility": "Controlla la visibilità della barra di stato nella parte inferiore del workbench.", "activityBarVisibility": "Controlla la visibilità della barra attività nel workbench.", "closeOnFileDelete": "Controlla se gli editor che visualizzano un file devono chiudersi automaticamente quando il file viene eliminato o rinominato da un altro processo. Se si disabilita questa opzione, in una simile circostanza l'editor verrà aperto e i file risulteranno modificati ma non salvati. Nota: se si elimina il file dall'interno dell'applicazione, l'editor verrà sempre chiuso e i file modificati ma non salvati non verranno mai chiusi allo scopo di salvaguardare i dati.", + "enableNaturalLanguageSettingsSearch": "Controlla se abilitare la modalità di ricerca in linguaggio naturale per le impostazioni.", "fontAliasing": "Controlla il metodo di aliasing dei caratteri nell'area di lavoro.\n- impostazione predefinita: anti-aliasing dei caratteri a livello di sub-pixel. Nella maggior parte delle visualizzazioni non retina consentirà di ottenere un testo con il massimo contrasto.\n- anti-aliasing: anti-aliasing dei caratteri a livello di pixel, invece che a livello di sub-pixel. Consente di visualizzare i caratteri più chiari.\n- nessuno: disabilita l'anti-aliasing dei caratteri. Il testo verrà visualizzato con contorni irregolari.", "workbench.fontAliasing.default": "Anti-aliasing dei caratteri a livello di sub-pixel. Nella maggior parte delle visualizzazioni non retina consentirà di ottenere un testo con il massimo contrasto.", "workbench.fontAliasing.antialiased": "Anti-aliasing dei caratteri a livello di pixel, invece che a livello di sub-pixel. Consente di visualizzare i caratteri più chiari.", diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index 7a0c9c59e95..54fcb973a53 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,6 +20,10 @@ "openExplorerOnEnd": "Apre automaticamente la visualizzazione di esplorazione al termine di una sessione di debug", "inlineValues": "Mostra i valori delle variabili inline nell'editor durante il debug", "hideActionBar": "Controlla se nascondere la barra delle azioni mobile di debug", + "never": "Non mostrare mai debug nella barra di stato", + "always": "Visualizzare sempre debug nella barra di stato", + "onFirstSessionStart": "Mostra debug nella barra solo stato dopo il primo avvio del debug", + "showInStatusBar": "Controlla se rendere visibile la barra di stato del debug", "openDebug": "Controlla se la viewlet di debug debba essere aperta all'avvio della sessione di debug.", "launch": "Configurazione globale per l'esecuzione del debug. Può essere usata come un'alternativa a \"launch.json\" " } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index c4da42088b5..f162ddc21b6 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,6 +11,8 @@ "breakpointAdded": "Aggiunto un punto di interruzione a riga {0} del file {1}", "breakpointRemoved": "Rimosso un punto di interruzione a riga {0} del file {1}", "compoundMustHaveConfigurations": "Per avviare più configurazioni, deve essere impostato l'attributo \"configurations\" dell'elemento compounds.", + "configMissing": "In 'launch.json' manca la configurazione '{0}'.", + "launchJsonDoesNotExist": "'launch.json' non esiste.", "debugRequestNotSupported": "Nella configurazione di debug scelta l'attributo '{0}' ha un valore non supportato '{1}'.", "debugRequesMissing": "Nella configurazione di debug scelta manca l'attributo '{0}'.", "debugTypeNotSupported": "Il tipo di debug configurato '{0}' non è supportato.", diff --git a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 64cacf41da1..0f0d43dc77d 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,9 +6,11 @@ { "name": "Nome dell'estensione", "extension id": "Identificatore dell'estensione", + "preview": "Anteprima", "publisher": "Nome dell'editore", "install count": "Conteggio delle installazioni", "rating": "Valutazione", + "repository": "Repository", "license": "Licenza", "details": "Dettagli", "contributions": "Contributi", diff --git a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json index 8b6ad71cd4e..e6237e881bd 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ratedByUsers": "Valutato da {0} utenti", + "ratedBySingleUser": "Valutato da 1 utente" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 8b6ad71cd4e..d3895e27f4d 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectAndStartDebug": "Fare clic per arrestare la profilatura." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index ada39f95c93..4664107eeb2 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -7,9 +7,11 @@ "extensionsCommands": "Gestisci le estensioni", "galleryExtensionsCommands": "Installa estensioni della raccolta", "extension": "Estensione", + "runtimeExtension": "Estensioni in esecuzione", "extensions": "Estensioni", "view": "Visualizza", "developer": "Sviluppatore", "extensionsConfigurationTitle": "Estensioni", - "extensionsAutoUpdate": "Aggiorna automaticamente le estensioni" + "extensionsAutoUpdate": "Aggiorna automaticamente le estensioni", + "extensionsIgnoreRecommendations": "Se impostato a true, le notifiche delle raccomandazioni dell'estensione non verranno più mostrate." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json index d7a84eb6e65..ef42850ea00 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -4,5 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "reportExtensionIssue": "Segnala problema" + "starActivation": "Attivata all'avvio", + "workspaceContainsGlobActivation": "Attivata perché nell'area di lavoro è presente un file corrispondente a {0}", + "workspaceContainsFileActivation": "Attivata perché nell'area di lavoro è presente il file {0}", + "languageActivation": "Attivata perché è stato aperto un file {0}", + "workspaceGenericActivation": "Data di attivazione: {0}", + "errors": "{0} errori non rilevati", + "extensionsInputName": "Estensioni in esecuzione", + "showRuntimeExtensions": "Mostra estensioni in esecuzione", + "reportExtensionIssue": "Segnala problema", + "extensionHostProfileStart": "Avvia profilo host dell'estensione", + "extensionHostProfileStop": "Arresta profilo host dell'estensione", + "saveExtensionHostProfile": "Salva profilo host dell'estensione" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json index 08176692fa7..979ee1896bb 100644 --- a/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "filesCategory": "File", - "revealInSideBar": "Visualizza nella barra laterale" + "revealInSideBar": "Visualizza nella barra laterale", + "acceptLocalChanges": "Utilizzare le modifiche e sovrascrivere il contenuto del disco", + "revertLocalChanges": "Annullare le modifiche e tornare al contenuto sul disco" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json index 976c0a1a9f7..7d23a38e703 100644 --- a/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -39,6 +39,7 @@ "compareSource": "Seleziona per il confronto", "globalCompareFile": "Confronta file attivo con...", "openFileToCompare": "Aprire prima un file per confrontarlo con un altro file.", + "compareWith": "Confronta '{0}' con '{1}'", "compareFiles": "Confronta file", "refresh": "Aggiorna", "save": "Salva", @@ -68,5 +69,7 @@ "invalidFileNameError": "Il nome **{0}** non è valido per un nome file o un nome di cartella. Scegliere un nome diverso.", "filePathTooLongError": "Con il nome **{0}** il percorso diventa troppo lungo. Scegliere un nome più breve.", "compareWithSaved": "Confronta file attivo con file salvato", - "compareWithClipboard": "Confronta il file attivo con gli appunti" + "modifiedLabel": "{0} (su disco) ↔ {1}", + "compareWithClipboard": "Confronta il file attivo con gli appunti", + "clipboardComparisonLabel": "Appunti ↔ {0}" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json index d240e8fc075..6fb07e8966e 100644 --- a/i18n/ita/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -48,5 +48,6 @@ "sortOrder.type": "I file e le cartelle vengono ordinati in ordine alfabetico in base all'estensione. Le cartelle vengono visualizzate prima dei file.", "sortOrder.modified": "I file e le cartelle vengono ordinati in ordine decrescente in base alla data dell'ultima modifica. Le cartelle vengono visualizzate prima dei file.", "sortOrder": "Controlla l'ordinamento di file e cartelle in Esplora risorse. Oltre all'ordinamento predefinito, è possibile impostare l'ordine su 'mixed' (file e cartelle vengono ordinati insieme), 'type' (in base al tipo di file), 'modified' (in base alla data dell'ultima modifica) o 'filesFirst' (i file vengono ordinati prima delle cartelle).", + "explorer.decorations.colors": "Controlla l'uso dei colori negli effetti del file.", "explorer.decorations.badges": "Controlli se decorazioni file devono utilizzare badge." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json index 4427bde01ef..0fc4ed5c41b 100644 --- a/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -7,6 +7,7 @@ "noWorkspace": "Nessuna cartella aperta", "explorerSection": "Sezione Esplora file", "noWorkspaceHelp": "Non hai ancora aggiunto cartelle nell'area di lavoro", + "addFolder": "Aggiungi cartella", "noFolderHelp": "Non ci sono ancora cartelle aperte.", "openFolder": "Apri cartella" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json index e0b8c74653b..cee0d8e205d 100644 --- a/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "label": "Esplora risorse" + "label": "Esplora risorse", + "canNotResolve": "Non è possibile risolvere la cartella dell'area di lavoro" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/ita/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json index 8b6ad71cd4e..3c7de140782 100644 --- a/i18n/ita/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "totalProblems": "Totale {0} problemi", + "filteredProblems": "Mostrando {0} di {1} problemi" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/ita/src/vs/workbench/parts/markers/common/messages.i18n.json index e60e5ecc052..5e585c6ea40 100644 --- a/i18n/ita/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,6 +6,7 @@ { "viewCategory": "Visualizza", "problems.view.toggle.label": "Attiva/disattiva problemi", + "problems.view.focus.label": "Problemi di Focus", "problems.panel.configuration.title": "Visualizzazione Problemi", "problems.panel.configuration.autoreveal": "Controlla se la visualizzazione Problemi deve visualizzare automaticamente i file durante l'apertura", "markers.panel.title.problems": "Problemi", diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 4d00ef4a863..6e8f4c9cca2 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "defineKeybinding.initial": "Premere la combinazione di tasti desiderata, quindi INVIO.", "defineKeybinding.chordsTo": "premi contemporaneamente per" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index a5a6e8a1bba..344b356cf42 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "openRawDefaultSettings": "Apri impostazioni predefinite non elaborate", "openGlobalSettings": "Apri impostazioni utente", "openGlobalKeybindings": "Apri tasti di scelta rapida", "openGlobalKeybindingsFile": "Apri file dei tasti di scelta rapida", diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index 4669fa3cd56..7c1a3a7d309 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,10 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "defaultSettingsFuzzyPrompt": "Prova la ricerca in linguaggio naturale.", "defaultSettings": "Inserire le impostazioni nell'editor di lato destro per eseguire l'override.", "noSettingsFound": "Non sono state trovate impostazioni.", "settingsSwitcherBarAriaLabel": "Selezione impostazioni", "userSettings": "Impostazioni utente", "workspaceSettings": "Impostazioni area di lavoro", - "folderSettings": "Impostazioni cartella" + "folderSettings": "Impostazioni cartella", + "enableFuzzySearch": "Abilita la ricerca in linguaggio naturale" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index 6022523a4a4..b3c0576f340 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,6 +14,7 @@ "ConfigurationParser.noTypeDefinition": "Errore: non ci sono attività registrate di tipo '{0}'. Non è stata installata un'estensione che fornisce un provider di task corrispondente?", "ConfigurationParser.missingRequiredProperty": "Errore: nella configurazione di attività '{0}' manca la proprietà obbligatoria '{1}'. La configurazione dell'attività verrà ignorata.", "ConfigurationParser.notCustom": "Errore: tasks non è dichiarato come un'attività personalizzata. La configurazione verrà ignorata.\n{0}\n", + "ConfigurationParser.noTaskName": "Errore: un'attività deve specificare una proprietà label. L'attività verrà ignorata.\n{0}\n", "taskConfiguration.shellArgs": "Avviso: l'attività '{0}' è un comando di shell e uno dei suoi argomenti potrebbe avere spazi indesiderati. Per garantire la correttezza della riga di comando unire args nel comando stesso.", "taskConfiguration.noCommandOrDependsOn": "Errore: l'attività '{0}' non specifica un comando né una proprietà dependsOn. L'attività verrà ignorata. La sua definizione è:\n{1}", "taskConfiguration.noCommand": "Errore: l'attività '{0}' non definisce un comando. L'attività verrà ignorata. Definizione dell'attività:\n{1}", diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index f823b4b682f..42ec40f0ebd 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.rightClickCopyPaste": "Se impostata, impedirà la visualizzazione del menu di scelta rapida quando si fa clic con il pulsante destro del mouse all'interno del terminale, ma eseguirà il comando Copia in presenza di una selezione e il comando Incolla in assenza di una selezione.", "terminal.integrated.fontFamily": "Controlla la famiglia di caratteri del terminale. L'impostazione predefinita è il valore di editor.fontFamily.", "terminal.integrated.fontSize": "Consente di controllare le dimensioni del carattere in pixel del terminale.", + "terminal.integrated.lineHeight": "Controlla l'altezza della riga del terminale. Questo numero è moltiplicato per la dimensione del carattere del terminale per ottenere l'effettiva altezza della riga in pixel.", "terminal.integrated.enableBold": "Per abilitare il grassetto del testo all'interno del terminale, è necessario il supporto della shell del terminale.", "terminal.integrated.cursorBlinking": "Controlla se il cursore del terminale è intermittente o meno.", "terminal.integrated.cursorStyle": "Controlla lo stile del cursore del terminale.", diff --git a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 551ccc06ba2..7fdd1a182be 100644 --- a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -7,6 +7,7 @@ "selectTheme.label": "Tema colori", "themes.category.light": "temi chiari", "themes.category.dark": "temi scuri", + "themes.category.hc": "temi a contrasto elevato", "installColorThemes": "Installa temi colori aggiuntivi...", "themes.selectTheme": "Selezionare il Tema colori (tasti su/giù per anteprima)", "selectIconTheme.label": "Tema icona file", diff --git a/i18n/ita/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/ita/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json index 8b6ad71cd4e..3d8be0b14b4 100644 --- a/i18n/ita/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json +++ b/i18n/ita/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "message": "$(zap) Host profilatura estensione..." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/ita/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index 037da6258e4..fed34b0e75d 100644 --- a/i18n/ita/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -9,5 +9,6 @@ "extensionHostProcess.crash": "L'host dell'estensione è stato terminato in modo imprevisto.", "extensionHostProcess.unresponsiveCrash": "L'host dell'estensione è stato terminato perché non rispondeva.", "overwritingExtension": "Sovrascrittura dell'estensione {0} con {1}.", - "extensionUnderDevelopment": "Caricamento dell'estensione di sviluppo in {0}" + "extensionUnderDevelopment": "Caricamento dell'estensione di sviluppo in {0}", + "extensionCache.invalid": "Le estensioni sono state modificate sul disco. Si prega di ricaricare la finestra." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 3f4aae3a6f0..b92ebc6840a 100644 --- a/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -21,5 +21,6 @@ "keybindings.json.command": "Nome del comando da eseguire", "keybindings.json.when": "Condizione quando il tasto è attivo.", "keybindings.json.args": "Argomenti da passare al comando da eseguire.", - "keyboardConfigurationTitle": "Tastiera" + "keyboardConfigurationTitle": "Tastiera", + "dispatch": "Controlla la logica di invio delle pressioni di tasti da usare, tra `code` (scelta consigliata) e `keyCode`." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/ita/src/vs/workbench/services/textfile/common/textFileService.i18n.json index 8b6ad71cd4e..0c1130350d8 100644 --- a/i18n/ita/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "files.backup.failSave": "Non è stato possibile scrivere i file che sono stati modificati nel percorso di backup (errore: {0}). provare a salvare i file prima e quindi uscire." +} \ No newline at end of file diff --git a/i18n/jpn/extensions/emmet/package.i18n.json b/i18n/jpn/extensions/emmet/package.i18n.json index e29ab462a72..b5d41898982 100644 --- a/i18n/jpn/extensions/emmet/package.i18n.json +++ b/i18n/jpn/extensions/emmet/package.i18n.json @@ -49,5 +49,8 @@ "emmetPreferencesBemModifierSeparator": "BEM フィルターを利用時ã«ã‚¯ãƒ©ã‚¹ä½¿ç”¨ã™ã‚‹ Modifier ã®åŒºåˆ‡ã‚Šæ–‡å­—", "emmetPreferencesFilterCommentBefore": "コメント フィルター使用時ã€ä¸€è‡´ã—ãŸè¦ç´ ã®å‰ã«é…ç½®ã™ã‚‹ã‚³ãƒ¡ãƒ³ãƒˆã®å®šç¾©ã€‚ ", "emmetPreferencesFilterCommentAfter": "コメント フィルター使用時ã€ä¸€è‡´ã—ãŸè¦ç´ ã®å¾Œã«é…ç½®ã™ã‚‹ã‚³ãƒ¡ãƒ³ãƒˆã®å®šç¾©ã€‚", - "emmetPreferencesFilterCommentTrigger": "コメント フィルターã«é©ç”¨ã•れる略語ã«å­˜åœ¨ã™ã‚‹å±žæ€§åã®ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šã®ãƒªã‚¹ãƒˆ" + "emmetPreferencesFilterCommentTrigger": "コメント フィルターã«é©ç”¨ã•れる略語ã«å­˜åœ¨ã™ã‚‹å±žæ€§åã®ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šã®ãƒªã‚¹ãƒˆ", + "emmetPreferencesFormatNoIndentTags": "内部インデントをå–å¾—ã—ãªã„ã‚¿ã‚°åã®é…列", + "emmetPreferencesFormatForceIndentTags": "内部インデントを常ã«å–å¾—ã™ã‚‹ã‚¿ã‚°åã®é…列", + "emmetPreferencesAllowCompactBoolean": "true ã®å ´åˆã€ Boolean 型属性ã®çŸ­ç¸®è¡¨è¨˜ãŒç”Ÿæˆã•れã¾ã™" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/code/node/cliProcessMain.i18n.json b/i18n/jpn/src/vs/code/node/cliProcessMain.i18n.json index e5e7244d33a..17e8239c8b5 100644 --- a/i18n/jpn/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/jpn/src/vs/code/node/cliProcessMain.i18n.json @@ -8,6 +8,7 @@ "notInstalled": "拡張機能 '{0}' ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã¾ã›ã‚“。", "useId": "発行元ãªã©ã®å®Œå…¨ãªæ‹¡å¼µæ©Ÿèƒ½ ID を使用ã—ã¦ã„ã‚‹ã“ã¨ã‚’ã”確èªãã ã•ã„。例: {0}", "successVsixInstall": "拡張機能 '{0}' ãŒæ­£å¸¸ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¾ã—ãŸã€‚", + "cancelVsixInstall": "拡張機能 '{0}' ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚’キャンセルã—ã¾ã—ãŸã€‚", "alreadyInstalled": "拡張機能 '{0}' ã¯æ—¢ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã¾ã™ã€‚", "foundExtension": "マーケットプレース㧠'{0}' ãŒè¦‹ã¤ã‹ã‚Šã¾ã—ãŸã€‚", "installing": "インストールã—ã¦ã„ã¾ã™...", diff --git a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json index f8dc120d025..ccf74d0af32 100644 --- a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -31,6 +31,7 @@ "minimap.maxColumn": "表示ã™ã‚‹ãƒŸãƒ‹ãƒžãƒƒãƒ—ã®æœ€å¤§å¹…ã‚’ç‰¹å®šã®æ¡æ•°ã«åˆ¶é™ã—ã¾ã™", "find.seedSearchStringFromSelection": "エディターã®é¸æŠžã‹ã‚‰æ¤œç´¢ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆå†…ã®æ¤œç´¢æ–‡å­—列を与ãˆã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™", "find.autoFindInSelection": "エディター内ã§è¤‡æ•°ã®æ–‡å­—ã‚‚ã—ãã¯è¡ŒãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ãã«é¸æŠžç¯„囲を検索ã™ã‚‹ãƒ•ラグを有効ã«ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™", + "find.globalFindClipboard": "macOS ã§æ¤œç´¢ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆãŒå…±æœ‰ã®æ¤œç´¢ã‚¯ãƒªãƒƒãƒ—ボードを読ã¿å–りã¾ãŸã¯å¤‰æ›´ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™", "wordWrap.off": "行を折り返ã—ã¾ã›ã‚“。", "wordWrap.on": "行をビューãƒãƒ¼ãƒˆã®å¹…ã§æŠ˜ã‚Šè¿”ã—ã¾ã™ã€‚", "wordWrap.wordWrapColumn": "行を 'editor.wordWrapColumn' ã§æŠ˜ã‚Šè¿”ã—ã¾ã™ã€‚", diff --git a/i18n/jpn/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/jpn/src/vs/editor/contrib/folding/folding.i18n.json index 9d34d92b926..c6a310be421 100644 --- a/i18n/jpn/src/vs/editor/contrib/folding/folding.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/folding/folding.i18n.json @@ -9,6 +9,8 @@ "foldAction.label": "折りãŸãŸã¿", "foldRecursivelyAction.label": "å†å¸°çš„ã«æŠ˜ã‚ŠãŸãŸã‚€", "foldAllBlockComments.label": "ã™ã¹ã¦ã®ãƒ–ロック ã‚³ãƒ¡ãƒ³ãƒˆã®æŠ˜ã‚ŠãŸãŸã¿", + "foldAllMarkerRegions.label": "ã™ã¹ã¦ã®é ˜åŸŸã‚’折りãŸãŸã‚€", + "unfoldAllMarkerRegions.label": "ã™ã¹ã¦ã®é ˜åŸŸã‚’展開", "foldAllAction.label": "ã™ã¹ã¦æŠ˜ã‚ŠãŸãŸã¿", "unfoldAllAction.label": "ã™ã¹ã¦å±•é–‹", "foldLevelAction.label": "折りãŸãŸã¿ãƒ¬ãƒ™ãƒ« {0}" diff --git a/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json b/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json index f118af6afc0..e5dd71eb7e2 100644 --- a/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json @@ -16,6 +16,7 @@ "inspect-brk-extensions": "起動後ã«ä¸€æ™‚åœæ­¢ã•れã¦ã„る拡張ホストã¨ã®æ‹¡å¼µæ©Ÿèƒ½ã®ãƒ‡ãƒãƒƒã‚°ã¨ãƒ—ロファイリングを許å¯ã—ã¾ã™ã€‚接続 URI を開発者ツールã§ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚", "reuseWindow": "最後ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ– ウィンドウã«ãƒ•ァイルã¾ãŸã¯ãƒ•ォルダーを強制的ã«é–‹ãã¾ã™ã€‚", "userDataDir": "ユーザー ãƒ‡ãƒ¼ã‚¿ã‚’ä¿æŒã™ã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’指定ã—ã¾ã™ã€‚ルートã§å®Ÿè¡Œã—ã¦ã„ã‚‹å ´åˆã«å½¹ç«‹ã¡ã¾ã™ã€‚", + "log": "使用ã™ã‚‹ãƒ­ã‚°ãƒ¬ãƒ™ãƒ«ã€‚既定値㯠'info' ã§ã™ã€‚利用å¯èƒ½ãªå€¤ã¯ 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off' ã§ã™ã€‚", "verbose": "詳細出力を表示ã—ã¾ã™ (--wait ã‚’å«ã¿ã¾ã™)。", "wait": "ç¾åœ¨ã®ãƒ•ァイルãŒé–‰ã˜ã‚‰ã‚Œã‚‹ã¾ã§å¾…機ã—ã¾ã™ã€‚", "extensionHomePath": "拡張機能ã®ãƒ«ãƒ¼ãƒˆ パスを設定ã—ã¾ã™ã€‚", diff --git a/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json index 2da6de5555b..e4698109a33 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json @@ -67,5 +67,6 @@ "warn": "警告", "err": "エラー", "critical": "é‡å¤§", - "off": "オフ" + "off": "オフ", + "selectLogLevel": "ログ ãƒ¬ãƒ™ãƒ«ã‚’é¸æŠž" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 2c8374a3999..c5bae21c735 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,6 +11,8 @@ "breakpointAdded": "ブレークãƒã‚¤ãƒ³ãƒˆã‚’追加ã—ã¾ã—ãŸã€‚行 {0}ã€ãƒ•ァイル {1}", "breakpointRemoved": "ブレークãƒã‚¤ãƒ³ãƒˆã‚’削除ã—ã¾ã—ãŸã€‚行 {0}ã€ãƒ•ァイル {1}", "compoundMustHaveConfigurations": "è¤‡åˆæ§‹æˆã‚’é–‹å§‹ã™ã‚‹ã«ã¯ã€è¤‡åˆã« \"configurations\" 属性ãŒè¨­å®šã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚", + "configMissing": "æ§‹æˆ '{0}' ㌠'launch.json' 内ã«ã‚りã¾ã›ã‚“。", + "launchJsonDoesNotExist": "'launch.json' ã¯å­˜åœ¨ã—ã¾ã›ã‚“。", "debugRequestNotSupported": "é¸æŠžã—ã¦ã„るデãƒãƒƒã‚°æ§‹æˆã§ `{0}` 属性ã¯ã‚µãƒãƒ¼ãƒˆã•れãªã„値 '{1}' を指定ã—ã¦ã„ã¾ã™ã€‚", "debugRequesMissing": "é¸æŠžã—ã¦ã„るデãƒãƒƒã‚°æ§‹æˆã«å±žæ€§ '{0}' ãŒå«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。", "debugTypeNotSupported": "æ§‹æˆã•れã¦ã„るデãƒãƒƒã‚°ã®ç¨®é¡ž '{0}' ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json index 2fd0e4b1fd4..41dd62310a4 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "ratedByUsers": "{0} 人ãŒè©•価" + "ratedByUsers": "{0} 人ãŒè©•価", + "ratedBySingleUser": "1 人ãŒè©•価" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/jpn/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index e2aef1055ae..d5997e6170c 100644 --- a/i18n/jpn/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -10,5 +10,5 @@ "extensionHostProcess.unresponsiveCrash": "拡張機能ã®ãƒ›ã‚¹ãƒˆãŒå¿œç­”ã—ãªã„ãŸã‚終了ã—ã¾ã—ãŸã€‚", "overwritingExtension": "拡張機能 {0} ã‚’ {1} ã§ä¸Šæ›¸ãã—ã¦ã„ã¾ã™ã€‚", "extensionUnderDevelopment": "é–‹ç™ºã®æ‹¡å¼µæ©Ÿèƒ½ã‚’ {0} ã«èª­ã¿è¾¼ã‚“ã§ã„ã¾ã™", - "extensionCache.invalid": "拡張機能ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§å¤‰æ›´ã•れã¦ã„ã¾ã™ã€‚ウィンドウをå†åº¦èª­ã¿è¾¼ã‚“ã§ãã ã•ã„。" + "extensionCache.invalid": "拡張機能ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§å¤‰æ›´ã•れã¦ã„ã¾ã™ã€‚ウィンドウをå†èª­ã¿è¾¼ã¿ã—ã¦ãã ã•ã„。" } \ No newline at end of file diff --git a/i18n/kor/extensions/css/client/out/cssMain.i18n.json b/i18n/kor/extensions/css/client/out/cssMain.i18n.json index 7ecfcb46fd7..64beafb9245 100644 --- a/i18n/kor/extensions/css/client/out/cssMain.i18n.json +++ b/i18n/kor/extensions/css/client/out/cssMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "cssserver.name": "CSS 언어 서버" + "cssserver.name": "CSS 언어 서버", + "folding.start": "ì˜ì—­ 접기 시작", + "folding.end": "접기 ì˜ì—­ ë" } \ No newline at end of file diff --git a/i18n/kor/extensions/emmet/package.i18n.json b/i18n/kor/extensions/emmet/package.i18n.json index 10291752ac2..92dd938196e 100644 --- a/i18n/kor/extensions/emmet/package.i18n.json +++ b/i18n/kor/extensions/emmet/package.i18n.json @@ -49,5 +49,8 @@ "emmetPreferencesBemModifierSeparator": "BEM í•„í„° 사용시 ë³€ê²½ëœ êµ¬ë¶„ìžë¥¼ í´ëž˜ìŠ¤ë¡œ 사용합니다.", "emmetPreferencesFilterCommentBefore": "코멘트 í•„í„°ê°€ ì ìš© ë ë•Œ 코맨트 표시는 í•´ë‹¹ëœ ìš”ì†Œ ì•žì— ë°°ì¹˜ 해야합니다.", "emmetPreferencesFilterCommentAfter": "코멘트 í•„í„°ê°€ ì ìš© ë ë•Œ 코맨트 표시는 í•´ë‹¹ëœ ìš”ì†Œ ë’¤ì— ë°°ì¹˜ 해야합니다.", - "emmetPreferencesFilterCommentTrigger": "콤마로 êµ¬ë¶„ëœ ë¦¬ìŠ¤íŠ¸ì˜ ì†ì„±ì€ 코멘트 í•„í„° 약어로 존재해야 합니다." + "emmetPreferencesFilterCommentTrigger": "콤마로 êµ¬ë¶„ëœ ë¦¬ìŠ¤íŠ¸ì˜ ì†ì„±ì€ 코멘트 í•„í„° 약어로 존재해야 합니다.", + "emmetPreferencesFormatNoIndentTags": "ë‚´ë¶€ 들여쓰기하면 안 ë˜ëŠ” 태그 ì´ë¦„ ë°°ì—´", + "emmetPreferencesFormatForceIndentTags": "í•­ìƒ ë‚´ë¶€ 들여쓰기를 해야 하는 태그 ì´ë¦„ì˜ ë°°ì—´", + "emmetPreferencesAllowCompactBoolean": "trueì¸ ê²½ìš° 부울 ì†ì„±ì˜ ì¶•ì†Œëœ í‘œê¸°ë²•ì´ ìƒì„±ë©ë‹ˆë‹¤." } \ No newline at end of file diff --git a/i18n/kor/extensions/git/out/autofetch.i18n.json b/i18n/kor/extensions/git/out/autofetch.i18n.json index 9ecba049193..a02c668eb9d 100644 --- a/i18n/kor/extensions/git/out/autofetch.i18n.json +++ b/i18n/kor/extensions/git/out/autofetch.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "yes": "예", - "no": "아니요" + "no": "아니요", + "not now": "나중ì—", + "suggest auto fetch": "Git 리í¬ì§€í† ë¦¬ ìžë™ 페치하기를 사용하ë„ë¡ ì„¤ì •í•˜ì‹œê² ìŠµë‹ˆê¹Œ?" } \ No newline at end of file diff --git a/i18n/kor/extensions/git/out/commands.i18n.json b/i18n/kor/extensions/git/out/commands.i18n.json index 2dc481e046b..15fcc99ffbe 100644 --- a/i18n/kor/extensions/git/out/commands.i18n.json +++ b/i18n/kor/extensions/git/out/commands.i18n.json @@ -9,9 +9,12 @@ "create branch": "$(plus) 새 분기 ìƒì„±", "repourl": "리í¬ì§€í† ë¦¬ URL", "parent": "부모 디렉터리", + "cancel": "$(sync~spin) 리í¬ì§€í† ë¦¬ë¥¼ 복제하는 중... 취소하려면 í´ë¦­í•˜ì„¸ìš”.", + "cancel tooltip": "복제 취소", "cloning": "Git 리í¬ì§€í† ë¦¬ë¥¼ 복제하는 중...", "openrepo": "리í¬ì§€í† ë¦¬ 열기", "proposeopen": "ë³µì œëœ ë¦¬í¬ì§€í† ë¦¬ë¥¼ 여시겠습니까?", + "init": "Git 리í¬ì§€í† ë¦¬ë¥¼ 초기화할 작업 ì˜ì—­ í´ë” ì„ íƒ", "init repo": "리í¬ì§€í† ë¦¬ 초기화", "create repo": "리í¬ì§€í† ë¦¬ 초기화", "are you sure": "'{0}'ì—서 Git 리í¬ì§€í† ë¦¬ê°€ 만들어집니다. 계ì†í•˜ì‹œê² ìŠµë‹ˆê¹Œ?", @@ -49,12 +52,15 @@ "select branch to delete": "삭제할 분기 ì„ íƒ", "confirm force delete branch": "'{0}' 분기가 완벽히 병합ë˜ì§€ 않았습니다. ê·¸ëž˜ë„ ì‚­ì œí• ê¹Œìš”?", "delete branch": "분기 ì‚­ì œ", + "invalid branch name": "ìž˜ëª»ëœ ë¶„ê¸° ì´ë¦„", + "branch already exists": "ì´ë¦„ì´ '{0}'ì¸ ë¶„ê¸°ê°€ ì´ë¯¸ 있습니다.", "select a branch to merge from": "병합할 분기 ì„ íƒ", "merge conflicts": "병합 ì¶©ëŒì´ 있습니다. 해결한 후 계ì†í•˜ì‹­ì‹œì˜¤.", "tag name": "태그 ì´ë¦„", "provide tag name": "태그 ì´ë¦„ì„ ìž…ë ¥í•˜ì„¸ìš”.", "tag message": "메시지", "provide tag message": "íƒœê·¸ì— ì£¼ì„ì„ ë‹¬ 메시지를 입력하세요.", + "no remotes to fetch": "ì´ ë¦¬í¬ì§€í† ë¦¬ì— 페치할 ì›ê²© í•­ëª©ì´ êµ¬ì„±ë˜ì–´ 있지 않습니다.", "no remotes to pull": "리í¬ì§€í† ë¦¬ì— 풀하ë„ë¡ êµ¬ì„±ëœ ì›ê²© í•­ëª©ì´ ì—†ìŠµë‹ˆë‹¤.", "pick remote pull repo": "분기를 가져올 ì›ê²© ì„ íƒ", "no remotes to push": "리í¬ì§€í† ë¦¬ì— 푸시하ë„ë¡ êµ¬ì„±ëœ ì›ê²©ì´ 없습니다.", @@ -71,6 +77,7 @@ "no stashes": "ë³µì›í•  스태시가 없습니다.", "pick stash to pop": "표시할 스태시 ì„ íƒ", "clean repo": "ì²´í¬ ì•„ì›ƒí•˜ê¸° ì „ì— ë¦¬í¬ì§€í† ë¦¬ 작업 트리를 정리하세요.", + "cant push": "참조를 ì›ê²©ì— 푸시할 수 없습니다. 먼저 'í’€'ì„ ì‹¤í–‰í•˜ì—¬ 변경 ë‚´ìš©ì„ í†µí•©í•˜ì„¸ìš”.", "git error details": "Git: {0}", "git error": "Git 오류", "open git log": "Git 로그 열기" diff --git a/i18n/kor/extensions/git/out/main.i18n.json b/i18n/kor/extensions/git/out/main.i18n.json index 1d7b6e3355c..e152fcdc537 100644 --- a/i18n/kor/extensions/git/out/main.i18n.json +++ b/i18n/kor/extensions/git/out/main.i18n.json @@ -4,8 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "looking": "다ìŒì—서 gitì„ ì°¾ëŠ” 중: {0}", "using git": "{1}ì—서 git {0}ì„(를) 사용하는 중", + "downloadgit": "Git 다운로드", "neverShowAgain": "다시 표시 안 함", + "notfound": "Gitì„ ì°¾ì„ ìˆ˜ 없습니다. 'git.path'를 사용하여 Gitì„ ì„¤ì¹˜í•˜ê±°ë‚˜ 구성합니다.", "updateGit": "Git ì—…ë°ì´íЏ", "git20": "Git {0}ì´(ê°€) ì„¤ì¹˜ëœ ê²ƒ 같습니다. 코드는 2 ì´í•˜ì˜ Gitì—서 최ì ìœ¼ë¡œ ìž‘ë™í•©ë‹ˆë‹¤." } \ No newline at end of file diff --git a/i18n/kor/extensions/git/package.i18n.json b/i18n/kor/extensions/git/package.i18n.json index 8499c412903..33448449d9e 100644 --- a/i18n/kor/extensions/git/package.i18n.json +++ b/i18n/kor/extensions/git/package.i18n.json @@ -33,8 +33,10 @@ "command.checkout": "다ìŒìœ¼ë¡œ ì²´í¬ ì•„ì›ƒ...", "command.branch": "분기 만들기...", "command.deleteBranch": "분기 ì‚­ì œ...", + "command.renameBranch": "분기 ì´ë¦„ 바꾸기...", "command.merge": "분기 병합...", "command.createTag": "태그 ìƒì„±", + "command.fetch": "페치", "command.pull": "í’€", "command.pullRebase": "í’€(다시 지정)", "command.pullFrom": "가져올 위치...", @@ -42,9 +44,11 @@ "command.pushTo": "다ìŒìœ¼ë¡œ 푸시...", "command.pushWithTags": "태그로 푸시", "command.sync": "ë™ê¸°í™”", + "command.syncRebase": "ë™ê¸°í™”(다시 지정)", "command.publish": "분기 게시", "command.showOutput": "Git 출력 표시", "command.ignore": ".gitignoreì— íŒŒì¼ ì¶”ê°€", + "command.stashIncludeUntracked": "스태시(ë¯¸ì¶”ì  í¬í•¨)", "command.stash": "스태시", "command.stashPop": "스태시 표시...", "command.stashPopLatest": "최신 슬래시 표시", @@ -57,6 +61,7 @@ "config.countBadge": "Git ë°°ì§€ 카운터를 제어합니다. `all`ì´ë©´ 변경 ë‚´ìš©ì„ ëª¨ë‘ ê³„ì‚°í•˜ê³ , `tracked`ì´ë©´ ì¶”ì ëœ 변경 내용만 계산하고, `off`ì´ë©´ 해제합니다.", "config.checkoutType": "`다ìŒìœ¼ë¡œ ì²´í¬ ì•„ì›ƒ...`ì„ ì‹¤í–‰í•  때 나열ë˜ëŠ” 분기 ìœ í˜•ì„ ì œì–´í•©ë‹ˆë‹¤. `all`ì´ë©´ 모든 참조를 표시하고, `local`ì´ë©´ 로컬 분기만 표시하고, `tags`ì´ë©´ 태그만 표시하고, `remote`ì´ë©´ ì›ê²© 분기만 표시합니다.", "config.ignoreLegacyWarning": "레거시 Git 경고를 무시합니다.", + "config.ignoreMissingGitWarning": "Gitì´ ì—†ìœ¼ë©´ 경고를 무시합니다.", "config.ignoreLimitWarning": "리í¬ì§€í† ë¦¬ì— 변경 ë‚´ìš©ì´ ë„ˆë¬´ 많으면 경고를 무시합니다.", "config.defaultCloneDirectory": "git 리í¬ì§€í† ë¦¬ë¥¼ 복제할 기본 위치", "config.enableSmartCommit": "ë‹¨ê³„ì  ë³€ê²½ ì‚¬í•­ì´ ì—†ëŠ” 경우 모든 변경 ì‚¬í•­ì„ ì €ìž¥í•©ë‹ˆë‹¤.", diff --git a/i18n/kor/extensions/html/client/out/htmlMain.i18n.json b/i18n/kor/extensions/html/client/out/htmlMain.i18n.json index 5be38446dc7..596b2f4e3b5 100644 --- a/i18n/kor/extensions/html/client/out/htmlMain.i18n.json +++ b/i18n/kor/extensions/html/client/out/htmlMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "htmlserver.name": "HTML 언어 서버" + "htmlserver.name": "HTML 언어 서버", + "folding.start": "ì˜ì—­ 접기 시작", + "folding.end": "접기 ì˜ì—­ ë" } \ No newline at end of file diff --git a/i18n/kor/extensions/markdown/out/commands.i18n.json b/i18n/kor/extensions/markdown/out/commands.i18n.json index f38833da5da..055ede2dd13 100644 --- a/i18n/kor/extensions/markdown/out/commands.i18n.json +++ b/i18n/kor/extensions/markdown/out/commands.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "previewTitle": "{0} 미리 보기", "onPreviewStyleLoadError": "'markdown.styles': {0}ì„ ë¶ˆëŸ¬ì˜¬ 수 ì—†ìŒ" } \ No newline at end of file diff --git a/i18n/kor/extensions/markdown/out/security.i18n.json b/i18n/kor/extensions/markdown/out/security.i18n.json index 6dd50f40273..dcffab2e9ec 100644 --- a/i18n/kor/extensions/markdown/out/security.i18n.json +++ b/i18n/kor/extensions/markdown/out/security.i18n.json @@ -11,5 +11,8 @@ "disable.title": "사용 안 함", "disable.description": "모든 콘í…츠 ë° ìŠ¤í¬ë¦½íЏ ì‹¤í–‰ì„ í—ˆìš©í•©ë‹ˆë‹¤. 권장하지 않습니다.", "moreInfo.title": "추가 ì •ë³´", + "enableSecurityWarning.title": "ì´ ìž‘ì—… ì˜ì—­ì—서 미리 보기 보안 경고 사용", + "disableSecurityWarning.title": "ì´ ìž‘ì—… ì˜ì—­ì—서 미리보기 보안 경고 사용 안 함", + "toggleSecurityWarning.description": "콘í…츠 보안 ìˆ˜ì¤€ì— ì˜í–¥ì„ 주지 않습니다.", "preview.showPreviewSecuritySelector.title": "ì´ ìž‘ì—… ì˜ì—­ì— 대해 Markdown 미리 ë³´ê¸°ì˜ ë³´ì•ˆ 설정 ì„ íƒ" } \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/package.i18n.json b/i18n/kor/extensions/merge-conflict/package.i18n.json index ceb1a3d504d..9416111e4bb 100644 --- a/i18n/kor/extensions/merge-conflict/package.i18n.json +++ b/i18n/kor/extensions/merge-conflict/package.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "ì¶©ëŒ ë³‘í•©", + "command.accept.all-current": "모든 현재 사항 수ë½", "command.accept.all-incoming": "수신 ëª¨ë‘ ìˆ˜ë½", "command.accept.all-both": "둘 다 ëª¨ë‘ ìˆ˜ë½", "command.accept.current": "현재 수ë½", diff --git a/i18n/kor/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/kor/extensions/typescript/out/features/completionItemProvider.i18n.json index bfc413e861a..a9f19fc8665 100644 --- a/i18n/kor/extensions/typescript/out/features/completionItemProvider.i18n.json +++ b/i18n/kor/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "selectCodeAction": "ì ìš©í•  코드 ë™ìž‘ ì„ íƒ", "acquiringTypingsLabel": "typings를 가져오는 중...", "acquiringTypingsDetail": "IntelliSenseì— ëŒ€í•œ typings ì •ì˜ë¥¼ 가져오는 중입니다.", "autoImportLabel": "{0}ì—서 ìžë™ìœ¼ë¡œ 가져오기" diff --git a/i18n/kor/extensions/typescript/package.i18n.json b/i18n/kor/extensions/typescript/package.i18n.json index 8a1fd73f72f..7b99823e951 100644 --- a/i18n/kor/extensions/typescript/package.i18n.json +++ b/i18n/kor/extensions/typescript/package.i18n.json @@ -39,6 +39,7 @@ "typescript.openTsServerLog.title": "TS 서버 로그 열기", "typescript.restartTsServer": "TS 서버 다시 시작", "typescript.selectTypeScriptVersion.title": "TypeScript 버전 ì„ íƒ", + "typescript.reportStyleChecksAsWarnings": "ìŠ¤íƒ€ì¼ ê²€ì‚¬ë¥¼ 경고로 ë³´ê³ ", "jsDocCompletion.enabled": "ìžë™ JSDoc ì£¼ì„ ì‚¬ìš©/사용 안 함", "javascript.implicitProjectConfig.checkJs": "JavaScript 파ì¼ì˜ ì˜ë¯¸ 체계 검사를 사용/사용하지 않습니다. 기존 jsconfig.json ë˜ëŠ” tsconfig.json 파ì¼ì€ ì´ ì„¤ì •ì„ ìž¬ì •ì˜í•©ë‹ˆë‹¤. TypeScript >=2.3.1ì´ í•„ìš”í•©ë‹ˆë‹¤. ", "typescript.npm": "ìžë™ ìž…ë ¥ ì¸ì‹ì— ì‚¬ìš©ëœ NPM 실행 íŒŒì¼ ê²½ë¡œë¥¼ 지정합니다. TypeScript >= 2.3.4ê°€ 필요합니다.", diff --git a/i18n/kor/src/vs/code/electron-main/main.i18n.json b/i18n/kor/src/vs/code/electron-main/main.i18n.json index d259f7872ca..e77916a201a 100644 --- a/i18n/kor/src/vs/code/electron-main/main.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/main.i18n.json @@ -4,5 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "secondInstanceNoResponse": "{0}ì˜ ë‹¤ë¥¸ ì¸ìŠ¤í„´ìŠ¤ê°€ 실행 중ì´ì§€ë§Œ ì‘답하지 않ìŒ", + "secondInstanceNoResponseDetail": "다른 ì¸ìŠ¤í„´ìŠ¤ë¥¼ ëª¨ë‘ ë‹«ê³  다시 시ë„하세요.", + "secondInstanceAdmin": "{0}ì˜ ë‘ ë²ˆì§¸ ì¸ìŠ¤í„´ìŠ¤ê°€ ì´ë¯¸ ê´€ë¦¬ìž ê¶Œí•œìœ¼ë¡œ 실행ë˜ê³  있습니다.", + "secondInstanceAdminDetail": "다른 ì¸ìŠ¤í„´ìŠ¤ë¥¼ ë‹«ê³  다시 시ë„하세요.", "close": "닫기(&&C)" } \ No newline at end of file diff --git a/i18n/kor/src/vs/code/electron-main/menus.i18n.json b/i18n/kor/src/vs/code/electron-main/menus.i18n.json index 08a780b6810..ea36f9e14c0 100644 --- a/i18n/kor/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/menus.i18n.json @@ -22,10 +22,12 @@ "miQuit": "{0} 종료", "miNewFile": "새 파ì¼(&&N)", "miOpen": "열기(&&O)...", + "miOpenWorkspace": "작업 ì˜ì—­ 열기(&&K)...", "miOpenFolder": "í´ë” 열기(&&F)...", "miOpenFile": "íŒŒì¼ ì—´ê¸°(&&O)...", "miOpenRecent": "최근 항목 열기(&&R)", "miSaveWorkspaceAs": "작업 ì˜ì—­ì„ 다른 ì´ë¦„으로 저장", + "miAddFolderToWorkspace": "작업 ì˜ì—­ì— í´ë” 추가(&&D)...", "miSave": "저장(&&S)", "miSaveAs": "다른 ì´ë¦„으로 저장(&&A)...", "miSaveAll": "ëª¨ë‘ ì €ìž¥(&&L)", @@ -155,6 +157,7 @@ "mMergeAllWindows": "모든 ì°½ 병합", "miToggleDevTools": "ê°œë°œìž ë„구 설정/í•´ì œ(&&T)", "miAccessibilityOptions": "접근성 옵션(&&O)", + "miReportIssue": "문제 ë³´ê³ (&&I)", "miWelcome": "시작(&&W)", "miInteractivePlayground": "대화형 실습(&&I)", "miDocumentation": "설명서(&&D)", @@ -181,6 +184,7 @@ "miDownloadingUpdate": "ì—…ë°ì´íŠ¸ë¥¼ 다운로드하는 중...", "miInstallingUpdate": "ì—…ë°ì´íŠ¸ë¥¼ 설치하는 중...", "miCheckForUpdates": "ì—…ë°ì´íЏ 확ì¸...", + "aboutDetail": "버전 {0}\n커밋 {1}\në‚ ì§œ {2}\nì…¸ {3}\në Œë”러 {4}\n노드 {5}\n아키í…처 {6}", "okButton": "확ì¸", "copy": "복사(&&C)" } \ No newline at end of file diff --git a/i18n/kor/src/vs/code/node/cliProcessMain.i18n.json b/i18n/kor/src/vs/code/node/cliProcessMain.i18n.json index c8b96ea3f8f..1fa2ec087e3 100644 --- a/i18n/kor/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/kor/src/vs/code/node/cliProcessMain.i18n.json @@ -8,6 +8,7 @@ "notInstalled": "'{0}' í™•ìž¥ì´ ì„¤ì¹˜ë˜ì–´ 있지 않습니다.", "useId": "게시ìžë¥¼ í¬í•¨í•œ ì „ì²´ 확장 ID(예: {0})를 사용하세요.", "successVsixInstall": "확장 '{0}'ì´(ê°€) 설치ë˜ì—ˆìŠµë‹ˆë‹¤!", + "cancelVsixInstall": "'{0}' 확장 설치를 취소했습니다.", "alreadyInstalled": "'{0}' í™•ìž¥ì´ ì´ë¯¸ 설치ë˜ì–´ 있습니다.", "foundExtension": "마켓플레ì´ìФì—서 '{0}'ì„(를) 찾았습니다.", "installing": "설치 중...", diff --git a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json index a5e25a8bb9a..1fe9d415d3a 100644 --- a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -31,6 +31,7 @@ "minimap.maxColumn": "최대 특정 ìˆ˜ì˜ ì—´ì„ ë Œë”ë§í•˜ë„ë¡ ë¯¸ë‹ˆë§µì˜ ë„ˆë¹„ë¥¼ 제한합니다.", "find.seedSearchStringFromSelection": "편집기 ì„ íƒì—서 Find Widgetì˜ ê²€ìƒ‰ 문ìžì—´ì„ 시딩할지 설정합니다.", "find.autoFindInSelection": "편집기ì—서 여러 ê¸€ìž ë˜ëŠ” í–‰ì„ ì„ íƒí–ˆì„ 때 Find in Selection 플래그를 켤지 설정합니다.", + "find.globalFindClipboard": "macOSì—서 Find Widgetì´ ê³µìœ  í´ë¦½ë³´ë“œ 찾기를 ì½ê±°ë‚˜ 수정해야 í• ì§€ 설정합니다.", "wordWrap.off": "ì¤„ì´ ë°”ë€Œì§€ 않습니다.", "wordWrap.on": "ë·°í¬íЏ 너비ì—서 ì¤„ì´ ë°”ë€ë‹ˆë‹¤.", "wordWrap.wordWrapColumn": "`editor.wordWrapColumn`ì—서 ì¤„ì´ ë°”ë€ë‹ˆë‹¤.", diff --git a/i18n/kor/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/kor/src/vs/editor/contrib/folding/folding.i18n.json index 0d8ac009a87..64113ae45bc 100644 --- a/i18n/kor/src/vs/editor/contrib/folding/folding.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/folding/folding.i18n.json @@ -9,6 +9,8 @@ "foldAction.label": "접기", "foldRecursivelyAction.label": "재귀ì ìœ¼ë¡œ 접기", "foldAllBlockComments.label": "모든 ë¸”ë¡ ì½”ë©˜íŠ¸ë¥¼ 접기", + "foldAllMarkerRegions.label": "모든 ì˜ì—­ 접기", + "unfoldAllMarkerRegions.label": "모든 ì˜ì—­ 펼치기", "foldAllAction.label": "ëª¨ë‘ ì ‘ê¸°", "unfoldAllAction.label": "ëª¨ë‘ íŽ¼ì¹˜ê¸°", "foldLevelAction.label": "수준 {0} 접기" diff --git a/i18n/kor/src/vs/platform/environment/node/argv.i18n.json b/i18n/kor/src/vs/platform/environment/node/argv.i18n.json index b8dae1071a7..43b38b984db 100644 --- a/i18n/kor/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/kor/src/vs/platform/environment/node/argv.i18n.json @@ -12,8 +12,11 @@ "newWindow": "Codeì˜ ìƒˆ ì¸ìŠ¤í„´ìŠ¤ë¥¼ ê°•ì œ ì ìš©í•©ë‹ˆë‹¤.", "performance": "'Developer: Startup Performance' ëª…ë ¹ì„ ì‚¬ìš©í•˜ì—¬ 시작합니다.", "prof-startup": "시작하는 ë™ì•ˆ CPU 프로파ì¼ëŸ¬ 실행", + "inspect-extensions": "디버깅 ë° í™•ìž¥ 프로파ì¼ë§ì„ 허용합니다. ì—°ê²° uriì— ëŒ€í•œ ê°œë°œìž ë„구를 확ì¸í•˜ì‹­ì‹œì˜¤.", + "inspect-brk-extensions": "시작 후 ì¼ì‹œ ì¤‘ì‹œëœ í™•ìž¥ 호스트ì—서 디버깅 ë° í™•ìž¥ 프로파ì¼ë§ì„ 허용합니다. ì—°ê²° URLì€ ê°œë°œìž ë„구를 확ì¸í•˜ì„¸ìš”.", "reuseWindow": "마지막 활성 ì°½ì—서 íŒŒì¼ ë˜ëŠ” í´ë”를 강제로 엽니다.", "userDataDir": "ì‚¬ìš©ìž ë°ì´í„°ê°€ 저장ë˜ëŠ” 디렉터리를 지정합니다(루트로 실행할 경우 유용함).", + "log": "사용할 로그 수준ì´ë©° ê¸°ë³¸ê°’ì€ 'info'입니다. 허용ë˜ëŠ” ê°’ì€ 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'입니다.", "verbose": "ìžì„¸í•œ ì •ë³´ 표시를 출력합니다(--wait를 ì˜ë¯¸).", "wait": "파ì¼ì´ ë‹«íž ë•Œ 까지 기다린 후 ëŒì•„갑니다.", "extensionHomePath": "í™•ìž¥ì˜ ë£¨íŠ¸ 경로를 설정합니다.", @@ -24,6 +27,7 @@ "experimentalApis": "í™•ìž¥ì— ëŒ€í•´ ì œì•ˆëœ API ê¸°ëŠ¥ì„ ì‚¬ìš©í•˜ë„ë¡ ì„¤ì •í•©ë‹ˆë‹¤.", "disableExtensions": "ì„¤ì¹˜ëœ ëª¨ë“  í™•ìž¥ì„ ì‚¬ìš©í•˜ì§€ 않ë„ë¡ ì„¤ì •í•©ë‹ˆë‹¤.", "disableGPU": "GPU 하드웨어 ê°€ì†ì„ 사용하지 않ë„ë¡ ì„¤ì •í•©ë‹ˆë‹¤.", + "status": "프로세스 사용 ë° ì§„ë‹¨ 정보를 ì¸ì‡„합니다.", "version": "ë²„ì „ì„ ì¶œë ¥í•©ë‹ˆë‹¤.", "help": "ì‚¬ìš©ë²•ì„ ì¶œë ¥í•©ë‹ˆë‹¤.", "usage": "사용법", diff --git a/i18n/kor/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/kor/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index 8b6ad71cd4e..3a3afcd8c69 100644 --- a/i18n/kor/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/kor/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "notCompatibleDownload": "VS Codeì˜ í˜„ìž¬ 버전 '{0}'ê³¼(와) 호환ë˜ëŠ” í™•ìž¥ì„ ì°¾ì„ ìˆ˜ 없으므로 다운로드할 수 없습니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/kor/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index 1f9083afa00..64578b6f8a5 100644 --- a/i18n/kor/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/kor/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,7 +6,13 @@ { "invalidManifest": "ìž˜ëª»ëœ í™•ìž¥: package.jsonì´ JSON 파ì¼ì´ 아닙니다.", "restartCodeLocal": "{0}ì„(를) 다시 설치하기 ì „ì— Code를 다시 시작하세요.", + "installingOutdatedExtension": "ì´ í™•ìž¥ì˜ ìµœì‹  ë²„ì „ì´ ì´ë¯¸ 설치ë˜ì–´ 있습니다. ì´ ë²„ì „ì„ ì´ì „ 버전으로 재정ì˜í•˜ì‹œê² ìŠµë‹ˆê¹Œ?", + "override": "재정ì˜", "cancel": "취소", + "notFoundCompatible": "VS Codeì˜ í˜„ìž¬ 버전 '{1}'ê³¼(와) 호환ë˜ëŠ” '{0}' í™•ìž¥ì„ ì°¾ì„ ìˆ˜ 없으므로 설치할 수 없습니다.", + "quitCode": "í™•ìž¥ì˜ ì‚¬ìš©ë˜ì§€ 않는 ì¸ìŠ¤í„´ìŠ¤ê°€ ê³„ì† ì‹¤í–‰ 중ì´ë¯€ë¡œ 설치할 수 없습니다. 다시 설치하기 ì „ì— VS Code를 종료했다가 다시 시작하세요.", + "exitCode": "í™•ìž¥ì˜ ì‚¬ìš©ë˜ì§€ 않는 ì¸ìŠ¤í„´ìŠ¤ê°€ ê³„ì† ì‹¤í–‰ 중ì´ë¯€ë¡œ 설치할 수 없습니다. 다시 설치하기 ì „ì— VS Code를 종료했다가 다시 시작하세요.", + "notFoundCompatibleDependency": "VS Codeì˜ í˜„ìž¬ 버전 '{1}'ê³¼(와) 호환ë˜ëŠ” 종ì†ëœ 확장 '{0}'ì„(를) ì°¾ì„ ìˆ˜ 없으므로 설치할 수 없습니다.", "uninstallDependeciesConfirmation": "'{0}'ë§Œ 제거할까요, 아니면 종ì†ì„±ë„ 제거할까요?", "uninstallOnly": "ë§Œ", "uninstallAll": "모ë‘", diff --git a/i18n/kor/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/kor/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index cb72ee5dd24..ff477458670 100644 --- a/i18n/kor/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/kor/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -17,6 +17,8 @@ "vscode.extension.activationEvents.onLanguage": "ì§€ì •ëœ ì–¸ì–´ë¡œ 확ì¸ë˜ëŠ” 파ì¼ì„ ì—´ 때마다 활성화 ì´ë²¤íŠ¸ê°€ 발송ë©ë‹ˆë‹¤.", "vscode.extension.activationEvents.onCommand": "ì§€ì •ëœ ëª…ë ¹ì„ í˜¸ì¶œí•  때마다 활성화 ì´ë²¤íŠ¸ê°€ 발송ë©ë‹ˆë‹¤.", "vscode.extension.activationEvents.onDebug": "사용ìžê°€ ë””ë²„ê¹…ì„ ì‹œìž‘í•˜ê±°ë‚˜ 디버그 êµ¬ì„±ì„ ì„¤ì •í•˜ë ¤ê³  í•  때마다 활성화 ì´ë²¤íŠ¸ë¥¼ 내보냅니다.", + "vscode.extension.activationEvents.onDebugInitialConfigurations": "\"launch.json\"ì„ ë§Œë“¤ì–´ì•¼ í•  때마다(그리고 모든 provideDebugConfigurations 메서드를 호출해야 í•  때마다) ë°œìƒí•˜ëŠ” 활성화 ì´ë²¤íŠ¸ìž…ë‹ˆë‹¤.", + "vscode.extension.activationEvents.onDebugResolve": "특정 ìœ í˜•ì˜ ë””ë²„ê·¸ ì„¸ì…˜ì´ ì‹œìž‘í•˜ë ¤ê³  í•  때마다(그리고 해당하는 resolveDebugConfiguration 메서드를 호출해야 í•  때마다) ë°œìƒí•˜ëŠ” 활성화 ì´ë²¤íŠ¸ìž…ë‹ˆë‹¤.", "vscode.extension.activationEvents.workspaceContains": "ì§€ì •ëœ glob 패턴과 ì¼ì¹˜í•˜ëŠ” 파ì¼ì´ 하나 ì´ìƒ 있는 í´ë”를 ì—´ 때마다 활성화 ì•Œë¦¼ì´ ë°œì†¡ë©ë‹ˆë‹¤.", "vscode.extension.activationEvents.onView": "ì§€ì •ëœ ë·°ê°€ í™•ìž¥ë  ë•Œë§ˆë‹¤ 활성화 ì´ë²¤íŠ¸ê°€ ë‚´ë³´ë‚´ 집니다.", "vscode.extension.activationEvents.star": "VS Code 시작 시 활성화 ì´ë²¤íŠ¸ê°€ 발송ë©ë‹ˆë‹¤. 훌륭한 최종 ì‚¬ìš©ìž ê²½í—˜ì„ ë³´ìž¥í•˜ë ¤ë©´ 사용 ì¼€ì´ìФì—서 다른 활성화 ì´ë²¤íЏ ì¡°í•©ì´ ìž‘ë™í•˜ì§€ ì•Šì„ ë•Œì—ë§Œ 확장ì—서 ì´ í™œì„±í™” ì´ë²¤íŠ¸ë¥¼ 사용하세요.", diff --git a/i18n/kor/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/kor/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json index 091e1d88413..78f9f16be46 100644 --- a/i18n/kor/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "toggleTabs": "탭 표시 설정/í•´ì œ", "view": "보기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json index 4691263e486..8f69ba1a1bc 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "largeNumberBadge": "10k+", "badgeTitle": "{0} - {1}", "additionalViews": "추가 ë·°", "numberBadge": "{0}({1})", diff --git a/i18n/kor/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index 9b3b3941512..6c0c854e4bf 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,6 +6,7 @@ { "editorCommand.activeEditorMove.description": "활성 편집기를 탭 ë˜ëŠ” 그룹 단위로 ì´ë™", "editorCommand.activeEditorMove.arg.name": "활성 편집기 ì´ë™ ì¸ìˆ˜", + "editorCommand.activeEditorMove.arg.description": "ì¸ìˆ˜ ì†ì„±: * '를': 문ìžì—´ ê°’ì„ ì œê³µ 하 ê³  위치를 ì´ë™.\n\t* ' ì˜í•´': 문ìžì—´ ì´ë™ì— 대 한 단위를 제공 하는 ê°’. 탭 ë˜ëŠ” 그룹.\n\t* ' value': 얼마나 ë§Žì€ ìœ„ì¹˜ ë˜ëŠ” ì´ë™ 하는 절대 위치를 제공 하는 ìˆ«ìž ê°’.", "commandDeprecated": "**{0}** ëª…ë ¹ì´ ì œê±°ë˜ì—ˆìŠµë‹ˆë‹¤. 대신 **{1}** ëª…ë ¹ì„ ì‚¬ìš©í•  수 있습니다.", "openKeybindings": "바로 가기 키 구성" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 8c2c5a8883c..68d8989959f 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -52,5 +52,6 @@ "screenReaderDetectedExplanation.question": "VS Code를 ìž‘ë™í•˜ê¸° 위해 화면 ì½ê¸° í”„ë¡œê·¸ëž¨ì„ ì‚¬ìš©í•˜ì‹­ë‹ˆê¹Œ?", "screenReaderDetectedExplanation.answerYes": "예", "screenReaderDetectedExplanation.answerNo": "아니요", - "screenReaderDetectedExplanation.body1": "VS Codeê°€ ì´ì œ 화면 ì½ê¸° 프로그램과 사용하는 ë° ìµœì í™”ë˜ì—ˆìŠµë‹ˆë‹¤." + "screenReaderDetectedExplanation.body1": "VS Codeê°€ ì´ì œ 화면 ì½ê¸° 프로그램과 사용하는 ë° ìµœì í™”ë˜ì—ˆìŠµë‹ˆë‹¤.", + "screenReaderDetectedExplanation.body2": "줄바꿈, 접기 ë“±ì˜ ì¼ë¶€ 편집기 ê¸°ëŠ¥ì€ ë™ìž‘ì´ ë‹¤ë¦…ë‹ˆë‹¤." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json index 248d9a80226..96f43aced40 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json @@ -53,8 +53,20 @@ "doc": "ì§€ì›ë˜ëŠ” 언어 목ë¡ì€ {0} ì„(를) 참조하세요.", "restart": "ê°’ì„ ë³€ê²½í•˜ë ¤ë©´ VSCode를 다시 시작해야 합니다.", "fail.createSettings": "{0}'({1})ì„(를) 만들 수 없습니다.", + "openLogsFolder": "로그 í´ë” 열기", + "showLogs": "로그 표시...", + "mainProcess": "기본", + "sharedProcess": "공유", + "rendererProcess": "ë Œë”러", + "extensionHost": "확장 호스트", + "selectProcess": "프로세스 ì„ íƒ", + "setLogLevel": "로그 수준 설정", + "trace": "Trace", "debug": "디버그", "info": "ì •ë³´", "warn": "경고", - "err": "오류" + "err": "오류", + "critical": "Critical", + "off": "Off", + "selectLogLevel": "로그 수준 ì„ íƒ" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json index a78356cadf9..b3ca18516e9 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -16,6 +16,7 @@ "workbench.editor.labelFormat.long": "절대 경로 ì•žì— ì˜¤ëŠ” 파ì¼ì˜ ì´ë¦„ì„ í‘œì‹œí•©ë‹ˆë‹¤.", "tabDescription": "íŽ¸ì§‘ê¸°ì˜ ë ˆì´ë¸” 형ì‹ì„ 제어합니다. 예를 들어 ì´ ì„¤ì •ì„ ë³€ê²½í•˜ë©´ 파ì¼ì˜ 위치를 ë” ì‰½ê²Œ 파악할 수 있습니다.:\n- 짧게: 'parent'\n- 중간: 'workspace/src/parent'\n- 길게: '/home/user/workspace/src/parent'\n- 기본값: '.../parent', 다른 íƒ­ì´ ë™ì¼í•œ ì œëª©ì„ ê³µìœ í•˜ê±°ë‚˜, íƒ­ì„ ì‚¬ìš©í•˜ì§€ 않ë„ë¡ ì„¤ì •í•œ 경우 작업 ì˜ì—­ ìƒëŒ€ 경로", "editorTabCloseButton": "íŽ¸ì§‘ê¸°ì˜ íƒ­ 닫기 ë‹¨ì¶”ì˜ ìœ„ì¹˜ë¥¼ 제어하거나 'off'로 ì„¤ì •ëœ ê²½ìš° ì´ ë‹¨ì¶”ë¥¼ 사용하지 않ë„ë¡ ì„¤ì •í•©ë‹ˆë‹¤.", + "tabSizing": "편집기 íƒ­ì˜ í¬ê¸°ë¥¼ 제어합니다. íƒ­ì´ í•­ìƒ ì „ì²´ í…스트 ë ˆì´ë¸”ì„ í‘œì‹œí•  수 있게 확대ë˜ë„ë¡ í•˜ë ¤ë©´ '맞춤'으로 설정합니다. 사용 가능한 ê³µê°„ì´ ë¶€ì¡±ížˆ 모든 íƒ­ì„ í•œ ë²ˆì— í‘œì‹œí•  수 없는 경우 íƒ­ì´ ì¶•ì†Œë˜ë„ë¡ í•˜ë ¤ë©´ '축소'로 설정합니다.", "showIcons": "열린 편집기를 ì•„ì´ì½˜ê³¼ 함께 표시할지 여부를 제어합니다. ì´ë¥¼ 위해서는 ì•„ì´ì½˜ í…Œë§ˆë„ ì‚¬ìš©í•˜ë„ë¡ ì„¤ì •í•´ì•¼ 합니다.", "enablePreview": "ì—´ë ¤ 있는 편집기를 미리 보기로 표시할지 여부를 제어합니다. 미리 보기 편집기는 ìœ ì§€ëœ ìƒíƒœê¹Œì§€(예: ë‘ ë²ˆ í´ë¦­ ë˜ëŠ” íŽ¸ì§‘ì„ í†µí•´) 다시 사용ë˜ë©° 기울임꼴 글꼴 스타ì¼ë¡œ 표시ë©ë‹ˆë‹¤.", "enablePreviewFromQuickOpen": "Quick Openì—서 ì—° 편집기를 미리 보기로 표시할지 여부를 제어합니다. 미리 보기 편집기는 ìœ ì§€ëœ ìƒíƒœê¹Œì§€(예: ë‘ ë²ˆ í´ë¦­ ë˜ëŠ” íŽ¸ì§‘ì„ í†µí•´) 다시 사용ë©ë‹ˆë‹¤.", @@ -29,6 +30,7 @@ "statusBarVisibility": "워í¬ë²¤ì¹˜ 아래쪽ì—서 ìƒíƒœ í‘œì‹œì¤„ì˜ í‘œì‹œ ìœ í˜•ì„ ì œì–´í•©ë‹ˆë‹¤.", "activityBarVisibility": "워í¬ë²¤ì¹˜ì—서 작업 ë§‰ëŒ€ì˜ í‘œì‹œ ìœ í˜•ì„ ì œì–´í•©ë‹ˆë‹¤.", "closeOnFileDelete": "ì¼ë¶€ 다른 프로세스ì—서 파ì¼ì„ 삭제하거나 ì´ë¦„ì„ ë°”ê¿€ 때 파ì¼ì„ 표시하는 편집기를 ìžë™ìœ¼ë¡œ ë‹«ì„ì§€ 여부를 제어합니다. 사용하지 않ë„ë¡ ì„¤ì •í•˜ëŠ” 경우 ì´ëŸ¬í•œ ì´ë²¤íŠ¸ê°€ ë°œìƒí•˜ë©´ 편집기가 ë”í‹° ìƒíƒœë¡œ ê³„ì† ì—´ë ¤ 있습니다. ì‘ìš© 프로그램 ë‚´ì—서 삭제하면 í•­ìƒ íŽ¸ì§‘ê¸°ê°€ 닫히고 ë°ì´í„°ë¥¼ 유지하기 위해 ë”í‹° 파ì¼ì€ 닫히지 않습니다.", + "enableNaturalLanguageSettingsSearch": "ì„¤ì •ì— ëŒ€í•œ ìžì—°ì–´ 검색 모드를 사용할지 여부를 제어합니다.", "fontAliasing": "워í¬ë²¤ì¹˜ì—서 글꼴 앨리어싱 ë°©ì‹ì„ 제어합니다.\n- 기본: 서브 픽셀 글꼴 다듬기. ëŒ€ë¶€ë¶„ì˜ ì¼ë°˜ 디스플레ì´ì—서 가장 선명한 글꼴 제공\n- 안티앨리어싱: 서브 í”½ì…€ì´ ì•„ë‹Œ 픽셀 단위ì—서 글꼴 다듬기. ì „ë°˜ì ìœ¼ë¡œ ë” ë°ì€ ëŠë‚Œì„ 줄 수 있ìŒ\n- ì—†ìŒ: 글꼴 다듬기 사용 안 함. í…스트 모서리가 ê°ì§€ê²Œ 표시ë¨", "workbench.fontAliasing.default": "서브 픽셀 글꼴 다듬기. ëŒ€ë¶€ë¶„ì˜ ì¼ë°˜ 디스플레ì´ì—서 가장 선명한 í…스트를 제공합니다. ", "workbench.fontAliasing.antialiased": "서브 í”½ì…€ì´ ì•„ë‹Œ 픽셀 수준ì—서 ê¸€ê¼´ì„ ë‹¤ë“¬ìŠµë‹ˆë‹¤. ì „ë°˜ì ìœ¼ë¡œ ê¸€ê¼´ì´ ë” ë°ê²Œ 표시ë©ë‹ˆë‹¤.", diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index 00b72c7e934..ae09d1a8d81 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,5 +20,10 @@ "openExplorerOnEnd": "디버그 세션 ëì— íƒìƒ‰ê¸° 뷰를 ìžë™ìœ¼ë¡œ 엽니다.", "inlineValues": "디버그하는 ë™ì•ˆ 편집기ì—서 변수 ê°’ì„ ì¸ë¼ì¸ìœ¼ë¡œ 표시합니다.", "hideActionBar": "ë¶€ë™ ë””ë²„ê·¸ 작업 모ìŒì„ 숨길지 여부를 제거합니다.", + "never": "ìƒíƒœ í‘œì‹œì¤„ì— ë””ë²„ê·¸ 표시 안 함", + "always": "ìƒíƒœ í‘œì‹œì¤„ì— ë””ë²„ê·¸ í•­ìƒ í‘œì‹œ", + "onFirstSessionStart": "디버그가 처ìŒìœ¼ë¡œ ì‹œìž‘ëœ í›„ì—ë§Œ ìƒíƒœ í‘œì‹œì¤„ì— ë””ë²„ê·¸ 표시", + "showInStatusBar": "디버그 ìƒíƒœ í‘œì‹œì¤„ì„ í‘œì‹œí•  시기를 제어합니다.", + "openDebug": "디버깅 세션 시작 시 디버그 ë·°ë ›ì„ ì—´ì§€ 여부를 제어합니다.", "launch": "ì „ì—­ 디버그 시작 구성입니다. 작업 ì˜ì—­ì—서 공유ë˜ëŠ” \n 'launch.json'ì— ëŒ€í•œ 대체로 사용ë˜ì–´ì•¼ 합니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 9b138b5c585..dd7daafffa8 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,6 +11,8 @@ "breakpointAdded": "íŒŒì¼ {1}, 줄 {0}ì— ì¤‘ë‹¨ì ì´ 추가ë˜ì—ˆìŠµë‹ˆë‹¤.", "breakpointRemoved": "íŒŒì¼ {1}, 줄 {0}ì—서 중단ì ì´ 제거ë˜ì—ˆìŠµë‹ˆë‹¤.", "compoundMustHaveConfigurations": "여러 êµ¬ì„±ì„ ì‹œìž‘í•˜ë ¤ë©´ ë³µí•©ì— \"configurations\" 특성 ì§‘í•©ì´ ìžˆì–´ì•¼ 합니다.", + "configMissing": "'{0}' êµ¬ì„±ì´ 'launch.json'ì— ì—†ìŠµë‹ˆë‹¤.", + "launchJsonDoesNotExist": "'launch.json'ì´ ì—†ìŠµë‹ˆë‹¤.", "debugRequestNotSupported": "ì„ íƒí•œ 디버그 구성ì—서 특성 '{0}'ì— ì§€ì›ë˜ì§€ 않는 ê°’ '{1}'ì´(ê°€) 있습니다.", "debugRequesMissing": "ì„ íƒí•œ 디버그 êµ¬ì„±ì— íŠ¹ì„± '{0}'ì´(ê°€) 없습니다.", "debugTypeNotSupported": "êµ¬ì„±ëœ ë””ë²„ê·¸ í˜•ì‹ '{0}'ì€(는) ì§€ì›ë˜ì§€ 않습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 7092740fd0c..863a81f423e 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,9 +6,11 @@ { "name": "확장 ì´ë¦„", "extension id": "확장 ID", + "preview": "미리 보기", "publisher": "ê²Œì‹œìž ì´ë¦„", "install count": "설치 수", "rating": "등급", + "repository": "리í¬ì§€í† ë¦¬", "license": "ë¼ì´ì„ ìФ", "details": "세부 ì •ë³´", "contributions": "기여", diff --git a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json index 8b6ad71cd4e..a428c8145db 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ratedByUsers": "{0}ëª…ì˜ ì‚¬ìš©ìžê°€ ë“±ê¸‰ì„ ë§¤ê¹€", + "ratedBySingleUser": "1ëª…ì˜ ì‚¬ìš©ìžê°€ ë“±ê¸‰ì„ ë§¤ê¹€" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 8b6ad71cd4e..e0b45ad88d7 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectAndStartDebug": "프로파ì¼ë§ì„ 중지하려면 í´ë¦­í•˜ì„¸ìš”." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 9742da49372..8dcad97c6a8 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -7,9 +7,11 @@ "extensionsCommands": "확장 관리", "galleryExtensionsCommands": "갤러리 확장 설치", "extension": "확장", + "runtimeExtension": "실행 ì¤‘ì¸ í™•ìž¥", "extensions": "확장", "view": "보기", "developer": "개발ìž", "extensionsConfigurationTitle": "확장", - "extensionsAutoUpdate": "ìžë™ìœ¼ë¡œ 확장 ì—…ë°ì´íЏ" + "extensionsAutoUpdate": "ìžë™ìœ¼ë¡œ 확장 ì—…ë°ì´íЏ", + "extensionsIgnoreRecommendations": "True로 설정하는 경우 확장 권장 ì‚¬í•­ì— ëŒ€í•œ 알림 표시가 중지ë©ë‹ˆë‹¤." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json index 4b0a8e8d046..0496d738c05 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -4,5 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "reportExtensionIssue": "문제 ë³´ê³ " + "starActivation": "시작 시 활성화ë¨", + "workspaceContainsGlobActivation": "{0}ê³¼(와) ì¼ì¹˜í•˜ëŠ” 파ì¼ì´ 작업 ì˜ì—­ì— 있으므로 활성화ë¨", + "workspaceContainsFileActivation": "{0} 파ì¼ì´ 작업 ì˜ì—­ì— 있으므로 활성화ë¨", + "languageActivation": "{0} 파ì¼ì„ 열었으므로 활성화ë¨", + "workspaceGenericActivation": "{0}ì—서 활성화ë¨", + "errors": "Catchë˜ì§€ ì•Šì€ ì˜¤ë¥˜ {0}ê°œ", + "extensionsInputName": "실행 ì¤‘ì¸ í™•ìž¥", + "showRuntimeExtensions": "실행 ì¤‘ì¸ í™•ìž¥ 표시", + "reportExtensionIssue": "문제 ë³´ê³ ", + "extensionHostProfileStart": "확장 호스트 프로필 시작", + "extensionHostProfileStop": "확장 호스트 프로필 중지", + "saveExtensionHostProfile": "확장 호스트 프로필 저장" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json index b962da52ed9..87d00a4c77a 100644 --- a/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -69,5 +69,7 @@ "invalidFileNameError": "**{0}**(ì´)ë¼ëŠ” ì´ë¦„ì€ íŒŒì¼ ë˜ëŠ” í´ë” ì´ë¦„으로 올바르지 않습니다. 다른 ì´ë¦„ì„ ì„ íƒí•˜ì„¸ìš”.", "filePathTooLongError": "**{0}**(ì´)ë¼ëŠ” ì´ë¦„ì„ ì‚¬ìš©í•˜ë©´ 경로가 너무 길어집니다. ì§§ì€ ì´ë¦„ì„ ì„ íƒí•˜ì„¸ìš”.", "compareWithSaved": "활성 파ì¼ì„ ì €ìž¥ëœ íŒŒì¼ê³¼ 비êµ", - "modifiedLabel": "{0}(디스í¬) ↔ {1}" + "modifiedLabel": "{0}(디스í¬) ↔ {1}", + "compareWithClipboard": "í´ë¦½ë³´ë“œì™€ 활성 íŒŒì¼ ë¹„êµ", + "clipboardComparisonLabel": "í´ë¦½ë³´ë“œ ↔ {0}" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json index 4ce15b3e32b..639701925b4 100644 --- a/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -7,6 +7,7 @@ "noWorkspace": "열린 í´ë” ì—†ìŒ", "explorerSection": "íŒŒì¼ íƒìƒ‰ê¸° 섹션", "noWorkspaceHelp": "작업 ì˜ì—­ì— ì•„ì§ í´ë”를 추가하지 않았습니다.", + "addFolder": "í´ë” 추가", "noFolderHelp": "ì•„ì§ í´ë”를 ì—´ì§€ 않았습니다.", "openFolder": "í´ë” 열기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/kor/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json index 8b6ad71cd4e..ce74fbfe7d0 100644 --- a/i18n/kor/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "totalProblems": "ì´ {0}ê°œ 문제", + "filteredProblems": "{1}ê°œ 중 {0}ê°œ 문제 표시" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/kor/src/vs/workbench/parts/markers/common/messages.i18n.json index fb8699cf20f..f9e867de14d 100644 --- a/i18n/kor/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,6 +6,7 @@ { "viewCategory": "보기", "problems.view.toggle.label": "설정/í•´ì œ 문제", + "problems.view.focus.label": "í¬ì»¤ìФ 문제", "problems.panel.configuration.title": "문제 보기", "problems.panel.configuration.autoreveal": "문제 보기를 ì—´ 때 문제 ë³´ê¸°ì— ìžë™ìœ¼ë¡œ 파ì¼ì´ 표시ë˜ì–´ì•¼ 하는지를 제어합니다.", "markers.panel.title.problems": "문제", diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index edf361223f6..4a2bff216ea 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "defineKeybinding.initial": "ì›í•˜ëŠ” 키 ì¡°í•©ì„ ëˆ„ë¥´ê³  키를 누르세요.", "defineKeybinding.chordsTo": "현" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 3ded239f7d2..4ccbbd8cacf 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "openRawDefaultSettings": "ì›ì‹œ 기본 설정 열기", "openGlobalSettings": "ì‚¬ìš©ìž ì„¤ì • 열기", "openGlobalKeybindings": "바로 가기 키 열기", "openGlobalKeybindingsFile": "바로 가기 키 íŒŒì¼ ì—´ê¸°", diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 0356863191a..8e8e066cc1a 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -12,6 +12,7 @@ "settingsFound": "{0}ê°œ 설정 ì¼ì¹˜í•¨", "totalSettingsMessage": "ì´ {0}ê°œ 설정", "defaultSettings": "기본 설정", + "defaultFolderSettings": "기본 í´ë” 설정", "defaultEditorReadonly": "ê¸°ë³¸ê°’ì„ ìž¬ì •ì˜í•˜ë ¤ë©´ 오른쪽 편집기를 편집하세요.", "preferencesAriaLabel": "기본 설정. ì½ê¸° ì „ìš© í…스트 편집기입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index 7a4c308d03c..188fd9c37da 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "defaultSettingsFuzzyPrompt": "ìžì—°ì–´ ê²€ìƒ‰ì„ ì‚¬ìš©í•´ 보세요!", "defaultSettings": "ì„¤ì •ì„ ì˜¤ë¥¸ìª½ íŽ¸ì§‘ê¸°ì— ë„£ì–´ì„œ ë®ì–´ì”니다.", "noSettingsFound": "ì„¤ì •ì„ ì°¾ì„ ìˆ˜ 없습니다.", "settingsSwitcherBarAriaLabel": "설정 전환기", "userSettings": "ì‚¬ìš©ìž ì„¤ì •", - "workspaceSettings": "작업 ì˜ì—­ 설정" + "workspaceSettings": "작업 ì˜ì—­ 설정", + "folderSettings": "í´ë” 설정", + "enableFuzzySearch": "ìžì—°ì–´ 검색 사용" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/kor/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index 25d60399f44..583bab22864 100644 --- a/i18n/kor/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultLabel": "ìž…ë ¥" + "defaultLabel": "ìž…ë ¥", + "useExcludesAndIgnoreFilesDescription": "제외 설정 ë° íŒŒì¼ ë¬´ì‹œ 사용" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/kor/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json index 8b6ad71cd4e..32615898bd4 100644 --- a/i18n/kor/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "findInFolder": "í´ë”ì—서 찾기...", + "findInWorkspace": "작업 ì˜ì—­ì—서 찾기..." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index e0344b0285b..ad0d8faf650 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -8,6 +8,7 @@ "ConfigureTaskRunnerAction.label": "작업 구성", "CloseMessageAction.label": "닫기", "problems": "문제", + "building": "빌드하고 있습니다...", "manyMarkers": "99+", "runningTasks": "실행 ì¤‘ì¸ ìž‘ì—… 표시", "tasks": "작업", @@ -50,6 +51,7 @@ "TaslService.noEntryToRun": "실행할 ìž‘ì—…ì´ ì—†ìŠµë‹ˆë‹¤. 작업 구성...", "TaskService.fetchingBuildTasks": "빌드 ìž‘ì—…ì„ íŽ˜ì¹˜í•˜ëŠ” 중...", "TaskService.pickBuildTask": "실행할 빌드 작업 ì„ íƒ", + "TaskService.noBuildTask": "실행할 빌드 ìž‘ì—…ì„ ì°¾ì„ ìˆ˜ 없습니다. 빌드 작업 구성...", "TaskService.fetchingTestTasks": "테스트 ìž‘ì—…ì„ íŽ˜ì¹˜í•˜ëŠ” 중...", "TaskService.pickTestTask": "실행할 테스트 작업 ì„ íƒ", "TaskService.noTestTaskTerminal": "실행할 테스트 ìž‘ì—…ì´ ì—†ìŠµë‹ˆë‹¤. 작업 구성...", diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index b052f09dc9e..a17354af37d 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -7,6 +7,7 @@ "TerminalTaskSystem.unknownError": "ìž‘ì—…ì„ ì‹¤í–‰í•˜ëŠ” ë™ì•ˆ 알 수 없는 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. ìžì„¸í•œ ë‚´ìš©ì€ ìž‘ì—… 출력 로그를 참조하세요.", "dependencyFailed": "작업 ì˜ì—­ í´ë” '{1}'ì—서 ì¢…ì† ìž‘ì—… '{0}'ì„(를) 확ì¸í•  수 없습니다. ", "TerminalTaskSystem.terminalName": "작업 - {0}", + "closeTerminal": "터미ë„ì„ ì¢…ë£Œí•˜ë ¤ë©´ 아무 키나 누르세요.", "reuseTerminal": "터미ë„ì´ ìž‘ì—…ì—서 다시 사용ë©ë‹ˆë‹¤. 닫으려면 아무 키나 누르세요.", "TerminalTaskSystem": "UNC 드ë¼ì´ë¸Œì—서 ì…¸ ëª…ë ¹ì„ ì‹¤í–‰í•  수 없습니다.", "unkownProblemMatcher": "문제 ì„ íƒê¸° {0}ì„(를) 확ì¸í•  수 없습니다. ì´ ì„ íƒê¸°ëŠ” 무시ë©ë‹ˆë‹¤." diff --git a/i18n/kor/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index 7638704dea1..c62cb2cd281 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,6 +14,8 @@ "ConfigurationParser.noTypeDefinition": "오류: 등ë¡ëœ 작업 í˜•ì‹ '{0}'ì´(ê°€) 없습니다. 해당하는 작업 공급ìžë¥¼ 제공하는 í™•ìž¥ì„ ì„¤ì¹˜í•˜ì§€ 않으셨습니까?", "ConfigurationParser.missingRequiredProperty": "오류: 작업 구성 '{0}'ì— í•„ìš”í•œ ì†ì„± '{1}'ì´(ê°€) 없습니다. 작업 êµ¬ì„±ì´ ë¬´ì‹œë©ë‹ˆë‹¤.", "ConfigurationParser.notCustom": "오류: ìž‘ì—…ì´ ì‚¬ìš©ìž ì§€ì • 작업으로 ì„ ì–¸ë˜ì§€ 않았습니다. ì´ êµ¬ì„±ì€ ë¬´ì‹œë©ë‹ˆë‹¤.\n{0}\n", + "ConfigurationParser.noTaskName": "오류: 작업ì—서 ë ˆì´ë¸” ì†ì„±ì„ 제공해야 합니다. ì´ ìž‘ì—…ì€ ë¬´ì‹œë©ë‹ˆë‹¤.\n{0}\n", + "taskConfiguration.shellArgs": "경고: '{0}' ìž‘ì—…ì€ ì…¸ 명령ì´ë©° ì¸ìˆ˜ 중 í•˜ë‚˜ì— ì´ìŠ¤ì¼€ì´í”„ë˜ì§€ ì•Šì€ ê³µë°±ì´ ìžˆì„ ìˆ˜ 있습니다. 올바른 명령줄 ì¸ìš©ì¸ì§€ 확ì¸í•˜ë ¤ë©´ ì¸ìˆ˜ë¥¼ 명령으로 병합하세요.", "taskConfiguration.noCommandOrDependsOn": "오류: 작업 '{0}'ì—서 명령ì´ë‚˜ dependsOn ì†ì„±ì„ 지정하지 않습니다. ì´ ìž‘ì—…ì€ ë¬´ì‹œë©ë‹ˆë‹¤. 해당 ìž‘ì—…ì˜ ì •ì˜ëŠ” {1}입니다.", "taskConfiguration.noCommand": "오류: 작업 '{0}'ì—서 ëª…ë ¹ì„ ì •ì˜í•˜ì§€ 않습니다. ì´ ìž‘ì—…ì€ ë¬´ì‹œë©ë‹ˆë‹¤. 해당 ìž‘ì—…ì˜ ì •ì˜ëŠ”\n{1}입니다.", "TaskParse.noOsSpecificGlobalTasks": "작업 버전 2.0.0ì€ ê¸€ë¡œë²Œ OS별 ìž‘ì—…ì„ ì§€ì›í•˜ì§€ 않습니다. OS별 ëª…ë ¹ì„ ì‚¬ìš©í•˜ì—¬ 작업으로 변환하세요. ì˜í–¥ì„ 받는 작업::\n{0}" diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 1a66c6cd537..c8be10020cf 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.rightClickCopyPaste": "설정하는 경우 í„°ë¯¸ë„ ë‚´ì—서 마우스 오른쪽 단추를 í´ë¦­í•  때 ìƒí™©ì— 맞는 메뉴가 표시ë˜ì§€ 않고 대신 ì„ íƒ í•­ëª©ì´ ìžˆìœ¼ë©´ 복사하고 ì„ íƒ í•­ëª©ì´ ì—†ìœ¼ë©´ 붙여넣습니다.", "terminal.integrated.fontFamily": "터미ë„ì˜ ê¸€ê¼´ 패밀리를 제어하며, ê¸°ë³¸ê°’ì€ editor.fontFamilyì˜ ê°’ìž…ë‹ˆë‹¤.", "terminal.integrated.fontSize": "터미ë„ì˜ ê¸€ê¼´ í¬ê¸°(픽셀)를 제어합니다.", + "terminal.integrated.lineHeight": "터미ë„ì˜ ì¤„ 높ì´ë¥¼ 제어합니다. ì´ ìˆ«ìžì— í„°ë¯¸ë„ ê¸€ê¼´ í¬ê¸°ë¥¼ 곱해 실제 줄 높ì´(픽셀)를 얻습니다.", "terminal.integrated.enableBold": "í„°ë¯¸ë„ ë‚´ì—서 êµµì€ í…스트를 사용하ë„ë¡ ì„¤ì •í• ì§€ 여부ì´ë©°, í„°ë¯¸ë„ ì…¸ì˜ ì§€ì›ì´ 필요합니다.", "terminal.integrated.cursorBlinking": "í„°ë¯¸ë„ ì»¤ì„œ 깜박임 여부를 제어합니다.", "terminal.integrated.cursorStyle": "í„°ë¯¸ë„ ì»¤ì„œì˜ ìŠ¤íƒ€ì¼ì„ 제어합니다.", diff --git a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 43a0bba1a52..c71597794ca 100644 --- a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,6 +5,9 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "색 테마", + "themes.category.light": "ë°ì€ 테마", + "themes.category.dark": "ì–´ë‘ìš´ 테마", + "themes.category.hc": "고대비 테마", "installColorThemes": "추가 색 테마 설치...", "themes.selectTheme": "색 테마 ì„ íƒ(미리 보려면 위로/아래로 키 사용)", "selectIconTheme.label": "íŒŒì¼ ì•„ì´ì½˜ 테마", diff --git a/i18n/kor/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/kor/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index 8b6ad71cd4e..69a95ffd567 100644 --- a/i18n/kor/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "bubbleTitle": "ê°•ì¡° 표시한 항목 í¬í•¨" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/kor/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json index 8b6ad71cd4e..0df1b9294ba 100644 --- a/i18n/kor/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json +++ b/i18n/kor/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "message": "$(zap) 확장 호스트를 프로파ì¼ë§í•˜ëŠ” 중..." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/kor/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index 6f9c095c667..2f308f7c3f8 100644 --- a/i18n/kor/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -9,5 +9,6 @@ "extensionHostProcess.crash": "확장 호스트가 예기치 않게 종료ë˜ì—ˆìŠµë‹ˆë‹¤.", "extensionHostProcess.unresponsiveCrash": "확장 호스트가 ì‘답하지 않아서 종료ë˜ì—ˆìŠµë‹ˆë‹¤.", "overwritingExtension": "확장 {0}ì„(를) {1}(으)로 ë®ì–´ì“°ëŠ” 중입니다.", - "extensionUnderDevelopment": "{0}ì—서 개발 확장 로드 중" + "extensionUnderDevelopment": "{0}ì—서 개발 확장 로드 중", + "extensionCache.invalid": "í™•ìž¥ì´ ë””ìŠ¤í¬ì—서 수정ë˜ì—ˆìŠµë‹ˆë‹¤. ì°½ì„ ë‹¤ì‹œ 로드하세요." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 10bf5a9ef4f..4af8c158d1f 100644 --- a/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -21,5 +21,6 @@ "keybindings.json.command": "실행할 ëª…ë ¹ì˜ ì´ë¦„", "keybindings.json.when": "키가 활성화ë˜ëŠ” 조건입니다.", "keybindings.json.args": "실행할 ëª…ë ¹ì— ì „ë‹¬í•  ì¸ìˆ˜ìž…니다.", - "keyboardConfigurationTitle": "키보드" + "keyboardConfigurationTitle": "키보드", + "dispatch": "`code`(권장) ë˜ëŠ” `keyCode`를 사용하는 키 ëˆ„ë¦„ì— ëŒ€í•œ 디스패치 논리를 제어합니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/kor/src/vs/workbench/services/textfile/common/textFileService.i18n.json index 8b6ad71cd4e..bcfc393f961 100644 --- a/i18n/kor/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "files.backup.failSave": "ë³€ê²½ëœ ë‚´ìš©ì´ ìžˆëŠ” 파ì¼ì„ 백업 ìœ„ì¹˜ì— ì“¸ 수 없습니다(오류: {0}). 먼저 파ì¼ì„ 저장한 ë‹¤ìŒ ì¢…ë£Œí•´ 보세요." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/emmet/package.i18n.json b/i18n/ptb/extensions/emmet/package.i18n.json index 93bb46e1ff4..41745410f9b 100644 --- a/i18n/ptb/extensions/emmet/package.i18n.json +++ b/i18n/ptb/extensions/emmet/package.i18n.json @@ -49,5 +49,8 @@ "emmetPreferencesBemModifierSeparator": "Separador de modificador usado para classes quando utilizar o filtro BEM", "emmetPreferencesFilterCommentBefore": "Uma definição de comentário que deve ser colocado antes de elemento correspondente quando um filtro de comentário é aplicado.", "emmetPreferencesFilterCommentAfter": "Uma definição de comentário que deve ser colocado após o elemento correspondente quando um filtro de comentário é aplicado.", - "emmetPreferencesFilterCommentTrigger": "Uma lista separada por vírgulas de nomes de atributo que deve existir em abreviações para o filtro de comentário a ser aplicado" + "emmetPreferencesFilterCommentTrigger": "Uma lista separada por vírgulas de nomes de atributo que deve existir em abreviações para o filtro de comentário a ser aplicado", + "emmetPreferencesFormatNoIndentTags": "Uma matriz de nomes de abas que não devem ter recuo interno", + "emmetPreferencesFormatForceIndentTags": "Uma matriz de nomes de abas que deve sempre devem ter recuo interno", + "emmetPreferencesAllowCompactBoolean": "Se verdadeiro, a notação compacta de atributos booleanos são produzidos" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json b/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json index ee0b74f6e41..ec57d526c98 100644 --- a/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json @@ -8,6 +8,7 @@ "notInstalled": "Extensão '{0}' não está instalada.", "useId": "Certifique-se de usar a ID de extensão completa, incluindo o editor, por exemplo: {0}", "successVsixInstall": "Extensão '{0}' foi instalada com sucesso!", + "cancelVsixInstall": "Cancelada a instalação da extensão '{0}'.", "alreadyInstalled": "Extensão '{0}' já está instalada.", "foundExtension": "Encontrado '{0}' na loja VS Code.", "installing": "Instalando...", diff --git a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json index db6da099ec4..52ffce48a73 100644 --- a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -31,6 +31,7 @@ "minimap.maxColumn": "Limitar o tamanho de um mini-mapa para renderizar no máximo um número determinado de colunas", "find.seedSearchStringFromSelection": "Controla se nós inicializamos a string de pesquisa na Ferramenta de Pesquisa a partir da seleção do editor", "find.autoFindInSelection": "Controla se a configuração Find in Selection deve estar ativada quando vários caracteres ou linhas de texto estão selecionados no editor", + "find.globalFindClipboard": "Controla se a ferramenta Localizar deve ler ou modificar a área de transfência de busca compartilhada no macOS", "wordWrap.off": "As linhas nunca serão quebradas.", "wordWrap.on": "As linhas serão quebradas na largura de visualização", "wordWrap.wordWrapColumn": "As linhas serão quebradas em `editor.wordWrapColumn`.", diff --git a/i18n/ptb/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/ptb/src/vs/editor/contrib/folding/folding.i18n.json index eb3341e2a4d..51b3d0dbab7 100644 --- a/i18n/ptb/src/vs/editor/contrib/folding/folding.i18n.json +++ b/i18n/ptb/src/vs/editor/contrib/folding/folding.i18n.json @@ -9,6 +9,8 @@ "foldAction.label": "Colapsar", "foldRecursivelyAction.label": "Colapsar recursivamente", "foldAllBlockComments.label": "Fechar Todos os Comentários de Bloco", + "foldAllMarkerRegions.label": "Fechar Todas as Regiões", + "unfoldAllMarkerRegions.label": "Abrir Todas as Regiões", "foldAllAction.label": "Colapsar tudo", "unfoldAllAction.label": "Abrir tudo", "foldLevelAction.label": "Nível de colapsamento {0}" diff --git a/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json b/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json index eb886a026f7..ed9e5aca99c 100644 --- a/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json @@ -16,6 +16,7 @@ "inspect-brk-extensions": "Permitir depuração e criação de perfil de extensões com o host de extensão em pausa após o início. Verifique as ferramentas do desenvolvedor para a conexão uri.", "reuseWindow": "Forçar a abertura de um arquivo ou pasta na última janela ativa", "userDataDir": "Especifica o diretório que os dados do usuário serão mantidos, útil quando estiver rodando como root.", + "log": "Nível de log a ser utilizado. O padrão é 'info'. Os valores permitidos são 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'.", "verbose": "Imprimir a saída detalhada (Implica -- esperar).", "wait": "Espere pelos arquivos a serem fechados antes de retornar.", "extensionHomePath": "Defina o caminho raíz para as extensões.", diff --git a/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json index 04de1ce8cef..67b112045f5 100644 --- a/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json @@ -67,5 +67,6 @@ "warn": "Aviso", "err": "Erro", "critical": "Crítico", - "off": "Desligado" + "off": "Desligado", + "selectLogLevel": "Selecione o nível de log" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index b576d0807c8..82aa2a51714 100644 --- a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -21,6 +21,8 @@ "inlineValues": "Mostrar valores de variáveis em linha no editor durante a depuração", "hideActionBar": "Controlar se a barra de ação flutuante do depurador deve ser ocultada", "never": "Nunca mostrar debug na barra de status", + "always": "Sempre mostrar depurar na barra de status", + "onFirstSessionStart": "Mostrar depurar na barra de status somente após a depuração ser iniciada pela primeira vez", "showInStatusBar": "Controla quando a barra de status de depuração deve ser visível", "openDebug": "Controla se o depurador viewlet deve ser aberto no início de sessão de depuração.", "launch": "Configuração global do lançamento do depurador. Deve ser usado como uma alternativa para o arquivo 'launch.json' que é compartilhado entre os espaços de trabalho" diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 9d0ec3a464b..de45eedf221 100644 --- a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,6 +11,8 @@ "breakpointAdded": "Adicionado ponto de interrupção, linha {0}, arquivo {1}", "breakpointRemoved": "Ponto de interrupção removido, linha {0}, arquivo {1}", "compoundMustHaveConfigurations": "Composição deve ter o atributo \"configurations\" definido para iniciar várias configurações.", + "configMissing": "Configuração '{0}' não tem 'launch.json'.", + "launchJsonDoesNotExist": "'launch.json' não existe.", "debugRequestNotSupported": "Atributo '{0}' tem um valor sem suporte '{1}' na configuração de depuração escolhida.", "debugRequesMissing": "Atributo '{0}' está faltando para a configuração de depuração escolhida.", "debugTypeNotSupported": "Tipo de depuração configurado '{0}' não é suportado.", diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json index d82c863fc27..75103d39319 100644 --- a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "ratedByUsers": "Avaliado por {0} usuários" + "ratedByUsers": "Avaliado por {0} usuários", + "ratedBySingleUser": "Avaliado por 1 usuário" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 77e6de1fbbc..9e3b4ca9b5b 100644 --- a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -12,5 +12,6 @@ "view": "Exibir", "developer": "Desenvolvedor", "extensionsConfigurationTitle": "Extensões", - "extensionsAutoUpdate": "Atualizar extensões automaticamente" + "extensionsAutoUpdate": "Atualizar extensões automaticamente", + "extensionsIgnoreRecommendations": "Se definido como verdadeiro, as notificações para recomendações de extensão irão parar de aparecer." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json index bec798884ff..a02e2630fde 100644 --- a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -12,5 +12,8 @@ "errors": "{0} erros não capturados", "extensionsInputName": "Executando extensões", "showRuntimeExtensions": "Mostrar extensões em execução", - "reportExtensionIssue": "Reportar Problema" + "reportExtensionIssue": "Reportar Problema", + "extensionHostProfileStart": "Iniciar o Perfil de Host de Extensão", + "extensionHostProfileStop": "Parar o Perfil de Host de Extensão", + "saveExtensionHostProfile": "Salvar o Perfil de Host de Extensão" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/ptb/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json index 8b6ad71cd4e..ff3ad330c91 100644 --- a/i18n/ptb/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json +++ b/i18n/ptb/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "message": "$(zap) Perfil de Host de Extensão..." +} \ No newline at end of file diff --git a/i18n/rus/extensions/css/client/out/cssMain.i18n.json b/i18n/rus/extensions/css/client/out/cssMain.i18n.json index 73454bf8b97..237c382d200 100644 --- a/i18n/rus/extensions/css/client/out/cssMain.i18n.json +++ b/i18n/rus/extensions/css/client/out/cssMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "cssserver.name": "Языковой Ñервер CSS" + "cssserver.name": "Языковой Ñервер CSS", + "folding.start": "Ðачало Ñворачиваемого региона", + "folding.end": "Окончание Ñворачиваемого региона" } \ No newline at end of file diff --git a/i18n/rus/extensions/emmet/package.i18n.json b/i18n/rus/extensions/emmet/package.i18n.json index 49fa561f309..2638e01cf80 100644 --- a/i18n/rus/extensions/emmet/package.i18n.json +++ b/i18n/rus/extensions/emmet/package.i18n.json @@ -49,5 +49,8 @@ "emmetPreferencesBemModifierSeparator": "Разделитель модификатора Ð´Ð»Ñ ÐºÐ»Ð°ÑÑов, иÑпользуемый Ñ Ñ„Ð¸Ð»ÑŒÑ‚Ñ€Ð¾Ð¼ BEM", "emmetPreferencesFilterCommentBefore": "Определение комментариÑ, который должен быть размещен перед ÑоответÑтвующим Ñлементом при применении фильтра комментариÑ.", "emmetPreferencesFilterCommentAfter": "Определение комментариÑ, который должен быть размещен поÑле ÑоответÑтвующего Ñлемента при применении фильтра комментариÑ. ", - "emmetPreferencesFilterCommentTrigger": "РазделителÑми запÑтыми ÑпиÑок имен атрибутов, которые должны приÑутÑтвовать в Ñокращении Ð´Ð»Ñ Ð¿Ñ€Ð¸Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñ„Ð¸Ð»ÑŒÑ‚Ñ€Ð° комментариÑ" + "emmetPreferencesFilterCommentTrigger": "РазделителÑми запÑтыми ÑпиÑок имен атрибутов, которые должны приÑутÑтвовать в Ñокращении Ð´Ð»Ñ Ð¿Ñ€Ð¸Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñ„Ð¸Ð»ÑŒÑ‚Ñ€Ð° комментариÑ", + "emmetPreferencesFormatNoIndentTags": "МаÑÑив имен тегов, Ð´Ð»Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… не Ñледует иÑпользовать внутренние отÑтупы", + "emmetPreferencesFormatForceIndentTags": "МаÑÑив имен тегов, Ð´Ð»Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… вÑегда Ñледует иÑпользовать внутренние отÑтупы", + "emmetPreferencesAllowCompactBoolean": "ЕÑли Ñтот параметр имеет значение true, формируетÑÑ ÐºÐ¾Ð¼Ð¿Ð°ÐºÑ‚Ð½Ð°Ñ Ð·Ð°Ð¿Ð¸ÑÑŒ логичеÑких атрибутов" } \ No newline at end of file diff --git a/i18n/rus/extensions/git/out/autofetch.i18n.json b/i18n/rus/extensions/git/out/autofetch.i18n.json index 0f8fdf4d3aa..1e461cf4629 100644 --- a/i18n/rus/extensions/git/out/autofetch.i18n.json +++ b/i18n/rus/extensions/git/out/autofetch.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "yes": "Да", - "no": "Ðет" + "no": "Ðет", + "not now": "Ðе ÑейчаÑ", + "suggest auto fetch": "Ð’Ñ‹ хотите включить автоматичеÑкое получение Ð´Ð»Ñ Ñ€ÐµÐ¿Ð¾Ð·Ð¸Ñ‚Ð¾Ñ€Ð¸ÐµÐ² Git?" } \ No newline at end of file diff --git a/i18n/rus/extensions/git/out/commands.i18n.json b/i18n/rus/extensions/git/out/commands.i18n.json index 149e1af6b09..d8d6feaa35d 100644 --- a/i18n/rus/extensions/git/out/commands.i18n.json +++ b/i18n/rus/extensions/git/out/commands.i18n.json @@ -9,9 +9,12 @@ "create branch": "$(plus) Создать новую ветвь", "repourl": "URL-Ð°Ð´Ñ€ÐµÑ Ñ€ÐµÐ¿Ð¾Ð·Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ", "parent": "РодительÑкий каталог", + "cancel": "$(sync~spin) Клонирование репозиториÑ... Чтобы отменить Ñту операцию, щелкните здеÑÑŒ", + "cancel tooltip": "Отменить клонирование", "cloning": "КлонируетÑÑ Ñ€ÐµÐ¿Ð¾Ð·Ð¸Ñ‚Ð¾Ñ€Ð¸Ð¹ Git...", "openrepo": "Открыть репозиторий", "proposeopen": "Ð’Ñ‹ хотите открыть клонированный репозиторий?", + "init": "Выберите папку рабочей облаÑти Ð´Ð»Ñ Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ð¸ Ñ€ÐµÐ¿Ð¾Ð·Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ Git", "init repo": "Инициализировать репозиторий", "create repo": "Инициализировать репозиторий", "are you sure": "Ð’ '{0}' будет Ñоздан репозиторий Git. Ð’Ñ‹ дейÑтвительно хотите продолжить?", @@ -49,12 +52,15 @@ "select branch to delete": "Выберите ветвь Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ", "confirm force delete branch": "Ветвь '{0}' объединена не полноÑтью. Удалить ее?", "delete branch": "Удалить ветвь", + "invalid branch name": "ÐедопуÑтимое Ð¸Ð¼Ñ Ð²ÐµÑ‚Ð²Ð¸", + "branch already exists": "Ветви Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ '{0}' уже ÑущеÑтвует", "select a branch to merge from": "Выберите ветвь Ð´Ð»Ñ ÑлиÑниÑ", "merge conflicts": "Обнаружены конфликты ÑлиÑниÑ. УÑтраните их перед фикÑацией.", "tag name": "Ð˜Ð¼Ñ Ñ‚ÐµÐ³Ð°", "provide tag name": "Укажите Ð¸Ð¼Ñ Ñ‚ÐµÐ³Ð°", "tag message": "Сообщение", "provide tag message": "Укажите Ñообщение Ð´Ð»Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ‚ÐµÐ³Ð°", + "no remotes to fetch": "Ð”Ð»Ñ Ñтого Ñ€ÐµÐ¿Ð¾Ð·Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ Ð½Ðµ наÑтроены удаленные репозитории Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ….", "no remotes to pull": "Ð”Ð»Ñ Ð²Ð°ÑˆÐµÐ³Ð¾ Ñ€ÐµÐ¿Ð¾Ð·Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ Ð½Ðµ наÑтроены удаленные репозитории Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ….", "pick remote pull repo": "Выберите удаленный компьютер, Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð³Ð¾ Ñледует загрузить ветвь", "no remotes to push": "Ð”Ð»Ñ Ð²Ð°ÑˆÐµÐ³Ð¾ Ñ€ÐµÐ¿Ð¾Ð·Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ Ð½Ðµ наÑтроены удаленные репозитории Ð´Ð»Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸ данных.", @@ -71,6 +77,7 @@ "no stashes": "ОтÑутÑтвуют ÑпрÑтанные изменениÑ, которые необходимо воÑÑтановить.", "pick stash to pop": "Выберите ÑпрÑтанное изменение Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ", "clean repo": "ОчиÑтите рабочее дерево Ñ€ÐµÐ¿Ð¾Ð·Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ Ð¿ÐµÑ€ÐµÐ´ извлечением.", + "cant push": "Ðе удаетÑÑ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²Ð¸Ñ‚ÑŒ ÑÑылки в удаленный репозиторий. Сначала выберите \"Извлечь\", чтобы интегрировать изменениÑ.", "git error details": "Git: {0}", "git error": "Ошибка Git", "open git log": "Открыть журнал GIT" diff --git a/i18n/rus/extensions/git/out/main.i18n.json b/i18n/rus/extensions/git/out/main.i18n.json index 85416c1538a..f4e90ccb987 100644 --- a/i18n/rus/extensions/git/out/main.i18n.json +++ b/i18n/rus/extensions/git/out/main.i18n.json @@ -4,8 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "looking": "ПоиÑк Git в: {0}", "using git": "ИÑпользование GIT {0} из {1}", + "downloadgit": "Скачать Git", "neverShowAgain": "Больше не показывать", + "notfound": "Git не найден. УÑтановите Git или укажите путь к нему в параметре 'git.path'.", "updateGit": "Обновить Git", "git20": "У Ð²Ð°Ñ ÑƒÑтановлен Git {0}. Код лучше вÑего работает Ñ Git >= 2." } \ No newline at end of file diff --git a/i18n/rus/extensions/git/package.i18n.json b/i18n/rus/extensions/git/package.i18n.json index bb861a75c0c..dcff3e1c9f0 100644 --- a/i18n/rus/extensions/git/package.i18n.json +++ b/i18n/rus/extensions/git/package.i18n.json @@ -33,8 +33,10 @@ "command.checkout": "Извлечь в...", "command.branch": "Создать ветвь...", "command.deleteBranch": "Удалить ветвь...", + "command.renameBranch": "Переименовать ветвь...", "command.merge": "Объединить ветвь...", "command.createTag": "Создать тег", + "command.fetch": "Получить", "command.pull": "Получить", "command.pullRebase": "Получить (перемеÑтить Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¸Ð· одной ветви в другую)", "command.pullFrom": "Загрузить Ñ...", @@ -42,9 +44,11 @@ "command.pushTo": "Отправить в:", "command.pushWithTags": "Отправить Ñ Ñ‚ÐµÐ³Ð°Ð¼Ð¸", "command.sync": "СинхронизациÑ", + "command.syncRebase": "Ð¡Ð¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ (перемещение изменений из одной ветви в другую)", "command.publish": "Опубликовать ветвь", "command.showOutput": "Показать выходные данные GIT", "command.ignore": "Добавить файл в .gitignore", + "command.stashIncludeUntracked": "СпрÑтать (включить неотÑлеживаемые)", "command.stash": "СпрÑтать", "command.stashPop": "Извлечь ÑпрÑтанное", "command.stashPopLatest": "Извлечь поÑледнее ÑпрÑтанное", @@ -57,6 +61,7 @@ "config.countBadge": "\nУправлÑет Ñчетчиком Git. При указании Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ \"all\" подÑчитываютÑÑ Ð²Ñе изменениÑ, при указании Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ \"tracked\" — только отÑлеживаемые изменениÑ, при указании Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ \"off\" Ñчетчик отключаетÑÑ.", "config.checkoutType": "ОпределÑет типы ветвей, которые выводÑÑ‚ÑÑ Ð¿Ñ€Ð¸ выборе пункта меню \"Извлечь в...\". При указании Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ \"all\" отображаютÑÑ Ð²Ñе ÑÑылки, \"local\" — только локальные ветви, \"tags\" — только теги, а \"remote\" — только удаленные ветви.", "config.ignoreLegacyWarning": "Игнорирует предупреждение об уÑтаревшей верÑии Git", + "config.ignoreMissingGitWarning": "Игнорирует предупреждение об отÑутÑтвии Git", "config.ignoreLimitWarning": "Игнорировать предупреждение, когда в репозитории Ñлишком много изменений", "config.defaultCloneDirectory": "РаÑположение по умолчанию, в которое будет клонирован репозиторий Git", "config.enableSmartCommit": "ЗафикÑировать вÑе Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¸ отÑутÑтвии промежуточных изменений.", diff --git a/i18n/rus/extensions/html/client/out/htmlMain.i18n.json b/i18n/rus/extensions/html/client/out/htmlMain.i18n.json index 364064582bf..27921a772ec 100644 --- a/i18n/rus/extensions/html/client/out/htmlMain.i18n.json +++ b/i18n/rus/extensions/html/client/out/htmlMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "htmlserver.name": "Языковой Ñервер HTML" + "htmlserver.name": "Языковой Ñервер HTML", + "folding.start": "Ðачало Ñворачиваемого региона", + "folding.end": "Окончание Ñворачиваемого региона" } \ No newline at end of file diff --git a/i18n/rus/extensions/markdown/out/commands.i18n.json b/i18n/rus/extensions/markdown/out/commands.i18n.json index 5c5b3690dc6..e2752845d0f 100644 --- a/i18n/rus/extensions/markdown/out/commands.i18n.json +++ b/i18n/rus/extensions/markdown/out/commands.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "previewTitle": "Предварительный проÑмотр {0}", "onPreviewStyleLoadError": "Ðе удалоÑÑŒ загрузить 'markdown.styles': {0}" } \ No newline at end of file diff --git a/i18n/rus/extensions/markdown/out/security.i18n.json b/i18n/rus/extensions/markdown/out/security.i18n.json index 11a39b993e2..17f7b23073a 100644 --- a/i18n/rus/extensions/markdown/out/security.i18n.json +++ b/i18n/rus/extensions/markdown/out/security.i18n.json @@ -11,5 +11,8 @@ "disable.title": "Отключить", "disable.description": "Разрешить вÑе Ñодержимое и выполнение Ñценариев. Ðе рекомендуетÑÑ", "moreInfo.title": "Дополнительные ÑведениÑ", + "enableSecurityWarning.title": "Включить предварительный проÑмотр предупреждений ÑиÑтемы безопаÑноÑти в Ñтой рабочей облаÑти", + "disableSecurityWarning.title": "Отключить предварительный проÑмотр предупреждений ÑиÑтемы безопаÑноÑти в Ñтой рабочей облаÑти", + "toggleSecurityWarning.description": "Ðе влиÑет на уровень безопаÑноÑти Ñодержимого", "preview.showPreviewSecuritySelector.title": "УÑтановите параметры безопаÑноÑти Ð´Ð»Ñ Ð¿Ñ€ÐµÐ´Ð²Ð°Ñ€Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾Ð³Ð¾ проÑмотра Markdown в Ñтой рабочей облаÑти" } \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/package.i18n.json b/i18n/rus/extensions/merge-conflict/package.i18n.json index 209c32b7d11..b792fefd678 100644 --- a/i18n/rus/extensions/merge-conflict/package.i18n.json +++ b/i18n/rus/extensions/merge-conflict/package.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "Объединить конфликт", + "command.accept.all-current": "ПринÑть вÑе текущие", "command.accept.all-incoming": "ПринÑть вÑе входÑщие", "command.accept.all-both": "ПринÑть вÑе входÑщие и текущие", "command.accept.current": "ПринÑть текущее", diff --git a/i18n/rus/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/rus/extensions/typescript/out/features/completionItemProvider.i18n.json index 758fad83856..baf52ec9de3 100644 --- a/i18n/rus/extensions/typescript/out/features/completionItemProvider.i18n.json +++ b/i18n/rus/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "selectCodeAction": "Выберите применÑемое дейÑтвие кода", "acquiringTypingsLabel": "Получение typings...", "acquiringTypingsDetail": "Получение определений typings Ð´Ð»Ñ IntelliSense.", "autoImportLabel": "ÐвтоматичеÑкий импорт из {0}" diff --git a/i18n/rus/extensions/typescript/package.i18n.json b/i18n/rus/extensions/typescript/package.i18n.json index 537a583b5e3..2980026d6d1 100644 --- a/i18n/rus/extensions/typescript/package.i18n.json +++ b/i18n/rus/extensions/typescript/package.i18n.json @@ -39,6 +39,7 @@ "typescript.openTsServerLog.title": "Открыть журнал Ñервера TS", "typescript.restartTsServer": "ПерезапуÑтить Ñервер TS", "typescript.selectTypeScriptVersion.title": "Выберите верÑию TypeScript.", + "typescript.reportStyleChecksAsWarnings": "Отображать ошибки при проверке ÑÑ‚Ð¸Ð»Ñ Ð² виде предупреждений", "jsDocCompletion.enabled": "Включить или отключить JSDoc коментарии", "javascript.implicitProjectConfig.checkJs": "Включает/отключает ÑемантичеÑкую проверку файлов JavaScript. Этот параметр может переопределÑтьÑÑ Ð² файле jsconfig.json или tsconfig.json. ТребуетÑÑ TypeScript 2.3.1 или более поздней верÑии.", "typescript.npm": "Указывает путь к иÑполнÑемому файлу NPM, иÑпользуемому Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑкого Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ñ‚Ð¸Ð¿Ð°. ТребуетÑÑ TypeScript верÑии 2.3.4 или более поздней верÑии.", diff --git a/i18n/rus/src/vs/code/electron-main/main.i18n.json b/i18n/rus/src/vs/code/electron-main/main.i18n.json index 3a698517ea1..1cf3dee66aa 100644 --- a/i18n/rus/src/vs/code/electron-main/main.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/main.i18n.json @@ -4,5 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "secondInstanceNoResponse": "Еще один ÑкземплÑÑ€ {0} запущен, но не отвечает", + "secondInstanceNoResponseDetail": "Закройте вÑе оÑтальные ÑкземплÑры и повторите попытку.", + "secondInstanceAdmin": "Уже запущен второй ÑкземплÑÑ€ {0} от имени админиÑтратора.", + "secondInstanceAdminDetail": "Закройте другой ÑкземплÑÑ€ и повторите попытку.", "close": "&&Закрыть" } \ No newline at end of file diff --git a/i18n/rus/src/vs/code/electron-main/menus.i18n.json b/i18n/rus/src/vs/code/electron-main/menus.i18n.json index 194c4240f25..937574f1898 100644 --- a/i18n/rus/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/menus.i18n.json @@ -22,9 +22,12 @@ "miQuit": "Выйти из {0}", "miNewFile": "&&Ðовый файл", "miOpen": "Открыть...", + "miOpenWorkspace": "Открыть рабочую &&облаÑть...", "miOpenFolder": "Открыть &&папку...", "miOpenFile": "&&Открыть файл...", "miOpenRecent": "Открыть &&поÑледние", + "miSaveWorkspaceAs": "Сохранить рабочую облаÑть как...", + "miAddFolderToWorkspace": "Доб&&авить папку в рабочую облаÑть...", "miSave": "Сохранить", "miSaveAs": "Сохранить &&как...", "miSaveAll": "Сохранить &&вÑе", @@ -154,6 +157,7 @@ "mMergeAllWindows": "Объединить вÑе окна", "miToggleDevTools": "&&Показать/Ñкрыть ÑредÑтва разработчика", "miAccessibilityOptions": "Специальные &&возможноÑти", + "miReportIssue": "Сообщить о &&проблеме", "miWelcome": "&&ПриветÑтвие", "miInteractivePlayground": "&&Ð˜Ð½Ñ‚ÐµÑ€Ð°ÐºÑ‚Ð¸Ð²Ð½Ð°Ñ Ð¿Ð»Ð¾Ñ‰Ð°Ð´ÐºÐ°", "miDocumentation": "&&ДокументациÑ", @@ -180,6 +184,7 @@ "miDownloadingUpdate": "СкачиваетÑÑ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ðµ...", "miInstallingUpdate": "Идет уÑтановка обновлениÑ...", "miCheckForUpdates": "Проверить наличие обновлений...", + "aboutDetail": "ВерÑÐ¸Ñ {0}\nФикÑÐ°Ñ†Ð¸Ñ {1}\nДата {2}\nОболочка {3}\nОтриÑовщик {4}\nУзел {5}\nÐрхитектура {6}", "okButton": "ОК", "copy": "Копировать" } \ No newline at end of file diff --git a/i18n/rus/src/vs/code/node/cliProcessMain.i18n.json b/i18n/rus/src/vs/code/node/cliProcessMain.i18n.json index 89660ffbf41..15ebcfee358 100644 --- a/i18n/rus/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/rus/src/vs/code/node/cliProcessMain.i18n.json @@ -8,6 +8,7 @@ "notInstalled": "РаÑширение \"{0}\" не уÑтановлено.", "useId": "ИÑпользуйте полный идентификатор раÑширениÑ, включающий издателÑ, например: {0}", "successVsixInstall": "РаÑширение \"{0}\" уÑпешно уÑтановлено.", + "cancelVsixInstall": "УÑтановка раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ '{0}' отменена.", "alreadyInstalled": "РаÑширение \"{0}\" уже уÑтановлено.", "foundExtension": "Ðайдено \"{0}\" в Marketplace.", "installing": "УÑтановка...", diff --git a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json index 83b7b87dd66..f265f8d9eaa 100644 --- a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -10,9 +10,16 @@ "fontSize": "УправлÑет размером шрифта в пикÑелÑÑ….", "lineHeight": "УправлÑет выÑотой Ñтрок. Укажите 0 Ð´Ð»Ñ Ð²Ñ‹Ñ‡Ð¸ÑÐ»ÐµÐ½Ð¸Ñ Ð²Ñ‹Ñоты Ñтроки по размеру шрифта.", "letterSpacing": "УправлÑет интервалом между буквами в пикÑелÑÑ….", + "lineNumbers.off": "Ðомера Ñтрок не отображаютÑÑ.", + "lineNumbers.on": "ОтображаютÑÑ Ð°Ð±Ñолютные номера Ñтрок.", + "lineNumbers.relative": "Отображаемые номера Ñтрок вычиÑлÑÑŽÑ‚ÑÑ ÐºÐ°Ðº раÑÑтоÑние в Ñтроках до Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ ÐºÑƒÑ€Ñора.", + "lineNumbers.interval": "Ðомера Ñтрок отображаютÑÑ ÐºÐ°Ð¶Ð´Ñ‹Ðµ 10 Ñтрок.", + "lineNumbers": "УправлÑет отображением номеров Ñтрок. Возможные значениÑ: \"on\", \"off\" и \"relative\".", "rulers": "Отображать вертикальные линейки поÑле определенного чиÑла моноширинных Ñимволов. Ð”Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð½ÐµÑкольких линеек укажите неÑколько значений. ЕÑли не указано ни одного значениÑ, вертикальные линейки отображатьÑÑ Ð½Ðµ будут.", "wordSeparators": "Символы, которые будут иÑпользоватьÑÑ ÐºÐ°Ðº разделители Ñлов при выполнении навигации или других операций, ÑвÑзанных Ñо Ñловами.", + "tabSize": "ЧиÑло пробелов в табулÑции. Этот параметр переопределÑетÑÑ Ð½Ð° оÑнове Ñодержимого файла, еÑли уÑтановлен параметр \"editor.detectIndentation\".", "tabSize.errorMessage": "ОжидаетÑÑ Ñ‡Ð¸Ñло. Обратите внимание, что значение auto заменено параметром editor.detectIndentation.", + "insertSpaces": "Ð’ÑтавлÑть пробелы при нажатии клавиши TAB. Этот параметр переопределÑетÑÑ Ð½Ð° оÑнове Ñодержимого файла, еÑли уÑтановлен параметр \"editor.detectIndentation\". ", "insertSpaces.errorMessage": "ОжидаетÑÑ Ð»Ð¾Ð³Ð¸Ñ‡ÐµÑкое значение. Обратите внимание, что значение auto заменено параметром editor.detectIndentation.", "detectIndentation": "При открытии файла editor.tabSize и editor.insertSpaces будут определÑтьÑÑ Ð½Ð° оÑнове Ñодержимого файла.", "roundedSelection": "ОпределÑет, будут ли Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¸Ð¼ÐµÑ‚ÑŒ Ñкругленные углы.", @@ -24,6 +31,7 @@ "minimap.maxColumn": "Ограничивает ширину мини-карты Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ‡Ð¸Ñла Ñтолбцов не больше определенного.", "find.seedSearchStringFromSelection": "ОпределÑет, можно ли передать Ñтроку поиÑка в мини-приложение поиÑка из текÑта, выделенного в редакторе", "find.autoFindInSelection": "ОпределÑет, будет ли ÑнÑÑ‚ флажок \"ПоиÑк в выделенном\", когда в редакторе выбрано неÑколько Ñимволов или Ñтрок текÑта", + "find.globalFindClipboard": "ОпределÑет, должно ли мини-приложение поиÑка Ñчитывать или изменÑть общий буфер обмена поиÑка в macOS", "wordWrap.off": "Строки не будут переноÑитьÑÑ Ð½Ð¸ÐºÐ¾Ð³Ð´Ð°.", "wordWrap.on": "Строки будут переноÑитьÑÑ Ð¿Ð¾ ширине окна проÑмотра.", "wordWrap.wordWrapColumn": "Строки будут переноÑитьÑÑ Ð¿Ð¾ \"editor.wordWrapColumn\".", diff --git a/i18n/rus/src/vs/editor/contrib/folding/folding.i18n.json b/i18n/rus/src/vs/editor/contrib/folding/folding.i18n.json index 5fe065ae0dc..affa88cd5b8 100644 --- a/i18n/rus/src/vs/editor/contrib/folding/folding.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/folding/folding.i18n.json @@ -8,6 +8,9 @@ "unFoldRecursivelyAction.label": "Развернуть рекурÑивно", "foldAction.label": "Свернуть", "foldRecursivelyAction.label": "Свернуть рекурÑивно", + "foldAllBlockComments.label": "Свернуть вÑе блоки комментариев", + "foldAllMarkerRegions.label": "Свернуть вÑе регионы", + "unfoldAllMarkerRegions.label": "Развернуть вÑе регионы", "foldAllAction.label": "Свернуть вÑе", "unfoldAllAction.label": "Развернуть вÑе", "foldLevelAction.label": "Уровень папки {0}" diff --git a/i18n/rus/src/vs/platform/environment/node/argv.i18n.json b/i18n/rus/src/vs/platform/environment/node/argv.i18n.json index eb6770aa30b..7314aa06087 100644 --- a/i18n/rus/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/rus/src/vs/platform/environment/node/argv.i18n.json @@ -12,8 +12,11 @@ "newWindow": "Принудительно запуÑтить новый ÑкземплÑÑ€ Code.", "performance": "ЗапуÑтите Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð½Ð¾Ð¹ командой \"Developer: Startup Performance\".", "prof-startup": "ЗапуÑтить профилировщик ЦП при запуÑке", + "inspect-extensions": "Разрешить отладку и профилирование раÑширений. Проверьте URI Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð¸Ð½Ñтрументов разработчика.", + "inspect-brk-extensions": "Разрешить отладку и профилирование раÑширений, когда узел раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¸Ð¾Ñтановлен поÑле запуÑка. Проверьте URI Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð¸Ð½Ñтрументов разработчика. ", "reuseWindow": "Принудительно открыть файл или папку в поÑледнем активном окне.", "userDataDir": "Указывает каталог, в котором хранÑÑ‚ÑÑ Ð´Ð°Ð½Ð½Ñ‹Ðµ пользователей, иÑпользуетÑÑ Ð² Ñлучае Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¾Ñ‚ имени привилегированного пользователÑ.", + "log": "ИÑпользуемый уровень Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ð°. Значение по умолчанию — \"info\". ДопуÑтимые значениÑ: \"critical\", \"error\", \"warn\", \"info\", \"debug\", \"trace\", \"off\".", "verbose": "Печать подробного вывода (подразумевает иÑпользование параметра \"--wait\").", "wait": "ДождатьÑÑ Ð·Ð°ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð² перед возвратом.", "extensionHomePath": "Задайте корневой путь Ð´Ð»Ñ Ñ€Ð°Ñширений.", @@ -24,6 +27,7 @@ "experimentalApis": "Включает предложенные функции API Ð´Ð»Ñ Ñ€Ð°ÑширениÑ.", "disableExtensions": "Отключить вÑе уÑтановленные раÑширениÑ.", "disableGPU": "Отключить аппаратное уÑкорение GPU.", + "status": "Выводить ÑÐ²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¾Ð± иÑпользовании процеÑÑа и диагноÑтичеÑкую информацию.", "version": "Печать верÑии.", "help": "РаÑпечатать данные об иÑпользовании.", "usage": "ИÑпользование", diff --git a/i18n/rus/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/rus/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json index 8b6ad71cd4e..c704c03956d 100644 --- a/i18n/rus/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json +++ b/i18n/rus/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "notCompatibleDownload": "Ðе удаетÑÑ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÑŒ Ñкачивание, так как не найдено раÑширение, ÑовмеÑтимое Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ¹ верÑией VS Code '{0}'. " +} \ No newline at end of file diff --git a/i18n/rus/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/rus/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index 44292b6a1de..c25a9a85ff7 100644 --- a/i18n/rus/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/rus/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -6,7 +6,13 @@ { "invalidManifest": "ÐедопуÑтимое раÑширение: package.json не ÑвлÑетÑÑ Ñ„Ð°Ð¹Ð»Ð¾Ð¼ JSON.", "restartCodeLocal": "ПерезапуÑтите код перед переуÑтановкой {0}.", + "installingOutdatedExtension": "Уже уÑтановлена более Ð½Ð¾Ð²Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ñтого раÑширениÑ. Ð’Ñ‹ хотите переопределить ее более Ñтарой верÑией?", + "override": "Переопределить", "cancel": "Отмена", + "notFoundCompatible": "Ðе удаетÑÑ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÑŒ уÑтановку, так как не найдено раÑширение '{0}', ÑовмеÑтимое Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ¹ верÑией VS Code '{1}'.", + "quitCode": "Ðе удаетÑÑ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÑŒ уÑтановку, так как уÑтаревший ÑкземплÑÑ€ раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ ÐµÑ‰Ðµ запущен. Закройте и Ñнова откройте VS Code, затем запуÑтите уÑтановку повторно.", + "exitCode": "Ðе удаетÑÑ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÑŒ уÑтановку, так как уÑтаревший ÑкземплÑÑ€ раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ ÐµÑ‰Ðµ запущен. Закройте и Ñнова откройте VS Code, затем запуÑтите уÑтановку повторно. ", + "notFoundCompatibleDependency": "Ðе удаетÑÑ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÑŒ уÑтановку, так как не найдено завиÑимое раÑширение '{0}', ÑовмеÑтимое Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ¹ верÑией VS Code '{1}'. ", "uninstallDependeciesConfirmation": "Ð’Ñ‹ хотите удалить \"{0}\" отдельно или вмеÑте Ñ Ð·Ð°Ð²Ð¸ÑимоÑÑ‚Ñми?", "uninstallOnly": "Только", "uninstallAll": "Ð’Ñе", diff --git a/i18n/rus/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/rus/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index c5f432f019c..b6fede714dc 100644 --- a/i18n/rus/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/rus/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -17,6 +17,8 @@ "vscode.extension.activationEvents.onLanguage": "Событие активации выдаетÑÑ ÐºÐ°Ð¶Ð´Ñ‹Ð¹ раз, когда открываетÑÑ Ñ„Ð°Ð¹Ð», который разрешаетÑÑ Ðº указанному Ñзыку.", "vscode.extension.activationEvents.onCommand": "Событие активации выдаетÑÑ ÐºÐ°Ð¶Ð´Ñ‹Ð¹ раз при вызове указанной команды.", "vscode.extension.activationEvents.onDebug": "Событие активации выдаетÑÑ ÐºÐ°Ð¶Ð´Ñ‹Ð¹ раз, когда пользователь запуÑкает отладку или ÑобираетÑÑ ÑƒÑтановить конфигурацию отладки.", + "vscode.extension.activationEvents.onDebugInitialConfigurations": "Событие активации выдаетÑÑ ÐºÐ°Ð¶Ð´Ñ‹Ð¹ раз, когда необходимо Ñоздать файл \"launch.json\" (и вызывать вÑе методы provideDebugConfigurations).", + "vscode.extension.activationEvents.onDebugResolve": "Событие активации выдаетÑÑ ÐºÐ°Ð¶Ð´Ñ‹Ð¹ раз при запуÑке ÑеанÑа отладки указанного типа (и при вызове ÑоответÑтвующего метода resolveDebugConfiguration).", "vscode.extension.activationEvents.workspaceContains": "Событие активации выдаетÑÑ ÐºÐ°Ð¶Ð´Ñ‹Ð¹ раз при открытии папки, Ñодержащей по крайней мере один файл, который ÑоответÑтвует указанной Ñтандартной маÑке.", "vscode.extension.activationEvents.onView": "Событие активации выдаетÑÑ ÐºÐ°Ð¶Ð´Ñ‹Ð¹ раз при развертывании указанного окна.", "vscode.extension.activationEvents.star": "Событие активации выдаетÑÑ Ð¿Ñ€Ð¸ запуÑке VS Code. Ð”Ð»Ñ ÑƒÐ´Ð¾Ð±Ñтва Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¸Ñпользуйте Ñто Ñобытие в Ñвоем раÑширении только в том Ñлучае, еÑли другие ÑÐ¾Ñ‡ÐµÑ‚Ð°Ð½Ð¸Ñ Ñобытий не подходÑÑ‚.", diff --git a/i18n/rus/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json b/i18n/rus/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json index 305c47b7195..d46e47e4591 100644 --- a/i18n/rus/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/actions/toggleTabsVisibility.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "toggleTabs": "Изменить видимоÑть вкладки", "view": "ПроÑмотр" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json index 60289bc43b8..1556822923d 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/compositebar/compositeBarActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "largeNumberBadge": "10000 и выше", "badgeTitle": "{0} - {1}", "additionalViews": "Дополнительные предÑтавлениÑ", "numberBadge": "{0} ({1})", diff --git a/i18n/rus/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json index 769c14c870b..32e566863c8 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -6,6 +6,7 @@ { "editorCommand.activeEditorMove.description": "Перемещение активного редактора по вкладкам или группам", "editorCommand.activeEditorMove.arg.name": "Ðргумент Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð°ÐºÑ‚Ð¸Ð²Ð½Ð¾Ð³Ð¾ редактора", + "editorCommand.activeEditorMove.arg.description": "СвойÑтва аргумента:\n\t* 'to': Ñтроковое значение, указывающее направление перемещениÑ.\n\t* 'by': Ñтроковое значение, указывающее единицу Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ (вкладка или группа).\n\t* 'value': чиÑловое значение, указывающее количеÑтво позиций Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ абÑолютную позицию Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ.", "commandDeprecated": "Команда **{0}** удалена. ВмеÑто нее можно иÑпользовать **{1}**", "openKeybindings": "ÐаÑтройка Ñочетаний клавиш" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index b72594a677c..eabbcf197e7 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -52,5 +52,6 @@ "screenReaderDetectedExplanation.question": "Ð’Ñ‹ иÑпользуете ÑредÑтво Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ñ Ñкрана в VS Code?", "screenReaderDetectedExplanation.answerYes": "Да", "screenReaderDetectedExplanation.answerNo": "Ðет", - "screenReaderDetectedExplanation.body1": "Теперь Ñреда VS Code оптимизирована Ð´Ð»Ñ ÑредÑтва Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ñ Ñкрана." + "screenReaderDetectedExplanation.body1": "Теперь Ñреда VS Code оптимизирована Ð´Ð»Ñ ÑредÑтва Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ñ Ñкрана.", + "screenReaderDetectedExplanation.body2": "Ðекоторые функции редактора (например, Ð¿ÐµÑ€ÐµÐ½Ð¾Ñ Ñлов, Ñворачивание и Ñ‚.д.) будут работать по-другому." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json index 0af36ba16b2..2380d05741c 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json @@ -53,8 +53,20 @@ "doc": "СпиÑок поддерживаемых Ñзыков Ñм. в {0}.", "restart": "Ð”Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñ‚Ñ€ÐµÐ±ÑƒÐµÑ‚ÑÑ Ð¿ÐµÑ€ÐµÐ·Ð°Ð¿ÑƒÑк VSCode.", "fail.createSettings": "Ðевозможно Ñоздать \"{0}\" ({1}).", + "openLogsFolder": "Открыть папку журналов", + "showLogs": "Показать журналы...", + "mainProcess": "Главный", + "sharedProcess": "Общий", + "rendererProcess": "ОтриÑовщик", + "extensionHost": "Узел раÑширениÑ", + "selectProcess": "Выберите процеÑÑ", + "setLogLevel": "УÑтановите уровень Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ð°", + "trace": "ТраÑÑировка", "debug": "Отладка", "info": "СведениÑ", "warn": "Предупреждение", - "err": "Ошибка" + "err": "Ошибка", + "critical": "КритичеÑкий", + "off": "Отключено", + "selectLogLevel": "УÑтановите уровень Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ð°" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json index fc3f719ff28..f0c8c83bedf 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -16,6 +16,7 @@ "workbench.editor.labelFormat.long": "Отображать Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° и абÑолютный путь.", "tabDescription": "ОпределÑет формат метки редактора. Изменив Ñтот параметр, можно Ñделать более наглÑдным раÑположение файла:\n- короткий формат: 'parent'\n- Ñредний формат: 'workspace/src/parent'\n- длинный формат: '/home/user/workspace/src/parent'\n- по умолчанию: '.../parent', еÑли Ð´Ñ€ÑƒÐ³Ð°Ñ Ð²ÐºÐ»Ð°Ð´ÐºÐ° имеет такой же заголовок или отноÑительный путь к рабочей облаÑти, еÑли вкладки отключены", "editorTabCloseButton": "ОпределÑет положение кнопок Ð·Ð°ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ð²ÐºÐ»Ð°Ð´Ð¾Ðº редактора или отключает их, еÑли задано значение off.", + "tabSizing": "УправлÑет размером вкладок редактора. При уÑтановке Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ \"fit\" вкладки будут оÑтаватьÑÑ Ð´Ð¾Ñтаточно большими, чтобы в них можно было размеÑтить полную метку редактора. При уÑтановке Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ \"shrink\" вкладки будут ÑжиматьÑÑ, еÑли доÑтупного меÑта на Ñкране недоÑтаточно. Это позволÑет отображать вÑе вкладки в одном окне.", "showIcons": "ОпределÑет, должны ли открытые редакторы отображатьÑÑ Ñо значком. Требует включить тему значков.", "enablePreview": "ОпределÑет, отображаютÑÑ Ð»Ð¸ открытые редакторы в режиме предварительного проÑмотра. Редакторы в режиме предварительного проÑмотра можно иÑпользовать, пока они открыты (например, Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ двойного щелчка мыши или изменениÑ). ТекÑÑ‚ в таких редакторах отображаетÑÑ ÐºÑƒÑ€Ñивом.", "enablePreviewFromQuickOpen": "ОпределÑет, отображаютÑÑ Ð»Ð¸ редакторы из Quick Open в режиме предварительного проÑмотра. Редакторы в режиме предварительного проÑмотра повторно иÑпользуютÑÑ Ð´Ð¾ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ (например, Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ двойного щелчка или изменениÑ).", @@ -29,6 +30,7 @@ "statusBarVisibility": "УправлÑет видимоÑтью Ñтроки ÑоÑтоÑÐ½Ð¸Ñ Ð² нижней чаÑти рабочего меÑта.", "activityBarVisibility": "УправлÑет видимоÑтью панели дейÑтвий на рабочем меÑте.", "closeOnFileDelete": "ОпределÑет, Ñледует ли автоматичеÑки закрывать редакторы, когда отображаемый в них файл удален или переименован другим процеÑÑом. При отключении Ñтой функции редактор оÑтаетÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ñ‹Ð¼ в качеÑтве черновика. Обратите внимание, что при удалении из Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¾Ñ€ закрываетÑÑ Ð²Ñегда и что файлы черновиков никогда не закрываютÑÑ Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ….", + "enableNaturalLanguageSettingsSearch": "ОпределÑет, Ñледует ли включить режим поиÑка еÑтеÑтвенного Ñзыка Ð´Ð»Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð².", "fontAliasing": "УправлÑет методом ÑÐ³Ð»Ð°Ð¶Ð¸Ð²Ð°Ð½Ð¸Ñ ÑˆÑ€Ð¸Ñ„Ñ‚Ð¾Ð² в рабочей облаÑти.-по умолчанию: ÑубпикÑельное Ñглаживание шрифтов; позволит добитьÑÑ Ð¼Ð°ÐºÑимальной четкоÑти текÑта на большинÑтве диÑплеев за иÑключением Retina - Ñглаживание: Ñглаживание шрифтов на уровне пикÑелей, в отличие от ÑубпикÑельного ÑглаживаниÑ; позволит Ñделать шрифт более Ñветлым в целом - нет: Ñглаживание шрифтов отключено; текÑÑ‚ будет отображатьÑÑ Ñ Ð½ÐµÑ€Ð¾Ð²Ð½Ñ‹Ð¼Ð¸ оÑтрыми краÑми ", "workbench.fontAliasing.default": "СубпикÑельное Ñглаживание шрифтов; позволит добитьÑÑ Ð¼Ð°ÐºÑимальной четкоÑти текÑта на большинÑтве диÑплеев за иÑключением Retina.", "workbench.fontAliasing.antialiased": "Сглаживание шрифтов на уровне пикÑелей, в отличие от ÑубпикÑельного ÑглаживаниÑ. Может Ñделать шрифт Ñветлее в целом.", diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index dcf24056a01..67f670f43d4 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -20,5 +20,10 @@ "openExplorerOnEnd": "ÐвтоматичеÑки открывать предÑтавление Ð¾Ð±Ð¾Ð·Ñ€ÐµÐ²Ð°Ñ‚ÐµÐ»Ñ Ð² конце ÑеанÑа отладки", "inlineValues": "Показывать Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ñ… в редакторе во Ð²Ñ€ÐµÐ¼Ñ Ð¾Ñ‚Ð»Ð°Ð´ÐºÐ¸", "hideActionBar": "ОпределÑет, Ñледует ли Ñкрыть вÑплывающую панель дейÑтвий отладки.", + "never": "Ðикогда не отображать отладку в Ñтроке ÑоÑтоÑниÑ", + "always": "Ð’Ñегда отображать отладку в Ñтроке ÑоÑтоÑниÑ", + "onFirstSessionStart": "Отображать отладку в Ñтроке ÑоÑтоÑÐ½Ð¸Ñ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ поÑле первого запуÑка отладки", + "showInStatusBar": "ОпределÑет видимоÑть Ð´Ð»Ñ Ñтроки ÑоÑтоÑÐ½Ð¸Ñ Ð¾Ñ‚Ð»Ð°Ð´ÐºÐ¸", + "openDebug": "ОпределÑет, Ñледует ли открыть окно проÑмотра отладки в начале ÑеанÑа отладки.", "launch": "Ð“Ð»Ð¾Ð±Ð°Ð»ÑŒÐ½Ð°Ñ ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð·Ð°Ð¿ÑƒÑка отладки. Должна иÑпользоватьÑÑ Ð² качеÑтве альтернативы Ð´Ð»Ñ ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ð¸ \"launch.json\", ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑвлÑетÑÑ Ð¾Ð±Ñ‰ÐµÐ¹ Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‡Ð¸Ñ… проÑтранÑтв" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 1f995f9f60b..4fb2a6b6681 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,6 +11,8 @@ "breakpointAdded": "Добавлена точка оÑтанова: Ñтрока {0}, файл {1}", "breakpointRemoved": "Удалена точка оÑтанова: Ñтрока {0}, файл {1}", "compoundMustHaveConfigurations": "Ð”Ð»Ñ ÑоÑтавного Ñлемента должен быть задан атрибут configurations Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка неÑкольких конфигураций.", + "configMissing": "ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ \"{0}\" отÑутÑтвует в launch.json.", + "launchJsonDoesNotExist": "Файл \"launch.json\" не ÑущеÑтвует.", "debugRequestNotSupported": "Ðтрибут '{0}' имеет неподдерживаемое значение '{1}' в выбранной конфигурации отладки.", "debugRequesMissing": "Ð’ выбранной конфигурации отладки отÑутÑтвует атрибут '{0}'.", "debugTypeNotSupported": "ÐаÑтроенный тип отладки \"{0}\" не поддерживаетÑÑ.", diff --git a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 00a5bd00b41..3bc095205a3 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -6,9 +6,11 @@ { "name": "Ð˜Ð¼Ñ Ñ€Ð°ÑширениÑ", "extension id": "Идентификатор раÑширений", + "preview": "Предварительный проÑмотр", "publisher": "Ð˜Ð¼Ñ Ð¸Ð·Ð´Ð°Ñ‚ÐµÐ»Ñ", "install count": "ЧиÑло уÑтановок", "rating": "Оценка", + "repository": "Репозиторий", "license": "ЛицензиÑ", "details": "ПодробноÑти", "contributions": "Вклады", diff --git a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json index 8b6ad71cd4e..f52c6f67cb9 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ratedByUsers": "Оценено пользователÑми: {0} ", + "ratedBySingleUser": "Оценено 1 пользователем" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 8b6ad71cd4e..4de94d4af23 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectAndStartDebug": "Щелкните здеÑÑŒ, чтобы оÑтановить профилирование." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index ecf99790051..31eb35b5dce 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -7,9 +7,11 @@ "extensionsCommands": "Управление раÑширениÑми", "galleryExtensionsCommands": "УÑтановить раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ð¸Ð· коллекции", "extension": "РаÑширение", + "runtimeExtension": "Запущенные раÑширениÑ", "extensions": "РаÑширениÑ", "view": "ПроÑмотреть", "developer": "Разработчик", "extensionsConfigurationTitle": "РаÑширениÑ", - "extensionsAutoUpdate": "ÐвтоматичеÑки обновлÑть раÑширениÑ" + "extensionsAutoUpdate": "ÐвтоматичеÑки обновлÑть раÑширениÑ", + "extensionsIgnoreRecommendations": "ЕÑли Ñтот параметр уÑтановлен в значение true, Ð¾Ð¿Ð¾Ð²ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¾ рекомендациÑÑ… по раÑширениÑм переÑтанут отображатьÑÑ." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json index d813ae7a27e..ef7b1463fd4 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -4,5 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "reportExtensionIssue": "Сообщить об ошибке" + "starActivation": "ÐктивируетÑÑ Ð¿Ñ€Ð¸ запуÑке", + "workspaceContainsGlobActivation": "ÐктивируетÑÑ, так как ÑоответÑтвующий файл {0} отÑутÑтвует в вашей рабочей облаÑти", + "workspaceContainsFileActivation": "ÐктивируетÑÑ, так как файл {0} отÑутÑтвует в вашей рабочей облаÑти", + "languageActivation": "ÐктивируетÑÑ, так как был открыт файл {0}", + "workspaceGenericActivation": "ÐктивируетÑÑ Ð¿Ñ€Ð¸ {0}", + "errors": "Ðеобработанных ошибок: {0}", + "extensionsInputName": "Запущенные раÑширениÑ", + "showRuntimeExtensions": "Показать запущенные раÑширениÑ", + "reportExtensionIssue": "Сообщить об ошибке", + "extensionHostProfileStart": "ЗапуÑтить профиль узла раÑширениÑ", + "extensionHostProfileStop": "ОÑтановить профиль узла раÑширениÑ", + "saveExtensionHostProfile": "Сохранить профиль узла раÑширениÑ" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json index c601c781bde..8e87ab6930a 100644 --- a/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -46,6 +46,7 @@ "saveAs": "Сохранить как...", "saveAll": "Сохранить вÑе", "saveAllInGroup": "Сохранить вÑе в группе", + "saveFiles": "Сохранить вÑе файлы", "revert": "Отменить Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² файле", "focusOpenEditors": "Ð¤Ð¾ÐºÑƒÑ Ð½Ð° предÑтавлении открытых редакторов", "focusFilesExplorer": "Ð¤Ð¾ÐºÑƒÑ Ð½Ð° проводнике", @@ -68,5 +69,7 @@ "invalidFileNameError": "Ð˜Ð¼Ñ **{0}** недопуÑтимо Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð° или папки. Выберите другое имÑ.", "filePathTooLongError": "Из-за иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¸Ð¼ÐµÐ½Ð¸ **{0}** путь Ñлишком длинный. Выберите более короткое имÑ.", "compareWithSaved": "Сравнить активный файл Ñ Ñохраненным", - "modifiedLabel": "{0} (на диÑке) ↔ {1}" + "modifiedLabel": "{0} (на диÑке) ↔ {1}", + "compareWithClipboard": "Сравнить активный файл Ñ Ð±ÑƒÑ„ÐµÑ€Ð¾Ð¼ обмена", + "clipboardComparisonLabel": "Буфер обмена ↔ {0}" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json index 5c9b67b2669..82dd74c7e2d 100644 --- a/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/emptyView.i18n.json @@ -6,6 +6,8 @@ { "noWorkspace": "Ðет открытой папки", "explorerSection": "Раздел проводника", + "noWorkspaceHelp": "Ð’Ñ‹ еще не добавили папку в рабочую облаÑть.", + "addFolder": "Добавить папку", "noFolderHelp": "Ð’Ñ‹ еще не открыли папку.", "openFolder": "Открыть папку" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json index 620852a6f18..1aa57ff69b5 100644 --- a/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -6,6 +6,8 @@ { "fileInputAriaLabel": "Введите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°. Ðажмите клавишу ВВОД, чтобы подтвердить введенные данные, или ESCAPE Ð´Ð»Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ñ‹.", "filesExplorerViewerAriaLabel": "{0}, Проводник", + "dropFolders": "Ð’Ñ‹ хотите дейÑтвительно добавить папки в Ñту рабочую облаÑть?", + "dropFolder": "Ð’Ñ‹ хотите дейÑтвительно добавить папку в Ñту рабочую облаÑть?", "addFolders": "&&Добавить папки", "addFolder": "&&Добавить папку", "confirmMove": "Ð’Ñ‹ дейÑтвительно хотите перемеÑтить '{0}'?", diff --git a/i18n/rus/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json b/i18n/rus/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json index 8b6ad71cd4e..55325cd6d49 100644 --- a/i18n/rus/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/markers/browser/markersPanel.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "totalProblems": "Ð’Ñего проблем: {0}", + "filteredProblems": "Показано проблем: {0} из {1}" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/rus/src/vs/workbench/parts/markers/common/messages.i18n.json index 2729294f21e..4a0ebeccf87 100644 --- a/i18n/rus/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -6,6 +6,7 @@ { "viewCategory": "ПроÑмотреть", "problems.view.toggle.label": "Показать/Ñкрыть проблемы", + "problems.view.focus.label": "Проблемы Ñ Ñ„Ð¾ÐºÑƒÑом", "problems.panel.configuration.title": "ПредÑтавление \"Проблемы\"", "problems.panel.configuration.autoreveal": "ОпределÑет, Ñледует ли предÑтавлению \"Проблемы\" отображать файлы при их открытии", "markers.panel.title.problems": "Проблемы", diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 209030a10b2..56bc0ec3ec3 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "defineKeybinding.initial": "Ðажмите нужное Ñочетание клавиш, а затем клавишу ВВОД.", "defineKeybinding.chordsTo": "Ðккорд длÑ" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index db8d5850260..3853973af14 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "openRawDefaultSettings": "Открыть иÑходные параметры по умолчанию", "openGlobalSettings": "Открыть пользовательÑкие параметры", "openGlobalKeybindings": "Открыть ÑÐ¾Ñ‡ÐµÑ‚Ð°Ð½Ð¸Ñ ÐºÐ»Ð°Ð²Ð¸Ñˆ", "openGlobalKeybindingsFile": "Открыть файл Ñочетаний клавиш", diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json index ef7dc4d8783..cdba5fc34b2 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -4,9 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "defaultSettingsFuzzyPrompt": "Попробуйте режим поиÑка еÑтеÑтвенного Ñзыка!", "defaultSettings": "Чтобы переопределить параметры по умолчанию, укажите Ñвои параметры в облаÑти Ñправа.", "noSettingsFound": "Параметры не найдены.", "settingsSwitcherBarAriaLabel": "Переключатель параметров", "userSettings": "Параметры пользователÑ", - "workspaceSettings": "Параметры рабочей облаÑти" + "workspaceSettings": "Параметры рабочей облаÑти", + "folderSettings": "Параметры папок", + "enableFuzzySearch": "Включить режим поиÑка еÑтеÑтвенного Ñзыка" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/rus/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json index cd29f7f88b8..a1365d40ac3 100644 --- a/i18n/rus/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "defaultLabel": "ввод" + "defaultLabel": "ввод", + "useExcludesAndIgnoreFilesDescription": "ИÑпользовать параметры иÑÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¸ игнорировать файлы" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json b/i18n/rus/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json index 8b6ad71cd4e..576dd7ba274 100644 --- a/i18n/rus/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/search/electron-browser/searchActions.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "findInFolder": "Ðайти в папке...", + "findInWorkspace": "Ðайти в рабочей облаÑти..." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 2cba25f0f5e..11d41b01847 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -8,6 +8,7 @@ "ConfigureTaskRunnerAction.label": "ÐаÑтроить задачу", "CloseMessageAction.label": "Закрыть", "problems": "Проблемы", + "building": "Сборка...", "manyMarkers": "99+", "runningTasks": "Показать выполнÑемые задачи", "tasks": "Задачи", @@ -50,6 +51,7 @@ "TaslService.noEntryToRun": "Задача Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка не найдена. ÐаÑтройте задачи...", "TaskService.fetchingBuildTasks": "Получение задач Ñборки...", "TaskService.pickBuildTask": "Выберите задачу Ñборки Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка", + "TaskService.noBuildTask": "Задача Ñборки Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка отÑутÑтвует. ÐаÑтройте задачи Ñборки...", "TaskService.fetchingTestTasks": "Получение задач теÑтированиÑ...", "TaskService.pickTestTask": "Выберите задачу теÑÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка", "TaskService.noTestTaskTerminal": "ТеÑÑ‚Ð¾Ð²Ð°Ñ Ð·Ð°Ð´Ð°Ñ‡Ð° Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка не найдена. ÐаÑтройте задачи...", diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 05102c96f17..2249170ee87 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -7,6 +7,7 @@ "TerminalTaskSystem.unknownError": "При выполнении задачи произошла неизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°. ПодробноÑти Ñм. в журнале выходных данных задач.", "dependencyFailed": "Ðе удалоÑÑŒ разрешить завиÑимую задачу '{0}' в папке рабочей облаÑти '{1}'", "TerminalTaskSystem.terminalName": "Задача — {0}", + "closeTerminal": "Ðажмите любую клавишу, чтобы закрыть терминал.", "reuseTerminal": "Терминал будет повторно иÑпользоватьÑÑ Ð·Ð°Ð´Ð°Ñ‡Ð°Ð¼Ð¸. Чтобы закрыть его, нажмите любую клавишу.", "TerminalTaskSystem": "Ðевозможно выполнить команду оболочки на диÑке UNC.", "unkownProblemMatcher": "Ðе удаетÑÑ Ñ€Ð°Ð·Ñ€ÐµÑˆÐ¸Ñ‚ÑŒ ÑопоÑтавитель проблем {0}. СопоÑтавитель будет проигнорирован" diff --git a/i18n/rus/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json index 1b0a682834e..5f308b15ff2 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -14,6 +14,8 @@ "ConfigurationParser.noTypeDefinition": "Ошибка: тип задачи '{0}' не зарегиÑтрирован. Возможно, вы не уÑтановили раÑширение, которое предоÑтавлÑет ÑоответÑтвующий поÑтавщик задач.", "ConfigurationParser.missingRequiredProperty": "Ошибка: в конфигурации задачи '{0}' отÑутÑтвует необходимое ÑвойÑтво '{1}'. ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð·Ð°Ð´Ð°Ñ‡Ð¸ будет проигнорирована.", "ConfigurationParser.notCustom": "Ошибка: задачи не объÑвлены в качеÑтве пользовательÑкой задачи. ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð±ÑƒÐ´ÐµÑ‚ проигнорирована.\n{0}\n", + "ConfigurationParser.noTaskName": "Ошибка: в задаче должно быть указано ÑвойÑтво метки. Задача будет проигнорирована.\n{0}\n", + "taskConfiguration.shellArgs": "Предупреждение: задача \"{0}\" ÑвлÑетÑÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð¾Ð¹ оболочки, и один из ее аргументов Ñодержит пробелы без escape-поÑледовательноÑти. Чтобы обеÑпечить правильную раÑÑтановку кавычек в командной Ñтроке, объедините аргументы в команде.", "taskConfiguration.noCommandOrDependsOn": "Ошибка: в задаче \"{0}\" не указаны ни команда, ни ÑвойÑтво dependsOn. Задача будет проигнорирована. Определение задачи:\n{1}", "taskConfiguration.noCommand": "Ошибка: задача \"{0}\" не определÑет команду. Задача будет игнорироватьÑÑ. Ее определение:\n{1}", "TaskParse.noOsSpecificGlobalTasks": "ВерÑÐ¸Ñ Ð·Ð°Ð´Ð°Ñ‡ 2.0.0 не поддерживает глобальные задачи Ð´Ð»Ñ ÐºÐ¾Ð½ÐºÑ€ÐµÑ‚Ð½Ñ‹Ñ… ОС. Преобразуйте их в задачи Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ команд Ð´Ð»Ñ ÐºÐ¾Ð½ÐºÑ€ÐµÑ‚Ð½Ñ‹Ñ… ОС.\nЗатронутые задачи: {0}" diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index b8da8b233eb..045380be606 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.rightClickCopyPaste": "ЕÑли задано, блокирует отображение контекÑтного меню при щелчке правой кнопкой мыши в терминале. ВмеÑто Ñтого будет выполнÑтьÑÑ ÐºÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ðµ выбранного Ñлемента и вÑтавка в облаÑть, в которой нет выбранных Ñлементов.", "terminal.integrated.fontFamily": "ОпределÑет ÑемейÑтво шрифтов терминала, значение по умолчанию — editor.fontFamily.", "terminal.integrated.fontSize": "ОпределÑет размер шрифта (в пикÑелÑÑ…) Ð´Ð»Ñ Ñ‚ÐµÑ€Ð¼Ð¸Ð½Ð°Ð»Ð°.", + "terminal.integrated.lineHeight": "ОпределÑет выÑоту Ñтроки терминала; Ñто чиÑло умножаетÑÑ Ð½Ð° размер шрифта терминала, что дает фактичеÑкую выÑоту Ñтроки в пикÑелÑÑ….", "terminal.integrated.enableBold": "Следует ли разрешить полужирный текÑÑ‚ в терминале. Эта Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° поддерживатьÑÑ Ð¾Ð±Ð¾Ð»Ð¾Ñ‡ÐºÐ¾Ð¹ терминала.", "terminal.integrated.cursorBlinking": "УправлÑет миганием курÑора терминала.", "terminal.integrated.cursorStyle": "ОпределÑет Ñтиль курÑора терминала.", diff --git a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 1296713c724..116db87d73e 100644 --- a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,6 +5,9 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "Ð¦Ð²ÐµÑ‚Ð¾Ð²Ð°Ñ Ñ‚ÐµÐ¼Ð°", + "themes.category.light": "Ñветлые темы", + "themes.category.dark": "темные темы", + "themes.category.hc": "темы Ñ Ð²Ñ‹Ñоким контраÑтом", "installColorThemes": "УÑтановить дополнительные цветовые темы...", "themes.selectTheme": "Выберите цветовую тему (иÑпользуйте клавиши Ñтрелок вверх и вниз Ð´Ð»Ñ Ð¿Ñ€ÐµÐ´Ð²Ð°Ñ€Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾Ð³Ð¾ проÑмотра)", "selectIconTheme.label": "Тема значков файлов", diff --git a/i18n/rus/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json b/i18n/rus/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json index 8b6ad71cd4e..dc2cdb3183b 100644 --- a/i18n/rus/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/decorations/browser/decorationsService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "bubbleTitle": "Содержит выделенные Ñлементы" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json b/i18n/rus/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json index 8b6ad71cd4e..928a4957cab 100644 --- a/i18n/rus/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json +++ b/i18n/rus/src/vs/workbench/services/extensions/electron-browser/extensionHostProfiler.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "message": "$(zap) Профилирование узла раÑширений..." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json b/i18n/rus/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json index 592a962b099..eda56c60fde 100644 --- a/i18n/rus/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/extensions/electron-browser/extensionService.i18n.json @@ -9,5 +9,6 @@ "extensionHostProcess.crash": "ХоÑÑ‚-процеÑÑ Ð´Ð»Ñ Ñ€Ð°Ñширений неожиданно завершил работу.", "extensionHostProcess.unresponsiveCrash": "Работа хоÑÑ‚-процеÑÑа Ð´Ð»Ñ Ñ€Ð°Ñширений была завершена, так как он переÑтал отвечать на запроÑÑ‹.", "overwritingExtension": "Идет перезапиÑÑŒ раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ {0} на {1}.", - "extensionUnderDevelopment": "Идет загрузка раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ñ€Ð°Ð·Ñ€Ð°Ð±Ð¾Ñ‚ÐºÐ¸ в {0}." + "extensionUnderDevelopment": "Идет загрузка раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ñ€Ð°Ð·Ñ€Ð°Ð±Ð¾Ñ‚ÐºÐ¸ в {0}.", + "extensionCache.invalid": "РаÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ð±Ñ‹Ð»Ð¸ изменены на диÑке. Обновите окно." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 297bca0ac5f..1ea5d9e9c9c 100644 --- a/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -21,5 +21,6 @@ "keybindings.json.command": "Ð˜Ð¼Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ñемой команды", "keybindings.json.when": "УÑловие, когда клавиша нажата.", "keybindings.json.args": "Ðргументы, передаваемые в выполнÑемую команду.", - "keyboardConfigurationTitle": "Клавиатура" + "keyboardConfigurationTitle": "Клавиатура", + "dispatch": "УправлÑет логикой диÑпетчеризации Ð´Ð»Ñ Ð½Ð°Ð¶Ð°Ñ‚Ð¸Ð¹ клавиш \"code\" (рекомендуетÑÑ) или \"keyCode\"." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/rus/src/vs/workbench/services/textfile/common/textFileService.i18n.json index 8b6ad71cd4e..07d83c760a5 100644 --- a/i18n/rus/src/vs/workbench/services/textfile/common/textFileService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "files.backup.failSave": "Ðе удалоÑÑŒ запиÑать измененные файлы в раÑположение резервной копии (ошибка: {0}). Попробуйте Ñохранить файлы и выйти." +} \ No newline at end of file diff --git a/i18n/trk/extensions/css/client/out/cssMain.i18n.json b/i18n/trk/extensions/css/client/out/cssMain.i18n.json index 25a60c39828..efa3cfefe20 100644 --- a/i18n/trk/extensions/css/client/out/cssMain.i18n.json +++ b/i18n/trk/extensions/css/client/out/cssMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "cssserver.name": "CSS Dil Sunucusu" + "cssserver.name": "CSS Dil Sunucusu", + "folding.start": "Katlama Bölgesi BaÅŸlangıcı", + "folding.end": "Katlama Bölgesi Sonu" } \ No newline at end of file diff --git a/i18n/trk/extensions/emmet/package.i18n.json b/i18n/trk/extensions/emmet/package.i18n.json index 6ce7f81e59f..a3ef0340c58 100644 --- a/i18n/trk/extensions/emmet/package.i18n.json +++ b/i18n/trk/extensions/emmet/package.i18n.json @@ -49,5 +49,8 @@ "emmetPreferencesBemModifierSeparator": "BEM filtresi kullanırken sınıflar için kullanılacak niteleyici ayrıcı", "emmetPreferencesFilterCommentBefore": "Yorum filtresi uygulandığında eÅŸleÅŸen öğenin önüne yerleÅŸtirilmesi gereken yorumun tanımı.", "emmetPreferencesFilterCommentAfter": "Yorum filtresi uygulandığında eÅŸleÅŸen öğenin ardına yerleÅŸtirilmesi gereken yorumun tanımı.", - "emmetPreferencesFilterCommentTrigger": "Yorum filterinin uygulanması için kısaltmada bulunması gereken virgülle ayrılmış öznitelik adları listesi" + "emmetPreferencesFilterCommentTrigger": "Yorum filterinin uygulanması için kısaltmada bulunması gereken virgülle ayrılmış öznitelik adları listesi", + "emmetPreferencesFormatNoIndentTags": "İçe girintilenmemesi gereken bir etiket adları dizisi", + "emmetPreferencesFormatForceIndentTags": "Her zaman içe girintilenmesi gereken bir etiket adları dizisi", + "emmetPreferencesAllowCompactBoolean": "DoÄŸruysa, boole niteliklerinin öz gösterimi üretilir" } \ No newline at end of file diff --git a/i18n/trk/extensions/html/client/out/htmlMain.i18n.json b/i18n/trk/extensions/html/client/out/htmlMain.i18n.json index 768300d269b..885fe117726 100644 --- a/i18n/trk/extensions/html/client/out/htmlMain.i18n.json +++ b/i18n/trk/extensions/html/client/out/htmlMain.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "htmlserver.name": "HTML Dil Sunucusu" + "htmlserver.name": "HTML Dil Sunucusu", + "folding.start": "Katlama Bölgesi BaÅŸlangıcı", + "folding.end": "Katlama Bölgesi Sonu" } \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json index 33eec63f82e..3a5d4006fd7 100644 --- a/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -31,6 +31,7 @@ "minimap.maxColumn": "Hazırlanacak mini haritanın azami geniÅŸliÄŸini belirli sayıda sütunla sınırla", "find.seedSearchStringFromSelection": "Bulma Araç ÇubuÄŸu'ndaki arama metninin, düzenleyicideki seçili alandan beslenmesini denetler", "find.autoFindInSelection": "Seçimde bul iÅŸaretçisinin, editördeki metnin birden çok karakteri veya satırı seçildiÄŸinde açılmasını denetler.", + "find.globalFindClipboard": "macOS'da Bulma Aracı'nın paylaşılan panoyu okuyup okumamasını veya deÄŸiÅŸtirip deÄŸiÅŸtirmemesini denetler", "wordWrap.off": "Satırlar hiçbir zaman bir sonraki satıra kaydırılmayacak.", "wordWrap.on": "Satırlar görüntü alanı geniÅŸliÄŸinde bir sonraki satıra kaydırılacak.", "wordWrap.wordWrapColumn": "Satırlar `editor.wordWrapColumn` deÄŸerinde bir sonraki satıra kaydırılacak.", diff --git a/i18n/trk/src/vs/platform/environment/node/argv.i18n.json b/i18n/trk/src/vs/platform/environment/node/argv.i18n.json index 7d132e007de..a4c4cd296d5 100644 --- a/i18n/trk/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/trk/src/vs/platform/environment/node/argv.i18n.json @@ -16,7 +16,7 @@ "inspect-brk-extensions": "Eklentilerde hata ayıklama ve ayrımlamaya eklenti sunucusu baÅŸladıktan hemen sonra duraklatılacak ÅŸekilde izin ver. BaÄŸlantı URI'ı için geliÅŸtirici araçlarını kontrol edin.", "reuseWindow": "Bir dosya veya klasörü son etkin pencerede açmaya zorlayın.", "userDataDir": "Kullanıcı verilerinin tutulacağı klasörü belirtir, root olarak çalışırken yararlıdır.", - "log": "Kullanılacak günlüğe yazma seviyesi. İzin verilen deÄŸerler 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off' ÅŸeklindedir.", + "log": "Kullanılacak günlüğe yazma düzeyi. Varsayılan deÄŸer 'info'dur. İzin verilen deÄŸerler 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off' ÅŸeklindedir.", "verbose": "Ayrıntılı çıktı oluÅŸtur (--wait anlamına gelir).", "wait": "Geri dönmeden önce dosyaların kapanmasını bekle.", "extensionHomePath": "Eklentilerin kök dizinini belirle.", diff --git a/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json index 7c4352f507b..e3e29379b77 100644 --- a/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json @@ -53,8 +53,20 @@ "doc": "Desteklenen dillerin listesi için göz atın: {0}", "restart": "DeÄŸeri deÄŸiÅŸtirirseniz VSCode'u yeniden baÅŸlatmanız gerekir.", "fail.createSettings": " '{0}' oluÅŸturulamadı ({1}).", + "openLogsFolder": "Günlük Klasörünü Aç", + "showLogs": "Günlükleri Göster...", + "mainProcess": "Ana", + "sharedProcess": "Paylaşılan", + "rendererProcess": "Render Alan", + "extensionHost": "Eklenti Sunucusu", + "selectProcess": "İşlem seçin", + "setLogLevel": "Günlük Düzeyini Ayarla", + "trace": "İzle", "debug": "Hata Ayıklama", "info": "Bilgi", "warn": "Uyarı", - "err": "Hata" + "err": "Hata", + "critical": "Kritik", + "off": "Kapalı", + "selectLogLevel": "Günlük düzeyini seçin" } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 957aae1111b..ecfc10e7ef8 100644 --- a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -11,7 +11,7 @@ "breakpointAdded": "Kesme noktası eklendi, {0}. satır, {1} dosyası", "breakpointRemoved": "Kesme noktası kaldırıldı, {0}. satır, {1} dosyası", "compoundMustHaveConfigurations": "BileÅŸik, birden çok yapılandırmayı baÅŸlatmak için \"configurations\" özniteliÄŸi bulundurmalıdır.", - "configMissing": "'launch.json' mevcut deÄŸil veya '{0}' yapılandırmasını içermiyor.", + "configMissing": "'launch.json' dosyasında '{0}' yapılandırması eksik.", "launchJsonDoesNotExist": "'launch.json' mevcut deÄŸil.", "debugRequestNotSupported": "Seçilen hata ayıklama yapılandırılmasındaki `{0}` özniteliÄŸi desteklenmeyen `{1}` deÄŸeri içeriyor.", "debugRequesMissing": "'{0}' özniteliÄŸi seçilen hata ayıklama yapılandırılmasında eksik.", diff --git a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json index 8b6ad71cd4e..4ae85e568bf 100644 --- a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsWidgets.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ratedByUsers": "{0} kullanıcı tarafından derecelendirildi", + "ratedBySingleUser": "1 kullanıcı tarafından derecelendirildi" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 8b6ad71cd4e..4de7cbfa69c 100644 --- a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectAndStartDebug": "Ayrımlamayı durdurmak için tıklayın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 31d65218f0e..067c8285667 100644 --- a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -7,9 +7,11 @@ "extensionsCommands": "Eklentileri Yönet", "galleryExtensionsCommands": "Galeri Eklentileri Yükle", "extension": "Eklenti", + "runtimeExtension": "Eklentiler Çalıştırılıyor", "extensions": "Eklentiler", "view": "Görüntüle", "developer": "GeliÅŸtirici", "extensionsConfigurationTitle": "Eklentiler", - "extensionsAutoUpdate": "Eklentileri otomatik olarak güncelle" + "extensionsAutoUpdate": "Eklentileri otomatik olarak güncelle", + "extensionsIgnoreRecommendations": "\"DoÄŸru\" olarak ayarlanırsa, eklenti tavsiyeleri bildirimleri artık gösterilmez." } \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json index cbbd312d9f3..244821c9761 100644 --- a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.i18n.json @@ -4,5 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "reportExtensionIssue": "Sorun Bildir" + "starActivation": "BaÅŸlangıçta etkinleÅŸtirildi", + "workspaceContainsGlobActivation": "Çalışma alanınızda bir {0} dosya eÅŸleÅŸmesi mevcut olduÄŸu için etkinleÅŸtirildi", + "workspaceContainsFileActivation": "Çalışma alanınızda {0} dosyası mevcut olduÄŸu için etkinleÅŸtirildi", + "languageActivation": "{0} dosyasını açtığınız için etkinleÅŸtirildi", + "workspaceGenericActivation": "{0} eyleminden dolayı etkinleÅŸtirildi", + "errors": "{0} yakalanmayan hata", + "extensionsInputName": "Eklentiler Çalıştırılıyor", + "showRuntimeExtensions": "Çalışan Eklentileri Göster", + "reportExtensionIssue": "Sorun Bildir", + "extensionHostProfileStart": "Eklenti Sunucusu Ayrımlamayı BaÅŸlat", + "extensionHostProfileStop": "Eklenti Sunucusu Ayrımlamayı Durdur", + "saveExtensionHostProfile": "Eklenti Sunucusu Ayrımlamayı Kaydet" } \ No newline at end of file From 70a27a33d4852154cf45cb7f0e57e473573c468b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 12:35:08 +0100 Subject: [PATCH 193/615] add CLIPBOARD snippet variable, #40153 --- .../editor/contrib/snippet/snippetSession.ts | 13 ++- .../contrib/snippet/snippetVariables.ts | 83 +++++++++++++++---- .../snippet/test/snippetVariables.test.ts | 73 ++++++++++------ .../electron-browser/snippets.contribution.ts | 4 +- 4 files changed, 128 insertions(+), 45 deletions(-) diff --git a/src/vs/editor/contrib/snippet/snippetSession.ts b/src/vs/editor/contrib/snippet/snippetSession.ts index 0764236fae9..1794938bdc1 100644 --- a/src/vs/editor/contrib/snippet/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/snippetSession.ts @@ -15,9 +15,11 @@ import { Range } from 'vs/editor/common/core/range'; import { IPosition } from 'vs/editor/common/core/position'; import { groupBy } from 'vs/base/common/arrays'; import { dispose } from 'vs/base/common/lifecycle'; -import { EditorSnippetVariableResolver } from './snippetVariables'; +import { SelectionBasedVariableResolver, CompositeSnippetVariableResolver, ModelBasedVariableResolver, ClipboardBasedVariableResolver } from './snippetVariables'; import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; +import { optional } from 'vs/platform/instantiation/common/instantiation'; export class OneSnippet { @@ -269,6 +271,9 @@ export class SnippetSession { const edits: IIdentifiedSingleEditOperation[] = []; const snippets: OneSnippet[] = []; + const modelBasedVariableResolver = new ModelBasedVariableResolver(model); + const clipboardVariableResolver = new ClipboardBasedVariableResolver(editor.invokeWithinContext(accessor => accessor.get(IClipboardService, optional))); + let delta = 0; // know what text the overwrite[Before|After] extensions @@ -310,7 +315,11 @@ export class SnippetSession { const snippet = new SnippetParser() .parse(adjustedTemplate, true, enforceFinalTabstop) - .resolveVariables(new EditorSnippetVariableResolver(model, selection)); + .resolveVariables(new CompositeSnippetVariableResolver([ + modelBasedVariableResolver, + clipboardVariableResolver, + new SelectionBasedVariableResolver(model, selection) + ])); const offset = model.getOffsetAt(start) + delta; delta += snippet.toString().length - model.getValueLengthInRange(snippetSelection); diff --git a/src/vs/editor/contrib/snippet/snippetVariables.ts b/src/vs/editor/contrib/snippet/snippetVariables.ts index d9b0703d07b..d6103e266cd 100644 --- a/src/vs/editor/contrib/snippet/snippetVariables.ts +++ b/src/vs/editor/contrib/snippet/snippetVariables.ts @@ -10,21 +10,40 @@ import { IModel } from 'vs/editor/common/editorCommon'; import { Selection } from 'vs/editor/common/core/selection'; import { VariableResolver, Variable, Text } from 'vs/editor/contrib/snippet/snippetParser'; import { getLeadingWhitespace, commonPrefixLength } from 'vs/base/common/strings'; +import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; -export class EditorSnippetVariableResolver implements VariableResolver { +export const KnownSnippetVariableNames = Object.freeze({ + 'SELECTION': true, + 'CLIPBOARD': true, + 'TM_SELECTED_TEXT': true, + 'TM_CURRENT_LINE': true, + 'TM_CURRENT_WORD': true, + 'TM_LINE_INDEX': true, + 'TM_LINE_NUMBER': true, + 'TM_FILENAME': true, + 'TM_FILENAME_BASE': true, + 'TM_DIRECTORY': true, + 'TM_FILEPATH': true, +}); - static readonly VariableNames = Object.freeze({ - 'SELECTION': true, - 'TM_SELECTED_TEXT': true, - 'TM_CURRENT_LINE': true, - 'TM_CURRENT_WORD': true, - 'TM_LINE_INDEX': true, - 'TM_LINE_NUMBER': true, - 'TM_FILENAME': true, - 'TM_FILENAME_BASE': true, - 'TM_DIRECTORY': true, - 'TM_FILEPATH': true, - }); +export class CompositeSnippetVariableResolver implements VariableResolver { + + constructor(private readonly _delegates: VariableResolver[]) { + // + } + + resolve(variable: Variable): string { + for (const delegate of this._delegates) { + let value = delegate.resolve(variable); + if (value !== void 0) { + return value; + } + } + return undefined; + } +} + +export class SelectionBasedVariableResolver implements VariableResolver { constructor( private readonly _model: IModel, @@ -82,8 +101,24 @@ export class EditorSnippetVariableResolver implements VariableResolver { } else if (name === 'TM_LINE_NUMBER') { return String(this._selection.positionLineNumber); + } + return undefined; + } +} - } else if (name === 'TM_FILENAME') { +export class ModelBasedVariableResolver implements VariableResolver { + + constructor( + private readonly _model: IModel + ) { + // + } + + resolve(variable: Variable): string { + + const { name } = variable; + + if (name === 'TM_FILENAME') { return basename(this._model.uri.fsPath); } else if (name === 'TM_FILENAME_BASE') { @@ -101,9 +136,23 @@ export class EditorSnippetVariableResolver implements VariableResolver { } else if (name === 'TM_FILEPATH') { return this._model.uri.fsPath; - - } else { - return undefined; } + + return undefined; + } +} + +export class ClipboardBasedVariableResolver implements VariableResolver { + + constructor( + private readonly _clipboardService: IClipboardService + ) { + // + } + + resolve(variable: Variable): string { + return (variable.name === 'CLIPBOARD' && this._clipboardService) + ? this._clipboardService.readText() || undefined + : undefined; } } diff --git a/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts b/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts index 991b5a97e28..7920178fe02 100644 --- a/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts +++ b/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts @@ -8,14 +8,15 @@ import * as assert from 'assert'; import { isWindows } from 'vs/base/common/platform'; import URI from 'vs/base/common/uri'; import { Selection } from 'vs/editor/common/core/selection'; -import { EditorSnippetVariableResolver } from 'vs/editor/contrib/snippet/snippetVariables'; -import { SnippetParser, Variable } from 'vs/editor/contrib/snippet/snippetParser'; +import { SelectionBasedVariableResolver, CompositeSnippetVariableResolver, ModelBasedVariableResolver, ClipboardBasedVariableResolver } from 'vs/editor/contrib/snippet/snippetVariables'; +import { SnippetParser, Variable, VariableResolver } from 'vs/editor/contrib/snippet/snippetParser'; import { Model } from 'vs/editor/common/model/model'; +import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; suite('Snippet Variables Resolver', function () { let model: Model; - let resolver: EditorSnippetVariableResolver; + let resolver: VariableResolver; setup(function () { model = Model.createFromString([ @@ -24,14 +25,17 @@ suite('Snippet Variables Resolver', function () { ' this is line three' ].join('\n'), undefined, undefined, URI.parse('file:///foo/files/text.txt')); - resolver = new EditorSnippetVariableResolver(model, new Selection(1, 1, 1, 1)); + resolver = new CompositeSnippetVariableResolver([ + new ModelBasedVariableResolver(model), + new SelectionBasedVariableResolver(model, new Selection(1, 1, 1, 1)), + ]); }); teardown(function () { model.dispose(); }); - function assertVariableResolve(resolver: EditorSnippetVariableResolver, varName: string, expected: string) { + function assertVariableResolve(resolver: VariableResolver, varName: string, expected: string) { const snippet = new SnippetParser().parse(`$${varName}`); const variable = snippet.children[0]; variable.resolve(resolver); @@ -55,9 +59,8 @@ suite('Snippet Variables Resolver', function () { assertVariableResolve(resolver, 'TM_FILEPATH', '/foo/files/text.txt'); } - resolver = new EditorSnippetVariableResolver( - Model.createFromString('', undefined, undefined, URI.parse('http://www.pb.o/abc/def/ghi')), - new Selection(1, 1, 1, 1) + resolver = new ModelBasedVariableResolver( + Model.createFromString('', undefined, undefined, URI.parse('http://www.pb.o/abc/def/ghi')) ); assertVariableResolve(resolver, 'TM_FILENAME', 'ghi'); if (!isWindows) { @@ -65,9 +68,8 @@ suite('Snippet Variables Resolver', function () { assertVariableResolve(resolver, 'TM_FILEPATH', '/abc/def/ghi'); } - resolver = new EditorSnippetVariableResolver( - Model.createFromString('', undefined, undefined, URI.parse('mem:fff.ts')), - new Selection(1, 1, 1, 1) + resolver = new ModelBasedVariableResolver( + Model.createFromString('', undefined, undefined, URI.parse('mem:fff.ts')) ); assertVariableResolve(resolver, 'TM_DIRECTORY', ''); assertVariableResolve(resolver, 'TM_FILEPATH', 'fff.ts'); @@ -76,24 +78,24 @@ suite('Snippet Variables Resolver', function () { test('editor variables, selection', function () { - resolver = new EditorSnippetVariableResolver(model, new Selection(1, 2, 2, 3)); + resolver = new SelectionBasedVariableResolver(model, new Selection(1, 2, 2, 3)); assertVariableResolve(resolver, 'TM_SELECTED_TEXT', 'his is line one\nth'); assertVariableResolve(resolver, 'TM_CURRENT_LINE', 'this is line two'); assertVariableResolve(resolver, 'TM_LINE_INDEX', '1'); assertVariableResolve(resolver, 'TM_LINE_NUMBER', '2'); - resolver = new EditorSnippetVariableResolver(model, new Selection(2, 3, 1, 2)); + resolver = new SelectionBasedVariableResolver(model, new Selection(2, 3, 1, 2)); assertVariableResolve(resolver, 'TM_SELECTED_TEXT', 'his is line one\nth'); assertVariableResolve(resolver, 'TM_CURRENT_LINE', 'this is line one'); assertVariableResolve(resolver, 'TM_LINE_INDEX', '0'); assertVariableResolve(resolver, 'TM_LINE_NUMBER', '1'); - resolver = new EditorSnippetVariableResolver(model, new Selection(1, 2, 1, 2)); + resolver = new SelectionBasedVariableResolver(model, new Selection(1, 2, 1, 2)); assertVariableResolve(resolver, 'TM_SELECTED_TEXT', undefined); assertVariableResolve(resolver, 'TM_CURRENT_WORD', 'this'); - resolver = new EditorSnippetVariableResolver(model, new Selection(3, 1, 3, 1)); + resolver = new SelectionBasedVariableResolver(model, new Selection(3, 1, 3, 1)); assertVariableResolve(resolver, 'TM_CURRENT_WORD', undefined); }); @@ -117,21 +119,18 @@ suite('Snippet Variables Resolver', function () { assertVariableResolve(resolver, 'TM_FILENAME_BASE', 'text'); - resolver = new EditorSnippetVariableResolver( - Model.createFromString('', undefined, undefined, URI.parse('http://www.pb.o/abc/def/ghi')), - new Selection(1, 1, 1, 1) + resolver = new ModelBasedVariableResolver( + Model.createFromString('', undefined, undefined, URI.parse('http://www.pb.o/abc/def/ghi')) ); assertVariableResolve(resolver, 'TM_FILENAME_BASE', 'ghi'); - resolver = new EditorSnippetVariableResolver( - Model.createFromString('', undefined, undefined, URI.parse('mem:.git')), - new Selection(1, 1, 1, 1) + resolver = new ModelBasedVariableResolver( + Model.createFromString('', undefined, undefined, URI.parse('mem:.git')) ); assertVariableResolve(resolver, 'TM_FILENAME_BASE', '.git'); - resolver = new EditorSnippetVariableResolver( - Model.createFromString('', undefined, undefined, URI.parse('mem:foo.')), - new Selection(1, 1, 1, 1) + resolver = new ModelBasedVariableResolver( + Model.createFromString('', undefined, undefined, URI.parse('mem:foo.')) ); assertVariableResolve(resolver, 'TM_FILENAME_BASE', 'foo'); }); @@ -208,4 +207,30 @@ suite('Snippet Variables Resolver', function () { ); }); + test('Add variable to insert value from clipboard to a snippet #40153', function () { + let readTextResult: string; + let _throw = () => { throw new Error(); }; + let resolver = new ClipboardBasedVariableResolver(new class implements IClipboardService { + _serviceBrand: any; + readText(): string { return readTextResult; } + writeText = _throw; + readFindText = _throw; + writeFindText = _throw; + }); + + readTextResult = undefined; + assertVariableResolve(resolver, 'CLIPBOARD', undefined); + + readTextResult = null; + assertVariableResolve(resolver, 'CLIPBOARD', undefined); + + readTextResult = ''; + assertVariableResolve(resolver, 'CLIPBOARD', undefined); + + readTextResult = 'foo'; + assertVariableResolve(resolver, 'CLIPBOARD', 'foo'); + + assertVariableResolve(resolver, 'foo', undefined); + assertVariableResolve(resolver, 'cLIPBOARD', undefined); + }); }); diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts b/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts index fa0e7cd8a3a..69b5b861b39 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts @@ -20,7 +20,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' import { LanguageId } from 'vs/editor/common/modes'; import { TPromise } from 'vs/base/common/winjs.base'; import { SnippetParser, Variable, Placeholder, Text } from 'vs/editor/contrib/snippet/snippetParser'; -import { EditorSnippetVariableResolver } from 'vs/editor/contrib/snippet/snippetVariables'; +import { KnownSnippetVariableNames } from 'vs/editor/contrib/snippet/snippetVariables'; export const ISnippetsService = createDecorator('snippetService'); @@ -107,7 +107,7 @@ export class Snippet { if ( marker instanceof Variable && marker.children.length === 0 - && !EditorSnippetVariableResolver.VariableNames[marker.name] + && !KnownSnippetVariableNames[marker.name] ) { // a 'variable' without a default value and not being one of our supported // variables is automatically turned into a placeholder. This is to restore From 6c381a0e49c7d8e23ba34eb362cd14296bb6aecc Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 13 Dec 2017 12:40:17 +0100 Subject: [PATCH 194/615] Load fast-plist async. For #40147 --- .../themes/electron-browser/colorThemeData.ts | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts index a79b9fdba62..d0bcb83b6c9 100644 --- a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts +++ b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts @@ -14,7 +14,6 @@ import nls = require('vs/nls'); import * as types from 'vs/base/common/types'; import * as objects from 'vs/base/common/objects'; -import * as plist from 'fast-plist'; import pfs = require('vs/base/node/pfs'); import { Extensions, IColorRegistry, ColorIdentifier, editorBackground, editorForeground } from 'vs/platform/theme/common/colorRegistry'; @@ -289,25 +288,31 @@ function _loadColorThemeFromFile(themePath: string, resultRules: ITokenColorizat } } +let pListParser: Thenable<{ parse(content: string) }>; +function getPListParser() { + return pListParser || import('fast-plist'); +} + function _loadSyntaxTokensFromFile(themePath: string, resultRules: ITokenColorizationRule[], resultColors: IColorMap): TPromise { return pfs.readFile(themePath).then(content => { - try { - let contentValue = plist.parse(content.toString()); - let settings: ITokenColorizationRule[] = contentValue.settings; - if (!Array.isArray(settings)) { - return TPromise.wrapError(new Error(nls.localize('error.plist.invalidformat', "Problem parsing tmTheme file: {0}. 'settings' is not array."))); + return getPListParser().then(parser => { + try { + let contentValue = parser.parse(content.toString()); + let settings: ITokenColorizationRule[] = contentValue.settings; + if (!Array.isArray(settings)) { + return TPromise.wrapError(new Error(nls.localize('error.plist.invalidformat', "Problem parsing tmTheme file: {0}. 'settings' is not array."))); + } + convertSettings(settings, resultRules, resultColors); + return TPromise.as(null); + } catch (e) { + return TPromise.wrapError(new Error(nls.localize('error.cannotparse', "Problems parsing tmTheme file: {0}", e.message))); } - convertSettings(settings, resultRules, resultColors); - return TPromise.as(null); - } catch (e) { - return TPromise.wrapError(new Error(nls.localize('error.cannotparse', "Problems parsing tmTheme file: {0}", e.message))); - } + }); }, error => { return TPromise.wrapError(new Error(nls.localize('error.cannotload', "Problems loading tmTheme file {0}: {1}", themePath, error.message))); }); } - function updateDefaultRuleSettings(defaultRule: ITokenColorizationRule, theme: ColorThemeData): ITokenColorizationRule { let foreground = theme.getColor(editorForeground) || theme.getDefault(editorForeground); let background = theme.getColor(editorBackground) || theme.getDefault(editorBackground); From 0cd53b2d9b451192bb3e183c422695380cbaf28a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 13 Dec 2017 12:50:21 +0100 Subject: [PATCH 195/615] :lipstick: --- extensions/git/src/repository.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index d65c8880200..332522c014d 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -568,16 +568,6 @@ export class Repository implements Disposable { } } - // @throttle - // async init(): Promise { - // if (this.state !== State.NotAGitRepository) { - // return; - // } - - // await this.git.init(this.workspaceRoot.fsPath); - // await this.status(); - // } - @throttle async status(): Promise { await this.run(Operation.Status); From db4954629c13ea443e0cd21529dcce134919c12b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 13 Dec 2017 12:52:22 +0100 Subject: [PATCH 196/615] debt - convert our dialog API use to async (for #39536) --- src/vs/code/electron-main/main.ts | 2 +- .../standalone/browser/simpleServices.ts | 11 ++- src/vs/platform/message/common/message.ts | 2 +- src/vs/platform/windows/common/windows.ts | 6 +- .../windows/electron-browser/windowService.ts | 12 +-- .../api/electron-browser/mainThreadDialogs.ts | 11 +-- .../browser/actions/workspaceActions.ts | 40 ++++---- .../browser/parts/editor/editorActions.ts | 33 +++---- .../browser/parts/editor/editorPart.ts | 33 +++---- src/vs/workbench/common/editor.ts | 6 +- .../common/editor/untitledEditorInput.ts | 2 +- .../electron-browser/extensionsActions.ts | 28 +++--- .../runtimeExtensionsEditor.ts | 2 +- .../files/common/editors/fileEditorInput.ts | 2 +- .../files/electron-browser/fileActions.ts | 90 ++++++++++-------- .../electron-browser/views/explorerViewer.ts | 34 ++++--- .../electron-browser/startupProfiler.ts | 47 ++++----- .../relauncher.contribution.ts | 12 ++- .../parts/search/browser/searchViewlet.ts | 26 ++--- .../electron-browser/task.contribution.ts | 74 ++++++++------- .../parts/terminal/common/terminalService.ts | 2 +- .../electron-browser/terminalService.ts | 6 +- .../message/browser/messageService.ts | 11 ++- .../electron-browser/messageService.ts | 14 ++- .../textfile/common/textFileService.ts | 95 ++++++++++--------- .../services/textfile/common/textfiles.ts | 2 +- .../electron-browser/textFileService.ts | 12 +-- .../workbench/test/workbenchTestServices.ts | 26 ++--- 28 files changed, 342 insertions(+), 299 deletions(-) diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index d9f1c0b0081..3c042ea5a67 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -236,7 +236,7 @@ function setupIPC(accessor: ServicesAccessor): TPromise { } function showStartupWarningDialog(message: string, detail: string): void { - dialog.showMessageBox(null, { + dialog.showMessageBox({ title: product.nameLong, type: 'warning', buttons: [mnemonicButtonLabel(localize({ key: 'close', comment: ['&& denotes a mnemonic'] }, "&&Close"))], diff --git a/src/vs/editor/standalone/browser/simpleServices.ts b/src/vs/editor/standalone/browser/simpleServices.ts index 44dd3f9f46f..45c83bd1d5c 100644 --- a/src/vs/editor/standalone/browser/simpleServices.ts +++ b/src/vs/editor/standalone/browser/simpleServices.ts @@ -260,17 +260,22 @@ export class SimpleMessageService implements IMessageService { // No-op } - public confirm(confirmation: IConfirmation): boolean { + public confirm(confirmation: IConfirmation): TPromise { let messageText = confirmation.message; if (confirmation.detail) { messageText = messageText + '\n\n' + confirmation.detail; } - return window.confirm(messageText); + return TPromise.wrap(window.confirm(messageText)); } public confirmWithCheckbox(confirmation: IConfirmation): TPromise { - return TPromise.as({ confirmed: this.confirm(confirmation), checkboxChecked: false /* unsupported */ } as IConfirmationResult); + return this.confirm(confirmation).then(confirmed => { + return { + confirmed, + checkboxChecked: false // unsupported + } as IConfirmationResult; + }); } } diff --git a/src/vs/platform/message/common/message.ts b/src/vs/platform/message/common/message.ts index 63ca9fe894b..61ed328a213 100644 --- a/src/vs/platform/message/common/message.ts +++ b/src/vs/platform/message/common/message.ts @@ -62,7 +62,7 @@ export interface IMessageService { /** * Ask the user for confirmation. */ - confirm(confirmation: IConfirmation): boolean; + confirm(confirmation: IConfirmation): TPromise; /** * Ask the user for confirmation with a checkbox. diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index b221607ef39..6a0349c821b 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -191,9 +191,9 @@ export interface IWindowService { setDocumentEdited(flag: boolean): TPromise; onWindowTitleDoubleClick(): TPromise; show(): TPromise; - showMessageBox(options: MessageBoxOptions): number; - showSaveDialog(options: SaveDialogOptions): string; - showOpenDialog(options: OpenDialogOptions): string[]; + showMessageBox(options: MessageBoxOptions): TPromise; + showSaveDialog(options: SaveDialogOptions): TPromise; + showOpenDialog(options: OpenDialogOptions): TPromise; showMessageBoxWithCheckbox(options: MessageBoxOptions): TPromise; } diff --git a/src/vs/platform/windows/electron-browser/windowService.ts b/src/vs/platform/windows/electron-browser/windowService.ts index 3e8a9ee4555..ad6f141339d 100644 --- a/src/vs/platform/windows/electron-browser/windowService.ts +++ b/src/vs/platform/windows/electron-browser/windowService.ts @@ -123,8 +123,8 @@ export class WindowService implements IWindowService { return this.windowsService.showWindow(this.windowId); } - showMessageBox(options: Electron.MessageBoxOptions): number { - return remote.dialog.showMessageBox(remote.getCurrentWindow(), options); + showMessageBox(options: Electron.MessageBoxOptions): TPromise { + return TPromise.wrap(remote.dialog.showMessageBox(remote.getCurrentWindow(), options)); } showMessageBoxWithCheckbox(options: Electron.MessageBoxOptions): TPromise { @@ -135,7 +135,7 @@ export class WindowService implements IWindowService { }); } - showSaveDialog(options: Electron.SaveDialogOptions): string { + showSaveDialog(options: Electron.SaveDialogOptions): TPromise { function normalizePath(path: string): string { if (path && isMacintosh) { @@ -145,10 +145,10 @@ export class WindowService implements IWindowService { return path; } - return normalizePath(remote.dialog.showSaveDialog(remote.getCurrentWindow(), options)); // https://github.com/electron/electron/issues/4936 + return TPromise.wrap(normalizePath(remote.dialog.showSaveDialog(remote.getCurrentWindow(), options))); // https://github.com/electron/electron/issues/4936 } - showOpenDialog(options: Electron.OpenDialogOptions): string[] { + showOpenDialog(options: Electron.OpenDialogOptions): TPromise { function normalizePaths(paths: string[]): string[] { if (paths && paths.length > 0 && isMacintosh) { @@ -158,7 +158,7 @@ export class WindowService implements IWindowService { return paths; } - return normalizePaths(remote.dialog.showOpenDialog(remote.getCurrentWindow(), options)); // https://github.com/electron/electron/issues/4936 + return TPromise.wrap(normalizePaths(remote.dialog.showOpenDialog(remote.getCurrentWindow(), options))); // https://github.com/electron/electron/issues/4936 } updateTouchBar(items: ICommandAction[][]): TPromise { diff --git a/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts b/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts index dfc8714ca3b..b8b6e1336dd 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts @@ -30,11 +30,9 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape { return Promise.reject(new Error('Not supported - Open-dialogs can only be opened on `file`-uris.')); } return new Promise(resolve => { - const filenames = this._windowService.showOpenDialog( + this._windowService.showOpenDialog( MainThreadDialogs._convertOpenOptions(options) - ); - - resolve(isFalsyOrEmpty(filenames) ? undefined : filenames); + ).then(filenames => resolve(isFalsyOrEmpty(filenames) ? undefined : filenames)); }); } @@ -44,10 +42,9 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape { return Promise.reject(new Error('Not supported - Save-dialogs can only be opened on `file`-uris.')); } return new Promise(resolve => { - const filename = this._windowService.showSaveDialog( + this._windowService.showSaveDialog( MainThreadDialogs._convertSaveOptions(options) - ); - resolve(!filename ? undefined : filename); + ).then(filename => resolve(!filename ? undefined : filename)); }); } diff --git a/src/vs/workbench/browser/actions/workspaceActions.ts b/src/vs/workbench/browser/actions/workspaceActions.ts index fe36123d156..6364e1893d8 100644 --- a/src/vs/workbench/browser/actions/workspaceActions.ts +++ b/src/vs/workbench/browser/actions/workspaceActions.ts @@ -140,7 +140,7 @@ export abstract class BaseWorkspacesAction extends Action { super(id, label); } - protected pickFolders(buttonLabel: string, title: string): string[] { + protected pickFolders(buttonLabel: string, title: string): TPromise { return this.windowService.showOpenDialog({ buttonLabel, title, @@ -212,13 +212,14 @@ export class AddRootFolderAction extends BaseWorkspacesAction { } public run(): TPromise { - const folders = super.pickFolders(mnemonicButtonLabel(nls.localize({ key: 'add', comment: ['&& denotes a mnemonic'] }, "&&Add")), nls.localize('addFolderToWorkspaceTitle', "Add Folder to Workspace")); - if (!folders || !folders.length) { - return TPromise.as(null); - } + return super.pickFolders(mnemonicButtonLabel(nls.localize({ key: 'add', comment: ['&& denotes a mnemonic'] }, "&&Add")), nls.localize('addFolderToWorkspaceTitle', "Add Folder to Workspace")).then(folders => { + if (!folders || !folders.length) { + return null; + } - // Add and show Files Explorer viewlet - return this.workspaceEditingService.addFolders(folders.map(folder => ({ uri: URI.file(folder) }))).then(() => this.viewletService.openViewlet(this.viewletService.getDefaultViewletId(), true)); + // Add and show Files Explorer viewlet + return this.workspaceEditingService.addFolders(folders.map(folder => ({ uri: URI.file(folder) }))).then(() => this.viewletService.openViewlet(this.viewletService.getDefaultViewletId(), true)); + }); } } @@ -317,23 +318,24 @@ export class SaveWorkspaceAsAction extends BaseWorkspacesAction { } public run(): TPromise { - const configPath = this.getNewWorkspaceConfigPath(); - if (configPath) { - switch (this.contextService.getWorkbenchState()) { - case WorkbenchState.EMPTY: - case WorkbenchState.FOLDER: - const folders = this.contextService.getWorkspace().folders.map(folder => ({ uri: folder.uri })); - return this.workspaceEditingService.createAndEnterWorkspace(folders, configPath); + return this.getNewWorkspaceConfigPath().then(configPath => { + if (configPath) { + switch (this.contextService.getWorkbenchState()) { + case WorkbenchState.EMPTY: + case WorkbenchState.FOLDER: + const folders = this.contextService.getWorkspace().folders.map(folder => ({ uri: folder.uri })); + return this.workspaceEditingService.createAndEnterWorkspace(folders, configPath); - case WorkbenchState.WORKSPACE: - return this.workspaceEditingService.saveAndEnterWorkspace(configPath); + case WorkbenchState.WORKSPACE: + return this.workspaceEditingService.saveAndEnterWorkspace(configPath); + } } - } - return TPromise.as(null); + return null; + }); } - private getNewWorkspaceConfigPath(): string { + private getNewWorkspaceConfigPath(): TPromise { return this.windowService.showSaveDialog({ buttonLabel: mnemonicButtonLabel(nls.localize({ key: 'save', comment: ['&& denotes a mnemonic'] }, "&&Save")), title: nls.localize('saveWorkspace', "Save Workspace"), diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index d099ee571e0..a9dca65a16b 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -669,24 +669,25 @@ export class CloseAllEditorsAction extends Action { } // Otherwise ask for combined confirmation - const confirm = this.textFileService.confirmSave(); - if (confirm === ConfirmResult.CANCEL) { - return void 0; - } - - let saveOrRevertPromise: TPromise; - if (confirm === ConfirmResult.DONT_SAVE) { - saveOrRevertPromise = this.textFileService.revertAll(null, { soft: true }).then(() => true); - } else { - saveOrRevertPromise = this.textFileService.saveAll(true).then(res => res.results.every(r => r.success)); - } - - return saveOrRevertPromise.then(success => { - if (success) { - return this.editorService.closeAllEditors(); + return this.textFileService.confirmSave().then(confirm => { + if (confirm === ConfirmResult.CANCEL) { + return void 0; } - return void 0; + let saveOrRevertPromise: TPromise; + if (confirm === ConfirmResult.DONT_SAVE) { + saveOrRevertPromise = this.textFileService.revertAll(null, { soft: true }).then(() => true); + } else { + saveOrRevertPromise = this.textFileService.saveAll(true).then(res => res.results.every(r => r.success)); + } + + return saveOrRevertPromise.then(success => { + if (success) { + return this.editorService.closeAllEditors(); + } + + return void 0; + }); }); } } diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 166e435a60c..b2187d1ee33 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -823,24 +823,25 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService // Switch to editor that we want to handle return this.openEditor(identifier.editor, null, this.stacks.positionOfGroup(identifier.group)).then(() => { return this.ensureEditorOpenedBeforePrompt().then(() => { - const res = editor.confirmSave(); - switch (res) { - case ConfirmResult.SAVE: - return editor.save().then(ok => !ok); + return editor.confirmSave().then(res => { + switch (res) { + case ConfirmResult.SAVE: + return editor.save().then(ok => !ok); - case ConfirmResult.DONT_SAVE: - // first try a normal revert where the contents of the editor are restored - return editor.revert().then(ok => !ok, error => { - // if that fails, since we are about to close the editor, we accept that - // the editor cannot be reverted and instead do a soft revert that just - // enables us to close the editor. With this, a user can always close a - // dirty editor even when reverting fails. - return editor.revert({ soft: true }).then(ok => !ok); - }); + case ConfirmResult.DONT_SAVE: + // first try a normal revert where the contents of the editor are restored + return editor.revert().then(ok => !ok, error => { + // if that fails, since we are about to close the editor, we accept that + // the editor cannot be reverted and instead do a soft revert that just + // enables us to close the editor. With this, a user can always close a + // dirty editor even when reverting fails. + return editor.revert({ soft: true }).then(ok => !ok); + }); - case ConfirmResult.CANCEL: - return true; // veto - } + case ConfirmResult.CANCEL: + return true; // veto + } + }); }); }); } diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index fa0547e6294..59be74eb1e7 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -200,8 +200,8 @@ export abstract class EditorInput implements IEditorInput { /** * Subclasses should bring up a proper dialog for the user if the editor is dirty and return the result. */ - public confirmSave(): ConfirmResult { - return ConfirmResult.DONT_SAVE; + public confirmSave(): TPromise { + return TPromise.wrap(ConfirmResult.DONT_SAVE); } /** @@ -372,7 +372,7 @@ export class SideBySideEditorInput extends EditorInput { return this.master.isDirty(); } - public confirmSave(): ConfirmResult { + public confirmSave(): TPromise { return this.master.confirmSave(); } diff --git a/src/vs/workbench/common/editor/untitledEditorInput.ts b/src/vs/workbench/common/editor/untitledEditorInput.ts index 45092f33e98..78c322eb9fe 100644 --- a/src/vs/workbench/common/editor/untitledEditorInput.ts +++ b/src/vs/workbench/common/editor/untitledEditorInput.ts @@ -180,7 +180,7 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport return this.hasAssociatedFilePath; } - public confirmSave(): ConfirmResult { + public confirmSave(): TPromise { return this.textFileService.confirmSave([this.resource]); } diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts index e128026b9e0..386bc71bc41 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts @@ -66,25 +66,25 @@ export class InstallVSIXAction extends Action { } run(): TPromise { - const result = this.windowsService.showOpenDialog({ + return this.windowsService.showOpenDialog({ title: localize('installFromVSIX', "Install from VSIX"), filters: [{ name: 'VSIX Extensions', extensions: ['vsix'] }], properties: ['openFile'], buttonLabel: mnemonicButtonLabel(localize({ key: 'installButton', comment: ['&& denotes a mnemonic'] }, "&&Install")) - }); + }).then(result => { + if (!result) { + return TPromise.as(null); + } - if (!result) { - return TPromise.as(null); - } - - return TPromise.join(result.map(vsix => this.extensionsWorkbenchService.install(vsix))).then(() => { - this.messageService.show( - severity.Info, - { - message: localize('InstallVSIXAction.success', "Successfully installed the extension. Restart to enable it."), - actions: [this.instantiationService.createInstance(ReloadWindowAction, ReloadWindowAction.ID, localize('InstallVSIXAction.reloadNow', "Reload Now"))] - } - ); + return TPromise.join(result.map(vsix => this.extensionsWorkbenchService.install(vsix))).then(() => { + this.messageService.show( + severity.Info, + { + message: localize('InstallVSIXAction.success', "Successfully installed the extension. Restart to enable it."), + actions: [this.instantiationService.createInstance(ReloadWindowAction, ReloadWindowAction.ID, localize('InstallVSIXAction.reloadNow', "Reload Now"))] + } + ); + }); }); } } \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts b/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts index 80a35a88b1d..e5c470065c3 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts @@ -565,7 +565,7 @@ class SaveExtensionHostProfileAction extends Action { } async run(): TPromise { - let picked = this._windowService.showSaveDialog({ + let picked = await this._windowService.showSaveDialog({ title: 'Save Extension Host Profile', buttonLabel: 'Save', defaultPath: `CPU-${new Date().toISOString().replace(/[\-:]/g, '')}.cpuprofile`, diff --git a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts index 37df37a64d7..f6a8ad3ec7d 100644 --- a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts +++ b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts @@ -214,7 +214,7 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { return model.isDirty(); } - public confirmSave(): ConfirmResult { + public confirmSave(): TPromise { return this.textFileService.confirmSave([this.resource]); } diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index 2b3598a96ba..e54478a3ecb 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -679,7 +679,7 @@ export class BaseDeleteFileAction extends BaseFileAction { } // Handle dirty - let revertPromise: TPromise = TPromise.as(null); + let confirmDirtyPromise: TPromise = TPromise.as(true); const dirty = this.textFileService.getDirty().filter(d => resources.isEqualOrParent(d, this.element.resource, !isLinux /* ignorecase */)); if (dirty.length) { let message: string; @@ -693,33 +693,37 @@ export class BaseDeleteFileAction extends BaseFileAction { message = nls.localize('dirtyMessageFileDelete', "You are deleting a file with unsaved changes. Do you want to continue?"); } - const res = this.messageService.confirm({ + confirmDirtyPromise = this.messageService.confirm({ message, type: 'warning', detail: nls.localize('dirtyWarning', "Your changes will be lost if you don't save them."), primaryButton + }).then(confirmed => { + if (!confirmed) { + return false; + } + + this.skipConfirm = true; // since we already asked for confirmation + return this.textFileService.revertAll(dirty).then(() => true); }); - - if (!res) { - return TPromise.as(null); - } - - this.skipConfirm = true; // since we already asked for confirmation - revertPromise = this.textFileService.revertAll(dirty); } // Check if file is dirty in editor and save it to avoid data loss - return revertPromise.then(() => { - let confirmPromise: TPromise; + return confirmDirtyPromise.then(confirmed => { + if (!confirmed) { + return null; + } + + let confirmDeletePromise: TPromise; // Check if we need to ask for confirmation at all if (this.skipConfirm || (this.useTrash && this.configurationService.getValue(BaseDeleteFileAction.CONFIRM_DELETE_SETTING_KEY) === false)) { - confirmPromise = TPromise.as({ confirmed: true } as IConfirmationResult); + confirmDeletePromise = TPromise.as({ confirmed: true } as IConfirmationResult); } // Confirm for moving to trash else if (this.useTrash) { - confirmPromise = this.messageService.confirmWithCheckbox({ + confirmDeletePromise = this.messageService.confirmWithCheckbox({ message: this.element.isDirectory ? nls.localize('confirmMoveTrashMessageFolder', "Are you sure you want to delete '{0}' and its contents?", this.element.name) : nls.localize('confirmMoveTrashMessageFile', "Are you sure you want to delete '{0}'?", this.element.name), detail: isWindows ? nls.localize('undoBin', "You can restore from the recycle bin.") : nls.localize('undoTrash', "You can restore from the trash."), primaryButton, @@ -732,7 +736,7 @@ export class BaseDeleteFileAction extends BaseFileAction { // Confirm for deleting permanently else { - confirmPromise = this.messageService.confirmWithCheckbox({ + confirmDeletePromise = this.messageService.confirmWithCheckbox({ message: this.element.isDirectory ? nls.localize('confirmDeleteMessageFolder', "Are you sure you want to permanently delete '{0}' and its contents?", this.element.name) : nls.localize('confirmDeleteMessageFile', "Are you sure you want to permanently delete '{0}'?", this.element.name), detail: nls.localize('irreversible', "This action is irreversible!"), primaryButton, @@ -740,7 +744,7 @@ export class BaseDeleteFileAction extends BaseFileAction { }); } - return confirmPromise.then(confirmation => { + return confirmDeletePromise.then(confirmation => { // Check for confirmation checkbox let updateConfirmSettingsPromise: TPromise = TPromise.as(void 0); @@ -850,7 +854,7 @@ export class ImportFileAction extends BaseFileAction { targetNames[isLinux ? child.name : child.name.toLowerCase()] = child; }); - let overwrite = true; + let overwritePromise = TPromise.as(true); if (resources.some(resource => { return !!targetNames[isLinux ? paths.basename(resource.fsPath) : paths.basename(resource.fsPath).toLowerCase()]; })) { @@ -861,41 +865,43 @@ export class ImportFileAction extends BaseFileAction { type: 'warning' }; - overwrite = this.messageService.confirm(confirm); + overwritePromise = this.messageService.confirm(confirm); } - if (!overwrite) { - return void 0; - } + return overwritePromise.then(overwrite => { + if (!overwrite) { + return void 0; + } - // Run import in sequence - const importPromisesFactory: ITask>[] = []; - resources.forEach(resource => { - importPromisesFactory.push(() => { - const sourceFile = resource; - const targetFile = targetElement.resource.with({ path: paths.join(targetElement.resource.path, paths.basename(sourceFile.path)) }); + // Run import in sequence + const importPromisesFactory: ITask>[] = []; + resources.forEach(resource => { + importPromisesFactory.push(() => { + const sourceFile = resource; + const targetFile = targetElement.resource.with({ path: paths.join(targetElement.resource.path, paths.basename(sourceFile.path)) }); - // if the target exists and is dirty, make sure to revert it. otherwise the dirty contents - // of the target file would replace the contents of the imported file. since we already - // confirmed the overwrite before, this is OK. - let revertPromise = TPromise.wrap(null); - if (this.textFileService.isDirty(targetFile)) { - revertPromise = this.textFileService.revertAll([targetFile], { soft: true }); - } + // if the target exists and is dirty, make sure to revert it. otherwise the dirty contents + // of the target file would replace the contents of the imported file. since we already + // confirmed the overwrite before, this is OK. + let revertPromise = TPromise.wrap(null); + if (this.textFileService.isDirty(targetFile)) { + revertPromise = this.textFileService.revertAll([targetFile], { soft: true }); + } - return revertPromise.then(() => { - return this.fileService.importFile(sourceFile, targetElement.resource).then(res => { + return revertPromise.then(() => { + return this.fileService.importFile(sourceFile, targetElement.resource).then(res => { - // if we only import one file, just open it directly - if (resources.length === 1) { - this.editorService.openEditor({ resource: res.stat.resource, options: { pinned: true } }).done(null, errors.onUnexpectedError); - } - }, error => this.onError(error)); + // if we only import one file, just open it directly + if (resources.length === 1) { + this.editorService.openEditor({ resource: res.stat.resource, options: { pinned: true } }).done(null, errors.onUnexpectedError); + } + }, error => this.onError(error)); + }); }); }); - }); - return sequence(importPromisesFactory); + return sequence(importPromisesFactory); + }); }); } diff --git a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts index 242683e3f09..2d2d2445603 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts @@ -914,18 +914,22 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { if (folders.length > 0) { // If we are in no-workspace context, ask for confirmation to create a workspace - let confirmed = true; + let confirmedPromise = TPromise.wrap(true); if (this.contextService.getWorkbenchState() !== WorkbenchState.WORKSPACE) { - confirmed = this.messageService.confirm({ + confirmedPromise = this.messageService.confirm({ message: folders.length > 1 ? nls.localize('dropFolders', "Do you want to add the folders to the workspace?") : nls.localize('dropFolder', "Do you want to add the folder to the workspace?"), type: 'question', primaryButton: folders.length > 1 ? nls.localize('addFolders', "&&Add Folders") : nls.localize('addFolder', "&&Add Folder") }); } - if (confirmed) { - return this.workspaceEditingService.addFolders(folders); - } + return confirmedPromise.then(confirmed => { + if (confirmed) { + return this.workspaceEditingService.addFolders(folders); + } + + return void 0; + }); } // Handle dropped files (only support FileStat as target) @@ -1040,18 +1044,20 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { }; // Move with overwrite if the user confirms - if (this.messageService.confirm(confirm)) { - const targetDirty = this.textFileService.getDirty().filter(d => resources.isEqualOrParent(d, targetResource, !isLinux /* ignorecase */)); + return this.messageService.confirm(confirm).then(confirmed => { + if (confirmed) { + const targetDirty = this.textFileService.getDirty().filter(d => resources.isEqualOrParent(d, targetResource, !isLinux /* ignorecase */)); - // Make sure to revert all dirty in target first to be able to overwrite properly - return this.textFileService.revertAll(targetDirty, { soft: true /* do not attempt to load content from disk */ }).then(() => { + // Make sure to revert all dirty in target first to be able to overwrite properly + return this.textFileService.revertAll(targetDirty, { soft: true /* do not attempt to load content from disk */ }).then(() => { - // Then continue to do the move operation - return this.fileService.moveFile(source.resource, targetResource, true).then(onSuccess, error => onError(error, true)); - }); - } + // Then continue to do the move operation + return this.fileService.moveFile(source.resource, targetResource, true).then(onSuccess, error => onError(error, true)); + }); + } - return onError(); + return onError(); + }); } return onError(error, true); diff --git a/src/vs/workbench/parts/performance/electron-browser/startupProfiler.ts b/src/vs/workbench/parts/performance/electron-browser/startupProfiler.ts index 242c7c0e1c8..e8108e6af6c 100644 --- a/src/vs/workbench/parts/performance/electron-browser/startupProfiler.ts +++ b/src/vs/workbench/parts/performance/electron-browser/startupProfiler.ts @@ -59,36 +59,37 @@ class StartupProfiler implements IWorkbenchContribution { }).then(files => { const profileFiles = files.reduce((prev, cur) => `${prev}${join(dir, cur)}\n`, '\n'); - const primaryButton = this._messageService.confirm({ + return this._messageService.confirm({ type: 'info', message: localize('prof.message', "Successfully created profiles."), detail: localize('prof.detail', "Please create an issue and manually attach the following files:\n{0}", profileFiles), primaryButton: localize('prof.restartAndFileIssue', "Create Issue and Restart"), secondaryButton: localize('prof.restart', "Restart") - }); - - if (primaryButton) { - const action = this._instantiationService.createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL); - TPromise.join([ - this._windowsService.showItemInFolder(join(dir, files[0])), - action.run(`:warning: Make sure to **attach** these files from your *home*-directory: :warning:\n${files.map(file => `-\`${file}\``).join('\n')}`) - ]).then(() => { - // keep window stable until restart is selected - this._messageService.confirm({ - type: 'info', - message: localize('prof.thanks', "Thanks for helping us."), - detail: localize('prof.detail.restart', "A final restart is required to continue to use '{0}'. Again, thank you for your contribution.", this._environmentService.appNameLong), - primaryButton: localize('prof.restart', "Restart"), - secondaryButton: null + }).then(primaryButton => { + if (primaryButton) { + const action = this._instantiationService.createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL); + TPromise.join([ + this._windowsService.showItemInFolder(join(dir, files[0])), + action.run(`:warning: Make sure to **attach** these files from your *home*-directory: :warning:\n${files.map(file => `-\`${file}\``).join('\n')}`) + ]).then(() => { + // keep window stable until restart is selected + return this._messageService.confirm({ + type: 'info', + message: localize('prof.thanks', "Thanks for helping us."), + detail: localize('prof.detail.restart', "A final restart is required to continue to use '{0}'. Again, thank you for your contribution.", this._environmentService.appNameLong), + primaryButton: localize('prof.restart', "Restart"), + secondaryButton: null + }).then(() => { + // now we are ready to restart + this._windowsService.relaunch({ removeArgs }); + }); }); - // now we are ready to restart - this._windowsService.relaunch({ removeArgs }); - }); - } else { - // simply restart - this._windowsService.relaunch({ removeArgs }); - } + } else { + // simply restart + this._windowsService.relaunch({ removeArgs }); + } + }); }); } } diff --git a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts index 0c923fea0fb..ed16a20dac1 100644 --- a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts +++ b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts @@ -138,17 +138,19 @@ export class SettingsChangeRelauncher implements IWorkbenchContribution { private doConfirm(message: string, detail: string, primaryButton: string, confirmed: () => void): void { this.windowService.isFocused().then(focused => { if (focused) { - const confirm = this.messageService.confirm({ + return this.messageService.confirm({ type: 'info', message, detail, primaryButton + }).then(confirm => { + if (confirm) { + confirmed(); + } }); - - if (confirm) { - confirmed(); - } } + + return void 0; }); } diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 329d78f48fb..1fcb5e60400 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -398,18 +398,20 @@ export class SearchViewlet extends Viewlet { type: 'question' }; - if (this.messageService.confirm(confirmation)) { - this.searchWidget.setReplaceAllActionState(false); - this.viewModel.searchResult.replaceAll(progressRunner).then(() => { - progressRunner.done(); - this.clearMessage() - .p({ text: afterReplaceAllMessage }); - }, (error) => { - progressRunner.done(); - errors.isPromiseCanceledError(error); - this.messageService.show(Severity.Error, error); - }); - } + this.messageService.confirm(confirmation).then(confirmed => { + if (confirmed) { + this.searchWidget.setReplaceAllActionState(false); + this.viewModel.searchResult.replaceAll(progressRunner).then(() => { + progressRunner.done(); + this.clearMessage() + .p({ text: afterReplaceAllMessage }); + }, (error) => { + progressRunner.done(); + errors.isPromiseCanceledError(error); + this.messageService.show(Severity.Error, error); + }); + } + }); } private buildAfterReplaceAllMessage(occurrences: number, fileCount: number, replaceValue?: string) { diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index d3bf4705c50..3f1d2c26a6b 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -1666,40 +1666,50 @@ class TaskService implements ITaskService { if (this._taskSystem instanceof TerminalTaskSystem) { return false; } - if (this._taskSystem.canAutoTerminate() || this.messageService.confirm({ - message: nls.localize('TaskSystem.runningTask', 'There is a task running. Do you want to terminate it?'), - primaryButton: nls.localize({ key: 'TaskSystem.terminateTask', comment: ['&& denotes a mnemonic'] }, "&&Terminate Task"), - type: 'question' - })) { - return this._taskSystem.terminateAll().then((responses) => { - let success = true; - let code: number = undefined; - for (let response of responses) { - success = success && response.success; - // We only have a code in the old output runner which only has one task - // So we can use the first code. - if (code === void 0 && response.code !== void 0) { - code = response.code; - } - } - if (success) { - this._taskSystem = null; - this.disposeTaskSystemListeners(); - return false; // no veto - } else if (code && code === TerminateResponseCode.ProcessNotFound) { - return !this.messageService.confirm({ - message: nls.localize('TaskSystem.noProcess', 'The launched task doesn\'t exist anymore. If the task spawned background processes exiting VS Code might result in orphaned processes. To avoid this start the last background process with a wait flag.'), - primaryButton: nls.localize({ key: 'TaskSystem.exitAnyways', comment: ['&& denotes a mnemonic'] }, "&&Exit Anyways"), - type: 'info' - }); - } - return true; // veto - }, (err) => { - return true; // veto - }); + + let terminatePromise: TPromise; + if (this._taskSystem.canAutoTerminate()) { + terminatePromise = TPromise.wrap(true); } else { - return true; // veto + terminatePromise = this.messageService.confirm({ + message: nls.localize('TaskSystem.runningTask', 'There is a task running. Do you want to terminate it?'), + primaryButton: nls.localize({ key: 'TaskSystem.terminateTask', comment: ['&& denotes a mnemonic'] }, "&&Terminate Task"), + type: 'question' + }); } + + return terminatePromise.then(terminate => { + if (terminate) { + return this._taskSystem.terminateAll().then((responses) => { + let success = true; + let code: number = undefined; + for (let response of responses) { + success = success && response.success; + // We only have a code in the old output runner which only has one task + // So we can use the first code. + if (code === void 0 && response.code !== void 0) { + code = response.code; + } + } + if (success) { + this._taskSystem = null; + this.disposeTaskSystemListeners(); + return false; // no veto + } else if (code && code === TerminateResponseCode.ProcessNotFound) { + return this.messageService.confirm({ + message: nls.localize('TaskSystem.noProcess', 'The launched task doesn\'t exist anymore. If the task spawned background processes exiting VS Code might result in orphaned processes. To avoid this start the last background process with a wait flag.'), + primaryButton: nls.localize({ key: 'TaskSystem.exitAnyways', comment: ['&& denotes a mnemonic'] }, "&&Exit Anyways"), + type: 'info' + }).then(confirmed => !confirmed); + } + return true; // veto + }, (err) => { + return true; // veto + }); + } + + return true; // veto + }); } private getConfigureAction(code: TaskErrors): Action { diff --git a/src/vs/workbench/parts/terminal/common/terminalService.ts b/src/vs/workbench/parts/terminal/common/terminalService.ts index 55e392cb988..53307a09267 100644 --- a/src/vs/workbench/parts/terminal/common/terminalService.ts +++ b/src/vs/workbench/parts/terminal/common/terminalService.ts @@ -70,7 +70,7 @@ export abstract class TerminalService implements ITerminalService { this.onInstanceDisposed((terminalInstance) => { this._removeInstance(terminalInstance); }); } - protected abstract _showTerminalCloseConfirmation(): boolean; + protected abstract _showTerminalCloseConfirmation(): TPromise; public abstract createInstance(shell?: IShellLaunchConfig, wasNewTerminalAction?: boolean): ITerminalInstance; public abstract getActiveOrCreateInstance(wasNewTerminalAction?: boolean): ITerminalInstance; public abstract selectDefaultWindowsShell(): TPromise; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts index 871138e90c6..24eeeb6e16b 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts @@ -213,7 +213,7 @@ export class TerminalService extends AbstractTerminalService implements ITermina return activeInstance ? activeInstance : this.createInstance(undefined, wasNewTerminalAction); } - protected _showTerminalCloseConfirmation(): boolean { + protected _showTerminalCloseConfirmation(): TPromise { let message; if (this.terminalInstances.length === 1) { message = nls.localize('terminalService.terminalCloseConfirmationSingular', "There is an active terminal session, do you want to kill it?"); @@ -221,10 +221,10 @@ export class TerminalService extends AbstractTerminalService implements ITermina message = nls.localize('terminalService.terminalCloseConfirmationPlural', "There are {0} active terminal sessions, do you want to kill them?", this.terminalInstances.length); } - return !this._messageService.confirm({ + return this._messageService.confirm({ message, type: 'warning', - }); + }).then(confirmed => !confirmed); } public setContainers(panelContainer: HTMLElement, terminalContainer: HTMLElement): void { diff --git a/src/vs/workbench/services/message/browser/messageService.ts b/src/vs/workbench/services/message/browser/messageService.ts index 77a2a3ceb86..26b29d8e4c0 100644 --- a/src/vs/workbench/services/message/browser/messageService.ts +++ b/src/vs/workbench/services/message/browser/messageService.ts @@ -136,17 +136,22 @@ export class WorkbenchMessageService implements IMessageService { } } - public confirm(confirmation: IConfirmation): boolean { + public confirm(confirmation: IConfirmation): TPromise { let messageText = confirmation.message; if (confirmation.detail) { messageText = messageText + '\n\n' + confirmation.detail; } - return window.confirm(messageText); + return TPromise.wrap(window.confirm(messageText)); } public confirmWithCheckbox(confirmation: IConfirmation): TPromise { - return TPromise.as({ confirmed: this.confirm(confirmation) } as IConfirmationResult); + return this.confirm(confirmation).then(confirmed => { + return { + confirmed, + checkboxChecked: false // unsupported + } as IConfirmationResult; + }); } public dispose(): void { diff --git a/src/vs/workbench/services/message/electron-browser/messageService.ts b/src/vs/workbench/services/message/electron-browser/messageService.ts index 079ccb80cac..17c78d0dd22 100644 --- a/src/vs/workbench/services/message/electron-browser/messageService.ts +++ b/src/vs/workbench/services/message/electron-browser/messageService.ts @@ -48,12 +48,10 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe }); } - public confirm(confirmation: IConfirmation): boolean { + public confirm(confirmation: IConfirmation): TPromise { const opts = this.getConfirmOptions(confirmation); - const result = this.showMessageBox(opts); - - return result === 0 ? true : false; + return this.showMessageBox(opts).then(result => result === 0 ? true : false); } private getConfirmOptions(confirmation: IConfirmation): Electron.MessageBoxOptions { @@ -97,7 +95,8 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe public choose(severity: Severity, message: string, options: string[], cancelId: number, modal: boolean = false): TPromise { if (modal) { const type: 'none' | 'info' | 'error' | 'question' | 'warning' = severity === Severity.Info ? 'question' : severity === Severity.Error ? 'error' : severity === Severity.Warning ? 'warning' : 'none'; - return TPromise.wrap(this.showMessageBox({ message, buttons: options, type, cancelId })); + + return this.showMessageBox({ message, buttons: options, type, cancelId }); } let onCancel: () => void = null; @@ -116,11 +115,10 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe return promise; } - private showMessageBox(opts: Electron.MessageBoxOptions): number { + private showMessageBox(opts: Electron.MessageBoxOptions): TPromise { opts = this.massageMessageBoxOptions(opts); - const result = this.windowService.showMessageBox(opts); - return isLinux ? opts.buttons.length - result - 1 : result; + return this.windowService.showMessageBox(opts).then(result => isLinux ? opts.buttons.length - result - 1 : result); } private massageMessageBoxOptions(opts: Electron.MessageBoxOptions): Electron.MessageBoxOptions { diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index 27f62da126d..2c9af4b5615 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -95,9 +95,9 @@ export abstract class TextFileService implements ITextFileService { abstract resolveTextContent(resource: URI, options?: IResolveContentOptions): TPromise; - abstract promptForPath(defaultPath: string): string; + abstract promptForPath(defaultPath: string): TPromise; - abstract confirmSave(resources?: URI[]): ConfirmResult; + abstract confirmSave(resources?: URI[]): TPromise; public get onAutoSaveConfigurationChange(): Event { return this._onAutoSaveConfigurationChange.event; @@ -254,35 +254,36 @@ export abstract class TextFileService implements ITextFileService { } private confirmBeforeShutdown(): boolean | TPromise { - const confirm = this.confirmSave(); + return this.confirmSave().then(confirm => { - // Save - if (confirm === ConfirmResult.SAVE) { - return this.saveAll(true /* includeUntitled */, { skipSaveParticipants: true }).then(result => { - if (result.results.some(r => !r.success)) { - return true; // veto if some saves failed - } + // Save + if (confirm === ConfirmResult.SAVE) { + return this.saveAll(true /* includeUntitled */, { skipSaveParticipants: true }).then(result => { + if (result.results.some(r => !r.success)) { + return true; // veto if some saves failed + } + + return this.noVeto({ cleanUpBackups: true }); + }); + } + + // Don't Save + else if (confirm === ConfirmResult.DONT_SAVE) { + + // Make sure to revert untitled so that they do not restore + // see https://github.com/Microsoft/vscode/issues/29572 + this.untitledEditorService.revertAll(); return this.noVeto({ cleanUpBackups: true }); - }); - } + } - // Don't Save - else if (confirm === ConfirmResult.DONT_SAVE) { + // Cancel + else if (confirm === ConfirmResult.CANCEL) { + return true; // veto + } - // Make sure to revert untitled so that they do not restore - // see https://github.com/Microsoft/vscode/issues/29572 - this.untitledEditorService.revertAll(); - - return this.noVeto({ cleanUpBackups: true }); - } - - // Cancel - else if (confirm === ConfirmResult.CANCEL) { - return true; // veto - } - - return void 0; + return void 0; + }); } private noVeto(options: { cleanUpBackups: boolean }): boolean | TPromise { @@ -423,7 +424,7 @@ export abstract class TextFileService implements ITextFileService { private doSaveAll(fileResources: URI[], untitledResources: URI[], options?: ISaveOptions): TPromise { // Handle files first that can just be saved - return this.doSaveAllFiles(fileResources, options).then(result => { + return this.doSaveAllFiles(fileResources, options).then(async result => { // Preflight for untitled to handle cancellation from the dialog const targetsForUntitled: URI[] = []; @@ -439,7 +440,7 @@ export abstract class TextFileService implements ITextFileService { // Otherwise ask user else { - targetPath = this.promptForPath(this.suggestFileName(untitled)); + targetPath = await this.promptForPath(this.suggestFileName(untitled)); if (!targetPath) { return TPromise.as({ results: [...fileResources, ...untitledResources].map(r => { @@ -529,29 +530,37 @@ export abstract class TextFileService implements ITextFileService { public saveAs(resource: URI, target?: URI, options?: ISaveOptions): TPromise { // Get to target resource - if (!target) { + let targetPromise: TPromise; + if (target) { + targetPromise = TPromise.wrap(target); + } else { let dialogPath = resource.fsPath; if (resource.scheme === UNTITLED_SCHEMA) { dialogPath = this.suggestFileName(resource); } - const pathRaw = this.promptForPath(dialogPath); - if (pathRaw) { - target = URI.file(pathRaw); + targetPromise = this.promptForPath(dialogPath).then(pathRaw => { + if (pathRaw) { + return URI.file(pathRaw); + } + + return void 0; + }); + } + + return targetPromise.then(target => { + if (!target) { + return TPromise.as(null); // user canceled } - } - if (!target) { - return TPromise.as(null); // user canceled - } + // Just save if target is same as models own resource + if (resource.toString() === target.toString()) { + return this.save(resource, options).then(() => resource); + } - // Just save if target is same as models own resource - if (resource.toString() === target.toString()) { - return this.save(resource, options).then(() => resource); - } - - // Do it - return this.doSaveAs(resource, target, options); + // Do it + return this.doSaveAs(resource, target, options); + }); } private doSaveAs(resource: URI, target?: URI, options?: ISaveOptions): TPromise { diff --git a/src/vs/workbench/services/textfile/common/textfiles.ts b/src/vs/workbench/services/textfile/common/textfiles.ts index 7ffbcd960ad..9ac553c90cc 100644 --- a/src/vs/workbench/services/textfile/common/textfiles.ts +++ b/src/vs/workbench/services/textfile/common/textfiles.ts @@ -290,7 +290,7 @@ export interface ITextFileService extends IDisposable { * @param resources the resources of the files to ask for confirmation or null if * confirming for all dirty resources. */ - confirmSave(resources?: URI[]): ConfirmResult; + confirmSave(resources?: URI[]): TPromise; /** * Convinient fast access to the current auto save mode. diff --git a/src/vs/workbench/services/textfile/electron-browser/textFileService.ts b/src/vs/workbench/services/textfile/electron-browser/textFileService.ts index 58049539538..fc2e790bfb1 100644 --- a/src/vs/workbench/services/textfile/electron-browser/textFileService.ts +++ b/src/vs/workbench/services/textfile/electron-browser/textFileService.ts @@ -69,14 +69,14 @@ export class TextFileService extends AbstractTextFileService { }); } - public confirmSave(resources?: URI[]): ConfirmResult { + public confirmSave(resources?: URI[]): TPromise { if (this.environmentService.isExtensionDevelopment) { - return ConfirmResult.DONT_SAVE; // no veto when we are in extension dev mode because we cannot assum we run interactive (e.g. tests) + return TPromise.wrap(ConfirmResult.DONT_SAVE); // no veto when we are in extension dev mode because we cannot assum we run interactive (e.g. tests) } const resourcesToConfirm = this.getDirty(resources); if (resourcesToConfirm.length === 0) { - return ConfirmResult.DONT_SAVE; + return TPromise.wrap(ConfirmResult.DONT_SAVE); } const message = [ @@ -130,12 +130,10 @@ export class TextFileService extends AbstractTextFileService { opts.defaultId = 2; } - const choice = this.windowService.showMessageBox(opts); - - return buttons[choice].result; + return this.windowService.showMessageBox(opts).then(choice => buttons[choice].result); } - public promptForPath(defaultPath: string): string { + public promptForPath(defaultPath: string): TPromise { return this.windowService.showSaveDialog(this.getSaveDialogOptions(defaultPath)); } diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 2d36b27c3b0..6898a77e746 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -214,12 +214,12 @@ export class TestTextFileService extends TextFileService { }); } - public promptForPath(defaultPath: string): string { - return this.promptPath; + public promptForPath(defaultPath: string): TPromise { + return TPromise.wrap(this.promptPath); } - public confirmSave(resources?: URI[]): ConfirmResult { - return this.confirmResult; + public confirmSave(resources?: URI[]): TPromise { + return TPromise.wrap(this.confirmResult); } public onFilesConfigurationChange(configuration: any): void { @@ -328,8 +328,8 @@ export class TestMessageService implements IMessageService { // No-op } - public confirm(confirmation: IConfirmation): boolean { - return false; + public confirm(confirmation: IConfirmation): TPromise { + return TPromise.wrap(false); } public confirmWithCheckbox(confirmation: IConfirmation): Promise { @@ -961,20 +961,20 @@ export class TestWindowService implements IWindowService { return TPromise.as(void 0); } - showMessageBox(options: Electron.MessageBoxOptions): number { - return 0; + showMessageBox(options: Electron.MessageBoxOptions): TPromise { + return TPromise.wrap(0); } - showMessageBoxWithCheckbox(options: Electron.MessageBoxOptions): Promise { + showMessageBoxWithCheckbox(options: Electron.MessageBoxOptions): TPromise { return TPromise.as(void 0); } - showSaveDialog(options: Electron.SaveDialogOptions): string { - return void 0; + showSaveDialog(options: Electron.SaveDialogOptions): TPromise { + return TPromise.wrap(void 0); } - showOpenDialog(options: Electron.OpenDialogOptions): string[] { - return void 0; + showOpenDialog(options: Electron.OpenDialogOptions): TPromise { + return TPromise.wrap(void 0); } updateTouchBar(items: ICommandAction[][]): Promise { From babf0b6dc1bd5b0f2acc052c19cdb06e1637ffff Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 13 Dec 2017 12:56:38 +0100 Subject: [PATCH 197/615] fix NPE from #40110 --- src/vs/editor/contrib/folding/folding.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/contrib/folding/folding.ts b/src/vs/editor/contrib/folding/folding.ts index b7c02090042..4acca4efbcf 100644 --- a/src/vs/editor/contrib/folding/folding.ts +++ b/src/vs/editor/contrib/folding/folding.ts @@ -332,12 +332,15 @@ abstract class FoldingAction extends EditorAction { if (!foldingController) { return; } - this.reportTelemetry(accessor, editor); - return foldingController.getFoldingModel().then(foldingModel => { - if (foldingModel) { - this.invoke(foldingController, foldingModel, editor, args); - } - }); + let foldingModelPromise = foldingController.getFoldingModel(); + if (foldingModelPromise) { + this.reportTelemetry(accessor, editor); + return foldingModelPromise.then(foldingModel => { + if (foldingModel) { + this.invoke(foldingController, foldingModel, editor, args); + } + }); + } } protected getSelectedLines(editor: ICodeEditor) { From fb278070789bae772bb6490d62376c2e9058dff2 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 12:38:16 +0100 Subject: [PATCH 198/615] Mark messages that need reviving (#36972) --- src/vs/base/common/marshalling.ts | 3 +- .../services/extensions/node/rpcProtocol.ts | 46 ++++++++++++++++--- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/src/vs/base/common/marshalling.ts b/src/vs/base/common/marshalling.ts index ab5adf12626..2c7acfe7d82 100644 --- a/src/vs/base/common/marshalling.ts +++ b/src/vs/base/common/marshalling.ts @@ -32,7 +32,7 @@ function replacer(key: string, value: any): any { return value; } -function revive(obj: any, depth: number): any { +export function revive(obj: any, depth: number): any { if (!obj || depth > 200) { return obj; @@ -55,4 +55,3 @@ function revive(obj: any, depth: number): any { return obj; } - diff --git a/src/vs/workbench/services/extensions/node/rpcProtocol.ts b/src/vs/workbench/services/extensions/node/rpcProtocol.ts index 3fcd57403af..06d97fe5bc7 100644 --- a/src/vs/workbench/services/extensions/node/rpcProtocol.ts +++ b/src/vs/workbench/services/extensions/node/rpcProtocol.ts @@ -47,7 +47,14 @@ export class RPCProtocol { console.warn('Received message after being shutdown: ', rawmsg); return; } - let msg = marshalling.parse(rawmsg); + + let parsedRawMsg = JSON.parse(rawmsg); + let msg: any; + if (parsedRawMsg.revive) { + msg = marshalling.revive(parsedRawMsg, 0); + } else { + msg = parsedRawMsg; + } if (msg.seq) { if (!this._pendingRPCReplies.hasOwnProperty(msg.seq)) { @@ -175,24 +182,49 @@ class RPCMultiplexer { class MessageFactory { public static cancel(req: string): string { - return `{"cancel":"${req}"}`; + return `{"revive":0,"cancel":"${req}"}`; } public static request(req: string, rpcId: string, method: string, args: any[]): string { - return `{"req":"${req}","rpcId":"${rpcId}","method":"${method}","args":${marshalling.stringify(args)}}`; + return `{"revive":1,"req":"${req}","rpcId":"${rpcId}","method":"${method}","args":${marshalling.stringify(args)}}`; } public static replyOK(req: string, res: any): string { if (typeof res === 'undefined') { - return `{"seq":"${req}"}`; + return `{"revive":0,"seq":"${req}"}`; } - return `{"seq":"${req}","res":${marshalling.stringify(res)}}`; + return `{"revive":1,"seq":"${req}","res":${marshalling.stringify(res)}}`; } public static replyErr(req: string, err: any): string { if (typeof err === 'undefined') { - return `{"seq":"${req}","err":null}`; + return `{"revive":0,"seq":"${req}","err":null}`; } - return `{"seq":"${req}","err":${marshalling.stringify(errors.transformErrorForSerialization(err))}}`; + return `{"revive":1,"seq":"${req}","err":${marshalling.stringify(errors.transformErrorForSerialization(err))}}`; } } + +// interface RequestMessage { +// revive: number; +// req: string; +// rpcId: string; +// method: string; +// args: any[]; +// } + +// interface CancelMessage { +// revive: number; +// cancel: string; +// } + +// interface ReplyOKMessage { +// revive: number; +// seq: string; +// res?: any; +// } + +// interface ReplyErrMessage { +// revive: number; +// seq: string; +// err: any; +// } From cc549ceedc991de865007df98e1a7a175b9de4ea Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 12:44:11 +0100 Subject: [PATCH 199/615] Add better typing for RPC messages --- .../services/extensions/node/rpcProtocol.ts | 71 ++++++++++--------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/src/vs/workbench/services/extensions/node/rpcProtocol.ts b/src/vs/workbench/services/extensions/node/rpcProtocol.ts index 06d97fe5bc7..535a60af10d 100644 --- a/src/vs/workbench/services/extensions/node/rpcProtocol.ts +++ b/src/vs/workbench/services/extensions/node/rpcProtocol.ts @@ -48,15 +48,15 @@ export class RPCProtocol { return; } - let parsedRawMsg = JSON.parse(rawmsg); - let msg: any; + let parsedRawMsg = JSON.parse(rawmsg); + let msg: RPCMessage; if (parsedRawMsg.revive) { msg = marshalling.revive(parsedRawMsg, 0); } else { msg = parsedRawMsg; } - if (msg.seq) { + if (isReplyMessage(msg)) { if (!this._pendingRPCReplies.hasOwnProperty(msg.seq)) { console.warn('Got reply to unknown seq'); return; @@ -64,7 +64,7 @@ export class RPCProtocol { let reply = this._pendingRPCReplies[msg.seq]; delete this._pendingRPCReplies[msg.seq]; - if (msg.err) { + if (isReplyErrMessage(msg)) { let err = msg.err; if (msg.err.$isError) { err = new Error(); @@ -80,25 +80,20 @@ export class RPCProtocol { return; } - if (msg.cancel) { + if (isCancelMessage(msg)) { if (this._invokedHandlers[msg.cancel]) { this._invokedHandlers[msg.cancel].cancel(); } return; } - if (msg.err) { - console.error(msg.err); - return; - } - - let rpcId = msg.rpcId; + const rpcId = msg.rpcId; if (!this._bigHandler) { throw new Error('got message before big handler attached!'); } - let req = msg.req; + const req = msg.req; this._invokedHandlers[req] = this._invokeHandler(rpcId, msg.method, msg.args); @@ -204,27 +199,37 @@ class MessageFactory { } } -// interface RequestMessage { -// revive: number; -// req: string; -// rpcId: string; -// method: string; -// args: any[]; -// } +interface RequestMessage { + revive: number; + req: string; + rpcId: string; + method: string; + args: any[]; +} -// interface CancelMessage { -// revive: number; -// cancel: string; -// } +interface CancelMessage { + revive: number; + cancel: string; +} +function isCancelMessage(msg: RPCMessage): msg is CancelMessage { + return !!(msg).cancel; +} -// interface ReplyOKMessage { -// revive: number; -// seq: string; -// res?: any; -// } +interface ReplyOKMessage { + revive: number; + seq: string; + res?: any; +} +interface ReplyErrMessage { + revive: number; + seq: string; + err: any; +} +function isReplyMessage(msg: RPCMessage): msg is ReplyOKMessage | ReplyErrMessage { + return !!(msg).seq; +} +function isReplyErrMessage(msg: ReplyOKMessage | ReplyErrMessage): msg is ReplyErrMessage { + return !!(msg).err; +} -// interface ReplyErrMessage { -// revive: number; -// seq: string; -// err: any; -// } +type RPCMessage = RequestMessage | CancelMessage | ReplyOKMessage | ReplyErrMessage; From 5761b7320b7d898dc57e346bef4a5eb89e977265 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 13:17:18 +0100 Subject: [PATCH 200/615] Improve shape of RPC messages (#36972) --- .../services/extensions/node/rpcProtocol.ts | 196 ++++++++++-------- 1 file changed, 114 insertions(+), 82 deletions(-) diff --git a/src/vs/workbench/services/extensions/node/rpcProtocol.ts b/src/vs/workbench/services/extensions/node/rpcProtocol.ts index 535a60af10d..4def9c7d80d 100644 --- a/src/vs/workbench/services/extensions/node/rpcProtocol.ts +++ b/src/vs/workbench/services/extensions/node/rpcProtocol.ts @@ -44,68 +44,90 @@ export class RPCProtocol { private _receiveOneMessage(rawmsg: string): void { if (this._isDisposed) { - console.warn('Received message after being shutdown: ', rawmsg); return; } - let parsedRawMsg = JSON.parse(rawmsg); - let msg: RPCMessage; - if (parsedRawMsg.revive) { - msg = marshalling.revive(parsedRawMsg, 0); - } else { - msg = parsedRawMsg; + let msg = JSON.parse(rawmsg); + + switch (msg.type) { + case MessageType.Request: + this._receiveRequest(msg); + break; + case MessageType.FancyRequest: + this._receiveRequest(marshalling.revive(msg, 0)); + break; + case MessageType.Cancel: + this._receiveCancel(msg); + break; + case MessageType.Reply: + this._receiveReply(msg); + break; + case MessageType.FancyReply: + this._receiveReply(marshalling.revive(msg, 0)); + break; + case MessageType.ReplyErr: + this._receiveReplyErr(msg); + break; } + } - if (isReplyMessage(msg)) { - if (!this._pendingRPCReplies.hasOwnProperty(msg.seq)) { - console.warn('Got reply to unknown seq'); - return; - } - let reply = this._pendingRPCReplies[msg.seq]; - delete this._pendingRPCReplies[msg.seq]; - - if (isReplyErrMessage(msg)) { - let err = msg.err; - if (msg.err.$isError) { - err = new Error(); - err.name = msg.err.name; - err.message = msg.err.message; - err.stack = msg.err.stack; - } - reply.resolveErr(err); - return; - } - - reply.resolveOk(msg.res); - return; - } - - if (isCancelMessage(msg)) { - if (this._invokedHandlers[msg.cancel]) { - this._invokedHandlers[msg.cancel].cancel(); - } - return; - } - - const rpcId = msg.rpcId; - + private _receiveRequest(msg: RequestMessage | FancyRequestMessage): void { if (!this._bigHandler) { throw new Error('got message before big handler attached!'); } - const req = msg.req; + const callId = msg.id; + const proxyId = msg.proxyId; - this._invokedHandlers[req] = this._invokeHandler(rpcId, msg.method, msg.args); + this._invokedHandlers[callId] = this._invokeHandler(proxyId, msg.method, msg.args); - this._invokedHandlers[req].then((r) => { - delete this._invokedHandlers[req]; - this._multiplexor.send(MessageFactory.replyOK(req, r)); + this._invokedHandlers[callId].then((r) => { + delete this._invokedHandlers[callId]; + this._multiplexor.send(MessageFactory.replyOK(callId, r)); }, (err) => { - delete this._invokedHandlers[req]; - this._multiplexor.send(MessageFactory.replyErr(req, err)); + delete this._invokedHandlers[callId]; + this._multiplexor.send(MessageFactory.replyErr(callId, err)); }); } + private _receiveCancel(msg: CancelMessage): void { + const callId = msg.id; + if (this._invokedHandlers[callId]) { + this._invokedHandlers[callId].cancel(); + } + } + + private _receiveReply(msg: ReplyMessage | FancyReplyMessage): void { + const callId = msg.id; + if (!this._pendingRPCReplies.hasOwnProperty(callId)) { + return; + } + + const pendingReply = this._pendingRPCReplies[callId]; + delete this._pendingRPCReplies[callId]; + + pendingReply.resolveOk(msg.res); + } + + private _receiveReplyErr(msg: ReplyErrMessage): void { + const callId = msg.id; + if (!this._pendingRPCReplies.hasOwnProperty(callId)) { + return; + } + + const pendingReply = this._pendingRPCReplies[callId]; + delete this._pendingRPCReplies[callId]; + + let err: Error = null; + if (msg.err && msg.err.$isError) { + err = new Error(); + err.name = msg.err.name; + err.message = msg.err.message; + err.stack = msg.err.stack; + } + pendingReply.resolveErr(err); + } + private _invokeHandler(proxyId: string, methodName: string, args: any[]): TPromise { try { return TPromise.as(this._bigHandler.invoke(proxyId, methodName, args)); @@ -177,59 +199,69 @@ class RPCMultiplexer { class MessageFactory { public static cancel(req: string): string { - return `{"revive":0,"cancel":"${req}"}`; + return `{"type":${MessageType.Cancel},"id":"${req}"}`; } public static request(req: string, rpcId: string, method: string, args: any[]): string { - return `{"revive":1,"req":"${req}","rpcId":"${rpcId}","method":"${method}","args":${marshalling.stringify(args)}}`; + return `{"type":${MessageType.FancyRequest},"id":"${req}","proxyId":"${rpcId}","method":"${method}","args":${marshalling.stringify(args)}}`; } public static replyOK(req: string, res: any): string { if (typeof res === 'undefined') { - return `{"revive":0,"seq":"${req}"}`; + return `{"type":${MessageType.Reply},"id":"${req}"}`; } - return `{"revive":1,"seq":"${req}","res":${marshalling.stringify(res)}}`; + return `{"type":${MessageType.FancyReply},"id":"${req}","res":${marshalling.stringify(res)}}`; } public static replyErr(req: string, err: any): string { - if (typeof err === 'undefined') { - return `{"revive":0,"seq":"${req}","err":null}`; + if (err instanceof Error) { + return `{"type":${MessageType.ReplyErr},"id":"${req}","err":${JSON.stringify(errors.transformErrorForSerialization(err))}}`; } - return `{"revive":1,"seq":"${req}","err":${marshalling.stringify(errors.transformErrorForSerialization(err))}}`; + return `{"type":${MessageType.ReplyErr},"id":"${req}","err":null}`; } } -interface RequestMessage { - revive: number; - req: string; - rpcId: string; +export const enum MessageType { + Request = 1, + FancyRequest = 2, + Cancel = 3, + Reply = 4, + FancyReply = 5, + ReplyErr = 6 +} + +class RequestMessage { + type: MessageType.Request; + id: string; + proxyId: string; method: string; args: any[]; } - -interface CancelMessage { - revive: number; - cancel: string; +class FancyRequestMessage { + type: MessageType.FancyRequest; + id: string; + proxyId: string; + method: string; + args: any[]; } -function isCancelMessage(msg: RPCMessage): msg is CancelMessage { - return !!(msg).cancel; +class CancelMessage { + type: MessageType.Cancel; + id: string; +} +class ReplyMessage { + type: MessageType.Reply; + id: string; + res: any; +} +class FancyReplyMessage { + type: MessageType.FancyReply; + id: string; + res: any; +} +class ReplyErrMessage { + type: MessageType.ReplyErr; + id: string; + err: errors.SerializedError; } -interface ReplyOKMessage { - revive: number; - seq: string; - res?: any; -} -interface ReplyErrMessage { - revive: number; - seq: string; - err: any; -} -function isReplyMessage(msg: RPCMessage): msg is ReplyOKMessage | ReplyErrMessage { - return !!(msg).seq; -} -function isReplyErrMessage(msg: ReplyOKMessage | ReplyErrMessage): msg is ReplyErrMessage { - return !!(msg).err; -} - -type RPCMessage = RequestMessage | CancelMessage | ReplyOKMessage | ReplyErrMessage; +type RPCMessage = RequestMessage | FancyRequestMessage | CancelMessage | ReplyMessage | FancyReplyMessage | ReplyErrMessage; From 64375e467af826f74c9f813a53ec4b62b188e6a5 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 13:45:13 +0100 Subject: [PATCH 201/615] Allow for messages not using marshalling to flow through rpcProtocol (#36972) --- .../services/extensions/node/rpcProtocol.ts | 42 +++++++++++++++---- .../thread/node/abstractThreadService.ts | 2 +- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/services/extensions/node/rpcProtocol.ts b/src/vs/workbench/services/extensions/node/rpcProtocol.ts index 4def9c7d80d..ea7e8f93f46 100644 --- a/src/vs/workbench/services/extensions/node/rpcProtocol.ts +++ b/src/vs/workbench/services/extensions/node/rpcProtocol.ts @@ -78,12 +78,17 @@ export class RPCProtocol { const callId = msg.id; const proxyId = msg.proxyId; + const isFancy = (msg.type === MessageType.FancyRequest); // a fancy request gets a fancy reply this._invokedHandlers[callId] = this._invokeHandler(proxyId, msg.method, msg.args); this._invokedHandlers[callId].then((r) => { delete this._invokedHandlers[callId]; - this._multiplexor.send(MessageFactory.replyOK(callId, r)); + if (isFancy) { + this._multiplexor.send(MessageFactory.fancyReplyOK(callId, r)); + } else { + this._multiplexor.send(MessageFactory.replyOK(callId, r)); + } }, (err) => { delete this._invokedHandlers[callId]; this._multiplexor.send(MessageFactory.replyErr(callId, err)); @@ -136,19 +141,31 @@ export class RPCProtocol { } } - public callOnRemote(proxyId: string, methodName: string, args: any[]): TPromise { + public remoteCall(proxyId: string, methodName: string, args: any[]): TPromise { + return this._remoteCall(proxyId, methodName, args, false); + } + + public fancyRemoteCall(proxyId: string, methodName: string, args: any[]): TPromise { + return this._remoteCall(proxyId, methodName, args, true); + } + + private _remoteCall(proxyId: string, methodName: string, args: any[], isFancy: boolean): TPromise { if (this._isDisposed) { return TPromise.wrapError(errors.canceled()); } - let req = String(++this._lastMessageId); - let result = new LazyPromise(() => { - this._multiplexor.send(MessageFactory.cancel(req)); + const callId = String(++this._lastMessageId); + const result = new LazyPromise(() => { + this._multiplexor.send(MessageFactory.cancel(callId)); }); - this._pendingRPCReplies[req] = result; + this._pendingRPCReplies[callId] = result; - this._multiplexor.send(MessageFactory.request(req, proxyId, methodName, args)); + if (isFancy) { + this._multiplexor.send(MessageFactory.fancyRequest(callId, proxyId, methodName, args)); + } else { + this._multiplexor.send(MessageFactory.request(callId, proxyId, methodName, args)); + } return result; } @@ -203,10 +220,21 @@ class MessageFactory { } public static request(req: string, rpcId: string, method: string, args: any[]): string { + return `{"type":${MessageType.Request},"id":"${req}","proxyId":"${rpcId}","method":"${method}","args":${JSON.stringify(args)}}`; + } + + public static fancyRequest(req: string, rpcId: string, method: string, args: any[]): string { return `{"type":${MessageType.FancyRequest},"id":"${req}","proxyId":"${rpcId}","method":"${method}","args":${marshalling.stringify(args)}}`; } public static replyOK(req: string, res: any): string { + if (typeof res === 'undefined') { + return `{"type":${MessageType.Reply},"id":"${req}"}`; + } + return `{"type":${MessageType.Reply},"id":"${req}","res":${JSON.stringify(res)}}`; + } + + public static fancyReplyOK(req: string, res: any): string { if (typeof res === 'undefined') { return `{"type":${MessageType.Reply},"id":"${req}"}`; } diff --git a/src/vs/workbench/services/thread/node/abstractThreadService.ts b/src/vs/workbench/services/thread/node/abstractThreadService.ts index 7bc4ba3b38d..0170bbab08f 100644 --- a/src/vs/workbench/services/thread/node/abstractThreadService.ts +++ b/src/vs/workbench/services/thread/node/abstractThreadService.ts @@ -81,6 +81,6 @@ export abstract class AbstractThreadService implements IDispatcher { } private _callOnRemote(proxyId: string, methodName: string, args: any[]): TPromise { - return this._rpcProtocol.callOnRemote(proxyId, methodName, args); + return this._rpcProtocol.fancyRemoteCall(proxyId, methodName, args); } } From 068f7bb9dba363ecd8e7322851bcb7607201862e Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 15:07:41 +0100 Subject: [PATCH 202/615] Simplify RPCProtocol usage (#36972) --- src/vs/workbench/node/extensionHostMain.ts | 5 ++-- src/vs/workbench/node/extensionHostProcess.ts | 8 ++--- .../electron-browser/extensionService.ts | 26 ++++++++++++++++- .../thread/electron-browser/threadService.ts | 29 +------------------ 4 files changed, 32 insertions(+), 36 deletions(-) diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index 952ef7e4f96..97f8d8cd38c 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -26,6 +26,7 @@ import { EnvironmentService } from 'vs/platform/environment/node/environmentServ import { createLogService } from 'vs/platform/log/node/spdlogService'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ILogService } from 'vs/platform/log/common/log'; +import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; // const nativeExit = process.exit.bind(process); function patchProcess(allowExit: boolean) { @@ -80,7 +81,7 @@ export class ExtensionHostMain { private _logService: ILogService; private disposables: IDisposable[] = []; - constructor(rpcProtocol: RPCProtocol, initData: IInitData) { + constructor(protocol: IMessagePassingProtocol, initData: IInitData) { this._environment = initData.environment; this._workspace = initData.workspace; @@ -88,7 +89,7 @@ export class ExtensionHostMain { patchProcess(allowExit); // services - const threadService = new ExtHostThreadService(rpcProtocol); + const threadService = new ExtHostThreadService(new RPCProtocol(protocol)); const extHostWorkspace = new ExtHostWorkspace(threadService, initData.workspace); const environmentService = new EnvironmentService(initData.args, initData.execPath); this._logService = createLogService(`exthost${initData.windowId}`, environmentService); diff --git a/src/vs/workbench/node/extensionHostProcess.ts b/src/vs/workbench/node/extensionHostProcess.ts index a2e904f9625..b0eac4b06f4 100644 --- a/src/vs/workbench/node/extensionHostProcess.ts +++ b/src/vs/workbench/node/extensionHostProcess.ts @@ -7,7 +7,6 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { ExtensionHostMain, exit } from 'vs/workbench/node/extensionHostMain'; -import { RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol'; import { parse } from 'vs/base/common/marshalling'; import { IInitData } from 'vs/workbench/api/node/extHost.protocol'; import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; @@ -16,7 +15,7 @@ import { createConnection } from 'net'; import Event, { filterEvent } from 'vs/base/common/event'; interface IRendererConnection { - rpcProtocol: RPCProtocol; + protocol: IMessagePassingProtocol; initData: IInitData; } @@ -70,7 +69,6 @@ function connectToRenderer(protocol: IMessagePassingProtocol): Promise { return connectToRenderer(protocol); }).then(renderer => { // setup things - const extensionHostMain = new ExtensionHostMain(renderer.rpcProtocol, renderer.initData); + const extensionHostMain = new ExtensionHostMain(renderer.protocol, renderer.initData); onTerminate = () => extensionHostMain.terminate(); return extensionHostMain.start(); }).catch(err => console.error(err)); diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index 01f086dea8d..129dd59d699 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -41,9 +41,13 @@ import Event, { Emitter } from 'vs/base/common/event'; import { ExtensionHostProfiler } from 'vs/workbench/services/extensions/electron-browser/extensionHostProfiler'; import { ReloadWindowAction } from 'vs/workbench/electron-browser/actions'; import product from 'vs/platform/node/product'; +import * as strings from 'vs/base/common/strings'; const SystemExtensionsRoot = path.normalize(path.join(URI.parse(require.toUrl('')).fsPath, '..', 'extensions')); +// Enable to see detailed message communication between window and extension host +const logExtensionHostCommunication = false; + function messageWithSource(msg: IMessage): string { return messageWithSource2(msg.source, msg.message); } @@ -230,7 +234,11 @@ export class ExtensionService extends Disposable implements IExtensionService { private _createExtensionHostCustomers(protocol: IMessagePassingProtocol): ExtHostExtensionServiceShape { - this._extensionHostProcessThreadService = this._instantiationService.createInstance(MainThreadService, protocol); + if (logExtensionHostCommunication || this._environmentService.logExtensionHostCommunication) { + protocol = asLoggingProtocol(protocol); + } + + this._extensionHostProcessThreadService = new MainThreadService(protocol); const extHostContext: IExtHostContext = this._extensionHostProcessThreadService; // Named customers @@ -695,6 +703,22 @@ export class ExtensionService extends Disposable implements IExtensionService { } } +function asLoggingProtocol(protocol: IMessagePassingProtocol): IMessagePassingProtocol { + + protocol.onMessage(msg => { + console.log('%c[Extension \u2192 Window]%c[len: ' + strings.pad(msg.length, 5, ' ') + ']', 'color: darkgreen', 'color: grey', msg); + }); + + return { + onMessage: protocol.onMessage, + + send(msg: any) { + protocol.send(msg); + console.log('%c[Window \u2192 Extension]%c[len: ' + strings.pad(msg.length, 5, ' ') + ']', 'color: darkgreen', 'color: grey', msg); + } + }; +} + interface IExtensionCacheData { input: ExtensionScannerInput; result: IExtensionDescription[]; diff --git a/src/vs/workbench/services/thread/electron-browser/threadService.ts b/src/vs/workbench/services/thread/electron-browser/threadService.ts index 9bc4ac23210..45980d00c94 100644 --- a/src/vs/workbench/services/thread/electron-browser/threadService.ts +++ b/src/vs/workbench/services/thread/electron-browser/threadService.ts @@ -5,40 +5,13 @@ 'use strict'; -import * as strings from 'vs/base/common/strings'; import { RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol'; import { AbstractThreadService } from 'vs/workbench/services/thread/node/abstractThreadService'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; -// Enable to see detailed message communication between window and extension host -const logExtensionHostCommunication = false; - - -function asLoggingProtocol(protocol: IMessagePassingProtocol): IMessagePassingProtocol { - - protocol.onMessage(msg => { - console.log('%c[Extension \u2192 Window]%c[len: ' + strings.pad(msg.length, 5, ' ') + ']', 'color: darkgreen', 'color: grey', msg); - }); - - return { - onMessage: protocol.onMessage, - - send(msg: any) { - protocol.send(msg); - console.log('%c[Window \u2192 Extension]%c[len: ' + strings.pad(msg.length, 5, ' ') + ']', 'color: darkgreen', 'color: grey', msg); - } - }; -} - - export class MainThreadService extends AbstractThreadService implements IThreadService { - constructor(protocol: IMessagePassingProtocol, @IEnvironmentService environmentService: IEnvironmentService) { - if (logExtensionHostCommunication || environmentService.logExtensionHostCommunication) { - protocol = asLoggingProtocol(protocol); - } - + constructor(protocol: IMessagePassingProtocol) { super(new RPCProtocol(protocol), true); } } From 252d49c65bbf19aeb4c9a670714662e7871cd72c Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 15:21:09 +0100 Subject: [PATCH 203/615] Simplify AbstractThreadService usage (#36972) --- src/vs/workbench/api/node/extHost.api.impl.ts | 5 ++--- src/vs/workbench/api/node/extHost.protocol.ts | 5 +++++ .../api/node/extHostExtensionService.ts | 7 +++---- src/vs/workbench/api/node/extHostWindow.ts | 9 ++++----- src/vs/workbench/node/extensionHostMain.ts | 5 ++--- .../electron-browser/extensionService.ts | 6 +++--- .../services/thread/common/threadService.ts | 17 ----------------- .../thread/electron-browser/threadService.ts | 17 ----------------- .../thread/node/abstractThreadService.ts | 7 ++++--- .../thread/node/extHostThreadService.ts | 15 --------------- .../electron-browser/api/testThreadService.ts | 6 +++--- 11 files changed, 26 insertions(+), 73 deletions(-) delete mode 100644 src/vs/workbench/services/thread/electron-browser/threadService.ts delete mode 100644 src/vs/workbench/services/thread/node/extHostThreadService.ts diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index ed71e123c75..79c6f5ec341 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -46,10 +46,9 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; import * as vscode from 'vscode'; import * as paths from 'vs/base/common/paths'; -import { MainContext, ExtHostContext, IInitData } from './extHost.protocol'; +import { MainContext, ExtHostContext, IInitData, IExtHostContext } from './extHost.protocol'; import * as languageConfiguration from 'vs/editor/common/modes/languageConfiguration'; import { TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions'; -import { ExtHostThreadService } from 'vs/workbench/services/thread/node/extHostThreadService'; import { ProxyIdentifier } from 'vs/workbench/services/thread/common/threadService'; import { ExtHostDialogs } from 'vs/workbench/api/node/extHostDialogs'; import { ExtHostFileSystem } from 'vs/workbench/api/node/extHostFileSystem'; @@ -79,7 +78,7 @@ function proposedApiFunction(extension: IExtensionDescription, fn: T): T { */ export function createApiFactory( initData: IInitData, - threadService: ExtHostThreadService, + threadService: IExtHostContext, extHostWorkspace: ExtHostWorkspace, extHostConfiguration: ExtHostConfiguration, extensionService: ExtHostExtensionService, diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index f9fd93dfa20..23373988b5e 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -100,6 +100,11 @@ export interface IExtHostContext { * Register manually created instance. */ set(identifier: ProxyIdentifier, instance: R): R; + + /** + * Assert these identifiers are already registered via `.set`. + */ + assertRegistered(identifiers: ProxyIdentifier[]): void; } export interface IMainContext { diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 71a56b06be4..31250d0b8e1 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -13,9 +13,8 @@ import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/n import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { ExtHostStorage } from 'vs/workbench/api/node/extHostStorage'; import { createApiFactory, initializeExtensionApi } from 'vs/workbench/api/node/extHost.api.impl'; -import { MainContext, MainThreadExtensionServiceShape, IWorkspaceData, IEnvironment, IInitData, ExtHostExtensionServiceShape, MainThreadTelemetryShape } from './extHost.protocol'; +import { MainContext, MainThreadExtensionServiceShape, IWorkspaceData, IEnvironment, IInitData, ExtHostExtensionServiceShape, MainThreadTelemetryShape, IExtHostContext } from './extHost.protocol'; import { IExtensionMemento, ExtensionsActivator, ActivatedExtension, IExtensionAPI, IExtensionContext, EmptyExtension, IExtensionModule, ExtensionActivationTimesBuilder, ExtensionActivationTimes, ExtensionActivationReason, ExtensionActivatedByEvent } from 'vs/workbench/api/node/extHostExtensionActivator'; -import { ExtHostThreadService } from 'vs/workbench/services/thread/node/extHostThreadService'; import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration'; import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { TernarySearchTree } from 'vs/base/common/map'; @@ -112,7 +111,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { private readonly _barrier: Barrier; private readonly _registry: ExtensionDescriptionRegistry; - private readonly _threadService: ExtHostThreadService; + private readonly _threadService: IExtHostContext; private readonly _mainThreadTelemetry: MainThreadTelemetryShape; private readonly _storage: ExtHostStorage; private readonly _storagePath: ExtensionStoragePath; @@ -124,7 +123,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { * This class is constructed manually because it is a service, so it doesn't use any ctor injection */ constructor(initData: IInitData, - threadService: ExtHostThreadService, + threadService: IExtHostContext, extHostWorkspace: ExtHostWorkspace, extHostConfiguration: ExtHostConfiguration, logService: ILogService diff --git a/src/vs/workbench/api/node/extHostWindow.ts b/src/vs/workbench/api/node/extHostWindow.ts index cf8e0be930a..ad0872b83d4 100644 --- a/src/vs/workbench/api/node/extHostWindow.ts +++ b/src/vs/workbench/api/node/extHostWindow.ts @@ -5,8 +5,7 @@ 'use strict'; import Event, { Emitter } from 'vs/base/common/event'; -import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { ExtHostWindowShape, MainContext, MainThreadWindowShape } from './extHost.protocol'; +import { ExtHostWindowShape, MainContext, MainThreadWindowShape, IMainContext } from './extHost.protocol'; import { WindowState } from 'vscode'; export class ExtHostWindow implements ExtHostWindowShape { @@ -23,8 +22,8 @@ export class ExtHostWindow implements ExtHostWindowShape { private _state = ExtHostWindow.InitialState; get state(): WindowState { return this._state; } - constructor(threadService: IThreadService) { - this._proxy = threadService.get(MainContext.MainThreadWindow); + constructor(mainContext: IMainContext) { + this._proxy = mainContext.get(MainContext.MainThreadWindow); this._proxy.$getWindowVisibility().then(isFocused => this.$onDidChangeWindowFocus(isFocused)); } @@ -36,4 +35,4 @@ export class ExtHostWindow implements ExtHostWindowShape { this._state = { ...this._state, focused }; this._onDidChangeWindowState.fire(this._state); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index 97f8d8cd38c..3545161a485 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -9,9 +9,7 @@ import nls = require('vs/nls'); import pfs = require('vs/base/node/pfs'); import { TPromise } from 'vs/base/common/winjs.base'; import { join } from 'path'; -import { RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol'; import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionService'; -import { ExtHostThreadService } from 'vs/workbench/services/thread/node/extHostThreadService'; import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration'; import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; @@ -27,6 +25,7 @@ import { createLogService } from 'vs/platform/log/node/spdlogService'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ILogService } from 'vs/platform/log/common/log'; import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; +import { AbstractThreadService } from 'vs/workbench/services/thread/node/abstractThreadService'; // const nativeExit = process.exit.bind(process); function patchProcess(allowExit: boolean) { @@ -89,7 +88,7 @@ export class ExtensionHostMain { patchProcess(allowExit); // services - const threadService = new ExtHostThreadService(new RPCProtocol(protocol)); + const threadService = new AbstractThreadService(protocol, false); const extHostWorkspace = new ExtHostWorkspace(threadService, initData.workspace); const environmentService = new EnvironmentService(initData.args, initData.execPath); this._logService = createLogService(`exthost${initData.windowId}`, environmentService); diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index 129dd59d699..df2ae6c820d 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -28,7 +28,6 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { IStorageService } from 'vs/platform/storage/common/storage'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ExtensionHostProcessWorker } from 'vs/workbench/services/extensions/electron-browser/extensionHost'; -import { MainThreadService } from 'vs/workbench/services/thread/electron-browser/threadService'; import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; import { ExtHostCustomersRegistry } from 'vs/workbench/api/electron-browser/extHostCustomers'; import { IWindowService } from 'vs/platform/windows/common/windows'; @@ -42,6 +41,7 @@ import { ExtensionHostProfiler } from 'vs/workbench/services/extensions/electron import { ReloadWindowAction } from 'vs/workbench/electron-browser/actions'; import product from 'vs/platform/node/product'; import * as strings from 'vs/base/common/strings'; +import { AbstractThreadService } from 'vs/workbench/services/thread/node/abstractThreadService'; const SystemExtensionsRoot = path.normalize(path.join(URI.parse(require.toUrl('')).fsPath, '..', 'extensions')); @@ -85,7 +85,7 @@ export class ExtensionService extends Disposable implements IExtensionService { private _extensionHostProcessActivationTimes: { [id: string]: ActivationTimes; }; private _extensionHostExtensionRuntimeErrors: { [id: string]: Error[]; }; private _extensionHostProcessWorker: ExtensionHostProcessWorker; - private _extensionHostProcessThreadService: MainThreadService; + private _extensionHostProcessThreadService: AbstractThreadService; private _extensionHostProcessCustomers: IDisposable[]; /** * winjs believes a proxy is a promise because it has a `then` method, so wrap the result in an object. @@ -238,7 +238,7 @@ export class ExtensionService extends Disposable implements IExtensionService { protocol = asLoggingProtocol(protocol); } - this._extensionHostProcessThreadService = new MainThreadService(protocol); + this._extensionHostProcessThreadService = new AbstractThreadService(protocol, true); const extHostContext: IExtHostContext = this._extensionHostProcessThreadService; // Named customers diff --git a/src/vs/workbench/services/thread/common/threadService.ts b/src/vs/workbench/services/thread/common/threadService.ts index a6530eee39f..8796201737a 100644 --- a/src/vs/workbench/services/thread/common/threadService.ts +++ b/src/vs/workbench/services/thread/common/threadService.ts @@ -4,23 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -export interface IThreadService { - /** - * Always returns a proxy. - */ - get(identifier: ProxyIdentifier): T; - - /** - * Register instance. - */ - set(identifier: ProxyIdentifier, value: R): R; - - /** - * Assert these identifiers are already registered via `.set`. - */ - assertRegistered(identifiers: ProxyIdentifier[]): void; -} - export class ProxyIdentifier { _proxyIdentifierBrand: void; _suppressCompilerUnusedWarning: T; diff --git a/src/vs/workbench/services/thread/electron-browser/threadService.ts b/src/vs/workbench/services/thread/electron-browser/threadService.ts deleted file mode 100644 index 45980d00c94..00000000000 --- a/src/vs/workbench/services/thread/electron-browser/threadService.ts +++ /dev/null @@ -1,17 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol'; -import { AbstractThreadService } from 'vs/workbench/services/thread/node/abstractThreadService'; -import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; - -export class MainThreadService extends AbstractThreadService implements IThreadService { - constructor(protocol: IMessagePassingProtocol) { - super(new RPCProtocol(protocol), true); - } -} diff --git a/src/vs/workbench/services/thread/node/abstractThreadService.ts b/src/vs/workbench/services/thread/node/abstractThreadService.ts index 0170bbab08f..0d707330439 100644 --- a/src/vs/workbench/services/thread/node/abstractThreadService.ts +++ b/src/vs/workbench/services/thread/node/abstractThreadService.ts @@ -8,18 +8,19 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IDispatcher, RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol'; import { ProxyIdentifier } from 'vs/workbench/services/thread/common/threadService'; import { CharCode } from 'vs/base/common/charCode'; +import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; declare var Proxy: any; // TODO@TypeScript -export abstract class AbstractThreadService implements IDispatcher { +export class AbstractThreadService implements IDispatcher { private readonly _rpcProtocol: RPCProtocol; private readonly _isMain: boolean; protected readonly _locals: { [id: string]: any; }; private readonly _proxies: { [id: string]: any; } = Object.create(null); - constructor(rpcProtocol: RPCProtocol, isMain: boolean) { - this._rpcProtocol = rpcProtocol; + constructor(protocol: IMessagePassingProtocol, isMain: boolean) { + this._rpcProtocol = new RPCProtocol(protocol); this._isMain = isMain; this._locals = Object.create(null); this._proxies = Object.create(null); diff --git a/src/vs/workbench/services/thread/node/extHostThreadService.ts b/src/vs/workbench/services/thread/node/extHostThreadService.ts deleted file mode 100644 index 00e135d8d8c..00000000000 --- a/src/vs/workbench/services/thread/node/extHostThreadService.ts +++ /dev/null @@ -1,15 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol'; -import { AbstractThreadService } from 'vs/workbench/services/thread/node/abstractThreadService'; -import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; - -export class ExtHostThreadService extends AbstractThreadService implements IThreadService { - constructor(rpcProtocol: RPCProtocol) { - super(rpcProtocol, false); - } -} diff --git a/src/vs/workbench/test/electron-browser/api/testThreadService.ts b/src/vs/workbench/test/electron-browser/api/testThreadService.ts index 0f26f144bfc..75543d40523 100644 --- a/src/vs/workbench/test/electron-browser/api/testThreadService.ts +++ b/src/vs/workbench/test/electron-browser/api/testThreadService.ts @@ -6,9 +6,9 @@ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IThreadService, ProxyIdentifier } from 'vs/workbench/services/thread/common/threadService'; +import { ProxyIdentifier } from 'vs/workbench/services/thread/common/threadService'; -export function OneGetThreadService(thing: any): IThreadService { +export function OneGetThreadService(thing: any) { return { get(): T { return thing; @@ -75,7 +75,7 @@ export abstract class AbstractTestThreadService { protected abstract _callOnRemote(proxyId: string, path: string, args: any[]): TPromise; } -export class TestThreadService extends AbstractTestThreadService implements IThreadService { +export class TestThreadService extends AbstractTestThreadService { constructor(isMainProcess: boolean = false) { super(isMainProcess); } From 0abd8212779cb9189fd041408ab96ffd810e281e Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 15:36:47 +0100 Subject: [PATCH 204/615] Further simplifications (#36972) --- .../api/electron-browser/extHostCustomers.ts | 2 +- src/vs/workbench/api/node/extHost.api.impl.ts | 2 +- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- src/vs/workbench/node/extensionHostMain.ts | 14 +-- .../electron-browser/extensionService.ts | 24 ++--- .../node/proxyIdentifier.ts} | 0 .../services/extensions/node/rpcProtocol.ts | 69 ++++++++++++--- .../thread/node/abstractThreadService.ts | 87 ------------------- .../electron-browser/api/testThreadService.ts | 2 +- 9 files changed, 78 insertions(+), 124 deletions(-) rename src/vs/workbench/services/{thread/common/threadService.ts => extensions/node/proxyIdentifier.ts} (100%) delete mode 100644 src/vs/workbench/services/thread/node/abstractThreadService.ts diff --git a/src/vs/workbench/api/electron-browser/extHostCustomers.ts b/src/vs/workbench/api/electron-browser/extHostCustomers.ts index b3a700850d4..6ce6d843443 100644 --- a/src/vs/workbench/api/electron-browser/extHostCustomers.ts +++ b/src/vs/workbench/api/electron-browser/extHostCustomers.ts @@ -6,7 +6,7 @@ 'use strict'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { ProxyIdentifier } from 'vs/workbench/services/thread/common/threadService'; +import { ProxyIdentifier } from 'vs/workbench/services/extensions/node/proxyIdentifier'; import { IConstructorSignature1 } from 'vs/platform/instantiation/common/instantiation'; import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol'; diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 79c6f5ec341..559d47a2a69 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -49,7 +49,7 @@ import * as paths from 'vs/base/common/paths'; import { MainContext, ExtHostContext, IInitData, IExtHostContext } from './extHost.protocol'; import * as languageConfiguration from 'vs/editor/common/modes/languageConfiguration'; import { TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions'; -import { ProxyIdentifier } from 'vs/workbench/services/thread/common/threadService'; +import { ProxyIdentifier } from 'vs/workbench/services/extensions/node/proxyIdentifier'; import { ExtHostDialogs } from 'vs/workbench/api/node/extHostDialogs'; import { ExtHostFileSystem } from 'vs/workbench/api/node/extHostFileSystem'; import { FileChangeType, FileType } from 'vs/platform/files/common/files'; diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 23373988b5e..435f8c7011b 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -8,7 +8,7 @@ import { createMainContextProxyIdentifier as createMainId, createExtHostContextProxyIdentifier as createExtId, ProxyIdentifier -} from 'vs/workbench/services/thread/common/threadService'; +} from 'vs/workbench/services/extensions/node/proxyIdentifier'; import * as vscode from 'vscode'; diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index 3545161a485..9466bd04ec4 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -25,7 +25,7 @@ import { createLogService } from 'vs/platform/log/node/spdlogService'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ILogService } from 'vs/platform/log/common/log'; import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; -import { AbstractThreadService } from 'vs/workbench/services/thread/node/abstractThreadService'; +import { RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol'; // const nativeExit = process.exit.bind(process); function patchProcess(allowExit: boolean) { @@ -88,8 +88,8 @@ export class ExtensionHostMain { patchProcess(allowExit); // services - const threadService = new AbstractThreadService(protocol, false); - const extHostWorkspace = new ExtHostWorkspace(threadService, initData.workspace); + const rpcProtocol = new RPCProtocol(protocol); + const extHostWorkspace = new ExtHostWorkspace(rpcProtocol, initData.workspace); const environmentService = new EnvironmentService(initData.args, initData.execPath); this._logService = createLogService(`exthost${initData.windowId}`, environmentService); this.disposables.push(this._logService); @@ -97,8 +97,8 @@ export class ExtensionHostMain { this._logService.info('extension host started'); this._logService.trace('initData', initData); - this._extHostConfiguration = new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), extHostWorkspace, initData.configuration); - this._extensionService = new ExtHostExtensionService(initData, threadService, extHostWorkspace, this._extHostConfiguration, this._logService); + this._extHostConfiguration = new ExtHostConfiguration(rpcProtocol.get(MainContext.MainThreadConfiguration), extHostWorkspace, initData.configuration); + this._extensionService = new ExtHostExtensionService(initData, rpcProtocol, extHostWorkspace, this._extHostConfiguration, this._logService); // error forwarding and stack trace scanning const extensionErrors = new WeakMap(); @@ -119,8 +119,8 @@ export class ExtensionHostMain { return `${error.name || 'Error'}: ${error.message || ''}${stackTraceMessage}`; }; }); - const mainThreadExtensions = threadService.get(MainContext.MainThreadExtensionService); - const mainThreadErrors = threadService.get(MainContext.MainThreadErrors); + const mainThreadExtensions = rpcProtocol.get(MainContext.MainThreadExtensionService); + const mainThreadErrors = rpcProtocol.get(MainContext.MainThreadErrors); errors.setUnexpectedErrorHandler(err => { const data = errors.transformErrorForSerialization(err); const extension = extensionErrors.get(err); diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index df2ae6c820d..11d5067a946 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -21,7 +21,7 @@ import { areSameExtensions, BetterMergeId, BetterMergeDisabledNowKey } from 'vs/ import { ExtensionsRegistry, ExtensionPoint, IExtensionPointUser, ExtensionMessageCollector, IExtensionPoint } from 'vs/platform/extensions/common/extensionsRegistry'; import { ExtensionScanner, ILog, ExtensionScannerInput } from 'vs/workbench/services/extensions/electron-browser/extensionPoints'; import { IMessageService, CloseAction } from 'vs/platform/message/common/message'; -import { ProxyIdentifier } from 'vs/workbench/services/thread/common/threadService'; +import { ProxyIdentifier } from 'vs/workbench/services/extensions/node/proxyIdentifier'; import { ExtHostContext, ExtHostExtensionServiceShape, IExtHostContext, MainContext } from 'vs/workbench/api/node/extHost.protocol'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -41,7 +41,7 @@ import { ExtensionHostProfiler } from 'vs/workbench/services/extensions/electron import { ReloadWindowAction } from 'vs/workbench/electron-browser/actions'; import product from 'vs/platform/node/product'; import * as strings from 'vs/base/common/strings'; -import { AbstractThreadService } from 'vs/workbench/services/thread/node/abstractThreadService'; +import { RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol'; const SystemExtensionsRoot = path.normalize(path.join(URI.parse(require.toUrl('')).fsPath, '..', 'extensions')); @@ -85,7 +85,7 @@ export class ExtensionService extends Disposable implements IExtensionService { private _extensionHostProcessActivationTimes: { [id: string]: ActivationTimes; }; private _extensionHostExtensionRuntimeErrors: { [id: string]: Error[]; }; private _extensionHostProcessWorker: ExtensionHostProcessWorker; - private _extensionHostProcessThreadService: AbstractThreadService; + private _extensionHostProcessRPCProtocol: RPCProtocol; private _extensionHostProcessCustomers: IDisposable[]; /** * winjs believes a proxy is a promise because it has a `then` method, so wrap the result in an object. @@ -115,7 +115,7 @@ export class ExtensionService extends Disposable implements IExtensionService { this._extensionHostProcessActivationTimes = Object.create(null); this._extensionHostExtensionRuntimeErrors = Object.create(null); this._extensionHostProcessWorker = null; - this._extensionHostProcessThreadService = null; + this._extensionHostProcessRPCProtocol = null; this._extensionHostProcessCustomers = []; this._extensionHostProcessProxy = null; @@ -167,9 +167,9 @@ export class ExtensionService extends Disposable implements IExtensionService { this._extensionHostProcessWorker.dispose(); this._extensionHostProcessWorker = null; } - if (this._extensionHostProcessThreadService) { - this._extensionHostProcessThreadService.dispose(); - this._extensionHostProcessThreadService = null; + if (this._extensionHostProcessRPCProtocol) { + this._extensionHostProcessRPCProtocol.dispose(); + this._extensionHostProcessRPCProtocol = null; } for (let i = 0, len = this._extensionHostProcessCustomers.length; i < len; i++) { const customer = this._extensionHostProcessCustomers[i]; @@ -238,8 +238,8 @@ export class ExtensionService extends Disposable implements IExtensionService { protocol = asLoggingProtocol(protocol); } - this._extensionHostProcessThreadService = new AbstractThreadService(protocol, true); - const extHostContext: IExtHostContext = this._extensionHostProcessThreadService; + this._extensionHostProcessRPCProtocol = new RPCProtocol(protocol); + const extHostContext: IExtHostContext = this._extensionHostProcessRPCProtocol; // Named customers const namedCustomers = ExtHostCustomersRegistry.getNamedCustomers(); @@ -247,7 +247,7 @@ export class ExtensionService extends Disposable implements IExtensionService { const [id, ctor] = namedCustomers[i]; const instance = this._instantiationService.createInstance(ctor, extHostContext); this._extensionHostProcessCustomers.push(instance); - this._extensionHostProcessThreadService.set(id, instance); + this._extensionHostProcessRPCProtocol.set(id, instance); } // Customers @@ -260,9 +260,9 @@ export class ExtensionService extends Disposable implements IExtensionService { // Check that no named customers are missing const expected: ProxyIdentifier[] = Object.keys(MainContext).map((key) => MainContext[key]); - this._extensionHostProcessThreadService.assertRegistered(expected); + this._extensionHostProcessRPCProtocol.assertRegistered(expected); - return this._extensionHostProcessThreadService.get(ExtHostContext.ExtHostExtensionService); + return this._extensionHostProcessRPCProtocol.get(ExtHostContext.ExtHostExtensionService); } // ---- begin IExtensionService diff --git a/src/vs/workbench/services/thread/common/threadService.ts b/src/vs/workbench/services/extensions/node/proxyIdentifier.ts similarity index 100% rename from src/vs/workbench/services/thread/common/threadService.ts rename to src/vs/workbench/services/extensions/node/proxyIdentifier.ts diff --git a/src/vs/workbench/services/extensions/node/rpcProtocol.ts b/src/vs/workbench/services/extensions/node/rpcProtocol.ts index ea7e8f93f46..a0fce5f91f4 100644 --- a/src/vs/workbench/services/extensions/node/rpcProtocol.ts +++ b/src/vs/workbench/services/extensions/node/rpcProtocol.ts @@ -9,15 +9,16 @@ import * as marshalling from 'vs/base/common/marshalling'; import * as errors from 'vs/base/common/errors'; import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; import { LazyPromise } from 'vs/workbench/services/extensions/node/lazyPromise'; +import { ProxyIdentifier } from 'vs/workbench/services/extensions/node/proxyIdentifier'; +import { CharCode } from 'vs/base/common/charCode'; -export interface IDispatcher { - invoke(proxyId: string, methodName: string, args: any[]): any; -} +declare var Proxy: any; // TODO@TypeScript export class RPCProtocol { private _isDisposed: boolean; - private _bigHandler: IDispatcher; + private readonly _locals: { [id: string]: any; }; + private readonly _proxies: { [id: string]: any; }; private _lastMessageId: number; private readonly _invokedHandlers: { [req: string]: TPromise; }; private readonly _pendingRPCReplies: { [msgId: string]: LazyPromise; }; @@ -25,7 +26,8 @@ export class RPCProtocol { constructor(protocol: IMessagePassingProtocol) { this._isDisposed = false; - this._bigHandler = null; + this._locals = Object.create(null); + this._proxies = Object.create(null); this._lastMessageId = 0; this._invokedHandlers = Object.create(null); this._pendingRPCReplies = {}; @@ -42,6 +44,41 @@ export class RPCProtocol { }); } + public get(identifier: ProxyIdentifier): T { + if (!this._proxies[identifier.id]) { + this._proxies[identifier.id] = this._createProxy(identifier.id); + } + return this._proxies[identifier.id]; + } + + private _createProxy(proxyId: string): T { + let handler = { + get: (target, name: string) => { + if (!target[name] && name.charCodeAt(0) === CharCode.DollarSign) { + target[name] = (...myArgs: any[]) => { + return this.fancyRemoteCall(proxyId, name, myArgs); + }; + } + return target[name]; + } + }; + return new Proxy(Object.create(null), handler); + } + + public set(identifier: ProxyIdentifier, value: R): R { + this._locals[identifier.id] = value; + return value; + } + + public assertRegistered(identifiers: ProxyIdentifier[]): void { + for (let i = 0, len = identifiers.length; i < len; i++) { + const identifier = identifiers[i]; + if (!this._locals[identifier.id]) { + throw new Error(`Missing actor ${identifier.id} (isMain: ${identifier.isMain})`); + } + } + } + private _receiveOneMessage(rawmsg: string): void { if (this._isDisposed) { return; @@ -72,10 +109,6 @@ export class RPCProtocol { } private _receiveRequest(msg: RequestMessage | FancyRequestMessage): void { - if (!this._bigHandler) { - throw new Error('got message before big handler attached!'); - } - const callId = msg.id; const proxyId = msg.proxyId; const isFancy = (msg.type === MessageType.FancyRequest); // a fancy request gets a fancy reply @@ -135,12 +168,24 @@ export class RPCProtocol { private _invokeHandler(proxyId: string, methodName: string, args: any[]): TPromise { try { - return TPromise.as(this._bigHandler.invoke(proxyId, methodName, args)); + return TPromise.as(this._doInvokeHandler(proxyId, methodName, args)); } catch (err) { return TPromise.wrapError(err); } } + private _doInvokeHandler(proxyId: string, methodName: string, args: any[]): any { + if (!this._locals[proxyId]) { + throw new Error('Unknown actor ' + proxyId); + } + let actor = this._locals[proxyId]; + let method = actor[methodName]; + if (typeof method !== 'function') { + throw new Error('Unknown method ' + methodName + ' on actor ' + proxyId); + } + return method.apply(actor, args); + } + public remoteCall(proxyId: string, methodName: string, args: any[]): TPromise { return this._remoteCall(proxyId, methodName, args, false); } @@ -169,10 +214,6 @@ export class RPCProtocol { return result; } - - public setDispatcher(handler: IDispatcher): void { - this._bigHandler = handler; - } } /** diff --git a/src/vs/workbench/services/thread/node/abstractThreadService.ts b/src/vs/workbench/services/thread/node/abstractThreadService.ts deleted file mode 100644 index 0d707330439..00000000000 --- a/src/vs/workbench/services/thread/node/abstractThreadService.ts +++ /dev/null @@ -1,87 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { IDispatcher, RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol'; -import { ProxyIdentifier } from 'vs/workbench/services/thread/common/threadService'; -import { CharCode } from 'vs/base/common/charCode'; -import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; - -declare var Proxy: any; // TODO@TypeScript - -export class AbstractThreadService implements IDispatcher { - - private readonly _rpcProtocol: RPCProtocol; - private readonly _isMain: boolean; - protected readonly _locals: { [id: string]: any; }; - private readonly _proxies: { [id: string]: any; } = Object.create(null); - - constructor(protocol: IMessagePassingProtocol, isMain: boolean) { - this._rpcProtocol = new RPCProtocol(protocol); - this._isMain = isMain; - this._locals = Object.create(null); - this._proxies = Object.create(null); - this._rpcProtocol.setDispatcher(this); - } - - public dispose(): void { - this._rpcProtocol.dispose(); - } - - public invoke(proxyId: string, methodName: string, args: any[]): any { - if (!this._locals[proxyId]) { - throw new Error('Unknown actor ' + proxyId); - } - let actor = this._locals[proxyId]; - let method = actor[methodName]; - if (typeof method !== 'function') { - throw new Error('Unknown method ' + methodName + ' on actor ' + proxyId); - } - return method.apply(actor, args); - } - - get(identifier: ProxyIdentifier): T { - if (!this._proxies[identifier.id]) { - this._proxies[identifier.id] = this._createProxy(identifier.id); - } - return this._proxies[identifier.id]; - } - - private _createProxy(proxyId: string): T { - let handler = { - get: (target, name: string) => { - if (!target[name] && name.charCodeAt(0) === CharCode.DollarSign) { - target[name] = (...myArgs: any[]) => { - return this._callOnRemote(proxyId, name, myArgs); - }; - } - return target[name]; - } - }; - return new Proxy(Object.create(null), handler); - } - - set(identifier: ProxyIdentifier, value: R): R { - if (identifier.isMain !== this._isMain) { - throw new Error('Mismatch in object registration!'); - } - this._locals[identifier.id] = value; - return value; - } - - assertRegistered(identifiers: ProxyIdentifier[]): void { - for (let i = 0, len = identifiers.length; i < len; i++) { - const identifier = identifiers[i]; - if (!this._locals[identifier.id]) { - throw new Error(`Missing actor ${identifier.id} (isMain: ${identifier.isMain})`); - } - } - } - - private _callOnRemote(proxyId: string, methodName: string, args: any[]): TPromise { - return this._rpcProtocol.fancyRemoteCall(proxyId, methodName, args); - } -} diff --git a/src/vs/workbench/test/electron-browser/api/testThreadService.ts b/src/vs/workbench/test/electron-browser/api/testThreadService.ts index 75543d40523..c22dfd95099 100644 --- a/src/vs/workbench/test/electron-browser/api/testThreadService.ts +++ b/src/vs/workbench/test/electron-browser/api/testThreadService.ts @@ -6,7 +6,7 @@ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; -import { ProxyIdentifier } from 'vs/workbench/services/thread/common/threadService'; +import { ProxyIdentifier } from 'vs/workbench/services/extensions/node/proxyIdentifier'; export function OneGetThreadService(thing: any) { return { From 7246d0274b1581e3def2b1dd0bf573d296aa42a6 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 13 Dec 2017 15:44:05 +0100 Subject: [PATCH 205/615] debug: do not support link detection in long strings fixes #39227 --- src/vs/workbench/parts/debug/browser/linkDetector.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts index 650b4fc5319..2f09a546c81 100644 --- a/src/vs/workbench/parts/debug/browser/linkDetector.ts +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -11,6 +11,7 @@ import * as nls from 'vs/nls'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; export class LinkDetector { + private static readonly MAX_LENGTH = 500; private static FILE_LOCATION_PATTERNS: RegExp[] = [ // group 0: full path with line and column // group 1: full path without line and column, matched by `*.*` in the end to work only on paths with extensions in the end (s.t. node:10352 would not match) @@ -34,8 +35,11 @@ export class LinkDetector { * If no links were detected, returns the original string. */ public handleLinks(text: string): HTMLElement | string { - let linkContainer: HTMLElement; + if (text.length > LinkDetector.MAX_LENGTH) { + return text; + } + let linkContainer: HTMLElement; for (let pattern of LinkDetector.FILE_LOCATION_PATTERNS) { pattern.lastIndex = 0; // the holy grail of software development let lastMatchIndex = 0; From c1cf8ef371b9ec9fadc3c1b4978d563aeee35538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Wed, 13 Dec 2017 15:50:47 +0100 Subject: [PATCH 206/615] remove console.log --- src/vs/workbench/services/progress/browser/progressService2.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/services/progress/browser/progressService2.ts b/src/vs/workbench/services/progress/browser/progressService2.ts index 3f2a157ef17..8c87a033e1c 100644 --- a/src/vs/workbench/services/progress/browser/progressService2.ts +++ b/src/vs/workbench/services/progress/browser/progressService2.ts @@ -170,7 +170,6 @@ export class ProgressService2 implements IProgressService2 { setTimeout(() => handle.dispose(), minTimeVisible - d); } else { // shown long enough - console.log('so long progress'); handle.dispose(); } } From 2b4ce134098781be1dbd1acd29087ddd22c1f93e Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 15:58:13 +0100 Subject: [PATCH 207/615] Add RPCProtocol.getFastProxy (#36972) --- src/vs/workbench/api/node/extHost.protocol.ts | 27 ++++--------------- .../extensions/node/proxyIdentifier.ts | 27 +++++++++++++++++++ .../services/extensions/node/rpcProtocol.ts | 27 +++++++++++++------ 3 files changed, 51 insertions(+), 30 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 435f8c7011b..29e54453820 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -7,7 +7,8 @@ import { createMainContextProxyIdentifier as createMainId, createExtHostContextProxyIdentifier as createExtId, - ProxyIdentifier + ProxyIdentifier, + IRPCProtocol } from 'vs/workbench/services/extensions/node/proxyIdentifier'; import * as vscode from 'vscode'; @@ -90,28 +91,10 @@ export interface IWorkspaceConfigurationChangeEventData { changedConfigurationByResource: { [folder: string]: IConfigurationModel }; } -export interface IExtHostContext { - /** - * Returns a proxy to an object addressable/named in the extension host process. - */ - get(identifier: ProxyIdentifier): T; - - /** - * Register manually created instance. - */ - set(identifier: ProxyIdentifier, instance: R): R; - - /** - * Assert these identifiers are already registered via `.set`. - */ - assertRegistered(identifiers: ProxyIdentifier[]): void; +export interface IExtHostContext extends IRPCProtocol { } -export interface IMainContext { - /** - * Returns a proxy to an object addressable/named in the main/renderer process. - */ - get(identifier: ProxyIdentifier): T; +export interface IMainContext extends IRPCProtocol { } // --- main thread @@ -681,7 +664,7 @@ export interface ExtHostWindowShape { // --- proxy identifiers export const MainContext = { - MainThreadCommands: createMainId('MainThreadCommands'), + MainThreadCommands: >createMainId('MainThreadCommands'), MainThreadConfiguration: createMainId('MainThreadConfiguration'), MainThreadDebugService: createMainId('MainThreadDebugService'), MainThreadDecorations: createMainId('MainThreadDecorations'), diff --git a/src/vs/workbench/services/extensions/node/proxyIdentifier.ts b/src/vs/workbench/services/extensions/node/proxyIdentifier.ts index 8796201737a..4a21a9019e9 100644 --- a/src/vs/workbench/services/extensions/node/proxyIdentifier.ts +++ b/src/vs/workbench/services/extensions/node/proxyIdentifier.ts @@ -4,6 +4,33 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +export interface IRPCProtocol { + /** + * Returns a proxy to an object addressable/named in the extension host process. + * > **Note:** Arguments or results of type `URI` or `RegExp` will be serialized/deserialized automatically, + * > but this has a performance cost, as each argument/result must be visited. + * > + * > Use `getFast` for a proxy where such arguments are not automatically serialized/deserialized. + */ + get(identifier: ProxyIdentifier): T; + + /** + * Returns a proxy to an object addressable/named in the extension host process. + * > **Note:** Arguments or results of type `URI` or `RegExp` will **not** be serialized/deserialized automatically. + */ + getFastProxy(identifier: ProxyIdentifier): T; + + /** + * Register manually created instance. + */ + set(identifier: ProxyIdentifier, instance: R): R; + + /** + * Assert these identifiers are already registered via `.set`. + */ + assertRegistered(identifiers: ProxyIdentifier[]): void; +} + export class ProxyIdentifier { _proxyIdentifierBrand: void; _suppressCompilerUnusedWarning: T; diff --git a/src/vs/workbench/services/extensions/node/rpcProtocol.ts b/src/vs/workbench/services/extensions/node/rpcProtocol.ts index a0fce5f91f4..04c2e0e3e94 100644 --- a/src/vs/workbench/services/extensions/node/rpcProtocol.ts +++ b/src/vs/workbench/services/extensions/node/rpcProtocol.ts @@ -9,12 +9,12 @@ import * as marshalling from 'vs/base/common/marshalling'; import * as errors from 'vs/base/common/errors'; import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; import { LazyPromise } from 'vs/workbench/services/extensions/node/lazyPromise'; -import { ProxyIdentifier } from 'vs/workbench/services/extensions/node/proxyIdentifier'; +import { ProxyIdentifier, IRPCProtocol } from 'vs/workbench/services/extensions/node/proxyIdentifier'; import { CharCode } from 'vs/base/common/charCode'; declare var Proxy: any; // TODO@TypeScript -export class RPCProtocol { +export class RPCProtocol implements IRPCProtocol { private _isDisposed: boolean; private readonly _locals: { [id: string]: any; }; @@ -46,17 +46,28 @@ export class RPCProtocol { public get(identifier: ProxyIdentifier): T { if (!this._proxies[identifier.id]) { - this._proxies[identifier.id] = this._createProxy(identifier.id); + this._proxies[identifier.id] = this._createProxy(identifier.id, true); } return this._proxies[identifier.id]; } - private _createProxy(proxyId: string): T { + public getFastProxy(identifier: ProxyIdentifier): T { + if (!this._proxies[identifier.id]) { + this._proxies[identifier.id] = this._createProxy(identifier.id, false); + } + return this._proxies[identifier.id]; + } + + private _createProxy(proxyId: string, isFancy: boolean): T { let handler = { get: (target, name: string) => { if (!target[name] && name.charCodeAt(0) === CharCode.DollarSign) { target[name] = (...myArgs: any[]) => { - return this.fancyRemoteCall(proxyId, name, myArgs); + return ( + isFancy + ? this.fancyRemoteCall(proxyId, name, myArgs) + : this.remoteCall(proxyId, name, myArgs) + ); }; } return target[name]; @@ -186,11 +197,11 @@ export class RPCProtocol { return method.apply(actor, args); } - public remoteCall(proxyId: string, methodName: string, args: any[]): TPromise { + private remoteCall(proxyId: string, methodName: string, args: any[]): TPromise { return this._remoteCall(proxyId, methodName, args, false); } - public fancyRemoteCall(proxyId: string, methodName: string, args: any[]): TPromise { + private fancyRemoteCall(proxyId: string, methodName: string, args: any[]): TPromise { return this._remoteCall(proxyId, methodName, args, true); } @@ -290,7 +301,7 @@ class MessageFactory { } } -export const enum MessageType { +const enum MessageType { Request = 1, FancyRequest = 2, Cancel = 3, From 367dd10413012ae75d161740dbc53862c2a112d1 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 16:03:57 +0100 Subject: [PATCH 208/615] Rename RPCProtocol.get to RPCProtocol.getProxy (#36972) --- .../electron-browser/mainThreadCommands.ts | 2 +- .../mainThreadConfiguration.ts | 2 +- .../mainThreadDebugService.ts | 2 +- .../electron-browser/mainThreadDecorations.ts | 2 +- .../mainThreadDocumentContentProviders.ts | 2 +- .../electron-browser/mainThreadDocuments.ts | 2 +- .../mainThreadDocumentsAndEditors.ts | 2 +- .../api/electron-browser/mainThreadEditors.ts | 2 +- .../electron-browser/mainThreadFileSystem.ts | 2 +- .../mainThreadFileSystemEventService.ts | 2 +- .../electron-browser/mainThreadHeapService.ts | 2 +- .../mainThreadLanguageFeatures.ts | 2 +- .../electron-browser/mainThreadQuickOpen.ts | 2 +- .../api/electron-browser/mainThreadSCM.ts | 2 +- .../mainThreadSaveParticipant.ts | 2 +- .../api/electron-browser/mainThreadTask.ts | 2 +- .../mainThreadTerminalService.ts | 2 +- .../electron-browser/mainThreadTreeViews.ts | 4 ++-- .../api/electron-browser/mainThreadWindow.ts | 2 +- .../electron-browser/mainThreadWorkspace.ts | 3 +-- src/vs/workbench/api/node/extHost.api.impl.ts | 6 ++--- src/vs/workbench/api/node/extHostCommands.ts | 2 +- .../workbench/api/node/extHostDebugService.ts | 2 +- .../workbench/api/node/extHostDecorations.ts | 2 +- .../workbench/api/node/extHostDiagnostics.ts | 3 +-- src/vs/workbench/api/node/extHostDialogs.ts | 2 +- .../node/extHostDocumentContentProviders.ts | 2 +- src/vs/workbench/api/node/extHostDocuments.ts | 2 +- .../api/node/extHostDocumentsAndEditors.ts | 4 ++-- .../api/node/extHostExtensionService.ts | 4 ++-- .../workbench/api/node/extHostFileSystem.ts | 2 +- .../api/node/extHostLanguageFeatures.ts | 2 +- src/vs/workbench/api/node/extHostLanguages.ts | 3 +-- .../api/node/extHostMessageService.ts | 2 +- .../api/node/extHostOutputService.ts | 2 +- src/vs/workbench/api/node/extHostQuickOpen.ts | 2 +- src/vs/workbench/api/node/extHostSCM.ts | 2 +- src/vs/workbench/api/node/extHostStatusBar.ts | 2 +- src/vs/workbench/api/node/extHostStorage.ts | 4 ++-- src/vs/workbench/api/node/extHostTask.ts | 2 +- .../api/node/extHostTerminalService.ts | 2 +- .../workbench/api/node/extHostTextEditors.ts | 2 +- src/vs/workbench/api/node/extHostWindow.ts | 2 +- src/vs/workbench/api/node/extHostWorkspace.ts | 2 +- src/vs/workbench/node/extensionHostMain.ts | 6 ++--- .../electron-browser/extensionService.ts | 2 +- .../extensions/node/proxyIdentifier.ts | 2 +- .../services/extensions/node/rpcProtocol.ts | 6 ++--- .../api/extHostDocumentsAndEditors.test.ts | 5 ++++- .../electron-browser/api/testThreadService.ts | 22 ++++++++++++++----- 50 files changed, 79 insertions(+), 67 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadCommands.ts b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts index 2b21782e38c..4351231a41b 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadCommands.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts @@ -21,7 +21,7 @@ export class MainThreadCommands implements MainThreadCommandsShape { extHostContext: IExtHostContext, @ICommandService private readonly _commandService: ICommandService, ) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostCommands); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostCommands); this._generateCommandsDocumentationRegistration = CommandsRegistry.registerCommand('_generateCommandsDocumentation', () => this._generateCommandsDocumentation()); } diff --git a/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts index 5133d7125a9..04b312408b0 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts @@ -25,7 +25,7 @@ export class MainThreadConfiguration implements MainThreadConfigurationShape { @IWorkspaceContextService private readonly _workspaceContextService: IWorkspaceContextService, @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService ) { - const proxy = extHostContext.get(ExtHostContext.ExtHostConfiguration); + const proxy = extHostContext.getProxy(ExtHostContext.ExtHostConfiguration); this._configurationListener = configurationService.onDidChangeConfiguration(e => { proxy.$acceptConfigurationChanged(configurationService.getConfigurationData(), this.toConfigurationChangeEventData(e)); diff --git a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts index 28026490146..090bc8b2401 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts @@ -25,7 +25,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape { @IDebugService private debugService: IDebugService, @IWorkspaceContextService private contextService: IWorkspaceContextService, ) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostDebugService); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDebugService); this._toDispose = []; this._toDispose.push(debugService.onDidNewProcess(proc => this._proxy.$acceptDebugSessionStarted(proc.getId(), proc.configuration.type, proc.getName(false)))); this._toDispose.push(debugService.onDidEndProcess(proc => this._proxy.$acceptDebugSessionTerminated(proc.getId(), proc.configuration.type, proc.getName(false)))); diff --git a/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts b/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts index b7eb0fc9ea9..c6b41914093 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts @@ -21,7 +21,7 @@ export class MainThreadDecorations implements MainThreadDecorationsShape { context: IExtHostContext, @IDecorationsService private readonly _decorationsService: IDecorationsService ) { - this._proxy = context.get(ExtHostContext.ExtHostDecorations); + this._proxy = context.getProxy(ExtHostContext.ExtHostDecorations); } dispose() { diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts b/src/vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts index ffc9644d266..566af5a4165 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts @@ -31,7 +31,7 @@ export class MainThreadDocumentContentProviders implements MainThreadDocumentCon @ICodeEditorService codeEditorService: ICodeEditorService, @IEditorGroupService editorGroupService: IEditorGroupService ) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostDocumentContentProviders); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDocumentContentProviders); } public dispose(): void { diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts index 9293b819709..e7d9df70b36 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts @@ -93,7 +93,7 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { this._fileService = fileService; this._untitledEditorService = untitledEditorService; - this._proxy = extHostContext.get(ExtHostContext.ExtHostDocuments); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDocuments); this._modelIsSynced = {}; this._toDispose = []; diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts index 026be3a7145..186e24fd4fa 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts @@ -308,7 +308,7 @@ export class MainThreadDocumentsAndEditors { @IUntitledEditorService untitledEditorService: IUntitledEditorService, @IEditorGroupService editorGroupService: IEditorGroupService ) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostDocumentsAndEditors); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDocumentsAndEditors); const mainThreadDocuments = new MainThreadDocuments(this, extHostContext, this._modelService, modeService, this._textFileService, fileService, textModelResolverService, untitledEditorService); extHostContext.set(MainContext.MainThreadDocuments, mainThreadDocuments); diff --git a/src/vs/workbench/api/electron-browser/mainThreadEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts index 9870316763a..a2928052ac8 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts @@ -46,7 +46,7 @@ export class MainThreadEditors implements MainThreadEditorsShape { @IFileService private readonly _fileService: IFileService, @IModelService private readonly _modelService: IModelService, ) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostEditors); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostEditors); this._documentsAndEditors = documentsAndEditors; this._workbenchEditorService = workbenchEditorService; this._toDispose = []; diff --git a/src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts b/src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts index a874c9121fe..adb0a3cb05d 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts @@ -29,7 +29,7 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape { @ISearchService private readonly _searchService: ISearchService, @IWorkspaceEditingService private readonly _workspaceEditingService: IWorkspaceEditingService ) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostFileSystem); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostFileSystem); } dispose(): void { diff --git a/src/vs/workbench/api/electron-browser/mainThreadFileSystemEventService.ts b/src/vs/workbench/api/electron-browser/mainThreadFileSystemEventService.ts index b3e0045dc48..cda620bf166 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadFileSystemEventService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadFileSystemEventService.ts @@ -19,7 +19,7 @@ export class MainThreadFileSystemEventService { @IFileService fileService: IFileService ) { - const proxy: ExtHostFileSystemEventServiceShape = extHostContext.get(ExtHostContext.ExtHostFileSystemEventService); + const proxy: ExtHostFileSystemEventServiceShape = extHostContext.getProxy(ExtHostContext.ExtHostFileSystemEventService); const events: FileSystemEvents = { created: [], changed: [], diff --git a/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts b/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts index 5ffe57fc296..0c699210c82 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts @@ -126,7 +126,7 @@ export class MainThreadHeapService { extHostContext: IExtHostContext, @IHeapService heapService: IHeapService, ) { - const proxy = extHostContext.get(ExtHostContext.ExtHostHeapService); + const proxy = extHostContext.getProxy(ExtHostContext.ExtHostHeapService); this._toDispose = heapService.onGarbageCollection((ids) => { // send to ext host proxy.$onGarbageCollection(ids); diff --git a/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts b/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts index 7466f66d835..5b167907a85 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts @@ -36,7 +36,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha @IHeapService heapService: IHeapService, @IModeService modeService: IModeService, ) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostLanguageFeatures); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostLanguageFeatures); this._heapService = heapService; this._modeService = modeService; } diff --git a/src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts b/src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts index bbcfba6354f..7ac56ff2c63 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts @@ -25,7 +25,7 @@ export class MainThreadQuickOpen implements MainThreadQuickOpenShape { extHostContext: IExtHostContext, @IQuickOpenService quickOpenService: IQuickOpenService ) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostQuickOpen); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostQuickOpen); this._quickOpenService = quickOpenService; } diff --git a/src/vs/workbench/api/electron-browser/mainThreadSCM.ts b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts index 2541503baa9..ab0bab7d432 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSCM.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts @@ -268,7 +268,7 @@ export class MainThreadSCM implements MainThreadSCMShape { extHostContext: IExtHostContext, @ISCMService private scmService: ISCMService ) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostSCM); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostSCM); } dispose(): void { diff --git a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts index 2701a1575bd..602821ecb51 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts @@ -247,7 +247,7 @@ class ExtHostSaveParticipant implements ISaveParticipantParticipant { private _proxy: ExtHostDocumentSaveParticipantShape; constructor(extHostContext: IExtHostContext) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostDocumentSaveParticipant); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDocumentSaveParticipant); } participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): Promise { diff --git a/src/vs/workbench/api/electron-browser/mainThreadTask.ts b/src/vs/workbench/api/electron-browser/mainThreadTask.ts index 20cccb38906..f85ee2a039a 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTask.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTask.ts @@ -25,7 +25,7 @@ export class MainThreadTask implements MainThreadTaskShape { @ITaskService private _taskService: ITaskService, @IWorkspaceContextService private _workspaceContextServer: IWorkspaceContextService ) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostTask); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostTask); this._activeHandles = Object.create(null); } diff --git a/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts b/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts index aade4a664e3..1428536c69e 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts @@ -20,7 +20,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape extHostContext: IExtHostContext, @ITerminalService private terminalService: ITerminalService ) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostTerminalService); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostTerminalService); this._toDispose = []; this._toDispose.push(terminalService.onInstanceDisposed((terminalInstance) => this._onTerminalDisposed(terminalInstance))); this._toDispose.push(terminalService.onInstanceProcessIdReady((terminalInstance) => this._onTerminalProcessIdReady(terminalInstance))); diff --git a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts index afaa490c84f..e9730fb0ed4 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts @@ -24,7 +24,7 @@ export class MainThreadTreeViews extends Disposable implements MainThreadTreeVie @IMessageService private messageService: IMessageService ) { super(); - this._proxy = extHostContext.get(ExtHostContext.ExtHostTreeViews); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostTreeViews); } $registerView(treeViewId: string): void { @@ -140,4 +140,4 @@ class TreeViewDataProvider implements ITreeViewDataProvider { assign(current, treeItem); } } -} \ No newline at end of file +} diff --git a/src/vs/workbench/api/electron-browser/mainThreadWindow.ts b/src/vs/workbench/api/electron-browser/mainThreadWindow.ts index 27c98a4b4a9..8c34443e0b0 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadWindow.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadWindow.ts @@ -20,7 +20,7 @@ export class MainThreadWindow implements MainThreadWindowShape { extHostContext: IExtHostContext, @IWindowService private windowService: IWindowService ) { - this.proxy = extHostContext.get(ExtHostContext.ExtHostWindow); + this.proxy = extHostContext.getProxy(ExtHostContext.ExtHostWindow); windowService.onDidChangeFocus(this.proxy.$onDidChangeWindowFocus, this.proxy, this.disposables); } diff --git a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts index d0820e649e0..08382f85d1a 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts @@ -29,7 +29,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape { @ITextFileService private readonly _textFileService: ITextFileService, @IConfigurationService private _configurationService: IConfigurationService ) { - this._proxy = extHostContext.get(ExtHostContext.ExtHostWorkspace); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostWorkspace); this._contextService.onDidChangeWorkspaceFolders(this._onDidChangeWorkspace, this, this._toDispose); this._contextService.onDidChangeWorkbenchState(this._onDidChangeWorkspace, this, this._toDispose); } @@ -123,4 +123,3 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape { }); } } - diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 559d47a2a69..e29581a8859 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -91,10 +91,10 @@ export function createApiFactory( const extHostDocumentsAndEditors = threadService.set(ExtHostContext.ExtHostDocumentsAndEditors, new ExtHostDocumentsAndEditors(threadService)); const extHostDocuments = threadService.set(ExtHostContext.ExtHostDocuments, new ExtHostDocuments(threadService, extHostDocumentsAndEditors)); const extHostDocumentContentProviders = threadService.set(ExtHostContext.ExtHostDocumentContentProviders, new ExtHostDocumentContentProvider(threadService, extHostDocumentsAndEditors)); - const extHostDocumentSaveParticipant = threadService.set(ExtHostContext.ExtHostDocumentSaveParticipant, new ExtHostDocumentSaveParticipant(logService, extHostDocuments, threadService.get(MainContext.MainThreadEditors))); + const extHostDocumentSaveParticipant = threadService.set(ExtHostContext.ExtHostDocumentSaveParticipant, new ExtHostDocumentSaveParticipant(logService, extHostDocuments, threadService.getProxy(MainContext.MainThreadEditors))); const extHostEditors = threadService.set(ExtHostContext.ExtHostEditors, new ExtHostEditors(threadService, extHostDocumentsAndEditors)); const extHostCommands = threadService.set(ExtHostContext.ExtHostCommands, new ExtHostCommands(threadService, extHostHeapService, logService)); - const extHostTreeViews = threadService.set(ExtHostContext.ExtHostTreeViews, new ExtHostTreeViews(threadService.get(MainContext.MainThreadTreeViews), extHostCommands)); + const extHostTreeViews = threadService.set(ExtHostContext.ExtHostTreeViews, new ExtHostTreeViews(threadService.getProxy(MainContext.MainThreadTreeViews), extHostCommands)); threadService.set(ExtHostContext.ExtHostWorkspace, extHostWorkspace); const extHostDebugService = threadService.set(ExtHostContext.ExtHostDebugService, new ExtHostDebugService(threadService, extHostWorkspace)); threadService.set(ExtHostContext.ExtHostConfiguration, extHostConfiguration); @@ -117,7 +117,7 @@ export function createApiFactory( const extHostMessageService = new ExtHostMessageService(threadService); const extHostDialogs = new ExtHostDialogs(threadService); const extHostStatusBar = new ExtHostStatusBar(threadService); - const extHostProgress = new ExtHostProgress(threadService.get(MainContext.MainThreadProgress)); + const extHostProgress = new ExtHostProgress(threadService.getProxy(MainContext.MainThreadProgress)); const extHostOutputService = new ExtHostOutputService(threadService); const extHostLanguages = new ExtHostLanguages(threadService); diff --git a/src/vs/workbench/api/node/extHostCommands.ts b/src/vs/workbench/api/node/extHostCommands.ts index 0fea03506f5..1167a321ffc 100644 --- a/src/vs/workbench/api/node/extHostCommands.ts +++ b/src/vs/workbench/api/node/extHostCommands.ts @@ -38,7 +38,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { heapService: ExtHostHeapService, private logService: ILogService ) { - this._proxy = mainContext.get(MainContext.MainThreadCommands); + this._proxy = mainContext.getProxy(MainContext.MainThreadCommands); this._converter = new CommandsConverter(this, heapService); } diff --git a/src/vs/workbench/api/node/extHostDebugService.ts b/src/vs/workbench/api/node/extHostDebugService.ts index ad91917fa76..075719057c8 100644 --- a/src/vs/workbench/api/node/extHostDebugService.ts +++ b/src/vs/workbench/api/node/extHostDebugService.ts @@ -61,7 +61,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { this._onDidChangeActiveDebugSession = new Emitter(); this._onDidReceiveDebugSessionCustomEvent = new Emitter(); - this._debugServiceProxy = mainContext.get(MainContext.MainThreadDebugService); + this._debugServiceProxy = mainContext.getProxy(MainContext.MainThreadDebugService); this._onDidChangeBreakpoints = new Emitter({ onFirstListenerAdd: () => { diff --git a/src/vs/workbench/api/node/extHostDecorations.ts b/src/vs/workbench/api/node/extHostDecorations.ts index b2f746e6dc4..1888711551a 100644 --- a/src/vs/workbench/api/node/extHostDecorations.ts +++ b/src/vs/workbench/api/node/extHostDecorations.ts @@ -19,7 +19,7 @@ export class ExtHostDecorations implements ExtHostDecorationsShape { private readonly _proxy: MainThreadDecorationsShape; constructor(mainContext: IMainContext) { - this._proxy = mainContext.get(MainContext.MainThreadDecorations); + this._proxy = mainContext.getProxy(MainContext.MainThreadDecorations); } registerDecorationProvider(provider: vscode.DecorationProvider, label: string): vscode.Disposable { diff --git a/src/vs/workbench/api/node/extHostDiagnostics.ts b/src/vs/workbench/api/node/extHostDiagnostics.ts index e47a985648b..e5a2b67f695 100644 --- a/src/vs/workbench/api/node/extHostDiagnostics.ts +++ b/src/vs/workbench/api/node/extHostDiagnostics.ts @@ -224,7 +224,7 @@ export class ExtHostDiagnostics implements ExtHostDiagnosticsShape { private _collections: DiagnosticCollection[]; constructor(mainContext: IMainContext) { - this._proxy = mainContext.get(MainContext.MainThreadDiagnostics); + this._proxy = mainContext.getProxy(MainContext.MainThreadDiagnostics); this._collections = []; } @@ -255,4 +255,3 @@ export class ExtHostDiagnostics implements ExtHostDiagnosticsShape { this._collections.forEach(callback); } } - diff --git a/src/vs/workbench/api/node/extHostDialogs.ts b/src/vs/workbench/api/node/extHostDialogs.ts index fc0bc2b807c..70360049526 100644 --- a/src/vs/workbench/api/node/extHostDialogs.ts +++ b/src/vs/workbench/api/node/extHostDialogs.ts @@ -13,7 +13,7 @@ export class ExtHostDialogs { private readonly _proxy: MainThreadDiaglogsShape; constructor(mainContext: IMainContext) { - this._proxy = mainContext.get(MainContext.MainThreadDialogs); + this._proxy = mainContext.getProxy(MainContext.MainThreadDialogs); } showOpenDialog(options: vscode.OpenDialogOptions): Thenable { diff --git a/src/vs/workbench/api/node/extHostDocumentContentProviders.ts b/src/vs/workbench/api/node/extHostDocumentContentProviders.ts index dc53c36fcc8..7ac4de0d212 100644 --- a/src/vs/workbench/api/node/extHostDocumentContentProviders.ts +++ b/src/vs/workbench/api/node/extHostDocumentContentProviders.ts @@ -25,7 +25,7 @@ export class ExtHostDocumentContentProvider implements ExtHostDocumentContentPro private readonly _documentsAndEditors: ExtHostDocumentsAndEditors; constructor(mainContext: IMainContext, documentsAndEditors: ExtHostDocumentsAndEditors) { - this._proxy = mainContext.get(MainContext.MainThreadDocumentContentProviders); + this._proxy = mainContext.getProxy(MainContext.MainThreadDocumentContentProviders); this._documentsAndEditors = documentsAndEditors; } diff --git a/src/vs/workbench/api/node/extHostDocuments.ts b/src/vs/workbench/api/node/extHostDocuments.ts index 131b85bd766..05a7690ed9e 100644 --- a/src/vs/workbench/api/node/extHostDocuments.ts +++ b/src/vs/workbench/api/node/extHostDocuments.ts @@ -33,7 +33,7 @@ export class ExtHostDocuments implements ExtHostDocumentsShape { private _documentLoader = new Map>(); constructor(mainContext: IMainContext, documentsAndEditors: ExtHostDocumentsAndEditors) { - this._proxy = mainContext.get(MainContext.MainThreadDocuments); + this._proxy = mainContext.getProxy(MainContext.MainThreadDocuments); this._documentsAndEditors = documentsAndEditors; this._toDispose = [ diff --git a/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts b/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts index da9cc09702c..fcba0bcaa09 100644 --- a/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts +++ b/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts @@ -52,7 +52,7 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha assert.ok(!this._documents.has(data.url.toString()), `document '${data.url} already exists!'`); const documentData = new ExtHostDocumentData( - this._mainContext.get(MainContext.MainThreadDocuments), + this._mainContext.getProxy(MainContext.MainThreadDocuments), data.url, data.lines, data.EOL, @@ -80,7 +80,7 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha const documentData = this._documents.get(data.document.toString()); const editor = new ExtHostTextEditor( - this._mainContext.get(MainContext.MainThreadEditors), + this._mainContext.getProxy(MainContext.MainThreadEditors), data.id, documentData, data.selections.map(typeConverters.toSelection), diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 31250d0b8e1..11b0389a4cf 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -132,10 +132,10 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { this._registry = new ExtensionDescriptionRegistry(initData.extensions); this._threadService = threadService; this._logService = logService; - this._mainThreadTelemetry = threadService.get(MainContext.MainThreadTelemetry); + this._mainThreadTelemetry = threadService.getProxy(MainContext.MainThreadTelemetry); this._storage = new ExtHostStorage(threadService); this._storagePath = new ExtensionStoragePath(initData.workspace, initData.environment); - this._proxy = this._threadService.get(MainContext.MainThreadExtensionService); + this._proxy = this._threadService.getProxy(MainContext.MainThreadExtensionService); this._activator = null; // initialize API first (i.e. do not release barrier until the API is initialized) diff --git a/src/vs/workbench/api/node/extHostFileSystem.ts b/src/vs/workbench/api/node/extHostFileSystem.ts index a7b8c787310..b89a252b593 100644 --- a/src/vs/workbench/api/node/extHostFileSystem.ts +++ b/src/vs/workbench/api/node/extHostFileSystem.ts @@ -19,7 +19,7 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape { private _handlePool: number = 0; constructor(mainContext: IMainContext) { - this._proxy = mainContext.get(MainContext.MainThreadFileSystem); + this._proxy = mainContext.getProxy(MainContext.MainThreadFileSystem); } registerFileSystemProvider(scheme: string, provider: vscode.FileSystemProvider) { diff --git a/src/vs/workbench/api/node/extHostLanguageFeatures.ts b/src/vs/workbench/api/node/extHostLanguageFeatures.ts index 6e5c04f836c..65dc86d171d 100644 --- a/src/vs/workbench/api/node/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/node/extHostLanguageFeatures.ts @@ -800,7 +800,7 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { heapMonitor: ExtHostHeapService, diagnostics: ExtHostDiagnostics ) { - this._proxy = mainContext.get(MainContext.MainThreadLanguageFeatures); + this._proxy = mainContext.getProxy(MainContext.MainThreadLanguageFeatures); this._documents = documents; this._commands = commands; this._heapService = heapMonitor; diff --git a/src/vs/workbench/api/node/extHostLanguages.ts b/src/vs/workbench/api/node/extHostLanguages.ts index e480ac1b40d..33baf762390 100644 --- a/src/vs/workbench/api/node/extHostLanguages.ts +++ b/src/vs/workbench/api/node/extHostLanguages.ts @@ -14,11 +14,10 @@ export class ExtHostLanguages { constructor( mainContext: IMainContext ) { - this._proxy = mainContext.get(MainContext.MainThreadLanguages); + this._proxy = mainContext.getProxy(MainContext.MainThreadLanguages); } getLanguages(): TPromise { return this._proxy.$getLanguages(); } } - diff --git a/src/vs/workbench/api/node/extHostMessageService.ts b/src/vs/workbench/api/node/extHostMessageService.ts index d0698c554bc..75f51b89b14 100644 --- a/src/vs/workbench/api/node/extHostMessageService.ts +++ b/src/vs/workbench/api/node/extHostMessageService.ts @@ -18,7 +18,7 @@ export class ExtHostMessageService { private _proxy: MainThreadMessageServiceShape; constructor(mainContext: IMainContext) { - this._proxy = mainContext.get(MainContext.MainThreadMessageService); + this._proxy = mainContext.getProxy(MainContext.MainThreadMessageService); } showMessage(extension: IExtensionDescription, severity: Severity, message: string, optionsOrFirstItem: vscode.MessageOptions | string, rest: string[]): Thenable; diff --git a/src/vs/workbench/api/node/extHostOutputService.ts b/src/vs/workbench/api/node/extHostOutputService.ts index ff39a9e2feb..d6901a1c2be 100644 --- a/src/vs/workbench/api/node/extHostOutputService.ts +++ b/src/vs/workbench/api/node/extHostOutputService.ts @@ -64,7 +64,7 @@ export class ExtHostOutputService { private _proxy: MainThreadOutputServiceShape; constructor(mainContext: IMainContext) { - this._proxy = mainContext.get(MainContext.MainThreadOutputService); + this._proxy = mainContext.getProxy(MainContext.MainThreadOutputService); } createOutputChannel(name: string): vscode.OutputChannel { diff --git a/src/vs/workbench/api/node/extHostQuickOpen.ts b/src/vs/workbench/api/node/extHostQuickOpen.ts index 03672ebf187..2d32ed719fe 100644 --- a/src/vs/workbench/api/node/extHostQuickOpen.ts +++ b/src/vs/workbench/api/node/extHostQuickOpen.ts @@ -24,7 +24,7 @@ export class ExtHostQuickOpen implements ExtHostQuickOpenShape { private _validateInput: (input: string) => string | Thenable; constructor(mainContext: IMainContext, workspace: ExtHostWorkspace, commands: ExtHostCommands) { - this._proxy = mainContext.get(MainContext.MainThreadQuickOpen); + this._proxy = mainContext.getProxy(MainContext.MainThreadQuickOpen); this._workspace = workspace; this._commands = commands; } diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 37a6b752ab1..67c62b275c4 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -458,7 +458,7 @@ export class ExtHostSCM { private _commands: ExtHostCommands, @ILogService private logService: ILogService ) { - this._proxy = mainContext.get(MainContext.MainThreadSCM); + this._proxy = mainContext.getProxy(MainContext.MainThreadSCM); _commands.registerArgumentProcessor({ processArgument: arg => { diff --git a/src/vs/workbench/api/node/extHostStatusBar.ts b/src/vs/workbench/api/node/extHostStatusBar.ts index 2de2bec359b..348cc6cb43e 100644 --- a/src/vs/workbench/api/node/extHostStatusBar.ts +++ b/src/vs/workbench/api/node/extHostStatusBar.ts @@ -163,7 +163,7 @@ export class ExtHostStatusBar { private _statusMessage: StatusBarMessage; constructor(mainContext: IMainContext) { - this._proxy = mainContext.get(MainContext.MainThreadStatusBar); + this._proxy = mainContext.getProxy(MainContext.MainThreadStatusBar); this._statusMessage = new StatusBarMessage(this); } diff --git a/src/vs/workbench/api/node/extHostStorage.ts b/src/vs/workbench/api/node/extHostStorage.ts index d24797a397f..5a36bd5d550 100644 --- a/src/vs/workbench/api/node/extHostStorage.ts +++ b/src/vs/workbench/api/node/extHostStorage.ts @@ -12,7 +12,7 @@ export class ExtHostStorage { private _proxy: MainThreadStorageShape; constructor(mainContext: IMainContext) { - this._proxy = mainContext.get(MainContext.MainThreadStorage); + this._proxy = mainContext.getProxy(MainContext.MainThreadStorage); } getValue(shared: boolean, key: string, defaultValue?: T): TPromise { @@ -22,4 +22,4 @@ export class ExtHostStorage { setValue(shared: boolean, key: string, value: any): TPromise { return this._proxy.$setValue(shared, key, value); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 09538e65693..41cb0357367 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -424,7 +424,7 @@ export class ExtHostTask implements ExtHostTaskShape { private _handlers: Map; constructor(mainContext: IMainContext, extHostWorkspace: ExtHostWorkspace) { - this._proxy = mainContext.get(MainContext.MainThreadTask); + this._proxy = mainContext.getProxy(MainContext.MainThreadTask); this._extHostWorkspace = extHostWorkspace; this._handleCounter = 0; this._handlers = new Map(); diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 9fa99d2e1eb..185e2e4ad5d 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -102,7 +102,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { constructor(mainContext: IMainContext) { this._onDidCloseTerminal = new Emitter(); - this._proxy = mainContext.get(MainContext.MainThreadTerminalService); + this._proxy = mainContext.getProxy(MainContext.MainThreadTerminalService); this._terminals = []; } diff --git a/src/vs/workbench/api/node/extHostTextEditors.ts b/src/vs/workbench/api/node/extHostTextEditors.ts index 10232e0c87c..35ad03c3a49 100644 --- a/src/vs/workbench/api/node/extHostTextEditors.ts +++ b/src/vs/workbench/api/node/extHostTextEditors.ts @@ -37,7 +37,7 @@ export class ExtHostEditors implements ExtHostEditorsShape { mainContext: IMainContext, extHostDocumentsAndEditors: ExtHostDocumentsAndEditors, ) { - this._proxy = mainContext.get(MainContext.MainThreadEditors); + this._proxy = mainContext.getProxy(MainContext.MainThreadEditors); this._extHostDocumentsAndEditors = extHostDocumentsAndEditors; this._extHostDocumentsAndEditors.onDidChangeVisibleTextEditors(e => this._onDidChangeVisibleTextEditors.fire(e)); diff --git a/src/vs/workbench/api/node/extHostWindow.ts b/src/vs/workbench/api/node/extHostWindow.ts index ad0872b83d4..8344a08fc1c 100644 --- a/src/vs/workbench/api/node/extHostWindow.ts +++ b/src/vs/workbench/api/node/extHostWindow.ts @@ -23,7 +23,7 @@ export class ExtHostWindow implements ExtHostWindowShape { get state(): WindowState { return this._state; } constructor(mainContext: IMainContext) { - this._proxy = mainContext.get(MainContext.MainThreadWindow); + this._proxy = mainContext.getProxy(MainContext.MainThreadWindow); this._proxy.$getWindowVisibility().then(isFocused => this.$onDidChangeWindowFocus(isFocused)); } diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index 73f38a7da6e..dd684c29557 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -59,7 +59,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape { readonly onDidChangeWorkspace: Event = this._onDidChangeWorkspace.event; constructor(mainContext: IMainContext, data: IWorkspaceData) { - this._proxy = mainContext.get(MainContext.MainThreadWorkspace); + this._proxy = mainContext.getProxy(MainContext.MainThreadWorkspace); this._workspace = Workspace2.fromData(data); } diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index 9466bd04ec4..24e02e00271 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -97,7 +97,7 @@ export class ExtensionHostMain { this._logService.info('extension host started'); this._logService.trace('initData', initData); - this._extHostConfiguration = new ExtHostConfiguration(rpcProtocol.get(MainContext.MainThreadConfiguration), extHostWorkspace, initData.configuration); + this._extHostConfiguration = new ExtHostConfiguration(rpcProtocol.getProxy(MainContext.MainThreadConfiguration), extHostWorkspace, initData.configuration); this._extensionService = new ExtHostExtensionService(initData, rpcProtocol, extHostWorkspace, this._extHostConfiguration, this._logService); // error forwarding and stack trace scanning @@ -119,8 +119,8 @@ export class ExtensionHostMain { return `${error.name || 'Error'}: ${error.message || ''}${stackTraceMessage}`; }; }); - const mainThreadExtensions = rpcProtocol.get(MainContext.MainThreadExtensionService); - const mainThreadErrors = rpcProtocol.get(MainContext.MainThreadErrors); + const mainThreadExtensions = rpcProtocol.getProxy(MainContext.MainThreadExtensionService); + const mainThreadErrors = rpcProtocol.getProxy(MainContext.MainThreadErrors); errors.setUnexpectedErrorHandler(err => { const data = errors.transformErrorForSerialization(err); const extension = extensionErrors.get(err); diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index 11d5067a946..907246798fe 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -262,7 +262,7 @@ export class ExtensionService extends Disposable implements IExtensionService { const expected: ProxyIdentifier[] = Object.keys(MainContext).map((key) => MainContext[key]); this._extensionHostProcessRPCProtocol.assertRegistered(expected); - return this._extensionHostProcessRPCProtocol.get(ExtHostContext.ExtHostExtensionService); + return this._extensionHostProcessRPCProtocol.getProxy(ExtHostContext.ExtHostExtensionService); } // ---- begin IExtensionService diff --git a/src/vs/workbench/services/extensions/node/proxyIdentifier.ts b/src/vs/workbench/services/extensions/node/proxyIdentifier.ts index 4a21a9019e9..44ccdc882b6 100644 --- a/src/vs/workbench/services/extensions/node/proxyIdentifier.ts +++ b/src/vs/workbench/services/extensions/node/proxyIdentifier.ts @@ -12,7 +12,7 @@ export interface IRPCProtocol { * > * > Use `getFast` for a proxy where such arguments are not automatically serialized/deserialized. */ - get(identifier: ProxyIdentifier): T; + getProxy(identifier: ProxyIdentifier): T; /** * Returns a proxy to an object addressable/named in the extension host process. diff --git a/src/vs/workbench/services/extensions/node/rpcProtocol.ts b/src/vs/workbench/services/extensions/node/rpcProtocol.ts index 04c2e0e3e94..3a95f8feea6 100644 --- a/src/vs/workbench/services/extensions/node/rpcProtocol.ts +++ b/src/vs/workbench/services/extensions/node/rpcProtocol.ts @@ -44,7 +44,7 @@ export class RPCProtocol implements IRPCProtocol { }); } - public get(identifier: ProxyIdentifier): T { + public getProxy(identifier: ProxyIdentifier): T { if (!this._proxies[identifier.id]) { this._proxies[identifier.id] = this._createProxy(identifier.id, true); } @@ -65,8 +65,8 @@ export class RPCProtocol implements IRPCProtocol { target[name] = (...myArgs: any[]) => { return ( isFancy - ? this.fancyRemoteCall(proxyId, name, myArgs) - : this.remoteCall(proxyId, name, myArgs) + ? this.fancyRemoteCall(proxyId, name, myArgs) + : this.remoteCall(proxyId, name, myArgs) ); }; } diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts index 934633cac14..a267a857a4a 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts @@ -15,7 +15,10 @@ suite('ExtHostDocumentsAndEditors', () => { setup(function () { editors = new ExtHostDocumentsAndEditors({ - get() { return undefined; } + getProxy: () => { return undefined; }, + getFastProxy: () => { return undefined; }, + set: undefined, + assertRegistered: undefined }); }); diff --git a/src/vs/workbench/test/electron-browser/api/testThreadService.ts b/src/vs/workbench/test/electron-browser/api/testThreadService.ts index c22dfd95099..ccabfbb32c0 100644 --- a/src/vs/workbench/test/electron-browser/api/testThreadService.ts +++ b/src/vs/workbench/test/electron-browser/api/testThreadService.ts @@ -6,11 +6,14 @@ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; -import { ProxyIdentifier } from 'vs/workbench/services/extensions/node/proxyIdentifier'; +import { ProxyIdentifier, IRPCProtocol } from 'vs/workbench/services/extensions/node/proxyIdentifier'; -export function OneGetThreadService(thing: any) { +export function OneGetThreadService(thing: any): IRPCProtocol { return { - get(): T { + getProxy(): T { + return thing; + }, + getFastProxy(): T { return thing; }, set(identifier: ProxyIdentifier, value: R): R { @@ -75,7 +78,7 @@ export abstract class AbstractTestThreadService { protected abstract _callOnRemote(proxyId: string, path: string, args: any[]): TPromise; } -export class TestThreadService extends AbstractTestThreadService { +export class TestThreadService extends AbstractTestThreadService implements IRPCProtocol { constructor(isMainProcess: boolean = false) { super(isMainProcess); } @@ -120,7 +123,16 @@ export class TestThreadService extends AbstractTestThreadService { return value; } - get(identifier: ProxyIdentifier): T { + getProxy(identifier: ProxyIdentifier): T { + return this._get(identifier); + } + + getFastProxy(identifier: ProxyIdentifier): T { + return this._get(identifier); + } + + _get(identifier: ProxyIdentifier): T { + let id = identifier.id; if (this._locals[id]) { return this._locals[id]; From 9f131c176203f405a9a5e447e91eccff6dedfd53 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 13 Dec 2017 16:21:12 +0100 Subject: [PATCH 209/615] more submodule support, diff colorization --- extensions/git/src/commands.ts | 31 +- extensions/git/src/contentProvider.ts | 16 +- extensions/git/src/git.ts | 17 ++ extensions/git/src/model.ts | 28 +- extensions/git/src/repository.ts | 9 +- extensions/git/src/uri.ts | 39 ++- extensions/gitsyntax/OSSREADME.json | 69 +++-- .../diff.language-configuration.json | 11 + extensions/gitsyntax/package.json | 28 +- extensions/gitsyntax/syntaxes/diff.tmLanguage | 268 ++++++++++++++++++ 10 files changed, 455 insertions(+), 61 deletions(-) create mode 100644 extensions/gitsyntax/diff.language-configuration.json create mode 100644 extensions/gitsyntax/syntaxes/diff.tmLanguage diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 004c1c8540a..a95b2445f76 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -169,14 +169,33 @@ export class CommandCenter { } private async _openResource(resource: Resource, preview?: boolean, preserveFocus?: boolean, preserveSelection?: boolean): Promise { - const stat = await new Promise((c, e) => lstat(resource.resourceUri.fsPath, (err, stat) => err ? e(err) : c(stat))); + let stat: Stats | undefined; - if (stat.isDirectory()) { - return; + try { + stat = await new Promise((c, e) => lstat(resource.resourceUri.fsPath, (err, stat) => err ? e(err) : c(stat))); + } catch (err) { + // noop } - const left = await this.getLeftResource(resource); - const right = await this.getRightResource(resource); + let left: Uri | undefined; + let right: Uri | undefined; + + if (stat && stat.isDirectory()) { + outer: + for (const repository of this.model.repositories) { + for (const submodule of repository.submodules) { + const submodulePath = path.join(repository.root, submodule.path); + + if (submodulePath === resource.resourceUri.fsPath) { + right = toGitUri(Uri.file(submodulePath), resource.resourceGroupType === ResourceGroupType.Index ? 'index' : 'wt', { submoduleOf: repository.root }); + break outer; + } + } + } + } else { + left = await this.getLeftResource(resource); + right = await this.getRightResource(resource); + } const title = this.getTitle(resource); @@ -1697,7 +1716,7 @@ export class CommandCenter { const isSingleResource = arg instanceof Uri; const groups = resources.reduce((result, resource) => { - const repository = this.model.getRepository(resource); + const repository = this.model.getRepository(resource, true); if (!repository) { console.warn('Could not find git repository for ', resource); diff --git a/extensions/git/src/contentProvider.ts b/extensions/git/src/contentProvider.ts index 9ab283dcd1e..67b36b3feca 100644 --- a/extensions/git/src/contentProvider.ts +++ b/extensions/git/src/contentProvider.ts @@ -52,7 +52,7 @@ export class GitContentProvider { return; } - this._onDidChange.fire(toGitUri(uri, '', true)); + this._onDidChange.fire(toGitUri(uri, '', { replaceFileExtension: true })); } @debounce(1100) @@ -83,6 +83,18 @@ export class GitContentProvider { } async provideTextDocumentContent(uri: Uri): Promise { + let { path, ref, submoduleOf } = fromGitUri(uri); + + if (submoduleOf) { + const repository = this.model.getRepository(submoduleOf); + + if (!repository) { + return ''; + } + + return await repository.diff(path, { cached: ref === 'index' }); + } + const repository = this.model.getRepository(uri); if (!repository) { @@ -95,8 +107,6 @@ export class GitContentProvider { this.cache[cacheKey] = cacheValue; - let { path, ref } = fromGitUri(uri); - if (ref === '~') { const fileUri = Uri.file(path); const uriString = fileUri.toString(); diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index dbadd2003f6..bc9c120d338 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -597,6 +597,10 @@ export function parseGitmodules(raw: string): Submodule[] { return result; } +export interface DiffOptions { + cached?: boolean; +} + export class Repository { constructor( @@ -735,6 +739,19 @@ export class Repository { } } + async diff(path: string, options: DiffOptions = {}): Promise { + const args = ['diff']; + + if (options.cached) { + args.push('--cached'); + } + + args.push('--', path); + + const result = await this.run(args); + return result.stdout; + } + async add(paths: string[]): Promise { const args = ['add', '-A', '--']; diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 1d40618a5e2..1a23c1795d2 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -265,19 +265,19 @@ export class Model { getRepository(sourceControl: SourceControl): Repository | undefined; getRepository(resourceGroup: SourceControlResourceGroup): Repository | undefined; - getRepository(path: string): Repository | undefined; - getRepository(resource: Uri): Repository | undefined; - getRepository(hint: any): Repository | undefined { - const liveRepository = this.getOpenRepository(hint); + getRepository(path: string, possibleSubmoduleRoot?: boolean): Repository | undefined; + getRepository(resource: Uri, possibleSubmoduleRoot?: boolean): Repository | undefined; + getRepository(hint: any, possibleSubmoduleRoot?: boolean): Repository | undefined { + const liveRepository = this.getOpenRepository(hint, possibleSubmoduleRoot); return liveRepository && liveRepository.repository; } private getOpenRepository(repository: Repository): OpenRepository | undefined; private getOpenRepository(sourceControl: SourceControl): OpenRepository | undefined; private getOpenRepository(resourceGroup: SourceControlResourceGroup): OpenRepository | undefined; - private getOpenRepository(path: string): OpenRepository | undefined; - private getOpenRepository(resource: Uri): OpenRepository | undefined; - private getOpenRepository(hint: any): OpenRepository | undefined { + private getOpenRepository(path: string, possibleSubmoduleRoot?: boolean): OpenRepository | undefined; + private getOpenRepository(resource: Uri, possibleSubmoduleRoot?: boolean): OpenRepository | undefined; + private getOpenRepository(hint: any, possibleSubmoduleRoot?: boolean): OpenRepository | undefined { if (!hint) { return undefined; } @@ -295,15 +295,21 @@ export class Model { outer: for (const liveRepository of this.openRepositories.sort((a, b) => b.repository.root.length - a.repository.root.length)) { + if (possibleSubmoduleRoot && liveRepository.repository.root === resourcePath) { + continue; + } + if (!isDescendant(liveRepository.repository.root, resourcePath)) { continue; } - for (const submodule of liveRepository.repository.submodules) { - const submoduleRoot = path.join(liveRepository.repository.root, submodule.path); + if (!possibleSubmoduleRoot) { + for (const submodule of liveRepository.repository.submodules) { + const submoduleRoot = path.join(liveRepository.repository.root, submodule.path); - if (isDescendant(submoduleRoot, resourcePath)) { - continue outer; + if (isDescendant(submoduleRoot, resourcePath)) { + continue outer; + } } } diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 332522c014d..9c5c07a9cc5 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -6,7 +6,7 @@ 'use strict'; import { Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, DecorationData, Memento } from 'vscode'; -import { Repository as BaseRepository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash, RefType, GitError, Submodule } from './git'; +import { Repository as BaseRepository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash, RefType, GitError, Submodule, DiffOptions } from './git'; import { anyEvent, filterEvent, eventToPromise, dispose, find, isDescendant, IDisposable, onceEvent, EmptyDisposable, debounceEvent } from './util'; import { memoize, throttle, debounce } from './decorators'; import { toGitUri } from './uri'; @@ -280,6 +280,7 @@ export class Resource implements SourceControlResourceState { export enum Operation { Status = 'Status', + Diff = 'Diff', Add = 'Add', RevertFiles = 'RevertFiles', Commit = 'Commit', @@ -557,7 +558,7 @@ export class Repository implements Disposable { return; } - return toGitUri(uri, '', true); + return toGitUri(uri, '', { replaceFileExtension: true }); } private async updateCommitTemplate(): Promise { @@ -573,6 +574,10 @@ export class Repository implements Disposable { await this.run(Operation.Status); } + diff(path: string, options: DiffOptions = {}): Promise { + return this.run(Operation.Diff, () => this.repository.diff(path, options)); + } + async add(resources: Uri[]): Promise { await this.run(Operation.Add, () => this.repository.add(resources.map(r => r.fsPath))); } diff --git a/extensions/git/src/uri.ts b/extensions/git/src/uri.ts index 0a56c9a5a8e..0e96b3504b0 100644 --- a/extensions/git/src/uri.ts +++ b/extensions/git/src/uri.ts @@ -7,20 +7,45 @@ import { Uri } from 'vscode'; -export function fromGitUri(uri: Uri): { path: string; ref: string; } { +export interface GitUriParams { + path: string; + ref: string; + submoduleOf?: string; +} + +export function fromGitUri(uri: Uri): GitUriParams { return JSON.parse(uri.query); } +export interface GitUriOptions { + replaceFileExtension?: boolean; + submoduleOf?: string; +} + // As a mitigation for extensions like ESLint showing warnings and errors // for git URIs, let's change the file extension of these uris to .git, // when `replaceFileExtension` is true. -export function toGitUri(uri: Uri, ref: string, replaceFileExtension = false): Uri { +export function toGitUri(uri: Uri, ref: string, options: GitUriOptions = {}): Uri { + const params: GitUriParams = { + path: uri.fsPath, + ref + }; + + if (options.submoduleOf) { + params.submoduleOf = options.submoduleOf; + } + + let path = uri.path; + + if (options.replaceFileExtension) { + path = path + `${path}.git`; + } else if (options.submoduleOf) { + path = path + `${path}.diff`; + } + return uri.with({ scheme: 'git', - path: replaceFileExtension ? `${uri.path}.git` : uri.path, - query: JSON.stringify({ - path: uri.fsPath, - ref - }) + path, + query: JSON.stringify(params) }); } \ No newline at end of file diff --git a/extensions/gitsyntax/OSSREADME.json b/extensions/gitsyntax/OSSREADME.json index 0e3ddd52faf..347ae77f6e5 100644 --- a/extensions/gitsyntax/OSSREADME.json +++ b/extensions/gitsyntax/OSSREADME.json @@ -1,29 +1,42 @@ // ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: -[{ - "name": "textmate/git.tmbundle", - "version": "0.0.0", - "license": "MIT", - "repositoryURL": "https://github.com/textmate/git.tmbundle", - "licenseDetail": [ - "Copyright (c) 2008 Tim Harper", - "", - "Permission is hereby granted, free of charge, to any person obtaining", - "a copy of this software and associated documentation files (the\"", - "Software\"), to deal in the Software without restriction, including", - "without limitation the rights to use, copy, modify, merge, publish,", - "distribute, sublicense, and/or sell copies of the Software, and to", - "permit persons to whom the Software is furnished to do so, subject to", - "the following conditions:", - "", - "The above copyright notice and this permission notice shall be", - "included in all copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,", - "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF", - "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND", - "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE", - "LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION", - "OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION", - "WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." - ] -}] \ No newline at end of file +[ + { + "name": "textmate/git.tmbundle", + "version": "0.0.0", + "license": "MIT", + "repositoryURL": "https://github.com/textmate/git.tmbundle", + "licenseDetail": [ + "Copyright (c) 2008 Tim Harper", + "", + "Permission is hereby granted, free of charge, to any person obtaining", + "a copy of this software and associated documentation files (the\"", + "Software\"), to deal in the Software without restriction, including", + "without limitation the rights to use, copy, modify, merge, publish,", + "distribute, sublicense, and/or sell copies of the Software, and to", + "permit persons to whom the Software is furnished to do so, subject to", + "the following conditions:", + "", + "The above copyright notice and this permission notice shall be", + "included in all copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,", + "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF", + "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND", + "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE", + "LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION", + "OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION", + "WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + ] + }, + { + "name": "textmate/diff.tmbundle", + "version": "0.0.0", + "repositoryURL": "https://github.com/textmate/diff.tmbundle", + "licenseDetail": [ + "Permission to copy, use, modify, sell and distribute this", + "software is granted. This software is provided \"as is\" without", + "express or implied warranty, and with no claim as to its", + "suitability for any purpose." + ] + } +] \ No newline at end of file diff --git a/extensions/gitsyntax/diff.language-configuration.json b/extensions/gitsyntax/diff.language-configuration.json new file mode 100644 index 00000000000..b61fbe63d34 --- /dev/null +++ b/extensions/gitsyntax/diff.language-configuration.json @@ -0,0 +1,11 @@ +{ + "comments": { + "lineComment": "#", + "blockComment": [ "#", " " ] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ] +} \ No newline at end of file diff --git a/extensions/gitsyntax/package.json b/extensions/gitsyntax/package.json index 0040fe55473..d01893d002a 100644 --- a/extensions/gitsyntax/package.json +++ b/extensions/gitsyntax/package.json @@ -37,6 +37,19 @@ "git-rebase-todo" ], "configuration": "./git-rebase.language-configuration.json" + }, + { + "id": "diff", + "aliases": [ + "Diff", + "diff" + ], + "extensions": [ + ".patch", + ".diff", + ".rej" + ], + "configuration": "./diff.language-configuration.json" } ], "grammars": [ @@ -49,12 +62,19 @@ "language": "git-rebase", "scopeName": "text.git-rebase", "path": "./syntaxes/git-rebase.tmLanguage.json" + }, + { + "language": "diff", + "scopeName": "source.diff", + "path": "./syntaxes/diff.tmLanguage" } ], "configurationDefaults": { - "[git-commit]": { - "editor.rulers": [72] - } - } + "[git-commit]": { + "editor.rulers": [ + 72 + ] + } + } } } \ No newline at end of file diff --git a/extensions/gitsyntax/syntaxes/diff.tmLanguage b/extensions/gitsyntax/syntaxes/diff.tmLanguage new file mode 100644 index 00000000000..e71adc69fd1 --- /dev/null +++ b/extensions/gitsyntax/syntaxes/diff.tmLanguage @@ -0,0 +1,268 @@ + + + + + fileTypes + + patch + diff + rej + + firstLineMatch + (?x)^ + (===\ modified\ file + |==== \s* // .+ \s - \s .+ \s+ ==== + |Index:\ + |---\ [^%\n] + |\*\*\*.*\d{4}\s*$ + |\d+(,\d+)* (a|d|c) \d+(,\d+)* $ + |diff\ --git\ + |commit\ [0-9a-f]{40}$ + ) + keyEquivalent + ^~D + name + Diff + patterns + + + captures + + 1 + + name + punctuation.definition.separator.diff + + + match + ^((\*{15})|(={67})|(-{3}))$\n? + name + meta.separator.diff + + + match + ^\d+(,\d+)*(a|d|c)\d+(,\d+)*$\n? + name + meta.diff.range.normal + + + captures + + 1 + + name + punctuation.definition.range.diff + + 2 + + name + meta.toc-list.line-number.diff + + 3 + + name + punctuation.definition.range.diff + + + match + ^(@@)\s*(.+?)\s*(@@)($\n?)? + name + meta.diff.range.unified + + + captures + + 3 + + name + punctuation.definition.range.diff + + 4 + + name + punctuation.definition.range.diff + + 6 + + name + punctuation.definition.range.diff + + 7 + + name + punctuation.definition.range.diff + + + match + ^(((\-{3}) .+ (\-{4}))|((\*{3}) .+ (\*{4})))$\n? + name + meta.diff.range.context + + + match + ^diff --git a/.*$\n? + name + meta.diff.header.git + + + match + ^diff (-|\S+\s+\S+).*$\n? + name + meta.diff.header.command + + + captures + + 4 + + name + punctuation.definition.from-file.diff + + 6 + + name + punctuation.definition.from-file.diff + + 7 + + name + punctuation.definition.from-file.diff + + + match + (^(((-{3}) .+)|((\*{3}) .+))$\n?|^(={4}) .+(?= - )) + name + meta.diff.header.from-file + + + captures + + 2 + + name + punctuation.definition.to-file.diff + + 3 + + name + punctuation.definition.to-file.diff + + 4 + + name + punctuation.definition.to-file.diff + + + match + (^(\+{3}) .+$\n?| (-) .* (={4})$\n?) + name + meta.diff.header.to-file + + + captures + + 3 + + name + punctuation.definition.inserted.diff + + 6 + + name + punctuation.definition.inserted.diff + + + match + ^(((>)( .*)?)|((\+).*))$\n? + name + markup.inserted.diff + + + captures + + 1 + + name + punctuation.definition.changed.diff + + + match + ^(!).*$\n? + name + markup.changed.diff + + + captures + + 3 + + name + punctuation.definition.deleted.diff + + 6 + + name + punctuation.definition.deleted.diff + + + match + ^(((<)( .*)?)|((-).*))$\n? + name + markup.deleted.diff + + + begin + ^(#) + captures + + 1 + + name + punctuation.definition.comment.diff + + + comment + Git produces unified diffs with embedded comments" + end + \n + name + comment.line.number-sign.diff + + + match + ^index [0-9a-f]{7,40}\.\.[0-9a-f]{7,40}.*$\n? + name + meta.diff.index.git + + + captures + + 1 + + name + punctuation.separator.key-value.diff + + 2 + + name + meta.toc-list.file-name.diff + + + match + ^Index(:) (.+)$\n? + name + meta.diff.index + + + match + ^Only in .*: .*$\n? + name + meta.diff.only-in + + + scopeName + source.diff + uuid + 7E848FF4-708E-11D9-97B4-0011242E4184 + + From bef346d62b4a1bca74b6c60062df80dbb0bfaa11 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 16:21:27 +0100 Subject: [PATCH 210/615] Have the marshalling kind be a property of the proxy identifier (#36972) --- src/vs/workbench/api/node/extHost.protocol.ts | 101 +++++++++--------- .../extensions/node/proxyIdentifier.ts | 38 +++---- .../services/extensions/node/rpcProtocol.ts | 9 +- .../api/extHostDocumentsAndEditors.test.ts | 1 - .../electron-browser/api/testThreadService.ts | 12 --- 5 files changed, 72 insertions(+), 89 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 29e54453820..1385a5226ea 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -8,7 +8,8 @@ import { createMainContextProxyIdentifier as createMainId, createExtHostContextProxyIdentifier as createExtId, ProxyIdentifier, - IRPCProtocol + IRPCProtocol, + ProxyType } from 'vs/workbench/services/extensions/node/proxyIdentifier'; import * as vscode from 'vscode'; @@ -664,56 +665,56 @@ export interface ExtHostWindowShape { // --- proxy identifiers export const MainContext = { - MainThreadCommands: >createMainId('MainThreadCommands'), - MainThreadConfiguration: createMainId('MainThreadConfiguration'), - MainThreadDebugService: createMainId('MainThreadDebugService'), - MainThreadDecorations: createMainId('MainThreadDecorations'), - MainThreadDiagnostics: createMainId('MainThreadDiagnostics'), - MainThreadDialogs: createMainId('MainThreadDiaglogs'), - MainThreadDocuments: createMainId('MainThreadDocuments'), - MainThreadDocumentContentProviders: createMainId('MainThreadDocumentContentProviders'), - MainThreadEditors: createMainId('MainThreadEditors'), - MainThreadErrors: createMainId('MainThreadErrors'), - MainThreadTreeViews: createMainId('MainThreadTreeViews'), - MainThreadLanguageFeatures: createMainId('MainThreadLanguageFeatures'), - MainThreadLanguages: createMainId('MainThreadLanguages'), - MainThreadMessageService: createMainId('MainThreadMessageService'), - MainThreadOutputService: createMainId('MainThreadOutputService'), - MainThreadProgress: createMainId('MainThreadProgress'), - MainThreadQuickOpen: createMainId('MainThreadQuickOpen'), - MainThreadStatusBar: createMainId('MainThreadStatusBar'), - MainThreadStorage: createMainId('MainThreadStorage'), - MainThreadTelemetry: createMainId('MainThreadTelemetry'), - MainThreadTerminalService: createMainId('MainThreadTerminalService'), - MainThreadWorkspace: createMainId('MainThreadWorkspace'), - MainThreadFileSystem: createMainId('MainThreadFileSystem'), - MainThreadExtensionService: createMainId('MainThreadExtensionService'), - MainThreadSCM: createMainId('MainThreadSCM'), - MainThreadTask: createMainId('MainThreadTask'), - MainThreadWindow: createMainId('MainThreadWindow'), + MainThreadCommands: >createMainId('MainThreadCommands', ProxyType.CustomMarshaller), + MainThreadConfiguration: createMainId('MainThreadConfiguration', ProxyType.CustomMarshaller), + MainThreadDebugService: createMainId('MainThreadDebugService', ProxyType.CustomMarshaller), + MainThreadDecorations: createMainId('MainThreadDecorations', ProxyType.CustomMarshaller), + MainThreadDiagnostics: createMainId('MainThreadDiagnostics', ProxyType.CustomMarshaller), + MainThreadDialogs: createMainId('MainThreadDiaglogs', ProxyType.CustomMarshaller), + MainThreadDocuments: createMainId('MainThreadDocuments', ProxyType.CustomMarshaller), + MainThreadDocumentContentProviders: createMainId('MainThreadDocumentContentProviders', ProxyType.CustomMarshaller), + MainThreadEditors: createMainId('MainThreadEditors', ProxyType.CustomMarshaller), + MainThreadErrors: createMainId('MainThreadErrors', ProxyType.CustomMarshaller), + MainThreadTreeViews: createMainId('MainThreadTreeViews', ProxyType.CustomMarshaller), + MainThreadLanguageFeatures: createMainId('MainThreadLanguageFeatures', ProxyType.CustomMarshaller), + MainThreadLanguages: createMainId('MainThreadLanguages', ProxyType.CustomMarshaller), + MainThreadMessageService: createMainId('MainThreadMessageService', ProxyType.CustomMarshaller), + MainThreadOutputService: createMainId('MainThreadOutputService', ProxyType.CustomMarshaller), + MainThreadProgress: createMainId('MainThreadProgress', ProxyType.CustomMarshaller), + MainThreadQuickOpen: createMainId('MainThreadQuickOpen', ProxyType.CustomMarshaller), + MainThreadStatusBar: createMainId('MainThreadStatusBar', ProxyType.CustomMarshaller), + MainThreadStorage: createMainId('MainThreadStorage', ProxyType.CustomMarshaller), + MainThreadTelemetry: createMainId('MainThreadTelemetry', ProxyType.CustomMarshaller), + MainThreadTerminalService: createMainId('MainThreadTerminalService', ProxyType.CustomMarshaller), + MainThreadWorkspace: createMainId('MainThreadWorkspace', ProxyType.CustomMarshaller), + MainThreadFileSystem: createMainId('MainThreadFileSystem', ProxyType.CustomMarshaller), + MainThreadExtensionService: createMainId('MainThreadExtensionService', ProxyType.CustomMarshaller), + MainThreadSCM: createMainId('MainThreadSCM', ProxyType.CustomMarshaller), + MainThreadTask: createMainId('MainThreadTask', ProxyType.CustomMarshaller), + MainThreadWindow: createMainId('MainThreadWindow', ProxyType.CustomMarshaller), }; export const ExtHostContext = { - ExtHostCommands: createExtId('ExtHostCommands'), - ExtHostConfiguration: createExtId('ExtHostConfiguration'), - ExtHostDiagnostics: createExtId('ExtHostDiagnostics'), - ExtHostDebugService: createExtId('ExtHostDebugService'), - ExtHostDecorations: createExtId('ExtHostDecorations'), - ExtHostDocumentsAndEditors: createExtId('ExtHostDocumentsAndEditors'), - ExtHostDocuments: createExtId('ExtHostDocuments'), - ExtHostDocumentContentProviders: createExtId('ExtHostDocumentContentProviders'), - ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant'), - ExtHostEditors: createExtId('ExtHostEditors'), - ExtHostTreeViews: createExtId('ExtHostTreeViews'), - ExtHostFileSystem: createExtId('ExtHostFileSystem'), - ExtHostFileSystemEventService: createExtId('ExtHostFileSystemEventService'), - ExtHostHeapService: createExtId('ExtHostHeapMonitor'), - ExtHostLanguageFeatures: createExtId('ExtHostLanguageFeatures'), - ExtHostQuickOpen: createExtId('ExtHostQuickOpen'), - ExtHostExtensionService: createExtId('ExtHostExtensionService'), - ExtHostTerminalService: createExtId('ExtHostTerminalService'), - ExtHostSCM: createExtId('ExtHostSCM'), - ExtHostTask: createExtId('ExtHostTask'), - ExtHostWorkspace: createExtId('ExtHostWorkspace'), - ExtHostWindow: createExtId('ExtHostWindow'), + ExtHostCommands: createExtId('ExtHostCommands', ProxyType.CustomMarshaller), + ExtHostConfiguration: createExtId('ExtHostConfiguration', ProxyType.CustomMarshaller), + ExtHostDiagnostics: createExtId('ExtHostDiagnostics', ProxyType.CustomMarshaller), + ExtHostDebugService: createExtId('ExtHostDebugService', ProxyType.CustomMarshaller), + ExtHostDecorations: createExtId('ExtHostDecorations', ProxyType.CustomMarshaller), + ExtHostDocumentsAndEditors: createExtId('ExtHostDocumentsAndEditors', ProxyType.CustomMarshaller), + ExtHostDocuments: createExtId('ExtHostDocuments', ProxyType.CustomMarshaller), + ExtHostDocumentContentProviders: createExtId('ExtHostDocumentContentProviders', ProxyType.CustomMarshaller), + ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant', ProxyType.CustomMarshaller), + ExtHostEditors: createExtId('ExtHostEditors', ProxyType.CustomMarshaller), + ExtHostTreeViews: createExtId('ExtHostTreeViews', ProxyType.CustomMarshaller), + ExtHostFileSystem: createExtId('ExtHostFileSystem', ProxyType.CustomMarshaller), + ExtHostFileSystemEventService: createExtId('ExtHostFileSystemEventService', ProxyType.CustomMarshaller), + ExtHostHeapService: createExtId('ExtHostHeapMonitor', ProxyType.CustomMarshaller), + ExtHostLanguageFeatures: createExtId('ExtHostLanguageFeatures', ProxyType.CustomMarshaller), + ExtHostQuickOpen: createExtId('ExtHostQuickOpen', ProxyType.CustomMarshaller), + ExtHostExtensionService: createExtId('ExtHostExtensionService', ProxyType.CustomMarshaller), + ExtHostTerminalService: createExtId('ExtHostTerminalService', ProxyType.CustomMarshaller), + ExtHostSCM: createExtId('ExtHostSCM', ProxyType.CustomMarshaller), + ExtHostTask: createExtId('ExtHostTask', ProxyType.CustomMarshaller), + ExtHostWorkspace: createExtId('ExtHostWorkspace', ProxyType.CustomMarshaller), + ExtHostWindow: createExtId('ExtHostWindow', ProxyType.CustomMarshaller), }; diff --git a/src/vs/workbench/services/extensions/node/proxyIdentifier.ts b/src/vs/workbench/services/extensions/node/proxyIdentifier.ts index 44ccdc882b6..5d2c7484abd 100644 --- a/src/vs/workbench/services/extensions/node/proxyIdentifier.ts +++ b/src/vs/workbench/services/extensions/node/proxyIdentifier.ts @@ -6,20 +6,10 @@ export interface IRPCProtocol { /** - * Returns a proxy to an object addressable/named in the extension host process. - * > **Note:** Arguments or results of type `URI` or `RegExp` will be serialized/deserialized automatically, - * > but this has a performance cost, as each argument/result must be visited. - * > - * > Use `getFast` for a proxy where such arguments are not automatically serialized/deserialized. + * Returns a proxy to an object addressable/named in the extension host process or in the renderer process. */ getProxy(identifier: ProxyIdentifier): T; - /** - * Returns a proxy to an object addressable/named in the extension host process. - * > **Note:** Arguments or results of type `URI` or `RegExp` will **not** be serialized/deserialized automatically. - */ - getFastProxy(identifier: ProxyIdentifier): T; - /** * Register manually created instance. */ @@ -35,19 +25,31 @@ export class ProxyIdentifier { _proxyIdentifierBrand: void; _suppressCompilerUnusedWarning: T; - isMain: boolean; - id: string; + public readonly isMain: boolean; + public readonly id: string; + public readonly isFancy: boolean; - constructor(isMain: boolean, id: string) { + constructor(isMain: boolean, id: string, isFancy: boolean) { this.isMain = isMain; this.id = id; + this.isFancy = isFancy; } } -export function createMainContextProxyIdentifier(identifier: string): ProxyIdentifier { - return new ProxyIdentifier(true, 'm' + identifier); +export const enum ProxyType { + NativeJSON = 0, + CustomMarshaller = 1 } -export function createExtHostContextProxyIdentifier(identifier: string): ProxyIdentifier { - return new ProxyIdentifier(false, 'e' + identifier); +/** + * Using `isFancy` indicates that arguments or results of type `URI` or `RegExp` + * will be serialized/deserialized automatically, but this has a performance cost, + * as each argument/result must be visited. + */ +export function createMainContextProxyIdentifier(identifier: string, type: ProxyType = ProxyType.NativeJSON): ProxyIdentifier { + return new ProxyIdentifier(true, 'm' + identifier, type === ProxyType.CustomMarshaller); +} + +export function createExtHostContextProxyIdentifier(identifier: string, type: ProxyType = ProxyType.NativeJSON): ProxyIdentifier { + return new ProxyIdentifier(false, 'e' + identifier, type === ProxyType.CustomMarshaller); } diff --git a/src/vs/workbench/services/extensions/node/rpcProtocol.ts b/src/vs/workbench/services/extensions/node/rpcProtocol.ts index 3a95f8feea6..eb8ce20304d 100644 --- a/src/vs/workbench/services/extensions/node/rpcProtocol.ts +++ b/src/vs/workbench/services/extensions/node/rpcProtocol.ts @@ -46,14 +46,7 @@ export class RPCProtocol implements IRPCProtocol { public getProxy(identifier: ProxyIdentifier): T { if (!this._proxies[identifier.id]) { - this._proxies[identifier.id] = this._createProxy(identifier.id, true); - } - return this._proxies[identifier.id]; - } - - public getFastProxy(identifier: ProxyIdentifier): T { - if (!this._proxies[identifier.id]) { - this._proxies[identifier.id] = this._createProxy(identifier.id, false); + this._proxies[identifier.id] = this._createProxy(identifier.id, identifier.isFancy); } return this._proxies[identifier.id]; } diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts index a267a857a4a..cde58b49aa9 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts @@ -16,7 +16,6 @@ suite('ExtHostDocumentsAndEditors', () => { setup(function () { editors = new ExtHostDocumentsAndEditors({ getProxy: () => { return undefined; }, - getFastProxy: () => { return undefined; }, set: undefined, assertRegistered: undefined }); diff --git a/src/vs/workbench/test/electron-browser/api/testThreadService.ts b/src/vs/workbench/test/electron-browser/api/testThreadService.ts index ccabfbb32c0..7867d3d411b 100644 --- a/src/vs/workbench/test/electron-browser/api/testThreadService.ts +++ b/src/vs/workbench/test/electron-browser/api/testThreadService.ts @@ -13,9 +13,6 @@ export function OneGetThreadService(thing: any): IRPCProtocol { getProxy(): T { return thing; }, - getFastProxy(): T { - return thing; - }, set(identifier: ProxyIdentifier, value: R): R { return value; }, @@ -124,15 +121,6 @@ export class TestThreadService extends AbstractTestThreadService implements IRPC } getProxy(identifier: ProxyIdentifier): T { - return this._get(identifier); - } - - getFastProxy(identifier: ProxyIdentifier): T { - return this._get(identifier); - } - - _get(identifier: ProxyIdentifier): T { - let id = identifier.id; if (this._locals[id]) { return this._locals[id]; From a284f0aa71639adf3fddc7b060b27f21f75538d3 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 16:35:38 +0100 Subject: [PATCH 211/615] align snippets/selections and clipboard lines, #40153 --- .../editor/contrib/snippet/snippetSession.ts | 8 ++-- .../contrib/snippet/snippetVariables.ts | 24 ++++++++--- .../snippet/test/snippetVariables.test.ts | 40 ++++++++++++++++--- 3 files changed, 57 insertions(+), 15 deletions(-) diff --git a/src/vs/editor/contrib/snippet/snippetSession.ts b/src/vs/editor/contrib/snippet/snippetSession.ts index 1794938bdc1..aa72b601f39 100644 --- a/src/vs/editor/contrib/snippet/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/snippetSession.ts @@ -272,7 +272,7 @@ export class SnippetSession { const snippets: OneSnippet[] = []; const modelBasedVariableResolver = new ModelBasedVariableResolver(model); - const clipboardVariableResolver = new ClipboardBasedVariableResolver(editor.invokeWithinContext(accessor => accessor.get(IClipboardService, optional))); + const clipboardService = editor.invokeWithinContext(accessor => accessor.get(IClipboardService, optional)); let delta = 0; @@ -286,11 +286,11 @@ export class SnippetSession { // the original index. that allows you to create correct // offset-based selection logic without changing the // primary selection - const indexedSelection = editor.getSelections() + const indexedSelections = editor.getSelections() .map((selection, idx) => ({ selection, idx })) .sort((a, b) => Range.compareRangesUsingStarts(a.selection, b.selection)); - for (const { selection, idx } of indexedSelection) { + for (const { selection, idx } of indexedSelections) { // extend selection with the `overwriteBefore` and `overwriteAfter` and then // compare if this matches the extensions of the primary selection @@ -317,7 +317,7 @@ export class SnippetSession { .parse(adjustedTemplate, true, enforceFinalTabstop) .resolveVariables(new CompositeSnippetVariableResolver([ modelBasedVariableResolver, - clipboardVariableResolver, + new ClipboardBasedVariableResolver(clipboardService, idx, indexedSelections.length), new SelectionBasedVariableResolver(model, selection) ])); diff --git a/src/vs/editor/contrib/snippet/snippetVariables.ts b/src/vs/editor/contrib/snippet/snippetVariables.ts index d6103e266cd..eac5593f75a 100644 --- a/src/vs/editor/contrib/snippet/snippetVariables.ts +++ b/src/vs/editor/contrib/snippet/snippetVariables.ts @@ -9,7 +9,7 @@ import { basename, dirname } from 'vs/base/common/paths'; import { IModel } from 'vs/editor/common/editorCommon'; import { Selection } from 'vs/editor/common/core/selection'; import { VariableResolver, Variable, Text } from 'vs/editor/contrib/snippet/snippetParser'; -import { getLeadingWhitespace, commonPrefixLength } from 'vs/base/common/strings'; +import { getLeadingWhitespace, commonPrefixLength, isFalsyOrWhitespace } from 'vs/base/common/strings'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; export const KnownSnippetVariableNames = Object.freeze({ @@ -145,14 +145,28 @@ export class ModelBasedVariableResolver implements VariableResolver { export class ClipboardBasedVariableResolver implements VariableResolver { constructor( - private readonly _clipboardService: IClipboardService + private readonly _clipboardService: IClipboardService, + private readonly _selectionIdx: number, + private readonly _selectionCount: number ) { // } resolve(variable: Variable): string { - return (variable.name === 'CLIPBOARD' && this._clipboardService) - ? this._clipboardService.readText() || undefined - : undefined; + if (variable.name !== 'CLIPBOARD' || !this._clipboardService) { + return undefined; + } + + const text = this._clipboardService.readText(); + if (!text) { + return undefined; + } + + const lines = text.split(/\r\n|\n|\r/).filter(s => !isFalsyOrWhitespace(s)); + if (lines.length === this._selectionCount) { + return lines[this._selectionIdx]; + } else { + return text; + } } } diff --git a/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts b/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts index 7920178fe02..f98043d0c20 100644 --- a/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts +++ b/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts @@ -208,15 +208,17 @@ suite('Snippet Variables Resolver', function () { }); test('Add variable to insert value from clipboard to a snippet #40153', function () { + let readTextResult: string; - let _throw = () => { throw new Error(); }; - let resolver = new ClipboardBasedVariableResolver(new class implements IClipboardService { + const clipboardService = new class implements IClipboardService { _serviceBrand: any; readText(): string { return readTextResult; } - writeText = _throw; - readFindText = _throw; - writeFindText = _throw; - }); + _throw = () => { throw new Error(); }; + writeText = this._throw; + readFindText = this._throw; + writeFindText = this._throw; + }; + let resolver = new ClipboardBasedVariableResolver(clipboardService, 1, 0); readTextResult = undefined; assertVariableResolve(resolver, 'CLIPBOARD', undefined); @@ -233,4 +235,30 @@ suite('Snippet Variables Resolver', function () { assertVariableResolve(resolver, 'foo', undefined); assertVariableResolve(resolver, 'cLIPBOARD', undefined); }); + + test('Add variable to insert value from clipboard to a snippet #40153', function () { + + let readTextResult: string; + let resolver: VariableResolver; + const clipboardService = new class implements IClipboardService { + _serviceBrand: any; + readText(): string { return readTextResult; } + _throw = () => { throw new Error(); }; + writeText = this._throw; + readFindText = this._throw; + writeFindText = this._throw; + }; + + resolver = new ClipboardBasedVariableResolver(clipboardService, 1, 2); + readTextResult = 'line1'; + assertVariableResolve(resolver, 'CLIPBOARD', 'line1'); + readTextResult = 'line1\nline2\nline3'; + assertVariableResolve(resolver, 'CLIPBOARD', 'line1\nline2\nline3'); + + readTextResult = 'line1\nline2'; + assertVariableResolve(resolver, 'CLIPBOARD', 'line2'); + readTextResult = 'line1\nline2'; + resolver = new ClipboardBasedVariableResolver(clipboardService, 0, 2); + assertVariableResolve(resolver, 'CLIPBOARD', 'line1'); + }); }); From ceda5d99867ae099a009c0b1561730f441e9c205 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 13 Dec 2017 16:42:08 +0100 Subject: [PATCH 212/615] explorer: initial actions to commands transition --- .../browser/parts/editor/editorActions.ts | 37 +----- .../browser/parts/editor/editorCommands.ts | 124 +++++++++++++++++- .../files/electron-browser/fileActions.ts | 49 +------ 3 files changed, 134 insertions(+), 76 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index a9dca65a16b..f2994dd11a7 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -22,6 +22,7 @@ import { IEditorGroupService, GroupArrangement } from 'vs/workbench/services/gro import { ICommandService } from 'vs/platform/commands/common/commands'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IWindowsService } from 'vs/platform/windows/common/windows'; +import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; export class SplitEditorAction extends Action { @@ -700,28 +701,13 @@ export class CloseUnmodifiedEditorsInGroupAction extends Action { constructor( id: string, label: string, - @IEditorGroupService private editorGroupService: IEditorGroupService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @ICommandService private commandService: ICommandService ) { super(id, label); } public run(context?: IEditorContext): TPromise { - let position = context ? this.editorGroupService.getStacksModel().positionOfGroup(context.group) : null; - - // If position is not passed in take the position of the active editor. - if (typeof position !== 'number') { - const active = this.editorService.getActiveEditor(); - if (active) { - position = active.position; - } - } - - if (typeof position === 'number') { - return this.editorService.closeEditors(position, { unmodifiedOnly: true }); - } - - return TPromise.as(false); + return this.commandService.executeCommand(CLOSE_UNMODIFIED_EDITORS_COMMAND_ID); } } @@ -797,26 +783,13 @@ export class CloseEditorsInGroupAction extends Action { constructor( id: string, label: string, - @IEditorGroupService private editorGroupService: IEditorGroupService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @ICommandService private commandService: ICommandService ) { super(id, label); } public run(context?: IEditorContext): TPromise { - let position = context ? this.editorGroupService.getStacksModel().positionOfGroup(context.group) : null; - if (typeof position !== 'number') { - const activeEditor = this.editorService.getActiveEditor(); - if (activeEditor) { - position = activeEditor.position; - } - } - - if (typeof position === 'number') { - return this.editorService.closeEditors(position); - } - - return TPromise.as(false); + return this.commandService.executeCommand(CLOSE_EDITORS_IN_GROUP_COMMAND_ID); } } diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index f2dbca191ee..185a2070f91 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -8,7 +8,7 @@ import * as types from 'vs/base/common/types'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { ActiveEditorMoveArguments, ActiveEditorMovePositioning, ActiveEditorMovePositioningBy, EditorCommands, TextCompareEditorVisible } from 'vs/workbench/common/editor'; +import { ActiveEditorMoveArguments, ActiveEditorMovePositioning, ActiveEditorMovePositioningBy, EditorCommands, TextCompareEditorVisible, toResource } from 'vs/workbench/common/editor'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditor, Position, POSITIONS } from 'vs/platform/editor/common/editor'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; @@ -18,11 +18,25 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; import { IMessageService, Severity, CloseAction } from 'vs/platform/message/common/message'; import { Action } from 'vs/base/common/actions'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { IListService } from 'vs/platform/list/browser/listService'; +import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; +import URI from 'vs/base/common/uri'; +import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { toErrorMessage } from 'vs/base/common/errorMessage'; +import { basename } from 'vs/base/common/paths'; + +export const CLOSE_UNMODIFIED_EDITORS_COMMAND_ID = 'workbench.command.closeUnmodifiedEditors'; +export const CLOSE_EDITORS_IN_GROUP_COMMAND_ID = 'workbench.command.closeEditorsInGroup'; +export const OPEN_TO_SIDE_COMMAND_ID = 'workbench.command.openToSide'; +export const REVERT_FILE_COMMAND_ID = 'workbench.command.files.revert'; + export function setup(): void { registerActiveEditorMoveCommand(); registerDiffEditorCommands(); registerOpenEditorAtIndexCommands(); + registerExplorerCommands(); handleCommandDeprecations(); } @@ -268,4 +282,110 @@ function registerOpenEditorAtIndexCommands(): void { return void 0; } -} \ No newline at end of file +} + +function registerExplorerCommands() { + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + handler: (accessor, args: any) => { + const editorGroupService = accessor.get(IEditorGroupService); + const editorService = accessor.get(IWorkbenchEditorService); + + let position = context ? editorGroupService.getStacksModel().positionOfGroup(context.group) : null; + + // If position is not passed in take the position of the active editor. + if (typeof position !== 'number') { + const active = editorService.getActiveEditor(); + if (active) { + position = active.position; + } + } + + if (typeof position === 'number') { + return editorService.closeEditors(position, { unmodifiedOnly: true }); + } + + return TPromise.as(false); + } + }); + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + handler: (accessor, args: any) => { + const editorGroupService = accessor.get(IEditorGroupService); + const editorService = accessor.get(IWorkbenchEditorService); + + let position = context ? editorGroupService.getStacksModel().positionOfGroup(context.group) : null; + if (typeof position !== 'number') { + const activeEditor = editorService.getActiveEditor(); + if (activeEditor) { + position = activeEditor.position; + } + } + + if (typeof position === 'number') { + return editorService.closeEditors(position); + } + + return TPromise.as(false); + } + }); + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: OPEN_TO_SIDE_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + handler: (accessor, args: any) => { + const editorService = accessor.get(IWorkbenchEditorService); + const listService = accessor.get(IListService); + const tree = listService.lastFocusedList; + // Remove highlight + if (tree instanceof Tree) { + tree.clearHighlight(); + } + + // Set side input + return editorService.openEditor({ + resource: this.resource, + options: { + preserveFocus: this.preserveFocus + } + }, true); + } + }); + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: REVERT_FILE_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + handler: (accessor, args: any) => { + let resource: URI; + const editorService = accessor.get(IWorkbenchEditorService); + const textFileService = accessor.get(ITextFileService); + const messageService = accessor.get(IMessageService); + + if (this.resource) { + resource = this.resource; + } else { + resource = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + } + + if (resource && resource.scheme !== 'untitled') { + return textFileService.revert(resource, { force: true }).then(null, error => { + messageService.show(Severity.Error, nls.localize('genericRevertError', "Failed to revert '{0}': {1}", basename(resource.fsPath), toErrorMessage(error, false))); + }); + } + + return TPromise.as(true); + } + }); +} diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index e54478a3ecb..ed95562f60e 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -52,6 +52,8 @@ import { once } from 'vs/base/common/event'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IModelService } from 'vs/editor/common/services/modelService'; +import { ICommandService } from 'vs/platform/commands/common/commands'; +import { OPEN_TO_SIDE_COMMAND_ID, REVERT_FILE_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; export interface IEditableData { action: IAction; @@ -1120,22 +1122,12 @@ export class OpenToSideAction extends Action { public static readonly ID = 'explorer.openToSide'; public static readonly LABEL = nls.localize('openToSide', "Open to the Side"); - private tree: ITree; - private resource: URI; - private preserveFocus: boolean; - constructor( - tree: ITree, - resource: URI, - preserveFocus: boolean, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @ICommandService private commandService: ICommandService ) { super(OpenToSideAction.ID, OpenToSideAction.LABEL); - this.tree = tree; - this.preserveFocus = preserveFocus; - this.resource = resource; - this.updateEnablement(); } @@ -1145,19 +1137,7 @@ export class OpenToSideAction extends Action { } public run(): TPromise { - - // Remove highlight - if (this.tree) { - this.tree.clearHighlight(); - } - - // Set side input - return this.editorService.openEditor({ - resource: this.resource, - options: { - preserveFocus: this.preserveFocus - } - }, true); + return this.commandService.executeCommand(OPEN_TO_SIDE_COMMAND_ID); } } @@ -1675,9 +1655,7 @@ export class RevertFileAction extends Action { constructor( id: string, label: string, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @ITextFileService private textFileService: ITextFileService, - @IMessageService private messageService: IMessageService + @ICommandService private commandService: ICommandService ) { super(id, label); @@ -1689,20 +1667,7 @@ export class RevertFileAction extends Action { } public run(): TPromise { - let resource: URI; - if (this.resource) { - resource = this.resource; - } else { - resource = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); - } - - if (resource && resource.scheme !== 'untitled') { - return this.textFileService.revert(resource, { force: true }).then(null, error => { - this.messageService.show(Severity.Error, nls.localize('genericRevertError', "Failed to revert '{0}': {1}", paths.basename(resource.fsPath), toErrorMessage(error, false))); - }); - } - - return TPromise.as(true); + return this.commandService.executeCommand(REVERT_FILE_COMMAND_ID); } } From ed39dcd7a2955e75f715f7c9148760f0b70a7013 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 16:55:29 +0100 Subject: [PATCH 213/615] some jsdoc for #34664 --- src/vs/vscode.proposed.d.ts | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 566fc38c017..3be7325dbd3 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -199,22 +199,15 @@ declare module 'vscode' { //#endregion /** - * Represents an action that can be performed in code. - * - * Shown using the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) + * A code action represents a change that can be performed in code, e.g. to fix a problem or + * to refactor code. */ export class CodeAction { - /** - * Label used to identify the code action in UI. - */ - title: string; /** - * Optional command that performs the code action. - * - * Executed after `edits` if any edits are provided. Either `command` or `edits` must be provided for a `CodeAction`. + * A short, human-readanle, title for this code action. */ - command?: Command; + title: string; /** * Optional edit that performs the code action. @@ -228,6 +221,22 @@ declare module 'vscode' { */ diagnostics?: Diagnostic[]; + /** + * Optional command that performs the code action. + * + * Executed after `edits` if any edits are provided. Either `command` or `edits` must be provided for a `CodeAction`. + */ + command?: Command; + + /** + * Creates a new code action. + * + * A code action must have at least a [title](#CodeAction.title) and either [edits](#CodeAction.edits) + * or a [command](#CodeAction.command). + * + * @param title The title of the code action. + * @param edits The edit of the code action. + */ constructor(title: string, edits?: TextEdit[] | WorkspaceEdit); } From 1ec2438d57fefc8216f14b44573fde84418d10fa Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 17:01:09 +0100 Subject: [PATCH 214/615] Remove usage of CustomMarshaller for MainThreadEditors (#40169) --- .../editor/browser/services/codeEditorServiceImpl.ts | 12 +++++++----- src/vs/editor/common/editorCommon.ts | 6 +++--- .../api/electron-browser/mainThreadEditors.ts | 9 +++++---- src/vs/workbench/api/node/extHost.protocol.ts | 10 +++++----- src/vs/workbench/api/node/extHostTextEditor.ts | 2 +- .../api/extHostDocumentSaveParticipant.test.ts | 5 +++-- 6 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index 5dfe1c8c4c5..72900c38be9 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -372,10 +372,12 @@ class DecorationCSSRules { if (typeof opts !== 'undefined') { this.collectBorderSettingsCSSText(opts, cssTextArr); - if (typeof opts.contentIconPath === 'string') { - cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, URI.file(opts.contentIconPath).toString().replace(/'/g, '%27'))); - } else if (opts.contentIconPath instanceof URI) { - cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, opts.contentIconPath.toString(true).replace(/'/g, '%27'))); + if (typeof opts.contentIconPath !== 'undefined') { + if (typeof opts.contentIconPath === 'string') { + cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, URI.file(opts.contentIconPath).toString().replace(/'/g, '%27'))); + } else { + cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, URI.revive(opts.contentIconPath).toString(true).replace(/'/g, '%27'))); + } } if (typeof opts.contentText === 'string') { const truncated = opts.contentText.match(/^.*$/m)[0]; // only take first line @@ -405,7 +407,7 @@ class DecorationCSSRules { if (typeof opts.gutterIconPath === 'string') { cssTextArr.push(strings.format(_CSS_MAP.gutterIconPath, URI.file(opts.gutterIconPath).toString())); } else { - cssTextArr.push(strings.format(_CSS_MAP.gutterIconPath, opts.gutterIconPath.toString(true).replace(/'/g, '%27'))); + cssTextArr.push(strings.format(_CSS_MAP.gutterIconPath, URI.revive(opts.gutterIconPath).toString(true).replace(/'/g, '%27'))); } if (typeof opts.gutterIconSize !== 'undefined') { cssTextArr.push(strings.format(_CSS_MAP.gutterIconSize, opts.gutterIconSize)); diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 6a67ca9f218..063bf5aad09 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -5,7 +5,7 @@ 'use strict'; import { IMarkdownString } from 'vs/base/common/htmlContent'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { LanguageId, LanguageIdentifier } from 'vs/editor/common/modes'; import { LineTokens } from 'vs/editor/common/core/lineTokens'; @@ -1565,7 +1565,7 @@ export interface IThemeDecorationRenderOptions { color?: string | ThemeColor; letterSpacing?: string; - gutterIconPath?: string | URI; + gutterIconPath?: string | UriComponents; gutterIconSize?: string; overviewRulerColor?: string | ThemeColor; @@ -1579,7 +1579,7 @@ export interface IThemeDecorationRenderOptions { */ export interface IContentDecorationRenderOptions { contentText?: string; - contentIconPath?: string | URI; + contentIconPath?: string | UriComponents; border?: string; borderColor?: string | ThemeColor; diff --git a/src/vs/workbench/api/electron-browser/mainThreadEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts index a2928052ac8..ed13fafb7ce 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts @@ -176,11 +176,11 @@ export class MainThreadEditors implements MainThreadEditorsShape { return TPromise.as(null); } - $trySetDecorationsFast(id: string, key: string, ranges: string): TPromise { + $trySetDecorationsFast(id: string, key: string, ranges: number[]): TPromise { if (!this._documentsAndEditors.getEditor(id)) { return TPromise.wrapError(disposed(`TextEditor(${id})`)); } - this._documentsAndEditors.getEditor(id).setDecorationsFast(key, /*TODO: marshaller is too slow*/JSON.parse(ranges)); + this._documentsAndEditors.getEditor(id).setDecorationsFast(key, ranges); return TPromise.as(null); } @@ -213,7 +213,8 @@ export class MainThreadEditors implements MainThreadEditorsShape { for (let i = 0, len = workspaceResourceEdits.length; i < len; i++) { const workspaceResourceEdit = workspaceResourceEdits[i]; if (workspaceResourceEdit.modelVersionId) { - let model = this._modelService.getModel(workspaceResourceEdit.resource); + const uri = URI.revive(workspaceResourceEdit.resource); + let model = this._modelService.getModel(uri); if (model && model.getVersionId() !== workspaceResourceEdit.modelVersionId) { // model changed in the meantime return TPromise.as(false); @@ -225,7 +226,7 @@ export class MainThreadEditors implements MainThreadEditorsShape { let resourceEdits: IResourceEdit[] = []; for (let i = 0, len = workspaceResourceEdits.length; i < len; i++) { const workspaceResourceEdit = workspaceResourceEdits[i]; - const uri = workspaceResourceEdit.resource; + const uri = URI.revive(workspaceResourceEdit.resource); const edits = workspaceResourceEdit.edits; for (let j = 0, lenJ = edits.length; j < lenJ; j++) { diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 1385a5226ea..3896616d934 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -14,7 +14,7 @@ import { import * as vscode from 'vscode'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -200,7 +200,7 @@ export interface ITextDocumentShowOptions { } export interface IWorkspaceResourceEdit { - resource: URI; + resource: UriComponents; modelVersionId?: number; edits: { range?: IRange; @@ -210,14 +210,14 @@ export interface IWorkspaceResourceEdit { } export interface MainThreadEditorsShape extends IDisposable { - $tryShowTextDocument(resource: URI, options: ITextDocumentShowOptions): TPromise; + $tryShowTextDocument(resource: UriComponents, options: ITextDocumentShowOptions): TPromise; $registerTextEditorDecorationType(key: string, options: editorCommon.IDecorationRenderOptions): void; $removeTextEditorDecorationType(key: string): void; $tryShowEditor(id: string, position: EditorPosition): TPromise; $tryHideEditor(id: string): TPromise; $trySetOptions(id: string, options: ITextEditorConfigurationUpdate): TPromise; $trySetDecorations(id: string, key: string, ranges: editorCommon.IDecorationOptions[]): TPromise; - $trySetDecorationsFast(id: string, key: string, ranges: string): TPromise; + $trySetDecorationsFast(id: string, key: string, ranges: number[]): TPromise; $tryRevealRange(id: string, range: IRange, revealType: TextEditorRevealType): TPromise; $trySetSelections(id: string, selections: ISelection[]): TPromise; $tryApplyEdits(id: string, modelVersionId: number, edits: editorCommon.ISingleEditOperation[], opts: IApplyEditsOptions): TPromise; @@ -673,7 +673,7 @@ export const MainContext = { MainThreadDialogs: createMainId('MainThreadDiaglogs', ProxyType.CustomMarshaller), MainThreadDocuments: createMainId('MainThreadDocuments', ProxyType.CustomMarshaller), MainThreadDocumentContentProviders: createMainId('MainThreadDocumentContentProviders', ProxyType.CustomMarshaller), - MainThreadEditors: createMainId('MainThreadEditors', ProxyType.CustomMarshaller), + MainThreadEditors: createMainId('MainThreadEditors'), MainThreadErrors: createMainId('MainThreadErrors', ProxyType.CustomMarshaller), MainThreadTreeViews: createMainId('MainThreadTreeViews', ProxyType.CustomMarshaller), MainThreadLanguageFeatures: createMainId('MainThreadLanguageFeatures', ProxyType.CustomMarshaller), diff --git a/src/vs/workbench/api/node/extHostTextEditor.ts b/src/vs/workbench/api/node/extHostTextEditor.ts index 0f70aa99ad0..aaf41d4a9bd 100644 --- a/src/vs/workbench/api/node/extHostTextEditor.ts +++ b/src/vs/workbench/api/node/extHostTextEditor.ts @@ -435,7 +435,7 @@ export class ExtHostTextEditor implements vscode.TextEditor { return this._proxy.$trySetDecorationsFast( this._id, decorationType.key, - /*TODO: marshaller is too slow*/JSON.stringify(_ranges) + _ranges ); } } diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts index 7782fcff951..fd74eede73c 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts @@ -324,15 +324,16 @@ suite('ExtHostDocumentSaveParticipant', () => { $tryApplyWorkspaceEdit(_edits: IWorkspaceResourceEdit[]) { for (const { resource, edits } of _edits) { + const uri = URI.revive(resource); for (const { newText, range } of edits) { - documents.$acceptModelChanged(resource.toString(), { + documents.$acceptModelChanged(uri.toString(), { changes: [{ range, rangeLength: undefined, text: newText }], eol: undefined, - versionId: documents.getDocumentData(resource).version + 1 + versionId: documents.getDocumentData(uri).version + 1 }, true); } } From b64355bf8da7379a30613c6e4f230c4c3679e798 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 17:08:36 +0100 Subject: [PATCH 215/615] Remove usage of CustomMarshaller for MainThreadDocuments (#40169) --- .../api/electron-browser/mainThreadDocuments.ts | 10 +++++----- src/vs/workbench/api/node/extHost.protocol.ts | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts index e7d9df70b36..c6dffaa74c9 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { toErrorMessage } from 'vs/base/common/errorMessage'; import { IModelService } from 'vs/editor/common/services/modelService'; import { IDisposable, dispose, IReference } from 'vs/base/common/lifecycle'; @@ -168,12 +168,12 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { // --- from extension host process - $trySaveDocument(uri: URI): TPromise { - return this._textFileService.save(uri); + $trySaveDocument(uri: UriComponents): TPromise { + return this._textFileService.save(URI.revive(uri)); } - $tryOpenDocument(uri: URI): TPromise { - + $tryOpenDocument(_uri: UriComponents): TPromise { + const uri = URI.revive(_uri); if (!uri.scheme || !(uri.fsPath || uri.authority)) { return TPromise.wrapError(new Error(`Invalid uri. Scheme and authority or path must be set.`)); } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 3896616d934..7112db29fbf 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -151,8 +151,8 @@ export interface MainThreadDocumentContentProvidersShape extends IDisposable { export interface MainThreadDocumentsShape extends IDisposable { $tryCreateDocument(options?: { language?: string; content?: string; }): TPromise; - $tryOpenDocument(uri: URI): TPromise; - $trySaveDocument(uri: URI): TPromise; + $tryOpenDocument(uri: UriComponents): TPromise; + $trySaveDocument(uri: UriComponents): TPromise; } export interface ISelectionChangeEvent { @@ -671,7 +671,7 @@ export const MainContext = { MainThreadDecorations: createMainId('MainThreadDecorations', ProxyType.CustomMarshaller), MainThreadDiagnostics: createMainId('MainThreadDiagnostics', ProxyType.CustomMarshaller), MainThreadDialogs: createMainId('MainThreadDiaglogs', ProxyType.CustomMarshaller), - MainThreadDocuments: createMainId('MainThreadDocuments', ProxyType.CustomMarshaller), + MainThreadDocuments: createMainId('MainThreadDocuments'), MainThreadDocumentContentProviders: createMainId('MainThreadDocumentContentProviders', ProxyType.CustomMarshaller), MainThreadEditors: createMainId('MainThreadEditors'), MainThreadErrors: createMainId('MainThreadErrors', ProxyType.CustomMarshaller), From 55de001f73f2b3ba692d061ded34841a4c0e5f9d Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 17:18:44 +0100 Subject: [PATCH 216/615] migrate MainThreadDecorations, #40169 --- .../workbench/api/electron-browser/mainThreadDecorations.ts | 6 +++--- src/vs/workbench/api/node/extHost.protocol.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts b/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts index c6b41914093..ff5497aa5eb 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { Emitter } from 'vs/base/common/event'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ExtHostContext, MainContext, IExtHostContext, MainThreadDecorationsShape, ExtHostDecorationsShape } from '../node/extHost.protocol'; @@ -54,9 +54,9 @@ export class MainThreadDecorations implements MainThreadDecorationsShape { this._provider.set(handle, [emitter, registration]); } - $onDidChange(handle: number, resources: URI[]): void { + $onDidChange(handle: number, resources: UriComponents[]): void { const [emitter] = this._provider.get(handle); - emitter.fire(resources); + emitter.fire(resources.map(URI.revive)); } $unregisterDecorationProvider(handle: number): void { diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 7112db29fbf..a59e7c6338c 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -140,7 +140,7 @@ export interface MainThreadDiaglogsShape extends IDisposable { export interface MainThreadDecorationsShape extends IDisposable { $registerDecorationProvider(handle: number, label: string): void; $unregisterDecorationProvider(handle: number): void; - $onDidChange(handle: number, resources: URI[]): void; + $onDidChange(handle: number, resources: UriComponents[]): void; } export interface MainThreadDocumentContentProvidersShape extends IDisposable { @@ -668,7 +668,7 @@ export const MainContext = { MainThreadCommands: >createMainId('MainThreadCommands', ProxyType.CustomMarshaller), MainThreadConfiguration: createMainId('MainThreadConfiguration', ProxyType.CustomMarshaller), MainThreadDebugService: createMainId('MainThreadDebugService', ProxyType.CustomMarshaller), - MainThreadDecorations: createMainId('MainThreadDecorations', ProxyType.CustomMarshaller), + MainThreadDecorations: createMainId('MainThreadDecorations', ProxyType.NativeJSON), MainThreadDiagnostics: createMainId('MainThreadDiagnostics', ProxyType.CustomMarshaller), MainThreadDialogs: createMainId('MainThreadDiaglogs', ProxyType.CustomMarshaller), MainThreadDocuments: createMainId('MainThreadDocuments'), From 4b0e0d678cd0035f84ec96270d46833855a9d056 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 17:22:26 +0100 Subject: [PATCH 217/615] don't bubble no provider error --- .../api/electron-browser/mainThreadSaveParticipant.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts index 602821ecb51..970e88ad5c1 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts @@ -15,7 +15,7 @@ import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { Position } from 'vs/editor/common/core/position'; import { trimTrailingWhitespace } from 'vs/editor/common/commands/trimTrailingWhitespaceCommand'; -import { getDocumentFormattingEdits } from 'vs/editor/contrib/format/format'; +import { getDocumentFormattingEdits, NoProviderError } from 'vs/editor/contrib/format/format'; import { EditOperationsCommand } from 'vs/editor/contrib/format/formatCommand'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel'; @@ -199,7 +199,13 @@ class FormatOnSaveParticipant implements ISaveParticipantParticipant { setTimeout(reject, 750); getDocumentFormattingEdits(model, { tabSize, insertSpaces }) .then(edits => this._editorWorkerService.computeMoreMinimalEdits(model.uri, edits)) - .then(resolve, reject); + .then(resolve, err => { + if (!(err instanceof Error) || err.name !== NoProviderError.Name) { + reject(err); + } else { + resolve(); + } + }); }).then(edits => { if (edits && versionNow === model.getVersionId()) { From b6112afe5c8c94815f844e1c50b7e7690fad9653 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 17:29:04 +0100 Subject: [PATCH 218/615] Reduce usage of CustomMarshaller (#40169) --- src/vs/workbench/api/node/extHost.protocol.ts | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index a59e7c6338c..a01fb879042 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -674,47 +674,47 @@ export const MainContext = { MainThreadDocuments: createMainId('MainThreadDocuments'), MainThreadDocumentContentProviders: createMainId('MainThreadDocumentContentProviders', ProxyType.CustomMarshaller), MainThreadEditors: createMainId('MainThreadEditors'), - MainThreadErrors: createMainId('MainThreadErrors', ProxyType.CustomMarshaller), - MainThreadTreeViews: createMainId('MainThreadTreeViews', ProxyType.CustomMarshaller), + MainThreadErrors: createMainId('MainThreadErrors'), + MainThreadTreeViews: createMainId('MainThreadTreeViews'), MainThreadLanguageFeatures: createMainId('MainThreadLanguageFeatures', ProxyType.CustomMarshaller), - MainThreadLanguages: createMainId('MainThreadLanguages', ProxyType.CustomMarshaller), + MainThreadLanguages: createMainId('MainThreadLanguages'), MainThreadMessageService: createMainId('MainThreadMessageService', ProxyType.CustomMarshaller), - MainThreadOutputService: createMainId('MainThreadOutputService', ProxyType.CustomMarshaller), - MainThreadProgress: createMainId('MainThreadProgress', ProxyType.CustomMarshaller), + MainThreadOutputService: createMainId('MainThreadOutputService'), + MainThreadProgress: createMainId('MainThreadProgress'), MainThreadQuickOpen: createMainId('MainThreadQuickOpen', ProxyType.CustomMarshaller), - MainThreadStatusBar: createMainId('MainThreadStatusBar', ProxyType.CustomMarshaller), + MainThreadStatusBar: createMainId('MainThreadStatusBar'), MainThreadStorage: createMainId('MainThreadStorage', ProxyType.CustomMarshaller), MainThreadTelemetry: createMainId('MainThreadTelemetry', ProxyType.CustomMarshaller), - MainThreadTerminalService: createMainId('MainThreadTerminalService', ProxyType.CustomMarshaller), + MainThreadTerminalService: createMainId('MainThreadTerminalService'), MainThreadWorkspace: createMainId('MainThreadWorkspace', ProxyType.CustomMarshaller), MainThreadFileSystem: createMainId('MainThreadFileSystem', ProxyType.CustomMarshaller), - MainThreadExtensionService: createMainId('MainThreadExtensionService', ProxyType.CustomMarshaller), + MainThreadExtensionService: createMainId('MainThreadExtensionService'), MainThreadSCM: createMainId('MainThreadSCM', ProxyType.CustomMarshaller), MainThreadTask: createMainId('MainThreadTask', ProxyType.CustomMarshaller), - MainThreadWindow: createMainId('MainThreadWindow', ProxyType.CustomMarshaller), + MainThreadWindow: createMainId('MainThreadWindow'), }; export const ExtHostContext = { ExtHostCommands: createExtId('ExtHostCommands', ProxyType.CustomMarshaller), ExtHostConfiguration: createExtId('ExtHostConfiguration', ProxyType.CustomMarshaller), - ExtHostDiagnostics: createExtId('ExtHostDiagnostics', ProxyType.CustomMarshaller), + ExtHostDiagnostics: createExtId('ExtHostDiagnostics'), ExtHostDebugService: createExtId('ExtHostDebugService', ProxyType.CustomMarshaller), ExtHostDecorations: createExtId('ExtHostDecorations', ProxyType.CustomMarshaller), ExtHostDocumentsAndEditors: createExtId('ExtHostDocumentsAndEditors', ProxyType.CustomMarshaller), - ExtHostDocuments: createExtId('ExtHostDocuments', ProxyType.CustomMarshaller), + ExtHostDocuments: createExtId('ExtHostDocuments'), ExtHostDocumentContentProviders: createExtId('ExtHostDocumentContentProviders', ProxyType.CustomMarshaller), ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant', ProxyType.CustomMarshaller), ExtHostEditors: createExtId('ExtHostEditors', ProxyType.CustomMarshaller), - ExtHostTreeViews: createExtId('ExtHostTreeViews', ProxyType.CustomMarshaller), + ExtHostTreeViews: createExtId('ExtHostTreeViews'), ExtHostFileSystem: createExtId('ExtHostFileSystem', ProxyType.CustomMarshaller), ExtHostFileSystemEventService: createExtId('ExtHostFileSystemEventService', ProxyType.CustomMarshaller), - ExtHostHeapService: createExtId('ExtHostHeapMonitor', ProxyType.CustomMarshaller), + ExtHostHeapService: createExtId('ExtHostHeapMonitor'), ExtHostLanguageFeatures: createExtId('ExtHostLanguageFeatures', ProxyType.CustomMarshaller), - ExtHostQuickOpen: createExtId('ExtHostQuickOpen', ProxyType.CustomMarshaller), - ExtHostExtensionService: createExtId('ExtHostExtensionService', ProxyType.CustomMarshaller), - ExtHostTerminalService: createExtId('ExtHostTerminalService', ProxyType.CustomMarshaller), + ExtHostQuickOpen: createExtId('ExtHostQuickOpen'), + ExtHostExtensionService: createExtId('ExtHostExtensionService'), + ExtHostTerminalService: createExtId('ExtHostTerminalService'), ExtHostSCM: createExtId('ExtHostSCM', ProxyType.CustomMarshaller), ExtHostTask: createExtId('ExtHostTask', ProxyType.CustomMarshaller), ExtHostWorkspace: createExtId('ExtHostWorkspace', ProxyType.CustomMarshaller), - ExtHostWindow: createExtId('ExtHostWindow', ProxyType.CustomMarshaller), + ExtHostWindow: createExtId('ExtHostWindow'), }; From 6496d5af5b98eb06e168ed6e85689018b2fe5c86 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 13 Dec 2017 17:40:06 +0100 Subject: [PATCH 219/615] debug: better reacting to events in watch view --- .../parts/debug/browser/debugActions.ts | 21 ++++++----- src/vs/workbench/parts/debug/common/debug.ts | 11 ++---- .../parts/debug/common/debugModel.ts | 35 +++---------------- .../debug/electron-browser/baseDebugView.ts | 5 +-- .../debug/electron-browser/callStackView.ts | 7 ++-- .../debug/electron-browser/debugService.ts | 24 +++++-------- .../electron-browser/watchExpressionsView.ts | 34 ++++++++++-------- .../parts/debug/test/common/mockDebug.ts | 7 +--- .../parts/debug/test/node/debugModel.test.ts | 9 +++-- 9 files changed, 58 insertions(+), 95 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugActions.ts b/src/vs/workbench/parts/debug/browser/debugActions.ts index 0e71397c23c..92a2e76a9f8 100644 --- a/src/vs/workbench/parts/debug/browser/debugActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugActions.ts @@ -616,7 +616,8 @@ export class AddWatchExpressionAction extends AbstractDebugAction { } public run(): TPromise { - return this.debugService.addWatchExpression(); + this.debugService.addWatchExpression(); + return TPromise.as(undefined); } protected isEnabled(state: State): boolean { @@ -648,7 +649,9 @@ export class AddToWatchExpressionsAction extends AbstractDebugAction { public run(): TPromise { const name = this.expression instanceof Variable ? this.expression.evaluateName : this.expression.name; - return this.debugService.addWatchExpression(name); + this.debugService.addWatchExpression(name); + return TPromise.as(undefined); + } } @@ -778,13 +781,13 @@ export class FocusProcessAction extends AbstractDebugAction { public run(processName: string): TPromise { const isMultiRoot = this.debugService.getConfigurationManager().getLaunches().length > 1; const process = this.debugService.getModel().getProcesses().filter(p => p.getName(isMultiRoot) === processName).pop(); - return this.debugService.focusStackFrameAndEvaluate(null, process, true).then(() => { - const stackFrame = this.debugService.getViewModel().focusedStackFrame; - if (stackFrame) { - return stackFrame.openInEditor(this.editorService, true); - } - return undefined; - }); + this.debugService.focusStackFrame(null, process, true); + const stackFrame = this.debugService.getViewModel().focusedStackFrame; + if (stackFrame) { + return stackFrame.openInEditor(this.editorService, true); + } + + return TPromise.as(undefined); } } diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index 5ac07d38490..112be102060 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -512,7 +512,7 @@ export interface IDebugService { /** * Sets the focused stack frame and evaluates all expressions against the newly focused stack frame, */ - focusStackFrameAndEvaluate(focusedStackFrame: IStackFrame, process?: IProcess, explicit?: boolean): TPromise; + focusStackFrame(focusedStackFrame: IStackFrame, process?: IProcess, explicit?: boolean): void; /** * Adds new breakpoints to the model for the file specified with the uri. Notifies debug adapter of breakpoint changes. @@ -577,12 +577,12 @@ export interface IDebugService { /** * Adds a new watch expression and evaluates it against the debug adapter. */ - addWatchExpression(name?: string): TPromise; + addWatchExpression(name?: string): void; /** * Renames a watch expression and evaluates it against the debug adapter. */ - renameWatchExpression(id: string, newName: string): TPromise; + renameWatchExpression(id: string, newName: string): void; /** * Moves a watch expression to a new possition. Used for reordering watch expressions. @@ -594,11 +594,6 @@ export interface IDebugService { */ removeWatchExpressions(id?: string): void; - /** - * Evaluates all watch expression. - */ - evaluateWatchExpressions(): TPromise; - /** * Starts debugging. If the configOrName is not passed uses the selected configuration in the debug dropdown. * Also saves all files, manages if compounds are present in the configuration diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 620a46ecbc7..2923456a42c 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -1047,45 +1047,18 @@ export class Model implements IModel { return this.watchExpressions; } - public addWatchExpression(process: IProcess, stackFrame: IStackFrame, name: string): TPromise { + public addWatchExpression(process: IProcess, stackFrame: IStackFrame, name: string): void { const we = new Expression(name); this.watchExpressions.push(we); - if (!name) { - this._onDidChangeWatchExpressions.fire(we); - return TPromise.as(null); - } - - return this.evaluateWatchExpressions(process, stackFrame, we.getId()); + this._onDidChangeWatchExpressions.fire(we); } - public renameWatchExpression(process: IProcess, stackFrame: IStackFrame, id: string, newName: string): TPromise { + public renameWatchExpression(process: IProcess, stackFrame: IStackFrame, id: string, newName: string): void { const filtered = this.watchExpressions.filter(we => we.getId() === id); if (filtered.length === 1) { filtered[0].name = newName; - // Evaluate all watch expressions again since the new watch expression might have changed some. - return this.evaluateWatchExpressions(process, stackFrame).then(() => { - this._onDidChangeWatchExpressions.fire(filtered[0]); - }); + this._onDidChangeWatchExpressions.fire(filtered[0]); } - - return TPromise.as(null); - } - - public evaluateWatchExpressions(process: IProcess, stackFrame: IStackFrame, id: string = null): TPromise { - if (id) { - const filtered = this.watchExpressions.filter(we => we.getId() === id); - if (filtered.length !== 1) { - return TPromise.as(null); - } - - return filtered[0].evaluate(process, stackFrame, 'watch').then(() => { - this._onDidChangeWatchExpressions.fire(filtered[0]); - }); - } - - return TPromise.join(this.watchExpressions.map(we => we.evaluate(process, stackFrame, 'watch'))).then(() => { - this._onDidChangeWatchExpressions.fire(); - }); } public removeWatchExpressions(id: string = null): void { diff --git a/src/vs/workbench/parts/debug/electron-browser/baseDebugView.ts b/src/vs/workbench/parts/debug/electron-browser/baseDebugView.ts index 1edf13d6ec5..60a3941b1cb 100644 --- a/src/vs/workbench/parts/debug/electron-browser/baseDebugView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/baseDebugView.ts @@ -147,7 +147,7 @@ export function renderRenameBox(debugService: IDebugService, contextViewService: if (!disposed) { disposed = true; if (element instanceof Expression && renamed && inputBox.value) { - debugService.renameWatchExpression(element.getId(), inputBox.value).done(null, onUnexpectedError); + debugService.renameWatchExpression(element.getId(), inputBox.value); } else if (element instanceof Expression && !element.name) { debugService.removeWatchExpressions(element.getId()); } else if (element instanceof FunctionBreakpoint && inputBox.value) { @@ -161,7 +161,8 @@ export function renderRenameBox(debugService: IDebugService, contextViewService: // if everything went fine we need to refresh ui elements since the variable update can change watch and variables view .done(() => { tree.refresh(element, false); - debugService.evaluateWatchExpressions(); + // Need to force watch expressions to update since a variable change can have an effect on watches + debugService.focusStackFrame(debugService.getViewModel().focusedStackFrame); }, onUnexpectedError); } } diff --git a/src/vs/workbench/parts/debug/electron-browser/callStackView.ts b/src/vs/workbench/parts/debug/electron-browser/callStackView.ts index e45bccd9b77..46eb0436e1f 100644 --- a/src/vs/workbench/parts/debug/electron-browser/callStackView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/callStackView.ts @@ -222,10 +222,9 @@ class CallStackController extends BaseDebugController { } public focusStackFrame(stackFrame: IStackFrame, event: any, preserveFocus: boolean): void { - this.debugService.focusStackFrameAndEvaluate(stackFrame, undefined, true).then(() => { - const sideBySide = (event && (event.ctrlKey || event.metaKey)); - return stackFrame.openInEditor(this.editorService, preserveFocus, sideBySide); - }, errors.onUnexpectedError); + this.debugService.focusStackFrame(stackFrame, undefined, true); + const sideBySide = (event && (event.ctrlKey || event.metaKey)); + stackFrame.openInEditor(this.editorService, preserveFocus, sideBySide).done(undefined, errors.onUnexpectedError); } } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 2c40cabf0a3..9b5f7df1a37 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -252,7 +252,7 @@ export class DebugService implements debug.IDebugService { return TPromise.as(null); } - this.focusStackFrameAndEvaluate(stackFrameToFocus).done(null, errors.onUnexpectedError); + this.focusStackFrame(stackFrameToFocus); if (thread.stoppedDetails) { this.windowService.focusWindow(); aria.alert(nls.localize('debuggingPaused', "Debugging paused, reason {0}, {1} {2}", thread.stoppedDetails.reason, stackFrameToFocus.source ? stackFrameToFocus.source.name : '', stackFrameToFocus.range.startLineNumber)); @@ -320,7 +320,7 @@ export class DebugService implements debug.IDebugService { const threadId = event.body.allThreadsContinued !== false ? undefined : event.body.threadId; this.model.clearThreads(session.getId(), false, threadId); if (this.viewModel.focusedProcess.getId() === session.getId()) { - this.focusStackFrameAndEvaluate(null, this.viewModel.focusedProcess).done(null, errors.onUnexpectedError); + this.focusStackFrame(null, this.viewModel.focusedProcess); } this.updateStateAndEmit(session.getId(), debug.State.Running); })); @@ -534,7 +534,7 @@ export class DebugService implements debug.IDebugService { } } - public focusStackFrameAndEvaluate(stackFrame: debug.IStackFrame, process?: debug.IProcess, explicit?: boolean): TPromise { + public focusStackFrame(stackFrame: debug.IStackFrame, process?: debug.IProcess, explicit?: boolean): void { if (!process) { const processes = this.model.getProcesses(); process = stackFrame ? stackFrame.thread.process : processes.length ? processes[0] : null; @@ -547,8 +547,6 @@ export class DebugService implements debug.IDebugService { this.viewModel.setFocusedStackFrame(stackFrame, process, explicit); this.updateStateAndEmit(); - - return this.model.evaluateWatchExpressions(process, stackFrame); } public enableOrDisableBreakpoints(enable: boolean, breakpoint?: debug.IEnablement): TPromise { @@ -612,7 +610,7 @@ export class DebugService implements debug.IDebugService { public addReplExpression(name: string): TPromise { return this.model.addReplExpression(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame, name) // Evaluate all watch expressions and fetch variables again since repl evaluation might have changed some. - .then(() => this.focusStackFrameAndEvaluate(this.viewModel.focusedStackFrame, this.viewModel.focusedProcess)); + .then(() => this.focusStackFrame(this.viewModel.focusedStackFrame, this.viewModel.focusedProcess)); } public removeReplExpressions(): void { @@ -628,11 +626,11 @@ export class DebugService implements debug.IDebugService { } } - public addWatchExpression(name: string): TPromise { + public addWatchExpression(name: string): void { return this.model.addWatchExpression(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame, name); } - public renameWatchExpression(id: string, newName: string): TPromise { + public renameWatchExpression(id: string, newName: string): void { return this.model.renameWatchExpression(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame, id, newName); } @@ -644,10 +642,6 @@ export class DebugService implements debug.IDebugService { this.model.removeWatchExpressions(id); } - public evaluateWatchExpressions(): TPromise { - return this.model.evaluateWatchExpressions(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame); - } - public startDebugging(root: IWorkspaceFolder, configOrName?: debug.IConfig | string, noDebug = false, topCompoundName?: string): TPromise { // make sure to save all files and that the configuration is up to date @@ -870,7 +864,7 @@ export class DebugService implements debug.IDebugService { if (session.disconnected) { return TPromise.as(null); } - this.focusStackFrameAndEvaluate(null, process); + this.focusStackFrame(null, process); this._onDidNewProcess.fire(process); const internalConsoleOptions = configuration.internalConsoleOptions || this.configurationService.getValue('debug').internalConsoleOptions; @@ -1047,7 +1041,7 @@ export class DebugService implements debug.IDebugService { // Restart should preserve the focused process const restartedProcess = this.model.getProcesses().filter(p => p.configuration.name === process.configuration.name).pop(); if (restartedProcess && restartedProcess !== this.viewModel.focusedProcess) { - this.focusStackFrameAndEvaluate(null, restartedProcess); + this.focusStackFrame(null, restartedProcess); } } }); @@ -1098,7 +1092,7 @@ export class DebugService implements debug.IDebugService { this.toDisposeOnSessionEnd.set(session.getId(), lifecycle.dispose(this.toDisposeOnSessionEnd.get(session.getId()))); const focusedProcess = this.viewModel.focusedProcess; if (focusedProcess && focusedProcess.getId() === session.getId()) { - this.focusStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); + this.focusStackFrame(null); } this.updateStateAndEmit(session.getId(), debug.State.Inactive); diff --git a/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts b/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts index e03c1690042..fb97b7499b5 100644 --- a/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts @@ -39,7 +39,6 @@ export class WatchExpressionsView extends TreeViewsViewletPanel { private static readonly MEMENTO = 'watchexpressionsview.memento'; private onWatchExpressionsUpdatedScheduler: RunOnceScheduler; - private toReveal: IExpression; private settings: any; private needsRefresh: boolean; @@ -56,18 +55,9 @@ export class WatchExpressionsView extends TreeViewsViewletPanel { super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('expressionsSection', "Expressions Section") }, keybindingService, contextMenuService); this.settings = options.viewletSettings; - this.disposables.push(this.debugService.getModel().onDidChangeWatchExpressions(we => { - // only expand when a new watch expression is added. - if (we instanceof Expression) { - this.setExpanded(true); - } - })); - this.onWatchExpressionsUpdatedScheduler = new RunOnceScheduler(() => { this.needsRefresh = false; - this.tree.refresh().done(() => { - return this.toReveal instanceof Expression ? this.tree.reveal(this.toReveal) : TPromise.as(true); - }, errors.onUnexpectedError); + this.tree.refresh().done(undefined, errors.onUnexpectedError); }, 50); } @@ -77,7 +67,7 @@ export class WatchExpressionsView extends TreeViewsViewletPanel { const actionProvider = new WatchExpressionsActionProvider(this.debugService, this.keybindingService); this.tree = new WorkbenchTree(this.treeContainer, { - dataSource: new WatchExpressionsDataSource(), + dataSource: new WatchExpressionsDataSource(this.debugService), renderer: this.instantiationService.createInstance(WatchExpressionsRenderer), accessibilityProvider: new WatchExpressionsAccessibilityProvider(), controller: this.instantiationService.createInstance(WatchExpressionsController, actionProvider, MenuId.DebugWatchContext), @@ -103,10 +93,19 @@ export class WatchExpressionsView extends TreeViewsViewletPanel { return; } + this.tree.refresh().done(() => () => { + return we instanceof Expression ? this.tree.reveal(we) : TPromise.as(true); + }, errors.onUnexpectedError); + })); + this.disposables.push(this.debugService.getViewModel().onDidFocusStackFrame(() => { + if (!this.isExpanded() || !this.isVisible()) { + this.needsRefresh = true; + return; + } + if (!this.onWatchExpressionsUpdatedScheduler.isScheduled()) { this.onWatchExpressionsUpdatedScheduler.schedule(); } - this.toReveal = we; })); this.disposables.push(this.debugService.getViewModel().onDidSelectExpression(expression => { @@ -200,6 +199,10 @@ class WatchExpressionsActionProvider implements IActionProvider { class WatchExpressionsDataSource implements IDataSource { + constructor(private debugService: IDebugService) { + // noop + } + public getId(tree: ITree, element: any): string { return element.getId(); } @@ -215,7 +218,8 @@ class WatchExpressionsDataSource implements IDataSource { public getChildren(tree: ITree, element: any): TPromise { if (element instanceof Model) { - return TPromise.as((element).getWatchExpressions()); + const viewModel = this.debugService.getViewModel(); + return TPromise.join(element.getWatchExpressions().map(we => we.evaluate(viewModel.focusedProcess, viewModel.focusedStackFrame, 'watch').then(() => we))); } let expression = element; @@ -346,7 +350,7 @@ class WatchExpressionsController extends BaseDebugController { return true; } else if (element instanceof Model && event.detail === 2) { // Double click in watch panel triggers to add a new watch expression - this.debugService.addWatchExpression().done(undefined, errors.onUnexpectedError); + this.debugService.addWatchExpression(); return true; } diff --git a/src/vs/workbench/parts/debug/test/common/mockDebug.ts b/src/vs/workbench/parts/debug/test/common/mockDebug.ts index 1f2688168f5..42c5ef331be 100644 --- a/src/vs/workbench/parts/debug/test/common/mockDebug.ts +++ b/src/vs/workbench/parts/debug/test/common/mockDebug.ts @@ -36,8 +36,7 @@ export class MockDebugService implements debug.IDebugService { return null; } - public focusStackFrameAndEvaluate(focusedStackFrame: debug.IStackFrame): TPromise { - return TPromise.as(null); + public focusStackFrame(focusedStackFrame: debug.IStackFrame): void { } public addBreakpoints(uri: uri, rawBreakpoints: debug.IRawBreakpoint[]): TPromise { @@ -88,10 +87,6 @@ export class MockDebugService implements debug.IDebugService { public removeWatchExpressions(id?: string): void { } - public evaluateWatchExpressions(): TPromise { - return TPromise.as(null); - } - public startDebugging(root: IWorkspaceFolder, configOrName?: debug.IConfig | string, noDebug?: boolean): TPromise { return TPromise.as(null); } diff --git a/src/vs/workbench/parts/debug/test/node/debugModel.test.ts b/src/vs/workbench/parts/debug/test/node/debugModel.test.ts index 99ed1b8a150..b4fc6e4080f 100644 --- a/src/vs/workbench/parts/debug/test/node/debugModel.test.ts +++ b/src/vs/workbench/parts/debug/test/node/debugModel.test.ts @@ -305,16 +305,15 @@ suite('Debug - Model', () => { const process = new Process({ name: 'mockProcess', type: 'node', request: 'launch' }, rawSession); const thread = new Thread(process, 'mockthread', 1); const stackFrame = new StackFrame(thread, 1, null, 'app.js', 'normal', { startLineNumber: 1, startColumn: 1, endLineNumber: undefined, endColumn: undefined }, 0); - model.addWatchExpression(process, stackFrame, 'console').done(); - model.addWatchExpression(process, stackFrame, 'console').done(); + model.addWatchExpression(process, stackFrame, 'console'); + model.addWatchExpression(process, stackFrame, 'console'); let watchExpressions = model.getWatchExpressions(); assertWatchExpressions(watchExpressions, 'console'); - model.renameWatchExpression(process, stackFrame, watchExpressions[0].getId(), 'new_name').done(); - model.renameWatchExpression(process, stackFrame, watchExpressions[1].getId(), 'new_name').done(); + model.renameWatchExpression(process, stackFrame, watchExpressions[0].getId(), 'new_name'); + model.renameWatchExpression(process, stackFrame, watchExpressions[1].getId(), 'new_name'); assertWatchExpressions(model.getWatchExpressions(), 'new_name'); - model.evaluateWatchExpressions(process, null); assertWatchExpressions(model.getWatchExpressions(), 'new_name'); model.addWatchExpression(process, stackFrame, 'mockExpression'); From 7f71248784cbaa80121788ad2cf52ed2e180a357 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 17:50:57 +0100 Subject: [PATCH 220/615] Fix integration tests --- .../workbench/api/electron-browser/mainThreadEditors.ts | 8 +++++--- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts index ed13fafb7ce..971d5df9a08 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { disposed } from 'vs/base/common/errors'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -115,7 +115,9 @@ export class MainThreadEditors implements MainThreadEditorsShape { // --- from extension host process - $tryShowTextDocument(resource: URI, options: ITextDocumentShowOptions): TPromise { + $tryShowTextDocument(resource: UriComponents, options: ITextDocumentShowOptions): TPromise { + const uri = URI.revive(resource); + const editorOptions: ITextEditorOptions = { preserveFocus: options.preserveFocus, pinned: options.pinned, @@ -123,7 +125,7 @@ export class MainThreadEditors implements MainThreadEditorsShape { }; const input = { - resource, + resource: uri, options: editorOptions }; diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index a01fb879042..f6b10a6af91 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -671,7 +671,7 @@ export const MainContext = { MainThreadDecorations: createMainId('MainThreadDecorations', ProxyType.NativeJSON), MainThreadDiagnostics: createMainId('MainThreadDiagnostics', ProxyType.CustomMarshaller), MainThreadDialogs: createMainId('MainThreadDiaglogs', ProxyType.CustomMarshaller), - MainThreadDocuments: createMainId('MainThreadDocuments'), + MainThreadDocuments: createMainId('MainThreadDocuments', ProxyType.CustomMarshaller), MainThreadDocumentContentProviders: createMainId('MainThreadDocumentContentProviders', ProxyType.CustomMarshaller), MainThreadEditors: createMainId('MainThreadEditors'), MainThreadErrors: createMainId('MainThreadErrors'), From 067d266d9004837ede6ecfb9e38d0570b496052f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 17:44:26 +0100 Subject: [PATCH 221/615] more UriComponents in mainThread-land, #40169 --- .../electron-browser/mainThreadDiagnostics.ts | 6 +++--- .../api/electron-browser/mainThreadDialogs.ts | 5 +++-- .../mainThreadDocumentContentProviders.ts | 6 +++--- src/vs/workbench/api/node/extHost.protocol.ts | 18 +++++++++--------- .../api/extHostDiagnostics.test.ts | 12 ++++++------ 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts b/src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts index 66f23f0ed40..e0dcb93f1d7 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts @@ -5,7 +5,7 @@ 'use strict'; import { IMarkerService, IMarkerData } from 'vs/platform/markers/common/markers'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { MainThreadDiagnosticsShape, MainContext, IExtHostContext } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; @@ -27,10 +27,10 @@ export class MainThreadDiagnostics implements MainThreadDiagnosticsShape { this._activeOwners.forEach(owner => this._markerService.changeAll(owner, undefined)); } - $changeMany(owner: string, entries: [URI, IMarkerData[]][]): TPromise { + $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): TPromise { for (let entry of entries) { let [uri, markers] = entry; - this._markerService.changeOne(owner, uri, markers); + this._markerService.changeOne(owner, URI.revive(uri), markers); } this._activeOwners.add(owner); return undefined; diff --git a/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts b/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts index b8b6e1336dd..e43fa20ef2e 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDialogs.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import URI from 'vs/base/common/uri'; import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import { MainThreadDiaglogsShape, MainContext, IExtHostContext, MainThreadDialogOpenOptions, MainThreadDialogSaveOptions } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; @@ -56,7 +57,7 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape { result.buttonLabel = options.openLabel; } if (options.defaultUri) { - result.defaultPath = options.defaultUri.fsPath; + result.defaultPath = URI.revive(options.defaultUri).fsPath; } if (!options.canSelectFiles && !options.canSelectFolders) { options.canSelectFiles = true; @@ -82,7 +83,7 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape { }; if (options.defaultUri) { - result.defaultPath = options.defaultUri.fsPath; + result.defaultPath = URI.revive(options.defaultUri).fsPath; } if (options.saveLabel) { result.buttonLabel = options.saveLabel; diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts b/src/vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts index 566af5a4165..74cd3e9b559 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { IDisposable } from 'vs/base/common/lifecycle'; import { TPromise } from 'vs/base/common/winjs.base'; import { IModel } from 'vs/editor/common/editorCommon'; @@ -63,8 +63,8 @@ export class MainThreadDocumentContentProviders implements MainThreadDocumentCon } } - $onVirtualDocumentChange(uri: URI, value: ITextSource): void { - const model = this._modelService.getModel(uri); + $onVirtualDocumentChange(uri: UriComponents, value: ITextSource): void { + const model = this._modelService.getModel(URI.revive(uri)); if (!model) { return; } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index f6b10a6af91..f773907403d 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -113,12 +113,12 @@ export interface MainThreadConfigurationShape extends IDisposable { } export interface MainThreadDiagnosticsShape extends IDisposable { - $changeMany(owner: string, entries: [URI, IMarkerData[]][]): TPromise; + $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): TPromise; $clear(owner: string): TPromise; } export interface MainThreadDialogOpenOptions { - defaultUri?: URI; + defaultUri?: UriComponents; openLabel?: string; canSelectFiles?: boolean; canSelectFolders?: boolean; @@ -127,7 +127,7 @@ export interface MainThreadDialogOpenOptions { } export interface MainThreadDialogSaveOptions { - defaultUri?: URI; + defaultUri?: UriComponents; saveLabel?: string; filters?: { [name: string]: string[] }; } @@ -146,7 +146,7 @@ export interface MainThreadDecorationsShape extends IDisposable { export interface MainThreadDocumentContentProvidersShape extends IDisposable { $registerTextContentProvider(handle: number, scheme: string): void; $unregisterTextContentProvider(handle: number): void; - $onVirtualDocumentChange(uri: URI, value: ITextSource): void; + $onVirtualDocumentChange(uri: UriComponents, value: ITextSource): void; } export interface MainThreadDocumentsShape extends IDisposable { @@ -668,10 +668,10 @@ export const MainContext = { MainThreadCommands: >createMainId('MainThreadCommands', ProxyType.CustomMarshaller), MainThreadConfiguration: createMainId('MainThreadConfiguration', ProxyType.CustomMarshaller), MainThreadDebugService: createMainId('MainThreadDebugService', ProxyType.CustomMarshaller), - MainThreadDecorations: createMainId('MainThreadDecorations', ProxyType.NativeJSON), - MainThreadDiagnostics: createMainId('MainThreadDiagnostics', ProxyType.CustomMarshaller), - MainThreadDialogs: createMainId('MainThreadDiaglogs', ProxyType.CustomMarshaller), - MainThreadDocuments: createMainId('MainThreadDocuments', ProxyType.CustomMarshaller), + MainThreadDecorations: createMainId('MainThreadDecorations'), + MainThreadDiagnostics: createMainId('MainThreadDiagnostics'), + MainThreadDialogs: createMainId('MainThreadDiaglogs'), + MainThreadDocuments: createMainId('MainThreadDocuments'), MainThreadDocumentContentProviders: createMainId('MainThreadDocumentContentProviders', ProxyType.CustomMarshaller), MainThreadEditors: createMainId('MainThreadEditors'), MainThreadErrors: createMainId('MainThreadErrors'), @@ -681,7 +681,7 @@ export const MainContext = { MainThreadMessageService: createMainId('MainThreadMessageService', ProxyType.CustomMarshaller), MainThreadOutputService: createMainId('MainThreadOutputService'), MainThreadProgress: createMainId('MainThreadProgress'), - MainThreadQuickOpen: createMainId('MainThreadQuickOpen', ProxyType.CustomMarshaller), + MainThreadQuickOpen: createMainId('MainThreadQuickOpen'), MainThreadStatusBar: createMainId('MainThreadStatusBar'), MainThreadStorage: createMainId('MainThreadStorage', ProxyType.CustomMarshaller), MainThreadTelemetry: createMainId('MainThreadTelemetry', ProxyType.CustomMarshaller), diff --git a/src/vs/workbench/test/electron-browser/api/extHostDiagnostics.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDiagnostics.test.ts index b0fee510b50..d62022fb25b 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDiagnostics.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDiagnostics.test.ts @@ -6,7 +6,7 @@ 'use strict'; import * as assert from 'assert'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import Severity from 'vs/base/common/severity'; import { DiagnosticCollection } from 'vs/workbench/api/node/extHostDiagnostics'; import { Diagnostic, DiagnosticSeverity, Range } from 'vs/workbench/api/node/extHostTypes'; @@ -18,7 +18,7 @@ import { mock } from 'vs/workbench/test/electron-browser/api/mock'; suite('ExtHostDiagnostics', () => { class DiagnosticsShape extends mock() { - $changeMany(owner: string, entries: [URI, IMarkerData[]][]): TPromise { + $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): TPromise { return TPromise.as(null); } $clear(owner: string): TPromise { @@ -163,9 +163,9 @@ suite('ExtHostDiagnostics', () => { test('diagnostics collection, set tuple overrides, #11547', function () { - let lastEntries: [URI, IMarkerData[]][]; + let lastEntries: [UriComponents, IMarkerData[]][]; let collection = new DiagnosticCollection('test', new class extends DiagnosticsShape { - $changeMany(owner: string, entries: [URI, IMarkerData[]][]): TPromise { + $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): TPromise { lastEntries = entries; return super.$changeMany(owner, entries); } @@ -237,9 +237,9 @@ suite('ExtHostDiagnostics', () => { test('diagnostic capping', function () { - let lastEntries: [URI, IMarkerData[]][]; + let lastEntries: [UriComponents, IMarkerData[]][]; let collection = new DiagnosticCollection('test', new class extends DiagnosticsShape { - $changeMany(owner: string, entries: [URI, IMarkerData[]][]): TPromise { + $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): TPromise { lastEntries = entries; return super.$changeMany(owner, entries); } From 7cab47063920e6eece202cc295c5283b19173c4f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 17:50:23 +0100 Subject: [PATCH 222/615] yet more UriComponents in mainThread-land, #40169 --- src/vs/workbench/api/node/extHost.protocol.ts | 8 ++++---- src/vs/workbench/api/node/extHostWorkspace.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index f773907403d..6917ddf47b7 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -320,7 +320,7 @@ export interface MainThreadTelemetryShape extends IDisposable { } export interface MainThreadWorkspaceShape extends IDisposable { - $startSearch(includePattern: string, includeFolder: string, excludePattern: string, maxResults: number, requestId: number): Thenable; + $startSearch(includePattern: string, includeFolder: string, excludePattern: string, maxResults: number, requestId: number): Thenable; $cancelSearch(requestId: number): Thenable; $saveAll(includeUntitled?: boolean): Thenable; } @@ -678,15 +678,15 @@ export const MainContext = { MainThreadTreeViews: createMainId('MainThreadTreeViews'), MainThreadLanguageFeatures: createMainId('MainThreadLanguageFeatures', ProxyType.CustomMarshaller), MainThreadLanguages: createMainId('MainThreadLanguages'), - MainThreadMessageService: createMainId('MainThreadMessageService', ProxyType.CustomMarshaller), + MainThreadMessageService: createMainId('MainThreadMessageService'), MainThreadOutputService: createMainId('MainThreadOutputService'), MainThreadProgress: createMainId('MainThreadProgress'), MainThreadQuickOpen: createMainId('MainThreadQuickOpen'), MainThreadStatusBar: createMainId('MainThreadStatusBar'), MainThreadStorage: createMainId('MainThreadStorage', ProxyType.CustomMarshaller), - MainThreadTelemetry: createMainId('MainThreadTelemetry', ProxyType.CustomMarshaller), + MainThreadTelemetry: createMainId('MainThreadTelemetry'), MainThreadTerminalService: createMainId('MainThreadTerminalService'), - MainThreadWorkspace: createMainId('MainThreadWorkspace', ProxyType.CustomMarshaller), + MainThreadWorkspace: createMainId('MainThreadWorkspace'), MainThreadFileSystem: createMainId('MainThreadFileSystem', ProxyType.CustomMarshaller), MainThreadExtensionService: createMainId('MainThreadExtensionService'), MainThreadSCM: createMainId('MainThreadSCM', ProxyType.CustomMarshaller), diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index dd684c29557..9423952a852 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -181,7 +181,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape { if (token) { token.onCancellationRequested(() => this._proxy.$cancelSearch(requestId)); } - return result; + return result.then(data => data.map(URI.revive)); } saveAll(includeUntitled?: boolean): Thenable { From e50a1f2d024000b727bf019cfe42b53466f30a2f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 18:00:35 +0100 Subject: [PATCH 223/615] more UriComponents in mainThread-land, #40169 --- .../api/electron-browser/mainThreadFileSystem.ts | 14 +++++++------- src/vs/workbench/api/node/extHost.protocol.ts | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts b/src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts index adb0a3cb05d..6234d4dd30b 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { TPromise, PPromise } from 'vs/base/common/winjs.base'; import { ExtHostContext, MainContext, IExtHostContext, MainThreadFileSystemShape, ExtHostFileSystemShape } from '../node/extHost.protocol'; import { IFileService, IFileSystemProvider, IStat, IFileChange } from 'vs/platform/files/common/files'; @@ -45,22 +45,22 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape { this._provider.delete(handle); } - $onDidAddFileSystemRoot(uri: URI): void { - this._workspaceEditingService.addFolders([{ uri }], true).done(null, onUnexpectedError); + $onDidAddFileSystemRoot(data: UriComponents): void { + this._workspaceEditingService.addFolders([{ uri: URI.revive(data) }], true).done(null, onUnexpectedError); } $onFileSystemChange(handle: number, changes: IFileChange[]): void { this._provider.get(handle).$onFileSystemChange(changes); } - $reportFileChunk(handle: number, resource: URI, chunk: number[]): void { - this._provider.get(handle).reportFileChunk(resource, chunk); + $reportFileChunk(handle: number, data: UriComponents, chunk: number[]): void { + this._provider.get(handle).reportFileChunk(URI.revive(data), chunk); } // --- search - $handleSearchProgress(handle: number, session: number, resource: URI): void { - this._provider.get(handle).handleSearchProgress(session, resource); + $handleSearchProgress(handle: number, session: number, data: UriComponents): void { + this._provider.get(handle).handleSearchProgress(session, URI.revive(data)); } } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 6917ddf47b7..6b01a762d63 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -329,11 +329,11 @@ export interface MainThreadFileSystemShape extends IDisposable { $registerFileSystemProvider(handle: number, scheme: string): void; $unregisterFileSystemProvider(handle: number): void; - $onDidAddFileSystemRoot(root: URI): void; + $onDidAddFileSystemRoot(root: UriComponents): void; $onFileSystemChange(handle: number, resource: IFileChange[]): void; - $reportFileChunk(handle: number, resource: URI, chunk: number[] | null): void; + $reportFileChunk(handle: number, resource: UriComponents, chunk: number[] | null): void; - $handleSearchProgress(handle: number, session: number, resource: URI): void; + $handleSearchProgress(handle: number, session: number, resource: UriComponents): void; } export interface MainThreadTaskShape extends IDisposable { @@ -672,7 +672,7 @@ export const MainContext = { MainThreadDiagnostics: createMainId('MainThreadDiagnostics'), MainThreadDialogs: createMainId('MainThreadDiaglogs'), MainThreadDocuments: createMainId('MainThreadDocuments'), - MainThreadDocumentContentProviders: createMainId('MainThreadDocumentContentProviders', ProxyType.CustomMarshaller), + MainThreadDocumentContentProviders: createMainId('MainThreadDocumentContentProviders'), MainThreadEditors: createMainId('MainThreadEditors'), MainThreadErrors: createMainId('MainThreadErrors'), MainThreadTreeViews: createMainId('MainThreadTreeViews'), @@ -683,11 +683,11 @@ export const MainContext = { MainThreadProgress: createMainId('MainThreadProgress'), MainThreadQuickOpen: createMainId('MainThreadQuickOpen'), MainThreadStatusBar: createMainId('MainThreadStatusBar'), - MainThreadStorage: createMainId('MainThreadStorage', ProxyType.CustomMarshaller), + MainThreadStorage: createMainId('MainThreadStorage'), MainThreadTelemetry: createMainId('MainThreadTelemetry'), MainThreadTerminalService: createMainId('MainThreadTerminalService'), MainThreadWorkspace: createMainId('MainThreadWorkspace'), - MainThreadFileSystem: createMainId('MainThreadFileSystem', ProxyType.CustomMarshaller), + MainThreadFileSystem: createMainId('MainThreadFileSystem'), MainThreadExtensionService: createMainId('MainThreadExtensionService'), MainThreadSCM: createMainId('MainThreadSCM', ProxyType.CustomMarshaller), MainThreadTask: createMainId('MainThreadTask', ProxyType.CustomMarshaller), From 4ada031b92c0916ad00820a644ee5f7b0fc43594 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 13 Dec 2017 18:07:33 +0100 Subject: [PATCH 224/615] debug: introduce explicit focusedThread --- .../parts/debug/browser/debugActions.ts | 2 +- src/vs/workbench/parts/debug/common/debug.ts | 2 +- .../parts/debug/common/debugViewModel.ts | 15 +++++-- .../debug/electron-browser/callStackView.ts | 2 +- .../debug/electron-browser/debugService.ts | 41 +++++++++++++------ .../debug/test/common/debugViewModel.test.ts | 2 +- 6 files changed, 43 insertions(+), 21 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugActions.ts b/src/vs/workbench/parts/debug/browser/debugActions.ts index 92a2e76a9f8..27dc78e720a 100644 --- a/src/vs/workbench/parts/debug/browser/debugActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugActions.ts @@ -781,7 +781,7 @@ export class FocusProcessAction extends AbstractDebugAction { public run(processName: string): TPromise { const isMultiRoot = this.debugService.getConfigurationManager().getLaunches().length > 1; const process = this.debugService.getModel().getProcesses().filter(p => p.getName(isMultiRoot) === processName).pop(); - this.debugService.focusStackFrame(null, process, true); + this.debugService.focusStackFrame(undefined, undefined, process, true); const stackFrame = this.debugService.getViewModel().focusedStackFrame; if (stackFrame) { return stackFrame.openInEditor(this.editorService, true); diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index 112be102060..3b858af292a 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -512,7 +512,7 @@ export interface IDebugService { /** * Sets the focused stack frame and evaluates all expressions against the newly focused stack frame, */ - focusStackFrame(focusedStackFrame: IStackFrame, process?: IProcess, explicit?: boolean): void; + focusStackFrame(focusedStackFrame: IStackFrame, thread?: IThread, process?: IProcess, explicit?: boolean): void; /** * Adds new breakpoints to the model for the file specified with the uri. Notifies debug adapter of breakpoint changes. diff --git a/src/vs/workbench/parts/debug/common/debugViewModel.ts b/src/vs/workbench/parts/debug/common/debugViewModel.ts index 8cf6ba7bc33..7e877a1ebb1 100644 --- a/src/vs/workbench/parts/debug/common/debugViewModel.ts +++ b/src/vs/workbench/parts/debug/common/debugViewModel.ts @@ -10,6 +10,7 @@ export class ViewModel implements debug.IViewModel { private _focusedStackFrame: debug.IStackFrame; private _focusedProcess: debug.IProcess; + private _focusedThread: debug.IThread; private selectedExpression: debug.IExpression; private selectedFunctionBreakpoint: debug.IFunctionBreakpoint; private _onDidFocusProcess: Emitter; @@ -40,13 +41,19 @@ export class ViewModel implements debug.IViewModel { return this._focusedStackFrame; } - public setFocusedStackFrame(stackFrame: debug.IStackFrame, process: debug.IProcess, explicit: boolean): void { - this._focusedStackFrame = stackFrame; - if (process !== this._focusedProcess) { + public setFocus(stackFrame: debug.IStackFrame, thread: debug.IThread, process: debug.IProcess, explicit: boolean): void { + let shouldEmit = this._focusedProcess !== process || this._focusedThread !== thread || this._focusedStackFrame !== stackFrame; + + if (this._focusedProcess !== process) { this._focusedProcess = process; this._onDidFocusProcess.fire(process); } - this._onDidFocusStackFrame.fire({ stackFrame, explicit }); + this._focusedThread = thread; + this._focusedStackFrame = stackFrame; + + if (shouldEmit) { + this._onDidFocusStackFrame.fire({ stackFrame, explicit }); + } } public get onDidFocusProcess(): Event { diff --git a/src/vs/workbench/parts/debug/electron-browser/callStackView.ts b/src/vs/workbench/parts/debug/electron-browser/callStackView.ts index 46eb0436e1f..6c3a2258684 100644 --- a/src/vs/workbench/parts/debug/electron-browser/callStackView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/callStackView.ts @@ -222,7 +222,7 @@ class CallStackController extends BaseDebugController { } public focusStackFrame(stackFrame: IStackFrame, event: any, preserveFocus: boolean): void { - this.debugService.focusStackFrame(stackFrame, undefined, true); + this.debugService.focusStackFrame(stackFrame, stackFrame.thread, stackFrame.thread.process, true); const sideBySide = (event && (event.ctrlKey || event.metaKey)); stackFrame.openInEditor(this.editorService, preserveFocus, sideBySide).done(undefined, errors.onUnexpectedError); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 9b5f7df1a37..a667b911eab 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -320,7 +320,7 @@ export class DebugService implements debug.IDebugService { const threadId = event.body.allThreadsContinued !== false ? undefined : event.body.threadId; this.model.clearThreads(session.getId(), false, threadId); if (this.viewModel.focusedProcess.getId() === session.getId()) { - this.focusStackFrame(null, this.viewModel.focusedProcess); + this.focusStackFrame(undefined, this.viewModel.focusedThread, this.viewModel.focusedProcess); } this.updateStateAndEmit(session.getId(), debug.State.Running); })); @@ -534,18 +534,33 @@ export class DebugService implements debug.IDebugService { } } - public focusStackFrame(stackFrame: debug.IStackFrame, process?: debug.IProcess, explicit?: boolean): void { + public focusStackFrame(stackFrame: debug.IStackFrame, thread?: debug.IThread, process?: debug.IProcess, explicit?: boolean): void { if (!process) { - const processes = this.model.getProcesses(); - process = stackFrame ? stackFrame.thread.process : processes.length ? processes[0] : null; - } - if (!stackFrame) { - const threads = process ? process.getAllThreads() : null; - const callStack = threads && threads.length === 1 ? threads[0].getCallStack() : null; - stackFrame = callStack && callStack.length ? callStack[0] : null; + if (stackFrame || thread) { + process = stackFrame ? stackFrame.thread.process : thread.process; + } else { + const processes = this.model.getProcesses(); + process = processes.length ? processes[0] : undefined; + } } - this.viewModel.setFocusedStackFrame(stackFrame, process, explicit); + if (!thread) { + if (stackFrame) { + thread = stackFrame.thread; + } else { + const threads = process ? process.getAllThreads() : undefined; + thread = threads && threads.length ? threads[0] : undefined; + } + } + + if (!stackFrame) { + if (thread) { + const callStack = thread.getCallStack(); + stackFrame = callStack && callStack.length ? callStack[0] : null; + } + } + + this.viewModel.setFocus(stackFrame, thread, process, explicit); this.updateStateAndEmit(); } @@ -610,7 +625,7 @@ export class DebugService implements debug.IDebugService { public addReplExpression(name: string): TPromise { return this.model.addReplExpression(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame, name) // Evaluate all watch expressions and fetch variables again since repl evaluation might have changed some. - .then(() => this.focusStackFrame(this.viewModel.focusedStackFrame, this.viewModel.focusedProcess)); + .then(() => this.focusStackFrame(this.viewModel.focusedStackFrame, this.viewModel.focusedThread, this.viewModel.focusedProcess)); } public removeReplExpressions(): void { @@ -864,7 +879,7 @@ export class DebugService implements debug.IDebugService { if (session.disconnected) { return TPromise.as(null); } - this.focusStackFrame(null, process); + this.focusStackFrame(undefined, undefined, process); this._onDidNewProcess.fire(process); const internalConsoleOptions = configuration.internalConsoleOptions || this.configurationService.getValue('debug').internalConsoleOptions; @@ -1041,7 +1056,7 @@ export class DebugService implements debug.IDebugService { // Restart should preserve the focused process const restartedProcess = this.model.getProcesses().filter(p => p.configuration.name === process.configuration.name).pop(); if (restartedProcess && restartedProcess !== this.viewModel.focusedProcess) { - this.focusStackFrame(null, restartedProcess); + this.focusStackFrame(undefined, undefined, restartedProcess); } } }); diff --git a/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts b/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts index cd85afc69dd..ff921163c20 100644 --- a/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts +++ b/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts @@ -26,7 +26,7 @@ suite('Debug - View Model', () => { const process = new Process({ name: 'mockProcess', type: 'node', request: 'launch' }, mockSession); const thread = new Thread(process, 'myThread', 1); const frame = new StackFrame(thread, 1, null, 'app.js', 'normal', { startColumn: 1, startLineNumber: 1, endColumn: undefined, endLineNumber: undefined }, 0); - model.setFocusedStackFrame(frame, process, false); + model.setFocus(frame, thread, process, false); assert.equal(model.focusedStackFrame.getId(), frame.getId()); assert.equal(model.focusedThread.threadId, 1); From 5bccdeab12f39d520175e3fe5e835fdbadc13cc8 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 13 Dec 2017 18:10:18 +0100 Subject: [PATCH 225/615] watch: fix minor reveal issue --- .../parts/debug/electron-browser/watchExpressionsView.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts b/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts index fb97b7499b5..10832f32bcc 100644 --- a/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts @@ -93,7 +93,7 @@ export class WatchExpressionsView extends TreeViewsViewletPanel { return; } - this.tree.refresh().done(() => () => { + this.tree.refresh().done(() => { return we instanceof Expression ? this.tree.reveal(we) : TPromise.as(true); }, errors.onUnexpectedError); })); From 4f433ed0df0b9322bead1246258c331952fe677b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 18:11:15 +0100 Subject: [PATCH 226/615] more native json, #40169 --- src/vs/base/common/uri.ts | 14 ++++++++++---- src/vs/workbench/api/node/extHost.protocol.ts | 8 ++++---- src/vs/workbench/api/node/extHostDecorations.ts | 6 +++--- .../api/node/extHostDocumentContentProviders.ts | 6 +++--- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/vs/base/common/uri.ts b/src/vs/base/common/uri.ts index 2ccad2d4ad3..5bff36d302a 100644 --- a/src/vs/base/common/uri.ts +++ b/src/vs/base/common/uri.ts @@ -315,10 +315,16 @@ export default class URI implements UriComponents { } static revive(data: UriComponents | any): URI { - let result = new _URI(data); - result._fsPath = (data).fsPath; - result._formatted = (data).external; - return result; + if (!data) { + return data; + } else if (data instanceof URI) { + return data; + } else { + let result = new _URI(data); + result._fsPath = (data).fsPath; + result._formatted = (data).external; + return result; + } } } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 6b01a762d63..48751f1aa75 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -433,7 +433,7 @@ export interface ExtHostDiagnosticsShape { } export interface ExtHostDocumentContentProvidersShape { - $provideTextDocumentContent(handle: number, uri: URI): TPromise; + $provideTextDocumentContent(handle: number, uri: UriComponents): TPromise; } export interface IModelAddedData { @@ -655,7 +655,7 @@ export interface ExtHostDebugServiceShape { export type DecorationData = [number, boolean, string, string, ThemeColor, string]; export interface ExtHostDecorationsShape { - $providerDecorations(handle: number, uri: URI): TPromise; + $providerDecorations(handle: number, uri: UriComponents): TPromise; } export interface ExtHostWindowShape { @@ -699,10 +699,10 @@ export const ExtHostContext = { ExtHostConfiguration: createExtId('ExtHostConfiguration', ProxyType.CustomMarshaller), ExtHostDiagnostics: createExtId('ExtHostDiagnostics'), ExtHostDebugService: createExtId('ExtHostDebugService', ProxyType.CustomMarshaller), - ExtHostDecorations: createExtId('ExtHostDecorations', ProxyType.CustomMarshaller), + ExtHostDecorations: createExtId('ExtHostDecorations'), ExtHostDocumentsAndEditors: createExtId('ExtHostDocumentsAndEditors', ProxyType.CustomMarshaller), ExtHostDocuments: createExtId('ExtHostDocuments'), - ExtHostDocumentContentProviders: createExtId('ExtHostDocumentContentProviders', ProxyType.CustomMarshaller), + ExtHostDocumentContentProviders: createExtId('ExtHostDocumentContentProviders'), ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant', ProxyType.CustomMarshaller), ExtHostEditors: createExtId('ExtHostEditors', ProxyType.CustomMarshaller), ExtHostTreeViews: createExtId('ExtHostTreeViews'), diff --git a/src/vs/workbench/api/node/extHostDecorations.ts b/src/vs/workbench/api/node/extHostDecorations.ts index 1888711551a..9581bfc5bc9 100644 --- a/src/vs/workbench/api/node/extHostDecorations.ts +++ b/src/vs/workbench/api/node/extHostDecorations.ts @@ -5,7 +5,7 @@ 'use strict'; import * as vscode from 'vscode'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { MainContext, IMainContext, ExtHostDecorationsShape, MainThreadDecorationsShape, DecorationData } from 'vs/workbench/api/node/extHost.protocol'; import { TPromise } from 'vs/base/common/winjs.base'; import { Disposable } from 'vs/workbench/api/node/extHostTypes'; @@ -38,9 +38,9 @@ export class ExtHostDecorations implements ExtHostDecorationsShape { }); } - $providerDecorations(handle: number, uri: URI): TPromise { + $providerDecorations(handle: number, data: UriComponents): TPromise { const provider = this._provider.get(handle); - return asWinJsPromise(token => provider.provideDecoration(uri, token)).then(data => { + return asWinJsPromise(token => provider.provideDecoration(URI.revive(data), token)).then(data => { return data && [data.priority, data.bubble, data.title, data.abbreviation, data.color, data.source]; }); } diff --git a/src/vs/workbench/api/node/extHostDocumentContentProviders.ts b/src/vs/workbench/api/node/extHostDocumentContentProviders.ts index 7ac4de0d212..ac478a894db 100644 --- a/src/vs/workbench/api/node/extHostDocumentContentProviders.ts +++ b/src/vs/workbench/api/node/extHostDocumentContentProviders.ts @@ -6,7 +6,7 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { IDisposable } from 'vs/base/common/lifecycle'; import { Disposable } from 'vs/workbench/api/node/extHostTypes'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -78,11 +78,11 @@ export class ExtHostDocumentContentProvider implements ExtHostDocumentContentPro }); } - $provideTextDocumentContent(handle: number, uri: URI): TPromise { + $provideTextDocumentContent(handle: number, uri: UriComponents): TPromise { const provider = this._documentContentProviders.get(handle); if (!provider) { return TPromise.wrapError(new Error(`unsupported uri-scheme: ${uri.scheme}`)); } - return asWinJsPromise(token => provider.provideTextDocumentContent(uri, token)); + return asWinJsPromise(token => provider.provideTextDocumentContent(URI.revive(uri), token)); } } From b36f93ecbfc2ee81f00fd6e1638a507ecd16afbb Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 18:20:18 +0100 Subject: [PATCH 227/615] Lazy load vscode-textmate (#40147) --- .../textMate/electron-browser/TMSyntax.ts | 70 ++++++++++++------- 1 file changed, 44 insertions(+), 26 deletions(-) diff --git a/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts b/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts index 8d9985a8413..97b87b6ebaf 100644 --- a/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts +++ b/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts @@ -94,13 +94,14 @@ export class TMLanguageRegistration { interface ICreateGrammarResult { languageId: LanguageId; grammar: IGrammar; + initialState: StackElement; containsEmbeddedLanguages: boolean; } export class TextMateService implements ITextMateService { public _serviceBrand: any; - private _grammarRegistry: Registry; + private _grammarRegistry: TPromise<[Registry, StackElement]>; private _modeService: IModeService; private _themeService: IWorkbenchThemeService; private _scopeRegistry: TMScopeRegistry; @@ -128,16 +129,7 @@ export class TextMateService implements ITextMateService { this._injectedEmbeddedLanguages = {}; this._languageToScope = new Map(); - this._grammarRegistry = new Registry({ - getFilePath: (scopeName: string) => { - return this._scopeRegistry.getFilePath(scopeName); - }, - getInjections: (scopeName: string) => { - return this._injections[scopeName]; - } - }); - this._updateTheme(); - this._themeService.onDidColorThemeChange((e) => this._updateTheme()); + this._grammarRegistry = null; grammarsExtPoint.setHandler((extensions) => { for (let i = 0; i < extensions.length; i++) { @@ -156,6 +148,26 @@ export class TextMateService implements ITextMateService { }); } + private _getOrCreateGrammarRegistry(): TPromise<[Registry, StackElement]> { + if (!this._grammarRegistry) { + this._grammarRegistry = TPromise.wrap(import('vscode-textmate')).then(({ Registry, INITIAL }) => { + const grammarRegistry = new Registry({ + getFilePath: (scopeName: string) => { + return this._scopeRegistry.getFilePath(scopeName); + }, + getInjections: (scopeName: string) => { + return this._injections[scopeName]; + } + }); + this._updateTheme(grammarRegistry); + this._themeService.onDidColorThemeChange((e) => this._updateTheme(grammarRegistry)); + return <[Registry, StackElement]>[grammarRegistry, INITIAL]; + }); + } + + return this._grammarRegistry; + } + private static _toColorMap(colorMap: string[]): Color[] { let result: Color[] = [null]; for (let i = 1, len = colorMap.length; i < len; i++) { @@ -164,13 +176,13 @@ export class TextMateService implements ITextMateService { return result; } - private _updateTheme(): void { + private _updateTheme(grammarRegistry: Registry): void { let colorTheme = this._themeService.getColorTheme(); if (!this.compareTokenRules(colorTheme.tokenColors)) { return; } - this._grammarRegistry.setTheme({ name: colorTheme.label, settings: colorTheme.tokenColors }); - let colorMap = TextMateService._toColorMap(this._grammarRegistry.getColorMap()); + grammarRegistry.setTheme({ name: colorTheme.label, settings: colorTheme.tokenColors }); + let colorMap = TextMateService._toColorMap(grammarRegistry.getColorMap()); let cssRules = generateTokensCSSForColorMap(colorMap); this._styleElement.innerHTML = cssRules; TokenizationRegistry.setColorMap(colorMap); @@ -295,15 +307,19 @@ export class TextMateService implements ITextMateService { let languageId = this._modeService.getLanguageIdentifier(modeId).id; let containsEmbeddedLanguages = (Object.keys(embeddedLanguages).length > 0); - return new TPromise((c, e, p) => { - this._grammarRegistry.loadGrammarWithEmbeddedLanguages(scopeName, languageId, embeddedLanguages, (err, grammar) => { - if (err) { - return e(err); - } - c({ - languageId: languageId, - grammar: grammar, - containsEmbeddedLanguages: containsEmbeddedLanguages + return this._getOrCreateGrammarRegistry().then((_res) => { + const [grammarRegistry, initialState] = _res; + return new TPromise((c, e, p) => { + grammarRegistry.loadGrammarWithEmbeddedLanguages(scopeName, languageId, embeddedLanguages, (err, grammar) => { + if (err) { + return e(err); + } + c({ + languageId: languageId, + grammar: grammar, + initialState: initialState, + containsEmbeddedLanguages: containsEmbeddedLanguages + }); }); }); }); @@ -311,7 +327,7 @@ export class TextMateService implements ITextMateService { private registerDefinition(modeId: string): void { this._createGrammar(modeId).then((r) => { - TokenizationRegistry.register(modeId, new TMTokenization(this._scopeRegistry, r.languageId, r.grammar, r.containsEmbeddedLanguages)); + TokenizationRegistry.register(modeId, new TMTokenization(this._scopeRegistry, r.languageId, r.grammar, r.initialState, r.containsEmbeddedLanguages)); }, onUnexpectedError); } } @@ -323,17 +339,19 @@ class TMTokenization implements ITokenizationSupport { private readonly _grammar: IGrammar; private readonly _containsEmbeddedLanguages: boolean; private readonly _seenLanguages: boolean[]; + private readonly _initialState: StackElement; - constructor(scopeRegistry: TMScopeRegistry, languageId: LanguageId, grammar: IGrammar, containsEmbeddedLanguages: boolean) { + constructor(scopeRegistry: TMScopeRegistry, languageId: LanguageId, grammar: IGrammar, initialState: StackElement, containsEmbeddedLanguages: boolean) { this._scopeRegistry = scopeRegistry; this._languageId = languageId; this._grammar = grammar; + this._initialState = initialState; this._containsEmbeddedLanguages = containsEmbeddedLanguages; this._seenLanguages = []; } public getInitialState(): IState { - return INITIAL; + return this._initialState; } public tokenize(line: string, state: IState, offsetDelta: number): TokenizationResult { From 426a39d7999cad4b89846da17ec46345cf2ced79 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 13 Dec 2017 18:20:44 +0100 Subject: [PATCH 228/615] Fix compilation issue --- src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts b/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts index 97b87b6ebaf..b54b904a5d7 100644 --- a/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts +++ b/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts @@ -14,7 +14,7 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { ExtensionMessageCollector } from 'vs/platform/extensions/common/extensionsRegistry'; import { ITokenizationSupport, TokenizationRegistry, IState, LanguageId } from 'vs/editor/common/modes'; import { IModeService } from 'vs/editor/common/services/modeService'; -import { INITIAL, StackElement, IGrammar, Registry, IEmbeddedLanguagesMap as IEmbeddedLanguagesMap2 } from 'vscode-textmate'; +import { StackElement, IGrammar, Registry, IEmbeddedLanguagesMap as IEmbeddedLanguagesMap2 } from 'vscode-textmate'; import { IWorkbenchThemeService, ITokenColorizationRule } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { ITextMateService } from 'vs/workbench/services/textMate/electron-browser/textMateService'; import { grammarsExtPoint, IEmbeddedLanguagesMap, ITMSyntaxExtensionPoint } from 'vs/workbench/services/textMate/electron-browser/TMGrammars'; From d7bb4b5a6c2c0845fb0515bedc61b6a6158ae7ba Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 18:19:46 +0100 Subject: [PATCH 229/615] more native json, #40169 --- src/vs/workbench/api/node/extHost.protocol.ts | 14 +++++++------- .../api/node/extHostDocumentSaveParticipant.ts | 5 +++-- .../api/node/extHostFileSystemEventService.ts | 16 ++++++++++------ 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 48751f1aa75..4161f1d75c6 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -452,7 +452,7 @@ export interface ExtHostDocumentsShape { } export interface ExtHostDocumentSaveParticipantShape { - $participateInSave(resource: URI, reason: SaveReason): Thenable; + $participateInSave(resource: UriComponents, reason: SaveReason): Thenable; } export interface ITextEditorAddData { @@ -510,9 +510,9 @@ export interface ExtHostExtensionServiceShape { } export interface FileSystemEvents { - created: URI[]; - changed: URI[]; - deleted: URI[]; + created: UriComponents[]; + changed: UriComponents[]; + deleted: UriComponents[]; } export interface ExtHostFileSystemEventServiceShape { $onFileEvent(events: FileSystemEvents): void; @@ -686,7 +686,7 @@ export const MainContext = { MainThreadStorage: createMainId('MainThreadStorage'), MainThreadTelemetry: createMainId('MainThreadTelemetry'), MainThreadTerminalService: createMainId('MainThreadTerminalService'), - MainThreadWorkspace: createMainId('MainThreadWorkspace'), + MainThreadWorkspace: createMainId('MainThreadWorkspace', ProxyType.CustomMarshaller), MainThreadFileSystem: createMainId('MainThreadFileSystem'), MainThreadExtensionService: createMainId('MainThreadExtensionService'), MainThreadSCM: createMainId('MainThreadSCM', ProxyType.CustomMarshaller), @@ -703,11 +703,11 @@ export const ExtHostContext = { ExtHostDocumentsAndEditors: createExtId('ExtHostDocumentsAndEditors', ProxyType.CustomMarshaller), ExtHostDocuments: createExtId('ExtHostDocuments'), ExtHostDocumentContentProviders: createExtId('ExtHostDocumentContentProviders'), - ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant', ProxyType.CustomMarshaller), + ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant'), ExtHostEditors: createExtId('ExtHostEditors', ProxyType.CustomMarshaller), ExtHostTreeViews: createExtId('ExtHostTreeViews'), ExtHostFileSystem: createExtId('ExtHostFileSystem', ProxyType.CustomMarshaller), - ExtHostFileSystemEventService: createExtId('ExtHostFileSystemEventService', ProxyType.CustomMarshaller), + ExtHostFileSystemEventService: createExtId('ExtHostFileSystemEventService'), ExtHostHeapService: createExtId('ExtHostHeapMonitor'), ExtHostLanguageFeatures: createExtId('ExtHostLanguageFeatures', ProxyType.CustomMarshaller), ExtHostQuickOpen: createExtId('ExtHostQuickOpen'), diff --git a/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts b/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts index 80b9ae90671..3733a20adbc 100644 --- a/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts +++ b/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts @@ -5,7 +5,7 @@ 'use strict'; import Event from 'vs/base/common/event'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { sequence, always } from 'vs/base/common/async'; import { illegalState } from 'vs/base/common/errors'; import { ExtHostDocumentSaveParticipantShape, MainThreadEditorsShape, IWorkspaceResourceEdit } from 'vs/workbench/api/node/extHost.protocol'; @@ -49,7 +49,8 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic }; } - $participateInSave(resource: URI, reason: SaveReason): Thenable { + $participateInSave(data: UriComponents, reason: SaveReason): Thenable { + const resource = URI.revive(data); const entries = this._callbacks.toArray(); let didTimeout = false; diff --git a/src/vs/workbench/api/node/extHostFileSystemEventService.ts b/src/vs/workbench/api/node/extHostFileSystemEventService.ts index 1c5aa2b1e28..1ac5f892b3f 100644 --- a/src/vs/workbench/api/node/extHostFileSystemEventService.ts +++ b/src/vs/workbench/api/node/extHostFileSystemEventService.ts @@ -9,6 +9,7 @@ import { Disposable } from './extHostTypes'; import { parse, IRelativePattern } from 'vs/base/common/glob'; import { Uri, FileSystemWatcher as _FileSystemWatcher } from 'vscode'; import { FileSystemEvents, ExtHostFileSystemEventServiceShape } from './extHost.protocol'; +import URI from 'vs/base/common/uri'; class FileSystemWatcher implements _FileSystemWatcher { @@ -48,22 +49,25 @@ class FileSystemWatcher implements _FileSystemWatcher { let subscription = dispatcher(events => { if (!ignoreCreateEvents) { for (let created of events.created) { - if (parsedPattern(created.fsPath)) { - this._onDidCreate.fire(created); + let uri = URI.revive(created); + if (parsedPattern(uri.fsPath)) { + this._onDidCreate.fire(uri); } } } if (!ignoreChangeEvents) { for (let changed of events.changed) { - if (parsedPattern(changed.fsPath)) { - this._onDidChange.fire(changed); + let uri = URI.revive(changed); + if (parsedPattern(uri.fsPath)) { + this._onDidChange.fire(uri); } } } if (!ignoreDeleteEvents) { for (let deleted of events.deleted) { - if (parsedPattern(deleted.fsPath)) { - this._onDidDelete.fire(deleted); + let uri = URI.revive(deleted); + if (parsedPattern(uri.fsPath)) { + this._onDidDelete.fire(uri); } } } From 89ac57db7f55defc8b8284c71d6b37ebeed0cb31 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 13 Dec 2017 18:24:19 +0100 Subject: [PATCH 230/615] fix integration test, #40169 --- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- src/vs/workbench/api/node/extHostDocuments.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 4161f1d75c6..b9494a65b71 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -150,7 +150,7 @@ export interface MainThreadDocumentContentProvidersShape extends IDisposable { } export interface MainThreadDocumentsShape extends IDisposable { - $tryCreateDocument(options?: { language?: string; content?: string; }): TPromise; + $tryCreateDocument(options?: { language?: string; content?: string; }): TPromise; $tryOpenDocument(uri: UriComponents): TPromise; $trySaveDocument(uri: UriComponents): TPromise; } diff --git a/src/vs/workbench/api/node/extHostDocuments.ts b/src/vs/workbench/api/node/extHostDocuments.ts index 05a7690ed9e..a8a9773b3c2 100644 --- a/src/vs/workbench/api/node/extHostDocuments.ts +++ b/src/vs/workbench/api/node/extHostDocuments.ts @@ -92,7 +92,7 @@ export class ExtHostDocuments implements ExtHostDocumentsShape { } public createDocumentData(options?: { language?: string; content?: string }): TPromise { - return this._proxy.$tryCreateDocument(options); + return this._proxy.$tryCreateDocument(options).then(data => URI.revive(data)); } public $acceptModelModeChanged(strURL: string, oldModeId: string, newModeId: string): void { From ac6b0584ff645744802477f82e9c09774b931c4b Mon Sep 17 00:00:00 2001 From: ASEM DEVAJIT SINGH Date: Thu, 14 Dec 2017 00:02:39 +0530 Subject: [PATCH 231/615] Remove extra new lines (#40160) --- .../parts/snippets/electron-browser/snippetsService.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts index 004b30292b8..65615189a2b 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts @@ -378,8 +378,6 @@ export class SnippetSuggestProvider implements ISuggestSupport { } return languageId; } - - } export function getNonWhitespacePrefix(model: ISimpleModel, position: Position): string { From b5e49206704789813b3d7cc7345dbf4f7743f508 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 13 Dec 2017 11:44:53 -0800 Subject: [PATCH 232/615] Update appinsights module fixes #40095 --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0865bc7d251..7f683262225 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "smoketest": "cd test/smoke && mocha" }, "dependencies": { - "applicationinsights": "0.17.1", + "applicationinsights": "0.18.0", "fast-plist": "0.1.2", "gc-signals": "^0.0.1", "getmac": "1.0.7", diff --git a/yarn.lock b/yarn.lock index e7285af727a..2e034565a89 100644 --- a/yarn.lock +++ b/yarn.lock @@ -147,9 +147,9 @@ anymatch@^1.3.0: micromatch "^2.1.5" normalize-path "^2.0.0" -applicationinsights@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-0.17.1.tgz#1c12501dbe9c1e9176423fce0ce8da611cccb9a8" +applicationinsights@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-0.18.0.tgz#162ebb48a383408bc4de44db32b417307f45bbc1" archy@^1.0.0: version "1.0.0" From d279e2de6cd2ac43b88ba1025cd62ca300c4c133 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 13 Dec 2017 14:02:27 -0800 Subject: [PATCH 233/615] Make logger API proposed, add jsdoc, and match some extension API conventions better --- src/vs/vscode.d.ts | 28 --------------- src/vs/vscode.proposed.d.ts | 36 +++++++++++++++++++ .../workbench/api/node/extHostLogService.ts | 9 +++-- 3 files changed, 42 insertions(+), 31 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 4b45a1d37c9..86982258339 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3930,11 +3930,6 @@ declare module 'vscode' { * [`globalState`](#ExtensionContext.globalState) to store key value data. */ storagePath: string | undefined; - - /** - * A logger - */ - logger: ILogger; } /** @@ -4330,29 +4325,6 @@ declare module 'vscode' { resolveTask(task: Task, token?: CancellationToken): ProviderResult; } - export enum LogLevel { - Trace = 1, - Debug = 2, - Info = 3, - Warning = 4, - Error = 5, - Critical = 6, - Off = 7 - } - - export interface ILogger { - onDidChangeLogLevel: Event; - getLevel(): LogLevel; - getLogDirectory(): Thenable; - - trace(message: string, ...args: any[]): void; - debug(message: string, ...args: any[]): void; - info(message: string, ...args: any[]): void; - warn(message: string, ...args: any[]): void; - error(message: string | Error, ...args: any[]): void; - critical(message: string | Error, ...args: any[]): void; - } - /** * Namespace describing the environment the editor runs in. */ diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 566fc38c017..faf05d3ed20 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -326,4 +326,40 @@ declare module 'vscode' { private constructor(enabled: boolean, condition: string, hitCondition: string, functionName: string); } + + /** + * The severity level of a log message + */ + export enum LogLevel { + Trace = 1, + Debug = 2, + Info = 3, + Warning = 4, + Error = 5, + Critical = 6, + Off = 7 + } + + /** + * A logger for writing to an extension's log file, and accessing its dedicated log directory. + */ + export interface Logger { + onDidChangeLogLevel: Event; + readonly currentLevel: LogLevel; + getLogDirectory(): Thenable; + + trace(message: string, ...args: any[]): void; + debug(message: string, ...args: any[]): void; + info(message: string, ...args: any[]): void; + warn(message: string, ...args: any[]): void; + error(message: string | Error, ...args: any[]): void; + critical(message: string | Error, ...args: any[]): void; + } + + export interface ExtensionContext { + /** + * A logger + */ + logger: Logger; + } } diff --git a/src/vs/workbench/api/node/extHostLogService.ts b/src/vs/workbench/api/node/extHostLogService.ts index 347dc8c6be0..a1d017c31b3 100644 --- a/src/vs/workbench/api/node/extHostLogService.ts +++ b/src/vs/workbench/api/node/extHostLogService.ts @@ -40,19 +40,22 @@ export class ExtHostLogService implements ExtHostLogServiceShape { } } -export class ExtHostLogger implements vscode.ILogger { +export class ExtHostLogger implements vscode.Logger { private _currentLevel: LogLevel; - get onDidChangeLogLevel(): Event { return this._extHostLogService.onDidChangeLogLevel; } - constructor( private readonly _extHostLogService: ExtHostLogService, private readonly _logService: ILogService, private readonly _logDirectory: string ) { + this._currentLevel = this._logService.getLevel(); this._extHostLogService.onDidChangeLogLevel(logLevel => this._currentLevel = logLevel); } + get onDidChangeLogLevel(): Event { return this._extHostLogService.onDidChangeLogLevel; } + + get currentLevel(): LogLevel { return this._currentLevel; } + getLogDirectory(): TPromise { return dirExists(this._logDirectory).then(exists => { if (exists) { From 35c7351761770bfd6580bc2826510ba67343e973 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 13 Dec 2017 14:16:00 -0800 Subject: [PATCH 234/615] More ExtHostLogger tweaks, and remove logLevel syncing code, for real investigation later --- src/vs/vscode.proposed.d.ts | 4 +-- src/vs/workbench/api/node/extHost.protocol.ts | 6 +--- .../workbench/api/node/extHostLogService.ts | 29 +++++++------------ 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index faf05d3ed20..ffa7d157c45 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -344,9 +344,9 @@ declare module 'vscode' { * A logger for writing to an extension's log file, and accessing its dedicated log directory. */ export interface Logger { - onDidChangeLogLevel: Event; + readonly onDidChangeLogLevel: Event; readonly currentLevel: LogLevel; - getLogDirectory(): Thenable; + readonly logDirectory: Thenable; trace(message: string, ...args: any[]): void; debug(message: string, ...args: any[]): void; diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 67091188abb..db31f504d0e 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -33,7 +33,7 @@ import { IConfigurationData, ConfigurationTarget, IConfigurationModel } from 'vs import { IPickOpenEntry, IPickOptions } from 'vs/platform/quickOpen/common/quickOpen'; import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import { TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions'; -import { EndOfLine, TextEditorLineNumbersStyle, LogLevel } from 'vs/workbench/api/node/extHostTypes'; +import { EndOfLine, TextEditorLineNumbersStyle } from 'vs/workbench/api/node/extHostTypes'; import { TaskSet } from 'vs/workbench/parts/tasks/common/tasks'; @@ -673,10 +673,6 @@ export interface ExtHostWindowShape { $onDidChangeWindowFocus(value: boolean): void; } -export interface ExtHostLogServiceShape { - $acceptLogLevelChanged(logLevel: LogLevel): void; -} - // --- proxy identifiers export const MainContext = { diff --git a/src/vs/workbench/api/node/extHostLogService.ts b/src/vs/workbench/api/node/extHostLogService.ts index a1d017c31b3..150bde4af3d 100644 --- a/src/vs/workbench/api/node/extHostLogService.ts +++ b/src/vs/workbench/api/node/extHostLogService.ts @@ -9,31 +9,23 @@ import * as vscode from 'vscode'; import { TPromise } from 'vs/base/common/winjs.base'; import { mkdirp, dirExists } from 'vs/base/node/pfs'; import Event, { Emitter } from 'vs/base/common/event'; -import { ExtHostLogServiceShape } from './extHost.protocol'; import { LogLevel } from 'vs/workbench/api/node/extHostTypes'; import { ILogService } from 'vs/platform/log/common/log'; import { createLogService } from 'vs/platform/log/node/spdlogService'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { memoize } from 'vs/base/common/decorators'; -export class ExtHostLogService implements ExtHostLogServiceShape { +export class ExtHostLogService { private _loggers: Map = new Map(); - private _onDidChangeLogLevel: Emitter; - get onDidChangeLogLevel(): Event { return this._onDidChangeLogLevel.event; } - constructor(private _environmentService: IEnvironmentService) { - this._onDidChangeLogLevel = new Emitter(); - } - - $acceptLogLevelChanged(logLevel: LogLevel): void { - this._onDidChangeLogLevel.fire(logLevel); } getExtLogger(extensionID: string): ExtHostLogger { if (!this._loggers.has(extensionID)) { const logService = createLogService(extensionID, this._environmentService, extensionID); const logsDirPath = path.join(this._environmentService.logsPath, extensionID); - this._loggers.set(extensionID, new ExtHostLogger(this, logService, logsDirPath)); + this._loggers.set(extensionID, new ExtHostLogger(logService, logsDirPath)); } return this._loggers.get(extensionID); @@ -42,21 +34,24 @@ export class ExtHostLogService implements ExtHostLogServiceShape { export class ExtHostLogger implements vscode.Logger { private _currentLevel: LogLevel; + private _onDidChangeLogLevel: Emitter; constructor( - private readonly _extHostLogService: ExtHostLogService, private readonly _logService: ILogService, private readonly _logDirectory: string ) { this._currentLevel = this._logService.getLevel(); - this._extHostLogService.onDidChangeLogLevel(logLevel => this._currentLevel = logLevel); + this._onDidChangeLogLevel = new Emitter(); + this.onDidChangeLogLevel = this._onDidChangeLogLevel.event; } - get onDidChangeLogLevel(): Event { return this._extHostLogService.onDidChangeLogLevel; } + // TODO + readonly onDidChangeLogLevel: Event; get currentLevel(): LogLevel { return this._currentLevel; } - getLogDirectory(): TPromise { + @memoize + get logDirectory(): TPromise { return dirExists(this._logDirectory).then(exists => { if (exists) { return TPromise.wrap(null); @@ -68,10 +63,6 @@ export class ExtHostLogger implements vscode.Logger { }); } - getLevel(): vscode.LogLevel { - return this._currentLevel; - } - trace(message: string, ...args: any[]): void { return this._logService.trace(message, ...args); } From 77697cc33ec0f468a64ceadf1165cc4bf53dd88d Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 13 Dec 2017 23:26:55 +0100 Subject: [PATCH 235/615] Log output - Implement Buffered output channel and file output channel in output services - Allow to register a file output channel - Register log files output channels --- build/lib/i18n.resources.json | 6 +- .../mainThreadOutputService.ts | 3 +- src/vs/workbench/electron-browser/actions.ts | 81 +--- .../electron-browser/main.contribution.ts | 7 +- .../parts/logs/common/logConstants.ts | 9 + .../electron-browser/logs.contribution.ts | 44 +++ .../logs/electron-browser/logsActions.ts | 93 +++++ .../parts/output/browser/outputActions.ts | 17 +- .../parts/output/browser/outputServices.ts | 370 +++++++++++------- .../workbench/parts/output/common/output.ts | 42 +- .../quickopen/browser/viewPickerHandler.ts | 2 +- .../electron-browser/task.contribution.ts | 8 +- .../electron-browser/terminalTaskSystem.ts | 2 +- .../parts/tasks/node/processTaskSystem.ts | 2 +- src/vs/workbench/workbench.main.ts | 1 + 15 files changed, 433 insertions(+), 254 deletions(-) create mode 100644 src/vs/workbench/parts/logs/common/logConstants.ts create mode 100644 src/vs/workbench/parts/logs/electron-browser/logs.contribution.ts create mode 100644 src/vs/workbench/parts/logs/electron-browser/logsActions.ts diff --git a/build/lib/i18n.resources.json b/build/lib/i18n.resources.json index 0e4c15c7408..93cf72c39c9 100644 --- a/build/lib/i18n.resources.json +++ b/build/lib/i18n.resources.json @@ -70,6 +70,10 @@ "name": "vs/workbench/parts/markers", "project": "vscode-workbench" }, + { + "name": "vs/workbench/parts/logs", + "project": "vscode-workbench" + }, { "name": "vs/workbench/parts/nps", "project": "vscode-workbench" @@ -199,4 +203,4 @@ "project": "vscode-workbench" } ] -} +} \ No newline at end of file diff --git a/src/vs/workbench/api/electron-browser/mainThreadOutputService.ts b/src/vs/workbench/api/electron-browser/mainThreadOutputService.ts index c85633089f0..905dc07490d 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadOutputService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadOutputService.ts @@ -45,7 +45,8 @@ export class MainThreadOutputService implements MainThreadOutputServiceShape { } public $reveal(channelId: string, label: string, preserveFocus: boolean): TPromise { - this._getChannel(channelId, label).show(preserveFocus); + const channel = this._getChannel(channelId, label); + this._outputService.showChannel(channel.id, preserveFocus); return undefined; } diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 76d1c2d8e3a..de3a3ee1dd7 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -25,7 +25,7 @@ import { IExtensionManagementService, LocalExtensionType, ILocalExtension, IExte import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import paths = require('vs/base/common/paths'); import { isMacintosh, isLinux, language } from 'vs/base/common/platform'; -import { IQuickOpenService, IFilePickOpenEntry, ISeparator, IPickOpenAction, IPickOpenItem, IPickOpenEntry } from 'vs/platform/quickOpen/common/quickOpen'; +import { IQuickOpenService, IFilePickOpenEntry, ISeparator, IPickOpenAction, IPickOpenItem } from 'vs/platform/quickOpen/common/quickOpen'; import * as browser from 'vs/base/browser/browser'; import { IIntegrityService } from 'vs/platform/integrity/common/integrity'; import { IEntryRunContext } from 'vs/base/parts/quickopen/common/quickOpen'; @@ -46,7 +46,6 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { IExtensionService, ActivationTimes } from 'vs/platform/extensions/common/extensions'; import { getEntries } from 'vs/base/common/performance'; import { IEditor } from 'vs/platform/editor/common/editor'; -import { ILogService, LogLevel } from 'vs/platform/log/common/log'; // --- actions @@ -1683,82 +1682,4 @@ export class ConfigureLocaleAction extends Action { throw new Error(nls.localize('fail.createSettings', "Unable to create '{0}' ({1}).", getPathLabel(file, this.contextService), error)); }); } -} - -export class OpenLogsFolderAction extends Action { - - static ID = 'workbench.action.openLogsFolder'; - static LABEL = nls.localize('openLogsFolder', "Open Logs Folder"); - - constructor(id: string, label: string, - @IEnvironmentService private environmentService: IEnvironmentService, - @IWindowsService private windowsService: IWindowsService, - ) { - super(id, label); - } - - run(): TPromise { - return this.windowsService.showItemInFolder(paths.join(this.environmentService.logsPath, 'main.log')); - } -} - -export class ShowLogsAction extends Action { - - static ID = 'workbench.action.showLogs'; - static LABEL = nls.localize('showLogs', "Show Logs..."); - - constructor(id: string, label: string, - @IEnvironmentService private environmentService: IEnvironmentService, - @IWindowService private windowService: IWindowService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IQuickOpenService private quickOpenService: IQuickOpenService - ) { - super(id, label); - } - - run(): TPromise { - const entries: IPickOpenEntry[] = [ - { id: 'main', label: nls.localize('mainProcess', "Main"), run: () => this.editorService.openEditor({ resource: URI.file(paths.join(this.environmentService.logsPath, 'main.log')) }) }, - { id: 'shared', label: nls.localize('sharedProcess', "Shared"), run: () => this.editorService.openEditor({ resource: URI.file(paths.join(this.environmentService.logsPath, 'sharedprocess.log')) }) }, - { id: 'renderer', label: nls.localize('rendererProcess', "Renderer"), run: () => this.editorService.openEditor({ resource: URI.file(paths.join(this.environmentService.logsPath, `renderer${this.windowService.getCurrentWindowId()}.log`)) }) }, - { id: 'extenshionHost', label: nls.localize('extensionHost', "Extension Host"), run: () => this.editorService.openEditor({ resource: URI.file(paths.join(this.environmentService.logsPath, `exthost${this.windowService.getCurrentWindowId()}.log`)) }) } - ]; - - return this.quickOpenService.pick(entries, { placeHolder: nls.localize('selectProcess', "Select process") }).then(entry => { - if (entry) { - entry.run(null); - } - }); - } -} - -export class SetLogLevelAction extends Action { - - static ID = 'workbench.action.setLogLevel'; - static LABEL = nls.localize('setLogLevel', "Set Log Level"); - - constructor(id: string, label: string, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @ILogService private logService: ILogService - ) { - super(id, label); - } - - run(): TPromise { - const entries = [ - { label: nls.localize('trace', "Trace"), level: LogLevel.Trace }, - { label: nls.localize('debug', "Debug"), level: LogLevel.Debug }, - { label: nls.localize('info', "Info"), level: LogLevel.Info }, - { label: nls.localize('warn', "Warning"), level: LogLevel.Warning }, - { label: nls.localize('err', "Error"), level: LogLevel.Error }, - { label: nls.localize('critical', "Critical"), level: LogLevel.Critical }, - { label: nls.localize('off', "Off"), level: LogLevel.Off } - ]; - - return this.quickOpenService.pick(entries, { placeHolder: nls.localize('selectLogLevel', "Select log level"), autoFocus: { autoFocusIndex: this.logService.getLevel() } }).then(entry => { - if (entry) { - this.logService.setLevel(entry.level); - } - }); - } } \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index 24565c1ea2d..3c9ed0fa556 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -14,7 +14,7 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actions'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform'; -import { CloseEditorAction, KeybindingsReferenceAction, OpenDocumentationUrlAction, OpenIntroductoryVideosUrlAction, OpenTipsAndTricksUrlAction, ReportIssueAction, ReportPerformanceIssueAction, ZoomResetAction, ZoomOutAction, ZoomInAction, ToggleFullScreenAction, ToggleMenuBarAction, CloseWorkspaceAction, CloseCurrentWindowAction, SwitchWindow, NewWindowAction, CloseMessagesAction, NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction, IncreaseViewSizeAction, DecreaseViewSizeAction, ShowStartupPerformance, ToggleSharedProcessAction, QuickSwitchWindow, QuickOpenRecentAction, inRecentFilesPickerContextKey, ConfigureLocaleAction, ShowLogsAction, OpenLogsFolderAction, SetLogLevelAction } from 'vs/workbench/electron-browser/actions'; +import { CloseEditorAction, KeybindingsReferenceAction, OpenDocumentationUrlAction, OpenIntroductoryVideosUrlAction, OpenTipsAndTricksUrlAction, ReportIssueAction, ReportPerformanceIssueAction, ZoomResetAction, ZoomOutAction, ZoomInAction, ToggleFullScreenAction, ToggleMenuBarAction, CloseWorkspaceAction, CloseCurrentWindowAction, SwitchWindow, NewWindowAction, CloseMessagesAction, NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction, IncreaseViewSizeAction, DecreaseViewSizeAction, ShowStartupPerformance, ToggleSharedProcessAction, QuickSwitchWindow, QuickOpenRecentAction, inRecentFilesPickerContextKey, ConfigureLocaleAction } from 'vs/workbench/electron-browser/actions'; import { MessagesVisibleContext } from 'vs/workbench/electron-browser/workbench'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; import { registerCommands } from 'vs/workbench/electron-browser/commands'; @@ -31,15 +31,12 @@ registerCommands(); const viewCategory = nls.localize('view', "View"); const helpCategory = nls.localize('help', "Help"); const fileCategory = nls.localize('file', "File"); -const devCategory = nls.localize('developer', "Developer"); const workbenchActionsRegistry = Registry.as(Extensions.WorkbenchActions); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(NewWindowAction, NewWindowAction.ID, NewWindowAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_N }), 'New Window'); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(CloseCurrentWindowAction, CloseCurrentWindowAction.ID, CloseCurrentWindowAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_W }), 'Close Window'); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(SwitchWindow, SwitchWindow.ID, SwitchWindow.LABEL, { primary: null, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_W } }), 'Switch Window...'); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(QuickSwitchWindow, QuickSwitchWindow.ID, QuickSwitchWindow.LABEL), 'Quick Switch Window...'); -workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowLogsAction, ShowLogsAction.ID, ShowLogsAction.LABEL), 'Developer: Show Logs...', devCategory); -workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenLogsFolderAction, OpenLogsFolderAction.ID, OpenLogsFolderAction.LABEL), 'Developer: Open Log Folder', devCategory); -workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(SetLogLevelAction, SetLogLevelAction.ID, SetLogLevelAction.LABEL), 'Developer: Set Log Level', devCategory); + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenRecentAction, QuickOpenRecentAction.ID, QuickOpenRecentAction.LABEL), 'File: Quick Open Recent...', fileCategory); diff --git a/src/vs/workbench/parts/logs/common/logConstants.ts b/src/vs/workbench/parts/logs/common/logConstants.ts new file mode 100644 index 00000000000..08ac75b8e96 --- /dev/null +++ b/src/vs/workbench/parts/logs/common/logConstants.ts @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +export const mainLogChannelId = 'mainLog'; +export const sharedLogChannelId = 'sharedLog'; +export const rendererLogChannelId = 'rendererLog'; +export const extHostLogChannelId = 'extHostLog'; \ No newline at end of file diff --git a/src/vs/workbench/parts/logs/electron-browser/logs.contribution.ts b/src/vs/workbench/parts/logs/electron-browser/logs.contribution.ts new file mode 100644 index 00000000000..a6f3683ab54 --- /dev/null +++ b/src/vs/workbench/parts/logs/electron-browser/logs.contribution.ts @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vs/nls'; +import { join } from 'path'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions, IWorkbenchContribution } from 'vs/workbench/common/contributions'; +import { IOutputChannelRegistry, Extensions as OutputExt, } from 'vs/workbench/parts/output/common/output'; +import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { IWindowService } from 'vs/platform/windows/common/windows'; +import { Disposable } from 'vs/base/common/lifecycle'; +import URI from 'vs/base/common/uri'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import * as Constants from 'vs/workbench/parts/logs/common/logConstants'; +import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actions'; +import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; +import { ShowLogsAction, OpenLogsFolderAction, SetLogLevelAction } from 'vs/workbench/parts/logs/electron-browser/logsActions'; + +class LogOutputChannels extends Disposable implements IWorkbenchContribution { + + constructor( + @IWindowService private windowService: IWindowService, + @IEnvironmentService private environmentService: IEnvironmentService, + @IInstantiationService instantiationService: IInstantiationService + ) { + super(); + let outputChannelRegistry = Registry.as(OutputExt.OutputChannels); + outputChannelRegistry.registerChannel(Constants.mainLogChannelId, nls.localize('mainLog', "Log (Main)"), URI.file(join(this.environmentService.logsPath, `main.log`))); + outputChannelRegistry.registerChannel(Constants.sharedLogChannelId, nls.localize('sharedLog', "Log (Shared)"), URI.file(join(this.environmentService.logsPath, `sharedprocess.log`))); + outputChannelRegistry.registerChannel(Constants.rendererLogChannelId, nls.localize('rendererLog', "Log (Window)"), URI.file(join(this.environmentService.logsPath, `renderer${this.windowService.getCurrentWindowId()}.log`))); + outputChannelRegistry.registerChannel(Constants.extHostLogChannelId, nls.localize('extensionsLog', "Log (Extension Host)"), URI.file(join(this.environmentService.logsPath, `extHost${this.windowService.getCurrentWindowId()}.log`))); + } +} + +Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution(LogOutputChannels, LifecyclePhase.Restoring); + +const workbenchActionsRegistry = Registry.as(WorkbenchActionExtensions.WorkbenchActions); +const devCategory = nls.localize('developer', "Developer"); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowLogsAction, ShowLogsAction.ID, ShowLogsAction.LABEL), 'Developer: Show Logs...', devCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenLogsFolderAction, OpenLogsFolderAction.ID, OpenLogsFolderAction.LABEL), 'Developer: Open Log Folder', devCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(SetLogLevelAction, SetLogLevelAction.ID, SetLogLevelAction.LABEL), 'Developer: Set Log Level', devCategory); \ No newline at end of file diff --git a/src/vs/workbench/parts/logs/electron-browser/logsActions.ts b/src/vs/workbench/parts/logs/electron-browser/logsActions.ts new file mode 100644 index 00000000000..74fee6a2e6f --- /dev/null +++ b/src/vs/workbench/parts/logs/electron-browser/logsActions.ts @@ -0,0 +1,93 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vs/nls'; +import { Action } from 'vs/base/common/actions'; +import * as paths from 'vs/base/common/paths'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { IWindowsService } from 'vs/platform/windows/common/windows'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { IQuickOpenService, IPickOpenEntry } from 'vs/platform/quickOpen/common/quickOpen'; +import { ILogService, LogLevel } from 'vs/platform/log/common/log'; +import { IOutputService } from 'vs/workbench/parts/output/common/output'; +import * as Constants from 'vs/workbench/parts/logs/common/logConstants'; + +export class OpenLogsFolderAction extends Action { + + static ID = 'workbench.action.openLogsFolder'; + static LABEL = nls.localize('openLogsFolder', "Open Logs Folder"); + + constructor(id: string, label: string, + @IEnvironmentService private environmentService: IEnvironmentService, + @IWindowsService private windowsService: IWindowsService, + ) { + super(id, label); + } + + run(): TPromise { + return this.windowsService.showItemInFolder(paths.join(this.environmentService.logsPath, 'main.log')); + } +} + +export class ShowLogsAction extends Action { + + static ID = 'workbench.action.showLogs'; + static LABEL = nls.localize('showLogs', "Show Logs..."); + + constructor(id: string, label: string, + @IQuickOpenService private quickOpenService: IQuickOpenService, + @IOutputService private outputService: IOutputService + ) { + super(id, label); + } + + run(): TPromise { + const entries: IPickOpenEntry[] = [ + { id: Constants.mainLogChannelId, label: nls.localize('mainProcess', "Main") }, + { id: Constants.sharedLogChannelId, label: nls.localize('sharedProcess', "Shared") }, + { id: Constants.rendererLogChannelId, label: nls.localize('rendererProcess', "Window") }, + { id: Constants.extHostLogChannelId, label: nls.localize('extensionHost', "Extension Host") } + ]; + + return this.quickOpenService.pick(entries, { placeHolder: nls.localize('selectProcess', "Select process") }) + .then(entry => { + if (entry) { + return this.outputService.showChannel(entry.id); + } + return null; + }); + } +} + +export class SetLogLevelAction extends Action { + + static ID = 'workbench.action.setLogLevel'; + static LABEL = nls.localize('setLogLevel', "Set Log Level"); + + constructor(id: string, label: string, + @IQuickOpenService private quickOpenService: IQuickOpenService, + @ILogService private logService: ILogService + ) { + super(id, label); + } + + run(): TPromise { + const entries = [ + { label: nls.localize('trace', "Trace"), level: LogLevel.Trace }, + { label: nls.localize('debug', "Debug"), level: LogLevel.Debug }, + { label: nls.localize('info', "Info"), level: LogLevel.Info }, + { label: nls.localize('warn', "Warning"), level: LogLevel.Warning }, + { label: nls.localize('err', "Error"), level: LogLevel.Error }, + { label: nls.localize('critical', "Critical"), level: LogLevel.Critical }, + { label: nls.localize('off', "Off"), level: LogLevel.Off } + ]; + + return this.quickOpenService.pick(entries, { placeHolder: nls.localize('selectLogLevel', "Select log level"), autoFocus: { autoFocusIndex: this.logService.getLevel() } }).then(entry => { + if (entry) { + this.logService.setLevel(entry.level); + } + }); + } +} \ No newline at end of file diff --git a/src/vs/workbench/parts/output/browser/outputActions.ts b/src/vs/workbench/parts/output/browser/outputActions.ts index 8fdbcd9698f..51daf903872 100644 --- a/src/vs/workbench/parts/output/browser/outputActions.ts +++ b/src/vs/workbench/parts/output/browser/outputActions.ts @@ -7,7 +7,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); import { IAction, Action } from 'vs/base/common/actions'; -import { IOutputService, OUTPUT_PANEL_ID } from 'vs/workbench/parts/output/common/output'; +import { IOutputService, OUTPUT_PANEL_ID, IOutputChannelRegistry, Extensions as OutputExt } from 'vs/workbench/parts/output/common/output'; import { SelectActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; @@ -15,6 +15,7 @@ import { TogglePanelAction } from 'vs/workbench/browser/panel'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { Registry } from 'vs/platform/registry/common/platform'; export class ToggleOutputAction extends TogglePanelAction { @@ -99,7 +100,7 @@ export class SwitchOutputAction extends Action { } public run(channelId?: string): TPromise { - return this.outputService.getChannel(channelId).show(); + return this.outputService.showChannel(channelId); } } @@ -112,10 +113,9 @@ export class SwitchOutputActionItem extends SelectActionItem { ) { super(null, action, [], 0); - this.toDispose.push(this.outputService.onOutputChannel(() => { - const activeChannelIndex = this.getSelected(this.outputService.getActiveChannel().id); - this.setOptions(this.getOptions(), activeChannelIndex); - })); + let outputChannelRegistry = Registry.as(OutputExt.OutputChannels); + this.toDispose.push(outputChannelRegistry.onDidRegisterChannel(() => this.updateOtions())); + this.toDispose.push(outputChannelRegistry.onDidRemoveChannel(() => this.updateOtions())); this.toDispose.push(this.outputService.onActiveOutputChannel(activeChannelId => this.setOptions(this.getOptions(), this.getSelected(activeChannelId)))); this.toDispose.push(attachSelectBoxStyler(this.selectBox, themeService)); @@ -132,6 +132,11 @@ export class SwitchOutputActionItem extends SelectActionItem { return this.outputService.getChannels().map(c => c.label); } + private updateOtions(): void { + const activeChannelIndex = this.getSelected(this.outputService.getActiveChannel().id); + this.setOptions(this.getOptions(), activeChannelIndex); + } + private getSelected(outputId: string): number { if (!outputId) { return undefined; diff --git a/src/vs/workbench/parts/output/browser/outputServices.ts b/src/vs/workbench/parts/output/browser/outputServices.ts index f89599c5d41..36a1f677632 100644 --- a/src/vs/workbench/parts/output/browser/outputServices.ts +++ b/src/vs/workbench/parts/output/browser/outputServices.ts @@ -8,13 +8,12 @@ import strings = require('vs/base/common/strings'); import Event, { Emitter } from 'vs/base/common/event'; import { binarySearch } from 'vs/base/common/arrays'; import URI from 'vs/base/common/uri'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { IEditor } from 'vs/platform/editor/common/editor'; +import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { Registry } from 'vs/platform/registry/common/platform'; import { EditorOptions } from 'vs/workbench/common/editor'; -import { IOutputChannelIdentifier, OutputEditors, IOutputEvent, IOutputChannel, IOutputService, IOutputDelta, Extensions, OUTPUT_PANEL_ID, IOutputChannelRegistry, MAX_OUTPUT_LENGTH, OUTPUT_SCHEME, OUTPUT_MIME } from 'vs/workbench/parts/output/common/output'; +import { IOutputChannelIdentifier, OutputEditors, IOutputEvent, IOutputChannel, IOutputService, IOutputDelta, Extensions, OUTPUT_PANEL_ID, IOutputChannelRegistry, MAX_OUTPUT_LENGTH, OUTPUT_SCHEME, OUTPUT_MIME, Extensions as OutputExt } from 'vs/workbench/parts/output/common/output'; import { OutputPanel } from 'vs/workbench/parts/output/browser/outputPanel'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IModelService } from 'vs/editor/common/services/modelService'; @@ -26,6 +25,7 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { RunOnceScheduler } from 'vs/base/common/async'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; +import { IFileService, FileChangeType } from 'vs/platform/files/common/files'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; @@ -78,18 +78,161 @@ export class BufferedContent { } } +abstract class OutputChannel extends Disposable implements IOutputChannel { + + protected _onDidChange: Emitter = new Emitter(); + readonly onDidChange: Event = this._onDidChange.event; + + protected _onDispose: Emitter = new Emitter(); + readonly onDispose: Event = this._onDispose.event; + + scrollLock: boolean = false; + + constructor(private readonly oputChannelIdentifier: IOutputChannelIdentifier, ) { + super(); + } + + get id(): string { + return this.oputChannelIdentifier.id; + } + + get label(): string { + return this.oputChannelIdentifier.label; + } + + show(): TPromise { return TPromise.as(null); } + hide(): void { } + append(output: string) { /** noop */ } + getOutputDelta(previousDelta?: IOutputDelta): TPromise { return TPromise.as(null); } + clear(): void { } + + dispose(): void { + this._onDispose.fire(); + super.dispose(); + } + +} + +class BufferredOutputChannel extends OutputChannel implements IOutputChannel { + + private bufferredContent: BufferedContent = new BufferedContent(); + + append(output: string) { + this.bufferredContent.append(output); + this._onDidChange.fire(false); + } + + getOutputDelta(previousDelta?: IOutputDelta): TPromise { + return TPromise.as(this.bufferredContent.getDelta(previousDelta)); + } + + clear(): void { + this.bufferredContent.clear(); + this._onDidChange.fire(true); + } +} + +class FileOutputChannel extends OutputChannel implements IOutputChannel { + + private readonly file: URI; + private disposables: IDisposable[] = []; + private shown: boolean = false; + + private contentResolver: TPromise; + private startOffset: number; + private endOffset: number; + + constructor( + outputChannelIdentifier: IOutputChannelIdentifier, + @IFileService private fileService: IFileService + ) { + super(outputChannelIdentifier); + this.file = outputChannelIdentifier.file; + this.startOffset = 0; + this.endOffset = 0; + } + + show(): TPromise { + if (!this.shown) { + this.shown = true; + this.watch(); + } + return this.resolve() as TPromise; + } + + hide(): void { + if (this.shown) { + this.shown = false; + this.fileService.unwatchFileChanges(this.file); + this.disposables = dispose(this.disposables); + } + this.contentResolver = null; + } + + getOutputDelta(previousDelta?: IOutputDelta): TPromise { + if (!this.shown) { + return TPromise.as(null); + } + + return this.resolve() + .then(content => { + const startOffset = previousDelta ? previousDelta.id : this.startOffset; + this.endOffset = content.length; + if (startOffset === this.endOffset) { + return { append: true, id: this.endOffset, value: '' }; + } + if (startOffset > 0 && startOffset < this.endOffset) { + const value = content.substring(startOffset, this.endOffset); + return { append: true, value, id: this.endOffset }; + } + // replace + return { append: false, value: content, id: this.endOffset }; + }); + } + + clear(): void { + this.startOffset = this.endOffset; + this._onDidChange.fire(true); + } + + private resolve(): TPromise { + if (!this.contentResolver) { + this.contentResolver = this.fileService.resolveContent(this.file) + .then(content => content.value); + } + return this.contentResolver; + } + + private watch(): void { + this.fileService.watchFileChanges(this.file); + this.disposables.push(this.fileService.onFileChanges(changes => { + if (changes.contains(this.file, FileChangeType.UPDATED)) { + this.contentResolver = null; + this._onDidChange.fire(false); + } + })); + } + + dispose(): void { + this.contentResolver = null; + this.disposables = dispose(this.disposables); + this.hide(); + super.dispose(); + } +} + export class OutputService implements IOutputService { public _serviceBrand: any; - private receivedOutput: Map = new Map(); - private channels: Map = new Map(); - + private channels: Map = new Map(); private activeChannelId: string; - private _onOutput: Emitter; - private _onOutputChannel: Emitter; - private _onActiveOutputChannel: Emitter; + private _onOutput: Emitter = new Emitter(); + readonly onOutput: Event = this._onOutput.event; + + private _onActiveOutputChannel: Emitter = new Emitter(); + readonly onActiveOutputChannel: Event = this._onActiveOutputChannel.event; private _outputContentProvider: OutputContentProvider; private _outputPanel: OutputPanel; @@ -102,10 +245,6 @@ export class OutputService implements IOutputService { @IModelService modelService: IModelService, @ITextModelService textModelResolverService: ITextModelService ) { - this._onOutput = new Emitter(); - this._onOutputChannel = new Emitter(); - this._onActiveOutputChannel = new Emitter(); - const channels = this.getChannels(); this.activeChannelId = this.storageService.get(OUTPUT_ACTIVE_CHANNEL_KEY, StorageScope.WORKSPACE, channels && channels.length > 0 ? channels[0].id : null); @@ -115,118 +254,79 @@ export class OutputService implements IOutputService { // Register as text model content provider for output textModelResolverService.registerTextModelContentProvider(OUTPUT_SCHEME, this._outputContentProvider); + + (Registry.as(OutputExt.OutputChannels)).onDidRegisterChannel(channel => this.showActiveChannel(channel)); } - public get onOutput(): Event { - return this._onOutput.event; - } - - public get onOutputChannel(): Event { - return this._onOutputChannel.event; - } - - public get onActiveOutputChannel(): Event { - return this._onActiveOutputChannel.event; - } - - public getChannel(id: string): IOutputChannel { - if (!this.channels.has(id)) { - const channelData = Registry.as(Extensions.OutputChannels).getChannel(id); - - const self = this; - this.channels.set(id, { - id, - label: channelData ? channelData.label : id, - getOutput(before?: IOutputDelta) { - return self.getOutput(id, before); - }, - get scrollLock() { - return self._outputContentProvider.scrollLock(id); - }, - set scrollLock(value: boolean) { - self._outputContentProvider.setScrollLock(id, value); - }, - append: (output: string) => this.append(id, output), - show: (preserveFocus: boolean) => this.showOutput(id, preserveFocus), - clear: () => this.clearOutput(id), - dispose: () => this.removeOutput(id) - }); + showChannel(id: string, preserveFocus?: boolean): TPromise { + const panel = this.panelService.getActivePanel(); + if (this.activeChannelId === id && panel && panel.getId() === OUTPUT_PANEL_ID) { + return TPromise.as(null); } + if (this.activeChannelId) { + const activeChannel = this.getChannel(this.activeChannelId); + if (activeChannel) { + activeChannel.hide(); + } + } + + this.activeChannelId = id; + const activeChannel = this.getChannel(id); + return activeChannel.show() + .then(() => { + this.storageService.store(OUTPUT_ACTIVE_CHANNEL_KEY, this.activeChannelId, StorageScope.WORKSPACE); + this._onActiveOutputChannel.fire(id); // emit event that a new channel is active + + return this.panelService.openPanel(OUTPUT_PANEL_ID, !preserveFocus) + .then((outputPanel: OutputPanel) => { + this._outputPanel = outputPanel; + return outputPanel && outputPanel.setInput(OutputEditors.getInstance(this.instantiationService, this.getChannel(this.activeChannelId)), EditorOptions.create({ preserveFocus: preserveFocus })); + }); + }); + } + + getChannel(id: string): IOutputChannel { + if (!this.channels.has(id)) { + const channelData = Registry.as(Extensions.OutputChannels).getChannel(id); + const channel = channelData && channelData.file ? this.instantiationService.createInstance(FileOutputChannel, channelData) : this.instantiationService.createInstance(BufferredOutputChannel, { id: id, label: '' }); + + let disposables = []; + channel.onDidChange(isClear => this._onOutput.fire({ channelId: id, isClear }), disposables); + channel.onDispose(() => { + this.removeOutput(id); + dispose(disposables); + }, disposables); + + this.channels.set(id, channel); + } return this.channels.get(id); } - public getChannels(): IOutputChannelIdentifier[] { + getChannels(): IOutputChannelIdentifier[] { return Registry.as(Extensions.OutputChannels).getChannels(); } - private append(channelId: string, output: string): void { - - // Initialize - if (!this.receivedOutput.has(channelId)) { - this.receivedOutput.set(channelId, new BufferedContent()); - - this._onOutputChannel.fire(channelId); // emit event that we have a new channel - } - - // Store - if (output) { - const channel = this.receivedOutput.get(channelId); - channel.append(output); - } - - this._onOutput.fire({ channelId: channelId, isClear: false }); - } - - public getActiveChannel(): IOutputChannel { + getActiveChannel(): IOutputChannel { return this.getChannel(this.activeChannelId); } - private getOutput(channelId: string, previousDelta: IOutputDelta): IOutputDelta { - if (this.receivedOutput.has(channelId)) { - return this.receivedOutput.get(channelId).getDelta(previousDelta); - } - - return undefined; - } - - private clearOutput(channelId: string): void { - if (this.receivedOutput.has(channelId)) { - this.receivedOutput.get(channelId).clear(); - this._onOutput.fire({ channelId: channelId, isClear: true }); - } - } - private removeOutput(channelId: string): void { - this.receivedOutput.delete(channelId); Registry.as(Extensions.OutputChannels).removeChannel(channelId); if (this.activeChannelId === channelId) { const channels = this.getChannels(); - this.activeChannelId = channels.length ? channels[0].id : undefined; - if (this._outputPanel && this.activeChannelId) { - this._outputPanel.setInput(OutputEditors.getInstance(this.instantiationService, this.getChannel(this.activeChannelId)), EditorOptions.create({ preserveFocus: true })); + if (this._outputPanel && channels.length) { + this.showChannel(channels[0].id); + } else { + this._onActiveOutputChannel.fire(void 0); } - this._onActiveOutputChannel.fire(this.activeChannelId); } - - this._onOutputChannel.fire(channelId); } - private showOutput(channelId: string, preserveFocus?: boolean): TPromise { - const panel = this.panelService.getActivePanel(); - if (this.activeChannelId === channelId && panel && panel.getId() === OUTPUT_PANEL_ID) { - return TPromise.as(panel); + private showActiveChannel(id: string): void { + if (this.activeChannelId === id) { + this.showChannel(id); } - - this.activeChannelId = channelId; - this.storageService.store(OUTPUT_ACTIVE_CHANNEL_KEY, this.activeChannelId, StorageScope.WORKSPACE); - this._onActiveOutputChannel.fire(channelId); // emit event that a new channel is active - - return this.panelService.openPanel(OUTPUT_PANEL_ID, !preserveFocus).then((outputPanel: OutputPanel) => { - this._outputPanel = outputPanel; - return outputPanel && outputPanel.setInput(OutputEditors.getInstance(this.instantiationService, this.getChannel(this.activeChannelId)), EditorOptions.create({ preserveFocus: preserveFocus })). - then(() => outputPanel); - }); } } @@ -319,31 +419,34 @@ class OutputContentProvider implements ITextModelContentProvider { } const bufferedOutput = this.bufferedOutput.get(channel); - const newOutput = this.outputService.getChannel(channel).getOutput(bufferedOutput); - if (!newOutput) { - model.setValue(''); - return; - } - this.bufferedOutput.set(channel, newOutput); + const outputChannel = this.outputService.getChannel(channel); + outputChannel.getOutputDelta(bufferedOutput) + .then(newOutput => { + if (!newOutput) { + model.setValue(''); + return; + } + this.bufferedOutput.set(channel, newOutput); - // just fill in the full (trimmed) output if we exceed max length - if (!newOutput.append) { - model.setValue(newOutput.value); - } + // just fill in the full (trimmed) output if we exceed max length + if (!newOutput.append) { + model.setValue(newOutput.value); + } - // otherwise append - else { - const lastLine = model.getLineCount(); - const lastLineMaxColumn = model.getLineMaxColumn(lastLine); + // otherwise append + else { + const lastLine = model.getLineCount(); + const lastLineMaxColumn = model.getLineMaxColumn(lastLine); - model.applyEdits([EditOperation.insert(new Position(lastLine, lastLineMaxColumn), newOutput.value)]); - } + model.applyEdits([EditOperation.insert(new Position(lastLine, lastLineMaxColumn), newOutput.value)]); + } - if (!this.channelIdsWithScrollLock.has(channel)) { - // reveal last line - const panel = this.panelService.getActivePanel(); - (panel).revealLastLine(); - } + if (!this.channelIdsWithScrollLock.has(channel)) { + // reveal last line + const panel = this.panelService.getActivePanel(); + (panel).revealLastLine(); + } + }); } private isVisible(channel: string): boolean { @@ -365,15 +468,16 @@ class OutputContentProvider implements ITextModelContentProvider { } public provideTextContent(resource: URI): TPromise { - const output = this.outputService.getChannel(resource.fsPath).getOutput(); - const content = output ? output.value : ''; - - let codeEditorModel = this.modelService.getModel(resource); - if (!codeEditorModel) { - codeEditorModel = this.modelService.createModel(content, this.modeService.getOrCreateMode(OUTPUT_MIME), resource); - } - - return TPromise.as(codeEditorModel); + const channel = this.outputService.getChannel(resource.fsPath); + return channel.getOutputDelta() + .then(output => { + const content = output ? output.value : ''; + let codeEditorModel = this.modelService.getModel(resource); + if (!codeEditorModel) { + codeEditorModel = this.modelService.createModel(content, this.modeService.getOrCreateMode(OUTPUT_MIME), resource); + } + return codeEditorModel; + }); } public dispose(): void { diff --git a/src/vs/workbench/parts/output/common/output.ts b/src/vs/workbench/parts/output/common/output.ts index b4066e6e6be..6638949b493 100644 --- a/src/vs/workbench/parts/output/common/output.ts +++ b/src/vs/workbench/parts/output/common/output.ts @@ -5,10 +5,9 @@ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; -import Event from 'vs/base/common/event'; +import Event, { Emitter } from 'vs/base/common/event'; import { Registry } from 'vs/platform/registry/common/platform'; import { createDecorator, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IEditor } from 'vs/platform/editor/common/editor'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; import nls = require('vs/nls'); @@ -77,16 +76,16 @@ export interface IOutputService { */ getActiveChannel(): IOutputChannel; + /** + * Show the channel with the passed id. + */ + showChannel(id: string, preserveFocus?: boolean): TPromise; + /** * Allows to register on Output events. */ onOutput: Event; - /** - * Allows to register on a output channel being added or removed - */ - onOutputChannel: Event; - /** * Allows to register on active output channel change. */ @@ -121,17 +120,6 @@ export interface IOutputChannel { */ append(output: string): void; - /** - * Returns the received output content. - * If a delta is passed, returns only the content that came after the passed delta. - */ - getOutput(previousDelta?: IOutputDelta): IOutputDelta; - - /** - * Opens the output for this channel. - */ - show(preserveFocus?: boolean): TPromise; - /** * Clears all received output for this channel. */ @@ -146,14 +134,18 @@ export interface IOutputChannel { export interface IOutputChannelIdentifier { id: string; label: string; + file?: URI; } export interface IOutputChannelRegistry { + readonly onDidRegisterChannel: Event; + readonly onDidRemoveChannel: Event; + /** * Make an output channel known to the output world. */ - registerChannel(id: string, name: string): void; + registerChannel(id: string, name: string, file?: URI): void; /** * Returns the list of channels known to the output world. @@ -174,9 +166,16 @@ export interface IOutputChannelRegistry { class OutputChannelRegistry implements IOutputChannelRegistry { private channels = new Map(); - public registerChannel(id: string, label: string): void { + private _onDidRegisterChannel: Emitter = new Emitter(); + readonly onDidRegisterChannel: Event = this._onDidRegisterChannel.event; + + private _onDidRemoveChannel: Emitter = new Emitter(); + readonly onDidRemoveChannel: Event = this._onDidRemoveChannel.event; + + public registerChannel(id: string, label: string, file?: URI): void { if (!this.channels.has(id)) { - this.channels.set(id, { id, label }); + this.channels.set(id, { id, label, file }); + this._onDidRegisterChannel.fire(id); } } @@ -192,6 +191,7 @@ class OutputChannelRegistry implements IOutputChannelRegistry { public removeChannel(id: string): void { this.channels.delete(id); + this._onDidRemoveChannel.fire(id); } } diff --git a/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.ts b/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.ts index 6b499c85130..bcfefc9f74f 100644 --- a/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.ts @@ -161,7 +161,7 @@ export class ViewPickerHandler extends QuickOpenHandler { const channels = this.outputService.getChannels(); channels.forEach((channel, index) => { const outputCategory = nls.localize('channels', "Output"); - const entry = new ViewEntry(channel.label, outputCategory, () => this.outputService.getChannel(channel.id).show().done(null, errors.onUnexpectedError)); + const entry = new ViewEntry(channel.label, outputCategory, () => this.outputService.showChannel(channel.id).done(null, errors.onUnexpectedError)); viewEntries.push(entry); }); diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 3f1d2c26a6b..56180505b60 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -681,7 +681,7 @@ class TaskService implements ITaskService { } private showOutput(): void { - this._outputChannel.show(true); + this.outputService.showChannel(this._outputChannel.id, true); } private disposeTaskSystemListeners(): void { @@ -1278,7 +1278,7 @@ class TaskService implements ITaskService { this._outputChannel.append('Error: '); this._outputChannel.append(error.message); this._outputChannel.append('\n'); - this._outputChannel.show(true); + this.outputService.showChannel(this._outputChannel.id, true); } } finally { if (--counter === 0) { @@ -1616,7 +1616,7 @@ class TaskService implements ITaskService { result = true; this._outputChannel.append(line + '\n'); }); - this._outputChannel.show(true); + this.outputService.showChannel(this._outputChannel.id, true); } return result; } @@ -1748,7 +1748,7 @@ class TaskService implements ITaskService { this.messageService.show(Severity.Error, nls.localize('TaskSystem.unknownError', 'An error has occurred while running a task. See task log for details.')); } if (showOutput) { - this._outputChannel.show(true); + this.outputService.showChannel(this._outputChannel.id, true); } } diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 55f852198c0..e6c5d2bc254 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -88,7 +88,7 @@ export class TerminalTaskSystem implements ITaskSystem { } protected showOutput(): void { - this.outputChannel.show(true); + this.outputService.showChannel(this.outputChannel.id, true); } public run(task: Task, resolver: ITaskResolver, trigger: string = Triggers.command): ITaskExecuteResult { diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index 0d96212034e..70321d0cc64 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -417,7 +417,7 @@ export class ProcessTaskSystem implements ITaskSystem { } private showOutput(): void { - this.outputChannel.show(true); + this.outputService.showChannel(this.outputChannel.id, true); } private clearOutput(): void { diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index 8b75deae37f..cfe23986359 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -31,6 +31,7 @@ import 'vs/workbench/browser/actions/toggleZenMode'; import 'vs/workbench/browser/actions/toggleTabsVisibility'; import 'vs/workbench/parts/preferences/electron-browser/preferences.contribution'; import 'vs/workbench/parts/preferences/browser/keybindingsEditorContribution'; +import 'vs/workbench/parts/logs/electron-browser/logs.contribution'; import 'vs/workbench/browser/parts/quickopen/quickopen.contribution'; import 'vs/workbench/parts/quickopen/browser/quickopen.contribution'; From 407f6770fb44060b68188eccb0f541cbc9f369d1 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 13 Dec 2017 23:34:00 +0100 Subject: [PATCH 236/615] clean up --- .../workbench/parts/output/browser/outputServices.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/output/browser/outputServices.ts b/src/vs/workbench/parts/output/browser/outputServices.ts index 36a1f677632..2a6ffe90771 100644 --- a/src/vs/workbench/parts/output/browser/outputServices.ts +++ b/src/vs/workbench/parts/output/browser/outputServices.ts @@ -163,14 +163,14 @@ class FileOutputChannel extends OutputChannel implements IOutputChannel { hide(): void { if (this.shown) { this.shown = false; - this.fileService.unwatchFileChanges(this.file); - this.disposables = dispose(this.disposables); + this.unwatch(); } this.contentResolver = null; } getOutputDelta(previousDelta?: IOutputDelta): TPromise { if (!this.shown) { + // Do not return any content when not shown return TPromise.as(null); } @@ -213,9 +213,12 @@ class FileOutputChannel extends OutputChannel implements IOutputChannel { })); } - dispose(): void { - this.contentResolver = null; + private unwatch(): void { + this.fileService.unwatchFileChanges(this.file); this.disposables = dispose(this.disposables); + } + + dispose(): void { this.hide(); super.dispose(); } From e27c505a027d5f37ebe1b7849aa75bf602599537 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 13 Dec 2017 14:42:38 -0800 Subject: [PATCH 237/615] Support odd-indent sizes for jsdoc on enter rules Fixes #16075 --- extensions/typescript/src/utils/languageConfigurations.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/typescript/src/utils/languageConfigurations.ts b/extensions/typescript/src/utils/languageConfigurations.ts index ed002e9d1a8..f1553448882 100644 --- a/extensions/typescript/src/utils/languageConfigurations.ts +++ b/extensions/typescript/src/utils/languageConfigurations.ts @@ -30,16 +30,16 @@ export const jsTsLanguageConfiguration = { action: { indentAction: IndentAction.None, appendText: ' * ' } }, { // e.g. * ...| - beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/, + beforeText: /^(\t|[ ])*[ ]\*([ ]([^\*]|\*(?!\/))*)?$/, action: { indentAction: IndentAction.None, appendText: '* ' } }, { // e.g. */| - beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/, + beforeText: /^(\t|[ ])*[ ]\*\/\s*$/, action: { indentAction: IndentAction.None, removeText: 1 } }, { // e.g. *-----*/| - beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/, + beforeText: /^(\t|[ ])*[ ]\*[^/]*\*\/\s*$/, action: { indentAction: IndentAction.None, removeText: 1 } } ] From 80e73dac9b1c4d538404b960f66ce16bb0aaa7cf Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 13 Dec 2017 15:20:25 -0800 Subject: [PATCH 238/615] Use properties instead of getters for ID --- src/vs/workbench/parts/extensions/common/extensionsInput.ts | 2 +- .../parts/update/electron-browser/releaseNotesInput.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/extensions/common/extensionsInput.ts b/src/vs/workbench/parts/extensions/common/extensionsInput.ts index 79893822bf5..29665ff4263 100644 --- a/src/vs/workbench/parts/extensions/common/extensionsInput.ts +++ b/src/vs/workbench/parts/extensions/common/extensionsInput.ts @@ -13,7 +13,7 @@ import URI from 'vs/base/common/uri'; export class ExtensionsInput extends EditorInput { - static get ID() { return 'workbench.extensions.input2'; } + static ID = 'workbench.extensions.input2'; get extension(): IExtension { return this._extension; } constructor(private _extension: IExtension) { diff --git a/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts b/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts index 65be6da2398..3d4845c70be 100644 --- a/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts +++ b/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts @@ -12,7 +12,7 @@ import URI from 'vs/base/common/uri'; export class ReleaseNotesInput extends EditorInput { - static get ID() { return 'workbench.releaseNotes.input'; } + static ID = 'workbench.releaseNotes.input'; get version(): string { return this._version; } get text(): string { return this._text; } From 54707c13b534467f3f799f848f90dc81fb573634 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 13 Dec 2017 15:27:22 -0800 Subject: [PATCH 239/615] Mark static ID properties as readonly --- .../editor/contrib/hover/modesContentHover.ts | 2 +- .../contrib/quickFix/quickFixCommands.ts | 2 +- .../browser/actions/workspaceActions.ts | 18 ++--- .../browser/parts/editor/editorStatus.ts | 2 +- .../browser/parts/panel/panelActions.ts | 4 +- src/vs/workbench/electron-browser/actions.ts | 24 +++---- .../cli/electron-browser/cli.contribution.ts | 4 +- .../parts/debug/browser/debugActions.ts | 70 +++++++++---------- .../debug/browser/debugEditorModelManager.ts | 2 +- .../parts/debug/browser/debugViewlet.ts | 8 +-- .../debug/electron-browser/breakpointsView.ts | 8 +-- .../electron-browser/electronDebugActions.ts | 8 +-- .../extensions/browser/extensionsActions.ts | 58 +++++++-------- .../extensions/common/extensionsInput.ts | 2 +- .../electron-browser/extensionsActions.ts | 4 +- .../runtimeExtensionsEditor.ts | 10 +-- .../electron-browser/views/openEditorsView.ts | 6 +- .../browser/keybindingsEditorContribution.ts | 2 +- .../scm/electron-browser/scm.contribution.ts | 2 +- .../electron-browser/themes.contribution.ts | 6 +- .../electron-browser/releaseNotesInput.ts | 2 +- .../parts/update/electron-browser/update.ts | 2 +- .../page/electron-browser/welcomePage.ts | 2 +- .../editor/editorWalkThrough.ts | 2 +- 24 files changed, 125 insertions(+), 125 deletions(-) diff --git a/src/vs/editor/contrib/hover/modesContentHover.ts b/src/vs/editor/contrib/hover/modesContentHover.ts index 4e93efdcb96..195729e8a77 100644 --- a/src/vs/editor/contrib/hover/modesContentHover.ts +++ b/src/vs/editor/contrib/hover/modesContentHover.ts @@ -154,7 +154,7 @@ class ModesContentComputer implements IHoverComputer { export class ModesContentHoverWidget extends ContentHoverWidget { - static ID = 'editor.contrib.modesContentHoverWidget'; + static readonly ID = 'editor.contrib.modesContentHoverWidget'; private _messages: HoverPart[]; private _lastRange: Range; diff --git a/src/vs/editor/contrib/quickFix/quickFixCommands.ts b/src/vs/editor/contrib/quickFix/quickFixCommands.ts index 7de263a3863..ca1467b88ea 100644 --- a/src/vs/editor/contrib/quickFix/quickFixCommands.ts +++ b/src/vs/editor/contrib/quickFix/quickFixCommands.ts @@ -125,7 +125,7 @@ export class QuickFixController implements IEditorContribution { export class QuickFixAction extends EditorAction { - static Id = 'editor.action.quickFix'; + static readonly Id = 'editor.action.quickFix'; constructor() { super({ diff --git a/src/vs/workbench/browser/actions/workspaceActions.ts b/src/vs/workbench/browser/actions/workspaceActions.ts index 6364e1893d8..48530e8d5c0 100644 --- a/src/vs/workbench/browser/actions/workspaceActions.ts +++ b/src/vs/workbench/browser/actions/workspaceActions.ts @@ -30,7 +30,7 @@ import { IHistoryService } from 'vs/workbench/services/history/common/history'; export class OpenFileAction extends Action { - static ID = 'workbench.action.files.openFile'; + static readonly ID = 'workbench.action.files.openFile'; static LABEL = nls.localize('openFile', "Open File..."); constructor( @@ -50,7 +50,7 @@ export class OpenFileAction extends Action { export class OpenFolderAction extends Action { - static ID = 'workbench.action.files.openFolder'; + static readonly ID = 'workbench.action.files.openFolder'; static LABEL = nls.localize('openFolder', "Open Folder..."); constructor( @@ -70,7 +70,7 @@ export class OpenFolderAction extends Action { export class OpenFileFolderAction extends Action { - static ID = 'workbench.action.files.openFileFolder'; + static readonly ID = 'workbench.action.files.openFileFolder'; static LABEL = nls.localize('openFileFolder', "Open..."); constructor( @@ -195,7 +195,7 @@ function isUntitledWorkspace(path: string, environmentService: IEnvironmentServi export class AddRootFolderAction extends BaseWorkspacesAction { - static ID = 'workbench.action.addRootFolder'; + static readonly ID = 'workbench.action.addRootFolder'; static LABEL = nls.localize('addFolderToWorkspace', "Add Folder to Workspace..."); constructor( @@ -225,7 +225,7 @@ export class AddRootFolderAction extends BaseWorkspacesAction { export class GlobalRemoveRootFolderAction extends BaseWorkspacesAction { - static ID = 'workbench.action.removeRootFolder'; + static readonly ID = 'workbench.action.removeRootFolder'; static LABEL = nls.localize('globalRemoveFolderFromWorkspace', "Remove Folder from Workspace..."); constructor( @@ -261,7 +261,7 @@ export class GlobalRemoveRootFolderAction extends BaseWorkspacesAction { export class RemoveRootFolderAction extends Action { - static ID = 'workbench.action.removeRootFolder'; + static readonly ID = 'workbench.action.removeRootFolder'; static LABEL = nls.localize('removeFolderFromWorkspace', "Remove Folder from Workspace"); constructor( @@ -280,7 +280,7 @@ export class RemoveRootFolderAction extends Action { export class OpenFolderSettingsAction extends Action { - static ID = 'workbench.action.openFolderSettings'; + static readonly ID = 'workbench.action.openFolderSettings'; static LABEL = nls.localize('openFolderSettings', "Open Folder Settings"); constructor( @@ -302,7 +302,7 @@ export class OpenFolderSettingsAction extends Action { export class SaveWorkspaceAsAction extends BaseWorkspacesAction { - static ID = 'workbench.action.saveWorkspaceAs'; + static readonly ID = 'workbench.action.saveWorkspaceAs'; static LABEL = nls.localize('saveWorkspaceAsAction', "Save Workspace As..."); constructor( @@ -347,7 +347,7 @@ export class SaveWorkspaceAsAction extends BaseWorkspacesAction { export class OpenWorkspaceAction extends Action { - static ID = 'workbench.action.openWorkspace'; + static readonly ID = 'workbench.action.openWorkspace'; static LABEL = nls.localize('openWorkspaceAction', "Open Workspace..."); constructor( diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index 77917b92d2c..43b62efebb8 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -765,7 +765,7 @@ function isWritableBaseEditor(e: IBaseEditor): boolean { export class ShowLanguageExtensionsAction extends Action { - static ID = 'workbench.action.showLanguageExtensions'; + static readonly ID = 'workbench.action.showLanguageExtensions'; constructor( private fileExtension: string, diff --git a/src/vs/workbench/browser/parts/panel/panelActions.ts b/src/vs/workbench/browser/parts/panel/panelActions.ts index e97e283ff42..d572d7e30b8 100644 --- a/src/vs/workbench/browser/parts/panel/panelActions.ts +++ b/src/vs/workbench/browser/parts/panel/panelActions.ts @@ -18,7 +18,7 @@ import { ActivityAction } from 'vs/workbench/browser/parts/compositebar/composit import { IActivity } from 'vs/workbench/common/activity'; export class ClosePanelAction extends Action { - static ID = 'workbench.action.closePanel'; + static readonly ID = 'workbench.action.closePanel'; static LABEL = nls.localize('closePanel', "Close Panel"); constructor( @@ -35,7 +35,7 @@ export class ClosePanelAction extends Action { } export class TogglePanelAction extends Action { - static ID = 'workbench.action.togglePanel'; + static readonly ID = 'workbench.action.togglePanel'; static LABEL = nls.localize('togglePanel', "Toggle Panel"); constructor( diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 76d1c2d8e3a..09a1f974bad 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -91,7 +91,7 @@ export class CloseCurrentWindowAction extends Action { export class CloseWorkspaceAction extends Action { - static ID = 'workbench.action.closeFolder'; + static readonly ID = 'workbench.action.closeFolder'; static LABEL = nls.localize('closeWorkspace', "Close Workspace"); constructor( @@ -117,7 +117,7 @@ export class CloseWorkspaceAction extends Action { export class NewWindowAction extends Action { - static ID = 'workbench.action.newWindow'; + static readonly ID = 'workbench.action.newWindow'; static LABEL = nls.localize('newWindow', "New Window"); constructor( @@ -135,7 +135,7 @@ export class NewWindowAction extends Action { export class ToggleFullScreenAction extends Action { - static ID = 'workbench.action.toggleFullScreen'; + static readonly ID = 'workbench.action.toggleFullScreen'; static LABEL = nls.localize('toggleFullScreen', "Toggle Full Screen"); constructor(id: string, label: string, @IWindowService private windowService: IWindowService) { @@ -149,7 +149,7 @@ export class ToggleFullScreenAction extends Action { export class ToggleMenuBarAction extends Action { - static ID = 'workbench.action.toggleMenuBar'; + static readonly ID = 'workbench.action.toggleMenuBar'; static LABEL = nls.localize('toggleMenuBar', "Toggle Menu Bar"); private static readonly menuBarVisibilityKey = 'window.menuBarVisibility'; @@ -183,7 +183,7 @@ export class ToggleMenuBarAction extends Action { export class ToggleDevToolsAction extends Action { - static ID = 'workbench.action.toggleDevTools'; + static readonly ID = 'workbench.action.toggleDevTools'; static LABEL = nls.localize('toggleDevTools', "Toggle Developer Tools"); constructor(id: string, label: string, @IWindowService private windowsService: IWindowService) { @@ -558,7 +558,7 @@ export class ShowStartupPerformance extends Action { export class ReloadWindowAction extends Action { - static ID = 'workbench.action.reloadWindow'; + static readonly ID = 'workbench.action.reloadWindow'; static LABEL = nls.localize('reloadWindow', "Reload Window"); constructor( @@ -654,7 +654,7 @@ class CloseWindowAction extends Action implements IPickOpenAction { export class SwitchWindow extends BaseSwitchWindow { - static ID = 'workbench.action.switchWindow'; + static readonly ID = 'workbench.action.switchWindow'; static LABEL = nls.localize('switchWindow', "Switch Window..."); constructor( @@ -676,7 +676,7 @@ export class SwitchWindow extends BaseSwitchWindow { export class QuickSwitchWindow extends BaseSwitchWindow { - static ID = 'workbench.action.quickSwitchWindow'; + static readonly ID = 'workbench.action.quickSwitchWindow'; static LABEL = nls.localize('quickSwitchWindow', "Quick Switch Window..."); constructor( @@ -1189,7 +1189,7 @@ export class OpenTipsAndTricksUrlAction extends Action { export class ToggleSharedProcessAction extends Action { - static ID = 'workbench.action.toggleSharedProcess'; + static readonly ID = 'workbench.action.toggleSharedProcess'; static LABEL = nls.localize('toggleSharedProcess', "Toggle Shared Process"); constructor(id: string, label: string, @IWindowsService private windowsService: IWindowsService) { @@ -1687,7 +1687,7 @@ export class ConfigureLocaleAction extends Action { export class OpenLogsFolderAction extends Action { - static ID = 'workbench.action.openLogsFolder'; + static readonly ID = 'workbench.action.openLogsFolder'; static LABEL = nls.localize('openLogsFolder', "Open Logs Folder"); constructor(id: string, label: string, @@ -1704,7 +1704,7 @@ export class OpenLogsFolderAction extends Action { export class ShowLogsAction extends Action { - static ID = 'workbench.action.showLogs'; + static readonly ID = 'workbench.action.showLogs'; static LABEL = nls.localize('showLogs', "Show Logs..."); constructor(id: string, label: string, @@ -1734,7 +1734,7 @@ export class ShowLogsAction extends Action { export class SetLogLevelAction extends Action { - static ID = 'workbench.action.setLogLevel'; + static readonly ID = 'workbench.action.setLogLevel'; static LABEL = nls.localize('setLogLevel', "Set Log Level"); constructor(id: string, label: string, diff --git a/src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts b/src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts index 32a8c8227fc..af31a3e601a 100644 --- a/src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts +++ b/src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts @@ -30,7 +30,7 @@ function isAvailable(): TPromise { class InstallAction extends Action { - static ID = 'workbench.action.installCommandLine'; + static readonly ID = 'workbench.action.installCommandLine'; static LABEL = nls.localize('install', "Install '{0}' command in PATH", product.applicationName); constructor( @@ -111,7 +111,7 @@ class InstallAction extends Action { class UninstallAction extends Action { - static ID = 'workbench.action.uninstallCommandLine'; + static readonly ID = 'workbench.action.uninstallCommandLine'; static LABEL = nls.localize('uninstall', "Uninstall '{0}' command from PATH", product.applicationName); constructor( diff --git a/src/vs/workbench/parts/debug/browser/debugActions.ts b/src/vs/workbench/parts/debug/browser/debugActions.ts index 27dc78e720a..e98c1e52ab3 100644 --- a/src/vs/workbench/parts/debug/browser/debugActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugActions.ts @@ -71,7 +71,7 @@ export abstract class AbstractDebugAction extends Action { } export class ConfigureAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.configure'; + static readonly ID = 'workbench.action.debug.configure'; static LABEL = nls.localize('openLaunchJson', "Open {0}", 'launch.json'); constructor(id: string, label: string, @@ -160,7 +160,7 @@ export class StartAction extends AbstractDebugAction { } export class RunAction extends StartAction { - static ID = 'workbench.action.debug.run'; + static readonly ID = 'workbench.action.debug.run'; static LABEL = nls.localize('startWithoutDebugging', "Start Without Debugging"); protected isNoDebug(): boolean { @@ -169,7 +169,7 @@ export class RunAction extends StartAction { } export class SelectAndStartAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.selectandstart'; + static readonly ID = 'workbench.action.debug.selectandstart'; static LABEL = nls.localize('selectAndStartDebugging', "Select and Start Debugging"); constructor(id: string, label: string, @@ -190,7 +190,7 @@ export class SelectAndStartAction extends AbstractDebugAction { } export class RestartAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.restart'; + static readonly ID = 'workbench.action.debug.restart'; static LABEL = nls.localize('restartDebug', "Restart"); static RECONNECT_LABEL = nls.localize('reconnectDebug', "Reconnect"); @@ -224,7 +224,7 @@ export class RestartAction extends AbstractDebugAction { } export class StepOverAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.stepOver'; + static readonly ID = 'workbench.action.debug.stepOver'; static LABEL = nls.localize('stepOverDebug', "Step Over"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -245,7 +245,7 @@ export class StepOverAction extends AbstractDebugAction { } export class StepIntoAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.stepInto'; + static readonly ID = 'workbench.action.debug.stepInto'; static LABEL = nls.localize('stepIntoDebug', "Step Into"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -266,7 +266,7 @@ export class StepIntoAction extends AbstractDebugAction { } export class StepOutAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.stepOut'; + static readonly ID = 'workbench.action.debug.stepOut'; static LABEL = nls.localize('stepOutDebug', "Step Out"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -287,7 +287,7 @@ export class StepOutAction extends AbstractDebugAction { } export class StopAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.stop'; + static readonly ID = 'workbench.action.debug.stop'; static LABEL = nls.localize('stopDebug', "Stop"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -308,7 +308,7 @@ export class StopAction extends AbstractDebugAction { } export class DisconnectAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.disconnect'; + static readonly ID = 'workbench.action.debug.disconnect'; static LABEL = nls.localize('disconnectDebug', "Disconnect"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -326,7 +326,7 @@ export class DisconnectAction extends AbstractDebugAction { } export class ContinueAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.continue'; + static readonly ID = 'workbench.action.debug.continue'; static LABEL = nls.localize('continueDebug', "Continue"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -347,7 +347,7 @@ export class ContinueAction extends AbstractDebugAction { } export class PauseAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.pause'; + static readonly ID = 'workbench.action.debug.pause'; static LABEL = nls.localize('pauseDebug', "Pause"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -368,7 +368,7 @@ export class PauseAction extends AbstractDebugAction { } export class RestartFrameAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.restartFrame'; + static readonly ID = 'workbench.action.debug.restartFrame'; static LABEL = nls.localize('restartFrame', "Restart Frame"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -385,7 +385,7 @@ export class RestartFrameAction extends AbstractDebugAction { } export class RemoveBreakpointAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.removeBreakpoint'; + static readonly ID = 'workbench.debug.viewlet.action.removeBreakpoint'; static LABEL = nls.localize('removeBreakpoint', "Remove Breakpoint"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -399,7 +399,7 @@ export class RemoveBreakpointAction extends AbstractDebugAction { } export class RemoveAllBreakpointsAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.removeAllBreakpoints'; + static readonly ID = 'workbench.debug.viewlet.action.removeAllBreakpoints'; static LABEL = nls.localize('removeAllBreakpoints', "Remove All Breakpoints"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -418,7 +418,7 @@ export class RemoveAllBreakpointsAction extends AbstractDebugAction { } export class EnableBreakpointAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.enableBreakpoint'; + static readonly ID = 'workbench.debug.viewlet.action.enableBreakpoint'; static LABEL = nls.localize('enableBreakpoint', "Enable Breakpoint"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -431,7 +431,7 @@ export class EnableBreakpointAction extends AbstractDebugAction { } export class DisableBreakpointAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.disableBreakpoint'; + static readonly ID = 'workbench.debug.viewlet.action.disableBreakpoint'; static LABEL = nls.localize('disableBreakpoint', "Disable Breakpoint"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -444,7 +444,7 @@ export class DisableBreakpointAction extends AbstractDebugAction { } export class EnableAllBreakpointsAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.enableAllBreakpoints'; + static readonly ID = 'workbench.debug.viewlet.action.enableAllBreakpoints'; static LABEL = nls.localize('enableAllBreakpoints', "Enable All Breakpoints"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -463,7 +463,7 @@ export class EnableAllBreakpointsAction extends AbstractDebugAction { } export class DisableAllBreakpointsAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.disableAllBreakpoints'; + static readonly ID = 'workbench.debug.viewlet.action.disableAllBreakpoints'; static LABEL = nls.localize('disableAllBreakpoints', "Disable All Breakpoints"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -482,7 +482,7 @@ export class DisableAllBreakpointsAction extends AbstractDebugAction { } export class ToggleBreakpointsActivatedAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.toggleBreakpointsActivatedAction'; + static readonly ID = 'workbench.debug.viewlet.action.toggleBreakpointsActivatedAction'; static ACTIVATE_LABEL = nls.localize('activateBreakpoints', "Activate Breakpoints"); static DEACTIVATE_LABEL = nls.localize('deactivateBreakpoints', "Deactivate Breakpoints"); @@ -506,7 +506,7 @@ export class ToggleBreakpointsActivatedAction extends AbstractDebugAction { } export class ReapplyBreakpointsAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.reapplyBreakpointsAction'; + static readonly ID = 'workbench.debug.viewlet.action.reapplyBreakpointsAction'; static LABEL = nls.localize('reapplyAllBreakpoints', "Reapply All Breakpoints"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -526,7 +526,7 @@ export class ReapplyBreakpointsAction extends AbstractDebugAction { } export class AddFunctionBreakpointAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.addFunctionBreakpointAction'; + static readonly ID = 'workbench.debug.viewlet.action.addFunctionBreakpointAction'; static LABEL = nls.localize('addFunctionBreakpoint', "Add Function Breakpoint"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -546,7 +546,7 @@ export class AddFunctionBreakpointAction extends AbstractDebugAction { } export class AddConditionalBreakpointAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.addConditionalBreakpointAction'; + static readonly ID = 'workbench.debug.viewlet.action.addConditionalBreakpointAction'; static LABEL = nls.localize('addConditionalBreakpoint', "Add Conditional Breakpoint..."); constructor(id: string, label: string, @@ -565,7 +565,7 @@ export class AddConditionalBreakpointAction extends AbstractDebugAction { } export class EditConditionalBreakpointAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.editConditionalBreakpointAction'; + static readonly ID = 'workbench.debug.viewlet.action.editConditionalBreakpointAction'; static LABEL = nls.localize('editConditionalBreakpoint', "Edit Breakpoint..."); constructor(id: string, label: string, @@ -584,7 +584,7 @@ export class EditConditionalBreakpointAction extends AbstractDebugAction { export class SetValueAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.setValue'; + static readonly ID = 'workbench.debug.viewlet.action.setValue'; static LABEL = nls.localize('setValue', "Set Value"); constructor(id: string, label: string, private variable: Variable, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -607,7 +607,7 @@ export class SetValueAction extends AbstractDebugAction { export class AddWatchExpressionAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.addWatchExpression'; + static readonly ID = 'workbench.debug.viewlet.action.addWatchExpression'; static LABEL = nls.localize('addWatchExpression', "Add Expression"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -626,7 +626,7 @@ export class AddWatchExpressionAction extends AbstractDebugAction { } export class EditWatchExpressionAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.editWatchExpression'; + static readonly ID = 'workbench.debug.viewlet.action.editWatchExpression'; static LABEL = nls.localize('editWatchExpression', "Edit Expression"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -640,7 +640,7 @@ export class EditWatchExpressionAction extends AbstractDebugAction { } export class AddToWatchExpressionsAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.addToWatchExpressions'; + static readonly ID = 'workbench.debug.viewlet.action.addToWatchExpressions'; static LABEL = nls.localize('addToWatchExpressions', "Add to Watch"); constructor(id: string, label: string, private expression: IExpression, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -656,7 +656,7 @@ export class AddToWatchExpressionsAction extends AbstractDebugAction { } export class RemoveWatchExpressionAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.removeWatchExpression'; + static readonly ID = 'workbench.debug.viewlet.action.removeWatchExpression'; static LABEL = nls.localize('removeWatchExpression', "Remove Expression"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -670,7 +670,7 @@ export class RemoveWatchExpressionAction extends AbstractDebugAction { } export class RemoveAllWatchExpressionsAction extends AbstractDebugAction { - static ID = 'workbench.debug.viewlet.action.removeAllWatchExpressions'; + static readonly ID = 'workbench.debug.viewlet.action.removeAllWatchExpressions'; static LABEL = nls.localize('removeAllWatchExpressions', "Remove All Expressions"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -689,7 +689,7 @@ export class RemoveAllWatchExpressionsAction extends AbstractDebugAction { } export class ClearReplAction extends AbstractDebugAction { - static ID = 'workbench.debug.panel.action.clearReplAction'; + static readonly ID = 'workbench.debug.panel.action.clearReplAction'; static LABEL = nls.localize('clearRepl', "Clear Console"); constructor(id: string, label: string, @@ -709,7 +709,7 @@ export class ClearReplAction extends AbstractDebugAction { } export class ToggleReplAction extends TogglePanelAction { - static ID = 'workbench.debug.action.toggleRepl'; + static readonly ID = 'workbench.debug.action.toggleRepl'; static LABEL = nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'debugConsoleAction' }, 'Debug Console'); private toDispose: lifecycle.IDisposable[]; @@ -751,7 +751,7 @@ export class ToggleReplAction extends TogglePanelAction { export class FocusReplAction extends Action { - static ID = 'workbench.debug.action.focusRepl'; + static readonly ID = 'workbench.debug.action.focusRepl'; static LABEL = nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'debugFocusConsole' }, 'Focus Debug Console'); @@ -767,7 +767,7 @@ export class FocusReplAction extends Action { } export class FocusProcessAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.focusProcess'; + static readonly ID = 'workbench.action.debug.focusProcess'; static LABEL = nls.localize('focusProcess', "Focus Process"); constructor(id: string, label: string, @@ -793,7 +793,7 @@ export class FocusProcessAction extends AbstractDebugAction { // Actions used by the chakra debugger export class StepBackAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.stepBack'; + static readonly ID = 'workbench.action.debug.stepBack'; static LABEL = nls.localize('stepBackDebug', "Step Back"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { @@ -816,7 +816,7 @@ export class StepBackAction extends AbstractDebugAction { } export class ReverseContinueAction extends AbstractDebugAction { - static ID = 'workbench.action.debug.reverseContinue'; + static readonly ID = 'workbench.action.debug.reverseContinue'; static LABEL = nls.localize('reverseContinue', "Reverse"); constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) { diff --git a/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts b/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts index 010a06285ce..6f1d8608797 100644 --- a/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts +++ b/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts @@ -32,7 +32,7 @@ interface IDebugEditorModelData { const stickiness = TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges; export class DebugEditorModelManager implements IWorkbenchContribution { - static ID = 'breakpointManager'; + static readonly ID = 'breakpointManager'; private modelDataMap: Map; private toDispose: lifecycle.IDisposable[]; diff --git a/src/vs/workbench/parts/debug/browser/debugViewlet.ts b/src/vs/workbench/parts/debug/browser/debugViewlet.ts index 6107937695a..803cb32cb64 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewlet.ts @@ -138,7 +138,7 @@ export class DebugViewlet extends PersistentViewsViewlet { export class FocusVariablesViewAction extends Action { - static ID = 'workbench.debug.action.focusVariablesView'; + static readonly ID = 'workbench.debug.action.focusVariablesView'; static LABEL = nls.localize('debugFocusVariablesView', 'Focus Variables'); constructor(id: string, label: string, @@ -156,7 +156,7 @@ export class FocusVariablesViewAction extends Action { export class FocusWatchViewAction extends Action { - static ID = 'workbench.debug.action.focusWatchView'; + static readonly ID = 'workbench.debug.action.focusWatchView'; static LABEL = nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'debugFocusWatchView' }, 'Focus Watch'); constructor(id: string, label: string, @@ -174,7 +174,7 @@ export class FocusWatchViewAction extends Action { export class FocusCallStackViewAction extends Action { - static ID = 'workbench.debug.action.focusCallStackView'; + static readonly ID = 'workbench.debug.action.focusCallStackView'; static LABEL = nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'debugFocusCallStackView' }, 'Focus CallStack'); constructor(id: string, label: string, @@ -192,7 +192,7 @@ export class FocusCallStackViewAction extends Action { export class FocusBreakpointsViewAction extends Action { - static ID = 'workbench.debug.action.focusBreakpointsView'; + static readonly ID = 'workbench.debug.action.focusBreakpointsView'; static LABEL = nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'debugFocusBreakpointsView' }, 'Focus Breakpoints'); constructor(id: string, label: string, diff --git a/src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts b/src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts index 04d49976b8c..de6a551619b 100644 --- a/src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts @@ -267,7 +267,7 @@ class BreakpointsRenderer implements IRenderer { @@ -45,7 +45,7 @@ export class CopyAction extends Action { } export class CopyAllAction extends Action { - static ID = 'workbench.debug.action.copyAll'; + static readonly ID = 'workbench.debug.action.copyAll'; static LABEL = nls.localize('copyAll', "Copy All"); constructor(id: string, label: string, private tree: ITree) { @@ -69,7 +69,7 @@ export class CopyAllAction extends Action { } export class CopyStackTraceAction extends Action { - static ID = 'workbench.action.debug.copyStackTrace'; + static readonly ID = 'workbench.action.debug.copyStackTrace'; static LABEL = nls.localize('copyStackTrace', "Copy Call Stack"); public run(frame: IStackFrame): TPromise { diff --git a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts index 677b4981ba6..7fb3e677c82 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts @@ -350,7 +350,7 @@ export class DropDownMenuActionItem extends ActionItem { export class ManageExtensionAction extends Action { - static ID = 'extensions.manage'; + static readonly ID = 'extensions.manage'; private static readonly Class = 'extension-action manage'; private static readonly HideManageExtensionClass = `${ManageExtensionAction.Class} hide`; @@ -413,7 +413,7 @@ export class ManageExtensionAction extends Action { export class EnableForWorkspaceAction extends Action implements IExtensionAction { - static ID = 'extensions.enableForWorkspace'; + static readonly ID = 'extensions.enableForWorkspace'; static LABEL = localize('enableForWorkspaceAction', "Enable (Workspace)"); private disposables: IDisposable[] = []; @@ -453,7 +453,7 @@ export class EnableForWorkspaceAction extends Action implements IExtensionAction export class EnableGloballyAction extends Action implements IExtensionAction { - static ID = 'extensions.enableGlobally'; + static readonly ID = 'extensions.enableGlobally'; static LABEL = localize('enableGloballyAction', "Enable"); private disposables: IDisposable[] = []; @@ -491,7 +491,7 @@ export class EnableGloballyAction extends Action implements IExtensionAction { export class EnableAction extends Action { - static ID = 'extensions.enable'; + static readonly ID = 'extensions.enable'; private static readonly EnabledClass = 'extension-action prominent enable'; private static readonly DisabledClass = `${EnableAction.EnabledClass} disabled`; @@ -549,7 +549,7 @@ export class EnableAction extends Action { export class DisableForWorkspaceAction extends Action implements IExtensionAction { - static ID = 'extensions.disableForWorkspace'; + static readonly ID = 'extensions.disableForWorkspace'; static LABEL = localize('disableForWorkspaceAction', "Disable (Workspace)"); private disposables: IDisposable[] = []; @@ -588,7 +588,7 @@ export class DisableForWorkspaceAction extends Action implements IExtensionActio export class DisableGloballyAction extends Action implements IExtensionAction { - static ID = 'extensions.disableGlobally'; + static readonly ID = 'extensions.disableGlobally'; static LABEL = localize('disableGloballyAction', "Disable"); private disposables: IDisposable[] = []; @@ -625,7 +625,7 @@ export class DisableGloballyAction extends Action implements IExtensionAction { export class DisableAction extends Action { - static ID = 'extensions.disable'; + static readonly ID = 'extensions.disable'; private static readonly EnabledClass = 'extension-action disable'; private static readonly DisabledClass = `${DisableAction.EnabledClass} disabled`; @@ -680,7 +680,7 @@ export class DisableAction extends Action { export class CheckForUpdatesAction extends Action { - static ID = 'workbench.extensions.action.checkForUpdates'; + static readonly ID = 'workbench.extensions.action.checkForUpdates'; static LABEL = localize('checkForUpdates', "Check for Updates"); constructor( @@ -720,7 +720,7 @@ export class ToggleAutoUpdateAction extends Action { export class EnableAutoUpdateAction extends ToggleAutoUpdateAction { - static ID = 'workbench.extensions.action.enableAutoUpdate'; + static readonly ID = 'workbench.extensions.action.enableAutoUpdate'; static LABEL = localize('enableAutoUpdate', "Enable Auto Updating Extensions"); constructor( @@ -734,7 +734,7 @@ export class EnableAutoUpdateAction extends ToggleAutoUpdateAction { export class DisableAutoUpdateAction extends ToggleAutoUpdateAction { - static ID = 'workbench.extensions.action.disableAutoUpdate'; + static readonly ID = 'workbench.extensions.action.disableAutoUpdate'; static LABEL = localize('disableAutoUpdate', "Disable Auto Updating Extensions"); constructor( @@ -748,7 +748,7 @@ export class DisableAutoUpdateAction extends ToggleAutoUpdateAction { export class UpdateAllAction extends Action { - static ID = 'workbench.extensions.action.updateAllExtensions'; + static readonly ID = 'workbench.extensions.action.updateAllExtensions'; static LABEL = localize('updateAll', "Update All Extensions"); private disposables: IDisposable[] = []; @@ -899,7 +899,7 @@ export class InstallExtensionsAction extends OpenExtensionsViewletAction { export class ShowEnabledExtensionsAction extends Action { - static ID = 'workbench.extensions.action.showEnabledExtensions'; + static readonly ID = 'workbench.extensions.action.showEnabledExtensions'; static LABEL = localize('showEnabledExtensions', 'Show Enabled Extensions'); constructor( @@ -922,7 +922,7 @@ export class ShowEnabledExtensionsAction extends Action { export class ShowInstalledExtensionsAction extends Action { - static ID = 'workbench.extensions.action.showInstalledExtensions'; + static readonly ID = 'workbench.extensions.action.showInstalledExtensions'; static LABEL = localize('showInstalledExtensions', "Show Installed Extensions"); constructor( @@ -945,7 +945,7 @@ export class ShowInstalledExtensionsAction extends Action { export class ShowDisabledExtensionsAction extends Action { - static ID = 'workbench.extensions.action.showDisabledExtensions'; + static readonly ID = 'workbench.extensions.action.showDisabledExtensions'; static LABEL = localize('showDisabledExtensions', "Show Disabled Extensions"); constructor( @@ -968,7 +968,7 @@ export class ShowDisabledExtensionsAction extends Action { export class ClearExtensionsInputAction extends Action { - static ID = 'workbench.extensions.action.clearExtensionsInput'; + static readonly ID = 'workbench.extensions.action.clearExtensionsInput'; static LABEL = localize('clearExtensionsInput', "Clear Extensions Input"); private disposables: IDisposable[] = []; @@ -1004,7 +1004,7 @@ export class ClearExtensionsInputAction extends Action { export class ShowOutdatedExtensionsAction extends Action { - static ID = 'workbench.extensions.action.listOutdatedExtensions'; + static readonly ID = 'workbench.extensions.action.listOutdatedExtensions'; static LABEL = localize('showOutdatedExtensions', "Show Outdated Extensions"); constructor( @@ -1027,7 +1027,7 @@ export class ShowOutdatedExtensionsAction extends Action { export class ShowPopularExtensionsAction extends Action { - static ID = 'workbench.extensions.action.showPopularExtensions'; + static readonly ID = 'workbench.extensions.action.showPopularExtensions'; static LABEL = localize('showPopularExtensions', "Show Popular Extensions"); constructor( @@ -1050,7 +1050,7 @@ export class ShowPopularExtensionsAction extends Action { export class ShowRecommendedExtensionsAction extends Action { - static ID = 'workbench.extensions.action.showRecommendedExtensions'; + static readonly ID = 'workbench.extensions.action.showRecommendedExtensions'; static LABEL = localize('showRecommendedExtensions', "Show Recommended Extensions"); constructor( @@ -1073,7 +1073,7 @@ export class ShowRecommendedExtensionsAction extends Action { export class InstallWorkspaceRecommendedExtensionsAction extends Action { - static ID = 'workbench.extensions.action.installWorkspaceRecommendedExtensions'; + static readonly ID = 'workbench.extensions.action.installWorkspaceRecommendedExtensions'; static LABEL = localize('installWorkspaceRecommendedExtensions', "Install All Workspace Recommended Extensions"); private disposables: IDisposable[] = []; @@ -1150,7 +1150,7 @@ export class InstallWorkspaceRecommendedExtensionsAction extends Action { export class InstallRecommendedExtensionAction extends Action { - static ID = 'workbench.extensions.action.installRecommendedExtension'; + static readonly ID = 'workbench.extensions.action.installRecommendedExtension'; static LABEL = localize('installRecommendedExtension', "Install Recommended Extension"); private extensionId: string; @@ -1200,7 +1200,7 @@ export class InstallRecommendedExtensionAction extends Action { export class ShowRecommendedKeymapExtensionsAction extends Action { - static ID = 'workbench.extensions.action.showRecommendedKeymapExtensions'; + static readonly ID = 'workbench.extensions.action.showRecommendedKeymapExtensions'; static SHORT_LABEL = localize('showRecommendedKeymapExtensionsShort', "Keymaps"); constructor( @@ -1223,7 +1223,7 @@ export class ShowRecommendedKeymapExtensionsAction extends Action { export class ShowLanguageExtensionsAction extends Action { - static ID = 'workbench.extensions.action.showLanguageExtensions'; + static readonly ID = 'workbench.extensions.action.showLanguageExtensions'; static SHORT_LABEL = localize('showLanguageExtensionsShort', "Language Extensions"); constructor( @@ -1246,7 +1246,7 @@ export class ShowLanguageExtensionsAction extends Action { export class ShowAzureExtensionsAction extends Action { - static ID = 'workbench.extensions.action.showAzureExtensions'; + static readonly ID = 'workbench.extensions.action.showAzureExtensions'; static SHORT_LABEL = localize('showAzureExtensionsShort', "Azure Extensions"); constructor( @@ -1445,7 +1445,7 @@ export abstract class AbstractConfigureRecommendedExtensionsAction extends Actio export class ConfigureWorkspaceRecommendedExtensionsAction extends AbstractConfigureRecommendedExtensionsAction { - static ID = 'workbench.extensions.action.configureWorkspaceRecommendedExtensions'; + static readonly ID = 'workbench.extensions.action.configureWorkspaceRecommendedExtensions'; static LABEL = localize('configureWorkspaceRecommendedExtensions', "Configure Recommended Extensions (Workspace)"); private disposables: IDisposable[] = []; @@ -1486,7 +1486,7 @@ export class ConfigureWorkspaceRecommendedExtensionsAction extends AbstractConfi export class ConfigureWorkspaceFolderRecommendedExtensionsAction extends AbstractConfigureRecommendedExtensionsAction { - static ID = 'workbench.extensions.action.configureWorkspaceFolderRecommendedExtensions'; + static readonly ID = 'workbench.extensions.action.configureWorkspaceFolderRecommendedExtensions'; static LABEL = localize('configureWorkspaceFolderRecommendedExtensions', "Configure Recommended Extensions (Workspace Folder)"); private disposables: IDisposable[] = []; @@ -1555,7 +1555,7 @@ export class BuiltinStatusLabelAction extends Action { export class DisableAllAction extends Action { - static ID = 'workbench.extensions.action.disableAll'; + static readonly ID = 'workbench.extensions.action.disableAll'; static LABEL = localize('disableAll', "Disable All Installed Extensions"); private disposables: IDisposable[] = []; @@ -1585,7 +1585,7 @@ export class DisableAllAction extends Action { export class DisableAllWorkpsaceAction extends Action { - static ID = 'workbench.extensions.action.disableAllWorkspace'; + static readonly ID = 'workbench.extensions.action.disableAllWorkspace'; static LABEL = localize('disableAllWorkspace', "Disable All Installed Extensions for this Workspace"); private disposables: IDisposable[] = []; @@ -1617,7 +1617,7 @@ export class DisableAllWorkpsaceAction extends Action { export class EnableAllAction extends Action { - static ID = 'workbench.extensions.action.enableAll'; + static readonly ID = 'workbench.extensions.action.enableAll'; static LABEL = localize('enableAll', "Enable All Installed Extensions"); private disposables: IDisposable[] = []; @@ -1648,7 +1648,7 @@ export class EnableAllAction extends Action { export class EnableAllWorkpsaceAction extends Action { - static ID = 'workbench.extensions.action.enableAllWorkspace'; + static readonly ID = 'workbench.extensions.action.enableAllWorkspace'; static LABEL = localize('enableAllWorkspace', "Enable All Installed Extensions for this Workspace"); private disposables: IDisposable[] = []; diff --git a/src/vs/workbench/parts/extensions/common/extensionsInput.ts b/src/vs/workbench/parts/extensions/common/extensionsInput.ts index 29665ff4263..02f28094501 100644 --- a/src/vs/workbench/parts/extensions/common/extensionsInput.ts +++ b/src/vs/workbench/parts/extensions/common/extensionsInput.ts @@ -13,7 +13,7 @@ import URI from 'vs/base/common/uri'; export class ExtensionsInput extends EditorInput { - static ID = 'workbench.extensions.input2'; + static readonly ID = 'workbench.extensions.input2'; get extension(): IExtension { return this._extension; } constructor(private _extension: IExtension) { diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts index 386bc71bc41..f4c1b8f3578 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts @@ -20,7 +20,7 @@ import { mnemonicButtonLabel } from 'vs/base/common/labels'; export class OpenExtensionsFolderAction extends Action { - static ID = 'workbench.extensions.action.openExtensionsFolder'; + static readonly ID = 'workbench.extensions.action.openExtensionsFolder'; static LABEL = localize('openExtensionsFolder', "Open Extensions Folder"); constructor( @@ -51,7 +51,7 @@ export class OpenExtensionsFolderAction extends Action { export class InstallVSIXAction extends Action { - static ID = 'workbench.extensions.action.installVSIX'; + static readonly ID = 'workbench.extensions.action.installVSIX'; static LABEL = localize('installVSIX', "Install from VSIX..."); constructor( diff --git a/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts b/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts index e5c470065c3..fe50f9bbe7b 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts @@ -413,7 +413,7 @@ export class RuntimeExtensionsEditor extends BaseEditor { export class RuntimeExtensionsInput extends EditorInput { - static ID = 'workbench.runtimeExtensions.input'; + static readonly ID = 'workbench.runtimeExtensions.input'; constructor() { super(); @@ -451,7 +451,7 @@ export class RuntimeExtensionsInput extends EditorInput { } export class ShowRuntimeExtensionsAction extends Action { - static ID = 'workbench.action.showRuntimeExtensions'; + static readonly ID = 'workbench.action.showRuntimeExtensions'; static LABEL = nls.localize('showRuntimeExtensions', "Show Running Extensions"); constructor( @@ -468,7 +468,7 @@ export class ShowRuntimeExtensionsAction extends Action { } class ReportExtensionIssueAction extends Action { - static ID = 'workbench.extensions.action.reportExtensionIssue'; + static readonly ID = 'workbench.extensions.action.reportExtensionIssue'; static LABEL = nls.localize('reportExtensionIssue', "Report Issue"); constructor( @@ -506,7 +506,7 @@ class ReportExtensionIssueAction extends Action { } class ExtensionHostProfileAction extends Action { - static ID = 'workbench.extensions.action.extensionHostProfile'; + static readonly ID = 'workbench.extensions.action.extensionHostProfile'; static LABEL_START = nls.localize('extensionHostProfileStart', "Start Extension Host Profile"); static LABEL_STOP = nls.localize('extensionHostProfileStop', "Stop Extension Host Profile"); static STOP_CSS_CLASS = 'extension-host-profile-stop'; @@ -549,7 +549,7 @@ class ExtensionHostProfileAction extends Action { class SaveExtensionHostProfileAction extends Action { static LABEL = nls.localize('saveExtensionHostProfile', "Save Extension Host Profile"); - static ID = 'workbench.extensions.action.saveExtensionHostProfile'; + static readonly ID = 'workbench.extensions.action.saveExtensionHostProfile'; constructor( id: string = SaveExtensionHostProfileAction.ID, label: string = SaveExtensionHostProfileAction.LABEL, diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index 04ef95b9a05..72b399f6713 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -47,7 +47,7 @@ export class OpenEditorsView extends ViewsViewletPanel { private static readonly DEFAULT_VISIBLE_OPEN_EDITORS = 9; private static readonly DEFAULT_DYNAMIC_HEIGHT = true; - static ID = 'workbench.explorer.openEditorsView'; + static readonly ID = 'workbench.explorer.openEditorsView'; static NAME = nls.localize({ key: 'openEditors', comment: ['Open is an adjective'] }, "Open Editors"); private model: IEditorStacksModel; @@ -413,7 +413,7 @@ class OpenEditorsDelegate implements IDelegate { } class EditorGroupRenderer implements IRenderer { - static ID = 'editorgroup'; + static readonly ID = 'editorgroup'; constructor( private keybindingService: IKeybindingService, @@ -478,7 +478,7 @@ class EditorGroupRenderer implements IRenderer { - static ID = 'openeditor'; + static readonly ID = 'openeditor'; public static DRAGGED_OPEN_EDITOR: OpenEditor; constructor( diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts index c6ab6b76c58..0d636ad01ed 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts @@ -356,7 +356,7 @@ export class KeybindingEditorDecorationsRenderer extends Disposable { class DefineKeybindingCommand extends EditorCommand { - static ID = 'editor.action.defineKeybinding'; + static readonly ID = 'editor.action.defineKeybinding'; constructor() { super({ diff --git a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts index bce5b81ee3c..646fe879453 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -23,7 +23,7 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v class OpenSCMViewletAction extends ToggleViewletAction { - static ID = VIEWLET_ID; + static readonly ID = VIEWLET_ID; static LABEL = localize('toggleGitViewlet', "Show Git"); constructor(id: string, label: string, @IViewletService viewletService: IViewletService, @IWorkbenchEditorService editorService: IWorkbenchEditorService) { diff --git a/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts b/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts index bcc8babb008..11334a526a4 100644 --- a/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts +++ b/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts @@ -28,7 +28,7 @@ import { LIGHT, DARK, HIGH_CONTRAST } from 'vs/platform/theme/common/themeServic export class SelectColorThemeAction extends Action { - static ID = 'workbench.action.selectTheme'; + static readonly ID = 'workbench.action.selectTheme'; static LABEL = localize('selectTheme.label', "Color Theme"); constructor( @@ -87,7 +87,7 @@ export class SelectColorThemeAction extends Action { class SelectIconThemeAction extends Action { - static ID = 'workbench.action.selectIconTheme'; + static readonly ID = 'workbench.action.selectIconTheme'; static LABEL = localize('selectIconTheme.label', "File Icon Theme"); constructor( @@ -171,7 +171,7 @@ function toEntries(themes: (IColorTheme | IFileIconTheme)[], label?: string, bor class GenerateColorThemeAction extends Action { - static ID = 'workbench.action.generateColorTheme'; + static readonly ID = 'workbench.action.generateColorTheme'; static LABEL = localize('generateColorTheme.label', "Generate Color Theme From Current Settings"); constructor( diff --git a/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts b/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts index 3d4845c70be..7be415c613b 100644 --- a/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts +++ b/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts @@ -12,7 +12,7 @@ import URI from 'vs/base/common/uri'; export class ReleaseNotesInput extends EditorInput { - static ID = 'workbench.releaseNotes.input'; + static readonly ID = 'workbench.releaseNotes.input'; get version(): string { return this._version; } get text(): string { return this._text; } diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index 82166e122cd..9e966fd3c70 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -165,7 +165,7 @@ export class ShowReleaseNotesAction extends AbstractShowReleaseNotesAction { export class ShowCurrentReleaseNotesAction extends AbstractShowReleaseNotesAction { - static ID = 'update.showCurrentReleaseNotes'; + static readonly ID = 'update.showCurrentReleaseNotes'; static LABEL = nls.localize('showReleaseNotes', "Show Release Notes"); constructor( diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 5be0939632b..56ccc4ee28c 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -585,7 +585,7 @@ function stripVersion(id: string): string { export class WelcomeInputFactory implements IEditorInputFactory { - static ID = welcomeInputTypeId; + static readonly ID = welcomeInputTypeId; public serialize(editorInput: EditorInput): string { return '{}'; diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.ts index 2cf12e99052..2db9e8bf0af 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.ts @@ -47,7 +47,7 @@ export class EditorWalkThroughAction extends Action { export class EditorWalkThroughInputFactory implements IEditorInputFactory { - static ID = typeId; + static readonly ID = typeId; public serialize(editorInput: EditorInput): string { return '{}'; From 58d5fbac279515473cdcb5907299b5e05d5f160c Mon Sep 17 00:00:00 2001 From: Shobhit Chittora Date: Thu, 14 Dec 2017 12:02:56 +0530 Subject: [PATCH 240/615] Adding test for integrated terminal font-size overflow Fixes #37455 Refs #37636 --- .../electron-browser/terminalConfigHelper.test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts index 7ef4320a57b..caef93152b9 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts @@ -104,6 +104,21 @@ suite('Workbench - TerminalConfigHelper', () => { configHelper.panelContainer = fixture; assert.equal(configHelper.getFont().fontSize, 6, 'The minimum terminal font size should be used when terminal.integrated.fontSize less than it'); + configurationService = new MockConfigurationService({ + editor: { + fontFamily: 'foo' + }, + terminal: { + integrated: { + fontFamily: 0, + fontSize: 1500 + } + } + }); + configHelper = new TerminalConfigHelper(configurationService, null, null, null); + configHelper.panelContainer = fixture; + assert.equal(configHelper.getFont().fontSize, 25, 'The maximum terminal font size should be used when terminal.integrated.fontSize more than it'); + configurationService = new MockConfigurationService({ editor: { fontFamily: 'foo', From aa80eb5f9b2b98d9d30e2deffeaa6e990c4ba65c Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 14 Dec 2017 07:43:37 +0100 Subject: [PATCH 241/615] Change Language Mode doesn't search by language ID (fixes #39921) --- src/vs/workbench/browser/parts/editor/editorStatus.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index 43b62efebb8..1d1d304fae8 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -885,7 +885,7 @@ export class ChangeModeAction extends Action { picks.unshift(autoDetectMode); } - return this.quickOpenService.pick(picks, { placeHolder: nls.localize('pickLanguage', "Select Language Mode") }).then(pick => { + return this.quickOpenService.pick(picks, { placeHolder: nls.localize('pickLanguage', "Select Language Mode"), matchOnDescription: true }).then(pick => { if (!pick) { return; } From d9218265c0849a5e70f7f90c96bed55cbc8bdde3 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 13 Dec 2017 23:18:51 -0800 Subject: [PATCH 242/615] Refactoring extensionTipsService --- .../electron-browser/extensionTipsService.ts | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts index d0fc19c59fb..d1cfd482733 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts @@ -44,9 +44,6 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe private _fileBasedRecommendations: { [id: string]: number; } = Object.create(null); private _exeBasedRecommendations: { [id: string]: string; } = Object.create(null); private _availableRecommendations: { [pattern: string]: string[] } = Object.create(null); - private importantRecommendations: { [id: string]: { name: string; pattern: string; } } = Object.create(null); - private importantRecommendationsIgnoreList: string[]; - private _allRecommendations: string[] = []; private _disposables: IDisposable[] = []; private _allWorkspaceRecommendedExtensions: string[] = []; @@ -71,8 +68,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe return; } - - this._suggestTips(); + this._suggestFileBasedRecommendations(); this._suggestWorkspaceRecommendations(); // Executable based recommendations carry out a lot of file stats, so run them after 10 secs @@ -138,7 +134,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe const fileBased = Object.keys(this._fileBasedRecommendations) .sort((a, b) => { if (this._fileBasedRecommendations[a] === this._fileBasedRecommendations[b]) { - if (product.extensionImportantTips[a]) { + if (!product.extensionImportantTips || product.extensionImportantTips[a]) { return -1; } if (product.extensionImportantTips[b]) { @@ -154,19 +150,15 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe return Object.keys(this._exeBasedRecommendations); } - - getKeymapRecommendations(): string[] { return product.keymapExtensionTips || []; } - private _suggestTips() { + private _suggestFileBasedRecommendations() { const extensionTips = product.extensionTips; if (!extensionTips) { return; } - this.importantRecommendations = product.extensionImportantTips || Object.create(null); - this.importantRecommendationsIgnoreList = JSON.parse(this.storageService.get('extensionsAssistant/importantRecommendationsIgnore', StorageScope.GLOBAL, '[]')); // group ids by pattern, like {**/*.md} -> [ext.foo1, ext.bar2] this._availableRecommendations = Object.create(null); @@ -191,8 +183,9 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe } }); + const allRecommendations = []; forEach(this._availableRecommendations, ({ value: ids }) => { - this._allRecommendations.push(...ids); + allRecommendations.push(...ids); }); // retrieve ids of previous recommendations @@ -200,7 +193,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe if (Array.isArray(storedRecommendationsJson)) { for (let id of storedRecommendationsJson) { - if (this._allRecommendations.indexOf(id) > -1) { + if (allRecommendations.indexOf(id) > -1) { this._fileBasedRecommendations[id] = Date.now(); } } @@ -209,7 +202,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe forEach(storedRecommendationsJson, entry => { if (typeof entry.value === 'number') { const diff = (now - entry.value) / milliSecondsInADay; - if (diff <= 7 && this._allRecommendations.indexOf(entry.key) > -1) { + if (diff <= 7 && allRecommendations.indexOf(entry.key) > -1) { this._fileBasedRecommendations[entry.key] = entry.value; } } @@ -248,17 +241,18 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe ); const config = this.configurationService.getValue(ConfigurationKey); + const importantRecommendationsIgnoreList = JSON.parse(this.storageService.get('extensionsAssistant/importantRecommendationsIgnore', StorageScope.GLOBAL, '[]')); - if (config.ignoreRecommendations) { + if (config.ignoreRecommendations || !product.extensionImportantTips) { return; } this.extensionsService.getInstalled(LocalExtensionType.User).done(local => { - Object.keys(this.importantRecommendations) - .filter(id => this.importantRecommendationsIgnoreList.indexOf(id) === -1) + Object.keys(product.extensionImportantTips) + .filter(id => importantRecommendationsIgnoreList.indexOf(id) === -1) .filter(id => local.every(local => `${local.manifest.publisher}.${local.manifest.name}` !== id)) .forEach(id => { - const { pattern, name } = this.importantRecommendations[id]; + const { pattern, name } = product.extensionImportantTips[id]; if (!match(pattern, uri.fsPath)) { return; @@ -299,10 +293,10 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe */ this.telemetryService.publicLog('extensionRecommendations:popup', { userReaction: 'show', extensionId: name }); return recommendationsAction.run(); - case 2: this.importantRecommendationsIgnoreList.push(id); + case 2: importantRecommendationsIgnoreList.push(id); this.storageService.store( 'extensionsAssistant/importantRecommendationsIgnore', - JSON.stringify(this.importantRecommendationsIgnoreList), + JSON.stringify(importantRecommendationsIgnoreList), StorageScope.GLOBAL ); /* __GDPR__ From e20f08b291880a0bd0b2af70acbd16abca03627e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 14 Dec 2017 10:16:27 +0100 Subject: [PATCH 243/615] a little language features, #40169 --- src/vs/workbench/api/node/extHost.protocol.ts | 40 ++++----- .../api/node/extHostLanguageFeatures.ts | 82 +++++++++---------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index b9494a65b71..a0b316029b2 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -568,31 +568,31 @@ export type IWorkspaceSymbol = IdObject & modes.SymbolInformation; export interface IWorkspaceSymbols extends IdObject { symbols: IWorkspaceSymbol[]; } export interface ExtHostLanguageFeaturesShape { - $provideDocumentSymbols(handle: number, resource: URI): TPromise; - $provideCodeLenses(handle: number, resource: URI): TPromise; - $resolveCodeLens(handle: number, resource: URI, symbol: modes.ICodeLensSymbol): TPromise; - $provideDefinition(handle: number, resource: URI, position: IPosition): TPromise; - $provideImplementation(handle: number, resource: URI, position: IPosition): TPromise; - $provideTypeDefinition(handle: number, resource: URI, position: IPosition): TPromise; - $provideHover(handle: number, resource: URI, position: IPosition): TPromise; - $provideDocumentHighlights(handle: number, resource: URI, position: IPosition): TPromise; - $provideReferences(handle: number, resource: URI, position: IPosition, context: modes.ReferenceContext): TPromise; - $provideCodeActions(handle: number, resource: URI, range: IRange): TPromise; - $provideDocumentFormattingEdits(handle: number, resource: URI, options: modes.FormattingOptions): TPromise; - $provideDocumentRangeFormattingEdits(handle: number, resource: URI, range: IRange, options: modes.FormattingOptions): TPromise; - $provideOnTypeFormattingEdits(handle: number, resource: URI, position: IPosition, ch: string, options: modes.FormattingOptions): TPromise; + $provideDocumentSymbols(handle: number, resource: UriComponents): TPromise; + $provideCodeLenses(handle: number, resource: UriComponents): TPromise; + $resolveCodeLens(handle: number, resource: UriComponents, symbol: modes.ICodeLensSymbol): TPromise; + $provideDefinition(handle: number, resource: UriComponents, position: IPosition): TPromise; + $provideImplementation(handle: number, resource: UriComponents, position: IPosition): TPromise; + $provideTypeDefinition(handle: number, resource: UriComponents, position: IPosition): TPromise; + $provideHover(handle: number, resource: UriComponents, position: IPosition): TPromise; + $provideDocumentHighlights(handle: number, resource: UriComponents, position: IPosition): TPromise; + $provideReferences(handle: number, resource: UriComponents, position: IPosition, context: modes.ReferenceContext): TPromise; + $provideCodeActions(handle: number, resource: UriComponents, range: IRange): TPromise; + $provideDocumentFormattingEdits(handle: number, resource: UriComponents, options: modes.FormattingOptions): TPromise; + $provideDocumentRangeFormattingEdits(handle: number, resource: UriComponents, range: IRange, options: modes.FormattingOptions): TPromise; + $provideOnTypeFormattingEdits(handle: number, resource: UriComponents, position: IPosition, ch: string, options: modes.FormattingOptions): TPromise; $provideWorkspaceSymbols(handle: number, search: string): TPromise; $resolveWorkspaceSymbol(handle: number, symbol: modes.SymbolInformation): TPromise; $releaseWorkspaceSymbols(handle: number, id: number): void; - $provideRenameEdits(handle: number, resource: URI, position: IPosition, newName: string): TPromise; - $provideCompletionItems(handle: number, resource: URI, position: IPosition, context: modes.SuggestContext): TPromise; - $resolveCompletionItem(handle: number, resource: URI, position: IPosition, suggestion: modes.ISuggestion): TPromise; + $provideRenameEdits(handle: number, resource: UriComponents, position: IPosition, newName: string): TPromise; + $provideCompletionItems(handle: number, resource: UriComponents, position: IPosition, context: modes.SuggestContext): TPromise; + $resolveCompletionItem(handle: number, resource: UriComponents, position: IPosition, suggestion: modes.ISuggestion): TPromise; $releaseCompletionItems(handle: number, id: number): void; - $provideSignatureHelp(handle: number, resource: URI, position: IPosition): TPromise; - $provideDocumentLinks(handle: number, resource: URI): TPromise; + $provideSignatureHelp(handle: number, resource: UriComponents, position: IPosition): TPromise; + $provideDocumentLinks(handle: number, resource: UriComponents): TPromise; $resolveDocumentLink(handle: number, link: modes.ILink): TPromise; - $provideDocumentColors(handle: number, resource: URI): TPromise; - $provideColorPresentations(handle: number, resource: URI, colorInfo: IRawColorInfo): TPromise; + $provideDocumentColors(handle: number, resource: UriComponents): TPromise; + $provideColorPresentations(handle: number, resource: UriComponents, colorInfo: IRawColorInfo): TPromise; } export interface ExtHostQuickOpenShape { diff --git a/src/vs/workbench/api/node/extHostLanguageFeatures.ts b/src/vs/workbench/api/node/extHostLanguageFeatures.ts index 65dc86d171d..805b3284833 100644 --- a/src/vs/workbench/api/node/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/node/extHostLanguageFeatures.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { mixin } from 'vs/base/common/objects'; import * as vscode from 'vscode'; @@ -835,8 +835,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideDocumentSymbols(handle: number, resource: URI): TPromise { - return this._withAdapter(handle, OutlineAdapter, adapter => adapter.provideDocumentSymbols(resource)); + $provideDocumentSymbols(handle: number, resource: UriComponents): TPromise { + return this._withAdapter(handle, OutlineAdapter, adapter => adapter.provideDocumentSymbols(URI.revive(resource))); } // --- code lens @@ -857,12 +857,12 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return result; } - $provideCodeLenses(handle: number, resource: URI): TPromise { - return this._withAdapter(handle, CodeLensAdapter, adapter => adapter.provideCodeLenses(resource)); + $provideCodeLenses(handle: number, resource: UriComponents): TPromise { + return this._withAdapter(handle, CodeLensAdapter, adapter => adapter.provideCodeLenses(URI.revive(resource))); } - $resolveCodeLens(handle: number, resource: URI, symbol: modes.ICodeLensSymbol): TPromise { - return this._withAdapter(handle, CodeLensAdapter, adapter => adapter.resolveCodeLens(resource, symbol)); + $resolveCodeLens(handle: number, resource: UriComponents, symbol: modes.ICodeLensSymbol): TPromise { + return this._withAdapter(handle, CodeLensAdapter, adapter => adapter.resolveCodeLens(URI.revive(resource), symbol)); } // --- declaration @@ -874,8 +874,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideDefinition(handle: number, resource: URI, position: IPosition): TPromise { - return this._withAdapter(handle, DefinitionAdapter, adapter => adapter.provideDefinition(resource, position)); + $provideDefinition(handle: number, resource: UriComponents, position: IPosition): TPromise { + return this._withAdapter(handle, DefinitionAdapter, adapter => adapter.provideDefinition(URI.revive(resource), position)); } registerImplementationProvider(selector: vscode.DocumentSelector, provider: vscode.ImplementationProvider): vscode.Disposable { @@ -885,8 +885,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideImplementation(handle: number, resource: URI, position: IPosition): TPromise { - return this._withAdapter(handle, ImplementationAdapter, adapter => adapter.provideImplementation(resource, position)); + $provideImplementation(handle: number, resource: UriComponents, position: IPosition): TPromise { + return this._withAdapter(handle, ImplementationAdapter, adapter => adapter.provideImplementation(URI.revive(resource), position)); } registerTypeDefinitionProvider(selector: vscode.DocumentSelector, provider: vscode.TypeDefinitionProvider): vscode.Disposable { @@ -896,8 +896,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideTypeDefinition(handle: number, resource: URI, position: IPosition): TPromise { - return this._withAdapter(handle, TypeDefinitionAdapter, adapter => adapter.provideTypeDefinition(resource, position)); + $provideTypeDefinition(handle: number, resource: UriComponents, position: IPosition): TPromise { + return this._withAdapter(handle, TypeDefinitionAdapter, adapter => adapter.provideTypeDefinition(URI.revive(resource), position)); } // --- extra info @@ -909,8 +909,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideHover(handle: number, resource: URI, position: IPosition): TPromise { - return this._withAdapter(handle, HoverAdapter, adpater => adpater.provideHover(resource, position)); + $provideHover(handle: number, resource: UriComponents, position: IPosition): TPromise { + return this._withAdapter(handle, HoverAdapter, adpater => adpater.provideHover(URI.revive(resource), position)); } // --- occurrences @@ -922,8 +922,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideDocumentHighlights(handle: number, resource: URI, position: IPosition): TPromise { - return this._withAdapter(handle, DocumentHighlightAdapter, adapter => adapter.provideDocumentHighlights(resource, position)); + $provideDocumentHighlights(handle: number, resource: UriComponents, position: IPosition): TPromise { + return this._withAdapter(handle, DocumentHighlightAdapter, adapter => adapter.provideDocumentHighlights(URI.revive(resource), position)); } // --- references @@ -935,8 +935,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideReferences(handle: number, resource: URI, position: IPosition, context: modes.ReferenceContext): TPromise { - return this._withAdapter(handle, ReferenceAdapter, adapter => adapter.provideReferences(resource, position, context)); + $provideReferences(handle: number, resource: UriComponents, position: IPosition, context: modes.ReferenceContext): TPromise { + return this._withAdapter(handle, ReferenceAdapter, adapter => adapter.provideReferences(URI.revive(resource), position, context)); } // --- quick fix @@ -948,8 +948,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideCodeActions(handle: number, resource: URI, range: IRange): TPromise { - return this._withAdapter(handle, CodeActionAdapter, adapter => adapter.provideCodeActions(resource, range)); + $provideCodeActions(handle: number, resource: UriComponents, range: IRange): TPromise { + return this._withAdapter(handle, CodeActionAdapter, adapter => adapter.provideCodeActions(URI.revive(resource), range)); } // --- formatting @@ -961,8 +961,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideDocumentFormattingEdits(handle: number, resource: URI, options: modes.FormattingOptions): TPromise { - return this._withAdapter(handle, DocumentFormattingAdapter, adapter => adapter.provideDocumentFormattingEdits(resource, options)); + $provideDocumentFormattingEdits(handle: number, resource: UriComponents, options: modes.FormattingOptions): TPromise { + return this._withAdapter(handle, DocumentFormattingAdapter, adapter => adapter.provideDocumentFormattingEdits(URI.revive(resource), options)); } registerDocumentRangeFormattingEditProvider(selector: vscode.DocumentSelector, provider: vscode.DocumentRangeFormattingEditProvider): vscode.Disposable { @@ -972,8 +972,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideDocumentRangeFormattingEdits(handle: number, resource: URI, range: IRange, options: modes.FormattingOptions): TPromise { - return this._withAdapter(handle, RangeFormattingAdapter, adapter => adapter.provideDocumentRangeFormattingEdits(resource, range, options)); + $provideDocumentRangeFormattingEdits(handle: number, resource: UriComponents, range: IRange, options: modes.FormattingOptions): TPromise { + return this._withAdapter(handle, RangeFormattingAdapter, adapter => adapter.provideDocumentRangeFormattingEdits(URI.revive(resource), range, options)); } registerOnTypeFormattingEditProvider(selector: vscode.DocumentSelector, provider: vscode.OnTypeFormattingEditProvider, triggerCharacters: string[]): vscode.Disposable { @@ -983,8 +983,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideOnTypeFormattingEdits(handle: number, resource: URI, position: IPosition, ch: string, options: modes.FormattingOptions): TPromise { - return this._withAdapter(handle, OnTypeFormattingAdapter, adapter => adapter.provideOnTypeFormattingEdits(resource, position, ch, options)); + $provideOnTypeFormattingEdits(handle: number, resource: UriComponents, position: IPosition, ch: string, options: modes.FormattingOptions): TPromise { + return this._withAdapter(handle, OnTypeFormattingAdapter, adapter => adapter.provideOnTypeFormattingEdits(URI.revive(resource), position, ch, options)); } // --- navigate types @@ -1017,8 +1017,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideRenameEdits(handle: number, resource: URI, position: IPosition, newName: string): TPromise { - return this._withAdapter(handle, RenameAdapter, adapter => adapter.provideRenameEdits(resource, position, newName)); + $provideRenameEdits(handle: number, resource: UriComponents, position: IPosition, newName: string): TPromise { + return this._withAdapter(handle, RenameAdapter, adapter => adapter.provideRenameEdits(URI.revive(resource), position, newName)); } // --- suggestion @@ -1030,12 +1030,12 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideCompletionItems(handle: number, resource: URI, position: IPosition, context: modes.SuggestContext): TPromise { - return this._withAdapter(handle, SuggestAdapter, adapter => adapter.provideCompletionItems(resource, position, context)); + $provideCompletionItems(handle: number, resource: UriComponents, position: IPosition, context: modes.SuggestContext): TPromise { + return this._withAdapter(handle, SuggestAdapter, adapter => adapter.provideCompletionItems(URI.revive(resource), position, context)); } - $resolveCompletionItem(handle: number, resource: URI, position: IPosition, suggestion: modes.ISuggestion): TPromise { - return this._withAdapter(handle, SuggestAdapter, adapter => adapter.resolveCompletionItem(resource, position, suggestion)); + $resolveCompletionItem(handle: number, resource: UriComponents, position: IPosition, suggestion: modes.ISuggestion): TPromise { + return this._withAdapter(handle, SuggestAdapter, adapter => adapter.resolveCompletionItem(URI.revive(resource), position, suggestion)); } $releaseCompletionItems(handle: number, id: number): void { @@ -1051,8 +1051,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideSignatureHelp(handle: number, resource: URI, position: IPosition): TPromise { - return this._withAdapter(handle, SignatureHelpAdapter, adapter => adapter.provideSignatureHelp(resource, position)); + $provideSignatureHelp(handle: number, resource: UriComponents, position: IPosition): TPromise { + return this._withAdapter(handle, SignatureHelpAdapter, adapter => adapter.provideSignatureHelp(URI.revive(resource), position)); } // --- links @@ -1064,8 +1064,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideDocumentLinks(handle: number, resource: URI): TPromise { - return this._withAdapter(handle, LinkProviderAdapter, adapter => adapter.provideLinks(resource)); + $provideDocumentLinks(handle: number, resource: UriComponents): TPromise { + return this._withAdapter(handle, LinkProviderAdapter, adapter => adapter.provideLinks(URI.revive(resource))); } $resolveDocumentLink(handle: number, link: modes.ILink): TPromise { @@ -1079,12 +1079,12 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideDocumentColors(handle: number, resource: URI): TPromise { - return this._withAdapter(handle, ColorProviderAdapter, adapter => adapter.provideColors(resource)); + $provideDocumentColors(handle: number, resource: UriComponents): TPromise { + return this._withAdapter(handle, ColorProviderAdapter, adapter => adapter.provideColors(URI.revive(resource))); } - $provideColorPresentations(handle: number, resource: URI, colorInfo: IRawColorInfo): TPromise { - return this._withAdapter(handle, ColorProviderAdapter, adapter => adapter.provideColorPresentations(resource, colorInfo)); + $provideColorPresentations(handle: number, resource: UriComponents, colorInfo: IRawColorInfo): TPromise { + return this._withAdapter(handle, ColorProviderAdapter, adapter => adapter.provideColorPresentations(URI.revive(resource), colorInfo)); } // --- configuration From 2e6578fc37eb28fef042a643c5ea9a30d6579dea Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 14 Dec 2017 10:37:58 +0100 Subject: [PATCH 244/615] native json for exthost/mainthread-workspace, #40169 --- src/vs/workbench/api/node/extHost.protocol.ts | 7 +++---- src/vs/workbench/api/node/extHostWorkspace.ts | 15 ++++++++++++--- src/vs/workbench/node/extensionHostMain.ts | 5 +++-- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index a0b316029b2..9a21e4409dd 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -48,7 +48,6 @@ import { ITreeItem } from 'vs/workbench/common/views'; import { ThemeColor } from 'vs/platform/theme/common/themeService'; import { IDisposable } from 'vs/base/common/lifecycle'; import { SerializedError } from 'vs/base/common/errors'; -import { IWorkspaceFolderData } from 'vs/platform/workspace/common/workspace'; import { IStat, IFileChange } from 'vs/platform/files/common/files'; import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; @@ -68,7 +67,7 @@ export interface IEnvironment { export interface IWorkspaceData { id: string; name: string; - folders: IWorkspaceFolderData[]; + folders: { uri: UriComponents, name: string, index: number }[]; } export interface IInitData { @@ -686,7 +685,7 @@ export const MainContext = { MainThreadStorage: createMainId('MainThreadStorage'), MainThreadTelemetry: createMainId('MainThreadTelemetry'), MainThreadTerminalService: createMainId('MainThreadTerminalService'), - MainThreadWorkspace: createMainId('MainThreadWorkspace', ProxyType.CustomMarshaller), + MainThreadWorkspace: createMainId('MainThreadWorkspace'), MainThreadFileSystem: createMainId('MainThreadFileSystem'), MainThreadExtensionService: createMainId('MainThreadExtensionService'), MainThreadSCM: createMainId('MainThreadSCM', ProxyType.CustomMarshaller), @@ -715,6 +714,6 @@ export const ExtHostContext = { ExtHostTerminalService: createExtId('ExtHostTerminalService'), ExtHostSCM: createExtId('ExtHostSCM', ProxyType.CustomMarshaller), ExtHostTask: createExtId('ExtHostTask', ProxyType.CustomMarshaller), - ExtHostWorkspace: createExtId('ExtHostWorkspace', ProxyType.CustomMarshaller), + ExtHostWorkspace: createExtId('ExtHostWorkspace'), ExtHostWindow: createExtId('ExtHostWindow'), }; diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index 9423952a852..2152866058e 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -18,14 +18,23 @@ import { TernarySearchTree } from 'vs/base/common/map'; class Workspace2 extends Workspace { static fromData(data: IWorkspaceData) { - return data ? new Workspace2(data) : null; + if (!data) { + return null; + } else { + const { id, name, folders } = data; + return new Workspace2( + id, + name, + folders.map(({ uri, name, index }) => new WorkspaceFolder({ name, index, uri: URI.revive(uri) })) + ); + } } private readonly _workspaceFolders: vscode.WorkspaceFolder[] = []; private readonly _structure = TernarySearchTree.forPaths(); - private constructor(data: IWorkspaceData) { - super(data.id, data.name, data.folders.map(folder => new WorkspaceFolder(folder))); + private constructor(id: string, name: string, folders: WorkspaceFolder[]) { + super(id, name, folders); // setup the workspace folder data structure this.folders.forEach(({ name, uri, index }) => { diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index 24e02e00271..8bcaf3ad23c 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -26,6 +26,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ILogService } from 'vs/platform/log/common/log'; import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; import { RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol'; +import URI from 'vs/base/common/uri'; // const nativeExit = process.exit.bind(process); function patchProcess(allowExit: boolean) { @@ -234,7 +235,7 @@ export class ExtensionHostMain { // find exact path for (const { uri } of this._workspace.folders) { - if (await pfs.exists(join(uri.fsPath, fileName))) { + if (await pfs.exists(join(URI.revive(uri).fsPath, fileName))) { // the file was found return ( this._extensionService.activateById(extensionId, new ExtensionActivatedByEvent(true, `workspaceContains:${fileName}`)) @@ -261,7 +262,7 @@ export class ExtensionHostMain { includes[globPattern] = true; }); - const folderQueries = this._workspace.folders.map(folder => ({ folder: folder.uri })); + const folderQueries = this._workspace.folders.map(folder => ({ folder: URI.revive(folder.uri) })); const config = this._extHostConfiguration.getConfiguration('search'); const useRipgrep = config.get('useRipgrep', true); const followSymlinks = config.get('followSymlinks', true); From ad85d6bb8631860a530162e19caac27f1eae0231 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 14 Dec 2017 10:53:11 +0100 Subject: [PATCH 245/615] ExtHostDocumentsAndEditorsShape, #40169 --- .../mainThreadDocumentsAndEditors.ts | 4 ++-- src/vs/workbench/api/node/extHost.protocol.ts | 6 +++--- .../api/node/extHostDocumentsAndEditors.ts | 13 ++++++++----- .../electron-browser/api/extHostApiCommands.test.ts | 2 +- .../api/extHostDocumentSaveParticipant.test.ts | 2 +- .../api/extHostDocumentsAndEditors.test.ts | 2 +- .../api/extHostLanguageFeatures.test.ts | 2 +- .../electron-browser/api/extHostTextEditors.test.ts | 2 +- 8 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts index 186e24fd4fa..fc6880d302c 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts @@ -398,7 +398,7 @@ export class MainThreadDocumentsAndEditors { private _toModelAddData(model: IModel): IModelAddedData { return { - url: model.uri, + uri: model.uri, versionId: model.getVersionId(), lines: model.getLinesContent(), EOL: model.getEOL(), @@ -410,7 +410,7 @@ export class MainThreadDocumentsAndEditors { private _toTextEditorAddData(textEditor: MainThreadTextEditor): ITextEditorAddData { return { id: textEditor.getId(), - document: textEditor.getModel().uri, + documentUri: textEditor.getModel().uri, options: textEditor.getConfiguration(), selections: textEditor.getSelections(), editorPosition: this._findEditorPosition(textEditor) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 9a21e4409dd..211893aaf91 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -436,7 +436,7 @@ export interface ExtHostDocumentContentProvidersShape { } export interface IModelAddedData { - url: URI; + uri: UriComponents; versionId: number; lines: string[]; EOL: string; @@ -456,7 +456,7 @@ export interface ExtHostDocumentSaveParticipantShape { export interface ITextEditorAddData { id: string; - document: URI; + documentUri: UriComponents; options: IResolvedTextEditorConfiguration; selections: ISelection[]; editorPosition: EditorPosition; @@ -699,7 +699,7 @@ export const ExtHostContext = { ExtHostDiagnostics: createExtId('ExtHostDiagnostics'), ExtHostDebugService: createExtId('ExtHostDebugService', ProxyType.CustomMarshaller), ExtHostDecorations: createExtId('ExtHostDecorations'), - ExtHostDocumentsAndEditors: createExtId('ExtHostDocumentsAndEditors', ProxyType.CustomMarshaller), + ExtHostDocumentsAndEditors: createExtId('ExtHostDocumentsAndEditors'), ExtHostDocuments: createExtId('ExtHostDocuments'), ExtHostDocumentContentProviders: createExtId('ExtHostDocumentContentProviders'), ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant'), diff --git a/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts b/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts index fcba0bcaa09..b3f6f63fedc 100644 --- a/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts +++ b/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts @@ -11,6 +11,7 @@ import { ExtHostDocumentData } from './extHostDocumentData'; import { ExtHostTextEditor } from './extHostTextEditor'; import * as assert from 'assert'; import * as typeConverters from './extHostTypeConverters'; +import URI from 'vs/base/common/uri'; export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsShape { @@ -49,18 +50,19 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha if (delta.addedDocuments) { for (const data of delta.addedDocuments) { - assert.ok(!this._documents.has(data.url.toString()), `document '${data.url} already exists!'`); + const resource = URI.revive(data.uri); + assert.ok(!this._documents.has(resource.toString()), `document '${resource} already exists!'`); const documentData = new ExtHostDocumentData( this._mainContext.getProxy(MainContext.MainThreadDocuments), - data.url, + resource, data.lines, data.EOL, data.modeId, data.versionId, data.isDirty ); - this._documents.set(data.url.toString(), documentData); + this._documents.set(resource.toString(), documentData); addedDocuments.push(documentData); } } @@ -75,10 +77,11 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha if (delta.addedEditors) { for (const data of delta.addedEditors) { - assert.ok(this._documents.has(data.document.toString()), `document '${data.document}' does not exist`); + const resource = URI.revive(data.documentUri); + assert.ok(this._documents.has(resource.toString()), `document '${resource}' does not exist`); assert.ok(!this._editors.has(data.id), `editor '${data.id}' already exists!`); - const documentData = this._documents.get(data.document.toString()); + const documentData = this._documents.get(resource.toString()); const editor = new ExtHostTextEditor( this._mainContext.getProxy(MainContext.MainThreadEditors), data.id, diff --git a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts index c23c9c69e42..7bad690e32a 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts @@ -104,7 +104,7 @@ suite('ExtHostLanguageFeatureCommands', function () { isDirty: false, versionId: model.getVersionId(), modeId: model.getLanguageIdentifier().language, - url: model.uri, + uri: model.uri, lines: model.getValue().split(model.getEOL()), EOL: model.getEOL(), }] diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts index fd74eede73c..290c662d70a 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts @@ -42,7 +42,7 @@ suite('ExtHostDocumentSaveParticipant', () => { addedDocuments: [{ isDirty: false, modeId: 'foo', - url: resource, + uri: resource, versionId: 1, lines: ['foo'], EOL: '\n', diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts index cde58b49aa9..b171ace99f9 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts @@ -28,7 +28,7 @@ suite('ExtHostDocumentsAndEditors', () => { EOL: '\n', isDirty: true, modeId: 'fooLang', - url: URI.parse('foo:bar'), + uri: URI.parse('foo:bar'), versionId: 1, lines: [ 'first', diff --git a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts index c5959a51943..f5d4b48b559 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts @@ -93,7 +93,7 @@ suite('ExtHostLanguageFeatures', function () { isDirty: false, versionId: model.getVersionId(), modeId: model.getLanguageIdentifier().language, - url: model.uri, + uri: model.uri, lines: model.getValue().split(model.getEOL()), EOL: model.getEOL(), }] diff --git a/src/vs/workbench/test/electron-browser/api/extHostTextEditors.test.ts b/src/vs/workbench/test/electron-browser/api/extHostTextEditors.test.ts index 4c012a03b62..21a7692717c 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostTextEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostTextEditors.test.ts @@ -35,7 +35,7 @@ suite('ExtHostTextEditors.applyWorkspaceEdit', () => { addedDocuments: [{ isDirty: false, modeId: 'foo', - url: resource, + uri: resource, versionId: 1337, lines: ['foo'], EOL: '\n', From 804061b62392d8944ae07b5e8848b26e53000311 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 14 Dec 2017 10:55:57 +0100 Subject: [PATCH 246/615] - Dispose inputs when not used - Clean up creating input - Clean up showing channels --- .../parts/output/browser/outputPanel.ts | 18 ++++- .../parts/output/browser/outputServices.ts | 68 +++++++++++++------ .../workbench/parts/output/common/output.ts | 23 +------ 3 files changed, 63 insertions(+), 46 deletions(-) diff --git a/src/vs/workbench/parts/output/browser/outputPanel.ts b/src/vs/workbench/parts/output/browser/outputPanel.ts index aeb4863884f..ffa003b09d7 100644 --- a/src/vs/workbench/parts/output/browser/outputPanel.ts +++ b/src/vs/workbench/parts/output/browser/outputPanel.ts @@ -18,7 +18,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { EditorInput, EditorOptions } from 'vs/workbench/common/editor'; import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResourceEditor'; -import { OutputEditors, OUTPUT_PANEL_ID, IOutputService, CONTEXT_IN_OUTPUT } from 'vs/workbench/parts/output/common/output'; +import { OUTPUT_PANEL_ID, IOutputService, CONTEXT_IN_OUTPUT } from 'vs/workbench/parts/output/common/output'; import { SwitchOutputAction, SwitchOutputActionItem, ClearOutputAction, ToggleOutputScrollLockAction } from 'vs/workbench/parts/output/browser/outputActions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; @@ -101,11 +101,24 @@ export class OutputPanel extends TextResourceEditor { } public setInput(input: EditorInput, options?: EditorOptions): TPromise { + if (input.matches(this.input)) { + return TPromise.as(null); + } + + if (this.input) { + this.input.dispose(); + } return super.setInput(input, options).then(() => this.revealLastLine()); } - protected createEditor(parent: Builder): void { + public clearInput(): void { + if (this.input) { + this.input.dispose(); + } + super.clearInput(); + } + protected createEditor(parent: Builder): void { // First create the scoped instantation service and only then construct the editor using the scoped service const scopedContextKeyService = this.contextKeyService.createScoped(parent.getHTMLElement()); this.toUnbind.push(scopedContextKeyService); @@ -113,7 +126,6 @@ export class OutputPanel extends TextResourceEditor { super.createEditor(parent); CONTEXT_IN_OUTPUT.bindTo(scopedContextKeyService).set(true); - this.setInput(OutputEditors.getInstance(this.instantiationService, this.outputService.getActiveChannel()), null); } public get instantiationService(): IInstantiationService { diff --git a/src/vs/workbench/parts/output/browser/outputServices.ts b/src/vs/workbench/parts/output/browser/outputServices.ts index 2a6ffe90771..e1e2e717553 100644 --- a/src/vs/workbench/parts/output/browser/outputServices.ts +++ b/src/vs/workbench/parts/output/browser/outputServices.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import nls = require('vs/nls'); import { TPromise } from 'vs/base/common/winjs.base'; import strings = require('vs/base/common/strings'); import Event, { Emitter } from 'vs/base/common/event'; @@ -13,7 +14,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { Registry } from 'vs/platform/registry/common/platform'; import { EditorOptions } from 'vs/workbench/common/editor'; -import { IOutputChannelIdentifier, OutputEditors, IOutputEvent, IOutputChannel, IOutputService, IOutputDelta, Extensions, OUTPUT_PANEL_ID, IOutputChannelRegistry, MAX_OUTPUT_LENGTH, OUTPUT_SCHEME, OUTPUT_MIME, Extensions as OutputExt } from 'vs/workbench/parts/output/common/output'; +import { IOutputChannelIdentifier, IOutputEvent, IOutputChannel, IOutputService, IOutputDelta, Extensions, OUTPUT_PANEL_ID, IOutputChannelRegistry, MAX_OUTPUT_LENGTH, OUTPUT_SCHEME, OUTPUT_MIME } from 'vs/workbench/parts/output/common/output'; import { OutputPanel } from 'vs/workbench/parts/output/browser/outputPanel'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IModelService } from 'vs/editor/common/services/modelService'; @@ -26,6 +27,8 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; import { IFileService, FileChangeType } from 'vs/platform/files/common/files'; +import { IPanel } from 'vs/workbench/common/panel'; +import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; @@ -253,17 +256,17 @@ export class OutputService implements IOutputService { instantiationService.createInstance(OutputLinkProvider); - this._outputContentProvider = instantiationService.createInstance(OutputContentProvider, this); - // Register as text model content provider for output + this._outputContentProvider = instantiationService.createInstance(OutputContentProvider, this); textModelResolverService.registerTextModelContentProvider(OUTPUT_SCHEME, this._outputContentProvider); - (Registry.as(OutputExt.OutputChannels)).onDidRegisterChannel(channel => this.showActiveChannel(channel)); + this.onDidPanelOpen(this.panelService.getActivePanel()); + panelService.onDidPanelOpen(this.onDidPanelOpen, this); + panelService.onDidPanelClose(this.onDidPanelClose, this); } showChannel(id: string, preserveFocus?: boolean): TPromise { - const panel = this.panelService.getActivePanel(); - if (this.activeChannelId === id && panel && panel.getId() === OUTPUT_PANEL_ID) { + if (this.isChannelShown(id)) { return TPromise.as(null); } @@ -275,18 +278,8 @@ export class OutputService implements IOutputService { } this.activeChannelId = id; - const activeChannel = this.getChannel(id); - return activeChannel.show() - .then(() => { - this.storageService.store(OUTPUT_ACTIVE_CHANNEL_KEY, this.activeChannelId, StorageScope.WORKSPACE); - this._onActiveOutputChannel.fire(id); // emit event that a new channel is active - - return this.panelService.openPanel(OUTPUT_PANEL_ID, !preserveFocus) - .then((outputPanel: OutputPanel) => { - this._outputPanel = outputPanel; - return outputPanel && outputPanel.setInput(OutputEditors.getInstance(this.instantiationService, this.getChannel(this.activeChannelId)), EditorOptions.create({ preserveFocus: preserveFocus })); - }); - }); + return this.doShowChannel(id, preserveFocus) + .then(() => this._onActiveOutputChannel.fire(id)); } getChannel(id: string): IOutputChannel { @@ -314,6 +307,26 @@ export class OutputService implements IOutputService { return this.getChannel(this.activeChannelId); } + private isChannelShown(channelId: string): boolean { + const panel = this.panelService.getActivePanel(); + return panel && panel.getId() === OUTPUT_PANEL_ID && this.activeChannelId === channelId; + } + + private onDidPanelClose(panel: IPanel): void { + if (this._outputPanel && panel.getId() === OUTPUT_PANEL_ID) { + this._outputPanel.clearInput(); + } + } + + private onDidPanelOpen(panel: IPanel): void { + if (panel && panel.getId() === OUTPUT_PANEL_ID) { + this._outputPanel = this.panelService.getActivePanel(); + if (this.activeChannelId) { + this.doShowChannel(this.activeChannelId, true); + } + } + } + private removeOutput(channelId: string): void { Registry.as(Extensions.OutputChannels).removeChannel(channelId); if (this.activeChannelId === channelId) { @@ -326,10 +339,21 @@ export class OutputService implements IOutputService { } } - private showActiveChannel(id: string): void { - if (this.activeChannelId === id) { - this.showChannel(id); - } + private doShowChannel(channelId: string, preserveFocus: boolean): TPromise { + const activeChannel = this.getChannel(channelId); + return activeChannel.show() + .then(() => { + this.storageService.store(OUTPUT_ACTIVE_CHANNEL_KEY, channelId, StorageScope.WORKSPACE); + this._outputPanel.setInput(this.createInput(this.getChannel(channelId)), EditorOptions.create({ preserveFocus: preserveFocus })); + if (!preserveFocus) { + this._outputPanel.focus(); + } + }); + } + + private createInput(channel: IOutputChannel): ResourceEditorInput { + const resource = URI.from({ scheme: OUTPUT_SCHEME, path: channel.id }); + return this.instantiationService.createInstance(ResourceEditorInput, nls.localize('output', "Output"), channel ? nls.localize('channel', "for '{0}'", channel.label) : '', resource); } } diff --git a/src/vs/workbench/parts/output/common/output.ts b/src/vs/workbench/parts/output/common/output.ts index 6638949b493..802538235c2 100644 --- a/src/vs/workbench/parts/output/common/output.ts +++ b/src/vs/workbench/parts/output/common/output.ts @@ -7,10 +7,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import Event, { Emitter } from 'vs/base/common/event'; import { Registry } from 'vs/platform/registry/common/platform'; -import { createDecorator, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; -import nls = require('vs/nls'); import URI from 'vs/base/common/uri'; /** @@ -195,21 +193,4 @@ class OutputChannelRegistry implements IOutputChannelRegistry { } } -Registry.add(Extensions.OutputChannels, new OutputChannelRegistry()); - -export class OutputEditors { - - private static instances: { [channel: string]: ResourceEditorInput; } = Object.create(null); - - public static getInstance(instantiationService: IInstantiationService, channel: IOutputChannel): ResourceEditorInput { - if (OutputEditors.instances[channel.id]) { - return OutputEditors.instances[channel.id]; - } - - const resource = URI.from({ scheme: OUTPUT_SCHEME, path: channel.id }); - - OutputEditors.instances[channel.id] = instantiationService.createInstance(ResourceEditorInput, nls.localize('output', "Output"), channel ? nls.localize('channel', "for '{0}'", channel.label) : '', resource); - - return OutputEditors.instances[channel.id]; - } -} \ No newline at end of file +Registry.add(Extensions.OutputChannels, new OutputChannelRegistry()); \ No newline at end of file From fd6cdc91f45f937098fe64bfae8e0b0ab7f06f70 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 14 Dec 2017 10:59:48 +0100 Subject: [PATCH 247/615] cleanup stage/unstage submodule changes --- extensions/git/src/commands.ts | 21 ++++++++--------- extensions/git/src/model.ts | 42 ++++++++++++++++++++-------------- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index a95b2445f76..3b2d5206c5f 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -7,7 +7,7 @@ import { Uri, commands, Disposable, window, workspace, QuickPickItem, OutputChannel, Range, WorkspaceEdit, Position, LineChange, SourceControlResourceState, TextDocumentShowOptions, ViewColumn, ProgressLocation, TextEditor, CancellationTokenSource, StatusBarAlignment } from 'vscode'; import { Ref, RefType, Git, GitErrorCodes, Branch } from './git'; -import { Repository, Resource, Status, CommitOptions, ResourceGroupType } from './repository'; +import { Repository, Resource, Status, CommitOptions, ResourceGroupType, RepositoryState } from './repository'; import { Model } from './model'; import { toGitUri, fromGitUri } from './uri'; import { grep, eventToPromise, isDescendant } from './util'; @@ -181,16 +181,10 @@ export class CommandCenter { let right: Uri | undefined; if (stat && stat.isDirectory()) { - outer: - for (const repository of this.model.repositories) { - for (const submodule of repository.submodules) { - const submodulePath = path.join(repository.root, submodule.path); + const repository = this.model.getRepositoryForSubmodule(resource.resourceUri); - if (submodulePath === resource.resourceUri.fsPath) { - right = toGitUri(Uri.file(submodulePath), resource.resourceGroupType === ResourceGroupType.Index ? 'index' : 'wt', { submoduleOf: repository.root }); - break outer; - } - } + if (repository) { + right = toGitUri(resource.resourceUri, resource.resourceGroupType === ResourceGroupType.Index ? 'index' : 'wt', { submoduleOf: repository.root }); } } else { left = await this.getLeftResource(resource); @@ -1716,13 +1710,18 @@ export class CommandCenter { const isSingleResource = arg instanceof Uri; const groups = resources.reduce((result, resource) => { - const repository = this.model.getRepository(resource, true); + let repository = this.model.getRepository(resource); if (!repository) { console.warn('Could not find git repository for ', resource); return result; } + // Could it be a submodule? + if (resource.fsPath === repository.root) { + repository = this.model.getRepositoryForSubmodule(resource) || repository; + } + const tuple = result.filter(p => p.repository === repository)[0]; if (tuple) { diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 1a23c1795d2..a3861425308 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -265,19 +265,19 @@ export class Model { getRepository(sourceControl: SourceControl): Repository | undefined; getRepository(resourceGroup: SourceControlResourceGroup): Repository | undefined; - getRepository(path: string, possibleSubmoduleRoot?: boolean): Repository | undefined; - getRepository(resource: Uri, possibleSubmoduleRoot?: boolean): Repository | undefined; - getRepository(hint: any, possibleSubmoduleRoot?: boolean): Repository | undefined { - const liveRepository = this.getOpenRepository(hint, possibleSubmoduleRoot); + getRepository(path: string): Repository | undefined; + getRepository(resource: Uri): Repository | undefined; + getRepository(hint: any): Repository | undefined { + const liveRepository = this.getOpenRepository(hint); return liveRepository && liveRepository.repository; } private getOpenRepository(repository: Repository): OpenRepository | undefined; private getOpenRepository(sourceControl: SourceControl): OpenRepository | undefined; private getOpenRepository(resourceGroup: SourceControlResourceGroup): OpenRepository | undefined; - private getOpenRepository(path: string, possibleSubmoduleRoot?: boolean): OpenRepository | undefined; - private getOpenRepository(resource: Uri, possibleSubmoduleRoot?: boolean): OpenRepository | undefined; - private getOpenRepository(hint: any, possibleSubmoduleRoot?: boolean): OpenRepository | undefined { + private getOpenRepository(path: string): OpenRepository | undefined; + private getOpenRepository(resource: Uri): OpenRepository | undefined; + private getOpenRepository(hint: any): OpenRepository | undefined { if (!hint) { return undefined; } @@ -295,21 +295,15 @@ export class Model { outer: for (const liveRepository of this.openRepositories.sort((a, b) => b.repository.root.length - a.repository.root.length)) { - if (possibleSubmoduleRoot && liveRepository.repository.root === resourcePath) { - continue; - } - if (!isDescendant(liveRepository.repository.root, resourcePath)) { continue; } - if (!possibleSubmoduleRoot) { - for (const submodule of liveRepository.repository.submodules) { - const submoduleRoot = path.join(liveRepository.repository.root, submodule.path); + for (const submodule of liveRepository.repository.submodules) { + const submoduleRoot = path.join(liveRepository.repository.root, submodule.path); - if (isDescendant(submoduleRoot, resourcePath)) { - continue outer; - } + if (isDescendant(submoduleRoot, resourcePath)) { + continue outer; } } @@ -334,6 +328,20 @@ export class Model { return undefined; } + getRepositoryForSubmodule(submoduleUri: Uri): Repository | undefined { + for (const repository of this.repositories) { + for (const submodule of repository.submodules) { + const submodulePath = path.join(repository.root, submodule.path); + + if (submodulePath === submoduleUri.fsPath) { + return repository; + } + } + } + + return undefined; + } + dispose(): void { const openRepositories = [...this.openRepositories]; openRepositories.forEach(r => r.dispose()); From 35b0376c0852cc9f08b94fbf3572d05d4e4661d1 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 14 Dec 2017 11:06:19 +0100 Subject: [PATCH 248/615] ExtHostFileSystemShape, #40169 --- .../electron-browser/mainThreadFileSystem.ts | 4 +- src/vs/workbench/api/node/extHost.protocol.ts | 20 +++++----- .../workbench/api/node/extHostFileSystem.ts | 38 +++++++++---------- 3 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts b/src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts index 6234d4dd30b..acc5872827c 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts @@ -123,7 +123,9 @@ class RemoteFileSystemProvider implements IFileSystemProvider, ISearchResultProv return this._proxy.$mkdir(this._handle, resource); } readdir(resource: URI): TPromise<[URI, IStat][], any> { - return this._proxy.$readdir(this._handle, resource); + return this._proxy.$readdir(this._handle, resource).then(data => { + return data.map(tuple => <[URI, IStat]>[URI.revive(tuple[0]), tuple[1]]); + }); } rmdir(resource: URI): TPromise { return this._proxy.$rmdir(this._handle, resource); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 211893aaf91..630e378f69a 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -492,15 +492,15 @@ export interface ExtHostWorkspaceShape { } export interface ExtHostFileSystemShape { - $utimes(handle: number, resource: URI, mtime: number, atime: number): TPromise; - $stat(handle: number, resource: URI): TPromise; - $read(handle: number, offset: number, count: number, resource: URI): TPromise; - $write(handle: number, resource: URI, content: number[]): TPromise; - $unlink(handle: number, resource: URI): TPromise; - $move(handle: number, resource: URI, target: URI): TPromise; - $mkdir(handle: number, resource: URI): TPromise; - $readdir(handle: number, resource: URI): TPromise<[URI, IStat][]>; - $rmdir(handle: number, resource: URI): TPromise; + $utimes(handle: number, resource: UriComponents, mtime: number, atime: number): TPromise; + $stat(handle: number, resource: UriComponents): TPromise; + $read(handle: number, offset: number, count: number, resource: UriComponents): TPromise; + $write(handle: number, resource: UriComponents, content: number[]): TPromise; + $unlink(handle: number, resource: UriComponents): TPromise; + $move(handle: number, resource: UriComponents, target: UriComponents): TPromise; + $mkdir(handle: number, resource: UriComponents): TPromise; + $readdir(handle: number, resource: UriComponents): TPromise<[UriComponents, IStat][]>; + $rmdir(handle: number, resource: UriComponents): TPromise; $fileFiles(handle: number, session: number, query: string): TPromise; } @@ -705,7 +705,7 @@ export const ExtHostContext = { ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant'), ExtHostEditors: createExtId('ExtHostEditors', ProxyType.CustomMarshaller), ExtHostTreeViews: createExtId('ExtHostTreeViews'), - ExtHostFileSystem: createExtId('ExtHostFileSystem', ProxyType.CustomMarshaller), + ExtHostFileSystem: createExtId('ExtHostFileSystem'), ExtHostFileSystemEventService: createExtId('ExtHostFileSystemEventService'), ExtHostHeapService: createExtId('ExtHostHeapMonitor'), ExtHostLanguageFeatures: createExtId('ExtHostLanguageFeatures', ProxyType.CustomMarshaller), diff --git a/src/vs/workbench/api/node/extHostFileSystem.ts b/src/vs/workbench/api/node/extHostFileSystem.ts index b89a252b593..3cdd834d7a7 100644 --- a/src/vs/workbench/api/node/extHostFileSystem.ts +++ b/src/vs/workbench/api/node/extHostFileSystem.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { MainContext, IMainContext, ExtHostFileSystemShape, MainThreadFileSystemShape } from './extHost.protocol'; import * as vscode from 'vscode'; @@ -42,37 +42,37 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape { }; } - $utimes(handle: number, resource: URI, mtime: number, atime: number): TPromise { - return asWinJsPromise(token => this._provider.get(handle).utimes(resource, mtime, atime)); + $utimes(handle: number, resource: UriComponents, mtime: number, atime: number): TPromise { + return asWinJsPromise(token => this._provider.get(handle).utimes(URI.revive(resource), mtime, atime)); } - $stat(handle: number, resource: URI): TPromise { - return asWinJsPromise(token => this._provider.get(handle).stat(resource)); + $stat(handle: number, resource: UriComponents): TPromise { + return asWinJsPromise(token => this._provider.get(handle).stat(URI.revive(resource))); } - $read(handle: number, offset: number, count: number, resource: URI): TPromise { + $read(handle: number, offset: number, count: number, resource: UriComponents): TPromise { const progress = { report: chunk => { this._proxy.$reportFileChunk(handle, resource, [].slice.call(chunk)); } }; - return asWinJsPromise(token => this._provider.get(handle).read(resource, offset, count, progress)); + return asWinJsPromise(token => this._provider.get(handle).read(URI.revive(resource), offset, count, progress)); } - $write(handle: number, resource: URI, content: number[]): TPromise { - return asWinJsPromise(token => this._provider.get(handle).write(resource, Buffer.from(content))); + $write(handle: number, resource: UriComponents, content: number[]): TPromise { + return asWinJsPromise(token => this._provider.get(handle).write(URI.revive(resource), Buffer.from(content))); } - $unlink(handle: number, resource: URI): TPromise { - return asWinJsPromise(token => this._provider.get(handle).unlink(resource)); + $unlink(handle: number, resource: UriComponents): TPromise { + return asWinJsPromise(token => this._provider.get(handle).unlink(URI.revive(resource))); } - $move(handle: number, resource: URI, target: URI): TPromise { - return asWinJsPromise(token => this._provider.get(handle).move(resource, target)); + $move(handle: number, resource: UriComponents, target: UriComponents): TPromise { + return asWinJsPromise(token => this._provider.get(handle).move(URI.revive(resource), URI.revive(target))); } - $mkdir(handle: number, resource: URI): TPromise { - return asWinJsPromise(token => this._provider.get(handle).mkdir(resource)); + $mkdir(handle: number, resource: UriComponents): TPromise { + return asWinJsPromise(token => this._provider.get(handle).mkdir(URI.revive(resource))); } - $readdir(handle: number, resource: URI): TPromise<[URI, IStat][], any> { - return asWinJsPromise(token => this._provider.get(handle).readdir(resource)); + $readdir(handle: number, resource: UriComponents): TPromise<[UriComponents, IStat][], any> { + return asWinJsPromise(token => this._provider.get(handle).readdir(URI.revive(resource))); } - $rmdir(handle: number, resource: URI): TPromise { - return asWinJsPromise(token => this._provider.get(handle).rmdir(resource)); + $rmdir(handle: number, resource: UriComponents): TPromise { + return asWinJsPromise(token => this._provider.get(handle).rmdir(URI.revive(resource))); } $fileFiles(handle: number, session: number, query: string): TPromise { const provider = this._provider.get(handle); From 73a20e61fa2bf30a25995220f77abf2d4c35eea6 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 14 Dec 2017 11:07:35 +0100 Subject: [PATCH 249/615] ExtHostEditorsShape, #40169 --- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 630e378f69a..6ccd0a23735 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -703,7 +703,7 @@ export const ExtHostContext = { ExtHostDocuments: createExtId('ExtHostDocuments'), ExtHostDocumentContentProviders: createExtId('ExtHostDocumentContentProviders'), ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant'), - ExtHostEditors: createExtId('ExtHostEditors', ProxyType.CustomMarshaller), + ExtHostEditors: createExtId('ExtHostEditors'), ExtHostTreeViews: createExtId('ExtHostTreeViews'), ExtHostFileSystem: createExtId('ExtHostFileSystem'), ExtHostFileSystemEventService: createExtId('ExtHostFileSystemEventService'), From c84266207ae58a6d1ba51c1169086694b1f866ba Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 14 Dec 2017 11:21:27 +0100 Subject: [PATCH 250/615] revert submodule change with update command --- extensions/git/src/git.ts | 35 ++++++++++++++++++-------------- extensions/git/src/repository.ts | 21 ++++++++++++++++--- 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index bc9c120d338..8f832d258e7 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -1187,21 +1187,6 @@ export class Repository { return uniqBy(rawRemotes, remote => remote.name); } - async getSubmodules(): Promise { - const gitmodulesPath = path.join(this.root, '.gitmodules'); - - try { - const gitmodulesRaw = await readfile(gitmodulesPath, 'utf8'); - return parseGitmodules(gitmodulesRaw); - } catch (err) { - if (/ENOENT/.test(err.message)) { - return []; - } - - throw err; - } - } - async getBranch(name: string): Promise { if (name === 'HEAD') { return this.getHEAD(); @@ -1275,4 +1260,24 @@ export class Repository { return { hash: match[1], message: match[2] }; } + + async updateSubmodules(paths: string[]): Promise { + const args = ['submodule', 'update', '--', ...paths]; + await this.run(args); + } + + async getSubmodules(): Promise { + const gitmodulesPath = path.join(this.root, '.gitmodules'); + + try { + const gitmodulesRaw = await readfile(gitmodulesPath, 'utf8'); + return parseGitmodules(gitmodulesRaw); + } catch (err) { + if (/ENOENT/.test(err.message)) { + return []; + } + + throw err; + } + } } diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 9c5c07a9cc5..6b13edd659b 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -302,7 +302,8 @@ export enum Operation { Tag = 'Tag', Stash = 'Stash', CheckIgnore = 'CheckIgnore', - LSTree = 'LSTree' + LSTree = 'LSTree', + SubmoduleUpdate = 'SubmoduleUpdate' } function isReadOnly(operation: Operation): boolean { @@ -606,8 +607,18 @@ export class Repository implements Disposable { await this.run(Operation.Clean, async () => { const toClean: string[] = []; const toCheckout: string[] = []; + const submodulesToUpdate: string[] = []; resources.forEach(r => { + const fsPath = r.fsPath; + + for (const submodule of this.submodules) { + if (path.join(this.root, submodule.path) === fsPath) { + submodulesToUpdate.push(fsPath); + return; + } + } + const raw = r.toString(); const scmResource = find(this.workingTreeGroup.resourceStates, sr => sr.resourceUri.toString() === raw); @@ -618,11 +629,11 @@ export class Repository implements Disposable { switch (scmResource.type) { case Status.UNTRACKED: case Status.IGNORED: - toClean.push(r.fsPath); + toClean.push(fsPath); break; default: - toCheckout.push(r.fsPath); + toCheckout.push(fsPath); break; } }); @@ -637,6 +648,10 @@ export class Repository implements Disposable { promises.push(this.repository.checkout('', toCheckout)); } + if (submodulesToUpdate.length > 0) { + promises.push(this.repository.updateSubmodules(submodulesToUpdate)); + } + await Promise.all(promises); }); } From 7a49e546f714bf5130f4292aa4d2d8136598567b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 14 Dec 2017 11:27:24 +0100 Subject: [PATCH 251/615] Maintain clipboard metadata across editors (fixes #5639) --- .../browser/controller/textAreaHandler.ts | 62 ++++++++++++++----- 1 file changed, 45 insertions(+), 17 deletions(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 8b3888eb9ee..38ed4f83c10 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -51,6 +51,39 @@ class VisibleTextAreaData { const canUseZeroSizeTextarea = (browser.isEdgeOrIE || browser.isFirefox); +interface LocalClipboardMetadata { + lastCopiedValue: string; + isFromEmptySelection: boolean; +} + +/** + * Every time we write to the clipboard, we record a bit of extra metadata here. + * Every time we read from the cipboard, if the text matches our last written text, + * we can fetch the previous metadata. + */ +class LocalClipboardMetadataManager { + public static INSTANCE = new LocalClipboardMetadataManager(); + + private _lastState: LocalClipboardMetadata; + + constructor() { + this._lastState = null; + } + + public set(state: LocalClipboardMetadata): void { + this._lastState = state; + } + + public get(pastedText: string): LocalClipboardMetadata { + if (this._lastState && this._lastState.lastCopiedValue === pastedText) { + // match! + return this._lastState; + } + this._lastState = null; + return null; + } +} + export class TextAreaHandler extends ViewPart { private readonly _viewController: ViewController; @@ -70,8 +103,6 @@ export class TextAreaHandler extends ViewPart { */ private _visibleTextArea: VisibleTextAreaData; private _selections: Selection[]; - private _lastCopiedValue: string; - private _lastCopiedValueIsFromEmptySelection: boolean; public readonly textArea: FastDomNode; public readonly textAreaCover: FastDomNode; @@ -97,8 +128,6 @@ export class TextAreaHandler extends ViewPart { this._visibleTextArea = null; this._selections = [new Selection(1, 1, 1, 1)]; - this._lastCopiedValue = null; - this._lastCopiedValueIsFromEmptySelection = false; // Text Area (The focus will always be in the textarea when the cursor is blinking) this.textArea = createFastDomNode(document.createElement('textarea')); @@ -134,18 +163,15 @@ export class TextAreaHandler extends ViewPart { getPlainTextToCopy: (): string => { const whatToCopy = this._context.model.getPlainTextToCopy(this._selections, this._emptySelectionClipboard); - if (this._emptySelectionClipboard) { - if (browser.isFirefox) { - // When writing "LINE\r\n" to the clipboard and then pasting, - // Firefox pastes "LINE\n", so let's work around this quirk - this._lastCopiedValue = whatToCopy.replace(/\r\n/g, '\n'); - } else { - this._lastCopiedValue = whatToCopy; - } + // When writing "LINE\r\n" to the clipboard and then pasting, + // Firefox pastes "LINE\n", so let's work around this quirk + const lastCopiedValue = (browser.isFirefox ? whatToCopy.replace(/\r\n/g, '\n') : whatToCopy); + const metadata: LocalClipboardMetadata = { + lastCopiedValue: lastCopiedValue, + isFromEmptySelection: (this._emptySelectionClipboard && this._selections.length === 1 && this._selections[0].isEmpty()) + }; - let selections = this._selections; - this._lastCopiedValueIsFromEmptySelection = (selections.length === 1 && selections[0].isEmpty()); - } + LocalClipboardMetadataManager.INSTANCE.set(metadata); return whatToCopy; }, @@ -199,9 +225,11 @@ export class TextAreaHandler extends ViewPart { })); this._register(this._textAreaInput.onPaste((e: IPasteData) => { + const metadata = LocalClipboardMetadataManager.INSTANCE.get(e.text); + let pasteOnNewLine = false; - if (this._emptySelectionClipboard) { - pasteOnNewLine = (e.text === this._lastCopiedValue && this._lastCopiedValueIsFromEmptySelection); + if (metadata) { + pasteOnNewLine = (this._emptySelectionClipboard && metadata.isFromEmptySelection); } this._viewController.paste('keyboard', e.text, pasteOnNewLine); })); From 67c706147b2bd736a4e0fac33dd737ffc401ff23 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 14 Dec 2017 11:41:22 +0100 Subject: [PATCH 252/615] clean up --- .../parts/output/browser/outputServices.ts | 49 ++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/src/vs/workbench/parts/output/browser/outputServices.ts b/src/vs/workbench/parts/output/browser/outputServices.ts index e1e2e717553..14d6262f3e4 100644 --- a/src/vs/workbench/parts/output/browser/outputServices.ts +++ b/src/vs/workbench/parts/output/browser/outputServices.ts @@ -271,10 +271,7 @@ export class OutputService implements IOutputService { } if (this.activeChannelId) { - const activeChannel = this.getChannel(this.activeChannelId); - if (activeChannel) { - activeChannel.hide(); - } + this.doHideChannel(this.activeChannelId); } this.activeChannelId = id; @@ -285,16 +282,24 @@ export class OutputService implements IOutputService { getChannel(id: string): IOutputChannel { if (!this.channels.has(id)) { const channelData = Registry.as(Extensions.OutputChannels).getChannel(id); - const channel = channelData && channelData.file ? this.instantiationService.createInstance(FileOutputChannel, channelData) : this.instantiationService.createInstance(BufferredOutputChannel, { id: id, label: '' }); + const channelDisposables = channelData && channelData.file ? this.instantiationService.createInstance(FileOutputChannel, channelData) : this.instantiationService.createInstance(BufferredOutputChannel, { id: id, label: '' }); let disposables = []; - channel.onDidChange(isClear => this._onOutput.fire({ channelId: id, isClear }), disposables); - channel.onDispose(() => { - this.removeOutput(id); + channelDisposables.onDidChange(isClear => this._onOutput.fire({ channelId: id, isClear }), disposables); + channelDisposables.onDispose(() => { + Registry.as(Extensions.OutputChannels).removeChannel(id); + if (this.activeChannelId === id) { + const channels = this.getChannels(); + if (this._outputPanel && channels.length) { + this.showChannel(channels[0].id); + } else { + this._onActiveOutputChannel.fire(void 0); + } + } dispose(disposables); }, disposables); - this.channels.set(id, channel); + this.channels.set(id, channelDisposables); } return this.channels.get(id); } @@ -314,6 +319,9 @@ export class OutputService implements IOutputService { private onDidPanelClose(panel: IPanel): void { if (this._outputPanel && panel.getId() === OUTPUT_PANEL_ID) { + if (this.activeChannelId) { + this.doHideChannel(this.activeChannelId); + } this._outputPanel.clearInput(); } } @@ -327,21 +335,9 @@ export class OutputService implements IOutputService { } } - private removeOutput(channelId: string): void { - Registry.as(Extensions.OutputChannels).removeChannel(channelId); - if (this.activeChannelId === channelId) { - const channels = this.getChannels(); - if (this._outputPanel && channels.length) { - this.showChannel(channels[0].id); - } else { - this._onActiveOutputChannel.fire(void 0); - } - } - } - private doShowChannel(channelId: string, preserveFocus: boolean): TPromise { - const activeChannel = this.getChannel(channelId); - return activeChannel.show() + const channel = this.getChannel(channelId); + return channel.show() .then(() => { this.storageService.store(OUTPUT_ACTIVE_CHANNEL_KEY, channelId, StorageScope.WORKSPACE); this._outputPanel.setInput(this.createInput(this.getChannel(channelId)), EditorOptions.create({ preserveFocus: preserveFocus })); @@ -351,6 +347,13 @@ export class OutputService implements IOutputService { }); } + private doHideChannel(channelId): void { + const channel = this.getChannel(channelId); + if (channel) { + channel.hide(); + } + } + private createInput(channel: IOutputChannel): ResourceEditorInput { const resource = URI.from({ scheme: OUTPUT_SCHEME, path: channel.id }); return this.instantiationService.createInstance(ResourceEditorInput, nls.localize('output', "Output"), channel ? nls.localize('channel', "for '{0}'", channel.label) : '', resource); From 3017bc0f9c056e4c256db888c02cf20295511538 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 14 Dec 2017 12:03:54 +0100 Subject: [PATCH 253/615] git submodule decorations --- extensions/git/package.json | 9 +++++++++ extensions/git/package.nls.json | 3 ++- extensions/git/src/decorationProvider.ts | 17 +++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 65d4faf08a1..e59670ac0c1 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -951,6 +951,15 @@ "dark": "#6c6cc4", "highContrast": "#6c6cc4" } + }, + { + "id": "gitDecoration.submoduleResourceForeground", + "description": "%colors.submodule%", + "defaults": { + "light": "#1258a7", + "dark": "#8db9e2", + "highContrast": "#8db9e2" + } } ] }, diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 542740ef483..179c430eb4b 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -68,5 +68,6 @@ "colors.deleted": "Color for deleted resources.", "colors.untracked": "Color for untracked resources.", "colors.ignored": "Color for ignored resources.", - "colors.conflict": "Color for resources with conflicts." + "colors.conflict": "Color for resources with conflicts.", + "colors.submodule": "Color for submodule resources." } \ No newline at end of file diff --git a/extensions/git/src/decorationProvider.ts b/extensions/git/src/decorationProvider.ts index fc068efd8c4..20b523aa953 100644 --- a/extensions/git/src/decorationProvider.ts +++ b/extensions/git/src/decorationProvider.ts @@ -6,10 +6,12 @@ 'use strict'; import { window, workspace, Uri, Disposable, Event, EventEmitter, DecorationData, DecorationProvider, ThemeColor } from 'vscode'; +import * as path from 'path'; import { Repository, GitResourceGroup, Status } from './repository'; import { Model } from './model'; import { debounce } from './decorators'; import { filterEvent } from './util'; +import { Submodule } from './git'; class GitIgnoreDecorationProvider implements DecorationProvider { @@ -65,6 +67,14 @@ class GitIgnoreDecorationProvider implements DecorationProvider { class GitDecorationProvider implements DecorationProvider { + private static SubmoduleDecorationData = { + source: 'git.resource', + title: 'Submodule', + abbreviation: 'S', + color: new ThemeColor('gitDecoration.submoduleResourceForeground'), + priority: 1 + }; + private readonly _onDidChangeDecorations = new EventEmitter(); readonly onDidChangeDecorations: Event = this._onDidChangeDecorations.event; @@ -83,6 +93,7 @@ class GitDecorationProvider implements DecorationProvider { this.collectDecorationData(this.repository.indexGroup, newDecorations); this.collectDecorationData(this.repository.workingTreeGroup, newDecorations); this.collectDecorationData(this.repository.mergeGroup, newDecorations); + this.collectSubmoduleDecorationData(newDecorations); const uris = new Set([...this.decorations.keys()].concat([...newDecorations.keys()])); this.decorations = newDecorations; @@ -101,6 +112,12 @@ class GitDecorationProvider implements DecorationProvider { }); } + private collectSubmoduleDecorationData(bucket: Map): void { + for (const submodule of this.repository.submodules) { + bucket.set(Uri.file(path.join(this.repository.root, submodule.path)).toString(), GitDecorationProvider.SubmoduleDecorationData); + } + } + provideDecoration(uri: Uri): DecorationData | undefined { return this.decorations.get(uri.toString()); } From 78cc1e902cd04e9a28f10d119cf2441c15fe121c Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 14 Dec 2017 12:16:09 +0100 Subject: [PATCH 254/615] Use the async version of Electron's dialog API (#40211) * dialogs - move dialog handling to main side * dialogs - adopt windows dialogs methods in main * dialogs - use async dialog API and queue up dialogs on the main side --- src/vs/code/electron-main/app.ts | 7 +- src/vs/code/electron-main/menus.ts | 14 +- src/vs/code/electron-main/windows.ts | 247 +++++++++++------- src/vs/platform/windows/common/windows.ts | 8 +- src/vs/platform/windows/common/windowsIpc.ts | 20 +- .../windows/electron-browser/windowService.ts | 37 +-- .../platform/windows/electron-main/windows.ts | 5 +- .../windows/electron-main/windowsService.ts | 20 +- .../browser/parts/editor/editorPart.ts | 57 ++-- .../electron-browser/messageService.ts | 4 +- .../electron-browser/textFileService.ts | 2 +- .../workbench/test/workbenchTestServices.ts | 20 +- 12 files changed, 249 insertions(+), 192 deletions(-) diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index c16afdc0796..838871abff1 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -5,7 +5,7 @@ 'use strict'; -import { app, ipcMain as ipc, BrowserWindow, dialog } from 'electron'; +import { app, ipcMain as ipc, BrowserWindow } from 'electron'; import * as platform from 'vs/base/common/platform'; import { WindowsManager } from 'vs/code/electron-main/windows'; import { IWindowsService, OpenContext } from 'vs/platform/windows/common/windows'; @@ -376,6 +376,7 @@ export class CodeApplication { private afterWindowOpen(accessor: ServicesAccessor): void { const appInstantiationService = accessor.get(IInstantiationService); + const windowsMainService = accessor.get(IWindowsMainService); let windowsMutex: Mutex = null; if (platform.isWindows) { @@ -387,7 +388,7 @@ export class CodeApplication { this.toDispose.push({ dispose: () => windowsMutex.release() }); } catch (e) { if (!this.environmentService.isBuilt) { - dialog.showMessageBox({ + windowsMainService.showMessageBox({ title: product.nameLong, type: 'warning', message: 'Failed to load windows-mutex!', @@ -403,7 +404,7 @@ export class CodeApplication { require.__$__nodeRequire('windows-foreground-love'); } catch (e) { if (!this.environmentService.isBuilt) { - dialog.showMessageBox({ + windowsMainService.showMessageBox({ title: product.nameLong, type: 'warning', message: 'Failed to load windows-foreground-love!', diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 70870dafe13..59229fbc739 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -9,7 +9,7 @@ import * as nls from 'vs/nls'; import { isMacintosh, isLinux, isWindows, language } from 'vs/base/common/platform'; import * as arrays from 'vs/base/common/arrays'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem, BrowserWindow, clipboard } from 'electron'; +import { ipcMain as ipc, app, shell, Menu, MenuItem, BrowserWindow, clipboard } from 'electron'; import { OpenContext, IRunActionInWindowRequest } from 'vs/platform/windows/common/windows'; import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; import { AutoSaveConfiguration } from 'vs/platform/files/common/files'; @@ -1217,20 +1217,18 @@ export class CodeMenu { buttons.push(mnemonicButtonLabel(nls.localize({ key: 'copy', comment: ['&& denotes a mnemonic'] }, "&&Copy"))); // https://github.com/Microsoft/vscode/issues/37608 } - const result = dialog.showMessageBox(lastActiveWindow && lastActiveWindow.win, { + this.windowsMainService.showMessageBox({ title: product.nameLong, type: 'info', message: product.nameLong, detail: `\n${detail}`, buttons, noLink: true + }, lastActiveWindow).then(result => { + if (isWindows && result.button === 1) { + clipboard.writeText(detail); + } }); - - if (isWindows && result === 1) { - clipboard.writeText(detail); - } - - this.reportMenuActionTelemetry('showAboutDialog'); } private openUrl(url: string, id: string): void { diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 2dab6f94941..c484a93693d 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -19,13 +19,13 @@ import { IPathWithLineAndColumn, parseLineAndColumnAware } from 'vs/code/node/pa import { ILifecycleService, UnloadReason, IWindowUnloadEvent } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ILogService } from 'vs/platform/log/common/log'; -import { IWindowSettings, OpenContext, IPath, IWindowConfiguration, INativeOpenDialogOptions, ReadyState, IPathsToWaitFor, IEnterWorkspaceResult } from 'vs/platform/windows/common/windows'; +import { IWindowSettings, OpenContext, IPath, IWindowConfiguration, INativeOpenDialogOptions, ReadyState, IPathsToWaitFor, IEnterWorkspaceResult, IMessageBoxResult } from 'vs/platform/windows/common/windows'; import { getLastActiveWindow, findBestWindowOrFolderForFile, findWindowOnWorkspace, findWindowOnExtensionDevelopmentPath, findWindowOnWorkspaceOrFolderPath } from 'vs/code/node/windowsFinder'; import CommonEvent, { Emitter } from 'vs/base/common/event'; import product from 'vs/platform/node/product'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { isEqual } from 'vs/base/common/paths'; -import { IWindowsMainService, IOpenConfiguration, IWindowsCountChangedEvent } from 'vs/platform/windows/electron-main/windows'; +import { IWindowsMainService, IOpenConfiguration, IWindowsCountChangedEvent, ICodeWindow } from 'vs/platform/windows/electron-main/windows'; import { IHistoryMainService } from 'vs/platform/history/common/history'; import { IProcessEnvironment, isLinux, isMacintosh, isWindows } from 'vs/base/common/platform'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -35,6 +35,7 @@ import { mnemonicButtonLabel } from 'vs/base/common/labels'; import { Schemas } from 'vs/base/common/network'; import { normalizeNFC } from 'vs/base/common/strings'; import URI from 'vs/base/common/uri'; +import { Queue } from 'vs/base/common/async'; enum WindowError { UNRESPONSIVE, @@ -108,7 +109,7 @@ export class WindowsManager implements IWindowsMainService { private windowsState: IWindowsState; private lastClosedWindowState: IWindowState; - private fileDialog: FileDialog; + private dialogs: Dialogs; private workspacesManager: WorkspacesManager; private _onWindowReady = new Emitter(); @@ -147,7 +148,7 @@ export class WindowsManager implements IWindowsMainService { this.windowsState.openedWindows = []; } - this.fileDialog = new FileDialog(environmentService, telemetryService, stateService, this); + this.dialogs = new Dialogs(environmentService, telemetryService, stateService, this); this.workspacesManager = new WorkspacesManager(workspacesMainService, backupMainService, environmentService, this); } @@ -790,12 +791,7 @@ export class WindowsManager implements IWindowsMainService { noLink: true }; - const activeWindow = BrowserWindow.getFocusedWindow(); - if (activeWindow) { - dialog.showMessageBox(activeWindow, options); - } else { - dialog.showMessageBox(options); - } + this.dialogs.showMessageBox(options, this.getFocusedWindow()); } return path; @@ -1330,7 +1326,7 @@ export class WindowsManager implements IWindowsMainService { } // Handle untitled workspaces with prompt as needed - this.workspacesManager.promptToSaveUntitledWorkspace(e, workspace); + e.veto(this.workspacesManager.promptToSaveUntitledWorkspace(this.getWindowById(e.window.id), workspace)); } public focusLastActive(cli: ParsedArgs, context: OpenContext): CodeWindow { @@ -1418,48 +1414,48 @@ export class WindowsManager implements IWindowsMainService { // Unresponsive if (error === WindowError.UNRESPONSIVE) { - const result = dialog.showMessageBox(window.win, { + this.dialogs.showMessageBox({ title: product.nameLong, type: 'warning', buttons: [mnemonicButtonLabel(localize({ key: 'reopen', comment: ['&& denotes a mnemonic'] }, "&&Reopen")), mnemonicButtonLabel(localize({ key: 'wait', comment: ['&& denotes a mnemonic'] }, "&&Keep Waiting")), mnemonicButtonLabel(localize({ key: 'close', comment: ['&& denotes a mnemonic'] }, "&&Close"))], message: localize('appStalled', "The window is no longer responding"), detail: localize('appStalledDetail', "You can reopen or close the window or keep waiting."), noLink: true + }, window).then(result => { + if (!window.win) { + return; // Return early if the window has been going down already + } + + if (result.button === 0) { + window.reload(); + } else if (result.button === 2) { + this.onBeforeWindowClose(window); // 'close' event will not be fired on destroy(), so run it manually + window.win.destroy(); // make sure to destroy the window as it is unresponsive + } }); - - if (!window.win) { - return; // Return early if the window has been going down already - } - - if (result === 0) { - window.reload(); - } else if (result === 2) { - this.onBeforeWindowClose(window); // 'close' event will not be fired on destroy(), so run it manually - window.win.destroy(); // make sure to destroy the window as it is unresponsive - } } // Crashed else { - const result = dialog.showMessageBox(window.win, { + this.dialogs.showMessageBox({ title: product.nameLong, type: 'warning', buttons: [mnemonicButtonLabel(localize({ key: 'reopen', comment: ['&& denotes a mnemonic'] }, "&&Reopen")), mnemonicButtonLabel(localize({ key: 'close', comment: ['&& denotes a mnemonic'] }, "&&Close"))], message: localize('appCrashed', "The window has crashed"), detail: localize('appCrashedDetail', "We are sorry for the inconvenience! You can reopen the window to continue where you left off."), noLink: true + }, window).then(result => { + if (!window.win) { + return; // Return early if the window has been going down already + } + + if (result.button === 0) { + window.reload(); + } else if (result.button === 1) { + this.onBeforeWindowClose(window); // 'close' event will not be fired on destroy(), so run it manually + window.win.destroy(); // make sure to destroy the window as it has crashed + } }); - - if (!window.win) { - return; // Return early if the window has been going down already - } - - if (result === 0) { - window.reload(); - } else if (result === 1) { - this.onBeforeWindowClose(window); // 'close' event will not be fired on destroy(), so run it manually - window.win.destroy(); // make sure to destroy the window as it has crashed - } } } @@ -1519,7 +1515,19 @@ export class WindowsManager implements IWindowsMainService { } } - this.fileDialog.pickAndOpen(internalOptions); + this.dialogs.pickAndOpen(internalOptions); + } + + public showMessageBox(options: Electron.MessageBoxOptions, win?: CodeWindow): TPromise { + return this.dialogs.showMessageBox(options, win); + } + + public showSaveDialog(options: Electron.SaveDialogOptions, win?: CodeWindow): TPromise { + return this.dialogs.showSaveDialog(options, win); + } + + public showOpenDialog(options: Electron.OpenDialogOptions, win?: CodeWindow): TPromise { + return this.dialogs.showOpenDialog(options, win); } public quit(): void { @@ -1545,20 +1553,25 @@ interface IInternalNativeOpenDialogOptions extends INativeOpenDialogOptions { pickFiles?: boolean; } -class FileDialog { +class Dialogs { private static readonly workingDirPickerStorageKey = 'pickerWorkingDir'; + private mapWindowToDialogQueue: Map>; + private noWindowDialogQueue: Queue; + constructor( private environmentService: IEnvironmentService, private telemetryService: ITelemetryService, private stateService: IStateService, private windowsMainService: IWindowsMainService ) { + this.mapWindowToDialogQueue = new Map>(); + this.noWindowDialogQueue = new Queue(); } public pickAndOpen(options: INativeOpenDialogOptions): void { - this.getFileOrFolderPaths(options, (paths: string[]) => { + this.getFileOrFolderPaths(options).then(paths => { const numberOfPaths = paths ? paths.length : 0; // Telemetry @@ -1584,7 +1597,7 @@ class FileDialog { }); } - private getFileOrFolderPaths(options: IInternalNativeOpenDialogOptions, clb: (paths: string[]) => void): void { + private getFileOrFolderPaths(options: IInternalNativeOpenDialogOptions): TPromise { // Ensure dialog options if (!options.dialogOptions) { @@ -1593,7 +1606,7 @@ class FileDialog { // Ensure defaultPath if (!options.dialogOptions.defaultPath) { - options.dialogOptions.defaultPath = this.stateService.getItem(FileDialog.workingDirPickerStorageKey); + options.dialogOptions.defaultPath = this.stateService.getItem(Dialogs.workingDirPickerStorageKey); } // Ensure properties @@ -1615,20 +1628,72 @@ class FileDialog { // Show Dialog const focusedWindow = this.windowsMainService.getWindowById(options.windowId) || this.windowsMainService.getFocusedWindow(); - let paths = dialog.showOpenDialog(focusedWindow && focusedWindow.win, options.dialogOptions); - if (paths && paths.length > 0) { - if (isMacintosh) { + + return this.showOpenDialog(options.dialogOptions, focusedWindow).then(paths => { + if (paths && paths.length > 0) { + + // Remember path in storage for next time + this.stateService.setItem(Dialogs.workingDirPickerStorageKey, dirname(paths[0])); + + return paths; + } + + return void 0; + }); + } + + private getDialogQueue(window?: ICodeWindow): Queue { + if (!window) { + return this.noWindowDialogQueue; + } + + let windowDialogQueue = this.mapWindowToDialogQueue.get(window.id); + if (!windowDialogQueue) { + windowDialogQueue = new Queue(); + this.mapWindowToDialogQueue.set(window.id, windowDialogQueue); + } + + return windowDialogQueue; + } + + public showMessageBox(options: Electron.MessageBoxOptions, window?: ICodeWindow): TPromise { + return this.getDialogQueue(window).queue(() => { + return new TPromise((c, e) => { + dialog.showMessageBox(window ? window.win : void 0, options, (response: number, checkboxChecked: boolean) => c({ button: response, checkboxChecked })); + }); + }); + } + + public showSaveDialog(options: Electron.SaveDialogOptions, window?: ICodeWindow): TPromise { + function normalizePath(path: string): string { + if (path && isMacintosh) { + path = normalizeNFC(path); // normalize paths returned from the OS + } + + return path; + } + + return this.getDialogQueue(window).queue(() => { + return new TPromise((c, e) => { + dialog.showSaveDialog(window ? window.win : void 0, options, path => c(normalizePath(path))); + }); + }); + } + + public showOpenDialog(options: Electron.OpenDialogOptions, window?: ICodeWindow): TPromise { + function normalizePaths(paths: string[]): string[] { + if (paths && paths.length > 0 && isMacintosh) { paths = paths.map(path => normalizeNFC(path)); // normalize paths returned from the OS } - // Remember path in storage for next time - this.stateService.setItem(FileDialog.workingDirPickerStorageKey, dirname(paths[0])); - - // Return - return clb(paths); + return paths; } - return clb(void (0)); + return this.getDialogQueue(window).queue(() => { + return new TPromise((c, e) => { + dialog.showOpenDialog(window ? window.win : void 0, options, paths => c(normalizePaths(paths))); + }); + }); } } @@ -1651,22 +1716,29 @@ class WorkspacesManager { } public createAndEnterWorkspace(window: CodeWindow, folders?: IWorkspaceFolderCreationData[], path?: string): TPromise { - if (!window || !window.win || window.readyState !== ReadyState.READY || !this.isValidTargetWorkspacePath(window, path)) { + if (!window || !window.win || window.readyState !== ReadyState.READY) { return TPromise.as(null); // return early if the window is not ready or disposed } - return this.workspacesService.createWorkspace(folders).then(workspace => { - return this.doSaveAndOpenWorkspace(window, workspace, path); + return this.isValidTargetWorkspacePath(window, path).then(isValid => { + if (!isValid) { + return TPromise.as(null); // return early if the workspace is not valid + } + + return this.workspacesService.createWorkspace(folders).then(workspace => { + return this.doSaveAndOpenWorkspace(window, workspace, path); + }); }); + } - private isValidTargetWorkspacePath(window: CodeWindow, path?: string): boolean { + private isValidTargetWorkspacePath(window: CodeWindow, path?: string): TPromise { if (!path) { - return true; + return TPromise.wrap(true); } if (window.openedWorkspace && window.openedWorkspace.configPath === path) { - return false; // window is already opened on a workspace with that path + return TPromise.wrap(false); // window is already opened on a workspace with that path } // Prevent overwriting a workspace that is currently opened in another window @@ -1680,17 +1752,10 @@ class WorkspacesManager { noLink: true }; - const activeWindow = BrowserWindow.getFocusedWindow(); - if (activeWindow) { - dialog.showMessageBox(activeWindow, options); - } else { - dialog.showMessageBox(options); - } - - return false; + return this.windowsMainService.showMessageBox(options, this.windowsMainService.getFocusedWindow()).then(() => false); } - return true; // OK + return TPromise.wrap(true); // OK } private doSaveAndOpenWorkspace(window: CodeWindow, workspace: IWorkspaceIdentifier, path?: string): TPromise { @@ -1737,7 +1802,7 @@ class WorkspacesManager { }); } - public promptToSaveUntitledWorkspace(e: IWindowUnloadEvent, workspace: IWorkspaceIdentifier): void { + public promptToSaveUntitledWorkspace(window: ICodeWindow, workspace: IWorkspaceIdentifier): TPromise { enum ConfirmResult { SAVE, DONT_SAVE, @@ -1771,41 +1836,35 @@ class WorkspacesManager { options.defaultId = 2; } - const res = dialog.showMessageBox(e.window.win, options); + return this.windowsMainService.showMessageBox(options, window).then(res => { + switch (buttons[res.button].result) { - switch (buttons[res].result) { + // Cancel: veto unload + case ConfirmResult.CANCEL: + return true; - // Cancel: veto unload - case ConfirmResult.CANCEL: - e.veto(true); - break; + // Don't Save: delete workspace + case ConfirmResult.DONT_SAVE: + this.workspacesService.deleteUntitledWorkspaceSync(workspace); + return false; - // Don't Save: delete workspace - case ConfirmResult.DONT_SAVE: - this.workspacesService.deleteUntitledWorkspaceSync(workspace); - e.veto(false); - break; + // Save: save workspace, but do not veto unload + case ConfirmResult.SAVE: { + return this.windowsMainService.showSaveDialog({ + buttonLabel: mnemonicButtonLabel(localize({ key: 'save', comment: ['&& denotes a mnemonic'] }, "&&Save")), + title: localize('saveWorkspace', "Save Workspace"), + filters: WORKSPACE_FILTER, + defaultPath: this.getUntitledWorkspaceSaveDialogDefaultPath(workspace) + }, window).then(target => { + if (target) { + return this.workspacesService.saveWorkspace(workspace, target).then(() => false, () => false); + } - // Save: save workspace, but do not veto unload - case ConfirmResult.SAVE: { - let target = dialog.showSaveDialog(e.window.win, { - buttonLabel: mnemonicButtonLabel(localize({ key: 'save', comment: ['&& denotes a mnemonic'] }, "&&Save")), - title: localize('saveWorkspace', "Save Workspace"), - filters: WORKSPACE_FILTER, - defaultPath: this.getUntitledWorkspaceSaveDialogDefaultPath(workspace) - }); - - if (target) { - if (isMacintosh) { - target = normalizeNFC(target); // normalize paths returned from the OS - } - - e.veto(this.workspacesService.saveWorkspace(workspace, target).then(() => false, () => false)); - } else { - e.veto(true); // keep veto if no target was provided + return true; // keep veto if no target was provided + }); } } - } + }); } private getUntitledWorkspaceSaveDialogDefaultPath(workspace?: IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier): string { diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index 6a0349c821b..4406451cfac 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -98,10 +98,15 @@ export interface IWindowsService { onWindowFocus: Event; onWindowBlur: Event; + // Dialogs pickFileFolderAndOpen(options: INativeOpenDialogOptions): TPromise; pickFileAndOpen(options: INativeOpenDialogOptions): TPromise; pickFolderAndOpen(options: INativeOpenDialogOptions): TPromise; pickWorkspaceAndOpen(options: INativeOpenDialogOptions): TPromise; + showMessageBox(windowId: number, options: Electron.MessageBoxOptions): TPromise; + showSaveDialog(windowId: number, options: Electron.SaveDialogOptions): TPromise; + showOpenDialog(windowId: number, options: Electron.OpenDialogOptions): TPromise; + reloadWindow(windowId: number): TPromise; openDevTools(windowId: number): TPromise; toggleDevTools(windowId: number): TPromise; @@ -191,10 +196,9 @@ export interface IWindowService { setDocumentEdited(flag: boolean): TPromise; onWindowTitleDoubleClick(): TPromise; show(): TPromise; - showMessageBox(options: MessageBoxOptions): TPromise; + showMessageBox(options: MessageBoxOptions): TPromise; showSaveDialog(options: SaveDialogOptions): TPromise; showOpenDialog(options: OpenDialogOptions): TPromise; - showMessageBoxWithCheckbox(options: MessageBoxOptions): TPromise; } export type MenuBarVisibility = 'default' | 'visible' | 'toggle' | 'hidden'; diff --git a/src/vs/platform/windows/common/windowsIpc.ts b/src/vs/platform/windows/common/windowsIpc.ts index 2000965fadf..199f1087028 100644 --- a/src/vs/platform/windows/common/windowsIpc.ts +++ b/src/vs/platform/windows/common/windowsIpc.ts @@ -8,7 +8,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import Event, { buffer } from 'vs/base/common/event'; import { IChannel, eventToCall, eventFromCall } from 'vs/base/parts/ipc/common/ipc'; -import { IWindowsService, INativeOpenDialogOptions, IEnterWorkspaceResult, CrashReporterStartOptions } from 'vs/platform/windows/common/windows'; +import { IWindowsService, INativeOpenDialogOptions, IEnterWorkspaceResult, CrashReporterStartOptions, IMessageBoxResult } from 'vs/platform/windows/common/windows'; import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, IWorkspaceFolderCreationData } from 'vs/platform/workspaces/common/workspaces'; import { IRecentlyOpened } from 'vs/platform/history/common/history'; import { ICommandAction } from 'vs/platform/actions/common/actions'; @@ -22,6 +22,9 @@ export interface IWindowsChannel extends IChannel { call(command: 'pickFileAndOpen', arg: INativeOpenDialogOptions): TPromise; call(command: 'pickFolderAndOpen', arg: INativeOpenDialogOptions): TPromise; call(command: 'pickWorkspaceAndOpen', arg: INativeOpenDialogOptions): TPromise; + call(command: 'showMessageBox', arg: [number, Electron.MessageBoxOptions]): TPromise; + call(command: 'showSaveDialog', arg: [number, Electron.SaveDialogOptions]): TPromise; + call(command: 'showOpenDialog', arg: [number, Electron.OpenDialogOptions]): TPromise; call(command: 'reloadWindow', arg: number): TPromise; call(command: 'toggleDevTools', arg: number): TPromise; call(command: 'closeWorkspace', arg: number): TPromise; @@ -84,6 +87,9 @@ export class WindowsChannel implements IWindowsChannel { case 'pickFileAndOpen': return this.service.pickFileAndOpen(arg); case 'pickFolderAndOpen': return this.service.pickFolderAndOpen(arg); case 'pickWorkspaceAndOpen': return this.service.pickWorkspaceAndOpen(arg); + case 'showMessageBox': return this.service.showMessageBox(arg[0], arg[1]); + case 'showSaveDialog': return this.service.showSaveDialog(arg[0], arg[1]); + case 'showOpenDialog': return this.service.showOpenDialog(arg[0], arg[1]); case 'reloadWindow': return this.service.reloadWindow(arg); case 'openDevTools': return this.service.openDevTools(arg); case 'toggleDevTools': return this.service.toggleDevTools(arg); @@ -172,6 +178,18 @@ export class WindowsChannelClient implements IWindowsService { return this.channel.call('pickWorkspaceAndOpen', options); } + showMessageBox(windowId: number, options: Electron.MessageBoxOptions): TPromise { + return this.channel.call('showMessageBox', [windowId, options]); + } + + showSaveDialog(windowId: number, options: Electron.SaveDialogOptions): TPromise { + return this.channel.call('showSaveDialog', [windowId, options]); + } + + showOpenDialog(windowId: number, options: Electron.OpenDialogOptions): TPromise { + return this.channel.call('showOpenDialog', [windowId, options]); + } + reloadWindow(windowId: number): TPromise { return this.channel.call('reloadWindow', windowId); } diff --git a/src/vs/platform/windows/electron-browser/windowService.ts b/src/vs/platform/windows/electron-browser/windowService.ts index ad6f141339d..8548cf17b9f 100644 --- a/src/vs/platform/windows/electron-browser/windowService.ts +++ b/src/vs/platform/windows/electron-browser/windowService.ts @@ -8,11 +8,8 @@ import Event, { filterEvent, mapEvent, anyEvent } from 'vs/base/common/event'; import { TPromise } from 'vs/base/common/winjs.base'; import { IWindowService, IWindowsService, INativeOpenDialogOptions, IEnterWorkspaceResult, IMessageBoxResult, IWindowConfiguration } from 'vs/platform/windows/common/windows'; -import { remote } from 'electron'; import { IRecentlyOpened } from 'vs/platform/history/common/history'; import { ICommandAction } from 'vs/platform/actions/common/actions'; -import { isMacintosh } from 'vs/base/common/platform'; -import { normalizeNFC } from 'vs/base/common/strings'; import { IWorkspaceFolderCreationData } from 'vs/platform/workspaces/common/workspaces'; export class WindowService implements IWindowService { @@ -123,42 +120,16 @@ export class WindowService implements IWindowService { return this.windowsService.showWindow(this.windowId); } - showMessageBox(options: Electron.MessageBoxOptions): TPromise { - return TPromise.wrap(remote.dialog.showMessageBox(remote.getCurrentWindow(), options)); - } - - showMessageBoxWithCheckbox(options: Electron.MessageBoxOptions): TPromise { - return new TPromise((c, e) => { - return remote.dialog.showMessageBox(remote.getCurrentWindow(), options, (response: number, checkboxChecked: boolean) => { - c({ button: response, checkboxChecked }); - }); - }); + showMessageBox(options: Electron.MessageBoxOptions): TPromise { + return this.windowsService.showMessageBox(this.windowId, options); } showSaveDialog(options: Electron.SaveDialogOptions): TPromise { - - function normalizePath(path: string): string { - if (path && isMacintosh) { - path = normalizeNFC(path); // normalize paths returned from the OS - } - - return path; - } - - return TPromise.wrap(normalizePath(remote.dialog.showSaveDialog(remote.getCurrentWindow(), options))); // https://github.com/electron/electron/issues/4936 + return this.windowsService.showSaveDialog(this.windowId, options); } showOpenDialog(options: Electron.OpenDialogOptions): TPromise { - - function normalizePaths(paths: string[]): string[] { - if (paths && paths.length > 0 && isMacintosh) { - paths = paths.map(path => normalizeNFC(path)); // normalize paths returned from the OS - } - - return paths; - } - - return TPromise.wrap(normalizePaths(remote.dialog.showOpenDialog(remote.getCurrentWindow(), options))); // https://github.com/electron/electron/issues/4936 + return this.windowsService.showOpenDialog(this.windowId, options); } updateTouchBar(items: ICommandAction[][]): TPromise { diff --git a/src/vs/platform/windows/electron-main/windows.ts b/src/vs/platform/windows/electron-main/windows.ts index f6c8b4d712b..c105c89f2d2 100644 --- a/src/vs/platform/windows/electron-main/windows.ts +++ b/src/vs/platform/windows/electron-main/windows.ts @@ -6,7 +6,7 @@ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; -import { OpenContext, IWindowConfiguration, ReadyState, INativeOpenDialogOptions, IEnterWorkspaceResult } from 'vs/platform/windows/common/windows'; +import { OpenContext, IWindowConfiguration, ReadyState, INativeOpenDialogOptions, IEnterWorkspaceResult, IMessageBoxResult } from 'vs/platform/windows/common/windows'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import Event from 'vs/base/common/event'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; @@ -69,6 +69,9 @@ export interface IWindowsMainService { pickFolderAndOpen(options: INativeOpenDialogOptions): void; pickFileAndOpen(options: INativeOpenDialogOptions): void; pickWorkspaceAndOpen(options: INativeOpenDialogOptions): void; + showMessageBox(options: Electron.MessageBoxOptions, win?: ICodeWindow): TPromise; + showSaveDialog(options: Electron.SaveDialogOptions, win?: ICodeWindow): TPromise; + showOpenDialog(options: Electron.OpenDialogOptions, win?: ICodeWindow): TPromise; focusLastActive(cli: ParsedArgs, context: OpenContext): ICodeWindow; getLastActiveWindow(): ICodeWindow; waitForWindowCloseOrLoad(windowId: number): TPromise; diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index 56fe2279713..25ac113b9fd 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -9,7 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { assign } from 'vs/base/common/objects'; import URI from 'vs/base/common/uri'; -import { IWindowsService, OpenContext, INativeOpenDialogOptions, IEnterWorkspaceResult } from 'vs/platform/windows/common/windows'; +import { IWindowsService, OpenContext, INativeOpenDialogOptions, IEnterWorkspaceResult, IMessageBoxResult } from 'vs/platform/windows/common/windows'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { shell, crashReporter, app, Menu } from 'electron'; import Event, { chain, fromNodeEventEmitter } from 'vs/base/common/event'; @@ -75,6 +75,24 @@ export class WindowsService implements IWindowsService, IDisposable { return TPromise.as(null); } + showMessageBox(windowId: number, options: Electron.MessageBoxOptions): TPromise { + const codeWindow = this.windowsMainService.getWindowById(windowId); + + return this.windowsMainService.showMessageBox(options, codeWindow); + } + + showSaveDialog(windowId: number, options: Electron.SaveDialogOptions): TPromise { + const codeWindow = this.windowsMainService.getWindowById(windowId); + + return this.windowsMainService.showSaveDialog(options, codeWindow); + } + + showOpenDialog(windowId: number, options: Electron.OpenDialogOptions): TPromise { + const codeWindow = this.windowsMainService.getWindowById(windowId); + + return this.windowsMainService.showOpenDialog(options, codeWindow); + } + reloadWindow(windowId: number): TPromise { const codeWindow = this.windowsMainService.getWindowById(windowId); diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index b2187d1ee33..7f3b63746ec 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -41,7 +41,7 @@ import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/c import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorBackground } from 'vs/platform/theme/common/colorRegistry'; import { EDITOR_GROUP_BACKGROUND } from 'vs/workbench/common/theme'; -import { createCSSRule, scheduleAtNextAnimationFrame } from 'vs/base/browser/dom'; +import { createCSSRule } from 'vs/base/browser/dom'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { join } from 'vs/base/common/paths'; import { IEditorDescriptor, IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/browser/editor'; @@ -822,47 +822,24 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService // Switch to editor that we want to handle return this.openEditor(identifier.editor, null, this.stacks.positionOfGroup(identifier.group)).then(() => { - return this.ensureEditorOpenedBeforePrompt().then(() => { - return editor.confirmSave().then(res => { - switch (res) { - case ConfirmResult.SAVE: - return editor.save().then(ok => !ok); + return editor.confirmSave().then(res => { + switch (res) { + case ConfirmResult.SAVE: + return editor.save().then(ok => !ok); - case ConfirmResult.DONT_SAVE: - // first try a normal revert where the contents of the editor are restored - return editor.revert().then(ok => !ok, error => { - // if that fails, since we are about to close the editor, we accept that - // the editor cannot be reverted and instead do a soft revert that just - // enables us to close the editor. With this, a user can always close a - // dirty editor even when reverting fails. - return editor.revert({ soft: true }).then(ok => !ok); - }); + case ConfirmResult.DONT_SAVE: + // first try a normal revert where the contents of the editor are restored + return editor.revert().then(ok => !ok, error => { + // if that fails, since we are about to close the editor, we accept that + // the editor cannot be reverted and instead do a soft revert that just + // enables us to close the editor. With this, a user can always close a + // dirty editor even when reverting fails. + return editor.revert({ soft: true }).then(ok => !ok); + }); - case ConfirmResult.CANCEL: - return true; // veto - } - }); - }); - }); - } - - private ensureEditorOpenedBeforePrompt(): TPromise { - - // Force title area update - this.editorGroupsControl.updateTitleAreas(true /* refresh active group */); - - // TODO@Ben our dialogs currently use the sync API, which means they block the JS - // thread when showing. As such, any UI update will not happen unless we wait a little - // bit. We wait for 2 request animation frames before showing the confirm. The first - // frame is where the UI is updating and the second is good enough to bring up the dialog. - // See also https://github.com/Microsoft/vscode/issues/39536 - return new TPromise(c => { - scheduleAtNextAnimationFrame(() => { - // Here the UI is updating - scheduleAtNextAnimationFrame(() => { - // Here we can show a blocking dialog - c(void 0); - }); + case ConfirmResult.CANCEL: + return true; // veto + } }); }); } diff --git a/src/vs/workbench/services/message/electron-browser/messageService.ts b/src/vs/workbench/services/message/electron-browser/messageService.ts index 17c78d0dd22..0c04c556de5 100644 --- a/src/vs/workbench/services/message/electron-browser/messageService.ts +++ b/src/vs/workbench/services/message/electron-browser/messageService.ts @@ -40,7 +40,7 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe private showMessageBoxWithCheckbox(opts: Electron.MessageBoxOptions): TPromise { opts = this.massageMessageBoxOptions(opts); - return this.windowService.showMessageBoxWithCheckbox(opts).then(result => { + return this.windowService.showMessageBox(opts).then(result => { return { button: isLinux ? opts.buttons.length - result.button - 1 : result.button, checkboxChecked: result.checkboxChecked @@ -118,7 +118,7 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe private showMessageBox(opts: Electron.MessageBoxOptions): TPromise { opts = this.massageMessageBoxOptions(opts); - return this.windowService.showMessageBox(opts).then(result => isLinux ? opts.buttons.length - result - 1 : result); + return this.windowService.showMessageBox(opts).then(result => isLinux ? opts.buttons.length - result.button - 1 : result.button); } private massageMessageBoxOptions(opts: Electron.MessageBoxOptions): Electron.MessageBoxOptions { diff --git a/src/vs/workbench/services/textfile/electron-browser/textFileService.ts b/src/vs/workbench/services/textfile/electron-browser/textFileService.ts index fc2e790bfb1..ce2129030e6 100644 --- a/src/vs/workbench/services/textfile/electron-browser/textFileService.ts +++ b/src/vs/workbench/services/textfile/electron-browser/textFileService.ts @@ -130,7 +130,7 @@ export class TextFileService extends AbstractTextFileService { opts.defaultId = 2; } - return this.windowService.showMessageBox(opts).then(choice => buttons[choice].result); + return this.windowService.showMessageBox(opts).then(result => buttons[result.button].result); } public promptForPath(defaultPath: string): TPromise { diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 6898a77e746..0dcf628ee66 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -961,12 +961,8 @@ export class TestWindowService implements IWindowService { return TPromise.as(void 0); } - showMessageBox(options: Electron.MessageBoxOptions): TPromise { - return TPromise.wrap(0); - } - - showMessageBoxWithCheckbox(options: Electron.MessageBoxOptions): TPromise { - return TPromise.as(void 0); + showMessageBox(options: Electron.MessageBoxOptions): TPromise { + return TPromise.wrap({ button: 0 }); } showSaveDialog(options: Electron.SaveDialogOptions): TPromise { @@ -1198,6 +1194,18 @@ export class TestWindowsService implements IWindowsService { startCrashReporter(config: Electron.CrashReporterStartOptions): TPromise { return TPromise.as(void 0); } + + showMessageBox(windowId: number, options: Electron.MessageBoxOptions): TPromise { + return TPromise.as(void 0); + } + + showSaveDialog(windowId: number, options: Electron.SaveDialogOptions): TPromise { + return TPromise.as(void 0); + } + + showOpenDialog(windowId: number, options: Electron.OpenDialogOptions): TPromise { + return TPromise.as(void 0); + } } export class TestTextResourceConfigurationService implements ITextResourceConfigurationService { From 35369b7eccb9b19eda7058a68b28e330dc87fcbc Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 14 Dec 2017 12:18:21 +0100 Subject: [PATCH 255/615] #39638 Action to open channel in editor --- .../parts/output/browser/media/open_output.svg | 3 +++ .../browser/media/open_output_inverse.svg | 1 + .../parts/output/browser/media/output.css | 9 +++++++++ .../parts/output/browser/outputActions.ts | 17 +++++++++++++++++ .../parts/output/browser/outputPanel.ts | 3 ++- .../parts/output/browser/outputServices.ts | 17 ++++++++++++----- src/vs/workbench/parts/output/common/output.ts | 5 +++++ 7 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 src/vs/workbench/parts/output/browser/media/open_output.svg create mode 100644 src/vs/workbench/parts/output/browser/media/open_output_inverse.svg diff --git a/src/vs/workbench/parts/output/browser/media/open_output.svg b/src/vs/workbench/parts/output/browser/media/open_output.svg new file mode 100644 index 00000000000..85a001dccc2 --- /dev/null +++ b/src/vs/workbench/parts/output/browser/media/open_output.svg @@ -0,0 +1,3 @@ + +]> \ No newline at end of file diff --git a/src/vs/workbench/parts/output/browser/media/open_output_inverse.svg b/src/vs/workbench/parts/output/browser/media/open_output_inverse.svg new file mode 100644 index 00000000000..f6302185aa4 --- /dev/null +++ b/src/vs/workbench/parts/output/browser/media/open_output_inverse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/output/browser/media/output.css b/src/vs/workbench/parts/output/browser/media/output.css index d0a8c236d7d..c2af514de6d 100644 --- a/src/vs/workbench/parts/output/browser/media/output.css +++ b/src/vs/workbench/parts/output/browser/media/output.css @@ -12,6 +12,15 @@ background: url('clear_output_inverse.svg') center center no-repeat; } +.monaco-workbench .output-action.open-output { + background: url('open_output.svg') center center no-repeat; +} + +.vs-dark .monaco-workbench .output-action.open-output, +.hc-black .monaco-workbench .output-action.open-output { + background: url('open_output_inverse.svg') center center no-repeat; +} + .monaco-workbench .output-action.output-scroll-lock { background: url('output_lock.svg') center center no-repeat; } diff --git a/src/vs/workbench/parts/output/browser/outputActions.ts b/src/vs/workbench/parts/output/browser/outputActions.ts index 51daf903872..19034b9672f 100644 --- a/src/vs/workbench/parts/output/browser/outputActions.ts +++ b/src/vs/workbench/parts/output/browser/outputActions.ts @@ -52,6 +52,23 @@ export class ClearOutputAction extends Action { } } +export class OpenInEditorAction extends Action { + + public static readonly ID = 'workbench.output.action.openInEditor'; + public static readonly LABEL = nls.localize('openInEditor', "Open in Editor"); + + constructor( + id: string, label: string, + @IOutputService private outputService: IOutputService + ) { + super(id, label, 'output-action open-output'); + } + + public run(): TPromise { + return this.outputService.showChannelInEditor(this.outputService.getActiveChannel().id); + } +} + export class ToggleOutputScrollLockAction extends Action { public static readonly ID = 'workbench.output.action.toggleOutputScrollLock'; diff --git a/src/vs/workbench/parts/output/browser/outputPanel.ts b/src/vs/workbench/parts/output/browser/outputPanel.ts index ffa003b09d7..052a572f829 100644 --- a/src/vs/workbench/parts/output/browser/outputPanel.ts +++ b/src/vs/workbench/parts/output/browser/outputPanel.ts @@ -19,7 +19,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { EditorInput, EditorOptions } from 'vs/workbench/common/editor'; import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResourceEditor'; import { OUTPUT_PANEL_ID, IOutputService, CONTEXT_IN_OUTPUT } from 'vs/workbench/parts/output/common/output'; -import { SwitchOutputAction, SwitchOutputActionItem, ClearOutputAction, ToggleOutputScrollLockAction } from 'vs/workbench/parts/output/browser/outputActions'; +import { SwitchOutputAction, SwitchOutputActionItem, ClearOutputAction, ToggleOutputScrollLockAction, OpenInEditorAction } from 'vs/workbench/parts/output/browser/outputActions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; @@ -55,6 +55,7 @@ export class OutputPanel extends TextResourceEditor { this.actions = [ this.instantiationService.createInstance(SwitchOutputAction), this.instantiationService.createInstance(ClearOutputAction, ClearOutputAction.ID, ClearOutputAction.LABEL), + this.instantiationService.createInstance(OpenInEditorAction, OpenInEditorAction.ID, OpenInEditorAction.LABEL), this.instantiationService.createInstance(ToggleOutputScrollLockAction, ToggleOutputScrollLockAction.ID, ToggleOutputScrollLockAction.LABEL) ]; diff --git a/src/vs/workbench/parts/output/browser/outputServices.ts b/src/vs/workbench/parts/output/browser/outputServices.ts index 14d6262f3e4..be9bb2a71c2 100644 --- a/src/vs/workbench/parts/output/browser/outputServices.ts +++ b/src/vs/workbench/parts/output/browser/outputServices.ts @@ -29,6 +29,7 @@ import { Position } from 'vs/editor/common/core/position'; import { IFileService, FileChangeType } from 'vs/platform/files/common/files'; import { IPanel } from 'vs/workbench/common/panel'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; @@ -249,7 +250,8 @@ export class OutputService implements IOutputService { @IPanelService private panelService: IPanelService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IModelService modelService: IModelService, - @ITextModelService textModelResolverService: ITextModelService + @ITextModelService textModelResolverService: ITextModelService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, ) { const channels = this.getChannels(); this.activeChannelId = this.storageService.get(OUTPUT_ACTIVE_CHANNEL_KEY, StorageScope.WORKSPACE, channels && channels.length > 0 ? channels[0].id : null); @@ -279,6 +281,10 @@ export class OutputService implements IOutputService { .then(() => this._onActiveOutputChannel.fire(id)); } + showChannelInEditor(channelId: string): TPromise { + return this.editorService.openEditor(this.createInput(channelId)) as TPromise; + } + getChannel(id: string): IOutputChannel { if (!this.channels.has(id)) { const channelData = Registry.as(Extensions.OutputChannels).getChannel(id); @@ -340,7 +346,7 @@ export class OutputService implements IOutputService { return channel.show() .then(() => { this.storageService.store(OUTPUT_ACTIVE_CHANNEL_KEY, channelId, StorageScope.WORKSPACE); - this._outputPanel.setInput(this.createInput(this.getChannel(channelId)), EditorOptions.create({ preserveFocus: preserveFocus })); + this._outputPanel.setInput(this.createInput(channelId), EditorOptions.create({ preserveFocus: preserveFocus })); if (!preserveFocus) { this._outputPanel.focus(); } @@ -354,9 +360,10 @@ export class OutputService implements IOutputService { } } - private createInput(channel: IOutputChannel): ResourceEditorInput { - const resource = URI.from({ scheme: OUTPUT_SCHEME, path: channel.id }); - return this.instantiationService.createInstance(ResourceEditorInput, nls.localize('output', "Output"), channel ? nls.localize('channel', "for '{0}'", channel.label) : '', resource); + private createInput(channelId: string): ResourceEditorInput { + const channelData = Registry.as(Extensions.OutputChannels).getChannel(channelId); + const resource = URI.from({ scheme: OUTPUT_SCHEME, path: channelData.id }); + return this.instantiationService.createInstance(ResourceEditorInput, nls.localize('output', "{0} - Output", channelData.label), nls.localize('channel', "Output channel for '{0}'", channelData.label), resource); } } diff --git a/src/vs/workbench/parts/output/common/output.ts b/src/vs/workbench/parts/output/common/output.ts index 802538235c2..a26af0e69e4 100644 --- a/src/vs/workbench/parts/output/common/output.ts +++ b/src/vs/workbench/parts/output/common/output.ts @@ -79,6 +79,11 @@ export interface IOutputService { */ showChannel(id: string, preserveFocus?: boolean): TPromise; + /** + * Show the channel with the give id in editor + */ + showChannelInEditor(id: string): TPromise; + /** * Allows to register on Output events. */ From cbb59c682f3dae7eb9144a64fe280b3021d744d0 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 14 Dec 2017 12:39:44 +0100 Subject: [PATCH 256/615] fix git submodule decoration --- extensions/git/src/decorationProvider.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/extensions/git/src/decorationProvider.ts b/extensions/git/src/decorationProvider.ts index 20b523aa953..624cade558f 100644 --- a/extensions/git/src/decorationProvider.ts +++ b/extensions/git/src/decorationProvider.ts @@ -67,12 +67,10 @@ class GitIgnoreDecorationProvider implements DecorationProvider { class GitDecorationProvider implements DecorationProvider { - private static SubmoduleDecorationData = { - source: 'git.resource', + private static SubmoduleDecorationData: DecorationData = { title: 'Submodule', abbreviation: 'S', - color: new ThemeColor('gitDecoration.submoduleResourceForeground'), - priority: 1 + color: new ThemeColor('gitDecoration.submoduleResourceForeground') }; private readonly _onDidChangeDecorations = new EventEmitter(); @@ -90,10 +88,11 @@ class GitDecorationProvider implements DecorationProvider { private onDidRunGitStatus(): void { let newDecorations = new Map(); + + this.collectSubmoduleDecorationData(newDecorations); this.collectDecorationData(this.repository.indexGroup, newDecorations); this.collectDecorationData(this.repository.workingTreeGroup, newDecorations); this.collectDecorationData(this.repository.mergeGroup, newDecorations); - this.collectSubmoduleDecorationData(newDecorations); const uris = new Set([...this.decorations.keys()].concat([...newDecorations.keys()])); this.decorations = newDecorations; From ec75457f87131bc1e2310f4b83c0976dc121c1c0 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 14 Dec 2017 12:39:46 +0100 Subject: [PATCH 257/615] Don't rely on custom marshalling for $setLanguageConfiguration (#40169) --- .../mainThreadLanguageFeatures.ts | 55 +++++++++++++++-- src/vs/workbench/api/node/extHost.protocol.ts | 42 ++++++++++++- .../api/node/extHostLanguageFeatures.ts | 59 ++++++++++++++++++- 3 files changed, 147 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts b/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts index 5b167907a85..6d132f2dad7 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts @@ -15,9 +15,9 @@ import { wireCancellationToken } from 'vs/base/common/async'; import { CancellationToken } from 'vs/base/common/cancellation'; import { Position as EditorPosition } from 'vs/editor/common/core/position'; import { Range as EditorRange } from 'vs/editor/common/core/range'; -import { ExtHostContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape, MainContext, IExtHostContext } from '../node/extHost.protocol'; +import { ExtHostContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape, MainContext, IExtHostContext, ISerializedLanguageConfiguration, ISerializedRegExp, ISerializedIndentationRule, ISerializedOnEnterRule } from '../node/extHost.protocol'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; -import { LanguageConfiguration } from 'vs/editor/common/modes/languageConfiguration'; +import { LanguageConfiguration, IndentationRule, OnEnterRule } from 'vs/editor/common/modes/languageConfiguration'; import { IHeapService } from './mainThreadHeapService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; @@ -328,14 +328,57 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha // --- configuration - $setLanguageConfiguration(handle: number, languageId: string, _configuration: vscode.LanguageConfiguration): TPromise { + private static _reviveRegExp(regExp: ISerializedRegExp): RegExp { + if (typeof regExp === 'undefined') { + return undefined; + } + if (regExp === null) { + return null; + } + return new RegExp(regExp.pattern, regExp.flags); + } + + private static _reviveIndentationRule(indentationRule: ISerializedIndentationRule): IndentationRule { + if (typeof indentationRule === 'undefined') { + return undefined; + } + if (indentationRule === null) { + return null; + } + return { + decreaseIndentPattern: MainThreadLanguageFeatures._reviveRegExp(indentationRule.decreaseIndentPattern), + increaseIndentPattern: MainThreadLanguageFeatures._reviveRegExp(indentationRule.increaseIndentPattern), + indentNextLinePattern: MainThreadLanguageFeatures._reviveRegExp(indentationRule.indentNextLinePattern), + unIndentedLinePattern: MainThreadLanguageFeatures._reviveRegExp(indentationRule.unIndentedLinePattern), + }; + } + + private static _reviveOnEnterRule(onEnterRule: ISerializedOnEnterRule): OnEnterRule { + return { + beforeText: MainThreadLanguageFeatures._reviveRegExp(onEnterRule.beforeText), + afterText: MainThreadLanguageFeatures._reviveRegExp(onEnterRule.afterText), + action: onEnterRule.action + }; + } + + private static _reviveOnEnterRules(onEnterRules: ISerializedOnEnterRule[]): OnEnterRule[] { + if (typeof onEnterRules === 'undefined') { + return undefined; + } + if (onEnterRules === null) { + return null; + } + return onEnterRules.map(MainThreadLanguageFeatures._reviveOnEnterRule); + } + + $setLanguageConfiguration(handle: number, languageId: string, _configuration: ISerializedLanguageConfiguration): TPromise { let configuration: LanguageConfiguration = { comments: _configuration.comments, brackets: _configuration.brackets, - wordPattern: _configuration.wordPattern, - indentationRules: _configuration.indentationRules, - onEnterRules: _configuration.onEnterRules, + wordPattern: MainThreadLanguageFeatures._reviveRegExp(_configuration.wordPattern), + indentationRules: MainThreadLanguageFeatures._reviveIndentationRule(_configuration.indentationRules), + onEnterRules: MainThreadLanguageFeatures._reviveOnEnterRules(_configuration.onEnterRules), autoClosingPairs: null, surroundingPairs: null, diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 6ccd0a23735..27dede21af7 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -51,6 +51,7 @@ import { SerializedError } from 'vs/base/common/errors'; import { IStat, IFileChange } from 'vs/platform/files/common/files'; import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; +import { CommentRule, CharacterPair, EnterAction } from 'vs/editor/common/modes/languageConfiguration'; export interface IEnvironment { isExtensionDevelopmentDebug: boolean; @@ -234,6 +235,45 @@ export interface MainThreadErrorsShape extends IDisposable { $onUnexpectedError(err: any | SerializedError): void; } +export interface ISerializedRegExp { + pattern: string; + flags?: string; +} +export interface ISerializedIndentationRule { + decreaseIndentPattern: ISerializedRegExp; + increaseIndentPattern: ISerializedRegExp; + indentNextLinePattern?: ISerializedRegExp; + unIndentedLinePattern?: ISerializedRegExp; +} +export interface ISerializedOnEnterRule { + beforeText: ISerializedRegExp; + afterText?: ISerializedRegExp; + action: EnterAction; +} +export interface ISerializedLanguageConfiguration { + comments?: CommentRule; + brackets?: CharacterPair[]; + wordPattern?: ISerializedRegExp; + indentationRules?: ISerializedIndentationRule; + onEnterRules?: ISerializedOnEnterRule[]; + __electricCharacterSupport?: { + brackets?: any; + docComment?: { + scope: string; + open: string; + lineStart: string; + close?: string; + }; + }; + __characterPairSupport?: { + autoClosingPairs: { + open: string; + close: string; + notIn?: string[]; + }[]; + }; +} + export interface MainThreadLanguageFeaturesShape extends IDisposable { $unregister(handle: number): TPromise; $registerOutlineSupport(handle: number, selector: vscode.DocumentSelector): TPromise; @@ -255,7 +295,7 @@ export interface MainThreadLanguageFeaturesShape extends IDisposable { $registerSignatureHelpProvider(handle: number, selector: vscode.DocumentSelector, triggerCharacter: string[]): TPromise; $registerDocumentLinkProvider(handle: number, selector: vscode.DocumentSelector): TPromise; $registerDocumentColorProvider(handle: number, selector: vscode.DocumentSelector): TPromise; - $setLanguageConfiguration(handle: number, languageId: string, configuration: vscode.LanguageConfiguration): TPromise; + $setLanguageConfiguration(handle: number, languageId: string, configuration: ISerializedLanguageConfiguration): TPromise; } export interface MainThreadLanguagesShape extends IDisposable { diff --git a/src/vs/workbench/api/node/extHostLanguageFeatures.ts b/src/vs/workbench/api/node/extHostLanguageFeatures.ts index 805b3284833..1713aaa154a 100644 --- a/src/vs/workbench/api/node/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/node/extHostLanguageFeatures.ts @@ -17,7 +17,7 @@ import { ExtHostDocuments } from 'vs/workbench/api/node/extHostDocuments'; import { ExtHostCommands, CommandsConverter } from 'vs/workbench/api/node/extHostCommands'; import { ExtHostDiagnostics, DiagnosticCollection } from 'vs/workbench/api/node/extHostDiagnostics'; import { asWinJsPromise } from 'vs/base/common/async'; -import { MainContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape, ObjectIdentifier, IRawColorInfo, IMainContext, IExtHostSuggestResult, IExtHostSuggestion, IWorkspaceSymbols, IWorkspaceSymbol, IdObject } from './extHost.protocol'; +import { MainContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape, ObjectIdentifier, IRawColorInfo, IMainContext, IExtHostSuggestResult, IExtHostSuggestion, IWorkspaceSymbols, IWorkspaceSymbol, IdObject, ISerializedRegExp, ISerializedIndentationRule, ISerializedOnEnterRule, ISerializedLanguageConfiguration } from './extHost.protocol'; import { regExpLeadsToEndlessLoop } from 'vs/base/common/strings'; import { IPosition } from 'vs/editor/common/core/position'; import { IRange } from 'vs/editor/common/core/range'; @@ -1089,6 +1089,52 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { // --- configuration + private static _serializeRegExp(regExp: RegExp): ISerializedRegExp { + if (typeof regExp === 'undefined') { + return undefined; + } + if (regExp === null) { + return null; + } + return { + pattern: regExp.source, + flags: (regExp.global ? 'g' : '') + (regExp.ignoreCase ? 'i' : '') + (regExp.multiline ? 'm' : ''), + }; + } + + private static _serializeIndentationRule(indentationRule: vscode.IndentationRule): ISerializedIndentationRule { + if (typeof indentationRule === 'undefined') { + return undefined; + } + if (indentationRule === null) { + return null; + } + return { + decreaseIndentPattern: ExtHostLanguageFeatures._serializeRegExp(indentationRule.decreaseIndentPattern), + increaseIndentPattern: ExtHostLanguageFeatures._serializeRegExp(indentationRule.increaseIndentPattern), + indentNextLinePattern: ExtHostLanguageFeatures._serializeRegExp(indentationRule.indentNextLinePattern), + unIndentedLinePattern: ExtHostLanguageFeatures._serializeRegExp(indentationRule.unIndentedLinePattern), + }; + } + + private static _serializeOnEnterRule(onEnterRule: vscode.OnEnterRule): ISerializedOnEnterRule { + return { + beforeText: ExtHostLanguageFeatures._serializeRegExp(onEnterRule.beforeText), + afterText: ExtHostLanguageFeatures._serializeRegExp(onEnterRule.afterText), + action: onEnterRule.action + }; + } + + private static _serializeOnEnterRules(onEnterRules: vscode.OnEnterRule[]): ISerializedOnEnterRule[] { + if (typeof onEnterRules === 'undefined') { + return undefined; + } + if (onEnterRules === null) { + return null; + } + return onEnterRules.map(ExtHostLanguageFeatures._serializeOnEnterRule); + } + setLanguageConfiguration(languageId: string, configuration: vscode.LanguageConfiguration): vscode.Disposable { let { wordPattern } = configuration; @@ -1105,7 +1151,16 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { } const handle = this._nextHandle(); - this._proxy.$setLanguageConfiguration(handle, languageId, configuration); + const serializedConfiguration: ISerializedLanguageConfiguration = { + comments: configuration.comments, + brackets: configuration.brackets, + wordPattern: ExtHostLanguageFeatures._serializeRegExp(configuration.wordPattern), + indentationRules: ExtHostLanguageFeatures._serializeIndentationRule(configuration.indentationRules), + onEnterRules: ExtHostLanguageFeatures._serializeOnEnterRules(configuration.onEnterRules), + __electricCharacterSupport: configuration.__electricCharacterSupport, + __characterPairSupport: configuration.__characterPairSupport, + }; + this._proxy.$setLanguageConfiguration(handle, languageId, serializedConfiguration); return this._createDisposable(handle); } } From 55623887c7d0a4cc6c2e74aacc4158716f43b39e Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 14 Dec 2017 12:42:20 +0100 Subject: [PATCH 258/615] #39638 Use id if label is not available --- src/vs/workbench/parts/output/browser/outputServices.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/output/browser/outputServices.ts b/src/vs/workbench/parts/output/browser/outputServices.ts index be9bb2a71c2..5e67c1e3bde 100644 --- a/src/vs/workbench/parts/output/browser/outputServices.ts +++ b/src/vs/workbench/parts/output/browser/outputServices.ts @@ -361,9 +361,10 @@ export class OutputService implements IOutputService { } private createInput(channelId: string): ResourceEditorInput { + const resource = URI.from({ scheme: OUTPUT_SCHEME, path: channelId }); const channelData = Registry.as(Extensions.OutputChannels).getChannel(channelId); - const resource = URI.from({ scheme: OUTPUT_SCHEME, path: channelData.id }); - return this.instantiationService.createInstance(ResourceEditorInput, nls.localize('output', "{0} - Output", channelData.label), nls.localize('channel', "Output channel for '{0}'", channelData.label), resource); + const label = channelData ? channelData.label : channelId; + return this.instantiationService.createInstance(ResourceEditorInput, nls.localize('output', "{0} - Output", label), nls.localize('channel', "Output channel for '{0}'", label), resource); } } From 7b6901d40cfbe1e9af41ba7383ae842b74117a24 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 14 Dec 2017 13:00:31 +0100 Subject: [PATCH 259/615] file - make sure to check if file is write protected again after running chmod --- .../electron-browser/saveErrorHandler.ts | 2 +- .../services/files/node/fileService.ts | 34 +++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts b/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts index 21c71d72ea6..4512e238c9b 100644 --- a/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts +++ b/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts @@ -174,7 +174,7 @@ export class SaveErrorHandler implements ISaveErrorHandler, IWorkbenchContributi let errorMessage: string; if (isReadonly) { - errorMessage = nls.localize('readonlySaveError', "Failed to save '{0}': File is write protected. Select 'Overwrite' to remove protection.", paths.basename(resource.fsPath)); + errorMessage = nls.localize('readonlySaveError', "Failed to save '{0}': File is write protected. Select 'Overwrite' to attempt to remove protection.", paths.basename(resource.fsPath)); } else { errorMessage = nls.localize('genericSaveError', "Failed to save '{0}': {1}", paths.basename(resource.fsPath), toErrorMessage(error, false)); } diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index 29546e8fb3d..75a3de27e5e 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -918,21 +918,26 @@ export class FileService implements IFileService { } } - let mode = stat.mode; - const readonly = !(mode & 128); - // Throw if file is readonly and we are not instructed to overwrite - if (readonly && !options.overwriteReadonly) { - return TPromise.wrapError(new FileOperationError( - nls.localize('fileReadOnlyError', "File is Read Only"), - FileOperationResult.FILE_READ_ONLY - )); - } + if (!(stat.mode & 128) /* readonly */) { + if (!options.overwriteReadonly) { + return this.readOnlyError(); + } - if (readonly) { + // Try to change mode to writeable + let mode = stat.mode; mode = mode | 128; + return pfs.chmod(absolutePath, mode).then(() => { - return pfs.chmod(absolutePath, mode).then(() => exists); + // Make sure to check the mode again, it could have failed + return pfs.stat(absolutePath).then(stat => { + if (!(stat.mode & 128) /* readonly */) { + return this.readOnlyError(); + } + + return exists; + }); + }); } return TPromise.as(exists); @@ -943,6 +948,13 @@ export class FileService implements IFileService { }); } + private readOnlyError(): TPromise { + return TPromise.wrapError(new FileOperationError( + nls.localize('fileReadOnlyError', "File is Read Only"), + FileOperationResult.FILE_READ_ONLY + )); + } + public watchFileChanges(resource: uri): void { assert.ok(resource && resource.scheme === 'file', `Invalid resource for watching: ${resource}`); From 7a5c6c32c14502978c898cce367ae9bfeefd2958 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 14 Dec 2017 14:57:50 +0100 Subject: [PATCH 260/615] Remove action to open the channel in editor --- src/vs/workbench/parts/output/browser/outputPanel.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/output/browser/outputPanel.ts b/src/vs/workbench/parts/output/browser/outputPanel.ts index 052a572f829..ffa003b09d7 100644 --- a/src/vs/workbench/parts/output/browser/outputPanel.ts +++ b/src/vs/workbench/parts/output/browser/outputPanel.ts @@ -19,7 +19,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { EditorInput, EditorOptions } from 'vs/workbench/common/editor'; import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResourceEditor'; import { OUTPUT_PANEL_ID, IOutputService, CONTEXT_IN_OUTPUT } from 'vs/workbench/parts/output/common/output'; -import { SwitchOutputAction, SwitchOutputActionItem, ClearOutputAction, ToggleOutputScrollLockAction, OpenInEditorAction } from 'vs/workbench/parts/output/browser/outputActions'; +import { SwitchOutputAction, SwitchOutputActionItem, ClearOutputAction, ToggleOutputScrollLockAction } from 'vs/workbench/parts/output/browser/outputActions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; @@ -55,7 +55,6 @@ export class OutputPanel extends TextResourceEditor { this.actions = [ this.instantiationService.createInstance(SwitchOutputAction), this.instantiationService.createInstance(ClearOutputAction, ClearOutputAction.ID, ClearOutputAction.LABEL), - this.instantiationService.createInstance(OpenInEditorAction, OpenInEditorAction.ID, OpenInEditorAction.LABEL), this.instantiationService.createInstance(ToggleOutputScrollLockAction, ToggleOutputScrollLockAction.ID, ToggleOutputScrollLockAction.LABEL) ]; From b7fad651ac6188c6440822dae164a0c900740b4c Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 14 Dec 2017 15:05:28 +0100 Subject: [PATCH 261/615] fix bad uri duplication --- extensions/git/src/uri.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/git/src/uri.ts b/extensions/git/src/uri.ts index 0e96b3504b0..70b1c647b0f 100644 --- a/extensions/git/src/uri.ts +++ b/extensions/git/src/uri.ts @@ -38,9 +38,9 @@ export function toGitUri(uri: Uri, ref: string, options: GitUriOptions = {}): Ur let path = uri.path; if (options.replaceFileExtension) { - path = path + `${path}.git`; + path = `${path}.git`; } else if (options.submoduleOf) { - path = path + `${path}.diff`; + path = `${path}.diff`; } return uri.with({ From 35730c44b4a419e9d1944068987aa540a42c94ed Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 14 Dec 2017 15:06:32 +0100 Subject: [PATCH 262/615] remove URI usage from SCM API protocol related to #40169 --- .../api/electron-browser/mainThreadSCM.ts | 3 ++- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- src/vs/workbench/api/node/extHostSCM.ts | 14 ++++++-------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadSCM.ts b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts index ab0bab7d432..31e0348e305 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSCM.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts @@ -241,7 +241,8 @@ class MainThreadSCMProvider implements ISCMProvider { return TPromise.as(null); } - return this.proxy.$provideOriginalResource(this.handle, uri); + return this.proxy.$provideOriginalResource(this.handle, uri.toString()) + .then(result => result && URI.parse(result)); } toJSON(): any { diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 27dede21af7..37ec91f5ea4 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -645,7 +645,7 @@ export interface ExtHostTerminalServiceShape { } export interface ExtHostSCMShape { - $provideOriginalResource(sourceControlHandle: number, uri: URI): TPromise; + $provideOriginalResource(sourceControlHandle: number, uri: string): TPromise; $onInputBoxValueChange(sourceControlHandle: number, value: string): TPromise; $executeResourceCommand(sourceControlHandle: number, groupHandle: number, handle: number): TPromise; } diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 67c62b275c4..bcd3a92b97c 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -12,7 +12,7 @@ import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { asWinJsPromise } from 'vs/base/common/async'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; -import { MainContext, MainThreadSCMShape, SCMRawResource, SCMRawResourceSplice, SCMRawResourceSplices, IMainContext } from './extHost.protocol'; +import { MainContext, MainThreadSCMShape, SCMRawResource, SCMRawResourceSplice, SCMRawResourceSplices, IMainContext, ExtHostSCMShape } from './extHost.protocol'; import { sortedDiff } from 'vs/base/common/arrays'; import { comparePaths } from 'vs/base/common/comparers'; import * as vscode from 'vscode'; @@ -442,7 +442,7 @@ class ExtHostSourceControl implements vscode.SourceControl { } } -export class ExtHostSCM { +export class ExtHostSCM implements ExtHostSCMShape { private static _handlePool: number = 0; @@ -524,8 +524,8 @@ export class ExtHostSCM { return inputBox; } - $provideOriginalResource(sourceControlHandle: number, uri: URI): TPromise { - this.logService.trace('ExtHostSCM#$provideOriginalResource', sourceControlHandle, uri); + $provideOriginalResource(sourceControlHandle: number, uriString: string): TPromise { + this.logService.trace('ExtHostSCM#$provideOriginalResource', sourceControlHandle, uriString); const sourceControl = this._sourceControls.get(sourceControlHandle); @@ -533,10 +533,8 @@ export class ExtHostSCM { return TPromise.as(null); } - return asWinJsPromise(token => { - const result = sourceControl.quickDiffProvider.provideOriginalResource(uri, token); - return result && URI.parse(result.toString()); - }); + return asWinJsPromise(token => sourceControl.quickDiffProvider.provideOriginalResource(URI.parse(uriString), token)) + .then(result => result && result.toString()); } $onInputBoxValueChange(sourceControlHandle: number, value: string): TPromise { From 2d1e25598aa4d60ecdd1e8321d2495ddab158be2 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 14 Dec 2017 15:03:43 +0100 Subject: [PATCH 263/615] ExtHostLanguageFeaturesShape, #40169 --- .../mainThreadLanguageFeatures.ts | 74 ++++++++++++--- src/vs/workbench/api/node/extHost.protocol.ts | 91 ++++++++++++------- .../api/node/extHostLanguageFeatures.ts | 30 +++--- 3 files changed, 136 insertions(+), 59 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts b/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts index 6d132f2dad7..660c3a22477 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts @@ -15,13 +15,14 @@ import { wireCancellationToken } from 'vs/base/common/async'; import { CancellationToken } from 'vs/base/common/cancellation'; import { Position as EditorPosition } from 'vs/editor/common/core/position'; import { Range as EditorRange } from 'vs/editor/common/core/range'; -import { ExtHostContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape, MainContext, IExtHostContext, ISerializedLanguageConfiguration, ISerializedRegExp, ISerializedIndentationRule, ISerializedOnEnterRule } from '../node/extHost.protocol'; +import { ExtHostContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape, MainContext, IExtHostContext, ISerializedLanguageConfiguration, ISerializedRegExp, ISerializedIndentationRule, ISerializedOnEnterRule, LocationDto, SymbolInformationDto, WorkspaceEditDto, ResourceEditDto, CodeActionDto } from '../node/extHost.protocol'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { LanguageConfiguration, IndentationRule, OnEnterRule } from 'vs/editor/common/modes/languageConfiguration'; import { IHeapService } from './mainThreadHeapService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; import { toLanguageSelector } from 'vs/workbench/api/node/extHostTypeConverters'; +import URI from 'vs/base/common/uri'; @extHostNamedCustomer(MainContext.MainThreadLanguageFeatures) export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesShape { @@ -56,12 +57,63 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha return undefined; } + //#region --- revive functions + + private static _reviveLocationDto(data: LocationDto): modes.Location; + private static _reviveLocationDto(data: LocationDto[]): modes.Location[]; + private static _reviveLocationDto(data: LocationDto | LocationDto[]): modes.Location | modes.Location[] { + if (!data) { + return data; + } else if (Array.isArray(data)) { + data.forEach(l => MainThreadLanguageFeatures._reviveLocationDto(l)); + return data; + } else { + data.uri = URI.revive(data.uri); + return data; + } + } + + private static _reviveSymbolInformationDto(data: SymbolInformationDto): modes.SymbolInformation; + private static _reviveSymbolInformationDto(data: SymbolInformationDto[]): modes.SymbolInformation[]; + private static _reviveSymbolInformationDto(data: SymbolInformationDto | SymbolInformationDto[]): modes.SymbolInformation | modes.SymbolInformation[] { + if (!data) { + return data; + } else if (Array.isArray(data)) { + data.forEach(MainThreadLanguageFeatures._reviveSymbolInformationDto); + return data; + } else { + data.location = MainThreadLanguageFeatures._reviveLocationDto(data.location); + return data; + } + } + + private static _reviveResourceEditDto(data: ResourceEditDto): modes.IResourceEdit { + data.resource = URI.revive(data.resource); + return data; + } + + private static _reviveWorkspaceEditDto(data: WorkspaceEditDto): modes.WorkspaceEdit { + if (data && data.edits) { + data.edits.forEach(MainThreadLanguageFeatures._reviveResourceEditDto); + } + return data; + } + + private static _reviveCodeActionDto(data: CodeActionDto[]): modes.CodeAction[] { + if (data) { + data.forEach(code => MainThreadLanguageFeatures._reviveWorkspaceEditDto(code.edits)); + } + return data; + } + + //#endregion + // --- outline $registerOutlineSupport(handle: number, selector: vscode.DocumentSelector): TPromise { this._registrations[handle] = modes.DocumentSymbolProviderRegistry.register(toLanguageSelector(selector), { provideDocumentSymbols: (model: IReadOnlyModel, token: CancellationToken): Thenable => { - return wireCancellationToken(token, this._proxy.$provideDocumentSymbols(handle, model.uri)); + return wireCancellationToken(token, this._proxy.$provideDocumentSymbols(handle, model.uri)).then(MainThreadLanguageFeatures._reviveSymbolInformationDto); } }); return undefined; @@ -103,7 +155,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha $registerDeclaractionSupport(handle: number, selector: vscode.DocumentSelector): TPromise { this._registrations[handle] = modes.DefinitionProviderRegistry.register(toLanguageSelector(selector), { provideDefinition: (model, position, token): Thenable => { - return wireCancellationToken(token, this._proxy.$provideDefinition(handle, model.uri, position)); + return wireCancellationToken(token, this._proxy.$provideDefinition(handle, model.uri, position)).then(MainThreadLanguageFeatures._reviveLocationDto); } }); return undefined; @@ -112,7 +164,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha $registerImplementationSupport(handle: number, selector: vscode.DocumentSelector): TPromise { this._registrations[handle] = modes.ImplementationProviderRegistry.register(toLanguageSelector(selector), { provideImplementation: (model, position, token): Thenable => { - return wireCancellationToken(token, this._proxy.$provideImplementation(handle, model.uri, position)); + return wireCancellationToken(token, this._proxy.$provideImplementation(handle, model.uri, position)).then(MainThreadLanguageFeatures._reviveLocationDto); } }); return undefined; @@ -121,7 +173,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha $registerTypeDefinitionSupport(handle: number, selector: vscode.DocumentSelector): TPromise { this._registrations[handle] = modes.TypeDefinitionProviderRegistry.register(toLanguageSelector(selector), { provideTypeDefinition: (model, position, token): Thenable => { - return wireCancellationToken(token, this._proxy.$provideTypeDefinition(handle, model.uri, position)); + return wireCancellationToken(token, this._proxy.$provideTypeDefinition(handle, model.uri, position)).then(MainThreadLanguageFeatures._reviveLocationDto); } }); return undefined; @@ -154,7 +206,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha $registerReferenceSupport(handle: number, selector: vscode.DocumentSelector): TPromise { this._registrations[handle] = modes.ReferenceProviderRegistry.register(toLanguageSelector(selector), { provideReferences: (model: IReadOnlyModel, position: EditorPosition, context: modes.ReferenceContext, token: CancellationToken): Thenable => { - return wireCancellationToken(token, this._proxy.$provideReferences(handle, model.uri, position, context)); + return wireCancellationToken(token, this._proxy.$provideReferences(handle, model.uri, position, context)).then(MainThreadLanguageFeatures._reviveLocationDto); } }); return undefined; @@ -165,7 +217,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha $registerQuickFixSupport(handle: number, selector: vscode.DocumentSelector): TPromise { this._registrations[handle] = modes.CodeActionProviderRegistry.register(toLanguageSelector(selector), { provideCodeActions: (model: IReadOnlyModel, range: EditorRange, token: CancellationToken): Thenable => { - return this._heapService.trackRecursive(wireCancellationToken(token, this._proxy.$provideCodeActions(handle, model.uri, range))); + return this._heapService.trackRecursive(wireCancellationToken(token, this._proxy.$provideCodeActions(handle, model.uri, range))).then(MainThreadLanguageFeatures._reviveCodeActionDto); } }); return undefined; @@ -209,17 +261,16 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha let lastResultId: number; this._registrations[handle] = WorkspaceSymbolProviderRegistry.register({ provideWorkspaceSymbols: (search: string): TPromise => { - return this._proxy.$provideWorkspaceSymbols(handle, search).then(result => { if (lastResultId !== undefined) { this._proxy.$releaseWorkspaceSymbols(handle, lastResultId); } lastResultId = result._id; - return result.symbols; + return MainThreadLanguageFeatures._reviveSymbolInformationDto(result.symbols); }); }, resolveWorkspaceSymbol: (item: modes.SymbolInformation): TPromise => { - return this._proxy.$resolveWorkspaceSymbol(handle, item); + return this._proxy.$resolveWorkspaceSymbol(handle, item).then(i => MainThreadLanguageFeatures._reviveSymbolInformationDto(i)); } }); return undefined; @@ -230,7 +281,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha $registerRenameSupport(handle: number, selector: vscode.DocumentSelector): TPromise { this._registrations[handle] = modes.RenameProviderRegistry.register(toLanguageSelector(selector), { provideRenameEdits: (model: IReadOnlyModel, position: EditorPosition, newName: string, token: CancellationToken): Thenable => { - return wireCancellationToken(token, this._proxy.$provideRenameEdits(handle, model.uri, position, newName)); + return wireCancellationToken(token, this._proxy.$provideRenameEdits(handle, model.uri, position, newName)).then(MainThreadLanguageFeatures._reviveWorkspaceEditDto); } }); return undefined; @@ -239,7 +290,6 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha // --- suggest $registerSuggestSupport(handle: number, selector: vscode.DocumentSelector, triggerCharacters: string[], supportsResolveDetails: boolean): TPromise { - this._registrations[handle] = modes.SuggestRegistry.register(toLanguageSelector(selector), { triggerCharacters, provideCompletionItems: (model: IReadOnlyModel, position: EditorPosition, context: modes.SuggestContext, token: CancellationToken): Thenable => { diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 37ec91f5ea4..0b7b069eab5 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -580,51 +580,78 @@ export interface IRawColorInfo { range: IRange; } -export interface IExtHostSuggestion extends modes.ISuggestion { - _id: number; - _parentId: number; -} - -export interface IExtHostSuggestResult { - _id: number; - suggestions: IExtHostSuggestion[]; - incomplete?: boolean; -} - -export interface IdObject { - _id: number; -} - -export namespace IdObject { - let n = 0; - export function mixin(object: T): T & IdObject { - (object)._id = n++; +export class IdObject { + _id?: number; + private static _n = 0; + static mixin(object: T): T & IdObject { + (object)._id = IdObject._n++; return object; } } -export type IWorkspaceSymbol = IdObject & modes.SymbolInformation; -export interface IWorkspaceSymbols extends IdObject { symbols: IWorkspaceSymbol[]; } +export interface SuggestionDto extends modes.ISuggestion { + _id: number; + _parentId: number; +} + +export interface SuggestResultDto extends IdObject { + suggestions: SuggestionDto[]; + incomplete?: boolean; +} + +export interface LocationDto { + uri: UriComponents; + range: IRange; +} + +export interface SymbolInformationDto extends IdObject { + name: string; + containerName?: string; + kind: modes.SymbolKind; + location: LocationDto; +} + +export interface WorkspaceSymbolsDto extends IdObject { + symbols: SymbolInformationDto[]; +} + +export interface ResourceEditDto { + resource: UriComponents; + range: IRange; + newText: string; +} + +export interface WorkspaceEditDto { + edits: ResourceEditDto[]; + rejectReason?: string; +} + +export interface CodeActionDto { + title: string; + edits?: WorkspaceEditDto; + diagnostics?: IMarkerData[]; + command?: modes.Command; +} export interface ExtHostLanguageFeaturesShape { - $provideDocumentSymbols(handle: number, resource: UriComponents): TPromise; + $provideDocumentSymbols(handle: number, resource: UriComponents): TPromise; $provideCodeLenses(handle: number, resource: UriComponents): TPromise; $resolveCodeLens(handle: number, resource: UriComponents, symbol: modes.ICodeLensSymbol): TPromise; - $provideDefinition(handle: number, resource: UriComponents, position: IPosition): TPromise; - $provideImplementation(handle: number, resource: UriComponents, position: IPosition): TPromise; - $provideTypeDefinition(handle: number, resource: UriComponents, position: IPosition): TPromise; + $provideDefinition(handle: number, resource: UriComponents, position: IPosition): TPromise; + $provideImplementation(handle: number, resource: UriComponents, position: IPosition): TPromise; + $provideTypeDefinition(handle: number, resource: UriComponents, position: IPosition): TPromise; $provideHover(handle: number, resource: UriComponents, position: IPosition): TPromise; $provideDocumentHighlights(handle: number, resource: UriComponents, position: IPosition): TPromise; - $provideReferences(handle: number, resource: UriComponents, position: IPosition, context: modes.ReferenceContext): TPromise; - $provideCodeActions(handle: number, resource: UriComponents, range: IRange): TPromise; + $provideReferences(handle: number, resource: UriComponents, position: IPosition, context: modes.ReferenceContext): TPromise; + $provideCodeActions(handle: number, resource: UriComponents, range: IRange): TPromise; $provideDocumentFormattingEdits(handle: number, resource: UriComponents, options: modes.FormattingOptions): TPromise; $provideDocumentRangeFormattingEdits(handle: number, resource: UriComponents, range: IRange, options: modes.FormattingOptions): TPromise; $provideOnTypeFormattingEdits(handle: number, resource: UriComponents, position: IPosition, ch: string, options: modes.FormattingOptions): TPromise; - $provideWorkspaceSymbols(handle: number, search: string): TPromise; - $resolveWorkspaceSymbol(handle: number, symbol: modes.SymbolInformation): TPromise; + $provideWorkspaceSymbols(handle: number, search: string): TPromise; + $resolveWorkspaceSymbol(handle: number, symbol: SymbolInformationDto): TPromise; $releaseWorkspaceSymbols(handle: number, id: number): void; - $provideRenameEdits(handle: number, resource: UriComponents, position: IPosition, newName: string): TPromise; - $provideCompletionItems(handle: number, resource: UriComponents, position: IPosition, context: modes.SuggestContext): TPromise; + $provideRenameEdits(handle: number, resource: UriComponents, position: IPosition, newName: string): TPromise; + $provideCompletionItems(handle: number, resource: UriComponents, position: IPosition, context: modes.SuggestContext): TPromise; $resolveCompletionItem(handle: number, resource: UriComponents, position: IPosition, suggestion: modes.ISuggestion): TPromise; $releaseCompletionItems(handle: number, id: number): void; $provideSignatureHelp(handle: number, resource: UriComponents, position: IPosition): TPromise; @@ -748,7 +775,7 @@ export const ExtHostContext = { ExtHostFileSystem: createExtId('ExtHostFileSystem'), ExtHostFileSystemEventService: createExtId('ExtHostFileSystemEventService'), ExtHostHeapService: createExtId('ExtHostHeapMonitor'), - ExtHostLanguageFeatures: createExtId('ExtHostLanguageFeatures', ProxyType.CustomMarshaller), + ExtHostLanguageFeatures: createExtId('ExtHostLanguageFeatures'), ExtHostQuickOpen: createExtId('ExtHostQuickOpen'), ExtHostExtensionService: createExtId('ExtHostExtensionService'), ExtHostTerminalService: createExtId('ExtHostTerminalService'), diff --git a/src/vs/workbench/api/node/extHostLanguageFeatures.ts b/src/vs/workbench/api/node/extHostLanguageFeatures.ts index 1713aaa154a..2425ca991c8 100644 --- a/src/vs/workbench/api/node/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/node/extHostLanguageFeatures.ts @@ -17,7 +17,7 @@ import { ExtHostDocuments } from 'vs/workbench/api/node/extHostDocuments'; import { ExtHostCommands, CommandsConverter } from 'vs/workbench/api/node/extHostCommands'; import { ExtHostDiagnostics, DiagnosticCollection } from 'vs/workbench/api/node/extHostDiagnostics'; import { asWinJsPromise } from 'vs/base/common/async'; -import { MainContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape, ObjectIdentifier, IRawColorInfo, IMainContext, IExtHostSuggestResult, IExtHostSuggestion, IWorkspaceSymbols, IWorkspaceSymbol, IdObject, ISerializedRegExp, ISerializedIndentationRule, ISerializedOnEnterRule, ISerializedLanguageConfiguration } from './extHost.protocol'; +import { MainContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape, ObjectIdentifier, IRawColorInfo, IMainContext, IdObject, ISerializedRegExp, ISerializedIndentationRule, ISerializedOnEnterRule, ISerializedLanguageConfiguration, SymbolInformationDto, SuggestResultDto, WorkspaceSymbolsDto, SuggestionDto } from './extHost.protocol'; import { regExpLeadsToEndlessLoop } from 'vs/base/common/strings'; import { IPosition } from 'vs/editor/common/core/position'; import { IRange } from 'vs/editor/common/core/range'; @@ -35,11 +35,11 @@ class OutlineAdapter { this._provider = provider; } - provideDocumentSymbols(resource: URI): TPromise { + provideDocumentSymbols(resource: URI): TPromise { let doc = this._documents.getDocumentData(resource).document; return asWinJsPromise(token => this._provider.provideDocumentSymbols(doc, token)).then(value => { if (Array.isArray(value)) { - return value.map(TypeConverters.fromSymbolInformation); + return value.map(symbol => IdObject.mixin(TypeConverters.fromSymbolInformation(symbol))); } return undefined; }); @@ -413,8 +413,8 @@ class NavigateTypeAdapter { this._provider = provider; } - provideWorkspaceSymbols(search: string): TPromise { - const result: IWorkspaceSymbols = IdObject.mixin({ symbols: [] }); + provideWorkspaceSymbols(search: string): TPromise { + const result: WorkspaceSymbolsDto = IdObject.mixin({ symbols: [] }); return asWinJsPromise(token => this._provider.provideWorkspaceSymbols(search, token)).then(value => { if (!isFalsyOrEmpty(value)) { for (const item of value) { @@ -439,7 +439,7 @@ class NavigateTypeAdapter { }); } - resolveWorkspaceSymbol(symbol: IWorkspaceSymbol): TPromise { + resolveWorkspaceSymbol(symbol: SymbolInformationDto): TPromise { if (typeof this._provider.resolveWorkspaceSymbol !== 'function') { return TPromise.as(symbol); @@ -524,7 +524,7 @@ class SuggestAdapter { this._provider = provider; } - provideCompletionItems(resource: URI, position: IPosition, context: modes.SuggestContext): TPromise { + provideCompletionItems(resource: URI, position: IPosition, context: modes.SuggestContext): TPromise { const doc = this._documents.getDocumentData(resource).document; const pos = TypeConverters.toPosition(position); @@ -535,7 +535,7 @@ class SuggestAdapter { const _id = this._idPool++; - const result: IExtHostSuggestResult = { + const result: SuggestResultDto = { _id, suggestions: [], }; @@ -577,7 +577,7 @@ class SuggestAdapter { return TPromise.as(suggestion); } - const { _parentId, _id } = (suggestion); + const { _parentId, _id } = (suggestion); const item = this._cache.has(_parentId) && this._cache.get(_parentId)[_id]; if (!item) { return TPromise.as(suggestion); @@ -605,13 +605,13 @@ class SuggestAdapter { this._cache.delete(id); } - private _convertCompletionItem(item: vscode.CompletionItem, position: vscode.Position, defaultRange: vscode.Range, _id: number, _parentId: number): IExtHostSuggestion { + private _convertCompletionItem(item: vscode.CompletionItem, position: vscode.Position, defaultRange: vscode.Range, _id: number, _parentId: number): SuggestionDto { if (typeof item.label !== 'string' || item.label.length === 0) { console.warn('INVALID text edit -> must have at least a label'); return undefined; } - const result: IExtHostSuggestion = { + const result: SuggestionDto = { // _id, _parentId, @@ -835,7 +835,7 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideDocumentSymbols(handle: number, resource: UriComponents): TPromise { + $provideDocumentSymbols(handle: number, resource: UriComponents): TPromise { return this._withAdapter(handle, OutlineAdapter, adapter => adapter.provideDocumentSymbols(URI.revive(resource))); } @@ -996,11 +996,11 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideWorkspaceSymbols(handle: number, search: string): TPromise { + $provideWorkspaceSymbols(handle: number, search: string): TPromise { return this._withAdapter(handle, NavigateTypeAdapter, adapter => adapter.provideWorkspaceSymbols(search)); } - $resolveWorkspaceSymbol(handle: number, symbol: IWorkspaceSymbol): TPromise { + $resolveWorkspaceSymbol(handle: number, symbol: SymbolInformationDto): TPromise { return this._withAdapter(handle, NavigateTypeAdapter, adapter => adapter.resolveWorkspaceSymbol(symbol)); } @@ -1030,7 +1030,7 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { return this._createDisposable(handle); } - $provideCompletionItems(handle: number, resource: UriComponents, position: IPosition, context: modes.SuggestContext): TPromise { + $provideCompletionItems(handle: number, resource: UriComponents, position: IPosition, context: modes.SuggestContext): TPromise { return this._withAdapter(handle, SuggestAdapter, adapter => adapter.provideCompletionItems(URI.revive(resource), position, context)); } From 785aac7d10d36c1a41fef6f155801738922a76c7 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 14 Dec 2017 15:17:11 +0100 Subject: [PATCH 264/615] fix #40209 --- src/vs/base/common/performance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/common/performance.js b/src/vs/base/common/performance.js index 2bea079a8e2..a7ebc4c627c 100644 --- a/src/vs/base/common/performance.js +++ b/src/vs/base/common/performance.js @@ -31,7 +31,7 @@ define([], function () { } function exportEntries() { - return global._performanceEntries.splice(0); + return global._performanceEntries.slice(0); } function getEntries(type, name) { From 8f18e87477029d63ccf17fa69d990b0ee685c47e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 14 Dec 2017 15:46:03 +0100 Subject: [PATCH 265/615] ExtHostCommands, MainThreadCommands, #40169 --- .../electron-browser/mainThreadCommands.ts | 4 ++ src/vs/workbench/api/node/extHost.protocol.ts | 4 +- src/vs/workbench/api/node/extHostCommands.ts | 51 +++++++++---------- 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadCommands.ts b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts index 4351231a41b..050e27b59d0 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadCommands.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts @@ -9,6 +9,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { TPromise } from 'vs/base/common/winjs.base'; import { ExtHostContext, MainThreadCommandsShape, ExtHostCommandsShape, MainContext, IExtHostContext } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; +import { revive } from 'vs/base/common/marshalling'; @extHostNamedCustomer(MainContext.MainThreadCommands) export class MainThreadCommands implements MainThreadCommandsShape { @@ -70,6 +71,9 @@ export class MainThreadCommands implements MainThreadCommandsShape { } $executeCommand(id: string, args: any[]): Thenable { + for (let i = 0; i < args.length; i++) { + args[i] = revive(args[i], 0); + } return this._commandService.executeCommand(id, ...args); } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 0b7b069eab5..ed498be9850 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -731,7 +731,7 @@ export interface ExtHostWindowShape { // --- proxy identifiers export const MainContext = { - MainThreadCommands: >createMainId('MainThreadCommands', ProxyType.CustomMarshaller), + MainThreadCommands: >createMainId('MainThreadCommands'), MainThreadConfiguration: createMainId('MainThreadConfiguration', ProxyType.CustomMarshaller), MainThreadDebugService: createMainId('MainThreadDebugService', ProxyType.CustomMarshaller), MainThreadDecorations: createMainId('MainThreadDecorations'), @@ -761,7 +761,7 @@ export const MainContext = { }; export const ExtHostContext = { - ExtHostCommands: createExtId('ExtHostCommands', ProxyType.CustomMarshaller), + ExtHostCommands: createExtId('ExtHostCommands'), ExtHostConfiguration: createExtId('ExtHostConfiguration', ProxyType.CustomMarshaller), ExtHostDiagnostics: createExtId('ExtHostDiagnostics'), ExtHostDebugService: createExtId('ExtHostDebugService', ProxyType.CustomMarshaller), diff --git a/src/vs/workbench/api/node/extHostCommands.ts b/src/vs/workbench/api/node/extHostCommands.ts index 1167a321ffc..97ee3eb8232 100644 --- a/src/vs/workbench/api/node/extHostCommands.ts +++ b/src/vs/workbench/api/node/extHostCommands.ts @@ -15,6 +15,7 @@ import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import * as modes from 'vs/editor/common/modes'; import * as vscode from 'vscode'; import { ILogService } from 'vs/platform/log/common/log'; +import { revive } from 'vs/base/common/marshalling'; interface CommandHandler { callback: Function; @@ -28,18 +29,21 @@ export interface ArgumentProcessor { export class ExtHostCommands implements ExtHostCommandsShape { - private _commands = new Map(); - private _proxy: MainThreadCommandsShape; - private _converter: CommandsConverter; - private _argumentProcessors: ArgumentProcessor[] = []; + private readonly _commands = new Map(); + private readonly _proxy: MainThreadCommandsShape; + private readonly _converter: CommandsConverter; + private readonly _logService: ILogService; + private readonly _argumentProcessors: ArgumentProcessor[]; constructor( mainContext: IMainContext, heapService: ExtHostHeapService, - private logService: ILogService + logService: ILogService ) { this._proxy = mainContext.getProxy(MainContext.MainThreadCommands); this._converter = new CommandsConverter(this, heapService); + this._logService = logService; + this._argumentProcessors = [{ processArgument(a) { return revive(a, 0); } }]; } get converter(): CommandsConverter { @@ -51,7 +55,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { } registerCommand(id: string, callback: (...args: any[]) => T | Thenable, thisArg?: any, description?: ICommandHandlerDescription): extHostTypes.Disposable { - this.logService.trace('ExtHostCommands#registerCommand', id); + this._logService.trace('ExtHostCommands#registerCommand', id); if (!id.trim().length) { throw new Error('invalid id'); @@ -72,12 +76,12 @@ export class ExtHostCommands implements ExtHostCommandsShape { } executeCommand(id: string, ...args: any[]): Thenable { - this.logService.trace('ExtHostCommands#executeCommand', id); + this._logService.trace('ExtHostCommands#executeCommand', id); if (this._commands.has(id)) { // we stay inside the extension host and support // to pass any kind of parameters around - return this.$executeContributedCommand(id, ...args); + return this._executeContributedCommand(id, args); } else { // automagically convert some argument types @@ -99,17 +103,10 @@ export class ExtHostCommands implements ExtHostCommandsShape { return this._proxy.$executeCommand(id, args); } - } - $executeContributedCommand(id: string, ...args: any[]): Thenable { - let command = this._commands.get(id); - if (!command) { - return Promise.reject(new Error(`Contributed command '${id}' does not exist.`)); - } - - let { callback, thisArg, description } = command; - + private _executeContributedCommand(id: string, args: any[]): Thenable { + let { callback, thisArg, description } = this._commands.get(id); if (description) { for (let i = 0; i < description.args.length; i++) { try { @@ -120,24 +117,26 @@ export class ExtHostCommands implements ExtHostCommandsShape { } } - args = args.map(arg => this._argumentProcessors.reduce((r, p) => p.processArgument(r), arg)); - try { let result = callback.apply(thisArg, args); return Promise.resolve(result); } catch (err) { - // console.log(err); - // try { - // console.log(toErrorMessage(err)); - // } catch (err) { - // // - // } + this._logService.error(err, id); return Promise.reject(new Error(`Running the contributed command:'${id}' failed.`)); } } + $executeContributedCommand(id: string, ...args: any[]): Thenable { + if (!this._commands.has(id)) { + return Promise.reject(new Error(`Contributed command '${id}' does not exist.`)); + } else { + args = args.map(arg => this._argumentProcessors.reduce((r, p) => p.processArgument(r), arg)); + return this._executeContributedCommand(id, args); + } + } + getCommands(filterUnderscoreCommands: boolean = false): Thenable { - this.logService.trace('ExtHostCommands#getCommands', filterUnderscoreCommands); + this._logService.trace('ExtHostCommands#getCommands', filterUnderscoreCommands); return this._proxy.$getCommands().then(result => { if (filterUnderscoreCommands) { From 4e9cd88e37bb6ff34d490f2dc9fa2ec7e6c45083 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 14 Dec 2017 15:50:16 +0100 Subject: [PATCH 266/615] save as admin - handle case for readonly files --- resources/linux/bin/code.sh | 4 +- src/vs/code/node/cli.ts | 25 +++++-- .../environment/common/environment.ts | 3 +- src/vs/platform/environment/node/argv.ts | 3 +- src/vs/platform/files/common/files.ts | 2 +- .../electron-browser/saveErrorHandler.ts | 68 ++++++++++++------- .../electron-browser/remoteFileService.ts | 5 +- .../services/files/node/fileService.ts | 56 ++++++++++----- 8 files changed, 111 insertions(+), 55 deletions(-) diff --git a/resources/linux/bin/code.sh b/resources/linux/bin/code.sh index 83886cc2c91..eaeabca90b8 100755 --- a/resources/linux/bin/code.sh +++ b/resources/linux/bin/code.sh @@ -3,11 +3,11 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# If root, ensure that --user-data-dir or --write-elevated-helper is specified +# If root, ensure that --user-data-dir or --sudo-write is specified if [ "$(id -u)" = "0" ]; then for i in $@ do - if [[ $i == --user-data-dir=* || $i == --write-elevated-helper ]]; then + if [[ $i == --user-data-dir=* || $i == --sudo-write ]]; then CAN_LAUNCH_AS_ROOT=1 fi done diff --git a/src/vs/code/node/cli.ts b/src/vs/code/node/cli.ts index 4da3a6af5fc..527018b0e43 100644 --- a/src/vs/code/node/cli.ts +++ b/src/vs/code/node/cli.ts @@ -57,7 +57,7 @@ export async function main(argv: string[]): TPromise { } // Write Elevated - else if (args['write-elevated-helper']) { + else if (args['sudo-write']) { const source = args._[0]; const target = args._[1]; @@ -68,14 +68,31 @@ export async function main(argv: string[]): TPromise { !fs.existsSync(source) || !fs.statSync(source).isFile() || // make sure source exists as file !fs.existsSync(target) || !fs.statSync(target).isFile() // make sure target exists as file ) { - return TPromise.wrapError(new Error('Using --write-elevated-helper with invalid arguments.')); + return TPromise.wrapError(new Error('Using --sudo-write with invalid arguments.')); } - // Write source to target try { + + // Check for readonly status and chmod if so if we are told so + let targetMode: number; + let restoreMode = false; + if (!!args['sudo-chmod']) { + targetMode = fs.statSync(target).mode; + if (!(targetMode & 128) /* readonly */) { + fs.chmodSync(target, targetMode | 128); + restoreMode = true; + } + } + + // Write source to target writeFileAndFlushSync(target, fs.readFileSync(source)); + + // Restore previous mode as needed + if (restoreMode) { + fs.chmodSync(target, targetMode); + } } catch (error) { - return TPromise.wrapError(new Error(`Using --write-elevated-helper resulted in an error: ${error}`)); + return TPromise.wrapError(new Error(`Using --sudo-write resulted in an error: ${error}`)); } return TPromise.as(null); diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts index d3fc28397ff..184147fff5f 100644 --- a/src/vs/platform/environment/common/environment.ts +++ b/src/vs/platform/environment/common/environment.ts @@ -52,7 +52,8 @@ export interface ParsedArgs { 'disable-updates'?: string; 'disable-crash-reporter'?: string; 'skip-add-to-recently-opened'?: boolean; - 'write-elevated-helper'?: boolean; + 'sudo-write'?: boolean; + 'sudo-chmod'?: boolean; } export const IEnvironmentService = createDecorator('environmentService'); diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index d546e1511ec..862f737db01 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -55,7 +55,8 @@ const options: minimist.Opts = { 'disable-crash-reporter', 'skip-add-to-recently-opened', 'status', - 'write-elevated-helper' + 'sudo-write', + 'sudo-chmod' ], alias: { add: 'a', diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 1f2c999da9f..fd9c8e96784 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -562,7 +562,7 @@ export interface IImportResult { } export class FileOperationError extends Error { - constructor(message: string, public fileOperationResult: FileOperationResult) { + constructor(message: string, public fileOperationResult: FileOperationResult, public options?: IResolveContentOptions & IUpdateContentOptions & ICreateFileOptions) { super(message); } } diff --git a/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts b/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts index 4512e238c9b..3d506004d69 100644 --- a/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts +++ b/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts @@ -101,10 +101,12 @@ export class SaveErrorHandler implements ISaveErrorHandler, IWorkbenchContributi public onSaveError(error: any, model: ITextFileEditorModel): void { let message: IMessageWithAction | string; + + const fileOperationError = error as FileOperationError; const resource = model.getResource(); // Dirty write prevention - if ((error).fileOperationResult === FileOperationResult.FILE_MODIFIED_SINCE) { + if (fileOperationError.fileOperationResult === FileOperationResult.FILE_MODIFIED_SINCE) { // If the user tried to save from the opened conflict editor, show its message again // Otherwise show the message that will lead the user into the save conflict editor. @@ -117,21 +119,48 @@ export class SaveErrorHandler implements ISaveErrorHandler, IWorkbenchContributi // Any other save error else { - const isReadonly = (error).fileOperationResult === FileOperationResult.FILE_READ_ONLY; - const isPermissionDenied = (error).fileOperationResult === FileOperationResult.FILE_PERMISSION_DENIED; const actions: Action[] = []; + const isReadonly = fileOperationError.fileOperationResult === FileOperationResult.FILE_READ_ONLY; + const triedToMakeWriteable = isReadonly && fileOperationError.options && fileOperationError.options.overwriteReadonly; + const isPermissionDenied = fileOperationError.fileOperationResult === FileOperationResult.FILE_PERMISSION_DENIED; + // Save Elevated - if (isPermissionDenied) { - actions.push(new Action('workbench.files.action.saveElevated', nls.localize('saveElevated', "Retry as Admin..."), null, true, () => { + if (isPermissionDenied || triedToMakeWriteable) { + actions.push(new Action('workbench.files.action.saveElevated', triedToMakeWriteable ? nls.localize('overwriteElevated', "Overwrite as Admin...") : nls.localize('saveElevated', "Retry as Admin..."), null, true, () => { if (!model.isDisposed()) { - model.save({ writeElevated: true }).done(null, errors.onUnexpectedError); + model.save({ + writeElevated: true, + overwriteReadonly: triedToMakeWriteable + }).done(null, errors.onUnexpectedError); } return TPromise.as(true); })); } + // Overwrite + else if (isReadonly) { + actions.push(new Action('workbench.files.action.overwrite', nls.localize('overwrite', "Overwrite"), null, true, () => { + if (!model.isDisposed()) { + model.save({ overwriteReadonly: true }).done(null, errors.onUnexpectedError); + } + + return TPromise.as(true); + })); + } + + // Retry + else { + actions.push(new Action('workbench.files.action.retry', nls.localize('retry', "Retry"), null, true, () => { + const saveFileAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); + saveFileAction.setResource(resource); + saveFileAction.run().done(() => saveFileAction.dispose(), errors.onUnexpectedError); + + return TPromise.as(true); + })); + } + // Save As actions.push(new Action('workbench.files.action.saveAs', SaveFileAsAction.LABEL, null, true, () => { const saveAsAction = this.instantiationService.createInstance(SaveFileAsAction, SaveFileAsAction.ID, SaveFileAsAction.LABEL); @@ -150,31 +179,18 @@ export class SaveErrorHandler implements ISaveErrorHandler, IWorkbenchContributi return TPromise.as(true); })); - // Retry - if (isReadonly) { - actions.push(new Action('workbench.files.action.overwrite', nls.localize('overwrite', "Overwrite"), null, true, () => { - if (!model.isDisposed()) { - model.save({ overwriteReadonly: true }).done(null, errors.onUnexpectedError); - } - - return TPromise.as(true); - })); - } else if (!isPermissionDenied) { - actions.push(new Action('workbench.files.action.retry', nls.localize('retry', "Retry"), null, true, () => { - const saveFileAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); - saveFileAction.setResource(resource); - saveFileAction.run().done(() => saveFileAction.dispose(), errors.onUnexpectedError); - - return TPromise.as(true); - })); - } - // Cancel actions.push(CancelAction); let errorMessage: string; if (isReadonly) { - errorMessage = nls.localize('readonlySaveError', "Failed to save '{0}': File is write protected. Select 'Overwrite' to attempt to remove protection.", paths.basename(resource.fsPath)); + if (triedToMakeWriteable) { + errorMessage = nls.localize('readonlySaveErrorAdmin', "Failed to save '{0}': File is write protected. Select 'Overwrite as Admin' to retry as administrator.", paths.basename(resource.fsPath)); + } else { + errorMessage = nls.localize('readonlySaveError', "Failed to save '{0}': File is write protected. Select 'Overwrite' to attempt to remove protection.", paths.basename(resource.fsPath)); + } + } else if (isPermissionDenied) { + errorMessage = nls.localize('permissionDeniedSaveError', "Failed to save '{0}': Insufficient permissions. Select 'Retry as Admin' to retry as administrator.", paths.basename(resource.fsPath)); } else { errorMessage = nls.localize('genericSaveError', "Failed to save '{0}': {1}", paths.basename(resource.fsPath), toErrorMessage(error, false)); } diff --git a/src/vs/workbench/services/files/electron-browser/remoteFileService.ts b/src/vs/workbench/services/files/electron-browser/remoteFileService.ts index 6de890c430f..c712f387483 100644 --- a/src/vs/workbench/services/files/electron-browser/remoteFileService.ts +++ b/src/vs/workbench/services/files/electron-browser/remoteFileService.ts @@ -249,7 +249,8 @@ export class RemoteFileService extends FileService { if (options.acceptTextOnly && detected.mimes.indexOf(MIME_BINARY) >= 0) { return TPromise.wrapError(new FileOperationError( localize('fileBinaryError', "File seems to be binary and cannot be opened as text"), - FileOperationResult.FILE_IS_BINARY + FileOperationResult.FILE_IS_BINARY, + options )); } @@ -324,7 +325,7 @@ export class RemoteFileService extends FileService { return prepare.then(exists => { if (exists && options && !options.overwrite) { - return TPromise.wrapError(new FileOperationError('EEXIST', FileOperationResult.FILE_MODIFIED_SINCE)); + return TPromise.wrapError(new FileOperationError('EEXIST', FileOperationResult.FILE_MODIFIED_SINCE, options)); } return this._doUpdateContent(provider, resource, content || '', {}); }).then(fileStat => { diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index 75a3de27e5e..7dc682d8818 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -262,7 +262,8 @@ export class FileService implements IFileService { if (resource.scheme !== 'file' || !resource.fsPath) { return TPromise.wrapError(new FileOperationError( nls.localize('fileInvalidPath', "Invalid file resource ({0})", resource.toString(true)), - FileOperationResult.FILE_INVALID_PATH + FileOperationResult.FILE_INVALID_PATH, + options )); } @@ -298,7 +299,8 @@ export class FileService implements IFileService { if (stat.isDirectory) { return onStatError(new FileOperationError( nls.localize('fileIsDirectoryError', "File is directory"), - FileOperationResult.FILE_IS_DIRECTORY + FileOperationResult.FILE_IS_DIRECTORY, + options )); } @@ -306,7 +308,8 @@ export class FileService implements IFileService { if (options && options.etag && options.etag === stat.etag) { return onStatError(new FileOperationError( nls.localize('fileNotModifiedError', "File not modified since"), - FileOperationResult.FILE_NOT_MODIFIED_SINCE + FileOperationResult.FILE_NOT_MODIFIED_SINCE, + options )); } @@ -314,7 +317,8 @@ export class FileService implements IFileService { if (typeof stat.size === 'number' && stat.size > MAX_FILE_SIZE) { return onStatError(new FileOperationError( nls.localize('fileTooLargeError', "File too large to open"), - FileOperationResult.FILE_TOO_LARGE + FileOperationResult.FILE_TOO_LARGE, + options )); } @@ -325,7 +329,8 @@ export class FileService implements IFileService { if (err.code === 'ENOENT') { return onStatError(new FileOperationError( nls.localize('fileNotFoundError', "File not found ({0})", resource.toString(true)), - FileOperationResult.FILE_NOT_FOUND + FileOperationResult.FILE_NOT_FOUND, + options )); } @@ -374,7 +379,8 @@ export class FileService implements IFileService { // Wrap file not found errors err = new FileOperationError( nls.localize('fileNotFoundError', "File not found ({0})", resource.toString(true)), - FileOperationResult.FILE_NOT_FOUND + FileOperationResult.FILE_NOT_FOUND, + options ); } @@ -391,7 +397,8 @@ export class FileService implements IFileService { // Wrap EISDIR errors (fs.open on a directory works, but you cannot read from it) err = new FileOperationError( nls.localize('fileIsDirectoryError', "File is directory"), - FileOperationResult.FILE_IS_DIRECTORY + FileOperationResult.FILE_IS_DIRECTORY, + options ); } if (decoder) { @@ -442,7 +449,8 @@ export class FileService implements IFileService { // stop when reading too much finish(new FileOperationError( nls.localize('fileTooLargeError', "File too large to open"), - FileOperationResult.FILE_TOO_LARGE + FileOperationResult.FILE_TOO_LARGE, + options )); } else if (err) { // some error happened @@ -464,7 +472,8 @@ export class FileService implements IFileService { // Return error early if client only accepts text and this is not text finish(new FileOperationError( nls.localize('fileBinaryError', "File seems to be binary and cannot be opened as text"), - FileOperationResult.FILE_IS_BINARY + FileOperationResult.FILE_IS_BINARY, + options )); } else { @@ -553,7 +562,8 @@ export class FileService implements IFileService { if (error.code === 'EACCES' || error.code === 'EPERM') { return TPromise.wrapError(new FileOperationError( nls.localize('filePermission', "Permission denied writing to file ({0})", resource.toString(true)), - FileOperationResult.FILE_PERMISSION_DENIED + FileOperationResult.FILE_PERMISSION_DENIED, + options )); } @@ -600,7 +610,14 @@ export class FileService implements IFileService { return (import('sudo-prompt')).then(sudoPrompt => { return new TPromise((c, e) => { const promptOptions = { name: this.options.elevationSupport.promptTitle.replace('-', ''), icns: this.options.elevationSupport.promptIcnsPath }; - sudoPrompt.exec(`"${this.options.elevationSupport.cliPath}" --write-elevated-helper "${tmpPath}" "${absolutePath}"`, promptOptions, (error: string, stdout: string, stderr: string) => { + + const sudoCommand: string[] = [`"${this.options.elevationSupport.cliPath}"`]; + if (options.overwriteReadonly) { + sudoCommand.push('--sudo-chmod'); + } + sudoCommand.push('--sudo-write', `"${tmpPath}"`, `"${absolutePath}"`); + + sudoPrompt.exec(sudoCommand.join(' '), promptOptions, (error: string, stdout: string, stderr: string) => { if (error || stderr) { e(error || stderr); } else { @@ -622,7 +639,8 @@ export class FileService implements IFileService { if (!(error instanceof FileOperationError)) { error = new FileOperationError( nls.localize('filePermission', "Permission denied writing to file ({0})", resource.toString(true)), - FileOperationResult.FILE_PERMISSION_DENIED + FileOperationResult.FILE_PERMISSION_DENIED, + options ); } @@ -645,7 +663,8 @@ export class FileService implements IFileService { if (exists && !options.overwrite) { return TPromise.wrapError(new FileOperationError( nls.localize('fileExists', "File to create already exists ({0})", resource.toString(true)), - FileOperationResult.FILE_MODIFIED_SINCE + FileOperationResult.FILE_MODIFIED_SINCE, + options )); } @@ -914,14 +933,14 @@ export class FileService implements IFileService { // Find out if content length has changed if (options.etag !== etag(stat.size, options.mtime)) { - return TPromise.wrapError(new FileOperationError(nls.localize('fileModifiedError', "File Modified Since"), FileOperationResult.FILE_MODIFIED_SINCE)); + return TPromise.wrapError(new FileOperationError(nls.localize('fileModifiedError', "File Modified Since"), FileOperationResult.FILE_MODIFIED_SINCE, options)); } } // Throw if file is readonly and we are not instructed to overwrite if (!(stat.mode & 128) /* readonly */) { if (!options.overwriteReadonly) { - return this.readOnlyError(); + return this.readOnlyError(options); } // Try to change mode to writeable @@ -932,7 +951,7 @@ export class FileService implements IFileService { // Make sure to check the mode again, it could have failed return pfs.stat(absolutePath).then(stat => { if (!(stat.mode & 128) /* readonly */) { - return this.readOnlyError(); + return this.readOnlyError(options); } return exists; @@ -948,10 +967,11 @@ export class FileService implements IFileService { }); } - private readOnlyError(): TPromise { + private readOnlyError(options: IUpdateContentOptions): TPromise { return TPromise.wrapError(new FileOperationError( nls.localize('fileReadOnlyError', "File is Read Only"), - FileOperationResult.FILE_READ_ONLY + FileOperationResult.FILE_READ_ONLY, + options )); } From 37eeab7c5a4b47e9a8574008d2779330a0e7e88f Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 14 Dec 2017 16:02:25 +0100 Subject: [PATCH 267/615] file - allow to overwrite as admin --- src/vs/workbench/services/files/node/fileService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index 7dc682d8818..3edb93a1e0b 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -597,7 +597,7 @@ export class FileService implements IFileService { const absolutePath = this.toAbsolutePath(resource); // 1.) check file - return this.checkFile(absolutePath, options).then(exists => { + return this.checkFile(absolutePath, options, options.overwriteReadonly /* ignore readonly if we overwrite readonly, this is handled via sudo later */).then(exists => { const writeOptions: IUpdateContentOptions = assign(Object.create(null), options); writeOptions.writeElevated = false; writeOptions.encoding = this.getEncoding(resource, options.encoding); @@ -920,7 +920,7 @@ export class FileService implements IFileService { return null; } - private checkFile(absolutePath: string, options: IUpdateContentOptions = Object.create(null)): TPromise { + private checkFile(absolutePath: string, options: IUpdateContentOptions = Object.create(null), ignoreReadonly?: boolean): TPromise { return pfs.exists(absolutePath).then(exists => { if (exists) { return pfs.stat(absolutePath).then(stat => { @@ -938,7 +938,7 @@ export class FileService implements IFileService { } // Throw if file is readonly and we are not instructed to overwrite - if (!(stat.mode & 128) /* readonly */) { + if (!ignoreReadonly && !(stat.mode & 128) /* readonly */) { if (!options.overwriteReadonly) { return this.readOnlyError(options); } From a0b608d9b7b6f98fb005960d6b13cca9507ad28e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 14 Dec 2017 15:55:28 +0100 Subject: [PATCH 268/615] fix null ref, #40169 --- src/vs/workbench/api/electron-browser/mainThreadDecorations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts b/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts index ff5497aa5eb..82c2e7fea3e 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts @@ -56,7 +56,7 @@ export class MainThreadDecorations implements MainThreadDecorationsShape { $onDidChange(handle: number, resources: UriComponents[]): void { const [emitter] = this._provider.get(handle); - emitter.fire(resources.map(URI.revive)); + emitter.fire(resources && resources.map(URI.revive)); } $unregisterDecorationProvider(handle: number): void { From 20adb31b67748b524978cdc89292c06cb8cf7fad Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 14 Dec 2017 16:02:03 +0100 Subject: [PATCH 269/615] only listen after getting data once, #40210 --- .../decorations/browser/decorationsService.ts | 41 ++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/services/decorations/browser/decorationsService.ts b/src/vs/workbench/services/decorations/browser/decorationsService.ts index d153ab11cf3..f49ecdddc20 100644 --- a/src/vs/workbench/services/decorations/browser/decorationsService.ts +++ b/src/vs/workbench/services/decorations/browser/decorationsService.ts @@ -230,30 +230,19 @@ class FileDecorationChangeEvent implements IResourceDecorationChangeEvent { class DecorationProviderWrapper { readonly data = TernarySearchTree.forPaths | IDecorationData>(); - private readonly _dispoable: IDisposable; + + private _listener: IDisposable; constructor( private readonly _provider: IDecorationsProvider, private readonly _uriEmitter: Emitter, private readonly _flushEmitter: Emitter ) { - this._dispoable = this._provider.onDidChange(uris => { - if (!uris) { - // flush event -> drop all data, can affect everything - this.data.clear(); - this._flushEmitter.fire({ affectsResource() { return true; } }); - - } else { - // selective changes -> drop for resource, fetch again, send event - for (const uri of uris) { - this._fetchData(uri); - } - } - }); + // } dispose(): void { - this._dispoable.dispose(); + this._listener.dispose(); this.data.clear(); } @@ -294,7 +283,11 @@ class DecorationProviderWrapper { } private _fetchData(uri: URI): IDecorationData { + // listen to provider changes only after + // we have asked it for data... + this._ensureIsListening(); + // retrieve data, do the dance const dataOrThenable = this._provider.provideDecorations(uri); if (!isThenable(dataOrThenable)) { // sync -> we have a result now @@ -320,6 +313,24 @@ class DecorationProviderWrapper { } return deco; } + + private _ensureIsListening(): void { + if (!this._listener) { + this._listener = this._provider.onDidChange(uris => { + if (!uris) { + // flush event -> drop all data, can affect everything + this.data.clear(); + this._flushEmitter.fire({ affectsResource() { return true; } }); + + } else { + // selective changes -> drop for resource, fetch again, send event + for (const uri of uris) { + this._fetchData(uri); + } + } + }); + } + } } export class FileDecorationsService implements IDecorationsService { From f1f2c19669e42db8f90d34af0d74ca95ff72e3e4 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 14 Dec 2017 16:03:01 +0100 Subject: [PATCH 270/615] fix exthost commands issue --- src/vs/workbench/api/node/extHostCommands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/node/extHostCommands.ts b/src/vs/workbench/api/node/extHostCommands.ts index 97ee3eb8232..da76af9d827 100644 --- a/src/vs/workbench/api/node/extHostCommands.ts +++ b/src/vs/workbench/api/node/extHostCommands.ts @@ -41,8 +41,8 @@ export class ExtHostCommands implements ExtHostCommandsShape { logService: ILogService ) { this._proxy = mainContext.getProxy(MainContext.MainThreadCommands); - this._converter = new CommandsConverter(this, heapService); this._logService = logService; + this._converter = new CommandsConverter(this, heapService); this._argumentProcessors = [{ processArgument(a) { return revive(a, 0); } }]; } From ea831c196a79670ab10af57f03642049a86986ec Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 14 Dec 2017 16:15:25 +0100 Subject: [PATCH 271/615] fixes #40156 --- extensions/git/src/decorationProvider.ts | 94 +++++++++++++++--------- extensions/git/src/git.ts | 3 +- extensions/git/src/repository.ts | 6 +- 3 files changed, 66 insertions(+), 37 deletions(-) diff --git a/extensions/git/src/decorationProvider.ts b/extensions/git/src/decorationProvider.ts index 624cade558f..67872ea54d8 100644 --- a/extensions/git/src/decorationProvider.ts +++ b/extensions/git/src/decorationProvider.ts @@ -10,18 +10,20 @@ import * as path from 'path'; import { Repository, GitResourceGroup, Status } from './repository'; import { Model } from './model'; import { debounce } from './decorators'; -import { filterEvent } from './util'; -import { Submodule } from './git'; +import { filterEvent, dispose } from './util'; +import { Submodule, GitErrorCodes } from './git'; + +type Callback = { resolve: (status: boolean) => void, reject: (err: any) => void }; class GitIgnoreDecorationProvider implements DecorationProvider { private readonly _onDidChangeDecorations = new EventEmitter(); readonly onDidChangeDecorations: Event = this._onDidChangeDecorations.event; - private checkIgnoreQueue = new Map void, reject: (err: any) => void }>(); + private queue = new Map; }>(); private disposables: Disposable[] = []; - constructor(private repository: Repository) { + constructor(private model: Model) { this.disposables.push( window.registerDecorationProvider(this), filterEvent(workspace.onDidSaveTextDocument, e => e.fileName.endsWith('.gitignore'))(_ => this._onDidChangeDecorations.fire()) @@ -29,14 +31,22 @@ class GitIgnoreDecorationProvider implements DecorationProvider { ); } - dispose(): void { - this.disposables.forEach(d => d.dispose()); - this.checkIgnoreQueue.clear(); - } - provideDecoration(uri: Uri): Promise { + const repository = this.model.getRepository(uri); + + if (!repository) { + return Promise.resolve(undefined); + } + + let queueItem = this.queue.get(repository.root); + + if (!queueItem) { + queueItem = { repository, queue: new Map() }; + this.queue.set(repository.root, queueItem); + } + return new Promise((resolve, reject) => { - this.checkIgnoreQueue.set(uri.fsPath, { resolve, reject }); + queueItem!.queue.set(uri.fsPath, { resolve, reject }); this.checkIgnoreSoon(); }).then(ignored => { if (ignored) { @@ -50,18 +60,31 @@ class GitIgnoreDecorationProvider implements DecorationProvider { @debounce(500) private checkIgnoreSoon(): void { - const queue = new Map(this.checkIgnoreQueue.entries()); - this.checkIgnoreQueue.clear(); - this.repository.checkIgnore([...queue.keys()]).then(ignoreSet => { - for (const [key, value] of queue.entries()) { - value.resolve(ignoreSet.has(key)); - } - }, err => { - console.error(err); - for (const [, value] of queue.entries()) { - value.reject(err); - } - }); + const queue = new Map(this.queue.entries()); + this.queue.clear(); + + for (const [, item] of queue) { + const paths = [...item.queue.keys()]; + + item.repository.checkIgnore(paths).then(ignoreSet => { + for (const [key, value] of item.queue.entries()) { + value.resolve(ignoreSet.has(key)); + } + }, err => { + if (err.gitErrorCode !== GitErrorCodes.IsInSubmodule) { + console.error(err); + } + + for (const [, value] of item.queue.entries()) { + value.reject(err); + } + }); + } + } + + dispose(): void { + this.disposables.forEach(d => d.dispose()); + this.queue.clear(); } } @@ -129,17 +152,21 @@ class GitDecorationProvider implements DecorationProvider { export class GitDecorations { - private configListener: Disposable; - private modelListener: Disposable[] = []; + private disposables: Disposable[] = []; + private modelDisposables: Disposable[] = []; private providers = new Map(); constructor(private model: Model) { - this.configListener = workspace.onDidChangeConfiguration(e => e.affectsConfiguration('git.decorations.enabled') && this.update()); + this.disposables.push(new GitIgnoreDecorationProvider(model)); + + const onEnablementChange = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.decorations.enabled')); + onEnablementChange(this.update, this, this.disposables); this.update(); } private update(): void { const enabled = workspace.getConfiguration('git').get('decorations.enabled'); + if (enabled) { this.enable(); } else { @@ -148,26 +175,25 @@ export class GitDecorations { } private enable(): void { - this.modelListener = []; - this.model.onDidOpenRepository(this.onDidOpenRepository, this, this.modelListener); - this.model.onDidCloseRepository(this.onDidCloseRepository, this, this.modelListener); + this.model.onDidOpenRepository(this.onDidOpenRepository, this, this.modelDisposables); + this.model.onDidCloseRepository(this.onDidCloseRepository, this, this.modelDisposables); this.model.repositories.forEach(this.onDidOpenRepository, this); } private disable(): void { - this.modelListener.forEach(d => d.dispose()); + this.modelDisposables = dispose(this.modelDisposables); this.providers.forEach(value => value.dispose()); this.providers.clear(); } private onDidOpenRepository(repository: Repository): void { const provider = new GitDecorationProvider(repository); - const ignoreProvider = new GitIgnoreDecorationProvider(repository); - this.providers.set(repository, Disposable.from(provider, ignoreProvider)); + this.providers.set(repository, provider); } private onDidCloseRepository(repository: Repository): void { const provider = this.providers.get(repository); + if (provider) { provider.dispose(); this.providers.delete(repository); @@ -175,9 +201,7 @@ export class GitDecorations { } dispose(): void { - this.configListener.dispose(); - this.modelListener.forEach(d => d.dispose()); - this.providers.forEach(value => value.dispose); - this.providers.clear(); + this.disable(); + this.disposables = dispose(this.disposables); } } diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 8f832d258e7..c39b96c6045 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -318,7 +318,8 @@ export const GitErrorCodes = { NoLocalChanges: 'NoLocalChanges', NoStashFound: 'NoStashFound', LocalChangesOverwritten: 'LocalChangesOverwritten', - NoUpstreamBranch: 'NoUpstreamBranch' + NoUpstreamBranch: 'NoUpstreamBranch', + IsInSubmodule: 'IsInSubmodule' }; function getGitErrorCode(stderr: string): string | undefined { diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 6b13edd659b..00be450010c 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -834,7 +834,11 @@ export class Repository implements Disposable { // paths are separated by the null-character resolve(new Set(data.split('\0'))); } else { - reject(new GitError({ stdout: data, stderr, exitCode })); + if (/ is in submodule /.test(stderr)) { + reject(new GitError({ stdout: data, stderr, exitCode, gitErrorCode: GitErrorCodes.IsInSubmodule })); + } else { + reject(new GitError({ stdout: data, stderr, exitCode })); + } } }; From 3d9d00ff4629a1f139d0765e1f5b66fabd3124a6 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 14 Dec 2017 16:17:19 +0100 Subject: [PATCH 272/615] save as admin - handle windows hidden files --- src/vs/base/node/extfs.ts | 30 ++++++++++++++----- src/vs/code/node/cli.ts | 16 +++++++++- .../services/files/node/fileService.ts | 28 ++++++++--------- 3 files changed, 51 insertions(+), 23 deletions(-) diff --git a/src/vs/base/node/extfs.ts b/src/vs/base/node/extfs.ts index b01051d4d93..b3a4121079e 100644 --- a/src/vs/base/node/extfs.ts +++ b/src/vs/base/node/extfs.ts @@ -327,14 +327,12 @@ export function mv(source: string, target: string, callback: (error: Error) => v // See https://github.com/nodejs/node/blob/v5.10.0/lib/fs.js#L1194 let canFlush = true; export function writeFileAndFlush(path: string, data: string | NodeBuffer, options: { mode?: number; flag?: string; }, callback: (error: Error) => void): void { + options = ensureOptions(options); + if (!canFlush) { return fs.writeFile(path, data, options, callback); } - if (!options) { - options = { mode: 0o666, flag: 'w' }; - } - // Open the file with same flags and mode as fs.writeFile() fs.open(path, options.flag, options.mode, (openError, fd) => { if (openError) { @@ -364,14 +362,12 @@ export function writeFileAndFlush(path: string, data: string | NodeBuffer, optio } export function writeFileAndFlushSync(path: string, data: string | NodeBuffer, options?: { mode?: number; flag?: string; }): void { + options = ensureOptions(options); + if (!canFlush) { return fs.writeFileSync(path, data, options); } - if (!options) { - options = { mode: 0o666, flag: 'w' }; - } - // Open the file with same flags and mode as fs.writeFile() const fd = fs.openSync(path, options.flag, options.mode); @@ -392,6 +388,24 @@ export function writeFileAndFlushSync(path: string, data: string | NodeBuffer, o } } +function ensureOptions(options?: { mode?: number; flag?: string; }): { mode: number, flag: string } { + if (!options) { + return { mode: 0o666, flag: 'w' }; + } + + const ensuredOptions = { mode: options.mode, flag: options.flag }; + + if (typeof ensuredOptions.mode !== 'number') { + ensuredOptions.mode = 0o666; + } + + if (typeof ensuredOptions.flag !== 'string') { + ensuredOptions.flag = 'w'; + } + + return ensuredOptions; +} + /** * Copied from: https://github.com/Microsoft/vscode-node-debug/blob/master/src/node/pathUtilities.ts#L83 * diff --git a/src/vs/code/node/cli.ts b/src/vs/code/node/cli.ts index 527018b0e43..f45bd1632c0 100644 --- a/src/vs/code/node/cli.ts +++ b/src/vs/code/node/cli.ts @@ -18,6 +18,7 @@ import { findFreePort } from 'vs/base/node/ports'; import { resolveTerminalEncoding } from 'vs/base/node/encoding'; import * as iconv from 'iconv-lite'; import { writeFileAndFlushSync } from 'vs/base/node/extfs'; +import { isWindows } from 'vs/base/common/platform'; function shouldSpawnCliProcess(argv: ParsedArgs): boolean { return !!argv['install-source'] @@ -85,7 +86,20 @@ export async function main(argv: string[]): TPromise { } // Write source to target - writeFileAndFlushSync(target, fs.readFileSync(source)); + const data = fs.readFileSync(source); + try { + writeFileAndFlushSync(target, data); + } catch (error) { + // On Windows and if the file exists with an EPERM error, we try a different strategy of saving the file + // by first truncating the file and then writing with r+ mode. This helps to save hidden files on Windows + // (see https://github.com/Microsoft/vscode/issues/931) + if (isWindows && error.code === 'EPERM') { + fs.truncateSync(target, 0); + writeFileAndFlushSync(target, data, { flag: 'r+' }); + } else { + throw error; + } + } // Restore previous mode as needed if (restoreMode) { diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index 3edb93a1e0b..aa3df9ae3a3 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -227,7 +227,7 @@ export class FileService implements IFileService { public resolveFiles(toResolve: { resource: uri, options?: IResolveFileOptions }[]): TPromise { return TPromise.join(toResolve.map(resourceAndOptions => this.resolve(resourceAndOptions.resource, resourceAndOptions.options) - .then(stat => ({ stat, success: true }), error => ({ stat: undefined, success: false })))); + .then(stat => ({ stat, success: true }), error => ({ stat: void 0, success: false })))); } public existsFile(resource: uri): TPromise { @@ -268,12 +268,12 @@ export class FileService implements IFileService { } const result: IStreamContent = { - resource: undefined, - name: undefined, - mtime: undefined, - etag: undefined, - encoding: undefined, - value: undefined + resource: void 0, + name: void 0, + mtime: void 0, + etag: void 0, + encoding: void 0, + value: void 0 }; const contentResolverToken = new CancellationTokenSource(); @@ -322,7 +322,7 @@ export class FileService implements IFileService { )); } - return undefined; + return void 0; }, err => { // Wrap file not found errors @@ -368,8 +368,8 @@ export class FileService implements IFileService { const chunkBuffer = BufferPool._64K.acquire(); const result: IContentData = { - encoding: undefined, - stream: undefined, + encoding: void 0, + stream: void 0 }; return new Promise((resolve, reject) => { @@ -483,7 +483,7 @@ export class FileService implements IFileService { handleChunk(bytesRead); } - }).then(undefined, err => { + }).then(void 0, err => { // failed to get encoding finish(err); }); @@ -540,7 +540,7 @@ export class FileService implements IFileService { return addBomPromise.then(addBom => { // 4.) set contents and resolve - return this.doSetContentsAndResolve(resource, absolutePath, value, addBom, encodingToWrite, { mode: 0o666, flag: 'w' }).then(undefined, error => { + return this.doSetContentsAndResolve(resource, absolutePath, value, addBom, encodingToWrite).then(void 0, error => { if (!exists || error.code !== 'EPERM' || !isWindows) { return TPromise.wrapError(error); } @@ -553,7 +553,7 @@ export class FileService implements IFileService { return pfs.truncate(absolutePath, 0).then(() => { // 6.) set contents (this time with r+ mode) and resolve again - return this.doSetContentsAndResolve(resource, absolutePath, value, addBom, encodingToWrite, { mode: 0o666, flag: 'r+' }); + return this.doSetContentsAndResolve(resource, absolutePath, value, addBom, encodingToWrite, { flag: 'r+' }); }); }); }); @@ -571,7 +571,7 @@ export class FileService implements IFileService { }); } - private doSetContentsAndResolve(resource: uri, absolutePath: string, value: string, addBOM: boolean, encodingToWrite: string, options: { mode?: number; flag?: string; }): TPromise { + private doSetContentsAndResolve(resource: uri, absolutePath: string, value: string, addBOM: boolean, encodingToWrite: string, options?: { mode?: number; flag?: string; }): TPromise { let writeFilePromise: TPromise; // Write fast if we do UTF 8 without BOM From a5afeca80ba1d726073d2f3cd271d1ad8a9e7a55 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 14 Dec 2017 16:26:26 +0100 Subject: [PATCH 273/615] "No Country for Old Electron" --- src/vs/platform/windows/common/windows.ts | 6 +++--- src/vs/platform/windows/common/windowsIpc.ts | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index 4406451cfac..c20b1900988 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -103,9 +103,9 @@ export interface IWindowsService { pickFileAndOpen(options: INativeOpenDialogOptions): TPromise; pickFolderAndOpen(options: INativeOpenDialogOptions): TPromise; pickWorkspaceAndOpen(options: INativeOpenDialogOptions): TPromise; - showMessageBox(windowId: number, options: Electron.MessageBoxOptions): TPromise; - showSaveDialog(windowId: number, options: Electron.SaveDialogOptions): TPromise; - showOpenDialog(windowId: number, options: Electron.OpenDialogOptions): TPromise; + showMessageBox(windowId: number, options: MessageBoxOptions): TPromise; + showSaveDialog(windowId: number, options: SaveDialogOptions): TPromise; + showOpenDialog(windowId: number, options: OpenDialogOptions): TPromise; reloadWindow(windowId: number): TPromise; openDevTools(windowId: number): TPromise; diff --git a/src/vs/platform/windows/common/windowsIpc.ts b/src/vs/platform/windows/common/windowsIpc.ts index 199f1087028..c4fedca111d 100644 --- a/src/vs/platform/windows/common/windowsIpc.ts +++ b/src/vs/platform/windows/common/windowsIpc.ts @@ -8,7 +8,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import Event, { buffer } from 'vs/base/common/event'; import { IChannel, eventToCall, eventFromCall } from 'vs/base/parts/ipc/common/ipc'; -import { IWindowsService, INativeOpenDialogOptions, IEnterWorkspaceResult, CrashReporterStartOptions, IMessageBoxResult } from 'vs/platform/windows/common/windows'; +import { IWindowsService, INativeOpenDialogOptions, IEnterWorkspaceResult, CrashReporterStartOptions, IMessageBoxResult, MessageBoxOptions, SaveDialogOptions, OpenDialogOptions } from 'vs/platform/windows/common/windows'; import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, IWorkspaceFolderCreationData } from 'vs/platform/workspaces/common/workspaces'; import { IRecentlyOpened } from 'vs/platform/history/common/history'; import { ICommandAction } from 'vs/platform/actions/common/actions'; @@ -22,9 +22,9 @@ export interface IWindowsChannel extends IChannel { call(command: 'pickFileAndOpen', arg: INativeOpenDialogOptions): TPromise; call(command: 'pickFolderAndOpen', arg: INativeOpenDialogOptions): TPromise; call(command: 'pickWorkspaceAndOpen', arg: INativeOpenDialogOptions): TPromise; - call(command: 'showMessageBox', arg: [number, Electron.MessageBoxOptions]): TPromise; - call(command: 'showSaveDialog', arg: [number, Electron.SaveDialogOptions]): TPromise; - call(command: 'showOpenDialog', arg: [number, Electron.OpenDialogOptions]): TPromise; + call(command: 'showMessageBox', arg: [number, MessageBoxOptions]): TPromise; + call(command: 'showSaveDialog', arg: [number, SaveDialogOptions]): TPromise; + call(command: 'showOpenDialog', arg: [number, OpenDialogOptions]): TPromise; call(command: 'reloadWindow', arg: number): TPromise; call(command: 'toggleDevTools', arg: number): TPromise; call(command: 'closeWorkspace', arg: number): TPromise; @@ -178,15 +178,15 @@ export class WindowsChannelClient implements IWindowsService { return this.channel.call('pickWorkspaceAndOpen', options); } - showMessageBox(windowId: number, options: Electron.MessageBoxOptions): TPromise { + showMessageBox(windowId: number, options: MessageBoxOptions): TPromise { return this.channel.call('showMessageBox', [windowId, options]); } - showSaveDialog(windowId: number, options: Electron.SaveDialogOptions): TPromise { + showSaveDialog(windowId: number, options: SaveDialogOptions): TPromise { return this.channel.call('showSaveDialog', [windowId, options]); } - showOpenDialog(windowId: number, options: Electron.OpenDialogOptions): TPromise { + showOpenDialog(windowId: number, options: OpenDialogOptions): TPromise { return this.channel.call('showOpenDialog', [windowId, options]); } From c66a91bc67fc60920c4fd8f28445d9dc436e4ab9 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 14 Dec 2017 16:28:13 +0100 Subject: [PATCH 274/615] hook open/close repository events to decoration change event --- extensions/git/src/decorationProvider.ts | 19 ++++++++++--------- extensions/git/src/util.ts | 4 ++++ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/extensions/git/src/decorationProvider.ts b/extensions/git/src/decorationProvider.ts index 67872ea54d8..a25f6052d69 100644 --- a/extensions/git/src/decorationProvider.ts +++ b/extensions/git/src/decorationProvider.ts @@ -10,25 +10,26 @@ import * as path from 'path'; import { Repository, GitResourceGroup, Status } from './repository'; import { Model } from './model'; import { debounce } from './decorators'; -import { filterEvent, dispose } from './util'; +import { filterEvent, dispose, anyEvent, mapEvent, fireEvent } from './util'; import { Submodule, GitErrorCodes } from './git'; type Callback = { resolve: (status: boolean) => void, reject: (err: any) => void }; class GitIgnoreDecorationProvider implements DecorationProvider { - private readonly _onDidChangeDecorations = new EventEmitter(); - readonly onDidChangeDecorations: Event = this._onDidChangeDecorations.event; - + readonly onDidChangeDecorations: Event; private queue = new Map; }>(); private disposables: Disposable[] = []; constructor(private model: Model) { - this.disposables.push( - window.registerDecorationProvider(this), - filterEvent(workspace.onDidSaveTextDocument, e => e.fileName.endsWith('.gitignore'))(_ => this._onDidChangeDecorations.fire()) - //todo@joh -> events when the ignore status actually changes, not only when the file changes - ); + //todo@joh -> events when the ignore status actually changes, not only when the file changes + this.onDidChangeDecorations = fireEvent(anyEvent( + filterEvent(workspace.onDidSaveTextDocument, e => e.fileName.endsWith('.gitignore')), + model.onDidOpenRepository, + model.onDidCloseRepository + )); + + this.disposables.push(window.registerDecorationProvider(this)); } provideDecoration(uri: Uri): Promise { diff --git a/extensions/git/src/util.ts b/extensions/git/src/util.ts index 6e26257de41..ee5a3d70568 100644 --- a/extensions/git/src/util.ts +++ b/extensions/git/src/util.ts @@ -34,6 +34,10 @@ export function combinedDisposable(disposables: IDisposable[]): IDisposable { export const EmptyDisposable = toDisposable(() => null); +export function fireEvent(event: Event): Event { + return (listener, thisArgs = null, disposables?) => event(_ => listener.call(thisArgs), null, disposables); +} + export function mapEvent(event: Event, map: (i: I) => O): Event { return (listener, thisArgs = null, disposables?) => event(i => listener.call(thisArgs, map(i)), null, disposables); } From 072f94fbadd4b5690b5927f4d24764de60c0329e Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 14 Dec 2017 16:36:21 +0100 Subject: [PATCH 275/615] Fixes #40205: Generate a color map for the time until vscode-textmate is loaded --- .../textMate/electron-browser/TMSyntax.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts b/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts index b54b904a5d7..cb2dba8832e 100644 --- a/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts +++ b/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts @@ -140,6 +140,23 @@ export class TextMateService implements ITextMateService { } }); + // Generate some color map until the grammar registry is loaded + let colorTheme = this._themeService.getColorTheme(); + let defaultForeground: Color = Color.transparent; + let defaultBackground: Color = Color.transparent; + for (let i = 0, len = colorTheme.tokenColors.length; i < len; i++) { + let rule = colorTheme.tokenColors[i]; + if (!rule.scope) { + if (rule.settings.foreground) { + defaultForeground = Color.fromHex(rule.settings.foreground); + } + if (rule.settings.background) { + defaultBackground = Color.fromHex(rule.settings.background); + } + } + } + TokenizationRegistry.setColorMap([null, defaultForeground, defaultBackground]); + this._modeService.onDidCreateMode((mode) => { let modeId = mode.getId(); if (this._languageToScope.has(modeId)) { From 475ac42d0bca9fb7385d2dc09ce905c15af97674 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 14 Dec 2017 16:03:59 +0100 Subject: [PATCH 276/615] rename method (fix typo) #40210 --- src/vs/workbench/api/electron-browser/mainThreadDecorations.ts | 2 +- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- src/vs/workbench/api/node/extHostDecorations.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts b/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts index 82c2e7fea3e..09118ecfa68 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts @@ -35,7 +35,7 @@ export class MainThreadDecorations implements MainThreadDecorationsShape { label, onDidChange: emitter.event, provideDecorations: (uri) => { - return this._proxy.$providerDecorations(handle, uri).then(data => { + return this._proxy.$provideDecorations(handle, uri).then(data => { if (!data) { return undefined; } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index ed498be9850..4ef64fdb735 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -721,7 +721,7 @@ export interface ExtHostDebugServiceShape { export type DecorationData = [number, boolean, string, string, ThemeColor, string]; export interface ExtHostDecorationsShape { - $providerDecorations(handle: number, uri: UriComponents): TPromise; + $provideDecorations(handle: number, uri: UriComponents): TPromise; } export interface ExtHostWindowShape { diff --git a/src/vs/workbench/api/node/extHostDecorations.ts b/src/vs/workbench/api/node/extHostDecorations.ts index 9581bfc5bc9..cdbfc5e482c 100644 --- a/src/vs/workbench/api/node/extHostDecorations.ts +++ b/src/vs/workbench/api/node/extHostDecorations.ts @@ -38,7 +38,7 @@ export class ExtHostDecorations implements ExtHostDecorationsShape { }); } - $providerDecorations(handle: number, data: UriComponents): TPromise { + $provideDecorations(handle: number, data: UriComponents): TPromise { const provider = this._provider.get(handle); return asWinJsPromise(token => provider.provideDecoration(URI.revive(data), token)).then(data => { return data && [data.priority, data.bubble, data.title, data.abbreviation, data.color, data.source]; From 27dd66d0f468e9f29d18b4438d0f995fd73c75e2 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 14 Dec 2017 17:52:52 +0100 Subject: [PATCH 277/615] move more actions into commands --- .../browser/parts/editor/editorActions.ts | 54 +--- .../browser/parts/editor/editorCommands.ts | 88 +++--- src/vs/workbench/common/editor.ts | 1 + .../fileActions.contribution.ts | 19 +- .../files/electron-browser/fileActions.ts | 105 ++----- .../files/electron-browser/fileCommands.ts | 295 ++++++++++++++---- .../electron-browser/views/openEditorsView.ts | 6 +- 7 files changed, 317 insertions(+), 251 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index f2994dd11a7..97c2d9a94f8 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -22,7 +22,7 @@ import { IEditorGroupService, GroupArrangement } from 'vs/workbench/services/gro import { ICommandService } from 'vs/platform/commands/common/commands'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; +import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; export class SplitEditorAction extends Action { @@ -532,38 +532,13 @@ export class CloseEditorAction extends Action { constructor( id: string, label: string, - @IEditorGroupService private editorGroupService: IEditorGroupService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @ICommandService private commandService: ICommandService ) { super(id, label, 'close-editor-action'); } public run(context?: IEditorContext): TPromise { - const position = context ? this.editorGroupService.getStacksModel().positionOfGroup(context.group) : null; - - // Close Active Editor - if (typeof position !== 'number') { - const activeEditor = this.editorService.getActiveEditor(); - if (activeEditor) { - return this.editorService.closeEditor(activeEditor.position, activeEditor.input); - } - } - - let input = context ? context.editor : null; - if (!input) { - - // Get Top Editor at Position - const visibleEditors = this.editorService.getVisibleEditors(); - if (visibleEditors[position]) { - input = visibleEditors[position].input; - } - } - - if (input) { - return this.editorService.closeEditor(position, input); - } - - return TPromise.as(false); + return this.commandService.executeCommand(CLOSE_EDITOR_COMMAND_ID, context); } } @@ -707,7 +682,7 @@ export class CloseUnmodifiedEditorsInGroupAction extends Action { } public run(context?: IEditorContext): TPromise { - return this.commandService.executeCommand(CLOSE_UNMODIFIED_EDITORS_COMMAND_ID); + return this.commandService.executeCommand(CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, context); } } @@ -750,28 +725,13 @@ export class CloseOtherEditorsInGroupAction extends Action { constructor( id: string, label: string, - @IEditorGroupService private editorGroupService: IEditorGroupService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @ICommandService private commandService: ICommandService, ) { super(id, label); } public run(context?: IEditorContext): TPromise { - let position = context ? this.editorGroupService.getStacksModel().positionOfGroup(context.group) : null; - let input = context ? context.editor : null; - - // If position or input are not passed in take the position and input of the active editor. - const active = this.editorService.getActiveEditor(); - if (active) { - position = typeof position === 'number' ? position : active.position; - input = input ? input : active.input; - } - - if (typeof position === 'number' && input) { - return this.editorService.closeEditors(position, { except: input }); - } - - return TPromise.as(false); + return this.commandService.executeCommand(CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID); } } @@ -789,7 +749,7 @@ export class CloseEditorsInGroupAction extends Action { } public run(context?: IEditorContext): TPromise { - return this.commandService.executeCommand(CLOSE_EDITORS_IN_GROUP_COMMAND_ID); + return this.commandService.executeCommand(CLOSE_EDITORS_IN_GROUP_COMMAND_ID, context); } } diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index 185a2070f91..d03fe3611fe 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -8,7 +8,7 @@ import * as types from 'vs/base/common/types'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { ActiveEditorMoveArguments, ActiveEditorMovePositioning, ActiveEditorMovePositioningBy, EditorCommands, TextCompareEditorVisible, toResource } from 'vs/workbench/common/editor'; +import { ActiveEditorMoveArguments, ActiveEditorMovePositioning, ActiveEditorMovePositioningBy, EditorCommands, TextCompareEditorVisible, IEditorContext, EditorInput } from 'vs/workbench/common/editor'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditor, Position, POSITIONS } from 'vs/platform/editor/common/editor'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; @@ -19,18 +19,11 @@ import { IMessageService, Severity, CloseAction } from 'vs/platform/message/comm import { Action } from 'vs/base/common/actions'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IListService } from 'vs/platform/list/browser/listService'; -import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; -import URI from 'vs/base/common/uri'; -import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { toErrorMessage } from 'vs/base/common/errorMessage'; -import { basename } from 'vs/base/common/paths'; export const CLOSE_UNMODIFIED_EDITORS_COMMAND_ID = 'workbench.command.closeUnmodifiedEditors'; export const CLOSE_EDITORS_IN_GROUP_COMMAND_ID = 'workbench.command.closeEditorsInGroup'; -export const OPEN_TO_SIDE_COMMAND_ID = 'workbench.command.openToSide'; -export const REVERT_FILE_COMMAND_ID = 'workbench.command.files.revert'; - +export const CLOSE_EDITOR_COMMAND_ID = 'workbench.command.closeActiveEditor'; +export const CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID = 'workbench.command.closeOtherEditors'; export function setup(): void { registerActiveEditorMoveCommand(); @@ -291,11 +284,11 @@ function registerExplorerCommands() { weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), when: undefined, primary: undefined, - handler: (accessor, args: any) => { + handler: (accessor, args: IEditorContext) => { const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); - let position = context ? editorGroupService.getStacksModel().positionOfGroup(context.group) : null; + let position = args ? editorGroupService.getStacksModel().positionOfGroup(args.group) : null; // If position is not passed in take the position of the active editor. if (typeof position !== 'number') { @@ -318,11 +311,11 @@ function registerExplorerCommands() { weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), when: undefined, primary: undefined, - handler: (accessor, args: any) => { + handler: (accessor, args: IEditorContext) => { const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); - let position = context ? editorGroupService.getStacksModel().positionOfGroup(context.group) : null; + let position = args ? editorGroupService.getStacksModel().positionOfGroup(args.group) : null; if (typeof position !== 'number') { const activeEditor = editorService.getActiveEditor(); if (activeEditor) { @@ -339,53 +332,66 @@ function registerExplorerCommands() { }); KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: OPEN_TO_SIDE_COMMAND_ID, + id: CLOSE_EDITOR_COMMAND_ID, weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), when: undefined, primary: undefined, - handler: (accessor, args: any) => { + handler: (accessor, args: IEditorContext) => { + const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); - const listService = accessor.get(IListService); - const tree = listService.lastFocusedList; - // Remove highlight - if (tree instanceof Tree) { - tree.clearHighlight(); + + const position = args ? editorGroupService.getStacksModel().positionOfGroup(args.group) : null; + + // Close Active Editor + if (typeof position !== 'number') { + const activeEditor = editorService.getActiveEditor(); + if (activeEditor) { + return editorService.closeEditor(activeEditor.position, activeEditor.input); + } } - // Set side input - return editorService.openEditor({ - resource: this.resource, - options: { - preserveFocus: this.preserveFocus + let input = args ? args.editor : null; + if (!input) { + + // Get Top Editor at Position + const visibleEditors = editorService.getVisibleEditors(); + if (visibleEditors[position]) { + input = visibleEditors[position].input; } - }, true); + } + + if (input) { + return editorService.closeEditor(position, input); + } + + return TPromise.as(false); } }); KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: REVERT_FILE_COMMAND_ID, + id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), when: undefined, primary: undefined, - handler: (accessor, args: any) => { - let resource: URI; + handler: (accessor, args: IEditorContext) => { + const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); - const textFileService = accessor.get(ITextFileService); - const messageService = accessor.get(IMessageService); - if (this.resource) { - resource = this.resource; - } else { - resource = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + let position = args ? editorGroupService.getStacksModel().positionOfGroup(args.group) : null; + let input = args ? args.editor : null; + + // If position or input are not passed in take the position and input of the active editor. + const active = editorService.getActiveEditor(); + if (active) { + position = typeof position === 'number' ? position : active.position; + input = input ? input : active.input; } - if (resource && resource.scheme !== 'untitled') { - return textFileService.revert(resource, { force: true }).then(null, error => { - messageService.show(Severity.Error, nls.localize('genericRevertError', "Failed to revert '{0}': {1}", basename(resource.fsPath), toErrorMessage(error, false))); - }); + if (typeof position === 'number' && input) { + return editorService.closeEditors(position, { except: input }); } - return TPromise.as(true); + return TPromise.as(false); } }); } diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 59be74eb1e7..d6f97814480 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -789,6 +789,7 @@ export interface IEditorIdentifier { export interface IEditorContext extends IEditorIdentifier { event?: any; + resource?: URI; } export interface IEditorCloseEvent extends IEditorIdentifier { diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts index 5621838a480..e42188b86bb 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts @@ -18,7 +18,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { FileStat, Model } from 'vs/workbench/parts/files/common/explorerModel'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { AddRootFolderAction, RemoveRootFolderAction, OpenFolderSettingsAction } from 'vs/workbench/browser/actions/workspaceActions'; -import { copyFocusedFilesExplorerViewItem, revealInOSFocusedFilesExplorerItem, openFocusedExplorerItemSideBySideCommand, copyPathOfFocusedExplorerItem, copyPathCommand, revealInExplorerCommand, revealInOSCommand, openWindowCommand, deleteFocusedFilesExplorerViewItemCommand, moveFocusedFilesExplorerViewItemToTrashCommand, renameFocusedFilesExplorerViewItemCommand } from 'vs/workbench/parts/files/electron-browser/fileCommands'; +import { copyFocusedFilesExplorerViewItem, revealInOSFocusedFilesExplorerItem, openFocusedExplorerItemSideBySideCommand, copyPathOfFocusedExplorerItem, openWindowCommand, deleteFocusedFilesExplorerViewItemCommand, moveFocusedFilesExplorerViewItemToTrashCommand, renameFocusedFilesExplorerViewItemCommand, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID } from 'vs/workbench/parts/files/electron-browser/fileCommands'; import { CommandsRegistry, ICommandHandler } from 'vs/platform/commands/common/commands'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; @@ -51,7 +51,7 @@ class FilesViewerActionContributor extends ActionBarContributor { // Open side by side if (!stat.isDirectory) { - actions.push(this.instantiationService.createInstance(OpenToSideAction, tree, stat.resource, false)); + actions.push(this.instantiationService.createInstance(OpenToSideAction, stat.resource)); separateOpen = true; } @@ -75,13 +75,13 @@ class FilesViewerActionContributor extends ActionBarContributor { else if (!stat.isDirectory) { // Run Compare - const runCompareAction = this.instantiationService.createInstance(CompareResourcesAction, stat.resource, tree); + const runCompareAction = this.instantiationService.createInstance(CompareResourcesAction, stat.resource); if (runCompareAction._isEnabled()) { actions.push(runCompareAction); } // Select for Compare - actions.push(this.instantiationService.createInstance(SelectResourceForCompareAction, stat.resource, tree)); + actions.push(this.instantiationService.createInstance(SelectResourceForCompareAction, stat.resource)); actions.push(new Separator(null, 100)); } @@ -296,14 +296,11 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ }); // Editor Title Context Menu -appendEditorTitleContextMenuItem('_workbench.action.files.revealInOS', RevealInOSAction.LABEL, revealInOSCommand); -appendEditorTitleContextMenuItem('_workbench.action.files.copyPath', CopyPathAction.LABEL, copyPathCommand); -appendEditorTitleContextMenuItem('_workbench.action.files.revealInExplorer', nls.localize('revealInSideBar', "Reveal in Side Bar"), revealInExplorerCommand); +appendEditorTitleContextMenuItem(REVEAL_IN_OS_COMMAND_ID, RevealInOSAction.LABEL); +appendEditorTitleContextMenuItem(COPY_PATH_COMMAND_ID, CopyPathAction.LABEL); +appendEditorTitleContextMenuItem(REVEAL_IN_EXPLORER_COMMAND_ID, nls.localize('revealInSideBar', "Reveal in Side Bar")); -function appendEditorTitleContextMenuItem(id: string, title: string, command: ICommandHandler): void { - - // Command - CommandsRegistry.registerCommand(id, command); +function appendEditorTitleContextMenuItem(id: string, title: string): void { // Menu MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index ed95562f60e..08ee16fa86e 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -44,7 +44,7 @@ import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; import { IEditorViewState, IModel } from 'vs/editor/common/editorCommon'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { withFocusedFilesExplorer, revealInOSCommand, revealInExplorerCommand, copyPathCommand } from 'vs/workbench/parts/files/electron-browser/fileCommands'; +import { withFocusedFilesExplorer, REVERT_FILE_COMMAND_ID, OPEN_TO_SIDE_COMMAND_ID, COMPARE_WITH_SAVED_SCHEMA, COMPARE_WITH_SAVED_COMMAND_ID, COMPARE_RESOURCE_COMMAND_ID, SELECT_FOR_COMPARE_COMMAND_ID, globalResourceToCompare, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID } from 'vs/workbench/parts/files/electron-browser/fileCommands'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; @@ -53,7 +53,6 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService import { IModeService } from 'vs/editor/common/services/modeService'; import { IModelService } from 'vs/editor/common/services/modelService'; import { ICommandService } from 'vs/platform/commands/common/commands'; -import { OPEN_TO_SIDE_COMMAND_ID, REVERT_FILE_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; export interface IEditableData { action: IAction; @@ -1123,6 +1122,7 @@ export class OpenToSideAction extends Action { public static readonly LABEL = nls.localize('openToSide', "Open to the Side"); constructor( + private resource: URI, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @ICommandService private commandService: ICommandService ) { @@ -1137,35 +1137,23 @@ export class OpenToSideAction extends Action { } public run(): TPromise { - return this.commandService.executeCommand(OPEN_TO_SIDE_COMMAND_ID); + return this.commandService.executeCommand(OPEN_TO_SIDE_COMMAND_ID, { resource: this.resource }); } } -let globalResourceToCompare: URI; export class SelectResourceForCompareAction extends Action { private resource: URI; - private tree: ITree; - constructor(resource: URI, tree: ITree) { + constructor(resource: URI, @ICommandService private commandService: ICommandService) { super('workbench.files.action.selectForCompare', nls.localize('compareSource', "Select for Compare")); - this.tree = tree; this.resource = resource; this.enabled = true; } public run(): TPromise { + return this.commandService.executeCommand(SELECT_FOR_COMPARE_COMMAND_ID, { resource: this.resource }); - // Remember as source file to compare - globalResourceToCompare = this.resource; - - // Remove highlight - if (this.tree) { - this.tree.clearHighlight(); - this.tree.DOMFocus(); - } - - return TPromise.as(null); } } @@ -1218,19 +1206,16 @@ export class GlobalCompareResourcesAction extends Action { // Compare with Resource export class CompareResourcesAction extends Action { - private tree: ITree; private resource: URI; constructor( resource: URI, - tree: ITree, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IWorkbenchEditorService private commandService: ICommandService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IEnvironmentService environmentService: IEnvironmentService ) { super('workbench.files.action.compareFiles', CompareResourcesAction.computeLabel(resource, contextService, environmentService)); - this.tree = tree; this.resource = resource; } @@ -1263,18 +1248,7 @@ export class CompareResourcesAction extends Action { return false; } - // Check if file was deleted or moved meanwhile (explorer only) - if (this.tree) { - const input = this.tree.getInput(); - if (input instanceof FileStat || input instanceof Model) { - const exists = input instanceof Model ? input.findClosest(globalResourceToCompare) : input.find(globalResourceToCompare); - if (!exists) { - globalResourceToCompare = null; - - return false; - } - } - } + // TODO@Isidor Check if file was deleted or moved meanwhile (explorer only) // Check if target is identical to source if (this.resource.toString() === globalResourceToCompare.toString()) { @@ -1285,16 +1259,7 @@ export class CompareResourcesAction extends Action { } public run(): TPromise { - - // Remove highlight - if (this.tree) { - this.tree.clearHighlight(); - } - - return this.editorService.openEditor({ - leftResource: globalResourceToCompare, - rightResource: this.resource - }); + return this.commandService.executeCommand(COMPARE_RESOURCE_COMMAND_ID, { resource: this.resource }); } } @@ -1667,7 +1632,7 @@ export class RevertFileAction extends Action { } public run(): TPromise { - return this.commandService.executeCommand(REVERT_FILE_COMMAND_ID); + return this.commandService.executeCommand(REVERT_FILE_COMMAND_ID, { resource: this.resource }); } } @@ -1728,8 +1693,8 @@ export class ShowActiveFileInExplorer extends Action { id: string, label: string, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IInstantiationService private instantiationService: IInstantiationService, - @IMessageService private messageService: IMessageService + @IMessageService private messageService: IMessageService, + @ICommandService private commandService: ICommandService ) { super(id, label); } @@ -1737,7 +1702,7 @@ export class ShowActiveFileInExplorer extends Action { public run(): TPromise { const resource = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true }); if (resource) { - this.instantiationService.invokeFunction.apply(this.instantiationService, [revealInExplorerCommand, resource]); + this.commandService.executeCommand(REVEAL_IN_EXPLORER_COMMAND_ID, { resource }); } else { this.messageService.show(severity.Info, nls.localize('openFileToShow', "Open a file first to show it in the explorer")); } @@ -1830,7 +1795,7 @@ export class RevealInOSAction extends Action { constructor( private resource: URI, - @IInstantiationService private instantiationService: IInstantiationService + @ICommandService private commandService: ICommandService ) { super('revealFileInOS', RevealInOSAction.LABEL); @@ -1838,9 +1803,7 @@ export class RevealInOSAction extends Action { } public run(): TPromise { - this.instantiationService.invokeFunction.apply(this.instantiationService, [revealInOSCommand, this.resource]); - - return TPromise.as(true); + return this.commandService.executeCommand(REVEAL_IN_OS_COMMAND_ID, { resource: this.resource }); } } @@ -1852,15 +1815,13 @@ export class GlobalRevealInOSAction extends Action { constructor( id: string, label: string, - @IInstantiationService private instantiationService: IInstantiationService + @ICommandService private commandService: ICommandService ) { super(id, label); } public run(): TPromise { - this.instantiationService.invokeFunction.apply(this.instantiationService, [revealInOSCommand]); - - return TPromise.as(true); + return this.commandService.executeCommand(REVEAL_IN_OS_COMMAND_ID); } } @@ -1870,7 +1831,7 @@ export class CopyPathAction extends Action { constructor( private resource: URI, - @IInstantiationService private instantiationService: IInstantiationService + @ICommandService private commandService: ICommandService ) { super('copyFilePath', CopyPathAction.LABEL); @@ -1878,9 +1839,7 @@ export class CopyPathAction extends Action { } public run(): TPromise { - this.instantiationService.invokeFunction.apply(this.instantiationService, [copyPathCommand, this.resource]); - - return TPromise.as(true); + return this.commandService.executeCommand(COPY_PATH_COMMAND_ID, { resource: this.resource }); } } @@ -1892,15 +1851,13 @@ export class GlobalCopyPathAction extends Action { constructor( id: string, label: string, - @IInstantiationService private instantiationService: IInstantiationService + @ICommandService private commandService: ICommandService ) { super(id, label); } public run(): TPromise { - this.instantiationService.invokeFunction.apply(this.instantiationService, [copyPathCommand]); - - return TPromise.as(true); + return this.commandService.executeCommand(COPY_PATH_COMMAND_ID); } } @@ -1970,15 +1927,13 @@ export class CompareWithSavedAction extends Action { public static readonly ID = 'workbench.files.action.compareWithSaved'; public static readonly LABEL = nls.localize('compareWithSaved', "Compare Active File with Saved"); - private static readonly SCHEME = 'showModifications'; - private resource: URI; private toDispose: IDisposable[]; constructor( id: string, label: string, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @ICommandService private commandService: ICommandService, @IInstantiationService instantiationService: IInstantiationService, @ITextModelService textModelService: ITextModelService ) { @@ -1990,7 +1945,7 @@ export class CompareWithSavedAction extends Action { const provider = instantiationService.createInstance(FileOnDiskContentProvider); this.toDispose.push(provider); - const registrationDisposal = textModelService.registerTextModelContentProvider(CompareWithSavedAction.SCHEME, provider); + const registrationDisposal = textModelService.registerTextModelContentProvider(COMPARE_WITH_SAVED_SCHEMA, provider); this.toDispose.push(registrationDisposal); } @@ -1999,21 +1954,7 @@ export class CompareWithSavedAction extends Action { } public run(): TPromise { - let resource: URI; - if (this.resource) { - resource = this.resource; - } else { - resource = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); - } - - if (resource && resource.scheme === 'file') { - const name = paths.basename(resource.fsPath); - const editorLabel = nls.localize('modifiedLabel', "{0} (on disk) ↔ {1}", name, name); - - return this.editorService.openEditor({ leftResource: URI.from({ scheme: CompareWithSavedAction.SCHEME, path: resource.fsPath }), rightResource: resource, label: editorLabel }); - } - - return TPromise.as(true); + return this.commandService.executeCommand(COMPARE_WITH_SAVED_COMMAND_ID, { resource: this.resource }); } public dispose(): void { diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index 40455bd3cb2..eb990cb2fc6 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -11,7 +11,7 @@ import severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { toResource } from 'vs/workbench/common/editor'; +import { toResource, IEditorContext } from 'vs/workbench/common/editor'; import { IWindowsService } from 'vs/platform/windows/common/windows'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; @@ -23,78 +23,34 @@ import errors = require('vs/base/common/errors'); import { ITree } from 'vs/base/parts/tree/browser/tree'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { IMessageService } from 'vs/platform/message/common/message'; +import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { getPathLabel } from 'vs/base/common/labels'; +import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; +import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { toErrorMessage } from 'vs/base/common/errorMessage'; +import { basename } from 'vs/base/common/paths'; +import { IListService } from 'vs/platform/list/browser/listService'; +import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; +import { ICommandService } from 'vs/platform/commands/common/commands'; // Commands -export const copyPathCommand = (accessor: ServicesAccessor, resource?: URI) => { - - // Without resource, try to look at the active editor - if (!resource) { - const editorGroupService = accessor.get(IEditorGroupService); - const editorService = accessor.get(IWorkbenchEditorService); - const activeEditor = editorService.getActiveEditor(); - - resource = activeEditor ? toResource(activeEditor.input, { supportSideBySide: true }) : void 0; - if (activeEditor) { - editorGroupService.focusGroup(activeEditor.position); // focus back to active editor group - } - } - - if (resource) { - const clipboardService = accessor.get(IClipboardService); - clipboardService.writeText(resource.scheme === 'file' ? getPathLabel(resource) : resource.toString()); - } else { - const messageService = accessor.get(IMessageService); - messageService.show(severity.Info, nls.localize('openFileToCopy', "Open a file first to copy its path")); - } -}; +registerExplorerCommands(); +export const REVEAL_IN_OS_COMMAND_ID = 'workbench.command.files.revealInOS'; +export const REVEAL_IN_EXPLORER_COMMAND_ID = 'workbench.command.files.revealInExplorer'; +export const REVERT_FILE_COMMAND_ID = 'workbench.command.files.revert'; +export const OPEN_TO_SIDE_COMMAND_ID = 'workbench.command.openToSide'; +export const SELECT_FOR_COMPARE_COMMAND_ID = 'workbench.files.command.selectForCompare'; +export const COMPARE_RESOURCE_COMMAND_ID = 'workbench.files.command.compareFiles'; +export const COMPARE_WITH_SAVED_COMMAND_ID = 'workbench.files.command.compareWithSaved'; +export const COMPARE_WITH_SAVED_SCHEMA = 'showModifications'; +export const COPY_PATH_COMMAND_ID = 'workbench.command.files.copyPath'; export const openWindowCommand = (accessor: ServicesAccessor, paths: string[], forceNewWindow: boolean) => { const windowsService = accessor.get(IWindowsService); windowsService.openWindow(paths, { forceNewWindow }); }; -export const revealInOSCommand = (accessor: ServicesAccessor, resource?: URI) => { - - // Without resource, try to look at the active editor - if (!resource) { - const editorService = accessor.get(IWorkbenchEditorService); - - resource = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); - } - - if (resource) { - const windowsService = accessor.get(IWindowsService); - windowsService.showItemInFolder(paths.normalize(resource.fsPath, true)); - } else { - const messageService = accessor.get(IMessageService); - messageService.show(severity.Info, nls.localize('openFileToReveal', "Open a file first to reveal")); - } -}; - -export const revealInExplorerCommand = (accessor: ServicesAccessor, resource: URI) => { - const viewletService = accessor.get(IViewletService); - const contextService = accessor.get(IWorkspaceContextService); - - viewletService.openViewlet(VIEWLET_ID, false).then((viewlet: ExplorerViewlet) => { - const isInsideWorkspace = contextService.isInsideWorkspace(resource); - if (isInsideWorkspace) { - const explorerView = viewlet.getExplorerView(); - if (explorerView) { - explorerView.setExpanded(true); - explorerView.select(resource, true); - } - } else { - const openEditorsView = viewlet.getOpenEditorsView(); - if (openEditorsView) { - openEditorsView.setExpanded(true); - } - } - }); -}; - function openFocusedFilesExplorerViewItem(accessor: ServicesAccessor, sideBySide: boolean): void { withFocusedFilesExplorerViewItem(accessor).then(res => { if (res) { @@ -228,9 +184,12 @@ export const copyFocusedFilesExplorerViewItem = (accessor: ServicesAccessor) => export const copyPathOfFocusedExplorerItem = (accessor: ServicesAccessor) => { withFocusedExplorerItem(accessor).then(item => { const file = explorerItemToFileResource(item); - if (file) { - copyPathCommand(accessor, file.resource); + if (!file) { + return TPromise.as(undefined); } + + const commandService = accessor.get(ICommandService); + return commandService.executeCommand(COPY_PATH_COMMAND_ID, { resource: file.resource }); }); }; @@ -247,8 +206,210 @@ export const openFocusedExplorerItemSideBySideCommand = (accessor: ServicesAcces export const revealInOSFocusedFilesExplorerItem = (accessor: ServicesAccessor) => { withFocusedExplorerItem(accessor).then(item => { const file = explorerItemToFileResource(item); - if (file) { - revealInOSCommand(accessor, file.resource); + if (!file) { + return TPromise.as(undefined); } + + const commandService = accessor.get(ICommandService); + return commandService.executeCommand(REVEAL_IN_OS_COMMAND_ID, { resource: file.resource }); }); }; + +export let globalResourceToCompare: URI; + +function registerExplorerCommands(): void { + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: REVERT_FILE_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + handler: (accessor, args: IEditorContext) => { + let resource: URI; + const editorService = accessor.get(IWorkbenchEditorService); + const textFileService = accessor.get(ITextFileService); + const messageService = accessor.get(IMessageService); + + if (args && args.resource) { + resource = args.resource; + } else { + resource = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + } + + if (resource && resource.scheme !== 'untitled') { + return textFileService.revert(resource, { force: true }).then(null, error => { + messageService.show(Severity.Error, nls.localize('genericRevertError', "Failed to revert '{0}': {1}", basename(resource.fsPath), toErrorMessage(error, false))); + }); + } + + return TPromise.as(true); + } + }); + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: OPEN_TO_SIDE_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + handler: (accessor, args: IEditorContext) => { + const editorService = accessor.get(IWorkbenchEditorService); + const listService = accessor.get(IListService); + const tree = listService.lastFocusedList; + // Remove highlight + if (tree instanceof Tree) { + tree.clearHighlight(); + } + + // Set side input + return editorService.openEditor({ + resource: args.resource, + options: { + preserveFocus: false + } + }, true); + } + }); + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: COMPARE_WITH_SAVED_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + handler: (accessor, args: IEditorContext) => { + const editorService = accessor.get(IWorkbenchEditorService); + let resource: URI; + if (args.resource) { + resource = args.resource; + } else { + resource = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + } + + if (resource && resource.scheme === 'file') { + const name = paths.basename(resource.fsPath); + const editorLabel = nls.localize('modifiedLabel', "{0} (on disk) ↔ {1}", name, name); + + return editorService.openEditor({ leftResource: URI.from({ scheme: COMPARE_WITH_SAVED_SCHEMA, path: resource.fsPath }), rightResource: resource, label: editorLabel }); + } + + return TPromise.as(true); + } + }); + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: SELECT_FOR_COMPARE_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + handler: (accessor, args: IEditorContext) => { + const listService = accessor.get(IListService); + const tree = listService.lastFocusedList; + // Remove highlight + if (tree instanceof Tree) { + tree.clearHighlight(); + tree.DOMFocus(); + } + + globalResourceToCompare = args.resource; + } + }); + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: COMPARE_RESOURCE_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + handler: (accessor, args: IEditorContext) => { + const editorService = accessor.get(IWorkbenchEditorService); + const listService = accessor.get(IListService); + const tree = listService.lastFocusedList; + // Remove highlight + if (tree instanceof Tree) { + tree.clearHighlight(); + } + + return editorService.openEditor({ + leftResource: globalResourceToCompare, + rightResource: args.resource + }); + } + }); + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: REVEAL_IN_OS_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + handler: (accessor, args: IEditorContext) => { + // Without resource, try to look at the active editor + let resource = args.resource; + if (!resource) { + const editorService = accessor.get(IWorkbenchEditorService); + resource = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + } + + if (resource) { + const windowsService = accessor.get(IWindowsService); + windowsService.showItemInFolder(paths.normalize(resource.fsPath, true)); + } else { + const messageService = accessor.get(IMessageService); + messageService.show(severity.Info, nls.localize('openFileToReveal', "Open a file first to reveal")); + } + } + }); + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: COPY_PATH_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + handler: (accessor, args: IEditorContext) => { + let resource = args.resource; + // Without resource, try to look at the active editor + if (!resource) { + const editorGroupService = accessor.get(IEditorGroupService); + const editorService = accessor.get(IWorkbenchEditorService); + const activeEditor = editorService.getActiveEditor(); + + resource = activeEditor ? toResource(activeEditor.input, { supportSideBySide: true }) : void 0; + if (activeEditor) { + editorGroupService.focusGroup(activeEditor.position); // focus back to active editor group + } + } + + if (resource) { + const clipboardService = accessor.get(IClipboardService); + clipboardService.writeText(resource.scheme === 'file' ? getPathLabel(resource) : resource.toString()); + } else { + const messageService = accessor.get(IMessageService); + messageService.show(severity.Info, nls.localize('openFileToCopy', "Open a file first to copy its path")); + } + } + }); + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: REVEAL_IN_EXPLORER_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + handler: (accessor, args: IEditorContext) => { + const viewletService = accessor.get(IViewletService); + const contextService = accessor.get(IWorkspaceContextService); + + viewletService.openViewlet(VIEWLET_ID, false).then((viewlet: ExplorerViewlet) => { + const isInsideWorkspace = contextService.isInsideWorkspace(args.resource); + if (isInsideWorkspace) { + const explorerView = viewlet.getExplorerView(); + if (explorerView) { + explorerView.setExpanded(true); + explorerView.select(args.resource, true); + } + } else { + const openEditorsView = viewlet.getOpenEditorsView(); + if (openEditorsView) { + openEditorsView.setExpanded(true); + } + } + }); + } + }); +} diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index 04ef95b9a05..c2e52d00a2e 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -592,7 +592,7 @@ export class ActionProvider extends ContributableActionProvider { const resource = openEditor.getResource(); if (resource) { // Open to side - result.unshift(this.instantiationService.createInstance(OpenToSideAction, undefined, resource, false)); + result.unshift(this.instantiationService.createInstance(OpenToSideAction, resource)); if (!openEditor.isUntitled()) { @@ -637,11 +637,11 @@ export class ActionProvider extends ContributableActionProvider { result.push(compareWithSavedAction); } - const runCompareAction = this.instantiationService.createInstance(CompareResourcesAction, resource, undefined); + const runCompareAction = this.instantiationService.createInstance(CompareResourcesAction, resource); if (runCompareAction._isEnabled()) { result.push(runCompareAction); } - result.push(this.instantiationService.createInstance(SelectResourceForCompareAction, resource, undefined)); + result.push(this.instantiationService.createInstance(SelectResourceForCompareAction, resource)); result.push(new Separator()); } From d589f2f1bc36a60348c8492cf24809d41dcfb3d6 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 14 Dec 2017 17:56:10 +0100 Subject: [PATCH 278/615] Remove usage of CustomMarshaller for DebugService (#40169) --- .../electron-browser/mainThreadDebugService.ts | 5 +++-- src/vs/workbench/api/node/extHost.protocol.ts | 13 +++++++------ src/vs/workbench/api/node/extHostDebugService.ts | 16 +++++++++------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts index 090bc8b2401..3b2bb1f06c7 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts @@ -143,8 +143,9 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape { return TPromise.wrap(undefined); } - public $startDebugging(folderUri: uri | undefined, nameOrConfiguration: string | IConfig): TPromise { - const folder = folderUri ? this.contextService.getWorkspace().folders.filter(wf => wf.uri.toString() === folderUri.toString()).pop() : undefined; + public $startDebugging(_folderUri: uri | undefined, nameOrConfiguration: string | IConfig): TPromise { + const folderUriString = _folderUri ? uri.revive(_folderUri).toString() : undefined; + const folder = folderUriString ? this.contextService.getWorkspace().folders.filter(wf => wf.uri.toString() === folderUriString).pop() : undefined; return this.debugService.startDebugging(folder, nameOrConfiguration).then(x => { return true; }, err => { diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 4ef64fdb735..7ef268ba9ac 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -31,6 +31,7 @@ import * as modes from 'vs/editor/common/modes'; import { ITextSource } from 'vs/editor/common/model/textSource'; import { IConfigurationData, ConfigurationTarget, IConfigurationModel } from 'vs/platform/configuration/common/configuration'; +import { IConfig } from 'vs/workbench/parts/debug/common/debug'; import { IPickOpenEntry, IPickOptions } from 'vs/platform/quickOpen/common/quickOpen'; import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; @@ -446,7 +447,7 @@ export type DebugSessionUUID = string; export interface MainThreadDebugServiceShape extends IDisposable { $registerDebugConfigurationProvider(type: string, hasProvideMethod: boolean, hasResolveMethod: boolean, handle: number): TPromise; $unregisterDebugConfigurationProvider(handle: number): TPromise; - $startDebugging(folder: URI | undefined, nameOrConfig: string | vscode.DebugConfiguration): TPromise; + $startDebugging(folder: UriComponents | undefined, nameOrConfig: string | vscode.DebugConfiguration): TPromise; $customDebugAdapterRequest(id: DebugSessionUUID, command: string, args: any): TPromise; $appendDebugConsole(value: string): TPromise; $startBreakpointEvents(): TPromise; @@ -691,7 +692,7 @@ export interface IBreakpointData { export interface ISourceBreakpointData extends IBreakpointData { type: 'source'; - uri: URI; + uri: UriComponents; line: number; character: number; } @@ -708,8 +709,8 @@ export interface IBreakpointsDelta { } export interface ExtHostDebugServiceShape { - $resolveDebugConfiguration(handle: number, folder: URI | undefined, debugConfiguration: any): TPromise; - $provideDebugConfigurations(handle: number, folder: URI | undefined): TPromise; + $resolveDebugConfiguration(handle: number, folder: UriComponents | undefined, debugConfiguration: IConfig): TPromise; + $provideDebugConfigurations(handle: number, folder: UriComponents | undefined): TPromise; $acceptDebugSessionStarted(id: DebugSessionUUID, type: string, name: string): void; $acceptDebugSessionTerminated(id: DebugSessionUUID, type: string, name: string): void; $acceptDebugSessionActiveChanged(id: DebugSessionUUID | undefined, type?: string, name?: string): void; @@ -733,7 +734,7 @@ export interface ExtHostWindowShape { export const MainContext = { MainThreadCommands: >createMainId('MainThreadCommands'), MainThreadConfiguration: createMainId('MainThreadConfiguration', ProxyType.CustomMarshaller), - MainThreadDebugService: createMainId('MainThreadDebugService', ProxyType.CustomMarshaller), + MainThreadDebugService: createMainId('MainThreadDebugService'), MainThreadDecorations: createMainId('MainThreadDecorations'), MainThreadDiagnostics: createMainId('MainThreadDiagnostics'), MainThreadDialogs: createMainId('MainThreadDiaglogs'), @@ -764,7 +765,7 @@ export const ExtHostContext = { ExtHostCommands: createExtId('ExtHostCommands'), ExtHostConfiguration: createExtId('ExtHostConfiguration', ProxyType.CustomMarshaller), ExtHostDiagnostics: createExtId('ExtHostDiagnostics'), - ExtHostDebugService: createExtId('ExtHostDebugService', ProxyType.CustomMarshaller), + ExtHostDebugService: createExtId('ExtHostDebugService'), ExtHostDecorations: createExtId('ExtHostDecorations'), ExtHostDocumentsAndEditors: createExtId('ExtHostDocumentsAndEditors'), ExtHostDocuments: createExtId('ExtHostDocuments'), diff --git a/src/vs/workbench/api/node/extHostDebugService.ts b/src/vs/workbench/api/node/extHostDebugService.ts index 075719057c8..3276d4348ea 100644 --- a/src/vs/workbench/api/node/extHostDebugService.ts +++ b/src/vs/workbench/api/node/extHostDebugService.ts @@ -11,7 +11,7 @@ import { MainContext, MainThreadDebugServiceShape, ExtHostDebugServiceShape, Deb import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import * as vscode from 'vscode'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { Disposable, Position, Location, SourceBreakpoint, FunctionBreakpoint } from 'vs/workbench/api/node/extHostTypes'; @@ -138,7 +138,8 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { if (bp.type === 'function') { return new FunctionBreakpoint(bp.enabled, bp.condition, bp.hitCondition, bp.functionName); } - return new SourceBreakpoint(bp.enabled, bp.condition, bp.hitCondition, new Location(bp.uri, new Position(bp.line, bp.character))); + const uri = URI.revive(bp.uri); + return new SourceBreakpoint(bp.enabled, bp.condition, bp.hitCondition, new Location(uri, new Position(bp.line, bp.character))); } public registerDebugConfigurationProvider(type: string, provider: vscode.DebugConfigurationProvider): vscode.Disposable { @@ -156,7 +157,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { }); } - public $provideDebugConfigurations(handle: number, folderUri: URI | undefined): TPromise { + public $provideDebugConfigurations(handle: number, folderUri: UriComponents | undefined): TPromise { let handler = this._handlers.get(handle); if (!handler) { return TPromise.wrapError(new Error('no handler found')); @@ -167,7 +168,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { return asWinJsPromise(token => handler.provideDebugConfigurations(this.getFolder(folderUri), token)); } - public $resolveDebugConfiguration(handle: number, folderUri: URI | undefined, debugConfiguration: vscode.DebugConfiguration): TPromise { + public $resolveDebugConfiguration(handle: number, folderUri: UriComponents | undefined, debugConfiguration: vscode.DebugConfiguration): TPromise { let handler = this._handlers.get(handle); if (!handler) { return TPromise.wrapError(new Error('no handler found')); @@ -232,10 +233,11 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { this._onDidReceiveDebugSessionCustomEvent.fire(ee); } - private getFolder(folderUri: URI | undefined) { - if (folderUri) { + private getFolder(_folderUri: UriComponents | undefined) { + if (_folderUri) { + const folderUriString = URI.revive(_folderUri).toString(); const folders = this._workspace.getWorkspaceFolders(); - const found = folders.filter(f => f.uri.toString() === folderUri.toString()); + const found = folders.filter(f => f.uri.toString() === folderUriString); if (found && found.length > 0) { return found[0]; } From e07bba8de99e116d63eb18e142a711ed92b04445 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 14 Dec 2017 18:09:37 +0100 Subject: [PATCH 279/615] Keep track of what text got copied from what cursor and use that information when pasting (fixes #4996) --- .../browser/controller/textAreaHandler.ts | 32 +++++++++++++------ src/vs/editor/browser/view/viewController.ts | 3 +- src/vs/editor/common/controller/cursor.ts | 6 ++-- .../common/controller/cursorTypeOperations.ts | 10 ++++-- src/vs/editor/common/viewModel/viewModel.ts | 3 +- .../editor/common/viewModel/viewModelImpl.ts | 8 +++-- .../test/browser/controller/cursor.test.ts | 29 +++++++++++++++++ .../common/viewModel/viewModelImpl.test.ts | 8 ++--- 8 files changed, 76 insertions(+), 23 deletions(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 38ed4f83c10..ce528a8fdba 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -54,6 +54,7 @@ const canUseZeroSizeTextarea = (browser.isEdgeOrIE || browser.isFirefox); interface LocalClipboardMetadata { lastCopiedValue: string; isFromEmptySelection: boolean; + multicursorText: string[]; } /** @@ -161,15 +162,26 @@ export class TextAreaHandler extends ViewPart { const textAreaInputHost: ITextAreaInputHost = { getPlainTextToCopy: (): string => { - const whatToCopy = this._context.model.getPlainTextToCopy(this._selections, this._emptySelectionClipboard); + const rawWhatToCopy = this._context.model.getPlainTextToCopy(this._selections, this._emptySelectionClipboard); + const newLineCharacter = this._context.model.getEOL(); - // When writing "LINE\r\n" to the clipboard and then pasting, - // Firefox pastes "LINE\n", so let's work around this quirk - const lastCopiedValue = (browser.isFirefox ? whatToCopy.replace(/\r\n/g, '\n') : whatToCopy); - const metadata: LocalClipboardMetadata = { - lastCopiedValue: lastCopiedValue, - isFromEmptySelection: (this._emptySelectionClipboard && this._selections.length === 1 && this._selections[0].isEmpty()) - }; + const isFromEmptySelection = (this._emptySelectionClipboard && this._selections.length === 1 && this._selections[0].isEmpty()); + const multicursorText = (Array.isArray(rawWhatToCopy) ? rawWhatToCopy : null); + const whatToCopy = (Array.isArray(rawWhatToCopy) ? rawWhatToCopy.join(newLineCharacter) : rawWhatToCopy); + + let metadata: LocalClipboardMetadata = null; + if (isFromEmptySelection || multicursorText) { + // Only store the non-default metadata + + // When writing "LINE\r\n" to the clipboard and then pasting, + // Firefox pastes "LINE\n", so let's work around this quirk + const lastCopiedValue = (browser.isFirefox ? whatToCopy.replace(/\r\n/g, '\n') : whatToCopy); + metadata = { + lastCopiedValue: lastCopiedValue, + isFromEmptySelection: (this._emptySelectionClipboard && this._selections.length === 1 && this._selections[0].isEmpty()), + multicursorText: multicursorText + }; + } LocalClipboardMetadataManager.INSTANCE.set(metadata); @@ -228,10 +240,12 @@ export class TextAreaHandler extends ViewPart { const metadata = LocalClipboardMetadataManager.INSTANCE.get(e.text); let pasteOnNewLine = false; + let multicursorText: string[] = null; if (metadata) { pasteOnNewLine = (this._emptySelectionClipboard && metadata.isFromEmptySelection); + multicursorText = metadata.multicursorText; } - this._viewController.paste('keyboard', e.text, pasteOnNewLine); + this._viewController.paste('keyboard', e.text, pasteOnNewLine, multicursorText); })); this._register(this._textAreaInput.onCut(() => { diff --git a/src/vs/editor/browser/view/viewController.ts b/src/vs/editor/browser/view/viewController.ts index f817cd36c73..30f1155a1a8 100644 --- a/src/vs/editor/browser/view/viewController.ts +++ b/src/vs/editor/browser/view/viewController.ts @@ -62,10 +62,11 @@ export class ViewController { this._execCoreEditorCommandFunc(editorCommand, args); } - public paste(source: string, text: string, pasteOnNewLine: boolean): void { + public paste(source: string, text: string, pasteOnNewLine: boolean, multicursorText: string[]): void { this.commandService.executeCommand(editorCommon.Handler.Paste, { text: text, pasteOnNewLine: pasteOnNewLine, + multicursorText: multicursorText }); } diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index cb1ea9e9abc..30312b3bde3 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -454,7 +454,7 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { case H.Paste: cursorChangeReason = CursorChangeReason.Paste; - this._paste(payload.text, payload.pasteOnNewLine); + this._paste(payload.text, payload.pasteOnNewLine, payload.multicursorText); break; case H.Cut: @@ -517,8 +517,8 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { this._executeEditOperation(TypeOperations.replacePreviousChar(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections(), text, replaceCharCnt)); } - private _paste(text: string, pasteOnNewLine: boolean): void { - this._executeEditOperation(TypeOperations.paste(this.context.config, this.context.model, this.getSelections(), pasteOnNewLine, text)); + private _paste(text: string, pasteOnNewLine: boolean, multicursorText: string[]): void { + this._executeEditOperation(TypeOperations.paste(this.context.config, this.context.model, this.getSelections(), text, pasteOnNewLine, multicursorText)); } private _cut(): void { diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index f06527815ae..bebfb4ec772 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -109,7 +109,7 @@ export class TypeOperations { }); } - private static _distributePasteToCursors(selections: Selection[], pasteOnNewLine: boolean, text: string): string[] { + private static _distributePasteToCursors(selections: Selection[], text: string, pasteOnNewLine: boolean, multicursorText: string[]): string[] { if (pasteOnNewLine) { return null; } @@ -118,6 +118,10 @@ export class TypeOperations { return null; } + if (multicursorText && multicursorText.length === selections.length) { + return multicursorText; + } + for (let i = 0; i < selections.length; i++) { if (selections[i].startLineNumber !== selections[i].endLineNumber) { return null; @@ -132,8 +136,8 @@ export class TypeOperations { return pastePieces; } - public static paste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], pasteOnNewLine: boolean, text: string): EditOperationResult { - const distributedPaste = this._distributePasteToCursors(selections, pasteOnNewLine, text); + public static paste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], text: string, pasteOnNewLine: boolean, multicursorText: string[]): EditOperationResult { + const distributedPaste = this._distributePasteToCursors(selections, text, pasteOnNewLine, multicursorText); if (distributedPaste) { selections = selections.sort(Range.compareRangesUsingStarts); diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index 379460cebe9..6512796ee93 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -144,7 +144,8 @@ export interface IViewModel { validateModelPosition(modelPosition: IPosition): Position; deduceModelPositionRelativeToViewPosition(viewAnchorPosition: Position, deltaOffset: number, lineFeedCnt: number): Position; - getPlainTextToCopy(ranges: Range[], emptySelectionClipboard: boolean): string; + getEOL(): string; + getPlainTextToCopy(ranges: Range[], emptySelectionClipboard: boolean): string | string[]; getHTMLToCopy(ranges: Range[], emptySelectionClipboard: boolean): string; } diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index ec78471f926..34a91608c7d 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -428,7 +428,11 @@ export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel return this.model.getPositionAt(resultOffset); } - public getPlainTextToCopy(ranges: Range[], emptySelectionClipboard: boolean): string { + public getEOL(): string { + return this.model.getEOL(); + } + + public getPlainTextToCopy(ranges: Range[], emptySelectionClipboard: boolean): string | string[] { const newLineCharacter = this.model.getEOL(); ranges = ranges.slice(0); @@ -459,7 +463,7 @@ export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel for (let i = 0; i < nonEmptyRanges.length; i++) { result.push(this.getValueInRange(nonEmptyRanges[i], editorCommon.EndOfLinePreference.TextDefined)); } - return result.join(newLineCharacter); + return result.length === 1 ? result[0] : result; } public getHTMLToCopy(viewRanges: Range[], emptySelectionClipboard: boolean): string { diff --git a/src/vs/editor/test/browser/controller/cursor.test.ts b/src/vs/editor/test/browser/controller/cursor.test.ts index d33f5cf7360..0157257cae3 100644 --- a/src/vs/editor/test/browser/controller/cursor.test.ts +++ b/src/vs/editor/test/browser/controller/cursor.test.ts @@ -1418,6 +1418,35 @@ suite('Editor Controller - Regression tests', () => { }); }); + test('issue #4996: Multiple cursor paste pastes contents of all cursors', () => { + usingCursor({ + text: [ + 'line1', + 'line2', + 'line3' + ], + }, (model, cursor) => { + cursor.setSelections('test', [new Selection(1, 1, 1, 1), new Selection(2, 1, 2, 1)]); + + cursorCommand(cursor, H.Paste, { + text: 'a\nb\nc\nd', + pasteOnNewLine: false, + multicursorText: [ + 'a\nb', + 'c\nd' + ] + }); + + assert.equal(model.getValue(), [ + 'a', + 'bline1', + 'c', + 'dline2', + 'line3' + ].join('\n')); + }); + }); + test('issue #3071: Investigate why undo stack gets corrupted', () => { let model = Model.createFromString( [ diff --git a/src/vs/editor/test/common/viewModel/viewModelImpl.test.ts b/src/vs/editor/test/common/viewModel/viewModelImpl.test.ts index 665f07f72ef..637efcb87ab 100644 --- a/src/vs/editor/test/common/viewModel/viewModelImpl.test.ts +++ b/src/vs/editor/test/common/viewModel/viewModelImpl.test.ts @@ -42,10 +42,10 @@ suite('ViewModel', () => { }); }); - function assertGetPlainTextToCopy(text: string[], ranges: Range[], emptySelectionClipboard: boolean, expected: string): void { + function assertGetPlainTextToCopy(text: string[], ranges: Range[], emptySelectionClipboard: boolean, expected: string | string[]): void { testViewModel(text, {}, (viewModel, model) => { let actual = viewModel.getPlainTextToCopy(ranges, emptySelectionClipboard); - assert.equal(actual, expected); + assert.deepEqual(actual, expected); }); } @@ -157,7 +157,7 @@ suite('ViewModel', () => { new Range(3, 2, 3, 6), ], false, - 'ine2\nine3' + ['ine2', 'ine3'] ); }); @@ -169,7 +169,7 @@ suite('ViewModel', () => { new Range(2, 2, 2, 6), ], false, - 'ine2\nine3' + ['ine2', 'ine3'] ); }); From beb6a21322f46933b2c21b7f113067a4e715ace0 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 14 Dec 2017 18:32:20 +0100 Subject: [PATCH 280/615] Distribute paste to multiple cursors only if it originated with the same number of multiple cursors (fixes #16155) --- .../common/controller/cursorTypeOperations.ts | 13 +----- .../multicursor/test/multicursor.test.ts | 8 +++- .../test/browser/controller/cursor.test.ts | 43 +++++++++++++++++++ 3 files changed, 51 insertions(+), 13 deletions(-) diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index bebfb4ec772..dd726110ed9 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -122,18 +122,7 @@ export class TypeOperations { return multicursorText; } - for (let i = 0; i < selections.length; i++) { - if (selections[i].startLineNumber !== selections[i].endLineNumber) { - return null; - } - } - - let pastePieces = text.split(/\r\n|\r|\n/); - if (pastePieces.length !== selections.length) { - return null; - } - - return pastePieces; + return null; } public static paste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], text: string, pasteOnNewLine: boolean, multicursorText: string[]): EditOperationResult { diff --git a/src/vs/editor/contrib/multicursor/test/multicursor.test.ts b/src/vs/editor/contrib/multicursor/test/multicursor.test.ts index 3aac48899b2..7b79df1ed7a 100644 --- a/src/vs/editor/contrib/multicursor/test/multicursor.test.ts +++ b/src/vs/editor/contrib/multicursor/test/multicursor.test.ts @@ -27,7 +27,13 @@ suite('Multicursor', () => { addCursorUpAction.run(null, editor, {}); assert.equal(cursor.getSelections().length, 2); - editor.trigger('test', Handler.Paste, { text: '1\n2' }); + editor.trigger('test', Handler.Paste, { + text: '1\n2', + multicursorText: [ + '1', + '2' + ] + }); // cursorCommand(cursor, H.Paste, { text: '1\n2' }); assert.equal(editor.getModel().getLineContent(1), '1abc'); assert.equal(editor.getModel().getLineContent(2), '2def'); diff --git a/src/vs/editor/test/browser/controller/cursor.test.ts b/src/vs/editor/test/browser/controller/cursor.test.ts index 0157257cae3..53bec7bd137 100644 --- a/src/vs/editor/test/browser/controller/cursor.test.ts +++ b/src/vs/editor/test/browser/controller/cursor.test.ts @@ -1447,6 +1447,49 @@ suite('Editor Controller - Regression tests', () => { }); }); + test('issue #16155: Paste into multiple cursors has edge case when number of lines equals number of cursors - 1', () => { + usingCursor({ + text: [ + 'test', + 'test', + 'test', + 'test' + ], + }, (model, cursor) => { + cursor.setSelections('test', [ + new Selection(1, 1, 1, 5), + new Selection(2, 1, 2, 5), + new Selection(3, 1, 3, 5), + new Selection(4, 1, 4, 5), + ]); + + cursorCommand(cursor, H.Paste, { + text: 'aaa\nbbb\nccc\n', + pasteOnNewLine: false, + multicursorText: null + }); + + assert.equal(model.getValue(), [ + 'aaa', + 'bbb', + 'ccc', + '', + 'aaa', + 'bbb', + 'ccc', + '', + 'aaa', + 'bbb', + 'ccc', + '', + 'aaa', + 'bbb', + 'ccc', + '', + ].join('\n')); + }); + }); + test('issue #3071: Investigate why undo stack gets corrupted', () => { let model = Model.createFromString( [ From 41aba141d46eaa11a2ec077569a06092537b8170 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 14 Dec 2017 11:44:20 -0800 Subject: [PATCH 281/615] Basic test for workspace recommendations --- .../extensionsTipsService.test.ts | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 src/vs/workbench/parts/extensions/test/electron-browser/extensionsTipsService.test.ts diff --git a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsTipsService.test.ts b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsTipsService.test.ts new file mode 100644 index 00000000000..b28460d5a02 --- /dev/null +++ b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsTipsService.test.ts @@ -0,0 +1,128 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as assert from 'assert'; +import * as path from 'path'; +import * as fs from 'fs'; +import * as os from 'os'; +import { TPromise } from 'vs/base/common/winjs.base'; +import uuid = require('vs/base/common/uuid'); +import { mkdirp } from 'vs/base/node/pfs'; +import { IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService'; +import { ExtensionTipsService } from 'vs/workbench/parts/extensions/electron-browser/extensionTipsService'; +import { ExtensionGalleryService } from 'vs/platform/extensionManagement/node/extensionGalleryService'; +import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; +import { Emitter } from 'vs/base/common/event'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { TestTextResourceConfigurationService, TestContextService, TestLifecycleService } from 'vs/workbench/test/workbenchTestServices'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IModel } from 'vs/editor/common/editorCommon'; +import { IModelService } from 'vs/editor/common/services/modelService'; +import { Model as EditorModel } from 'vs/editor/common/model/model'; +import URI from 'vs/base/common/uri'; +import { testWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; +import { IFileService } from 'vs/platform/files/common/files'; +import { FileService } from 'vs/workbench/services/files/node/fileService'; +import extfs = require('vs/base/node/extfs'); +import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; +import { WorkspaceService } from 'vs/workbench/services/configuration/node/configurationService'; + +const expectedWorkspaceRecommendations = [ + 'eg2.tslint', + 'dbaeumer.vscode-eslint', + 'msjsdiag.debugger-for-chrome' +]; + +function setUpFolderWorkspace(folderName: string): TPromise<{ parentDir: string, folderDir: string }> { + const id = uuid.generateUuid(); + const parentDir = path.join(os.tmpdir(), 'vsctests', id); + return setUpFolder(folderName, parentDir).then(folderDir => ({ parentDir, folderDir })); +} + +function setUpFolder(folderName: string, parentDir: string): TPromise { + const folderDir = path.join(parentDir, folderName); + const workspaceSettingsDir = path.join(folderDir, '.vscode'); + return mkdirp(workspaceSettingsDir, 493).then(() => { + const configPath = path.join(workspaceSettingsDir, 'extensions.json'); + fs.writeFileSync(configPath, JSON.stringify({ + 'recommendations': expectedWorkspaceRecommendations + }, null, '\t')); + return folderDir; + }); +} + +suite('ExtensionsTipsService Test', () => { + let workspaceService: IWorkspaceContextService; + let instantiationService: TestInstantiationService; + let testObject: IExtensionTipsService; + let parentResource: string; + let onModelAddedEvent: Emitter; + const model: IModel = EditorModel.createFromString( + [ + 'This is the first line', + 'This is the second line', + 'This is the third line', + ].join('\n'), + undefined, + undefined, + URI.parse('far://testing/file.b')); + + suiteSetup(() => { + + onModelAddedEvent = new Emitter(); + instantiationService = new TestInstantiationService(); + instantiationService.stub(IModelService, { + _serviceBrand: IModelService, + getModel(): any { return model; }, + createModel(): any { throw new Error(); }, + updateModel(): any { throw new Error(); }, + setMode(): any { throw new Error(); }, + destroyModel(): any { throw new Error(); }, + getModels(): any { throw new Error(); }, + onModelAdded: onModelAddedEvent.event, + onModelModeChanged: undefined, + onModelRemoved: undefined, + getCreationOptions(): any { throw new Error(); } + }); + instantiationService.stub(ITelemetryService, NullTelemetryService); + instantiationService.stub(IExtensionGalleryService, ExtensionGalleryService); + instantiationService.stub(IConfigurationService, { onDidUpdateConfiguration: () => { }, onDidChangeConfiguration: () => { }, getConfiguration: () => ({}) }); + instantiationService.stub(IExtensionManagementService, ExtensionManagementService); + + }); + + setup(() => { + return setUpFolderWorkspace('myFolder').then(({ parentDir, folderDir }) => { + parentResource = parentDir; + const myWorkspace = testWorkspace(URI.from({ scheme: 'file', path: folderDir })); + workspaceService = new TestContextService(myWorkspace); + instantiationService.stub(IWorkspaceContextService, workspaceService); + instantiationService.stub(IFileService, new FileService(workspaceService, new TestTextResourceConfigurationService(), new TestConfigurationService(), new TestLifecycleService(), { disableWatcher: true })); + + testObject = instantiationService.createInstance(ExtensionTipsService); + + }); + }); + + teardown((done) => { + (testObject).dispose(); + + if (parentResource) { + extfs.del(parentResource, os.tmpdir(), () => { }, done); + } + }); + + test('test workspace folder recommendations', () => { + return testObject.getWorkspaceRecommendations().then(recommendations => { + assert.equal(recommendations.length, expectedWorkspaceRecommendations.length); + recommendations.forEach(x => assert.equal(expectedWorkspaceRecommendations.indexOf(x) > -1, true)); + }); + }); +}); \ No newline at end of file From 19e590a640771f10ebdcf265c8c2c30e2e5a8014 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 14 Dec 2017 11:46:37 -0800 Subject: [PATCH 282/615] Remove unused import --- .../test/electron-browser/extensionsTipsService.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsTipsService.test.ts b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsTipsService.test.ts index b28460d5a02..36fd245364b 100644 --- a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsTipsService.test.ts +++ b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsTipsService.test.ts @@ -32,7 +32,6 @@ import { IFileService } from 'vs/platform/files/common/files'; import { FileService } from 'vs/workbench/services/files/node/fileService'; import extfs = require('vs/base/node/extfs'); import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; -import { WorkspaceService } from 'vs/workbench/services/configuration/node/configurationService'; const expectedWorkspaceRecommendations = [ 'eg2.tslint', From b5ef98e6015d201104df4798d6859afdd02df958 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 14 Dec 2017 11:48:54 -0800 Subject: [PATCH 283/615] Fix #40183. GlobalFindClipboard option should only show on macOS. --- src/vs/editor/common/config/commonEditorConfig.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 0eef59e694f..15929affb6b 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -293,7 +293,8 @@ const editorConfiguration: IConfigurationNode = { 'editor.find.globalFindClipboard': { 'type': 'boolean', 'default': EDITOR_DEFAULTS.contribInfo.find.globalFindClipboard, - 'description': nls.localize('find.globalFindClipboard', "Controls if the Find Widget should read or modify the shared find clipboard on macOS") + 'description': nls.localize('find.globalFindClipboard', "Controls if the Find Widget should read or modify the shared find clipboard on macOS"), + 'included': platform.isMacintosh }, 'editor.wordWrap': { 'type': 'string', From 36af93a524cd43dc9a939661c1c45a4101988f02 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 14 Dec 2017 14:52:30 -0800 Subject: [PATCH 284/615] Pick up TS 2.7 insiders --- extensions/package.json | 2 +- extensions/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/package.json b/extensions/package.json index 339d071066a..aa1e4b4fa52 100644 --- a/extensions/package.json +++ b/extensions/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "Dependencies shared by all extensions", "dependencies": { - "typescript": "2.6.2" + "typescript": "2.7.0-insiders.20171214" }, "scripts": { "postinstall": "node ./postinstall" diff --git a/extensions/yarn.lock b/extensions/yarn.lock index 43a297415a9..6f720d2fdbe 100644 --- a/extensions/yarn.lock +++ b/extensions/yarn.lock @@ -2,6 +2,6 @@ # yarn lockfile v1 -typescript@2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4" +typescript@2.7.0-insiders.20171214: + version "2.7.0-insiders.20171214" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.0-insiders.20171214.tgz#841344ddae5f498a97c0435fcd12860480050e71" From 5503b0b92f8520ef16cb81298bb5874c00e09183 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 14 Dec 2017 16:02:08 -0800 Subject: [PATCH 285/615] Avoid emmet when typing css property values Fixes #34162 --- extensions/emmet/src/abbreviationActions.ts | 24 ++++- .../emmet/src/test/abbreviationAction.test.ts | 101 +++++++++++++++++- extensions/emmet/src/typings/EmmetNode.d.ts | 3 +- 3 files changed, 124 insertions(+), 4 deletions(-) diff --git a/extensions/emmet/src/abbreviationActions.ts b/extensions/emmet/src/abbreviationActions.ts index 480699eafe1..70c87da5bc6 100644 --- a/extensions/emmet/src/abbreviationActions.ts +++ b/extensions/emmet/src/abbreviationActions.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { Node, HtmlNode, Rule } from 'EmmetNode'; +import { Node, HtmlNode, Rule, Property } from 'EmmetNode'; import { getEmmetHelper, getNode, getInnerRange, getMappingForIncludedLanguages, parseDocument, validate, getEmmetConfiguration, isStyleSheet, getEmmetMode } from './util'; const trimRegex = /[\u00a0]*[\d|#|\-|\*|\u2022]+\.?/; @@ -223,6 +223,23 @@ export function isValidLocationForEmmetAbbreviation(document: vscode.TextDocumen return true; } + // Fix for https://github.com/Microsoft/vscode/issues/34162 + // Other than sass, stylus, we can make use of the terminator tokens to validate position + if (syntax !== 'sass' && syntax !== 'stylus' && currentNode.type === 'property') { + const propertyNode = currentNode; + if (propertyNode.terminatorToken + && propertyNode.separator + && position.isAfterOrEqual(propertyNode.separatorToken.end) + && position.isBeforeOrEqual(propertyNode.terminatorToken.start)) { + return false; + } + if (!propertyNode.terminatorToken + && propertyNode.separator + && position.isAfterOrEqual(propertyNode.separatorToken.end)) { + return false; + } + } + // If current node is a rule or at-rule, then perform additional checks to ensure // emmet suggestions are not provided in the rule selector if (currentNode.type !== 'rule' && currentNode.type !== 'at-rule') { @@ -242,7 +259,10 @@ export function isValidLocationForEmmetAbbreviation(document: vscode.TextDocumen if (currentCssNode.parent && (currentCssNode.parent.type === 'rule' || currentCssNode.parent.type === 'at-rule') && currentCssNode.selectorToken - && position.line !== currentCssNode.selectorToken.end.line) { + && position.line !== currentCssNode.selectorToken.end.line + && currentCssNode.selectorToken.start.character === abbreviationRange.start.character + && currentCssNode.selectorToken.start.line === abbreviationRange.start.line + ) { return true; } diff --git a/extensions/emmet/src/test/abbreviationAction.test.ts b/extensions/emmet/src/test/abbreviationAction.test.ts index 101da90685c..fdfc373e96f 100644 --- a/extensions/emmet/src/test/abbreviationAction.test.ts +++ b/extensions/emmet/src/test/abbreviationAction.test.ts @@ -42,6 +42,13 @@ const scssContents = ` p40 } } +.foo { + margin: 10px; + margin: a + .hoo { + color: #000; + } +} `; const htmlContents = ` @@ -373,6 +380,71 @@ suite('Tests for Expand Abbreviations (CSS)', () => { }); }); + test('Skip when typing property values when there is a property in the next line (CSS)', () => { + const testContent = ` +.foo { + margin: a + margin: 10px; +} + `; + + return withRandomFileEditor(testContent, 'css', (editor, doc) => { + editor.selection = new Selection(2, 10, 2, 10); + return expandEmmetAbbreviation(null).then(() => { + assert.equal(editor.document.getText(), testContent); + const cancelSrc = new CancellationTokenSource(); + const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token); + if (completionPromise) { + assert.equal(1, 2, `Invalid completion at property value`); + } + return Promise.resolve(); + }); + }); + }); + + test('Skip when typing property values when there is a property in the previous line (CSS)', () => { + const testContent = ` +.foo { + margin: 10px; + margin: a +} + `; + + return withRandomFileEditor(testContent, 'css', (editor, doc) => { + editor.selection = new Selection(3, 10, 3, 10); + return expandEmmetAbbreviation(null).then(() => { + assert.equal(editor.document.getText(), testContent); + const cancelSrc = new CancellationTokenSource(); + const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(3, 10), cancelSrc.token); + if (completionPromise) { + assert.equal(1, 2, `Invalid completion at property value`); + } + return Promise.resolve(); + }); + }); + }); + + test('Skip when typing property values when it is the only property in the rule (CSS)', () => { + const testContent = ` +.foo { + margin: a +} + `; + + return withRandomFileEditor(testContent, 'css', (editor, doc) => { + editor.selection = new Selection(2, 10, 2, 10); + return expandEmmetAbbreviation(null).then(() => { + assert.equal(editor.document.getText(), testContent); + const cancelSrc = new CancellationTokenSource(); + const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token); + if (completionPromise) { + assert.equal(1, 2, `Invalid completion at property value`); + } + return Promise.resolve(); + }); + }); + }); + test('Expand abbreviation in completion list (CSS)', () => { const abbreviation = 'm10'; const expandedText = 'margin: 10px;'; @@ -430,8 +502,20 @@ suite('Tests for Expand Abbreviations (CSS)', () => { const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(5, 5), cancelSrc.token); const completionPromise3 = completionProvider.provideCompletionItems(editor.document, new Position(11, 4), cancelSrc.token); const completionPromise4 = completionProvider.provideCompletionItems(editor.document, new Position(14, 5), cancelSrc.token); + if (!completionPromise1) { + assert.equal(1, 2, `Problem with expanding padding abbreviations at line 3 col 4`); + } + if (!completionPromise2) { + assert.equal(1, 2, `Problem with expanding padding abbreviations at line 5 col 5`); + } + if (!completionPromise3) { + assert.equal(1, 2, `Problem with expanding padding abbreviations at line 11 col 4`); + } + if (!completionPromise4) { + assert.equal(1, 2, `Problem with expanding padding abbreviations at line 14 col 5`); + } + if (!completionPromise1 || !completionPromise2 || !completionPromise3 || !completionPromise4) { - assert.equal(1, 2, `Problem with expanding padding abbreviations`); return Promise.resolve(); } @@ -515,6 +599,21 @@ m10 }); + test('Skip when typing property values when there is a nested rule in the next line (SCSS)', () => { + return withRandomFileEditor(scssContents, 'scss', (editor, doc) => { + editor.selection = new Selection(19, 10, 19, 10); + return expandEmmetAbbreviation(null).then(() => { + assert.equal(editor.document.getText(), scssContents); + const cancelSrc = new CancellationTokenSource(); + const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(19, 10), cancelSrc.token); + if (completionPromise) { + assert.equal(1, 2, `Invalid completion at property value`); + } + return Promise.resolve(); + }); + }); +}); + suite('Tests for Wrap with Abbreviations', () => { teardown(closeAllEditors); diff --git a/extensions/emmet/src/typings/EmmetNode.d.ts b/extensions/emmet/src/typings/EmmetNode.d.ts index 476af0ed931..478241f0d8a 100644 --- a/extensions/emmet/src/typings/EmmetNode.d.ts +++ b/extensions/emmet/src/typings/EmmetNode.d.ts @@ -68,9 +68,10 @@ declare module 'EmmetNode' { export interface Property extends CssNode { valueToken: Token - separator: Token + separator: string parent: Rule terminatorToken: Token + separatorToken: Token value: string } From 206b62db8d7adbbe0806b8d18d1aae8758b1608b Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 14 Dec 2017 16:11:12 -0800 Subject: [PATCH 286/615] Slightly better "logger" comment --- src/vs/vscode.proposed.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 6f099f90b0d..7fe3e931dd6 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -367,7 +367,7 @@ declare module 'vscode' { export interface ExtensionContext { /** - * A logger + * This extension's logger */ logger: Logger; } From 9a34f5ae3090a09f43a4d275f8ee03f595ab8b42 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 15 Dec 2017 07:42:56 +0100 Subject: [PATCH 287/615] Add cp936 encoding (for #39664) --- src/vs/base/node/encoding.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/base/node/encoding.ts b/src/vs/base/node/encoding.ts index 03a87492c34..4177f3ffab5 100644 --- a/src/vs/base/node/encoding.ts +++ b/src/vs/base/node/encoding.ts @@ -181,6 +181,7 @@ const windowsTerminalEncodings = { '865': 'cp865', // Nordic '866': 'cp866', // Russian '869': 'cp869', // Modern Greek + '936': 'cp936', // Simplified Chinese '1252': 'cp1252' // West European Latin }; From 9a5e8b3ae515217244071ec33eaca26903a71269 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 15 Dec 2017 08:27:39 +0100 Subject: [PATCH 288/615] fixes #40261 --- src/vs/platform/list/browser/listService.ts | 6 ++++++ src/vs/workbench/electron-browser/commands.ts | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/list/browser/listService.ts b/src/vs/platform/list/browser/listService.ts index b4d344e30ac..5ae623175f4 100644 --- a/src/vs/platform/list/browser/listService.ts +++ b/src/vs/platform/list/browser/listService.ts @@ -73,12 +73,18 @@ export class ListService implements IListService { } const RawWorkbenchListFocusContextKey = new RawContextKey('listFocus', true); +export const WorkbenchListSupportsMultiSelectContextKey = new RawContextKey('listSupportsMultiselect', true); export const WorkbenchListFocusContextKey = ContextKeyExpr.and(RawWorkbenchListFocusContextKey, ContextKeyExpr.not(InputFocusedContextKey)); export type Widget = List | PagedList | ITree; function createScopedContextKeyService(contextKeyService: IContextKeyService, widget: Widget): IContextKeyService { const result = contextKeyService.createScoped(widget.getHTMLElement()); + + if (widget instanceof List || widget instanceof PagedList) { + WorkbenchListSupportsMultiSelectContextKey.bindTo(result); + } + RawWorkbenchListFocusContextKey.bindTo(result); return result; } diff --git a/src/vs/workbench/electron-browser/commands.ts b/src/vs/workbench/electron-browser/commands.ts index b7f991b44e9..571d2f562fd 100644 --- a/src/vs/workbench/electron-browser/commands.ts +++ b/src/vs/workbench/electron-browser/commands.ts @@ -19,9 +19,10 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import URI from 'vs/base/common/uri'; import { IEditorOptions, Position as EditorPosition } from 'vs/platform/editor/common/editor'; import { openFolderCommand, openFileInNewWindowCommand, openFileFolderInNewWindowCommand, openFolderInNewWindowCommand, openWorkspaceInNewWindowCommand } from 'vs/workbench/browser/actions/workspaceActions'; -import { WorkbenchListFocusContextKey, IListService } from 'vs/platform/list/browser/listService'; +import { WorkbenchListFocusContextKey, IListService, WorkbenchListSupportsMultiSelectContextKey } from 'vs/platform/list/browser/listService'; import { PagedList } from 'vs/base/browser/ui/list/listPaging'; import { range } from 'vs/base/common/arrays'; +import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; // --- List Commands @@ -304,7 +305,7 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.selectAll', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: WorkbenchListFocusContextKey, + when: ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey), primary: KeyMod.CtrlCmd | KeyCode.KEY_A, handler: (accessor) => { const focused = accessor.get(IListService).lastFocusedList; From 5a6e8dc0d39e4676486c333795db17f8c636851c Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 15 Dec 2017 09:47:37 +0100 Subject: [PATCH 289/615] #40169 Remove usage of custom marshaller --- .../mainThreadConfiguration.ts | 22 ++++++++++++++----- src/vs/workbench/api/node/extHost.protocol.ts | 6 ++--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts index 04b312408b0..2b307d2d019 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { IDisposable } from 'vs/base/common/lifecycle'; import { Registry } from 'vs/platform/registry/common/platform'; @@ -13,7 +13,7 @@ import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/ import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import { MainThreadConfigurationShape, MainContext, ExtHostContext, IExtHostContext, IWorkspaceConfigurationChangeEventData } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; -import { ConfigurationTarget, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; +import { ConfigurationTarget, IConfigurationChangeEvent, IConfigurationModel } from 'vs/platform/configuration/common/configuration'; @extHostNamedCustomer(MainContext.MainThreadConfiguration) export class MainThreadConfiguration implements MainThreadConfigurationShape { @@ -36,11 +36,13 @@ export class MainThreadConfiguration implements MainThreadConfigurationShape { this._configurationListener.dispose(); } - $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any, resource: URI): TPromise { + $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any, resourceUriComponenets: UriComponents): TPromise { + const resource = resourceUriComponenets ? URI.revive(resourceUriComponenets) : null; return this.writeConfiguration(target, key, value, resource); } - $removeConfigurationOption(target: ConfigurationTarget, key: string, resource: URI): TPromise { + $removeConfigurationOption(target: ConfigurationTarget, key: string, resourceUriComponenets: UriComponents): TPromise { + const resource = resourceUriComponenets ? URI.revive(resourceUriComponenets) : null; return this.writeConfiguration(target, key, undefined, resource); } @@ -61,11 +63,19 @@ export class MainThreadConfiguration implements MainThreadConfigurationShape { private toConfigurationChangeEventData(event: IConfigurationChangeEvent): IWorkspaceConfigurationChangeEventData { return { - changedConfiguration: event.changedConfiguration, + changedConfiguration: this.toJSONConfiguration(event.changedConfiguration), changedConfigurationByResource: event.changedConfigurationByResource.keys().reduce((result, resource) => { - result[resource.toString()] = event.changedConfigurationByResource.get(resource); + result[resource.toString()] = this.toJSONConfiguration(event.changedConfigurationByResource.get(resource)); return result; }, Object.create({})) }; } + + private toJSONConfiguration({ contents, keys, overrides }: IConfigurationModel = { contents: {}, keys: [], overrides: [] }): IConfigurationModel { + return { + contents, + keys, + overrides + }; + } } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 6fd6f4c9b30..3519c9f7ab4 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -109,8 +109,8 @@ export interface MainThreadCommandsShape extends IDisposable { } export interface MainThreadConfigurationShape extends IDisposable { - $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any, resource: URI): TPromise; - $removeConfigurationOption(target: ConfigurationTarget, key: string, resource: URI): TPromise; + $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any, resource: UriComponents): TPromise; + $removeConfigurationOption(target: ConfigurationTarget, key: string, resource: UriComponents): TPromise; } export interface MainThreadDiagnosticsShape extends IDisposable { @@ -733,7 +733,7 @@ export interface ExtHostWindowShape { export const MainContext = { MainThreadCommands: >createMainId('MainThreadCommands'), - MainThreadConfiguration: createMainId('MainThreadConfiguration', ProxyType.CustomMarshaller), + MainThreadConfiguration: createMainId('MainThreadConfiguration'), MainThreadDebugService: createMainId('MainThreadDebugService'), MainThreadDecorations: createMainId('MainThreadDecorations'), MainThreadDiagnostics: createMainId('MainThreadDiagnostics'), From 059b634d514ef80cc9834619f1f7a68689565745 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 15 Dec 2017 09:53:43 +0100 Subject: [PATCH 290/615] Fix warning --- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 3519c9f7ab4..07acb77672f 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -14,7 +14,7 @@ import { import * as vscode from 'vscode'; -import URI, { UriComponents } from 'vs/base/common/uri'; +import { UriComponents } from 'vs/base/common/uri'; import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; From 6cb8c4c715f684b03c3785ace0dfaa75719454a9 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 15 Dec 2017 10:00:05 +0100 Subject: [PATCH 291/615] Revert "only listen after getting data once, #40210" This reverts commit 20adb31b67748b524978cdc89292c06cb8cf7fad. --- .../decorations/browser/decorationsService.ts | 41 +++++++------------ 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/src/vs/workbench/services/decorations/browser/decorationsService.ts b/src/vs/workbench/services/decorations/browser/decorationsService.ts index f49ecdddc20..d153ab11cf3 100644 --- a/src/vs/workbench/services/decorations/browser/decorationsService.ts +++ b/src/vs/workbench/services/decorations/browser/decorationsService.ts @@ -230,19 +230,30 @@ class FileDecorationChangeEvent implements IResourceDecorationChangeEvent { class DecorationProviderWrapper { readonly data = TernarySearchTree.forPaths | IDecorationData>(); - - private _listener: IDisposable; + private readonly _dispoable: IDisposable; constructor( private readonly _provider: IDecorationsProvider, private readonly _uriEmitter: Emitter, private readonly _flushEmitter: Emitter ) { - // + this._dispoable = this._provider.onDidChange(uris => { + if (!uris) { + // flush event -> drop all data, can affect everything + this.data.clear(); + this._flushEmitter.fire({ affectsResource() { return true; } }); + + } else { + // selective changes -> drop for resource, fetch again, send event + for (const uri of uris) { + this._fetchData(uri); + } + } + }); } dispose(): void { - this._listener.dispose(); + this._dispoable.dispose(); this.data.clear(); } @@ -283,11 +294,7 @@ class DecorationProviderWrapper { } private _fetchData(uri: URI): IDecorationData { - // listen to provider changes only after - // we have asked it for data... - this._ensureIsListening(); - // retrieve data, do the dance const dataOrThenable = this._provider.provideDecorations(uri); if (!isThenable(dataOrThenable)) { // sync -> we have a result now @@ -313,24 +320,6 @@ class DecorationProviderWrapper { } return deco; } - - private _ensureIsListening(): void { - if (!this._listener) { - this._listener = this._provider.onDidChange(uris => { - if (!uris) { - // flush event -> drop all data, can affect everything - this.data.clear(); - this._flushEmitter.fire({ affectsResource() { return true; } }); - - } else { - // selective changes -> drop for resource, fetch again, send event - for (const uri of uris) { - this._fetchData(uri); - } - } - }); - } - } } export class FileDecorationsService implements IDecorationsService { From 4e5de4b71b12877a00f9e1f60e84decf5df75655 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 15 Dec 2017 10:33:10 +0100 Subject: [PATCH 292/615] debounce and queue decoration request, fixes #40210 --- .../electron-browser/mainThreadDecorations.ts | 56 +++++++++++++++++-- src/vs/workbench/api/node/extHost.protocol.ts | 9 ++- .../workbench/api/node/extHostDecorations.ts | 21 +++++-- 3 files changed, 75 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts b/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts index 09118ecfa68..d0ab516ec47 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDecorations.ts @@ -7,21 +7,69 @@ import URI, { UriComponents } from 'vs/base/common/uri'; import { Emitter } from 'vs/base/common/event'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { ExtHostContext, MainContext, IExtHostContext, MainThreadDecorationsShape, ExtHostDecorationsShape } from '../node/extHost.protocol'; +import { ExtHostContext, MainContext, IExtHostContext, MainThreadDecorationsShape, ExtHostDecorationsShape, DecorationData, DecorationRequest } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; import { IDecorationsService, IDecorationData } from 'vs/workbench/services/decorations/browser/decorations'; +class DecorationRequestsQueue { + + private _idPool = 0; + private _requests: DecorationRequest[] = []; + private _resolver: { [id: number]: Function } = Object.create(null); + + private _timer: number; + + constructor( + private _proxy: ExtHostDecorationsShape + ) { + // + } + + enqueue(handle: number, uri: URI): Thenable { + return new Promise((resolve, reject) => { + const id = ++this._idPool; + this._requests.push({ id, handle, uri }); + this._resolver[id] = resolve; + this._processQueue(); + }); + } + + private _processQueue(): void { + if (typeof this._timer === 'number') { + // already queued + return; + } + this._timer = setTimeout(() => { + // make request + const requests = this._requests; + const resolver = this._resolver; + this._proxy.$provideDecorations(requests).then(data => { + for (const id in resolver) { + resolver[id](data[id]); + } + }); + + // reset + this._requests = []; + this._resolver = []; + this._timer = void 0; + }, 0); + } +} + @extHostNamedCustomer(MainContext.MainThreadDecorations) export class MainThreadDecorations implements MainThreadDecorationsShape { private readonly _provider = new Map, IDisposable]>(); private readonly _proxy: ExtHostDecorationsShape; + private readonly _requestQueue: DecorationRequestsQueue; constructor( context: IExtHostContext, @IDecorationsService private readonly _decorationsService: IDecorationsService ) { this._proxy = context.getProxy(ExtHostContext.ExtHostDecorations); + this._requestQueue = new DecorationRequestsQueue(this._proxy); } dispose() { @@ -30,12 +78,12 @@ export class MainThreadDecorations implements MainThreadDecorationsShape { } $registerDecorationProvider(handle: number, label: string): void { - let emitter = new Emitter(); - let registration = this._decorationsService.registerDecorationsProvider({ + const emitter = new Emitter(); + const registration = this._decorationsService.registerDecorationsProvider({ label, onDidChange: emitter.event, provideDecorations: (uri) => { - return this._proxy.$provideDecorations(handle, uri).then(data => { + return this._requestQueue.enqueue(handle, uri).then(data => { if (!data) { return undefined; } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 07acb77672f..d4ed202afab 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -719,10 +719,17 @@ export interface ExtHostDebugServiceShape { } +export interface DecorationRequest { + readonly id: number; + readonly handle: number; + readonly uri: UriComponents; +} + export type DecorationData = [number, boolean, string, string, ThemeColor, string]; +export type DecorationReply = { [id: number]: DecorationData }; export interface ExtHostDecorationsShape { - $provideDecorations(handle: number, uri: UriComponents): TPromise; + $provideDecorations(requests: DecorationRequest[]): TPromise; } export interface ExtHostWindowShape { diff --git a/src/vs/workbench/api/node/extHostDecorations.ts b/src/vs/workbench/api/node/extHostDecorations.ts index cdbfc5e482c..89987b137bb 100644 --- a/src/vs/workbench/api/node/extHostDecorations.ts +++ b/src/vs/workbench/api/node/extHostDecorations.ts @@ -5,8 +5,8 @@ 'use strict'; import * as vscode from 'vscode'; -import URI, { UriComponents } from 'vs/base/common/uri'; -import { MainContext, IMainContext, ExtHostDecorationsShape, MainThreadDecorationsShape, DecorationData } from 'vs/workbench/api/node/extHost.protocol'; +import URI from 'vs/base/common/uri'; +import { MainContext, IMainContext, ExtHostDecorationsShape, MainThreadDecorationsShape, DecorationData, DecorationRequest, DecorationReply } from 'vs/workbench/api/node/extHost.protocol'; import { TPromise } from 'vs/base/common/winjs.base'; import { Disposable } from 'vs/workbench/api/node/extHostTypes'; import { asWinJsPromise } from 'vs/base/common/async'; @@ -38,10 +38,19 @@ export class ExtHostDecorations implements ExtHostDecorationsShape { }); } - $provideDecorations(handle: number, data: UriComponents): TPromise { - const provider = this._provider.get(handle); - return asWinJsPromise(token => provider.provideDecoration(URI.revive(data), token)).then(data => { - return data && [data.priority, data.bubble, data.title, data.abbreviation, data.color, data.source]; + $provideDecorations(requests: DecorationRequest[]): TPromise { + const result: DecorationReply = Object.create(null); + return TPromise.join(requests.map(request => { + const { handle, uri, id } = request; + const provider = this._provider.get(handle); + return asWinJsPromise(token => provider.provideDecoration(URI.revive(uri), token)).then(data => { + result[id] = data && [data.priority, data.bubble, data.title, data.abbreviation, data.color, data.source]; + }, err => { + console.error(err); + }); + + })).then(() => { + return result; }); } } From 9622ada626a545a7d10c433c1ed977b657dcba66 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 15 Dec 2017 10:36:07 +0100 Subject: [PATCH 293/615] find git in LocalAppData and PATH, win32 fixes #40229 --- extensions/git/package.json | 6 ++++-- extensions/git/src/git.ts | 10 +++++++++- extensions/git/yarn.lock | 14 ++++++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index e59670ac0c1..685e59ea5a7 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -968,13 +968,15 @@ "file-type": "^7.2.0", "iconv-lite": "0.4.19", "vscode-extension-telemetry": "0.0.8", - "vscode-nls": "2.0.2" + "vscode-nls": "2.0.2", + "which": "^1.3.0" }, "devDependencies": { "@types/byline": "4.2.31", "@types/file-type": "^5.2.1", "@types/mocha": "2.2.43", "@types/node": "7.0.43", + "@types/which": "^1.0.28", "mocha": "^3.2.0" } -} \ No newline at end of file +} diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index c39b96c6045..3ec01de6f17 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -9,6 +9,7 @@ import * as fs from 'fs'; import * as path from 'path'; import * as os from 'os'; import * as cp from 'child_process'; +import * as which from 'which'; import { EventEmitter } from 'events'; import iconv = require('iconv-lite'); import * as filetype from 'file-type'; @@ -124,10 +125,17 @@ function findSystemGitWin32(base: string, onLookup: (path: string) => void): Pro return findSpecificGit(path.join(base, 'Git', 'cmd', 'git.exe'), onLookup); } +function findGitWin32InPath(onLookup: (path: string) => void): Promise { + const whichPromise = new Promise((c, e) => which('git.exe', (err, path) => err ? e(err) : c(path))); + return whichPromise.then(path => findSpecificGit(path, onLookup)); +} + function findGitWin32(onLookup: (path: string) => void): Promise { return findSystemGitWin32(process.env['ProgramW6432'] as string, onLookup) .then(void 0, () => findSystemGitWin32(process.env['ProgramFiles(x86)'] as string, onLookup)) - .then(void 0, () => findSystemGitWin32(process.env['ProgramFiles'] as string, onLookup)); + .then(void 0, () => findSystemGitWin32(process.env['ProgramFiles'] as string, onLookup)) + .then(void 0, () => findSystemGitWin32(path.join(process.env['LocalAppData'] as string, 'Programs'), onLookup)) + .then(void 0, () => findGitWin32InPath(onLookup)); } export function findGit(hint: string | undefined, onLookup: (path: string) => void): Promise { diff --git a/extensions/git/yarn.lock b/extensions/git/yarn.lock index 9f5376164a6..a9d4c679d30 100644 --- a/extensions/git/yarn.lock +++ b/extensions/git/yarn.lock @@ -26,6 +26,10 @@ version "7.0.43" resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c" +"@types/which@^1.0.28": + version "1.0.28" + resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6" + applicationinsights@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-0.18.0.tgz#162ebb48a383408bc4de44db32b417307f45bbc1" @@ -123,6 +127,10 @@ inherits@2: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + json3@3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" @@ -238,6 +246,12 @@ vscode-nls@2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da" +which@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + winreg@1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/winreg/-/winreg-1.2.3.tgz#93ad116b2696da87d58f7265a8fcea5254a965d5" From fa61ea9c0672e37ff2c721c620cc604d46665737 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Fri, 15 Dec 2017 10:35:31 +0100 Subject: [PATCH 294/615] Fixes #40228: code --status doesn't work if your shell is PowerShell --- src/vs/base/node/ps.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/base/node/ps.ts b/src/vs/base/node/ps.ts index 4fae9b9466d..98e760dd5d3 100644 --- a/src/vs/base/node/ps.ts +++ b/src/vs/base/node/ps.ts @@ -158,10 +158,10 @@ export function listProcesses(rootPid: number): Promise { } }; - const execMain = path.basename(process.execPath).replace(/ /g, '` '); - const script = URI.parse(require.toUrl('vs/base/node/ps-win.ps1')).fsPath.replace(/ /g, '` '); - const commandLine = `${script} -ProcessName ${execMain} -MaxSamples 3`; - const cmd = spawn('powershell.exe', ['-ExecutionPolicy', 'Bypass', '-Command', commandLine]); + const execMain = path.basename(process.execPath); + const script = URI.parse(require.toUrl('vs/base/node/ps-win.ps1')).fsPath; + const commandLine = `& {& '${script}' -ProcessName '${execMain}' -MaxSamples 3}`; + const cmd = spawn('powershell.exe', ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', commandLine]); let stdout = ''; let stderr = ''; From 4a7ec03c3180c7dcc736a3c7e80eee2035472c2c Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Fri, 15 Dec 2017 10:42:08 +0100 Subject: [PATCH 295/615] Log stdout if JSON.parse fails --- src/vs/base/node/ps.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/base/node/ps.ts b/src/vs/base/node/ps.ts index 98e760dd5d3..bab3f3ef833 100644 --- a/src/vs/base/node/ps.ts +++ b/src/vs/base/node/ps.ts @@ -223,6 +223,7 @@ export function listProcesses(rootPid: number): Promise { reject(new Error(`Root process ${rootPid} not found`)); } } catch (error) { + console.log(stdout); reject(error); } }); From f046bda260fa7012fe20756fda65bbb545e6a108 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 15 Dec 2017 11:08:22 +0100 Subject: [PATCH 296/615] remove custom marshaller related to #40169 --- src/vs/workbench/api/node/extHost.protocol.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index d4ed202afab..f4a43066b6b 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -763,7 +763,7 @@ export const MainContext = { MainThreadWorkspace: createMainId('MainThreadWorkspace'), MainThreadFileSystem: createMainId('MainThreadFileSystem'), MainThreadExtensionService: createMainId('MainThreadExtensionService'), - MainThreadSCM: createMainId('MainThreadSCM', ProxyType.CustomMarshaller), + MainThreadSCM: createMainId('MainThreadSCM'), MainThreadTask: createMainId('MainThreadTask', ProxyType.CustomMarshaller), MainThreadWindow: createMainId('MainThreadWindow'), }; @@ -788,7 +788,7 @@ export const ExtHostContext = { ExtHostExtensionService: createExtId('ExtHostExtensionService'), // ExtHostLogService: createExtId('ExtHostLogService'), ExtHostTerminalService: createExtId('ExtHostTerminalService'), - ExtHostSCM: createExtId('ExtHostSCM', ProxyType.CustomMarshaller), + ExtHostSCM: createExtId('ExtHostSCM'), ExtHostTask: createExtId('ExtHostTask', ProxyType.CustomMarshaller), ExtHostWorkspace: createExtId('ExtHostWorkspace'), ExtHostWindow: createExtId('ExtHostWindow'), From 78d927d647daf3c6523c90b528836565b29e2204 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 15 Dec 2017 11:05:03 +0100 Subject: [PATCH 297/615] Don't use custom marshaller for ext host init data (#40169) --- src/vs/workbench/node/extensionHostProcess.ts | 3 +-- .../services/extensions/electron-browser/extensionHost.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/node/extensionHostProcess.ts b/src/vs/workbench/node/extensionHostProcess.ts index b0eac4b06f4..0f118c8cddb 100644 --- a/src/vs/workbench/node/extensionHostProcess.ts +++ b/src/vs/workbench/node/extensionHostProcess.ts @@ -7,7 +7,6 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { ExtensionHostMain, exit } from 'vs/workbench/node/extensionHostMain'; -import { parse } from 'vs/base/common/marshalling'; import { IInitData } from 'vs/workbench/api/node/extHost.protocol'; import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; import { Protocol } from 'vs/base/parts/ipc/node/ipc.net'; @@ -68,7 +67,7 @@ function connectToRenderer(protocol: IMessagePassingProtocol): Promise { first.dispose(); - const initData = parse(raw); + const initData = JSON.parse(raw); // Print a console message when rejection isn't handled within N seconds. For details: // see https://nodejs.org/api/process.html#process_event_unhandledrejection diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts b/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts index 4e881ab0b2f..62474f4acbc 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts @@ -7,7 +7,6 @@ import * as nls from 'vs/nls'; import { toErrorMessage } from 'vs/base/common/errorMessage'; -import { stringify } from 'vs/base/common/marshalling'; import * as objects from 'vs/base/common/objects'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -329,7 +328,7 @@ export class ExtensionHostProcessWorker { if (msg === 'ready') { // 1) Extension Host is ready to receive messages, initialize it - this._createExtHostInitData().then(data => protocol.send(stringify(data))); + this._createExtHostInitData().then(data => protocol.send(JSON.stringify(data))); return; } From eb1f87c452b01139b69ccb2e52535aa726494eaf Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 15 Dec 2017 11:12:32 +0100 Subject: [PATCH 298/615] #40169 Remove reference to custom marshaller --- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index f4a43066b6b..18227ca7781 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -770,7 +770,7 @@ export const MainContext = { export const ExtHostContext = { ExtHostCommands: createExtId('ExtHostCommands'), - ExtHostConfiguration: createExtId('ExtHostConfiguration', ProxyType.CustomMarshaller), + ExtHostConfiguration: createExtId('ExtHostConfiguration'), ExtHostDiagnostics: createExtId('ExtHostDiagnostics'), ExtHostDebugService: createExtId('ExtHostDebugService'), ExtHostDecorations: createExtId('ExtHostDecorations'), From 966100d9fab1dcfbfa7db587f6c2ca90827adf25 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 15 Dec 2017 11:25:20 +0100 Subject: [PATCH 299/615] Only accept WorkspaceEdit, #34664 --- .../typescript/src/features/quickFixProvider.ts | 4 ++-- src/vs/vscode.proposed.d.ts | 12 ++++++------ src/vs/workbench/api/node/extHostLanguageFeatures.ts | 4 +--- src/vs/workbench/api/node/extHostTypeConverters.ts | 12 ------------ 4 files changed, 9 insertions(+), 23 deletions(-) diff --git a/extensions/typescript/src/features/quickFixProvider.ts b/extensions/typescript/src/features/quickFixProvider.ts index 9293818f1b0..24f493e49e5 100644 --- a/extensions/typescript/src/features/quickFixProvider.ts +++ b/extensions/typescript/src/features/quickFixProvider.ts @@ -106,7 +106,7 @@ export default class TypeScriptQuickFixProvider implements vscode.CodeActionProv private getCommandForAction(action: Proto.CodeAction): vscode.CodeAction { return { title: action.description, - edits: getEditForCodeAction(this.client, action), + edit: getEditForCodeAction(this.client, action), command: action.commands ? { command: ApplyCodeActionCommand.ID, arguments: [action], @@ -115,4 +115,4 @@ export default class TypeScriptQuickFixProvider implements vscode.CodeActionProv diagnostics: [] }; } -} \ No newline at end of file +} diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 7fe3e931dd6..802d64df976 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -210,11 +210,11 @@ declare module 'vscode' { title: string; /** - * Optional edit that performs the code action. + * A workspace edit this code action performs. * - * Either `command` or `edits` must be provided for a `CodeAction`. + * *Note* that either an [`edit`](CodeAction#edit) or a [`command`](CodeAction#command) must be supplied. */ - edits?: TextEdit[] | WorkspaceEdit; + edit?: WorkspaceEdit; /** * Diagnostics that this code action resolves. @@ -222,9 +222,9 @@ declare module 'vscode' { diagnostics?: Diagnostic[]; /** - * Optional command that performs the code action. + * A command this code action performs. * - * Executed after `edits` if any edits are provided. Either `command` or `edits` must be provided for a `CodeAction`. + * *Note* that either an [`edit`](CodeAction#edit) or a [`command`](CodeAction#command) must be supplied. */ command?: Command; @@ -237,7 +237,7 @@ declare module 'vscode' { * @param title The title of the code action. * @param edits The edit of the code action. */ - constructor(title: string, edits?: TextEdit[] | WorkspaceEdit); + constructor(title: string, edit?: WorkspaceEdit); } export interface CodeActionProvider { diff --git a/src/vs/workbench/api/node/extHostLanguageFeatures.ts b/src/vs/workbench/api/node/extHostLanguageFeatures.ts index 2425ca991c8..3f8e0d8603c 100644 --- a/src/vs/workbench/api/node/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/node/extHostLanguageFeatures.ts @@ -314,9 +314,7 @@ class CodeActionAdapter { title: candidate.title, command: candidate.command && this._commands.toInternal(candidate.command), diagnostics: candidate.diagnostics && candidate.diagnostics.map(DiagnosticCollection.toMarkerData), - edits: Array.isArray(candidate.edits) - ? TypeConverters.WorkspaceEdit.fromTextEdits(resource, candidate.edits) - : candidate.edits && TypeConverters.WorkspaceEdit.from(candidate.edits), + edits: candidate.edit && TypeConverters.WorkspaceEdit.from(candidate.edit), }); } } diff --git a/src/vs/workbench/api/node/extHostTypeConverters.ts b/src/vs/workbench/api/node/extHostTypeConverters.ts index f2e7dce967d..8b10ccba4ba 100644 --- a/src/vs/workbench/api/node/extHostTypeConverters.ts +++ b/src/vs/workbench/api/node/extHostTypeConverters.ts @@ -241,18 +241,6 @@ export namespace WorkspaceEdit { return result; } - export function fromTextEdits(uri: vscode.Uri, textEdits: vscode.TextEdit[]): modes.WorkspaceEdit { - const result: modes.WorkspaceEdit = { edits: [] }; - for (let textEdit of textEdits) { - result.edits.push({ - resource: uri, - newText: textEdit.newText, - range: fromRange(textEdit.range) - }); - } - return result; - } - export function to(value: modes.WorkspaceEdit) { const result = new types.WorkspaceEdit(); for (const edit of value.edits) { From 20b3ee42d8d9cdd287f903bb858d955fea57ab31 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 15 Dec 2017 11:35:43 +0100 Subject: [PATCH 300/615] Fix #40281 --- .../parts/output/browser/outputServices.ts | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/parts/output/browser/outputServices.ts b/src/vs/workbench/parts/output/browser/outputServices.ts index 5e67c1e3bde..284791a1f63 100644 --- a/src/vs/workbench/parts/output/browser/outputServices.ts +++ b/src/vs/workbench/parts/output/browser/outputServices.ts @@ -277,8 +277,8 @@ export class OutputService implements IOutputService { } this.activeChannelId = id; - return this.doShowChannel(id, preserveFocus) - .then(() => this._onActiveOutputChannel.fire(id)); + const promise: TPromise = this._outputPanel ? this.doShowChannel(id, preserveFocus) : this.panelService.openPanel(OUTPUT_PANEL_ID); + return promise.then(() => this._onActiveOutputChannel.fire(id)); } showChannelInEditor(channelId: string): TPromise { @@ -342,15 +342,19 @@ export class OutputService implements IOutputService { } private doShowChannel(channelId: string, preserveFocus: boolean): TPromise { - const channel = this.getChannel(channelId); - return channel.show() - .then(() => { - this.storageService.store(OUTPUT_ACTIVE_CHANNEL_KEY, channelId, StorageScope.WORKSPACE); - this._outputPanel.setInput(this.createInput(channelId), EditorOptions.create({ preserveFocus: preserveFocus })); - if (!preserveFocus) { - this._outputPanel.focus(); - } - }); + if (this._outputPanel) { + const channel = this.getChannel(channelId); + return channel.show() + .then(() => { + this.storageService.store(OUTPUT_ACTIVE_CHANNEL_KEY, channelId, StorageScope.WORKSPACE); + this._outputPanel.setInput(this.createInput(channelId), EditorOptions.create({ preserveFocus: preserveFocus })); + if (!preserveFocus) { + this._outputPanel.focus(); + } + }); + } else { + return TPromise.as(null); + } } private doHideChannel(channelId): void { From 8b35e5037df9f7465d499b5c2765392a64687533 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 15 Dec 2017 11:36:17 +0100 Subject: [PATCH 301/615] debug: restart debugging should not reuse session id fixes #39371 --- .../debug/electron-browser/debugService.ts | 68 +++++++++---------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index a667b911eab..4bf0359490e 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -1021,45 +1021,43 @@ export class DebugService implements debug.IDebugService { } public restartProcess(process: debug.IProcess, restartData?: any): TPromise { - return this.textFileService.saveAll().then(() => { - if (process.session.capabilities.supportsRestartRequest) { - return process.session.custom('restart', null); - } - const focusedProcess = this.viewModel.focusedProcess; - const preserveFocus = focusedProcess && process.getId() === focusedProcess.getId(); + if (process.session.capabilities.supportsRestartRequest) { + return process.session.custom('restart', null); + } + const focusedProcess = this.viewModel.focusedProcess; + const preserveFocus = focusedProcess && process.getId() === focusedProcess.getId(); - return process.session.disconnect(true).then(() => { - if (strings.equalsIgnoreCase(process.configuration.type, 'extensionHost')) { - return this.broadcastService.broadcast({ - channel: EXTENSION_RELOAD_BROADCAST_CHANNEL, - payload: [process.session.root.uri.fsPath] - }); - } - - return new TPromise((c, e) => { - setTimeout(() => { - // Read the configuration again if a launch.json has been changed, if not just use the inmemory configuration - let config = process.configuration; - if (this.launchJsonChanged && this.configurationManager.selectedLaunch) { - this.launchJsonChanged = false; - config = this.configurationManager.selectedLaunch.getConfiguration(process.configuration.name) || config; - // Take the type from the process since the debug extension might overwrite it #21316 - config.type = process.configuration.type; - config.noDebug = process.configuration.noDebug; - } - config.__restart = restartData; - this.createProcess(process.session.root, config, process.getId()).then(() => c(null), err => e(err)); - }, 300); + return process.session.disconnect(true).then(() => { + if (strings.equalsIgnoreCase(process.configuration.type, 'extensionHost')) { + return this.broadcastService.broadcast({ + channel: EXTENSION_RELOAD_BROADCAST_CHANNEL, + payload: [process.session.root.uri.fsPath] }); - }).then(() => { - if (preserveFocus) { - // Restart should preserve the focused process - const restartedProcess = this.model.getProcesses().filter(p => p.configuration.name === process.configuration.name).pop(); - if (restartedProcess && restartedProcess !== this.viewModel.focusedProcess) { - this.focusStackFrame(undefined, undefined, restartedProcess); + } + + return new TPromise((c, e) => { + setTimeout(() => { + // Read the configuration again if a launch.json has been changed, if not just use the inmemory configuration + let config = process.configuration; + if (this.launchJsonChanged && this.configurationManager.selectedLaunch) { + this.launchJsonChanged = false; + config = this.configurationManager.selectedLaunch.getConfiguration(process.configuration.name) || config; + // Take the type from the process since the debug extension might overwrite it #21316 + config.type = process.configuration.type; + config.noDebug = process.configuration.noDebug; } - } + config.__restart = restartData; + this.startDebugging(process.session.root, config).then(() => c(null), err => e(err)); + }, 300); }); + }).then(() => { + if (preserveFocus) { + // Restart should preserve the focused process + const restartedProcess = this.model.getProcesses().filter(p => p.configuration.name === process.configuration.name).pop(); + if (restartedProcess && restartedProcess !== this.viewModel.focusedProcess) { + this.focusStackFrame(undefined, undefined, restartedProcess); + } + } }); } From cd4b141302502fa21d46604a91f4b9e756e2b4a6 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 15 Dec 2017 11:45:48 +0100 Subject: [PATCH 302/615] debt - less TPromise in extHost.protocol --- .../electron-browser/mainThreadCommands.ts | 6 ++--- .../electron-browser/mainThreadDiagnostics.ts | 7 ++---- .../api/electron-browser/mainThreadEditors.ts | 10 ++++---- .../api/electron-browser/mainThreadStorage.ts | 2 +- src/vs/workbench/api/node/extHost.protocol.ts | 24 +++++++++---------- .../api/extHostCommands.test.ts | 15 +++++------- .../api/extHostDiagnostics.test.ts | 13 +++++----- 7 files changed, 34 insertions(+), 43 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadCommands.ts b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts index 050e27b59d0..5d693ddb28f 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadCommands.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts @@ -54,20 +54,18 @@ export class MainThreadCommands implements MainThreadCommandsShape { }); } - $registerCommand(id: string): TPromise { + $registerCommand(id: string): void { this._disposables.set( id, CommandsRegistry.registerCommand(id, (accessor, ...args) => this._proxy.$executeContributedCommand(id, ...args)) ); - return undefined; } - $unregisterCommand(id: string): TPromise { + $unregisterCommand(id: string): void { if (this._disposables.has(id)) { this._disposables.get(id).dispose(); this._disposables.delete(id); } - return undefined; } $executeCommand(id: string, args: any[]): Thenable { diff --git a/src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts b/src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts index e0dcb93f1d7..5051aabba45 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts @@ -6,7 +6,6 @@ import { IMarkerService, IMarkerData } from 'vs/platform/markers/common/markers'; import URI, { UriComponents } from 'vs/base/common/uri'; -import { TPromise } from 'vs/base/common/winjs.base'; import { MainThreadDiagnosticsShape, MainContext, IExtHostContext } from '../node/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; @@ -27,18 +26,16 @@ export class MainThreadDiagnostics implements MainThreadDiagnosticsShape { this._activeOwners.forEach(owner => this._markerService.changeAll(owner, undefined)); } - $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): TPromise { + $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): void { for (let entry of entries) { let [uri, markers] = entry; this._markerService.changeOne(owner, URI.revive(uri), markers); } this._activeOwners.add(owner); - return undefined; } - $clear(owner: string): TPromise { + $clear(owner: string): void { this._markerService.changeAll(owner, undefined); this._activeOwners.delete(owner); - return undefined; } } diff --git a/src/vs/workbench/api/electron-browser/mainThreadEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts index 971d5df9a08..01660eb6a4d 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts @@ -162,7 +162,7 @@ export class MainThreadEditors implements MainThreadEditorsShape { return undefined; } - $trySetSelections(id: string, selections: ISelection[]): TPromise { + $trySetSelections(id: string, selections: ISelection[]): TPromise { if (!this._documentsAndEditors.getEditor(id)) { return TPromise.wrapError(disposed(`TextEditor(${id})`)); } @@ -170,7 +170,7 @@ export class MainThreadEditors implements MainThreadEditorsShape { return TPromise.as(null); } - $trySetDecorations(id: string, key: string, ranges: IDecorationOptions[]): TPromise { + $trySetDecorations(id: string, key: string, ranges: IDecorationOptions[]): TPromise { if (!this._documentsAndEditors.getEditor(id)) { return TPromise.wrapError(disposed(`TextEditor(${id})`)); } @@ -178,7 +178,7 @@ export class MainThreadEditors implements MainThreadEditorsShape { return TPromise.as(null); } - $trySetDecorationsFast(id: string, key: string, ranges: number[]): TPromise { + $trySetDecorationsFast(id: string, key: string, ranges: number[]): TPromise { if (!this._documentsAndEditors.getEditor(id)) { return TPromise.wrapError(disposed(`TextEditor(${id})`)); } @@ -186,7 +186,7 @@ export class MainThreadEditors implements MainThreadEditorsShape { return TPromise.as(null); } - $tryRevealRange(id: string, range: IRange, revealType: TextEditorRevealType): TPromise { + $tryRevealRange(id: string, range: IRange, revealType: TextEditorRevealType): TPromise { if (!this._documentsAndEditors.getEditor(id)) { return TPromise.wrapError(disposed(`TextEditor(${id})`)); } @@ -194,7 +194,7 @@ export class MainThreadEditors implements MainThreadEditorsShape { return undefined; } - $trySetOptions(id: string, options: ITextEditorConfigurationUpdate): TPromise { + $trySetOptions(id: string, options: ITextEditorConfigurationUpdate): TPromise { if (!this._documentsAndEditors.getEditor(id)) { return TPromise.wrapError(disposed(`TextEditor(${id})`)); } diff --git a/src/vs/workbench/api/electron-browser/mainThreadStorage.ts b/src/vs/workbench/api/electron-browser/mainThreadStorage.ts index a58f4d0f466..403ddbdde6b 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadStorage.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadStorage.ts @@ -38,7 +38,7 @@ export class MainThreadStorage implements MainThreadStorageShape { } } - $setValue(shared: boolean, key: string, value: any): TPromise { + $setValue(shared: boolean, key: string, value: any): TPromise { let jsonValue: any; try { jsonValue = JSON.stringify(value); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 18227ca7781..4db1eb79fae 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -102,8 +102,8 @@ export interface IMainContext extends IRPCProtocol { // --- main thread export interface MainThreadCommandsShape extends IDisposable { - $registerCommand(id: string): TPromise; - $unregisterCommand(id: string): TPromise; + $registerCommand(id: string): void; + $unregisterCommand(id: string): void; $executeCommand(id: string, args: any[]): Thenable; $getCommands(): Thenable; } @@ -114,8 +114,8 @@ export interface MainThreadConfigurationShape extends IDisposable { } export interface MainThreadDiagnosticsShape extends IDisposable { - $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): TPromise; - $clear(owner: string): TPromise; + $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): void; + $clear(owner: string): void; } export interface MainThreadDialogOpenOptions { @@ -152,7 +152,7 @@ export interface MainThreadDocumentContentProvidersShape extends IDisposable { export interface MainThreadDocumentsShape extends IDisposable { $tryCreateDocument(options?: { language?: string; content?: string; }): TPromise; - $tryOpenDocument(uri: UriComponents): TPromise; + $tryOpenDocument(uri: UriComponents): TPromise; $trySaveDocument(uri: UriComponents): TPromise; } @@ -216,14 +216,14 @@ export interface MainThreadEditorsShape extends IDisposable { $removeTextEditorDecorationType(key: string): void; $tryShowEditor(id: string, position: EditorPosition): TPromise; $tryHideEditor(id: string): TPromise; - $trySetOptions(id: string, options: ITextEditorConfigurationUpdate): TPromise; - $trySetDecorations(id: string, key: string, ranges: editorCommon.IDecorationOptions[]): TPromise; - $trySetDecorationsFast(id: string, key: string, ranges: number[]): TPromise; - $tryRevealRange(id: string, range: IRange, revealType: TextEditorRevealType): TPromise; - $trySetSelections(id: string, selections: ISelection[]): TPromise; + $trySetOptions(id: string, options: ITextEditorConfigurationUpdate): TPromise; + $trySetDecorations(id: string, key: string, ranges: editorCommon.IDecorationOptions[]): TPromise; + $trySetDecorationsFast(id: string, key: string, ranges: number[]): TPromise; + $tryRevealRange(id: string, range: IRange, revealType: TextEditorRevealType): TPromise; + $trySetSelections(id: string, selections: ISelection[]): TPromise; $tryApplyEdits(id: string, modelVersionId: number, edits: editorCommon.ISingleEditOperation[], opts: IApplyEditsOptions): TPromise; $tryApplyWorkspaceEdit(workspaceResourceEdits: IWorkspaceResourceEdit[]): TPromise; - $tryInsertSnippet(id: string, template: string, selections: IRange[], opts: IUndoStopOptions): TPromise; + $tryInsertSnippet(id: string, template: string, selections: IRange[], opts: IUndoStopOptions): TPromise; $getDiffInformation(id: string): TPromise; } @@ -352,7 +352,7 @@ export interface MainThreadStatusBarShape extends IDisposable { export interface MainThreadStorageShape extends IDisposable { $getValue(shared: boolean, key: string): TPromise; - $setValue(shared: boolean, key: string, value: any): TPromise; + $setValue(shared: boolean, key: string, value: any): TPromise; } export interface MainThreadTelemetryShape extends IDisposable { diff --git a/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts index 98029fe424b..4a63beb1958 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts @@ -8,7 +8,6 @@ import * as assert from 'assert'; import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; import { MainThreadCommandsShape } from 'vs/workbench/api/node/extHost.protocol'; -import { TPromise } from 'vs/base/common/winjs.base'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { OneGetThreadService } from './testThreadService'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; @@ -21,12 +20,11 @@ suite('ExtHostCommands', function () { let lastUnregister: string; const shape = new class extends mock() { - $registerCommand(id: string): TPromise { - return undefined; + $registerCommand(id: string): void { + // } - $unregisterCommand(id: string): TPromise { + $unregisterCommand(id: string): void { lastUnregister = id; - return undefined; } }; @@ -42,12 +40,11 @@ suite('ExtHostCommands', function () { let unregisterCounter = 0; const shape = new class extends mock() { - $registerCommand(id: string): TPromise { - return undefined; + $registerCommand(id: string): void { + // } - $unregisterCommand(id: string): TPromise { + $unregisterCommand(id: string): void { unregisterCounter += 1; - return undefined; } }; diff --git a/src/vs/workbench/test/electron-browser/api/extHostDiagnostics.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDiagnostics.test.ts index d62022fb25b..95bee35a936 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDiagnostics.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDiagnostics.test.ts @@ -11,18 +11,17 @@ import Severity from 'vs/base/common/severity'; import { DiagnosticCollection } from 'vs/workbench/api/node/extHostDiagnostics'; import { Diagnostic, DiagnosticSeverity, Range } from 'vs/workbench/api/node/extHostTypes'; import { MainThreadDiagnosticsShape } from 'vs/workbench/api/node/extHost.protocol'; -import { TPromise } from 'vs/base/common/winjs.base'; import { IMarkerData } from 'vs/platform/markers/common/markers'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; suite('ExtHostDiagnostics', () => { class DiagnosticsShape extends mock() { - $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): TPromise { - return TPromise.as(null); + $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): void { + // } - $clear(owner: string): TPromise { - return TPromise.as(null); + $clear(owner: string): void { + // } } @@ -165,7 +164,7 @@ suite('ExtHostDiagnostics', () => { let lastEntries: [UriComponents, IMarkerData[]][]; let collection = new DiagnosticCollection('test', new class extends DiagnosticsShape { - $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): TPromise { + $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): void { lastEntries = entries; return super.$changeMany(owner, entries); } @@ -239,7 +238,7 @@ suite('ExtHostDiagnostics', () => { let lastEntries: [UriComponents, IMarkerData[]][]; let collection = new DiagnosticCollection('test', new class extends DiagnosticsShape { - $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): TPromise { + $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): void { lastEntries = entries; return super.$changeMany(owner, entries); } From 96ac39f68f5a11cdabe0b128e8f4b596ebe3798b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 15 Dec 2017 12:10:14 +0100 Subject: [PATCH 303/615] debt - less TPromise in extHost.protocol --- .../mainThreadLanguageFeatures.ts | 65 ++++++------------- src/vs/workbench/api/node/extHost.protocol.ts | 42 ++++++------ 2 files changed, 42 insertions(+), 65 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts b/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts index 660c3a22477..e1bc5da5f5b 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts @@ -48,13 +48,12 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha } } - $unregister(handle: number): TPromise { + $unregister(handle: number): void { let registration = this._registrations[handle]; if (registration) { registration.dispose(); delete this._registrations[handle]; } - return undefined; } //#region --- revive functions @@ -110,18 +109,17 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha // --- outline - $registerOutlineSupport(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerOutlineSupport(handle: number, selector: vscode.DocumentSelector): void { this._registrations[handle] = modes.DocumentSymbolProviderRegistry.register(toLanguageSelector(selector), { provideDocumentSymbols: (model: IReadOnlyModel, token: CancellationToken): Thenable => { return wireCancellationToken(token, this._proxy.$provideDocumentSymbols(handle, model.uri)).then(MainThreadLanguageFeatures._reviveSymbolInformationDto); } }); - return undefined; } // --- code lens - $registerCodeLensSupport(handle: number, selector: vscode.DocumentSelector, eventHandle: number): TPromise { + $registerCodeLensSupport(handle: number, selector: vscode.DocumentSelector, eventHandle: number): void { const provider = { provideCodeLenses: (model: IReadOnlyModel, token: CancellationToken): modes.ICodeLensSymbol[] | Thenable => { @@ -139,111 +137,100 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha } this._registrations[handle] = modes.CodeLensProviderRegistry.register(toLanguageSelector(selector), provider); - return undefined; } - $emitCodeLensEvent(eventHandle: number, event?: any): TPromise { + $emitCodeLensEvent(eventHandle: number, event?: any): void { const obj = this._registrations[eventHandle]; if (obj instanceof Emitter) { obj.fire(event); } - return undefined; } // --- declaration - $registerDeclaractionSupport(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerDeclaractionSupport(handle: number, selector: vscode.DocumentSelector): void { this._registrations[handle] = modes.DefinitionProviderRegistry.register(toLanguageSelector(selector), { provideDefinition: (model, position, token): Thenable => { return wireCancellationToken(token, this._proxy.$provideDefinition(handle, model.uri, position)).then(MainThreadLanguageFeatures._reviveLocationDto); } }); - return undefined; } - $registerImplementationSupport(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerImplementationSupport(handle: number, selector: vscode.DocumentSelector): void { this._registrations[handle] = modes.ImplementationProviderRegistry.register(toLanguageSelector(selector), { provideImplementation: (model, position, token): Thenable => { return wireCancellationToken(token, this._proxy.$provideImplementation(handle, model.uri, position)).then(MainThreadLanguageFeatures._reviveLocationDto); } }); - return undefined; } - $registerTypeDefinitionSupport(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerTypeDefinitionSupport(handle: number, selector: vscode.DocumentSelector): void { this._registrations[handle] = modes.TypeDefinitionProviderRegistry.register(toLanguageSelector(selector), { provideTypeDefinition: (model, position, token): Thenable => { return wireCancellationToken(token, this._proxy.$provideTypeDefinition(handle, model.uri, position)).then(MainThreadLanguageFeatures._reviveLocationDto); } }); - return undefined; } // --- extra info - $registerHoverProvider(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerHoverProvider(handle: number, selector: vscode.DocumentSelector): void { this._registrations[handle] = modes.HoverProviderRegistry.register(toLanguageSelector(selector), { provideHover: (model: IReadOnlyModel, position: EditorPosition, token: CancellationToken): Thenable => { return wireCancellationToken(token, this._proxy.$provideHover(handle, model.uri, position)); } }); - return undefined; } // --- occurrences - $registerDocumentHighlightProvider(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerDocumentHighlightProvider(handle: number, selector: vscode.DocumentSelector): void { this._registrations[handle] = modes.DocumentHighlightProviderRegistry.register(toLanguageSelector(selector), { provideDocumentHighlights: (model: IReadOnlyModel, position: EditorPosition, token: CancellationToken): Thenable => { return wireCancellationToken(token, this._proxy.$provideDocumentHighlights(handle, model.uri, position)); } }); - return undefined; } // --- references - $registerReferenceSupport(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerReferenceSupport(handle: number, selector: vscode.DocumentSelector): void { this._registrations[handle] = modes.ReferenceProviderRegistry.register(toLanguageSelector(selector), { provideReferences: (model: IReadOnlyModel, position: EditorPosition, context: modes.ReferenceContext, token: CancellationToken): Thenable => { return wireCancellationToken(token, this._proxy.$provideReferences(handle, model.uri, position, context)).then(MainThreadLanguageFeatures._reviveLocationDto); } }); - return undefined; } // --- quick fix - $registerQuickFixSupport(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerQuickFixSupport(handle: number, selector: vscode.DocumentSelector): void { this._registrations[handle] = modes.CodeActionProviderRegistry.register(toLanguageSelector(selector), { provideCodeActions: (model: IReadOnlyModel, range: EditorRange, token: CancellationToken): Thenable => { return this._heapService.trackRecursive(wireCancellationToken(token, this._proxy.$provideCodeActions(handle, model.uri, range))).then(MainThreadLanguageFeatures._reviveCodeActionDto); } }); - return undefined; } // --- formatting - $registerDocumentFormattingSupport(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerDocumentFormattingSupport(handle: number, selector: vscode.DocumentSelector): void { this._registrations[handle] = modes.DocumentFormattingEditProviderRegistry.register(toLanguageSelector(selector), { provideDocumentFormattingEdits: (model: IReadOnlyModel, options: modes.FormattingOptions, token: CancellationToken): Thenable => { return wireCancellationToken(token, this._proxy.$provideDocumentFormattingEdits(handle, model.uri, options)); } }); - return undefined; } - $registerRangeFormattingSupport(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerRangeFormattingSupport(handle: number, selector: vscode.DocumentSelector): void { this._registrations[handle] = modes.DocumentRangeFormattingEditProviderRegistry.register(toLanguageSelector(selector), { provideDocumentRangeFormattingEdits: (model: IReadOnlyModel, range: EditorRange, options: modes.FormattingOptions, token: CancellationToken): Thenable => { return wireCancellationToken(token, this._proxy.$provideDocumentRangeFormattingEdits(handle, model.uri, range, options)); } }); - return undefined; } - $registerOnTypeFormattingSupport(handle: number, selector: vscode.DocumentSelector, autoFormatTriggerCharacters: string[]): TPromise { + $registerOnTypeFormattingSupport(handle: number, selector: vscode.DocumentSelector, autoFormatTriggerCharacters: string[]): void { this._registrations[handle] = modes.OnTypeFormattingEditProviderRegistry.register(toLanguageSelector(selector), { autoFormatTriggerCharacters, @@ -252,12 +239,11 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha return wireCancellationToken(token, this._proxy.$provideOnTypeFormattingEdits(handle, model.uri, position, ch, options)); } }); - return undefined; } // --- navigate type - $registerNavigateTypeSupport(handle: number): TPromise { + $registerNavigateTypeSupport(handle: number): void { let lastResultId: number; this._registrations[handle] = WorkspaceSymbolProviderRegistry.register({ provideWorkspaceSymbols: (search: string): TPromise => { @@ -273,23 +259,21 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha return this._proxy.$resolveWorkspaceSymbol(handle, item).then(i => MainThreadLanguageFeatures._reviveSymbolInformationDto(i)); } }); - return undefined; } // --- rename - $registerRenameSupport(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerRenameSupport(handle: number, selector: vscode.DocumentSelector): void { this._registrations[handle] = modes.RenameProviderRegistry.register(toLanguageSelector(selector), { provideRenameEdits: (model: IReadOnlyModel, position: EditorPosition, newName: string, token: CancellationToken): Thenable => { return wireCancellationToken(token, this._proxy.$provideRenameEdits(handle, model.uri, position, newName)).then(MainThreadLanguageFeatures._reviveWorkspaceEditDto); } }); - return undefined; } // --- suggest - $registerSuggestSupport(handle: number, selector: vscode.DocumentSelector, triggerCharacters: string[], supportsResolveDetails: boolean): TPromise { + $registerSuggestSupport(handle: number, selector: vscode.DocumentSelector, triggerCharacters: string[], supportsResolveDetails: boolean): void { this._registrations[handle] = modes.SuggestRegistry.register(toLanguageSelector(selector), { triggerCharacters, provideCompletionItems: (model: IReadOnlyModel, position: EditorPosition, context: modes.SuggestContext, token: CancellationToken): Thenable => { @@ -308,12 +292,11 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha ? (model, position, suggestion, token) => wireCancellationToken(token, this._proxy.$resolveCompletionItem(handle, model.uri, position, suggestion)) : undefined }); - return undefined; } // --- parameter hints - $registerSignatureHelpProvider(handle: number, selector: vscode.DocumentSelector, triggerCharacter: string[]): TPromise { + $registerSignatureHelpProvider(handle: number, selector: vscode.DocumentSelector, triggerCharacter: string[]): void { this._registrations[handle] = modes.SignatureHelpProviderRegistry.register(toLanguageSelector(selector), { signatureHelpTriggerCharacters: triggerCharacter, @@ -323,12 +306,11 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha } }); - return undefined; } // --- links - $registerDocumentLinkProvider(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerDocumentLinkProvider(handle: number, selector: vscode.DocumentSelector): void { this._registrations[handle] = modes.LinkProviderRegistry.register(toLanguageSelector(selector), { provideLinks: (model, token) => { return this._heapService.trackRecursive(wireCancellationToken(token, this._proxy.$provideDocumentLinks(handle, model.uri))); @@ -337,12 +319,11 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha return wireCancellationToken(token, this._proxy.$resolveDocumentLink(handle, link)); } }); - return undefined; } // --- colors - $registerDocumentColorProvider(handle: number, selector: vscode.DocumentSelector): TPromise { + $registerDocumentColorProvider(handle: number, selector: vscode.DocumentSelector): void { const proxy = this._proxy; this._registrations[handle] = modes.ColorProviderRegistry.register(toLanguageSelector(selector), { provideDocumentColors: (model, token) => { @@ -372,8 +353,6 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha })); } }); - - return TPromise.as(null); } // --- configuration @@ -421,7 +400,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha return onEnterRules.map(MainThreadLanguageFeatures._reviveOnEnterRule); } - $setLanguageConfiguration(handle: number, languageId: string, _configuration: ISerializedLanguageConfiguration): TPromise { + $setLanguageConfiguration(handle: number, languageId: string, _configuration: ISerializedLanguageConfiguration): void { let configuration: LanguageConfiguration = { comments: _configuration.comments, @@ -453,8 +432,6 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha if (languageIdentifier) { this._registrations[handle] = LanguageConfigurationRegistry.register(languageIdentifier, configuration); } - - return undefined; } } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 4db1eb79fae..612c03dcf49 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -276,27 +276,27 @@ export interface ISerializedLanguageConfiguration { } export interface MainThreadLanguageFeaturesShape extends IDisposable { - $unregister(handle: number): TPromise; - $registerOutlineSupport(handle: number, selector: vscode.DocumentSelector): TPromise; - $registerCodeLensSupport(handle: number, selector: vscode.DocumentSelector, eventHandle: number): TPromise; - $emitCodeLensEvent(eventHandle: number, event?: any): TPromise; - $registerDeclaractionSupport(handle: number, selector: vscode.DocumentSelector): TPromise; - $registerImplementationSupport(handle: number, selector: vscode.DocumentSelector): TPromise; - $registerTypeDefinitionSupport(handle: number, selector: vscode.DocumentSelector): TPromise; - $registerHoverProvider(handle: number, selector: vscode.DocumentSelector): TPromise; - $registerDocumentHighlightProvider(handle: number, selector: vscode.DocumentSelector): TPromise; - $registerReferenceSupport(handle: number, selector: vscode.DocumentSelector): TPromise; - $registerQuickFixSupport(handle: number, selector: vscode.DocumentSelector): TPromise; - $registerDocumentFormattingSupport(handle: number, selector: vscode.DocumentSelector): TPromise; - $registerRangeFormattingSupport(handle: number, selector: vscode.DocumentSelector): TPromise; - $registerOnTypeFormattingSupport(handle: number, selector: vscode.DocumentSelector, autoFormatTriggerCharacters: string[]): TPromise; - $registerNavigateTypeSupport(handle: number): TPromise; - $registerRenameSupport(handle: number, selector: vscode.DocumentSelector): TPromise; - $registerSuggestSupport(handle: number, selector: vscode.DocumentSelector, triggerCharacters: string[], supportsResolveDetails: boolean): TPromise; - $registerSignatureHelpProvider(handle: number, selector: vscode.DocumentSelector, triggerCharacter: string[]): TPromise; - $registerDocumentLinkProvider(handle: number, selector: vscode.DocumentSelector): TPromise; - $registerDocumentColorProvider(handle: number, selector: vscode.DocumentSelector): TPromise; - $setLanguageConfiguration(handle: number, languageId: string, configuration: ISerializedLanguageConfiguration): TPromise; + $unregister(handle: number): void; + $registerOutlineSupport(handle: number, selector: vscode.DocumentSelector): void; + $registerCodeLensSupport(handle: number, selector: vscode.DocumentSelector, eventHandle: number): void; + $emitCodeLensEvent(eventHandle: number, event?: any): void; + $registerDeclaractionSupport(handle: number, selector: vscode.DocumentSelector): void; + $registerImplementationSupport(handle: number, selector: vscode.DocumentSelector): void; + $registerTypeDefinitionSupport(handle: number, selector: vscode.DocumentSelector): void; + $registerHoverProvider(handle: number, selector: vscode.DocumentSelector): void; + $registerDocumentHighlightProvider(handle: number, selector: vscode.DocumentSelector): void; + $registerReferenceSupport(handle: number, selector: vscode.DocumentSelector): void; + $registerQuickFixSupport(handle: number, selector: vscode.DocumentSelector): void; + $registerDocumentFormattingSupport(handle: number, selector: vscode.DocumentSelector): void; + $registerRangeFormattingSupport(handle: number, selector: vscode.DocumentSelector): void; + $registerOnTypeFormattingSupport(handle: number, selector: vscode.DocumentSelector, autoFormatTriggerCharacters: string[]): void; + $registerNavigateTypeSupport(handle: number): void; + $registerRenameSupport(handle: number, selector: vscode.DocumentSelector): void; + $registerSuggestSupport(handle: number, selector: vscode.DocumentSelector, triggerCharacters: string[], supportsResolveDetails: boolean): void; + $registerSignatureHelpProvider(handle: number, selector: vscode.DocumentSelector, triggerCharacter: string[]): void; + $registerDocumentLinkProvider(handle: number, selector: vscode.DocumentSelector): void; + $registerDocumentColorProvider(handle: number, selector: vscode.DocumentSelector): void; + $setLanguageConfiguration(handle: number, languageId: string, configuration: ISerializedLanguageConfiguration): void; } export interface MainThreadLanguagesShape extends IDisposable { From 1de3965724d5c047893ddfccbb83602897b67fd9 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 15 Dec 2017 12:10:58 +0100 Subject: [PATCH 304/615] registerExplorerCommands -> registerEditorCommands --- src/vs/workbench/browser/parts/editor/editorCommands.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index d03fe3611fe..b57124eabed 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -29,7 +29,7 @@ export function setup(): void { registerActiveEditorMoveCommand(); registerDiffEditorCommands(); registerOpenEditorAtIndexCommands(); - registerExplorerCommands(); + registerEditorCommands(); handleCommandDeprecations(); } @@ -277,7 +277,7 @@ function registerOpenEditorAtIndexCommands(): void { } } -function registerExplorerCommands() { +function registerEditorCommands() { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, From 086758e89b87ca48fbf60909e2dbba73f49513af Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 15 Dec 2017 12:11:44 +0100 Subject: [PATCH 305/615] tiny rename --- src/vs/workbench/parts/files/electron-browser/fileCommands.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index eb990cb2fc6..f7acb65ee43 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -35,7 +35,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; // Commands -registerExplorerCommands(); +registerFileCommands(); export const REVEAL_IN_OS_COMMAND_ID = 'workbench.command.files.revealInOS'; export const REVEAL_IN_EXPLORER_COMMAND_ID = 'workbench.command.files.revealInExplorer'; export const REVERT_FILE_COMMAND_ID = 'workbench.command.files.revert'; @@ -217,7 +217,7 @@ export const revealInOSFocusedFilesExplorerItem = (accessor: ServicesAccessor) = export let globalResourceToCompare: URI; -function registerExplorerCommands(): void { +function registerFileCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: REVERT_FILE_COMMAND_ID, From 5646017ff1180539433f861a1658e4c3668a3bcc Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 15 Dec 2017 12:31:45 +0100 Subject: [PATCH 306/615] fix order of registration --- .../parts/files/electron-browser/fileActions.ts | 1 - .../parts/files/electron-browser/fileCommands.ts | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index 08ee16fa86e..e47a8d88048 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -1153,7 +1153,6 @@ export class SelectResourceForCompareAction extends Action { public run(): TPromise { return this.commandService.executeCommand(SELECT_FOR_COMPARE_COMMAND_ID, { resource: this.resource }); - } } diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index f7acb65ee43..45b8a4e81e8 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -31,11 +31,10 @@ import { toErrorMessage } from 'vs/base/common/errorMessage'; import { basename } from 'vs/base/common/paths'; import { IListService } from 'vs/platform/list/browser/listService'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; -import { ICommandService } from 'vs/platform/commands/common/commands'; +import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; // Commands -registerFileCommands(); export const REVEAL_IN_OS_COMMAND_ID = 'workbench.command.files.revealInOS'; export const REVEAL_IN_EXPLORER_COMMAND_ID = 'workbench.command.files.revealInExplorer'; export const REVERT_FILE_COMMAND_ID = 'workbench.command.files.revert'; @@ -46,6 +45,8 @@ export const COMPARE_WITH_SAVED_COMMAND_ID = 'workbench.files.command.compareWit export const COMPARE_WITH_SAVED_SCHEMA = 'showModifications'; export const COPY_PATH_COMMAND_ID = 'workbench.command.files.copyPath'; +registerFileCommands(); + export const openWindowCommand = (accessor: ServicesAccessor, paths: string[], forceNewWindow: boolean) => { const windowsService = accessor.get(IWindowsService); windowsService.openWindow(paths, { forceNewWindow }); @@ -246,12 +247,8 @@ function registerFileCommands(): void { } }); - KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: OPEN_TO_SIDE_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: undefined, - handler: (accessor, args: IEditorContext) => { + CommandsRegistry.registerCommand({ + id: OPEN_TO_SIDE_COMMAND_ID, handler: (accessor, args) => { const editorService = accessor.get(IWorkbenchEditorService); const listService = accessor.get(IListService); const tree = listService.lastFocusedList; From 58b51562804fec55c94115323d60b86064ca8305 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 15 Dec 2017 12:34:32 +0100 Subject: [PATCH 307/615] use CommandRegistry directly, skip keybindings --- .../browser/parts/editor/editorCommands.ts | 22 +++--------- .../files/electron-browser/fileCommands.ts | 36 ++++--------------- 2 files changed, 12 insertions(+), 46 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index b57124eabed..082ca3bd3fc 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -14,7 +14,7 @@ import { IEditor, Position, POSITIONS } from 'vs/platform/editor/common/editor'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { TextDiffEditor } from 'vs/workbench/browser/parts/editor/textDiffEditor'; import { EditorStacksModel } from 'vs/workbench/common/editor/editorStacksModel'; -import { ICommandService } from 'vs/platform/commands/common/commands'; +import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { IMessageService, Severity, CloseAction } from 'vs/platform/message/common/message'; import { Action } from 'vs/base/common/actions'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; @@ -279,11 +279,8 @@ function registerOpenEditorAtIndexCommands(): void { function registerEditorCommands() { - KeybindingsRegistry.registerCommandAndKeybindingRule({ + CommandsRegistry.registerCommand({ id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: undefined, handler: (accessor, args: IEditorContext) => { const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); @@ -306,11 +303,8 @@ function registerEditorCommands() { } }); - KeybindingsRegistry.registerCommandAndKeybindingRule({ + CommandsRegistry.registerCommand({ id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: undefined, handler: (accessor, args: IEditorContext) => { const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); @@ -331,11 +325,8 @@ function registerEditorCommands() { } }); - KeybindingsRegistry.registerCommandAndKeybindingRule({ + CommandsRegistry.registerCommand({ id: CLOSE_EDITOR_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: undefined, handler: (accessor, args: IEditorContext) => { const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); @@ -368,11 +359,8 @@ function registerEditorCommands() { } }); - KeybindingsRegistry.registerCommandAndKeybindingRule({ + CommandsRegistry.registerCommand({ id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: undefined, handler: (accessor, args: IEditorContext) => { const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index 45b8a4e81e8..bf8c6cda5ae 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -25,7 +25,6 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { getPathLabel } from 'vs/base/common/labels'; -import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { toErrorMessage } from 'vs/base/common/errorMessage'; import { basename } from 'vs/base/common/paths'; @@ -220,11 +219,8 @@ export let globalResourceToCompare: URI; function registerFileCommands(): void { - KeybindingsRegistry.registerCommandAndKeybindingRule({ + CommandsRegistry.registerCommand({ id: REVERT_FILE_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: undefined, handler: (accessor, args: IEditorContext) => { let resource: URI; const editorService = accessor.get(IWorkbenchEditorService); @@ -267,11 +263,8 @@ function registerFileCommands(): void { } }); - KeybindingsRegistry.registerCommandAndKeybindingRule({ + CommandsRegistry.registerCommand({ id: COMPARE_WITH_SAVED_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: undefined, handler: (accessor, args: IEditorContext) => { const editorService = accessor.get(IWorkbenchEditorService); let resource: URI; @@ -292,11 +285,8 @@ function registerFileCommands(): void { } }); - KeybindingsRegistry.registerCommandAndKeybindingRule({ + CommandsRegistry.registerCommand({ id: SELECT_FOR_COMPARE_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: undefined, handler: (accessor, args: IEditorContext) => { const listService = accessor.get(IListService); const tree = listService.lastFocusedList; @@ -310,11 +300,8 @@ function registerFileCommands(): void { } }); - KeybindingsRegistry.registerCommandAndKeybindingRule({ + CommandsRegistry.registerCommand({ id: COMPARE_RESOURCE_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: undefined, handler: (accessor, args: IEditorContext) => { const editorService = accessor.get(IWorkbenchEditorService); const listService = accessor.get(IListService); @@ -331,11 +318,8 @@ function registerFileCommands(): void { } }); - KeybindingsRegistry.registerCommandAndKeybindingRule({ + CommandsRegistry.registerCommand({ id: REVEAL_IN_OS_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: undefined, handler: (accessor, args: IEditorContext) => { // Without resource, try to look at the active editor let resource = args.resource; @@ -354,11 +338,8 @@ function registerFileCommands(): void { } }); - KeybindingsRegistry.registerCommandAndKeybindingRule({ + CommandsRegistry.registerCommand({ id: COPY_PATH_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: undefined, handler: (accessor, args: IEditorContext) => { let resource = args.resource; // Without resource, try to look at the active editor @@ -383,11 +364,8 @@ function registerFileCommands(): void { } }); - KeybindingsRegistry.registerCommandAndKeybindingRule({ + CommandsRegistry.registerCommand({ id: REVEAL_IN_EXPLORER_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: undefined, handler: (accessor, args: IEditorContext) => { const viewletService = accessor.get(IViewletService); const contextService = accessor.get(IWorkspaceContextService); From 005ff6051b17f08f44f8a800969612f248df39b2 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 15 Dec 2017 12:47:48 +0100 Subject: [PATCH 308/615] open editors: introduce contributable menu id --- src/vs/platform/actions/common/actions.ts | 1 + .../parts/files/electron-browser/fileActions.ts | 2 +- .../electron-browser/views/openEditorsView.ts | 15 ++++++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/vs/platform/actions/common/actions.ts b/src/vs/platform/actions/common/actions.ts index 4f7f950ec97..e028366042a 100644 --- a/src/vs/platform/actions/common/actions.ts +++ b/src/vs/platform/actions/common/actions.ts @@ -43,6 +43,7 @@ export class MenuId { static readonly EditorTitleContext = new MenuId(); static readonly EditorContext = new MenuId(); static readonly ExplorerContext = new MenuId(); + static readonly OpenEditorsContext = new MenuId(); static readonly ProblemsPanelContext = new MenuId(); static readonly DebugVariablesContext = new MenuId(); static readonly DebugWatchContext = new MenuId(); diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index e47a8d88048..3000a7f7ee0 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -1209,7 +1209,7 @@ export class CompareResourcesAction extends Action { constructor( resource: URI, - @IWorkbenchEditorService private commandService: ICommandService, + @ICommandService private commandService: ICommandService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IEnvironmentService environmentService: IEnvironmentService ) { diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index c2e52d00a2e..b7531389b47 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -40,6 +40,8 @@ import { KeyCode } from 'vs/base/common/keyCodes'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ContributableActionProvider } from 'vs/workbench/browser/actions'; import { memoize } from 'vs/base/common/decorators'; +import { fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; +import { IMenuService, MenuId, IMenu } from 'vs/platform/actions/common/actions'; const $ = dom.$; @@ -55,6 +57,7 @@ export class OpenEditorsView extends ViewsViewletPanel { private listRefreshScheduler: RunOnceScheduler; private structuralRefreshDelay: number; private list: WorkbenchList; + private contributedContextMenu: IMenu; private needsRefresh: boolean; constructor( @@ -70,7 +73,8 @@ export class OpenEditorsView extends ViewsViewletPanel { @IUntitledEditorService private untitledEditorService: IUntitledEditorService, @IContextKeyService private contextKeyService: IContextKeyService, @IThemeService private themeService: IThemeService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private telemetryService: ITelemetryService, + @IMenuService menuService: IMenuService ) { super({ ...(options as IViewOptions), @@ -89,6 +93,7 @@ export class OpenEditorsView extends ViewsViewletPanel { } this.needsRefresh = false; }, this.structuralRefreshDelay); + this.contributedContextMenu = menuService.createMenu(MenuId.OpenEditorsContext, contextKeyService); // update on model changes this.disposables.push(this.model.onModelChanged(e => this.onEditorStacksModelChanged(e))); @@ -266,10 +271,14 @@ export class OpenEditorsView extends ViewsViewletPanel { private onListContextMenu(e: IListContextMenuEvent): void { const element = e.element; + const getActionsContext = () => element instanceof OpenEditor ? { group: element.editorGroup, editor: element.editorInput, resource: element.editorInput.getResource() } : { group: element }; this.contextMenuService.showContextMenu({ getAnchor: () => e.anchor, - getActions: () => this.actionProvider.getSecondaryActions(element), - getActionsContext: () => element instanceof OpenEditor ? { group: element.editorGroup, editor: element.editorInput } : { group: element } + getActions: () => this.actionProvider.getSecondaryActions(element).then(actions => { + fillInActions(this.contributedContextMenu, { arg: getActionsContext() }, actions); + return actions; + }), + getActionsContext }); } From 349f871af2bedb4ba8922511ad4788dc8d5d657b Mon Sep 17 00:00:00 2001 From: TeeSeal Date: Fri, 15 Dec 2017 13:53:09 +0200 Subject: [PATCH 309/615] Update Ruby indent pattern --- extensions/ruby/language-configuration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/ruby/language-configuration.json b/extensions/ruby/language-configuration.json index 04a0fae6e09..59bb3776366 100644 --- a/extensions/ruby/language-configuration.json +++ b/extensions/ruby/language-configuration.json @@ -23,7 +23,7 @@ ["'", "'"] ], "indentationRules": { - "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|(.*\\sdo\\b)|(.*=\\s*(case|if|unless)))\\b[^\\{;]*$", + "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^\\{;]|(\"|'|\/).*\\4)*$", "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)" } } From ba61d8886ceda24068fd26143c0ae5b1fb18e8d3 Mon Sep 17 00:00:00 2001 From: TeeSeal Date: Fri, 15 Dec 2017 14:32:49 +0200 Subject: [PATCH 310/615] Also ignore special characters for comments --- extensions/ruby/language-configuration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/ruby/language-configuration.json b/extensions/ruby/language-configuration.json index 59bb3776366..47c434deffa 100644 --- a/extensions/ruby/language-configuration.json +++ b/extensions/ruby/language-configuration.json @@ -23,7 +23,7 @@ ["'", "'"] ], "indentationRules": { - "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^\\{;]|(\"|'|\/).*\\4)*$", + "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|(\"|'|\/).*\\4)*(#.*)?$", "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)" } } From 05c9c533f6992500317c36594f2d1febf6787e4f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 15 Dec 2017 14:21:00 +0100 Subject: [PATCH 311/615] MainThreadLanguageFeaturesShape, #40169 --- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 612c03dcf49..10c5b48c000 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -750,7 +750,7 @@ export const MainContext = { MainThreadEditors: createMainId('MainThreadEditors'), MainThreadErrors: createMainId('MainThreadErrors'), MainThreadTreeViews: createMainId('MainThreadTreeViews'), - MainThreadLanguageFeatures: createMainId('MainThreadLanguageFeatures', ProxyType.CustomMarshaller), + MainThreadLanguageFeatures: createMainId('MainThreadLanguageFeatures'), MainThreadLanguages: createMainId('MainThreadLanguages'), MainThreadMessageService: createMainId('MainThreadMessageService'), MainThreadOutputService: createMainId('MainThreadOutputService'), From 52c252b8c92c90628a308a700070996f94f419a7 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 15 Dec 2017 06:12:41 -0800 Subject: [PATCH 312/615] Remove unused code --- build/lib/compilation.ts | 48 ---------------------------------------- 1 file changed, 48 deletions(-) diff --git a/build/lib/compilation.ts b/build/lib/compilation.ts index f1ca31f36e8..0e147ff6ba9 100644 --- a/build/lib/compilation.ts +++ b/build/lib/compilation.ts @@ -49,7 +49,6 @@ function createCompile(build: boolean, emitError?: boolean): (token?: util.ICanc .pipe(tsFilter) .pipe(util.loadSourcemaps()) .pipe(ts(token)) - // .pipe(build ? reloadTypeScriptNodeModule() : es.through()) .pipe(noDeclarationsFilter) .pipe(build ? nls() : es.through()) .pipe(noDeclarationsFilter.restore) @@ -100,53 +99,6 @@ export function watchTask(out: string, build: boolean): () => NodeJS.ReadWriteSt }; } -function reloadTypeScriptNodeModule(): NodeJS.ReadWriteStream { - var util = require('gulp-util'); - function log(message: any, ...rest: any[]): void { - util.log(util.colors.cyan('[memory watch dog]'), message, ...rest); - } - - function heapUsed(): string { - return (process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2) + ' MB'; - } - - return es.through(function (data) { - this.emit('data', data); - }, function () { - - log('memory usage after compilation finished: ' + heapUsed()); - - // It appears we are running into some variant of - // https://bugs.chromium.org/p/v8/issues/detail?id=2073 - // - // Even though all references are dropped, some - // optimized methods in the TS compiler end up holding references - // to the entire TypeScript language host (>600MB) - // - // The idea is to force v8 to drop references to these - // optimized methods, by "reloading" the typescript node module - - log('Reloading typescript node module...'); - - var resolvedName = require.resolve('typescript'); - - var originalModule = require.cache[resolvedName]; - delete require.cache[resolvedName]; - var newExports = require('typescript'); - require.cache[resolvedName] = originalModule; - - for (var prop in newExports) { - if (newExports.hasOwnProperty(prop)) { - originalModule.exports[prop] = newExports[prop]; - } - } - - log('typescript node module reloaded.'); - - this.emit('end'); - }); -} - function monacodtsTask(out: string, isWatch: boolean): NodeJS.ReadWriteStream { const neededFiles: { [file: string]: boolean; } = {}; From 920a282c163baedd86633bb4b23624ca40b4d5bb Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 15 Dec 2017 15:21:31 +0100 Subject: [PATCH 313/615] just move a single repository up --- extensions/git/src/model.ts | 32 +++++++------------------------- extensions/git/src/util.ts | 10 ++++++++++ 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 1e00ecc3cd9..7f28e23f6b6 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -8,7 +8,7 @@ import { workspace, WorkspaceFoldersChangeEvent, Uri, window, Event, EventEmitter, QuickPickItem, Disposable, SourceControl, SourceControlResourceGroup, TextEditor, Memento, ConfigurationChangeEvent } from 'vscode'; import { Repository, RepositoryState } from './repository'; import { memoize, sequentialize, debounce } from './decorators'; -import { dispose, anyEvent, filterEvent, IDisposable, isDescendant } from './util'; +import { dispose, anyEvent, filterEvent, IDisposable, isDescendant, find, firstIndex } from './util'; import { Git, GitErrorCodes } from './git'; import * as path from 'path'; import * as fs from 'fs'; @@ -257,31 +257,13 @@ export class Model { } const picks = this.openRepositories.map((e, index) => new RepositoryPick(e.repository, index)); - - // Sort picks such that repositories containing the active text editor - // appear first. const active = window.activeTextEditor; - if (active && active.document.fileName) { - const hasActiveEditor = (root: string) => { - const relative = path.relative(root, active.document.fileName); - return !!relative && !relative.startsWith('..') && !path.isAbsolute(relative); - }; - picks.sort((a, b) => { - const aHas = hasActiveEditor(a.repository.root); - const bHas = hasActiveEditor(b.repository.root); - if (aHas !== bHas) { - return aHas ? -1 : 1; - } - if (aHas && a.repository.root.length !== b.repository.root.length) { - // Both a and b contain the active editor document, so one - // is an ancestor of the other. We prefer to return the - // child (likely a submodule) since the active editor will - // be part of that repo. Child is the longer path. - return b.repository.root.length - a.repository.root.length; - } - // Otherwise everything else is equal, so keeps the positions stable - return a.index - b.index; - }); + const repository = active && this.getRepository(active.document.fileName); + const index = firstIndex(picks, pick => pick.repository === repository); + + // Move repository pick containing the active text editor to appear first + if (index > -1) { + picks.unshift(...picks.splice(index, 1)); } const placeHolder = localize('pick repo', "Choose a repository"); diff --git a/extensions/git/src/util.ts b/extensions/git/src/util.ts index ee5a3d70568..c050594c106 100644 --- a/extensions/git/src/util.ts +++ b/extensions/git/src/util.ts @@ -195,6 +195,16 @@ export function uniqueFilter(keyFn: (t: T) => string): (t: T) => boolean { }; } +export function firstIndex(array: T[], fn: (t: T) => boolean): number { + for (let i = 0; i < array.length; i++) { + if (fn(array[i])) { + return i; + } + } + + return -1; +} + export function find(array: T[], fn: (t: T) => boolean): T | undefined { let result: T | undefined = undefined; From 4cc86dd8c6b106ff641fdb1db487599716746af0 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 15 Dec 2017 12:49:18 +0100 Subject: [PATCH 314/615] Slow IntelliSense in files with 4000+ lines. Fixes #39994 --- extensions/css/client/src/cssMain.ts | 2 +- extensions/css/server/package.json | 2 +- extensions/css/server/src/cssServerMain.ts | 2 +- extensions/css/server/yarn.lock | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/css/client/src/cssMain.ts b/extensions/css/client/src/cssMain.ts index 19f131224ed..5e9f4d2ec7f 100644 --- a/extensions/css/client/src/cssMain.ts +++ b/extensions/css/client/src/cssMain.ts @@ -21,7 +21,7 @@ export function activate(context: ExtensionContext) { // The server is implemented in node let serverModule = context.asAbsolutePath(path.join('server', 'out', 'cssServerMain.js')); // The debug options for the server - let debugOptions = { execArgv: ['--nolazy', '--inspect=6004'] }; + let debugOptions = { execArgv: ['--nolazy', '--inspect=6044'] }; // If the extension is launch in debug mode the debug server options are use // Otherwise the run options are used diff --git a/extensions/css/server/package.json b/extensions/css/server/package.json index 5dd73152edc..5af88ec2a75 100644 --- a/extensions/css/server/package.json +++ b/extensions/css/server/package.json @@ -8,7 +8,7 @@ "node": "*" }, "dependencies": { - "vscode-css-languageservice": "^3.0.2", + "vscode-css-languageservice": "^3.0.3", "vscode-languageserver": "^3.5.0" }, "devDependencies": { diff --git a/extensions/css/server/src/cssServerMain.ts b/extensions/css/server/src/cssServerMain.ts index 6609e5c54d0..e0082953b2c 100644 --- a/extensions/css/server/src/cssServerMain.ts +++ b/extensions/css/server/src/cssServerMain.ts @@ -122,7 +122,7 @@ function updateConfiguration(settings: Settings) { } let pendingValidationRequests: { [uri: string]: NodeJS.Timer } = {}; -const validationDelayMs = 200; +const validationDelayMs = 500; // The content of a text document has changed. This event is emitted // when the text document first opened or when its content has changed. diff --git a/extensions/css/server/yarn.lock b/extensions/css/server/yarn.lock index 24a54f0acdf..0420acb7d88 100644 --- a/extensions/css/server/yarn.lock +++ b/extensions/css/server/yarn.lock @@ -6,9 +6,9 @@ version "7.0.43" resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c" -vscode-css-languageservice@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-3.0.2.tgz#ae0c43836318455aa290c777556394d6127b8f6c" +vscode-css-languageservice@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-3.0.3.tgz#02cc4efa5335f5104e0a2f3b6920faaf59db4f7a" dependencies: vscode-languageserver-types "3.5.0" vscode-nls "^2.0.1" From fbcd6e5dfe409850201694f9fce85039cacaa659 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 15 Dec 2017 13:02:57 +0100 Subject: [PATCH 315/615] [html] increase validationDelay --- extensions/html/server/src/htmlServerMain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/html/server/src/htmlServerMain.ts b/extensions/html/server/src/htmlServerMain.ts index 2593ab4b147..e0077b6bfd7 100644 --- a/extensions/html/server/src/htmlServerMain.ts +++ b/extensions/html/server/src/htmlServerMain.ts @@ -168,7 +168,7 @@ connection.onDidChangeConfiguration((change) => { }); let pendingValidationRequests: { [uri: string]: NodeJS.Timer } = {}; -const validationDelayMs = 200; +const validationDelayMs = 500; // The content of a text document has changed. This event is emitted // when the text document first opened or when its content has changed. From f3f11cfbbf375c49f509df013a912c864e04b874 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 15 Dec 2017 13:03:28 +0100 Subject: [PATCH 316/615] [json] increase validationDelay --- extensions/json/server/src/jsonServerMain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/json/server/src/jsonServerMain.ts b/extensions/json/server/src/jsonServerMain.ts index dea8fdc2b21..da292288113 100644 --- a/extensions/json/server/src/jsonServerMain.ts +++ b/extensions/json/server/src/jsonServerMain.ts @@ -232,7 +232,7 @@ documents.onDidClose(event => { }); let pendingValidationRequests: { [uri: string]: NodeJS.Timer; } = {}; -const validationDelayMs = 200; +const validationDelayMs = 500; function cleanPendingValidation(textDocument: TextDocument): void { let request = pendingValidationRequests[textDocument.uri]; From 354a8cd4140b1f0048b4015403eae784e0e15153 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 15 Dec 2017 15:22:22 +0100 Subject: [PATCH 317/615] [html/json] set language server debug ports --- extensions/html/client/src/htmlMain.ts | 2 +- extensions/json/client/src/jsonMain.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/html/client/src/htmlMain.ts b/extensions/html/client/src/htmlMain.ts index a30fe9ea712..f5885b3654f 100644 --- a/extensions/html/client/src/htmlMain.ts +++ b/extensions/html/client/src/htmlMain.ts @@ -39,7 +39,7 @@ export function activate(context: ExtensionContext) { // The server is implemented in node let serverModule = context.asAbsolutePath(path.join('server', 'out', 'htmlServerMain.js')); // The debug options for the server - let debugOptions = { execArgv: ['--nolazy', '--inspect=6004'] }; + let debugOptions = { execArgv: ['--nolazy', '--inspect=6045'] }; // If the extension is launch in debug mode the debug server options are use // Otherwise the run options are used diff --git a/extensions/json/client/src/jsonMain.ts b/extensions/json/client/src/jsonMain.ts index 770cdb18d25..654db136a3f 100644 --- a/extensions/json/client/src/jsonMain.ts +++ b/extensions/json/client/src/jsonMain.ts @@ -67,7 +67,7 @@ export function activate(context: ExtensionContext) { // The server is implemented in node let serverModule = context.asAbsolutePath(path.join('server', 'out', 'jsonServerMain.js')); // The debug options for the server - let debugOptions = { execArgv: ['--nolazy', '--inspect'] }; + let debugOptions = { execArgv: ['--nolazy', '--inspect=6046'] }; // If the extension is launch in debug mode the debug server options are use // Otherwise the run options are used From f871695b39c5edd84d5508fc83837bab59436eb8 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 15 Dec 2017 15:31:24 +0100 Subject: [PATCH 318/615] [file icon] file icons for JSONC files. Fixes #40244 --- .../services/themes/electron-browser/fileIconThemeData.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/services/themes/electron-browser/fileIconThemeData.ts b/src/vs/workbench/services/themes/electron-browser/fileIconThemeData.ts index 5c12079ecf1..513e42fe9dc 100644 --- a/src/vs/workbench/services/themes/electron-browser/fileIconThemeData.ts +++ b/src/vs/workbench/services/themes/electron-browser/fileIconThemeData.ts @@ -244,6 +244,9 @@ function _processIconThemeDocument(id: string, iconThemeDocumentPath: string, ic let languageIds = associations.languageIds; if (languageIds) { + if (!languageIds.jsonc && languageIds.json) { + languageIds.jsonc = languageIds.json; + } for (let languageId in languageIds) { addSelector(`${qualifier} .${escapeCSS(languageId)}-lang-file-icon.file-icon::before`, languageIds[languageId]); result.hasFileIcons = true; From f6ee190cf7462d35c5c72062f54d28a98d66bc94 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 15 Dec 2017 15:38:30 +0100 Subject: [PATCH 319/615] fixes #36885 --- extensions/git/package.json | 22 ++++++++++++++++++- .../parts/scm/electron-browser/scmMenus.ts | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 685e59ea5a7..6ffdfb33a49 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -701,11 +701,21 @@ "when": "scmProvider == git && scmResourceGroup == merge", "group": "1_modification" }, + { + "command": "git.openFile", + "when": "scmProvider == git && scmResourceGroup == merge", + "group": "navigation" + }, { "command": "git.stage", "when": "scmProvider == git && scmResourceGroup == merge", "group": "inline" }, + { + "command": "git.openFile", + "when": "scmProvider == git && scmResourceGroup == merge", + "group": "inline0" + }, { "command": "git.openChange", "when": "scmProvider == git && scmResourceGroup == index", @@ -731,6 +741,11 @@ "when": "scmProvider == git && scmResourceGroup == index", "group": "inline" }, + { + "command": "git.openFile", + "when": "scmProvider == git && scmResourceGroup == index", + "group": "inline0" + }, { "command": "git.openChange", "when": "scmProvider == git && scmResourceGroup == workingTree", @@ -766,6 +781,11 @@ "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "inline" }, + { + "command": "git.openFile", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "inline0" + }, { "command": "git.ignore", "when": "scmProvider == git && scmResourceGroup == workingTree", @@ -979,4 +999,4 @@ "@types/which": "^1.0.28", "mocha": "^3.2.0" } -} +} \ No newline at end of file diff --git a/src/vs/workbench/parts/scm/electron-browser/scmMenus.ts b/src/vs/workbench/parts/scm/electron-browser/scmMenus.ts index dd70573afa9..18c4877eae2 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmMenus.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmMenus.ts @@ -88,7 +88,7 @@ export class SCMMenus implements IDisposable { const primary: IAction[] = []; const secondary: IAction[] = []; const result = { primary, secondary }; - fillInActions(menu, { shouldForwardArgs: true }, result, g => g === 'inline'); + fillInActions(menu, { shouldForwardArgs: true }, result, g => /^inline/.test(g)); menu.dispose(); contextKeyService.dispose(); From 55ae7e5cd51edb654d5d7349a3a99c9b77e0e573 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 15 Dec 2017 15:44:06 +0100 Subject: [PATCH 320/615] git: fix opening deleted file --- extensions/git/src/commands.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 3b2d5206c5f..61df23151cb 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -504,7 +504,10 @@ export class CommandCenter { } if (resource) { - uris = [...resourceStates.map(r => r.resourceUri), resource.resourceUri]; + const resources = ([resource, ...resourceStates] as Resource[]) + .filter(r => r.type !== Status.DELETED && r.type !== Status.INDEX_DELETED); + + uris = resources.map(r => r.resourceUri); } } From 588eb52b335e619997fbf44768ca8ab685abde8b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 15 Dec 2017 15:46:13 +0100 Subject: [PATCH 321/615] remove unecessary `| undefined` --- extensions/git/src/repository.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 62e09f41e7e..fadf17aa535 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -105,7 +105,7 @@ export class Resource implements SourceControlResourceState { } }; - private getIconPath(theme: string): Uri | undefined { + private getIconPath(theme: string): Uri { switch (this.type) { case Status.INDEX_MODIFIED: return Resource.Icons[theme].Modified; case Status.MODIFIED: return Resource.Icons[theme].Modified; @@ -123,7 +123,6 @@ export class Resource implements SourceControlResourceState { case Status.DELETED_BY_US: return Resource.Icons[theme].Conflict; case Status.BOTH_ADDED: return Resource.Icons[theme].Conflict; case Status.BOTH_MODIFIED: return Resource.Icons[theme].Conflict; - default: return void 0; } } From b0058e5c16f9e7779210e88fb97a13ef25becaae Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 15 Dec 2017 15:49:56 +0100 Subject: [PATCH 322/615] actions to commands: register some via menu service --- .../browser/parts/editor/editorActions.ts | 10 +- .../browser/parts/editor/editorCommands.ts | 41 +++++ .../execution.contribution.ts | 156 ++++++++++-------- .../files/electron-browser/fileCommands.ts | 26 +++ .../electron-browser/views/openEditorsView.ts | 151 ++++++++--------- 5 files changed, 233 insertions(+), 151 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 97c2d9a94f8..49f23bfb2b4 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -22,7 +22,7 @@ import { IEditorGroupService, GroupArrangement } from 'vs/workbench/services/gro import { ICommandService } from 'vs/platform/commands/common/commands'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; +import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_LABEL, CLOSE_UNMODIFIED_EDITORS_LABEL, CLOSE_EDITOR_LABEL, CLOSE_OTHER_EDITORS_IN_GROUP_LABEL } from 'vs/workbench/browser/parts/editor/editorCommands'; export class SplitEditorAction extends Action { @@ -527,7 +527,7 @@ export function toEditorQuickOpenEntry(element: any): IEditorQuickOpenEntry { export class CloseEditorAction extends Action { public static readonly ID = 'workbench.action.closeActiveEditor'; - public static readonly LABEL = nls.localize('closeEditor', "Close Editor"); + public static readonly LABEL = CLOSE_EDITOR_LABEL; constructor( id: string, @@ -671,7 +671,7 @@ export class CloseAllEditorsAction extends Action { export class CloseUnmodifiedEditorsInGroupAction extends Action { public static readonly ID = 'workbench.action.closeUnmodifiedEditors'; - public static readonly LABEL = nls.localize('closeUnmodifiedEditors', "Close Unmodified Editors in Group"); + public static readonly LABEL = CLOSE_UNMODIFIED_EDITORS_LABEL; constructor( id: string, @@ -720,7 +720,7 @@ export class CloseEditorsInOtherGroupsAction extends Action { export class CloseOtherEditorsInGroupAction extends Action { public static readonly ID = 'workbench.action.closeOtherEditors'; - public static readonly LABEL = nls.localize('closeOtherEditorsInGroup', "Close Other Editors"); + public static readonly LABEL = CLOSE_OTHER_EDITORS_IN_GROUP_LABEL; constructor( id: string, @@ -738,7 +738,7 @@ export class CloseOtherEditorsInGroupAction extends Action { export class CloseEditorsInGroupAction extends Action { public static readonly ID = 'workbench.action.closeEditorsInGroup'; - public static readonly LABEL = nls.localize('closeEditorsInGroup', "Close All Editors in Group"); + public static readonly LABEL = CLOSE_EDITORS_IN_GROUP_LABEL; constructor( id: string, diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index 082ca3bd3fc..628e4e0075c 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -19,11 +19,20 @@ import { IMessageService, Severity, CloseAction } from 'vs/platform/message/comm import { Action } from 'vs/base/common/actions'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { TPromise } from 'vs/base/common/winjs.base'; +import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; export const CLOSE_UNMODIFIED_EDITORS_COMMAND_ID = 'workbench.command.closeUnmodifiedEditors'; +export const CLOSE_UNMODIFIED_EDITORS_LABEL = nls.localize('closeUnmodifiedEditors', "Close Unmodified Editors in Group"); + export const CLOSE_EDITORS_IN_GROUP_COMMAND_ID = 'workbench.command.closeEditorsInGroup'; +export const CLOSE_EDITORS_IN_GROUP_LABEL = nls.localize('closeEditorsInGroup', "Close All Editors in Group"); + export const CLOSE_EDITOR_COMMAND_ID = 'workbench.command.closeActiveEditor'; +export const CLOSE_EDITOR_LABEL = nls.localize('closeEditor', "Close Editor"); + export const CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID = 'workbench.command.closeOtherEditors'; +export const CLOSE_OTHER_EDITORS_IN_GROUP_LABEL = nls.localize('closeOtherEditorsInGroup', "Close Other Editors"); + export function setup(): void { registerActiveEditorMoveCommand(); @@ -303,6 +312,14 @@ function registerEditorCommands() { } }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'close', + command: { + id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, + title: CLOSE_UNMODIFIED_EDITORS_LABEL + } + }); + CommandsRegistry.registerCommand({ id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -325,6 +342,14 @@ function registerEditorCommands() { } }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'close', + command: { + id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, + title: CLOSE_EDITORS_IN_GROUP_LABEL + } + }); + CommandsRegistry.registerCommand({ id: CLOSE_EDITOR_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -359,6 +384,14 @@ function registerEditorCommands() { } }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'close', + command: { + id: CLOSE_EDITOR_COMMAND_ID, + title: CLOSE_EDITOR_LABEL + } + }); + CommandsRegistry.registerCommand({ id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -382,4 +415,12 @@ function registerEditorCommands() { return TPromise.as(false); } }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'close', + command: { + id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, + title: CLOSE_OTHER_EDITORS_IN_GROUP_LABEL + } + }); } diff --git a/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts b/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts index 6b63890e976..bcc01cb60eb 100644 --- a/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts +++ b/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts @@ -17,18 +17,18 @@ import resources = require('vs/base/common/resources'); import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actions'; import uri from 'vs/base/common/uri'; import { explorerItemToFileResource } from 'vs/workbench/parts/files/common/files'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ITerminalService } from 'vs/workbench/parts/execution/common/execution'; -import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; +import { SyncActionDescriptor, MenuId, MenuRegistry } from 'vs/platform/actions/common/actions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { toResource } from 'vs/workbench/common/editor'; +import { toResource, IEditorContext } from 'vs/workbench/common/editor'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; import { ITerminalService as IIntegratedTerminalService, KEYBINDING_CONTEXT_TERMINAL_NOT_FOCUSED } from 'vs/workbench/parts/terminal/common/terminal'; import { DEFAULT_TERMINAL_WINDOWS, DEFAULT_TERMINAL_LINUX_READY, DEFAULT_TERMINAL_OSX, ITerminalConfiguration } from 'vs/workbench/parts/execution/electron-browser/terminal'; import { WinTerminalService, MacTerminalService, LinuxTerminalService } from 'vs/workbench/parts/execution/electron-browser/terminalService'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; +import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands'; if (env.isWindows) { registerSingleton(ITerminalService, WinTerminalService); @@ -79,46 +79,7 @@ DEFAULT_TERMINAL_LINUX_READY.then(defaultTerminalLinux => { }); -export abstract class AbstractOpenInTerminalAction extends Action { - private resource: uri; - - constructor( - id: string, - label: string, - @IWorkbenchEditorService protected editorService: IWorkbenchEditorService, - @IWorkspaceContextService protected contextService: IWorkspaceContextService, - @IHistoryService protected historyService: IHistoryService - ) { - super(id, label); - - this.order = 49; // Allow other actions to position before or after - } - - public setResource(resource: uri): void { - this.resource = resource; - this.enabled = !paths.isUNC(this.resource.fsPath); - } - - public getPathToOpen(): string { - let pathToOpen: string; - - // Try workspace path first - const root = this.historyService.getLastActiveWorkspaceRoot('file'); - pathToOpen = this.resource ? this.resource.fsPath : (root && root.fsPath); - - // Otherwise check if we have an active file open - if (!pathToOpen) { - const file = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); - if (file) { - pathToOpen = paths.dirname(file.fsPath); // take parent folder of file - } - } - - return pathToOpen; - } -} - -export class OpenConsoleAction extends AbstractOpenInTerminalAction { +class OpenConsoleAction extends Action { public static readonly ID = 'workbench.action.terminal.openNativeConsole'; public static readonly Label = env.isWindows ? nls.localize('globalConsoleActionWin', "Open New Command Prompt") : @@ -126,50 +87,48 @@ export class OpenConsoleAction extends AbstractOpenInTerminalAction { public static readonly ScopedLabel = env.isWindows ? nls.localize('scopedConsoleActionWin', "Open in Command Prompt") : nls.localize('scopedConsoleActionMacLinux', "Open in Terminal"); + private resource: uri; + + public setResource(resource: uri): void { + this.resource = resource; + this.enabled = !paths.isUNC(this.resource.fsPath); + } + constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IWorkspaceContextService contextService: IWorkspaceContextService, - @IHistoryService historyService: IHistoryService + @ICommandService private commandService: ICommandService ) { - super(id, label, editorService, contextService, historyService); + super(id, label); } public run(event?: any): TPromise { - let pathToOpen = this.getPathToOpen(); - this.terminalService.openTerminal(pathToOpen); - - return TPromise.as(null); + return this.commandService.executeCommand(OPEN_CONSOLE_COMMAND_ID, this.resource); } } -export class OpenIntegratedTerminalAction extends AbstractOpenInTerminalAction { +class OpenIntegratedTerminalAction extends Action { public static readonly ID = 'workbench.action.terminal.openFolderInIntegratedTerminal'; public static readonly Label = nls.localize('openFolderInIntegratedTerminal', "Open in Terminal"); + private resource: uri; + + public setResource(resource: uri): void { + this.resource = resource; + this.enabled = !paths.isUNC(this.resource.fsPath); + } + constructor( id: string, label: string, - @IIntegratedTerminalService private integratedTerminalService: IIntegratedTerminalService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IWorkspaceContextService contextService: IWorkspaceContextService, - @IHistoryService historyService: IHistoryService + @ICommandService private commandService: ICommandService ) { - super(id, label, editorService, contextService, historyService); + super(id, label); } public run(event?: any): TPromise { - let pathToOpen = this.getPathToOpen(); - - const instance = this.integratedTerminalService.createInstance({ cwd: pathToOpen }, true); - if (instance) { - this.integratedTerminalService.setActiveInstance(instance); - this.integratedTerminalService.showPanel(true); - } - return TPromise.as(null); + return this.commandService.executeCommand(OPEN_INTEGRATED_TERMINAL_COMMAND_ID, this.resource); } } @@ -227,3 +186,68 @@ Registry.as(ActionExtensions.WorkbenchActions).registe ), env.isWindows ? 'Open New Command Prompt' : 'Open New Terminal' ); + +const OPEN_INTEGRATED_TERMINAL_COMMAND_ID = 'workbench.command.terminal.openFolderInIntegratedTerminal'; +const OPEN_CONSOLE_COMMAND_ID = 'workbench.command.terminal.openNativeConsole'; + +function getPathToOpen(resource: uri, historyService: IHistoryService, editorService: IWorkbenchEditorService): string { + let pathToOpen: string; + + // Try workspace path first + const root = historyService.getLastActiveWorkspaceRoot('file'); + pathToOpen = resource ? resource.fsPath : (root && root.fsPath); + + // Otherwise check if we have an active file open + if (!pathToOpen) { + const file = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + if (file) { + pathToOpen = paths.dirname(file.fsPath); // take parent folder of file + } + } + + return pathToOpen; +} + +CommandsRegistry.registerCommand({ + id: OPEN_INTEGRATED_TERMINAL_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + const integratedTerminalService = accessor.get(IIntegratedTerminalService); + let pathToOpen = getPathToOpen(args.resource, accessor.get(IHistoryService), accessor.get(IWorkbenchEditorService)); + + const instance = integratedTerminalService.createInstance({ cwd: pathToOpen }, true); + if (instance) { + integratedTerminalService.setActiveInstance(instance); + integratedTerminalService.showPanel(true); + } + + return TPromise.as(null); + } +}); + +CommandsRegistry.registerCommand({ + id: OPEN_CONSOLE_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + const terminalService = accessor.get(ITerminalService); + let pathToOpen = getPathToOpen(args.resource, accessor.get(IHistoryService), accessor.get(IWorkbenchEditorService)); + terminalService.openTerminal(pathToOpen); + + return TPromise.as(null); + } +}); + +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'file', + command: { + id: OPEN_CONSOLE_COMMAND_ID, + title: env.isWindows ? nls.localize('scopedConsoleActionWin', "Open in Command Prompt") : + nls.localize('scopedConsoleActionMacLinux', "Open in Terminal") + } +}); + +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'file', + command: { + id: OPEN_INTEGRATED_TERMINAL_COMMAND_ID, + title: nls.localize('openFolderInIntegratedTerminal', "Open in Terminal") + } +}); diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index bf8c6cda5ae..1556e60e2d1 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -31,6 +31,8 @@ import { basename } from 'vs/base/common/paths'; import { IListService } from 'vs/platform/list/browser/listService'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; +import { isWindows, isMacintosh } from 'vs/base/common/platform'; // Commands @@ -263,6 +265,14 @@ function registerFileCommands(): void { } }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'file', + command: { + id: OPEN_TO_SIDE_COMMAND_ID, + title: nls.localize('openToSide', "Open to the Side") + } + }); + CommandsRegistry.registerCommand({ id: COMPARE_WITH_SAVED_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -364,6 +374,14 @@ function registerFileCommands(): void { } }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'file', + command: { + id: COPY_PATH_COMMAND_ID, + title: nls.localize('copyPath', "Copy Path") + } + }); + CommandsRegistry.registerCommand({ id: REVEAL_IN_EXPLORER_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -387,4 +405,12 @@ function registerFileCommands(): void { }); } }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'file', + command: { + id: REVEAL_IN_EXPLORER_COMMAND_ID, + title: isWindows ? nls.localize('revealInWindows', "Reveal in Explorer") : isMacintosh ? nls.localize('revealInMac', "Reveal in Finder") : nls.localize('openContainer', "Open Containing Folder") + } + }); } diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index b7531389b47..54d79c2a766 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -15,13 +15,13 @@ import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/co import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { Position, IEditorInput } from 'vs/platform/editor/common/editor'; import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup } from 'vs/workbench/common/editor'; -import { SaveAllAction, SaveAllInGroupAction, OpenToSideAction, SaveFileAction, RevertFileAction, SaveFileAsAction, CompareWithSavedAction, CompareResourcesAction, SelectResourceForCompareAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; +import { SaveAllAction, SaveAllInGroupAction, SaveFileAction, RevertFileAction, SaveFileAsAction, CompareWithSavedAction, CompareResourcesAction, SelectResourceForCompareAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; import { IViewletViewOptions, IViewOptions, ViewsViewletPanel } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { OpenEditorsFocusedContext, ExplorerFocusedContext, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; import { ITextFileService, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; import { OpenEditor } from 'vs/workbench/parts/files/common/explorerModel'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { CloseAllEditorsAction, CloseUnmodifiedEditorsInGroupAction, CloseEditorsInGroupAction, CloseOtherEditorsInGroupAction, CloseEditorAction } from 'vs/workbench/browser/parts/editor/editorActions'; +import { CloseAllEditorsAction, CloseUnmodifiedEditorsInGroupAction, CloseEditorsInGroupAction, CloseEditorAction } from 'vs/workbench/browser/parts/editor/editorActions'; import { ToggleEditorLayoutAction } from 'vs/workbench/browser/actions/toggleEditorLayout'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; @@ -94,6 +94,7 @@ export class OpenEditorsView extends ViewsViewletPanel { this.needsRefresh = false; }, this.structuralRefreshDelay); this.contributedContextMenu = menuService.createMenu(MenuId.OpenEditorsContext, contextKeyService); + this.contributedContextMenu.getActions(); // update on model changes this.disposables.push(this.model.onModelChanged(e => this.onEditorStacksModelChanged(e))); @@ -288,7 +289,7 @@ export class OpenEditorsView extends ViewsViewletPanel { return; } - // Do a minimal tree update based on if the change is structural or not #6670 + // Do a minimal list update based on if the change is structural or not #6670 if (e.structural) { this.listRefreshScheduler.schedule(this.structuralRefreshDelay); } else if (!this.listRefreshScheduler.isScheduled()) { @@ -585,85 +586,75 @@ export class ActionProvider extends ContributableActionProvider { } public getSecondaryActions(element: any): TPromise { - return super.getSecondaryActions(undefined, element).then(result => { - const autoSaveEnabled = this.textFileService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY; + const result: IAction[] = []; + const autoSaveEnabled = this.textFileService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY; - if (element instanceof EditorGroup) { - if (!autoSaveEnabled) { - result.push(this.instantiationService.createInstance(SaveAllInGroupAction, SaveAllInGroupAction.ID, nls.localize('saveAll', "Save All"))); - result.push(new Separator()); - } - - result.push(this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified"))); - result.push(this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All"))); - } else { - const openEditor = element; - const resource = openEditor.getResource(); - if (resource) { - // Open to side - result.unshift(this.instantiationService.createInstance(OpenToSideAction, resource)); - - if (!openEditor.isUntitled()) { - - // Files: Save / Revert - if (!autoSaveEnabled) { - result.push(new Separator()); - - const saveAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); - saveAction.setResource(resource); - saveAction.enabled = openEditor.isDirty(); - result.push(saveAction); - - const revertAction = this.instantiationService.createInstance(RevertFileAction, RevertFileAction.ID, RevertFileAction.LABEL); - revertAction.setResource(resource); - revertAction.enabled = openEditor.isDirty(); - result.push(revertAction); - } - } - - // Untitled: Save / Save As - if (openEditor.isUntitled()) { - result.push(new Separator()); - - if (this.untitledEditorService.hasAssociatedFilePath(resource)) { - let saveUntitledAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); - saveUntitledAction.setResource(resource); - result.push(saveUntitledAction); - } - - let saveAsAction = this.instantiationService.createInstance(SaveFileAsAction, SaveFileAsAction.ID, SaveFileAsAction.LABEL); - saveAsAction.setResource(resource); - result.push(saveAsAction); - } - - // Compare Actions - result.push(new Separator()); - - if (!openEditor.isUntitled()) { - const compareWithSavedAction = this.instantiationService.createInstance(CompareWithSavedAction, CompareWithSavedAction.ID, nls.localize('compareWithSaved', "Compare with Saved")); - compareWithSavedAction.setResource(resource); - compareWithSavedAction.enabled = openEditor.isDirty(); - result.push(compareWithSavedAction); - } - - const runCompareAction = this.instantiationService.createInstance(CompareResourcesAction, resource); - if (runCompareAction._isEnabled()) { - result.push(runCompareAction); - } - result.push(this.instantiationService.createInstance(SelectResourceForCompareAction, resource)); - - result.push(new Separator()); - } - - result.push(this.instantiationService.createInstance(CloseEditorAction, CloseEditorAction.ID, nls.localize('close', "Close"))); - const closeOtherEditorsInGroupAction = this.instantiationService.createInstance(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, nls.localize('closeOthers', "Close Others")); - closeOtherEditorsInGroupAction.enabled = openEditor.editorGroup.count > 1; - result.push(closeOtherEditorsInGroupAction); - result.push(this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified"))); - result.push(this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All"))); + if (element instanceof EditorGroup) { + if (!autoSaveEnabled) { + result.push(this.instantiationService.createInstance(SaveAllInGroupAction, SaveAllInGroupAction.ID, nls.localize('saveAll', "Save All"))); + result.push(new Separator()); } - return result; - }); + result.push(this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified"))); + result.push(this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All"))); + } else { + const openEditor = element; + const resource = openEditor.getResource(); + if (resource) { + + if (!openEditor.isUntitled()) { + + // Files: Save / Revert + if (!autoSaveEnabled) { + result.push(new Separator()); + + const saveAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); + saveAction.setResource(resource); + saveAction.enabled = openEditor.isDirty(); + result.push(saveAction); + + const revertAction = this.instantiationService.createInstance(RevertFileAction, RevertFileAction.ID, RevertFileAction.LABEL); + revertAction.setResource(resource); + revertAction.enabled = openEditor.isDirty(); + result.push(revertAction); + } + } + + // Untitled: Save / Save As + if (openEditor.isUntitled()) { + result.push(new Separator()); + + if (this.untitledEditorService.hasAssociatedFilePath(resource)) { + let saveUntitledAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); + saveUntitledAction.setResource(resource); + result.push(saveUntitledAction); + } + + let saveAsAction = this.instantiationService.createInstance(SaveFileAsAction, SaveFileAsAction.ID, SaveFileAsAction.LABEL); + saveAsAction.setResource(resource); + result.push(saveAsAction); + } + + // Compare Actions + result.push(new Separator()); + + if (!openEditor.isUntitled()) { + const compareWithSavedAction = this.instantiationService.createInstance(CompareWithSavedAction, CompareWithSavedAction.ID, nls.localize('compareWithSaved', "Compare with Saved")); + compareWithSavedAction.setResource(resource); + compareWithSavedAction.enabled = openEditor.isDirty(); + result.push(compareWithSavedAction); + } + + const runCompareAction = this.instantiationService.createInstance(CompareResourcesAction, resource); + if (runCompareAction._isEnabled()) { + result.push(runCompareAction); + } + result.push(this.instantiationService.createInstance(SelectResourceForCompareAction, resource)); + + result.push(new Separator()); + } + } + + return TPromise.as(result); } } From 17bda4b25cbc3b1cfe21338d45743b5b7600b602 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 15 Dec 2017 15:58:58 +0100 Subject: [PATCH 323/615] Do not write .d.ts files to disk, as they are not needed there --- build/lib/compilation.js | 51 ++++++++-------------------------------- build/lib/compilation.ts | 14 ++++++++++- 2 files changed, 23 insertions(+), 42 deletions(-) diff --git a/build/lib/compilation.js b/build/lib/compilation.js index 715ceeb4ede..963facfa613 100644 --- a/build/lib/compilation.js +++ b/build/lib/compilation.js @@ -58,9 +58,13 @@ function compileTask(out, build) { return function () { var compile = createCompile(build, true); var src = es.merge(gulp.src('src/**', { base: 'src' }), gulp.src('node_modules/typescript/lib/lib.d.ts')); + // Do not write .d.ts files to disk, as they are not needed there. + var dtsFilter = util.filter(function (data) { return !/\.d\.ts$/.test(data.path); }); return src .pipe(compile()) + .pipe(dtsFilter) .pipe(gulp.dest(out)) + .pipe(dtsFilter.restore) .pipe(monacodtsTask(out, false)); }; } @@ -70,54 +74,19 @@ function watchTask(out, build) { var compile = createCompile(build); var src = es.merge(gulp.src('src/**', { base: 'src' }), gulp.src('node_modules/typescript/lib/lib.d.ts')); var watchSrc = watch('src/**', { base: 'src' }); + // Do not write .d.ts files to disk, as they are not needed there. + var dtsFilter = util.filter(function (data) { return !/\.d\.ts$/.test(data.path); }); return watchSrc .pipe(util.incremental(compile, src, true)) + .pipe(dtsFilter) .pipe(gulp.dest(out)) + .pipe(dtsFilter.restore) .pipe(monacodtsTask(out, true)); }; } exports.watchTask = watchTask; -function reloadTypeScriptNodeModule() { - var util = require('gulp-util'); - function log(message) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - util.log.apply(util, [util.colors.cyan('[memory watch dog]'), message].concat(rest)); - } - function heapUsed() { - return (process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2) + ' MB'; - } - return es.through(function (data) { - this.emit('data', data); - }, function () { - log('memory usage after compilation finished: ' + heapUsed()); - // It appears we are running into some variant of - // https://bugs.chromium.org/p/v8/issues/detail?id=2073 - // - // Even though all references are dropped, some - // optimized methods in the TS compiler end up holding references - // to the entire TypeScript language host (>600MB) - // - // The idea is to force v8 to drop references to these - // optimized methods, by "reloading" the typescript node module - log('Reloading typescript node module...'); - var resolvedName = require.resolve('typescript'); - var originalModule = require.cache[resolvedName]; - delete require.cache[resolvedName]; - var newExports = require('typescript'); - require.cache[resolvedName] = originalModule; - for (var prop in newExports) { - if (newExports.hasOwnProperty(prop)) { - originalModule.exports[prop] = newExports[prop]; - } - } - log('typescript node module reloaded.'); - this.emit('end'); - }); -} function monacodtsTask(out, isWatch) { + var basePath = path.resolve(process.cwd(), out); var neededFiles = {}; monacodts.getFilesToWatch(out).forEach(function (filePath) { filePath = path.normalize(filePath); @@ -160,7 +129,7 @@ function monacodtsTask(out, isWatch) { })); } resultStream = es.through(function (data) { - var filePath = path.normalize(data.path); + var filePath = path.normalize(path.resolve(basePath, data.relative)); if (neededFiles[filePath]) { setInputFile(filePath, data.contents.toString()); } diff --git a/build/lib/compilation.ts b/build/lib/compilation.ts index 0e147ff6ba9..da01c2d4954 100644 --- a/build/lib/compilation.ts +++ b/build/lib/compilation.ts @@ -74,9 +74,14 @@ export function compileTask(out: string, build: boolean): () => NodeJS.ReadWrite gulp.src('node_modules/typescript/lib/lib.d.ts'), ); + // Do not write .d.ts files to disk, as they are not needed there. + const dtsFilter = util.filter(data => !/\.d\.ts$/.test(data.path)); + return src .pipe(compile()) + .pipe(dtsFilter) .pipe(gulp.dest(out)) + .pipe(dtsFilter.restore) .pipe(monacodtsTask(out, false)); }; } @@ -92,15 +97,22 @@ export function watchTask(out: string, build: boolean): () => NodeJS.ReadWriteSt ); const watchSrc = watch('src/**', { base: 'src' }); + // Do not write .d.ts files to disk, as they are not needed there. + const dtsFilter = util.filter(data => !/\.d\.ts$/.test(data.path)); + return watchSrc .pipe(util.incremental(compile, src, true)) + .pipe(dtsFilter) .pipe(gulp.dest(out)) + .pipe(dtsFilter.restore) .pipe(monacodtsTask(out, true)); }; } function monacodtsTask(out: string, isWatch: boolean): NodeJS.ReadWriteStream { + const basePath = path.resolve(process.cwd(), out); + const neededFiles: { [file: string]: boolean; } = {}; monacodts.getFilesToWatch(out).forEach(function (filePath) { filePath = path.normalize(filePath); @@ -148,7 +160,7 @@ function monacodtsTask(out: string, isWatch: boolean): NodeJS.ReadWriteStream { } resultStream = es.through(function (data) { - const filePath = path.normalize(data.path); + const filePath = path.normalize(path.resolve(basePath, data.relative)); if (neededFiles[filePath]) { setInputFile(filePath, data.contents.toString()); } From 198667a8f19e36e1b6865e1f18e9edf2ec0f71a6 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 15 Dec 2017 16:07:15 +0100 Subject: [PATCH 324/615] Add option to disable sourcemaps for those in a hurry --- build/lib/compilation.js | 3 +++ build/lib/compilation.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/build/lib/compilation.js b/build/lib/compilation.js index 963facfa613..837202d2126 100644 --- a/build/lib/compilation.js +++ b/build/lib/compilation.js @@ -22,6 +22,9 @@ var rootDir = path.join(__dirname, '../../src'); var options = require('../../src/tsconfig.json').compilerOptions; options.verbose = false; options.sourceMap = true; +if (process.env['VSCODE_NO_SOURCEMAP']) { + options.sourceMap = false; +} options.rootDir = rootDir; options.sourceRoot = util.toFileUri(rootDir); function createCompile(build, emitError) { diff --git a/build/lib/compilation.ts b/build/lib/compilation.ts index da01c2d4954..3d64fe6f885 100644 --- a/build/lib/compilation.ts +++ b/build/lib/compilation.ts @@ -25,6 +25,9 @@ const rootDir = path.join(__dirname, '../../src'); const options = require('../../src/tsconfig.json').compilerOptions; options.verbose = false; options.sourceMap = true; +if (process.env['VSCODE_NO_SOURCEMAP']) { // To be used by developers in a hurry + options.sourceMap = false; +} options.rootDir = rootDir; options.sourceRoot = util.toFileUri(rootDir); From 938dc015d2dca640663c3f6115e8e7f51f88b4e5 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 15 Dec 2017 16:12:15 +0100 Subject: [PATCH 325/615] :lipstick: --- .../scm/electron-browser/scm.contribution.ts | 20 +++++++++---------- .../parts/scm/electron-browser/scmViewlet.ts | 17 +++++++--------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts index b838a3ad4f3..c8079172f45 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -5,6 +5,7 @@ 'use strict'; +import { localize } from 'vs/nls'; import { Registry } from 'vs/platform/registry/common/platform'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { DirtyDiffWorkbenchController } from './dirtydiffDecorator'; @@ -19,12 +20,11 @@ import { StatusUpdater, StatusBarController } from './scmActivity'; import { SCMViewlet } from 'vs/workbench/parts/scm/electron-browser/scmViewlet'; import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; -import * as nls from 'vs/nls'; class OpenSCMViewletAction extends ToggleViewletAction { static readonly ID = VIEWLET_ID; - static LABEL = nls.localize('toggleGitViewlet', "Show Git"); + static LABEL = localize('toggleGitViewlet', "Show Git"); constructor(id: string, label: string, @IViewletService viewletService: IViewletService, @IWorkbenchEditorService editorService: IWorkbenchEditorService) { super(id, label, VIEWLET_ID, viewletService, editorService); @@ -37,7 +37,7 @@ Registry.as(WorkbenchExtensions.Workbench) const viewletDescriptor = new ViewletDescriptor( SCMViewlet, VIEWLET_ID, - nls.localize('source control', "Source Control"), + localize('source control', "Source Control"), 'scm', 36 ); @@ -53,38 +53,38 @@ Registry.as(WorkbenchExtensions.Workbench) // Register Action to Open Viewlet Registry.as(WorkbenchActionExtensions.WorkbenchActions).registerWorkbenchAction( - new SyncActionDescriptor(OpenSCMViewletAction, VIEWLET_ID, nls.localize('toggleSCMViewlet', "Show SCM"), { + new SyncActionDescriptor(OpenSCMViewletAction, VIEWLET_ID, localize('toggleSCMViewlet', "Show SCM"), { primary: null, win: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G }, linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G }, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_G } }), 'View: Show SCM', - nls.localize('view', "View") + localize('view', "View") ); Registry.as(ConfigurationExtensions.Configuration).registerConfiguration({ id: 'scm', order: 5, - title: nls.localize('scmConfigurationTitle', "SCM"), + title: localize('scmConfigurationTitle', "SCM"), type: 'object', properties: { - 'scm.showSingleSourceControlProvider': { + 'scm.alwaysShowProviders': { type: 'boolean', - description: nls.localize({ comment: ['This is the description for a setting'], key: 'showSingleSourceControlProvider' }, "Whether to show Source Control Provider for single repository."), + description: localize('alwaysShowProviders', "Whether to always show the Source Control Provider section."), default: false }, 'scm.diffDecorations': { type: 'string', enum: ['all', 'gutter', 'overview', 'none'], default: 'all', - description: nls.localize('diffDecorations', "Controls diff decorations in the editor.") + description: localize('diffDecorations', "Controls diff decorations in the editor.") }, 'scm.inputCounter': { type: 'string', enum: ['always', 'warn', 'off'], default: 'warn', - description: nls.localize('inputCounter', "Controls when to display the input counter.") + description: localize('inputCounter', "Controls when to display the input counter.") } } }); \ No newline at end of file diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index adcbaa3d0a7..5270b96f29b 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -8,7 +8,7 @@ import 'vs/css!./media/scmViewlet'; import { localize } from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; -import Event, { Emitter, chain, mapEvent, anyEvent } from 'vs/base/common/event'; +import Event, { Emitter, chain, mapEvent, anyEvent, filterEvent } from 'vs/base/common/event'; import { domEvent, stop } from 'vs/base/browser/event'; import { basename } from 'vs/base/common/paths'; import { onUnexpectedError } from 'vs/base/common/errors'; @@ -1042,7 +1042,6 @@ export class SCMViewlet extends PanelViewlet implements IViewModel { this.menus = instantiationService.createInstance(SCMMenus, undefined); this.menus.onDidChangeTitle(this.updateTitleArea, this, this.disposables); - this._register(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(e))); } async create(parent: Builder): TPromise { @@ -1056,13 +1055,11 @@ export class SCMViewlet extends PanelViewlet implements IViewModel { this.scmService.onDidAddRepository(this.onDidAddRepository, this, this.disposables); this.scmService.onDidRemoveRepository(this.onDidRemoveRepository, this, this.disposables); this.scmService.repositories.forEach(r => this.onDidAddRepository(r)); - this.onDidChangeRepositories(); - } - private onConfigurationUpdated(e: IConfigurationChangeEvent): void { - if (e.affectsConfiguration('scm.showSingleSourceControlProvider')) { - this.onDidChangeRepositories(); - } + const onDidUpdateConfiguration = filterEvent(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.alwaysShowProviders')); + onDidUpdateConfiguration(this.onDidChangeRepositories, this, this.disposables); + + this.onDidChangeRepositories(); } private onDidAddRepository(repository: ISCMRepository): void { @@ -1095,8 +1092,8 @@ export class SCMViewlet extends PanelViewlet implements IViewModel { private onDidChangeRepositories(): void { toggleClass(this.el, 'empty', this.scmService.repositories.length === 0); - const shouldMainPanelBeVisible = this.scmService.repositories.length > - (this.configurationService.getValue('scm.showSingleSourceControlProvider') ? 0 : 1); + const shouldMainPanelAlwaysBeVisible = this.configurationService.getValue('scm.alwaysShowProviders'); + const shouldMainPanelBeVisible = shouldMainPanelAlwaysBeVisible || this.scmService.repositories.length > 1; if (!!this.mainPanel === shouldMainPanelBeVisible) { return; From eb43c80ecc3c2a3f6d4ad1de3e6b6abea7a4b919 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 15 Dec 2017 16:17:39 +0100 Subject: [PATCH 326/615] :lipstick: --- extensions/git/src/commands.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 4653e3ef902..9b20e9487bb 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -328,10 +328,6 @@ export class CommandCenter { return ''; } - private handlePathTilde(path: string): string { - return path.replace(/^~/, os.homedir()); - } - private static cloneId = 0; @command('git.clone') @@ -358,7 +354,7 @@ export class CommandCenter { const parentPath = await window.showInputBox({ prompt: localize('parent', "Parent Directory"), - value: this.handlePathTilde(value), + value, ignoreFocusOut: true }); @@ -382,7 +378,7 @@ export class CommandCenter { statusBarItem.command = cancelCommandId; statusBarItem.show(); - const clonePromise = this.git.clone(url, this.handlePathTilde(parentPath), tokenSource.token); + const clonePromise = this.git.clone(url, parentPath.replace(/^~/, os.homedir()), tokenSource.token); try { window.withProgress({ location: ProgressLocation.SourceControl, title: localize('cloning', "Cloning git repository...") }, () => clonePromise); @@ -1329,7 +1325,7 @@ export class CommandCenter { const remoteRefs = repository.refs; const remoteRefsFiltered = remoteRefs.filter(r => (r.remote === remotePick.label)); - const branchPicks = remoteRefsFiltered.map(r => ({ label: r.name})) as {label : string; description : string}[]; + const branchPicks = remoteRefsFiltered.map(r => ({ label: r.name })) as { label: string; description: string }[]; const branchPick = await window.showQuickPick(branchPicks, { placeHolder }); if (!branchPick) { @@ -1338,7 +1334,7 @@ export class CommandCenter { const remoteCharCnt = remotePick.label.length; - repository.pull(false, remotePick.label, branchPick.label.slice(remoteCharCnt+1)); + repository.pull(false, remotePick.label, branchPick.label.slice(remoteCharCnt + 1)); } @command('git.pull', { repository: true }) From 195c346f06168ac786c7a5f40346152cc7121a4f Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 15 Dec 2017 16:18:05 +0100 Subject: [PATCH 327/615] :lipstick: --- src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index 5270b96f29b..84b6588527b 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -56,7 +56,7 @@ import { format } from 'vs/base/common/strings'; import { ISpliceable, ISequence, ISplice } from 'vs/base/common/sequence'; import { firstIndex } from 'vs/base/common/arrays'; import { WorkbenchList, IListService } from 'vs/platform/list/browser/listService'; -import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; // TODO@Joao // Need to subclass MenuItemActionItem in order to respect From 3bac9bd02723b698990926c5105fba11d4406109 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 15 Dec 2017 17:11:07 +0100 Subject: [PATCH 328/615] fix #40307 --- src/vs/workbench/api/electron-browser/mainThreadCommands.ts | 6 +++++- src/vs/workbench/api/node/extHostCommands.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadCommands.ts b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts index 5d693ddb28f..ad4bfc1165a 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadCommands.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts @@ -57,7 +57,11 @@ export class MainThreadCommands implements MainThreadCommandsShape { $registerCommand(id: string): void { this._disposables.set( id, - CommandsRegistry.registerCommand(id, (accessor, ...args) => this._proxy.$executeContributedCommand(id, ...args)) + CommandsRegistry.registerCommand(id, (accessor, ...args) => { + return this._proxy.$executeContributedCommand(id, ...args).then(result => { + return revive(result, 0); + }); + }) ); } diff --git a/src/vs/workbench/api/node/extHostCommands.ts b/src/vs/workbench/api/node/extHostCommands.ts index da76af9d827..66669e64fb3 100644 --- a/src/vs/workbench/api/node/extHostCommands.ts +++ b/src/vs/workbench/api/node/extHostCommands.ts @@ -101,7 +101,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { } }); - return this._proxy.$executeCommand(id, args); + return this._proxy.$executeCommand(id, args).then(result => revive(result, 0)); } } From 79fcbe0e794bdc1dff14e146eb4936c4383a1adb Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 15 Dec 2017 17:11:47 +0100 Subject: [PATCH 329/615] compare actions via menu and introduce first context keys --- .../browser/parts/editor/editorCommands.ts | 14 +++-- src/vs/workbench/common/editor.ts | 2 + .../files/electron-browser/fileActions.ts | 27 +--------- .../files/electron-browser/fileCommands.ts | 53 ++++++++++++++++++- .../electron-browser/views/openEditorsView.ts | 36 ++++++------- 5 files changed, 80 insertions(+), 52 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index 628e4e0075c..fc9011e50fe 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -8,7 +8,7 @@ import * as types from 'vs/base/common/types'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { ActiveEditorMoveArguments, ActiveEditorMovePositioning, ActiveEditorMovePositioningBy, EditorCommands, TextCompareEditorVisible, IEditorContext, EditorInput } from 'vs/workbench/common/editor'; +import { ActiveEditorMoveArguments, ActiveEditorMovePositioning, ActiveEditorMovePositioningBy, EditorCommands, TextCompareEditorVisible, IEditorContext, EditorInput, EditorFocusedInOpenEditorsContext } from 'vs/workbench/common/editor'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditor, Position, POSITIONS } from 'vs/platform/editor/common/editor'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; @@ -317,7 +317,8 @@ function registerEditorCommands() { command: { id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, title: CLOSE_UNMODIFIED_EDITORS_LABEL - } + }, + when: EditorFocusedInOpenEditorsContext }); CommandsRegistry.registerCommand({ @@ -347,7 +348,8 @@ function registerEditorCommands() { command: { id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, title: CLOSE_EDITORS_IN_GROUP_LABEL - } + }, + when: EditorFocusedInOpenEditorsContext }); CommandsRegistry.registerCommand({ @@ -389,7 +391,8 @@ function registerEditorCommands() { command: { id: CLOSE_EDITOR_COMMAND_ID, title: CLOSE_EDITOR_LABEL - } + }, + when: EditorFocusedInOpenEditorsContext }); CommandsRegistry.registerCommand({ @@ -421,6 +424,7 @@ function registerEditorCommands() { command: { id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, title: CLOSE_OTHER_EDITORS_IN_GROUP_LABEL - } + }, + when: EditorFocusedInOpenEditorsContext }); } diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index d6f97814480..f245278434d 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -17,6 +17,8 @@ import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { Registry } from 'vs/platform/registry/common/platform'; export const TextCompareEditorVisible = new RawContextKey('textCompareEditorVisible', false); +export const EditorFocusedInOpenEditorsContext = new RawContextKey('editorFocusedInOpenEditors', false); +export const GroupFocusedInOpenEditorsContext = new RawContextKey('groupFocusedInOpenEditors', false); export enum ConfirmResult { SAVE, diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index 3000a7f7ee0..999a7ab49ea 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -23,7 +23,6 @@ import { MessageType, IInputValidator } from 'vs/base/browser/ui/inputbox/inputB import { ITree, IHighlightEvent, IActionProvider } from 'vs/base/parts/tree/browser/tree'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { VIEWLET_ID, FileOnDiskContentProvider } from 'vs/workbench/parts/files/common/files'; -import labels = require('vs/base/common/labels'); import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IFileService, IFileStat } from 'vs/platform/files/common/files'; import { toResource, IEditorIdentifier } from 'vs/workbench/common/editor'; @@ -44,7 +43,7 @@ import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; import { IEditorViewState, IModel } from 'vs/editor/common/editorCommon'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { withFocusedFilesExplorer, REVERT_FILE_COMMAND_ID, OPEN_TO_SIDE_COMMAND_ID, COMPARE_WITH_SAVED_SCHEMA, COMPARE_WITH_SAVED_COMMAND_ID, COMPARE_RESOURCE_COMMAND_ID, SELECT_FOR_COMPARE_COMMAND_ID, globalResourceToCompare, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID } from 'vs/workbench/parts/files/electron-browser/fileCommands'; +import { withFocusedFilesExplorer, REVERT_FILE_COMMAND_ID, OPEN_TO_SIDE_COMMAND_ID, COMPARE_WITH_SAVED_SCHEMA, COMPARE_WITH_SAVED_COMMAND_ID, COMPARE_RESOURCE_COMMAND_ID, SELECT_FOR_COMPARE_COMMAND_ID, globalResourceToCompare, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID, computeLabelForCompare } from 'vs/workbench/parts/files/electron-browser/fileCommands'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; @@ -1213,33 +1212,11 @@ export class CompareResourcesAction extends Action { @IWorkspaceContextService contextService: IWorkspaceContextService, @IEnvironmentService environmentService: IEnvironmentService ) { - super('workbench.files.action.compareFiles', CompareResourcesAction.computeLabel(resource, contextService, environmentService)); + super('workbench.files.action.compareFiles', computeLabelForCompare(resource, contextService, environmentService)); this.resource = resource; } - private static computeLabel(resource: URI, contextService: IWorkspaceContextService, environmentService: IEnvironmentService): string { - if (globalResourceToCompare) { - let leftResourceName = paths.basename(globalResourceToCompare.fsPath); - let rightResourceName = paths.basename(resource.fsPath); - - // If the file names are identical, add more context by looking at the parent folder - if (leftResourceName === rightResourceName) { - const folderPaths = labels.shorten([ - labels.getPathLabel(resources.dirname(globalResourceToCompare), contextService, environmentService), - labels.getPathLabel(resources.dirname(resource), contextService, environmentService) - ]); - - leftResourceName = paths.join(folderPaths[0], leftResourceName); - rightResourceName = paths.join(folderPaths[1], rightResourceName); - } - - return nls.localize('compareWith', "Compare '{0}' with '{1}'", leftResourceName, rightResourceName); - } - - return nls.localize('compareFiles', "Compare Files"); - } - public _isEnabled(): boolean { // Need at least a resource to compare diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index 1556e60e2d1..9a255fb5d0c 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -9,6 +9,8 @@ import nls = require('vs/nls'); import paths = require('vs/base/common/paths'); import severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; +import * as labels from 'vs/base/common/labels'; +import * as resources from 'vs/base/common/resources'; import URI from 'vs/base/common/uri'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { toResource, IEditorContext } from 'vs/workbench/common/editor'; @@ -24,7 +26,6 @@ import { ITree } from 'vs/base/parts/tree/browser/tree'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { getPathLabel } from 'vs/base/common/labels'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { toErrorMessage } from 'vs/base/common/errorMessage'; import { basename } from 'vs/base/common/paths'; @@ -33,6 +34,7 @@ import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { isWindows, isMacintosh } from 'vs/base/common/platform'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; // Commands @@ -217,6 +219,28 @@ export const revealInOSFocusedFilesExplorerItem = (accessor: ServicesAccessor) = }); }; +export function computeLabelForCompare(resource: URI, contextService: IWorkspaceContextService, environmentService: IEnvironmentService): string { + if (globalResourceToCompare) { + let leftResourceName = paths.basename(globalResourceToCompare.fsPath); + let rightResourceName = paths.basename(resource.fsPath); + + // If the file names are identical, add more context by looking at the parent folder + if (leftResourceName === rightResourceName) { + const folderPaths = labels.shorten([ + labels.getPathLabel(resources.dirname(globalResourceToCompare), contextService, environmentService), + labels.getPathLabel(resources.dirname(resource), contextService, environmentService) + ]); + + leftResourceName = paths.join(folderPaths[0], leftResourceName); + rightResourceName = paths.join(folderPaths[1], rightResourceName); + } + + return nls.localize('compareWith', "Compare '{0}' with '{1}'", leftResourceName, rightResourceName); + } + + return nls.localize('compareFiles', "Compare Files"); +} + export let globalResourceToCompare: URI; function registerFileCommands(): void { @@ -295,6 +319,15 @@ function registerFileCommands(): void { } }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'compare', + + command: { + id: COMPARE_WITH_SAVED_COMMAND_ID, + title: nls.localize('compareWithSaved', "Compare with Saved") + } + }); + CommandsRegistry.registerCommand({ id: SELECT_FOR_COMPARE_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -310,6 +343,14 @@ function registerFileCommands(): void { } }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'compare', + command: { + id: SELECT_FOR_COMPARE_COMMAND_ID, + title: nls.localize('compareSource', "Select for Compare") + } + }); + CommandsRegistry.registerCommand({ id: COMPARE_RESOURCE_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -328,6 +369,14 @@ function registerFileCommands(): void { } }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'compare', + command: { + id: COMPARE_RESOURCE_COMMAND_ID, + title: nls.localize('compareWithChosen', "Compare With Chosen") + } + }); + CommandsRegistry.registerCommand({ id: REVEAL_IN_OS_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -366,7 +415,7 @@ function registerFileCommands(): void { if (resource) { const clipboardService = accessor.get(IClipboardService); - clipboardService.writeText(resource.scheme === 'file' ? getPathLabel(resource) : resource.toString()); + clipboardService.writeText(resource.scheme === 'file' ? labels.getPathLabel(resource) : resource.toString()); } else { const messageService = accessor.get(IMessageService); messageService.show(severity.Info, nls.localize('openFileToCopy', "Open a file first to copy its path")); diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index 54d79c2a766..7af940b21bc 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -14,8 +14,8 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { Position, IEditorInput } from 'vs/platform/editor/common/editor'; -import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup } from 'vs/workbench/common/editor'; -import { SaveAllAction, SaveAllInGroupAction, SaveFileAction, RevertFileAction, SaveFileAsAction, CompareWithSavedAction, CompareResourcesAction, SelectResourceForCompareAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; +import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup, EditorFocusedInOpenEditorsContext, GroupFocusedInOpenEditorsContext } from 'vs/workbench/common/editor'; +import { SaveAllAction, SaveAllInGroupAction, SaveFileAction, RevertFileAction, SaveFileAsAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; import { IViewletViewOptions, IViewOptions, ViewsViewletPanel } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { OpenEditorsFocusedContext, ExplorerFocusedContext, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; import { ITextFileService, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; @@ -23,7 +23,7 @@ import { OpenEditor } from 'vs/workbench/parts/files/common/explorerModel'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { CloseAllEditorsAction, CloseUnmodifiedEditorsInGroupAction, CloseEditorsInGroupAction, CloseEditorAction } from 'vs/workbench/browser/parts/editor/editorActions'; import { ToggleEditorLayoutAction } from 'vs/workbench/browser/actions/toggleEditorLayout'; -import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; import { attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; @@ -59,6 +59,8 @@ export class OpenEditorsView extends ViewsViewletPanel { private list: WorkbenchList; private contributedContextMenu: IMenu; private needsRefresh: boolean; + private editorFocusedContext: IContextKey; + private groupFocusedContext: IContextKey; constructor( options: IViewletViewOptions, @@ -150,8 +152,19 @@ export class OpenEditorsView extends ViewsViewletPanel { // Bind context keys OpenEditorsFocusedContext.bindTo(this.list.contextKeyService); ExplorerFocusedContext.bindTo(this.list.contextKeyService); + this.editorFocusedContext = EditorFocusedInOpenEditorsContext.bindTo(this.contextKeyService); + this.groupFocusedContext = GroupFocusedInOpenEditorsContext.bindTo(this.contextKeyService); this.disposables.push(this.list.onContextMenu(e => this.onListContextMenu(e))); + this.list.onFocusChange(e => { + this.editorFocusedContext.reset(); + this.groupFocusedContext.reset(); + if (e.elements.length && e.elements[0] instanceof OpenEditor) { + this.editorFocusedContext.set(true); + } else if (e.elements.length) { + this.groupFocusedContext.set(true); + } + }); // Open when selecting via keyboard this.disposables.push(this.list.onMouseClick(e => this.onMouseClick(e, false))); @@ -635,23 +648,6 @@ export class ActionProvider extends ContributableActionProvider { result.push(saveAsAction); } - // Compare Actions - result.push(new Separator()); - - if (!openEditor.isUntitled()) { - const compareWithSavedAction = this.instantiationService.createInstance(CompareWithSavedAction, CompareWithSavedAction.ID, nls.localize('compareWithSaved', "Compare with Saved")); - compareWithSavedAction.setResource(resource); - compareWithSavedAction.enabled = openEditor.isDirty(); - result.push(compareWithSavedAction); - } - - const runCompareAction = this.instantiationService.createInstance(CompareResourcesAction, resource); - if (runCompareAction._isEnabled()) { - result.push(runCompareAction); - } - result.push(this.instantiationService.createInstance(SelectResourceForCompareAction, resource)); - - result.push(new Separator()); } } From 6cff1353c19a943c0f9ebb0823df276a58146a86 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 15 Dec 2017 18:15:58 +0100 Subject: [PATCH 330/615] open editors: more actions to contributed commands --- .../browser/parts/editor/editorCommands.ts | 6 +- src/vs/workbench/common/editor.ts | 4 +- src/vs/workbench/parts/files/common/files.ts | 2 + .../files/electron-browser/fileActions.ts | 169 +++++------------- .../files/electron-browser/fileCommands.ts | 169 +++++++++++++++++- .../electron-browser/views/openEditorsView.ts | 60 ++----- 6 files changed, 221 insertions(+), 189 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index fc9011e50fe..b79b87a2753 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -317,8 +317,7 @@ function registerEditorCommands() { command: { id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, title: CLOSE_UNMODIFIED_EDITORS_LABEL - }, - when: EditorFocusedInOpenEditorsContext + } }); CommandsRegistry.registerCommand({ @@ -348,8 +347,7 @@ function registerEditorCommands() { command: { id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, title: CLOSE_EDITORS_IN_GROUP_LABEL - }, - when: EditorFocusedInOpenEditorsContext + } }); CommandsRegistry.registerCommand({ diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index f245278434d..1aba8016519 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -13,11 +13,13 @@ import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; import { IEditor, IEditorViewState, IModel, ScrollType } from 'vs/editor/common/editorCommon'; import { IEditorInput, IEditorModel, IEditorOptions, ITextEditorOptions, IBaseResourceInput, Position, Verbosity, IEditor as IBaseEditor, IRevertOptions } from 'vs/platform/editor/common/editor'; import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; -import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; +import { RawContextKey, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { Registry } from 'vs/platform/registry/common/platform'; export const TextCompareEditorVisible = new RawContextKey('textCompareEditorVisible', false); export const EditorFocusedInOpenEditorsContext = new RawContextKey('editorFocusedInOpenEditors', false); +export const UntitledEditorFocusedInOpenEditorsContext = new RawContextKey('untitledEditorFocusedInOpenEditors', false); +export const UntitledEditorNotFocusedInOpenEditorsContext: ContextKeyExpr = UntitledEditorFocusedInOpenEditorsContext.toNegated(); export const GroupFocusedInOpenEditorsContext = new RawContextKey('groupFocusedInOpenEditors', false); export enum ConfirmResult { diff --git a/src/vs/workbench/parts/files/common/files.ts b/src/vs/workbench/parts/files/common/files.ts index b817c709192..b61ded59645 100644 --- a/src/vs/workbench/parts/files/common/files.ts +++ b/src/vs/workbench/parts/files/common/files.ts @@ -44,6 +44,7 @@ const openEditorsVisibleId = 'openEditorsVisible'; const openEditorsFocusId = 'openEditorsFocus'; const explorerViewletFocusId = 'explorerViewletFocus'; const explorerResourceIsFolderId = 'explorerResourceIsFolder'; +const autoSaveDisabled = 'autoSaveDisabled'; export const ExplorerViewletVisibleContext = new RawContextKey(explorerViewletVisibleId, true); export const ExplorerFolderContext = new RawContextKey(explorerResourceIsFolderId, false); @@ -51,6 +52,7 @@ export const FilesExplorerFocusedContext = new RawContextKey(filesExplo export const OpenEditorsVisibleContext = new RawContextKey(openEditorsVisibleId, false); export const OpenEditorsFocusedContext = new RawContextKey(openEditorsFocusId, true); export const ExplorerFocusedContext = new RawContextKey(explorerViewletFocusId, true); +export const AutoSaveDisabledContext = new RawContextKey(autoSaveDisabled, true); export const OpenEditorsVisibleCondition = ContextKeyExpr.has(openEditorsVisibleId); export const FilesExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(filesExplorerFocusId), ContextKeyExpr.not(InputFocusedContextKey)); diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index 999a7ab49ea..487437fd7d5 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -39,11 +39,10 @@ import { Position, IResourceInput, IUntitledResourceInput } from 'vs/platform/ed import { IInstantiationService, IConstructorSignature2, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService, IMessageWithAction, IConfirmation, Severity, CancelAction, IConfirmationResult } from 'vs/platform/message/common/message'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; -import { IEditorViewState, IModel } from 'vs/editor/common/editorCommon'; +import { IModel } from 'vs/editor/common/editorCommon'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { withFocusedFilesExplorer, REVERT_FILE_COMMAND_ID, OPEN_TO_SIDE_COMMAND_ID, COMPARE_WITH_SAVED_SCHEMA, COMPARE_WITH_SAVED_COMMAND_ID, COMPARE_RESOURCE_COMMAND_ID, SELECT_FOR_COMPARE_COMMAND_ID, globalResourceToCompare, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID, computeLabelForCompare } from 'vs/workbench/parts/files/electron-browser/fileCommands'; +import { withFocusedFilesExplorer, REVERT_FILE_COMMAND_ID, OPEN_TO_SIDE_COMMAND_ID, COMPARE_WITH_SAVED_SCHEMA, COMPARE_WITH_SAVED_COMMAND_ID, COMPARE_RESOURCE_COMMAND_ID, SELECT_FOR_COMPARE_COMMAND_ID, globalResourceToCompare, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID, computeLabelForCompare, SAVE_FILE_AS_COMMAND_ID, SAVE_FILE_COMMAND_ID, SAVE_FILE_LABEL, SAVE_FILE_AS_LABEL } from 'vs/workbench/parts/files/electron-browser/fileCommands'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; @@ -1247,154 +1246,63 @@ export class RefreshViewExplorerAction extends Action { } } -export abstract class BaseSaveFileAction extends BaseErrorReportingAction { - constructor( - id: string, - label: string, - messageService: IMessageService - ) { - super(id, label, messageService); - } +export class SaveFileAction extends BaseErrorReportingAction { - public run(context?: any): TPromise { - return this.doRun(context).then(() => true, error => { - this.onError(error); - return null; - }); - } + public static readonly ID = 'workbench.action.files.save'; + public static readonly LABEL = SAVE_FILE_LABEL; - protected abstract doRun(context?: any): TPromise; -} - -export abstract class BaseSaveOneFileAction extends BaseSaveFileAction { private resource: URI; constructor( id: string, label: string, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @ITextFileService private textFileService: ITextFileService, - @IEditorGroupService private editorGroupService: IEditorGroupService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IMessageService messageService: IMessageService, - @IFileService private fileService: IFileService + @ICommandService private commandService: ICommandService, + @IMessageService messageService: IMessageService ) { super(id, label, messageService); - - this.enabled = true; } - public abstract isSaveAs(): boolean; - public setResource(resource: URI): void { this.resource = resource; } - protected doRun(context: any): TPromise { - let source: URI; - if (this.resource) { - source = this.resource; - } else { - source = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true }); - } - - if (source && (this.fileService.canHandleResource(source) || source.scheme === 'untitled')) { - - // Save As (or Save untitled with associated path) - if (this.isSaveAs() || source.scheme === 'untitled') { - let encodingOfSource: string; - if (source.scheme === 'untitled') { - encodingOfSource = this.untitledEditorService.getEncoding(source); - } else if (source.scheme === 'file') { - const textModel = this.textFileService.models.get(source); - encodingOfSource = textModel && textModel.getEncoding(); // text model can be null e.g. if this is a binary file! - } - - let viewStateOfSource: IEditorViewState; - const activeEditor = this.editorService.getActiveEditor(); - const editor = getCodeEditor(activeEditor); - if (editor) { - const activeResource = toResource(activeEditor.input, { supportSideBySide: true }); - if (activeResource && (this.fileService.canHandleResource(activeResource) || source.scheme === 'untitled') && activeResource.toString() === source.toString()) { - viewStateOfSource = editor.saveViewState(); - } - } - - // Special case: an untitled file with associated path gets saved directly unless "saveAs" is true - let savePromise: TPromise; - if (!this.isSaveAs() && source.scheme === 'untitled' && this.untitledEditorService.hasAssociatedFilePath(source)) { - savePromise = this.textFileService.save(source).then((result) => { - if (result) { - return URI.file(source.fsPath); - } - - return null; - }); - } - - // Otherwise, really "Save As..." - else { - savePromise = this.textFileService.saveAs(source); - } - - return savePromise.then((target) => { - if (!target || target.toString() === source.toString()) { - return void 0; // save canceled or same resource used - } - - const replaceWith: IResourceInput = { - resource: target, - encoding: encodingOfSource, - options: { - pinned: true, - viewState: viewStateOfSource - } - }; - - return this.editorService.replaceEditors([{ - toReplace: { resource: source }, - replaceWith - }]).then(() => true); - }); - } - - // Pin the active editor if we are saving it - if (!this.resource) { - const editor = this.editorService.getActiveEditor(); - if (editor) { - this.editorGroupService.pinEditor(editor.position, editor.input); - } - } - - // Just save - return this.textFileService.save(source, { force: true /* force a change to the file to trigger external watchers if any */ }); - } - - return TPromise.as(false); + public run(context?: any): TPromise { + return this.commandService.executeCommand(SAVE_FILE_COMMAND_ID, { resource: this.resource }).then(() => true, error => { + this.onError(error); + return null; + }); } } -export class SaveFileAction extends BaseSaveOneFileAction { - - public static readonly ID = 'workbench.action.files.save'; - public static readonly LABEL = nls.localize('save', "Save"); - - public isSaveAs(): boolean { - return false; - } -} - -export class SaveFileAsAction extends BaseSaveOneFileAction { +export class SaveFileAsAction extends BaseErrorReportingAction { public static readonly ID = 'workbench.action.files.saveAs'; - public static readonly LABEL = nls.localize('saveAs', "Save As..."); + public static readonly LABEL = SAVE_FILE_AS_LABEL; - public isSaveAs(): boolean { - return true; + private resource: URI; + + constructor( + id: string, + label: string, + @ICommandService private commandService: ICommandService, + @IMessageService messageService: IMessageService + ) { + super(id, label, messageService); + } + + public setResource(resource: URI): void { + this.resource = resource; + } + + public run(context?: any): TPromise { + return this.commandService.executeCommand(SAVE_FILE_AS_COMMAND_ID, { resource: this.resource }).then(() => true, error => { + this.onError(error); + return null; + }); } } -export abstract class BaseSaveAllAction extends BaseSaveFileAction { +export abstract class BaseSaveAllAction extends BaseErrorReportingAction { private toDispose: IDisposable[]; private lastIsDirty: boolean; @@ -1440,6 +1348,13 @@ export abstract class BaseSaveAllAction extends BaseSaveFileAction { } } + public run(context?: any): TPromise { + return this.doRun(context).then(() => true, error => { + this.onError(error); + return null; + }); + } + protected doRun(context: any): TPromise { const stacks = this.editorGroupService.getStacksModel(); diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index 9a255fb5d0c..f7525924315 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -13,13 +13,13 @@ import * as labels from 'vs/base/common/labels'; import * as resources from 'vs/base/common/resources'; import URI from 'vs/base/common/uri'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { toResource, IEditorContext } from 'vs/workbench/common/editor'; +import { toResource, IEditorContext, EditorFocusedInOpenEditorsContext, UntitledEditorNotFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext } from 'vs/workbench/common/editor'; import { IWindowsService } from 'vs/platform/windows/common/windows'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ExplorerViewlet } from 'vs/workbench/parts/files/electron-browser/explorerViewlet'; -import { VIEWLET_ID, explorerItemToFileResource } from 'vs/workbench/parts/files/common/files'; +import { VIEWLET_ID, explorerItemToFileResource, AutoSaveDisabledContext } from 'vs/workbench/parts/files/common/files'; import { FileStat, OpenEditor } from 'vs/workbench/parts/files/common/explorerModel'; import errors = require('vs/base/common/errors'); import { ITree } from 'vs/base/parts/tree/browser/tree'; @@ -35,6 +35,12 @@ import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/c import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { isWindows, isMacintosh } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { IResourceInput } from 'vs/platform/editor/common/editor'; +import { IFileService } from 'vs/platform/files/common/files'; +import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IEditorViewState } from 'vs/editor/common/editorCommon'; +import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; // Commands @@ -48,6 +54,13 @@ export const COMPARE_WITH_SAVED_COMMAND_ID = 'workbench.files.command.compareWit export const COMPARE_WITH_SAVED_SCHEMA = 'showModifications'; export const COPY_PATH_COMMAND_ID = 'workbench.command.files.copyPath'; +export const SAVE_FILE_AS_COMMAND_ID = 'workbench.command.files.saveAs'; +export const SAVE_FILE_AS_LABEL = nls.localize('saveAs', "Save As..."); +export const SAVE_FILE_COMMAND_ID = 'workbench.command.files.save'; +export const SAVE_FILE_LABEL = nls.localize('save', "Save"); +export const BASE_SAVE_ONE_FILE_COMMAND_ID = 'workbench.command.files.saveAs'; + + registerFileCommands(); export const openWindowCommand = (accessor: ServicesAccessor, paths: string[], forceNewWindow: boolean) => { @@ -269,6 +282,15 @@ function registerFileCommands(): void { } }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'save', + command: { + id: REVERT_FILE_COMMAND_ID, + title: nls.localize('revert', "Revert File") + }, + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, AutoSaveDisabledContext, UntitledEditorNotFocusedInOpenEditorsContext) + }); + CommandsRegistry.registerCommand({ id: OPEN_TO_SIDE_COMMAND_ID, handler: (accessor, args) => { const editorService = accessor.get(IWorkbenchEditorService); @@ -294,7 +316,8 @@ function registerFileCommands(): void { command: { id: OPEN_TO_SIDE_COMMAND_ID, title: nls.localize('openToSide', "Open to the Side") - } + }, + when: EditorFocusedInOpenEditorsContext }); CommandsRegistry.registerCommand({ @@ -321,11 +344,11 @@ function registerFileCommands(): void { MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: 'compare', - command: { id: COMPARE_WITH_SAVED_COMMAND_ID, title: nls.localize('compareWithSaved', "Compare with Saved") - } + }, + when: EditorFocusedInOpenEditorsContext }); CommandsRegistry.registerCommand({ @@ -348,7 +371,8 @@ function registerFileCommands(): void { command: { id: SELECT_FOR_COMPARE_COMMAND_ID, title: nls.localize('compareSource', "Select for Compare") - } + }, + when: EditorFocusedInOpenEditorsContext }); CommandsRegistry.registerCommand({ @@ -374,7 +398,8 @@ function registerFileCommands(): void { command: { id: COMPARE_RESOURCE_COMMAND_ID, title: nls.localize('compareWithChosen', "Compare With Chosen") - } + }, + when: EditorFocusedInOpenEditorsContext }); CommandsRegistry.registerCommand({ @@ -428,7 +453,8 @@ function registerFileCommands(): void { command: { id: COPY_PATH_COMMAND_ID, title: nls.localize('copyPath', "Copy Path") - } + }, + when: EditorFocusedInOpenEditorsContext }); CommandsRegistry.registerCommand({ @@ -460,6 +486,133 @@ function registerFileCommands(): void { command: { id: REVEAL_IN_EXPLORER_COMMAND_ID, title: isWindows ? nls.localize('revealInWindows', "Reveal in Explorer") : isMacintosh ? nls.localize('revealInMac', "Reveal in Finder") : nls.localize('openContainer', "Open Containing Folder") + }, + when: EditorFocusedInOpenEditorsContext + }); + + CommandsRegistry.registerCommand({ + id: SAVE_FILE_AS_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + const commandService = accessor.get(ICommandService); + return commandService.executeCommand(BASE_SAVE_ONE_FILE_COMMAND_ID, args.resource, true); + } + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'save', + command: { + id: SAVE_FILE_AS_COMMAND_ID, + title: SAVE_FILE_AS_LABEL + }, + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext) + }); + + CommandsRegistry.registerCommand({ + id: SAVE_FILE_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + const commandService = accessor.get(ICommandService); + return commandService.executeCommand(BASE_SAVE_ONE_FILE_COMMAND_ID, args.resource, false); + } + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'save', + command: { + id: SAVE_FILE_AS_COMMAND_ID, + title: SAVE_FILE_LABEL + }, + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext) + }); + + CommandsRegistry.registerCommand({ + id: BASE_SAVE_ONE_FILE_COMMAND_ID, + handler: (accessor, resource: URI, isSaveAs: boolean) => { + const editorService = accessor.get(IWorkbenchEditorService); + const fileService = accessor.get(IFileService); + const untitledEditorService = accessor.get(IUntitledEditorService); + const textFileService = accessor.get(ITextFileService); + const editorGroupService = accessor.get(IEditorGroupService); + + let source: URI; + if (resource) { + source = resource; + } else { + source = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true }); + } + + if (source && (fileService.canHandleResource(source) || source.scheme === 'untitled')) { + + // Save As (or Save untitled with associated path) + if (isSaveAs || source.scheme === 'untitled') { + let encodingOfSource: string; + if (source.scheme === 'untitled') { + encodingOfSource = untitledEditorService.getEncoding(source); + } else if (source.scheme === 'file') { + const textModel = textFileService.models.get(source); + encodingOfSource = textModel && textModel.getEncoding(); // text model can be null e.g. if this is a binary file! + } + + let viewStateOfSource: IEditorViewState; + const activeEditor = editorService.getActiveEditor(); + const editor = getCodeEditor(activeEditor); + if (editor) { + const activeResource = toResource(activeEditor.input, { supportSideBySide: true }); + if (activeResource && (fileService.canHandleResource(activeResource) || source.scheme === 'untitled') && activeResource.toString() === source.toString()) { + viewStateOfSource = editor.saveViewState(); + } + } + + // Special case: an untitled file with associated path gets saved directly unless "saveAs" is true + let savePromise: TPromise; + if (!isSaveAs && source.scheme === 'untitled' && untitledEditorService.hasAssociatedFilePath(source)) { + savePromise = textFileService.save(source).then((result) => { + if (result) { + return URI.file(source.fsPath); + } + + return null; + }); + } + + // Otherwise, really "Save As..." + else { + savePromise = textFileService.saveAs(source); + } + + return savePromise.then((target) => { + if (!target || target.toString() === source.toString()) { + return void 0; // save canceled or same resource used + } + + const replaceWith: IResourceInput = { + resource: target, + encoding: encodingOfSource, + options: { + pinned: true, + viewState: viewStateOfSource + } + }; + + return editorService.replaceEditors([{ + toReplace: { resource: source }, + replaceWith + }]).then(() => true); + }); + } + + // Pin the active editor if we are saving it + if (!resource) { + const editor = editorService.getActiveEditor(); + if (editor) { + editorGroupService.pinEditor(editor.position, editor.input); + } + } + + // Just save + return textFileService.save(source, { force: true /* force a change to the file to trigger external watchers if any */ }); + } + + return TPromise.as(false); } }); } diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index 7af940b21bc..a942a5b3cc5 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -14,8 +14,8 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { Position, IEditorInput } from 'vs/platform/editor/common/editor'; -import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup, EditorFocusedInOpenEditorsContext, GroupFocusedInOpenEditorsContext } from 'vs/workbench/common/editor'; -import { SaveAllAction, SaveAllInGroupAction, SaveFileAction, RevertFileAction, SaveFileAsAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; +import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup, EditorFocusedInOpenEditorsContext, GroupFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext } from 'vs/workbench/common/editor'; +import { SaveAllAction, SaveAllInGroupAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; import { IViewletViewOptions, IViewOptions, ViewsViewletPanel } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { OpenEditorsFocusedContext, ExplorerFocusedContext, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; import { ITextFileService, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; @@ -60,6 +60,7 @@ export class OpenEditorsView extends ViewsViewletPanel { private contributedContextMenu: IMenu; private needsRefresh: boolean; private editorFocusedContext: IContextKey; + private untitledEditorFocusedContext: IContextKey; private groupFocusedContext: IContextKey; constructor( @@ -153,15 +154,19 @@ export class OpenEditorsView extends ViewsViewletPanel { OpenEditorsFocusedContext.bindTo(this.list.contextKeyService); ExplorerFocusedContext.bindTo(this.list.contextKeyService); this.editorFocusedContext = EditorFocusedInOpenEditorsContext.bindTo(this.contextKeyService); + this.untitledEditorFocusedContext = UntitledEditorFocusedInOpenEditorsContext.bindTo(this.contextKeyService); this.groupFocusedContext = GroupFocusedInOpenEditorsContext.bindTo(this.contextKeyService); this.disposables.push(this.list.onContextMenu(e => this.onListContextMenu(e))); this.list.onFocusChange(e => { this.editorFocusedContext.reset(); this.groupFocusedContext.reset(); - if (e.elements.length && e.elements[0] instanceof OpenEditor) { + this.untitledEditorFocusedContext.reset(); + const element = e.elements.length ? e.elements[0] : undefined; + if (element instanceof OpenEditor) { this.editorFocusedContext.set(true); - } else if (e.elements.length) { + this.untitledEditorFocusedContext.set(element.isUntitled()); + } else if (!!element) { this.groupFocusedContext.set(true); } }); @@ -218,7 +223,7 @@ export class OpenEditorsView extends ViewsViewletPanel { @memoize private get actionProvider(): ActionProvider { - return new ActionProvider(this.instantiationService, this.textFileService, this.untitledEditorService); + return new ActionProvider(this.instantiationService, this.textFileService); } private get elements(): (IEditorGroup | OpenEditor)[] { @@ -592,8 +597,7 @@ export class ActionProvider extends ContributableActionProvider { constructor( @IInstantiationService private instantiationService: IInstantiationService, - @ITextFileService private textFileService: ITextFileService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService + @ITextFileService private textFileService: ITextFileService ) { super(); } @@ -607,48 +611,6 @@ export class ActionProvider extends ContributableActionProvider { result.push(this.instantiationService.createInstance(SaveAllInGroupAction, SaveAllInGroupAction.ID, nls.localize('saveAll', "Save All"))); result.push(new Separator()); } - - result.push(this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified"))); - result.push(this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All"))); - } else { - const openEditor = element; - const resource = openEditor.getResource(); - if (resource) { - - if (!openEditor.isUntitled()) { - - // Files: Save / Revert - if (!autoSaveEnabled) { - result.push(new Separator()); - - const saveAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); - saveAction.setResource(resource); - saveAction.enabled = openEditor.isDirty(); - result.push(saveAction); - - const revertAction = this.instantiationService.createInstance(RevertFileAction, RevertFileAction.ID, RevertFileAction.LABEL); - revertAction.setResource(resource); - revertAction.enabled = openEditor.isDirty(); - result.push(revertAction); - } - } - - // Untitled: Save / Save As - if (openEditor.isUntitled()) { - result.push(new Separator()); - - if (this.untitledEditorService.hasAssociatedFilePath(resource)) { - let saveUntitledAction = this.instantiationService.createInstance(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL); - saveUntitledAction.setResource(resource); - result.push(saveUntitledAction); - } - - let saveAsAction = this.instantiationService.createInstance(SaveFileAsAction, SaveFileAsAction.ID, SaveFileAsAction.LABEL); - saveAsAction.setResource(resource); - result.push(saveAsAction); - } - - } } return TPromise.as(result); From 82f73a4957269d95e7632845f047ee2bfbc4bb9d Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 15 Dec 2017 09:44:16 -0800 Subject: [PATCH 331/615] Update mainThreadTerminalService.ts --- .../workbench/api/electron-browser/mainThreadTerminalService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts b/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts index e7b0968d860..53bd5241501 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts @@ -38,7 +38,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape name, executable: shellPath, args: shellArgs, - cwd: cwd, + cwd, waitOnExit, ignoreConfigurationCwd: true, env From 851d231fe94f45cee44f5ddaa0b2a89fa3c8df96 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 15 Dec 2017 09:48:55 -0800 Subject: [PATCH 332/615] Add git debug step commands to skip terminal by default Fixes #38023 --- .../parts/terminal/electron-browser/terminal.contribution.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 90406fa3483..bf0f195784f 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -231,6 +231,9 @@ configurationRegistry.registerConfiguration({ debugActions.RestartAction.ID, debugActions.ContinueAction.ID, debugActions.PauseAction.ID, + debugActions.StepIntoAction.ID, + debugActions.StepOutAction.ID, + debugActions.StepOverAction.ID, OpenNextRecentlyUsedEditorInGroupAction.ID, OpenPreviousRecentlyUsedEditorInGroupAction.ID, FocusFirstGroupAction.ID, From aa6e38762dbf65ec7b289838e494c5c9d10b99e5 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Fri, 15 Dec 2017 11:01:31 -0800 Subject: [PATCH 333/615] Fix #40275 - check enableProposedApi flag for logger API --- src/vs/workbench/api/node/extHost.api.impl.ts | 14 +++++++++++--- .../workbench/api/node/extHostExtensionService.ts | 7 +++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index d64abff5ed6..6ca0cac5d39 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -63,13 +63,21 @@ export interface IExtensionApiFactory { (extension: IExtensionDescription): typeof vscode; } +export function checkProposedApiEnabled(extension: IExtensionDescription): void { + if (!extension.enableProposedApi) { + throwProposedApiError(extension); + } +} + +function throwProposedApiError(extension: IExtensionDescription): never { + throw new Error(`[${extension.id}]: Proposed API is only available when running out of dev or with the following command line switch: --enable-proposed-api ${extension.id}`); +} + function proposedApiFunction(extension: IExtensionDescription, fn: T): T { if (extension.enableProposedApi) { return fn; } else { - return (() => { - throw new Error(`[${extension.id}]: Proposed API is only available when running out of dev or with the following command line switch: --enable-proposed-api ${extension.id}`); - }); + return throwProposedApiError; } } diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 1f0e130df8c..6c64bc0b62d 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -12,7 +12,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/node/extensionDescriptionRegistry'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { ExtHostStorage } from 'vs/workbench/api/node/extHostStorage'; -import { createApiFactory, initializeExtensionApi } from 'vs/workbench/api/node/extHost.api.impl'; +import { createApiFactory, initializeExtensionApi, checkProposedApiEnabled } from 'vs/workbench/api/node/extHost.api.impl'; import { MainContext, MainThreadExtensionServiceShape, IWorkspaceData, IEnvironment, IInitData, ExtHostExtensionServiceShape, MainThreadTelemetryShape, IExtHostContext } from './extHost.protocol'; import { IExtensionMemento, ExtensionsActivator, ActivatedExtension, IExtensionAPI, IExtensionContext, EmptyExtension, IExtensionModule, ExtensionActivationTimesBuilder, ExtensionActivationTimes, ExtensionActivationReason, ExtensionActivatedByEvent } from 'vs/workbench/api/node/extHostExtensionActivator'; import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration'; @@ -344,7 +344,10 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { get extensionPath() { return extensionDescription.extensionFolderPath; }, storagePath: this._storagePath.value(extensionDescription), asAbsolutePath: (relativePath: string) => { return join(extensionDescription.extensionFolderPath, relativePath); }, - get logger() { return that._extHostLogService.getExtLogger(extensionDescription.id); } + get logger() { + checkProposedApiEnabled(extensionDescription); + return that._extHostLogService.getExtLogger(extensionDescription.id); + } }); }); } From 64fec2b40ba2af66e5424f279a37ebe06bc74c4c Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Fri, 15 Dec 2017 11:30:08 -0800 Subject: [PATCH 334/615] Fix #39841 - Fix searching settings contributed by builtin extensions, remove duplicated code --- .../preferences/common/preferencesModels.ts | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/parts/preferences/common/preferencesModels.ts b/src/vs/workbench/parts/preferences/common/preferencesModels.ts index d4ec0090dce..463df86d951 100644 --- a/src/vs/workbench/parts/preferences/common/preferencesModels.ts +++ b/src/vs/workbench/parts/preferences/common/preferencesModels.ts @@ -401,6 +401,10 @@ export class DefaultSettings extends Disposable { return DefaultSettings._RAW; } + getSettingByName(name: string): ISetting { + return this._settingsByName && this._settingsByName.get(name); + } + private getRegisteredGroups(): ISettingsGroup[] { const configurations = Registry.as(Extensions.Configuration).getConfigurations().slice(); return this.removeEmptySettingsGroups(configurations.sort(this.compareConfigurationNodes) @@ -557,7 +561,6 @@ export class DefaultSettings extends Disposable { export class DefaultSettingsEditorModel extends AbstractSettingsModel implements ISettingsEditorModel { private _model: IModel; - private _settingsByName: Map; private _onDidChangeGroups: Emitter = this._register(new Emitter()); readonly onDidChangeGroups: Event = this._onDidChangeGroups.event; @@ -573,8 +576,6 @@ export class DefaultSettingsEditorModel extends AbstractSettingsModel implements this._register(defaultSettings.onDidChange(() => this._onDidChangeGroups.fire())); this._model = reference.object.textEditorModel; this._register(this.onDispose(() => reference.dispose())); - - this.initAllSettingsMap(); } public get uri(): URI { @@ -649,20 +650,9 @@ export class DefaultSettingsEditorModel extends AbstractSettingsModel implements return null; } - private initAllSettingsMap(): void { - this._settingsByName = new Map(); - for (const group of this.settingsGroups) { - for (const section of group.sections) { - for (const setting of section.settings) { - this._settingsByName.set(setting.key, setting); - } - } - } - } - private getMostRelevantSettings(rankedSettingNames: string[]): ISettingsGroup { const settings = rankedSettingNames.map(key => { - const setting = this._settingsByName.get(key); + const setting = this.defaultSettings.getSettingByName(key); if (setting) { return { description: setting.description, From 4913e7f68fbcdfec26822daed0e236d8fbaaae3d Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Fri, 15 Dec 2017 15:25:58 -0800 Subject: [PATCH 335/615] Split emmet abbreviation tests --- .../emmet/src/test/abbreviationAction.test.ts | 468 +----------------- .../src/test/cssAbbreviationAction.test.ts | 301 +++++++++++ .../src/test/wrapWithAbbreviation.test.ts | 190 +++++++ 3 files changed, 493 insertions(+), 466 deletions(-) create mode 100644 extensions/emmet/src/test/cssAbbreviationAction.test.ts create mode 100644 extensions/emmet/src/test/wrapWithAbbreviation.test.ts diff --git a/extensions/emmet/src/test/abbreviationAction.test.ts b/extensions/emmet/src/test/abbreviationAction.test.ts index fdfc373e96f..302fd6f8ce4 100644 --- a/extensions/emmet/src/test/abbreviationAction.test.ts +++ b/extensions/emmet/src/test/abbreviationAction.test.ts @@ -5,51 +5,12 @@ import 'mocha'; import * as assert from 'assert'; -import { Selection, workspace, CompletionList, CancellationTokenSource, Position } from 'vscode'; +import { Selection, workspace, CompletionList, CancellationTokenSource } from 'vscode'; import { withRandomFileEditor, closeAllEditors } from './testUtils'; -import { expandEmmetAbbreviation, wrapWithAbbreviation, wrapIndividualLinesWithAbbreviation } from '../abbreviationActions'; +import { expandEmmetAbbreviation } from '../abbreviationActions'; import { DefaultCompletionItemProvider } from '../defaultCompletionProvider'; const completionProvider = new DefaultCompletionItemProvider(); -const cssContents = ` -.boo { - margin: 20px 10px; - m10 - background-image: url('tryme.png'); - m10 -} - -.boo .hoo { - margin: 10px; - ind -} -`; - -const scssContents = ` -.boo { - margin: 10px; - p10 - .hoo { - p20 - } -} -@include b(alert) { - - margin: 10px; - p30 - - @include b(alert) { - p40 - } -} -.foo { - margin: 10px; - margin: a - .hoo { - color: #000; - } -} -`; const htmlContents = ` @@ -74,53 +35,6 @@ const htmlContents = ` `; -const htmlContentsForWrapTests = ` -

-`; - -const wrapBlockElementExpected = ` - -`; - -const wrapInlineElementExpected = ` - -`; - -const wrapSnippetExpected = ` - -`; - -const wrapMultiLineAbbrExpected = ` - -`; - suite('Tests for Expand Abbreviations (HTML)', () => { teardown(() => { // Reset config and close all editors @@ -367,369 +281,6 @@ suite('Tests for Expand Abbreviations (HTML)', () => { }); -suite('Tests for Expand Abbreviations (CSS)', () => { - teardown(closeAllEditors); - - test('Expand abbreviation (CSS)', () => { - return withRandomFileEditor(cssContents, 'css', (editor, doc) => { - editor.selections = [new Selection(3, 1, 3, 4), new Selection(5, 1, 5, 4)]; - return expandEmmetAbbreviation(null).then(() => { - assert.equal(editor.document.getText(), cssContents.replace(/m10/g, 'margin: 10px;')); - return Promise.resolve(); - }); - }); - }); - - test('Skip when typing property values when there is a property in the next line (CSS)', () => { - const testContent = ` -.foo { - margin: a - margin: 10px; -} - `; - - return withRandomFileEditor(testContent, 'css', (editor, doc) => { - editor.selection = new Selection(2, 10, 2, 10); - return expandEmmetAbbreviation(null).then(() => { - assert.equal(editor.document.getText(), testContent); - const cancelSrc = new CancellationTokenSource(); - const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token); - if (completionPromise) { - assert.equal(1, 2, `Invalid completion at property value`); - } - return Promise.resolve(); - }); - }); - }); - - test('Skip when typing property values when there is a property in the previous line (CSS)', () => { - const testContent = ` -.foo { - margin: 10px; - margin: a -} - `; - - return withRandomFileEditor(testContent, 'css', (editor, doc) => { - editor.selection = new Selection(3, 10, 3, 10); - return expandEmmetAbbreviation(null).then(() => { - assert.equal(editor.document.getText(), testContent); - const cancelSrc = new CancellationTokenSource(); - const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(3, 10), cancelSrc.token); - if (completionPromise) { - assert.equal(1, 2, `Invalid completion at property value`); - } - return Promise.resolve(); - }); - }); - }); - - test('Skip when typing property values when it is the only property in the rule (CSS)', () => { - const testContent = ` -.foo { - margin: a -} - `; - - return withRandomFileEditor(testContent, 'css', (editor, doc) => { - editor.selection = new Selection(2, 10, 2, 10); - return expandEmmetAbbreviation(null).then(() => { - assert.equal(editor.document.getText(), testContent); - const cancelSrc = new CancellationTokenSource(); - const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token); - if (completionPromise) { - assert.equal(1, 2, `Invalid completion at property value`); - } - return Promise.resolve(); - }); - }); - }); - - test('Expand abbreviation in completion list (CSS)', () => { - const abbreviation = 'm10'; - const expandedText = 'margin: 10px;'; - - return withRandomFileEditor(cssContents, 'css', (editor, doc) => { - editor.selection = new Selection(3, 1, 3, 4); - const cancelSrc = new CancellationTokenSource(); - const completionPromise1 = completionProvider.provideCompletionItems(editor.document, new Position(3, 4), cancelSrc.token); - const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(5, 4), cancelSrc.token); - if (!completionPromise1 || !completionPromise2) { - assert.equal(1, 2, `Problem with expanding m10`); - return Promise.resolve(); - } - - const callBack = (completionList: CompletionList) => { - if (!completionList.items || !completionList.items.length) { - assert.equal(1, 2, `Problem with expanding m10`); - return; - } - const emmetCompletionItem = completionList.items[0]; - assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`); - assert.equal((emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`); - assert.equal(emmetCompletionItem.filterText, abbreviation, `FilterText of completion item doesnt match.`); - }; - - return Promise.all([completionPromise1, completionPromise2]).then(([result1, result2]) => { - callBack(result1); - callBack(result2); - return Promise.resolve(); - }); - }); - }); - - test('Expand abbreviation (SCSS)', () => { - return withRandomFileEditor(scssContents, 'scss', (editor, doc) => { - editor.selections = [ - new Selection(3, 4, 3, 4), - new Selection(5, 5, 5, 5), - new Selection(11, 4, 11, 4), - new Selection(14, 5, 14, 5) - ]; - return expandEmmetAbbreviation(null).then(() => { - assert.equal(editor.document.getText(), scssContents.replace(/p(\d\d)/g, 'padding: $1px;')); - return Promise.resolve(); - }); - }); - }); - - test('Expand abbreviation in completion list (SCSS)', () => { - - return withRandomFileEditor(scssContents, 'scss', (editor, doc) => { - editor.selection = new Selection(3, 4, 3, 4); - const cancelSrc = new CancellationTokenSource(); - const completionPromise1 = completionProvider.provideCompletionItems(editor.document, new Position(3, 4), cancelSrc.token); - const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(5, 5), cancelSrc.token); - const completionPromise3 = completionProvider.provideCompletionItems(editor.document, new Position(11, 4), cancelSrc.token); - const completionPromise4 = completionProvider.provideCompletionItems(editor.document, new Position(14, 5), cancelSrc.token); - if (!completionPromise1) { - assert.equal(1, 2, `Problem with expanding padding abbreviations at line 3 col 4`); - } - if (!completionPromise2) { - assert.equal(1, 2, `Problem with expanding padding abbreviations at line 5 col 5`); - } - if (!completionPromise3) { - assert.equal(1, 2, `Problem with expanding padding abbreviations at line 11 col 4`); - } - if (!completionPromise4) { - assert.equal(1, 2, `Problem with expanding padding abbreviations at line 14 col 5`); - } - - if (!completionPromise1 || !completionPromise2 || !completionPromise3 || !completionPromise4) { - return Promise.resolve(); - } - - const callBack = (completionList: CompletionList, abbreviation, expandedText) => { - if (!completionList.items || !completionList.items.length) { - assert.equal(1, 2, `Problem with expanding m10`); - return; - } - const emmetCompletionItem = completionList.items[0]; - assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`); - assert.equal((emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`); - assert.equal(emmetCompletionItem.filterText, abbreviation, `FilterText of completion item doesnt match.`); - }; - - return Promise.all([completionPromise1, completionPromise2, completionPromise3, completionPromise4]).then(([result1, result2, result3, result4]) => { - callBack(result1, 'p10', 'padding: 10px;'); - callBack(result2, 'p20', 'padding: 20px;'); - callBack(result3, 'p30', 'padding: 30px;'); - callBack(result4, 'p40', 'padding: 40px;'); - return Promise.resolve(); - }); - }); - }); - - - test('Invalid locations for abbreviations in scss', () => { - const scssContentsNoExpand = ` -m10 - .boo { - margin: 10px; - .hoo { - background: - } - } - `; - - return withRandomFileEditor(scssContentsNoExpand, 'scss', (editor, doc) => { - editor.selections = [ - new Selection(1, 3, 1, 3), // outside rule - new Selection(5, 15, 5, 15) // in the value part of property value - ]; - return expandEmmetAbbreviation(null).then(() => { - assert.equal(editor.document.getText(), scssContentsNoExpand); - return Promise.resolve(); - }); - }); - }); - - test('Invalid locations for abbreviations in scss in completion list', () => { - const scssContentsNoExpand = ` -m10 - .boo { - margin: 10px; - .hoo { - background: - } - } - `; - - return withRandomFileEditor(scssContentsNoExpand, 'scss', (editor, doc) => { - editor.selection = new Selection(1, 3, 1, 3); // outside rule - const cancelSrc = new CancellationTokenSource(); - let completionPromise = completionProvider.provideCompletionItems(editor.document, editor.selection.active, cancelSrc.token); - if (completionPromise) { - assert.equal(1, 2, `m10 gets expanded in invalid location (outside rule)`); - } - - editor.selection = new Selection(5, 15, 5, 15); // in the value part of property value - completionPromise = completionProvider.provideCompletionItems(editor.document, editor.selection.active, cancelSrc.token); - if (completionPromise) { - return completionPromise.then((completionList: CompletionList) => { - if (completionList && completionList.items && completionList.items.length > 0) { - assert.equal(1, 2, `m10 gets expanded in invalid location (n the value part of property value)`); - } - return Promise.resolve(); - }); - } - return Promise.resolve(); - }); - }); - -}); - - test('Skip when typing property values when there is a nested rule in the next line (SCSS)', () => { - return withRandomFileEditor(scssContents, 'scss', (editor, doc) => { - editor.selection = new Selection(19, 10, 19, 10); - return expandEmmetAbbreviation(null).then(() => { - assert.equal(editor.document.getText(), scssContents); - const cancelSrc = new CancellationTokenSource(); - const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(19, 10), cancelSrc.token); - if (completionPromise) { - assert.equal(1, 2, `Invalid completion at property value`); - } - return Promise.resolve(); - }); - }); -}); - -suite('Tests for Wrap with Abbreviations', () => { - teardown(closeAllEditors); - - const multiCursors = [new Selection(2, 6, 2, 6), new Selection(3, 6, 3, 6)]; - const multiCursorsWithSelection = [new Selection(2, 2, 2, 28), new Selection(3, 2, 3, 33)]; - const multiCursorsWithFullLineSelection = [new Selection(2, 0, 2, 28), new Selection(3, 0, 3, 33)]; - - - test('Wrap with block element using multi cursor', () => { - return testWrapWithAbbreviation(multiCursors, 'div', wrapBlockElementExpected); - }); - - test('Wrap with inline element using multi cursor', () => { - return testWrapWithAbbreviation(multiCursors, 'span', wrapInlineElementExpected); - }); - - test('Wrap with snippet using multi cursor', () => { - return testWrapWithAbbreviation(multiCursors, 'a', wrapSnippetExpected); - }); - - test('Wrap with multi line abbreviation using multi cursor', () => { - return testWrapWithAbbreviation(multiCursors, 'ul>li', wrapMultiLineAbbrExpected); - }); - - test('Wrap with block element using multi cursor selection', () => { - return testWrapWithAbbreviation(multiCursorsWithSelection, 'div', wrapBlockElementExpected); - }); - - test('Wrap with inline element using multi cursor selection', () => { - return testWrapWithAbbreviation(multiCursorsWithSelection, 'span', wrapInlineElementExpected); - }); - - test('Wrap with snippet using multi cursor selection', () => { - return testWrapWithAbbreviation(multiCursorsWithSelection, 'a', wrapSnippetExpected); - }); - - test('Wrap with multi line abbreviation using multi cursor selection', () => { - return testWrapWithAbbreviation(multiCursorsWithSelection, 'ul>li', wrapMultiLineAbbrExpected); - }); - - test('Wrap with block element using multi cursor full line selection', () => { - return testWrapWithAbbreviation(multiCursorsWithFullLineSelection, 'div', wrapBlockElementExpected); - }); - - test('Wrap with inline element using multi cursor full line selection', () => { - return testWrapWithAbbreviation(multiCursorsWithFullLineSelection, 'span', wrapInlineElementExpected); - }); - - test('Wrap with snippet using multi cursor full line selection', () => { - return testWrapWithAbbreviation(multiCursorsWithFullLineSelection, 'a', wrapSnippetExpected); - }); - - test('Wrap with multi line abbreviation using multi cursor full line selection', () => { - return testWrapWithAbbreviation(multiCursorsWithFullLineSelection, 'ul>li', wrapMultiLineAbbrExpected); - }); - - test('Wrap individual lines with abbreviation', () => { - const contents = ` - -`; - const wrapIndividualLinesExpected = ` - -`; - return withRandomFileEditor(contents, 'html', (editor, doc) => { - editor.selections = [new Selection(2, 2, 3, 33)]; - const promise = wrapIndividualLinesWithAbbreviation({ abbreviation: 'ul>li.hello$*' }); - if (!promise) { - assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned udnefined.'); - return Promise.resolve(); - } - return promise.then(() => { - assert.equal(editor.document.getText(), wrapIndividualLinesExpected); - return Promise.resolve(); - }); - }); - }); - - test('Wrap individual lines with abbreviation and trim', () => { - const contents = ` - - `; - const wrapIndividualLinesExpected = ` - - `; - return withRandomFileEditor(contents, 'html', (editor, doc) => { - editor.selections = [new Selection(2, 3, 3, 16)]; - const promise = wrapIndividualLinesWithAbbreviation({ abbreviation: 'ul>li.hello$*|t' }); - if (!promise) { - assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned udnefined.'); - return Promise.resolve(); - } - - return promise.then(() => { - assert.equal(editor.document.getText(), wrapIndividualLinesExpected); - return Promise.resolve(); - }); - }); - }); -}); - suite('Tests for jsx, xml and xsl', () => { teardown(closeAllEditors); @@ -819,18 +370,3 @@ function testHtmlCompletionProvider(selection: Selection, abbreviation: string, }); } -function testWrapWithAbbreviation(selections: Selection[], abbreviation: string, expectedContents: string): Thenable { - return withRandomFileEditor(htmlContentsForWrapTests, 'html', (editor, doc) => { - editor.selections = selections; - const promise = wrapWithAbbreviation({ abbreviation }); - if (!promise) { - assert.equal(1, 2, 'Wrap with Abbreviation returned udnefined.'); - return Promise.resolve(); - } - - return promise.then(() => { - assert.equal(editor.document.getText(), expectedContents); - return Promise.resolve(); - }); - }); -} diff --git a/extensions/emmet/src/test/cssAbbreviationAction.test.ts b/extensions/emmet/src/test/cssAbbreviationAction.test.ts new file mode 100644 index 00000000000..00b205c682a --- /dev/null +++ b/extensions/emmet/src/test/cssAbbreviationAction.test.ts @@ -0,0 +1,301 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import 'mocha'; +import * as assert from 'assert'; +import { Selection, CompletionList, CancellationTokenSource, Position } from 'vscode'; +import { withRandomFileEditor, closeAllEditors } from './testUtils'; +import { expandEmmetAbbreviation } from '../abbreviationActions'; +import { DefaultCompletionItemProvider } from '../defaultCompletionProvider'; + +const completionProvider = new DefaultCompletionItemProvider(); +const cssContents = ` +.boo { + margin: 20px 10px; + m10 + background-image: url('tryme.png'); + m10 +} + +.boo .hoo { + margin: 10px; + ind +} +`; + +const scssContents = ` +.boo { + margin: 10px; + p10 + .hoo { + p20 + } +} +@include b(alert) { + + margin: 10px; + p30 + + @include b(alert) { + p40 + } +} +.foo { + margin: 10px; + margin: a + .hoo { + color: #000; + } +} +`; + + +suite('Tests for Expand Abbreviations (CSS)', () => { + teardown(closeAllEditors); + + test('Expand abbreviation (CSS)', () => { + return withRandomFileEditor(cssContents, 'css', (editor, doc) => { + editor.selections = [new Selection(3, 1, 3, 4), new Selection(5, 1, 5, 4)]; + return expandEmmetAbbreviation(null).then(() => { + assert.equal(editor.document.getText(), cssContents.replace(/m10/g, 'margin: 10px;')); + return Promise.resolve(); + }); + }); + }); + + test('Skip when typing property values when there is a property in the next line (CSS)', () => { + const testContent = ` +.foo { + margin: a + margin: 10px; +} + `; + + return withRandomFileEditor(testContent, 'css', (editor, doc) => { + editor.selection = new Selection(2, 10, 2, 10); + return expandEmmetAbbreviation(null).then(() => { + assert.equal(editor.document.getText(), testContent); + const cancelSrc = new CancellationTokenSource(); + const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token); + if (completionPromise) { + assert.equal(1, 2, `Invalid completion at property value`); + } + return Promise.resolve(); + }); + }); + }); + + test('Skip when typing property values when there is a property in the previous line (CSS)', () => { + const testContent = ` +.foo { + margin: 10px; + margin: a +} + `; + + return withRandomFileEditor(testContent, 'css', (editor, doc) => { + editor.selection = new Selection(3, 10, 3, 10); + return expandEmmetAbbreviation(null).then(() => { + assert.equal(editor.document.getText(), testContent); + const cancelSrc = new CancellationTokenSource(); + const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(3, 10), cancelSrc.token); + if (completionPromise) { + assert.equal(1, 2, `Invalid completion at property value`); + } + return Promise.resolve(); + }); + }); + }); + + test('Skip when typing property values when it is the only property in the rule (CSS)', () => { + const testContent = ` +.foo { + margin: a +} + `; + + return withRandomFileEditor(testContent, 'css', (editor, doc) => { + editor.selection = new Selection(2, 10, 2, 10); + return expandEmmetAbbreviation(null).then(() => { + assert.equal(editor.document.getText(), testContent); + const cancelSrc = new CancellationTokenSource(); + const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token); + if (completionPromise) { + assert.equal(1, 2, `Invalid completion at property value`); + } + return Promise.resolve(); + }); + }); + }); + + test('Expand abbreviation in completion list (CSS)', () => { + const abbreviation = 'm10'; + const expandedText = 'margin: 10px;'; + + return withRandomFileEditor(cssContents, 'css', (editor, doc) => { + editor.selection = new Selection(3, 1, 3, 4); + const cancelSrc = new CancellationTokenSource(); + const completionPromise1 = completionProvider.provideCompletionItems(editor.document, new Position(3, 4), cancelSrc.token); + const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(5, 4), cancelSrc.token); + if (!completionPromise1 || !completionPromise2) { + assert.equal(1, 2, `Problem with expanding m10`); + return Promise.resolve(); + } + + const callBack = (completionList: CompletionList) => { + if (!completionList.items || !completionList.items.length) { + assert.equal(1, 2, `Problem with expanding m10`); + return; + } + const emmetCompletionItem = completionList.items[0]; + assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`); + assert.equal((emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`); + assert.equal(emmetCompletionItem.filterText, abbreviation, `FilterText of completion item doesnt match.`); + }; + + return Promise.all([completionPromise1, completionPromise2]).then(([result1, result2]) => { + callBack(result1); + callBack(result2); + return Promise.resolve(); + }); + }); + }); + + test('Expand abbreviation (SCSS)', () => { + return withRandomFileEditor(scssContents, 'scss', (editor, doc) => { + editor.selections = [ + new Selection(3, 4, 3, 4), + new Selection(5, 5, 5, 5), + new Selection(11, 4, 11, 4), + new Selection(14, 5, 14, 5) + ]; + return expandEmmetAbbreviation(null).then(() => { + assert.equal(editor.document.getText(), scssContents.replace(/p(\d\d)/g, 'padding: $1px;')); + return Promise.resolve(); + }); + }); + }); + + test('Expand abbreviation in completion list (SCSS)', () => { + + return withRandomFileEditor(scssContents, 'scss', (editor, doc) => { + editor.selection = new Selection(3, 4, 3, 4); + const cancelSrc = new CancellationTokenSource(); + const completionPromise1 = completionProvider.provideCompletionItems(editor.document, new Position(3, 4), cancelSrc.token); + const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(5, 5), cancelSrc.token); + const completionPromise3 = completionProvider.provideCompletionItems(editor.document, new Position(11, 4), cancelSrc.token); + const completionPromise4 = completionProvider.provideCompletionItems(editor.document, new Position(14, 5), cancelSrc.token); + if (!completionPromise1) { + assert.equal(1, 2, `Problem with expanding padding abbreviations at line 3 col 4`); + } + if (!completionPromise2) { + assert.equal(1, 2, `Problem with expanding padding abbreviations at line 5 col 5`); + } + if (!completionPromise3) { + assert.equal(1, 2, `Problem with expanding padding abbreviations at line 11 col 4`); + } + if (!completionPromise4) { + assert.equal(1, 2, `Problem with expanding padding abbreviations at line 14 col 5`); + } + + if (!completionPromise1 || !completionPromise2 || !completionPromise3 || !completionPromise4) { + return Promise.resolve(); + } + + const callBack = (completionList: CompletionList, abbreviation, expandedText) => { + if (!completionList.items || !completionList.items.length) { + assert.equal(1, 2, `Problem with expanding m10`); + return; + } + const emmetCompletionItem = completionList.items[0]; + assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`); + assert.equal((emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`); + assert.equal(emmetCompletionItem.filterText, abbreviation, `FilterText of completion item doesnt match.`); + }; + + return Promise.all([completionPromise1, completionPromise2, completionPromise3, completionPromise4]).then(([result1, result2, result3, result4]) => { + callBack(result1, 'p10', 'padding: 10px;'); + callBack(result2, 'p20', 'padding: 20px;'); + callBack(result3, 'p30', 'padding: 30px;'); + callBack(result4, 'p40', 'padding: 40px;'); + return Promise.resolve(); + }); + }); + }); + + + test('Invalid locations for abbreviations in scss', () => { + const scssContentsNoExpand = ` +m10 + .boo { + margin: 10px; + .hoo { + background: + } + } + `; + + return withRandomFileEditor(scssContentsNoExpand, 'scss', (editor, doc) => { + editor.selections = [ + new Selection(1, 3, 1, 3), // outside rule + new Selection(5, 15, 5, 15) // in the value part of property value + ]; + return expandEmmetAbbreviation(null).then(() => { + assert.equal(editor.document.getText(), scssContentsNoExpand); + return Promise.resolve(); + }); + }); + }); + + test('Invalid locations for abbreviations in scss in completion list', () => { + const scssContentsNoExpand = ` +m10 + .boo { + margin: 10px; + .hoo { + background: + } + } + `; + + return withRandomFileEditor(scssContentsNoExpand, 'scss', (editor, doc) => { + editor.selection = new Selection(1, 3, 1, 3); // outside rule + const cancelSrc = new CancellationTokenSource(); + let completionPromise = completionProvider.provideCompletionItems(editor.document, editor.selection.active, cancelSrc.token); + if (completionPromise) { + assert.equal(1, 2, `m10 gets expanded in invalid location (outside rule)`); + } + + editor.selection = new Selection(5, 15, 5, 15); // in the value part of property value + completionPromise = completionProvider.provideCompletionItems(editor.document, editor.selection.active, cancelSrc.token); + if (completionPromise) { + return completionPromise.then((completionList: CompletionList) => { + if (completionList && completionList.items && completionList.items.length > 0) { + assert.equal(1, 2, `m10 gets expanded in invalid location (n the value part of property value)`); + } + return Promise.resolve(); + }); + } + return Promise.resolve(); + }); + }); + +}); + + test('Skip when typing property values when there is a nested rule in the next line (SCSS)', () => { + return withRandomFileEditor(scssContents, 'scss', (editor, doc) => { + editor.selection = new Selection(19, 10, 19, 10); + return expandEmmetAbbreviation(null).then(() => { + assert.equal(editor.document.getText(), scssContents); + const cancelSrc = new CancellationTokenSource(); + const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(19, 10), cancelSrc.token); + if (completionPromise) { + assert.equal(1, 2, `Invalid completion at property value`); + } + return Promise.resolve(); + }); + }); +}); + diff --git a/extensions/emmet/src/test/wrapWithAbbreviation.test.ts b/extensions/emmet/src/test/wrapWithAbbreviation.test.ts new file mode 100644 index 00000000000..364861d98bd --- /dev/null +++ b/extensions/emmet/src/test/wrapWithAbbreviation.test.ts @@ -0,0 +1,190 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import 'mocha'; +import * as assert from 'assert'; +import { Selection } from 'vscode'; +import { withRandomFileEditor, closeAllEditors } from './testUtils'; +import { wrapWithAbbreviation, wrapIndividualLinesWithAbbreviation } from '../abbreviationActions'; + +const htmlContentsForWrapTests = ` + +`; + +const wrapBlockElementExpected = ` + +`; + +const wrapInlineElementExpected = ` + +`; + +const wrapSnippetExpected = ` + +`; + +const wrapMultiLineAbbrExpected = ` + +`; + +suite('Tests for Wrap with Abbreviations', () => { + teardown(closeAllEditors); + + const multiCursors = [new Selection(2, 6, 2, 6), new Selection(3, 6, 3, 6)]; + const multiCursorsWithSelection = [new Selection(2, 2, 2, 28), new Selection(3, 2, 3, 33)]; + const multiCursorsWithFullLineSelection = [new Selection(2, 0, 2, 28), new Selection(3, 0, 3, 33)]; + + + test('Wrap with block element using multi cursor', () => { + return testWrapWithAbbreviation(multiCursors, 'div', wrapBlockElementExpected); + }); + + test('Wrap with inline element using multi cursor', () => { + return testWrapWithAbbreviation(multiCursors, 'span', wrapInlineElementExpected); + }); + + test('Wrap with snippet using multi cursor', () => { + return testWrapWithAbbreviation(multiCursors, 'a', wrapSnippetExpected); + }); + + test('Wrap with multi line abbreviation using multi cursor', () => { + return testWrapWithAbbreviation(multiCursors, 'ul>li', wrapMultiLineAbbrExpected); + }); + + test('Wrap with block element using multi cursor selection', () => { + return testWrapWithAbbreviation(multiCursorsWithSelection, 'div', wrapBlockElementExpected); + }); + + test('Wrap with inline element using multi cursor selection', () => { + return testWrapWithAbbreviation(multiCursorsWithSelection, 'span', wrapInlineElementExpected); + }); + + test('Wrap with snippet using multi cursor selection', () => { + return testWrapWithAbbreviation(multiCursorsWithSelection, 'a', wrapSnippetExpected); + }); + + test('Wrap with multi line abbreviation using multi cursor selection', () => { + return testWrapWithAbbreviation(multiCursorsWithSelection, 'ul>li', wrapMultiLineAbbrExpected); + }); + + test('Wrap with block element using multi cursor full line selection', () => { + return testWrapWithAbbreviation(multiCursorsWithFullLineSelection, 'div', wrapBlockElementExpected); + }); + + test('Wrap with inline element using multi cursor full line selection', () => { + return testWrapWithAbbreviation(multiCursorsWithFullLineSelection, 'span', wrapInlineElementExpected); + }); + + test('Wrap with snippet using multi cursor full line selection', () => { + return testWrapWithAbbreviation(multiCursorsWithFullLineSelection, 'a', wrapSnippetExpected); + }); + + test('Wrap with multi line abbreviation using multi cursor full line selection', () => { + return testWrapWithAbbreviation(multiCursorsWithFullLineSelection, 'ul>li', wrapMultiLineAbbrExpected); + }); + + test('Wrap individual lines with abbreviation', () => { + const contents = ` + +`; + const wrapIndividualLinesExpected = ` + +`; + return withRandomFileEditor(contents, 'html', (editor, doc) => { + editor.selections = [new Selection(2, 2, 3, 33)]; + const promise = wrapIndividualLinesWithAbbreviation({ abbreviation: 'ul>li.hello$*' }); + if (!promise) { + assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned udnefined.'); + return Promise.resolve(); + } + return promise.then(() => { + assert.equal(editor.document.getText(), wrapIndividualLinesExpected); + return Promise.resolve(); + }); + }); + }); + + test('Wrap individual lines with abbreviation and trim', () => { + const contents = ` + + `; + const wrapIndividualLinesExpected = ` + + `; + return withRandomFileEditor(contents, 'html', (editor, doc) => { + editor.selections = [new Selection(2, 3, 3, 16)]; + const promise = wrapIndividualLinesWithAbbreviation({ abbreviation: 'ul>li.hello$*|t' }); + if (!promise) { + assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned udnefined.'); + return Promise.resolve(); + } + + return promise.then(() => { + assert.equal(editor.document.getText(), wrapIndividualLinesExpected); + return Promise.resolve(); + }); + }); + }); +}); + + +function testWrapWithAbbreviation(selections: Selection[], abbreviation: string, expectedContents: string): Thenable { + return withRandomFileEditor(htmlContentsForWrapTests, 'html', (editor, doc) => { + editor.selections = selections; + const promise = wrapWithAbbreviation({ abbreviation }); + if (!promise) { + assert.equal(1, 2, 'Wrap with Abbreviation returned udnefined.'); + return Promise.resolve(); + } + + return promise.then(() => { + assert.equal(editor.document.getText(), expectedContents); + return Promise.resolve(); + }); + }); +} From d3decc7eeff9e1cbf84e1c175afa8ab458403280 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 15 Dec 2017 16:15:38 -0800 Subject: [PATCH 336/615] Support isRecommended property for TS completion items Fixes #40325 --- .../typescript/src/features/completionItemProvider.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index fb8fd36867d..0b2ee92783d 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -31,7 +31,11 @@ class MyCompletionItem extends CompletionItem { ) { super(entry.name); this.source = entry.source; - this.sortText = entry.sortText; + + // Make sure isRecommended property always comes first + // https://github.com/Microsoft/vscode/issues/40325 + this.sortText = entry.isRecommended ? '\0' : entry.sortText; + this.kind = MyCompletionItem.convertKind(entry.kind); this.position = position; this.commitCharacters = MyCompletionItem.getCommitCharacters(enableDotCompletions, !useCodeSnippetsOnMethodSuggest, entry.kind); From ac459c22cb6620d7b2f881f03430bc14e404dc97 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 15 Dec 2017 16:58:49 -0800 Subject: [PATCH 337/615] Defer TS completion item resolve of range --- .../src/features/completionItemProvider.ts | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index 0b2ee92783d..f0b25725306 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -22,6 +22,7 @@ let localize = nls.loadMessageBundle(); class MyCompletionItem extends CompletionItem { public readonly source: string | undefined; + constructor( public readonly position: Position, public readonly document: TextDocument, @@ -41,18 +42,19 @@ class MyCompletionItem extends CompletionItem { this.commitCharacters = MyCompletionItem.getCommitCharacters(enableDotCompletions, !useCodeSnippetsOnMethodSuggest, entry.kind); if (entry.replacementSpan) { - let span: protocol.TextSpan = entry.replacementSpan; - // The indexing for the range returned by the server uses 1-based indexing. - // We convert to 0-based indexing. - this.textEdit = TextEdit.replace(tsTextSpanToVsRange(span), entry.name); - } else { + this.range = tsTextSpanToVsRange(entry.replacementSpan); + } + } + + public resolve(): void { + if (!this.range) { // Try getting longer, prefix based range for completions that span words - const wordRange = document.getWordRangeAtPosition(position); - const text = document.getText(new Range(position.line, Math.max(0, position.character - entry.name.length), position.line, position.character)).toLowerCase(); - const entryName = entry.name.toLowerCase(); + const wordRange = this.document.getWordRangeAtPosition(this.position); + const text = this.document.getText(new Range(this.position.line, Math.max(0, this.position.character - this.label.length), this.position.line, this.position.character)).toLowerCase(); + const entryName = this.label.toLowerCase(); for (let i = entryName.length; i >= 0; --i) { - if (text.endsWith(entryName.substr(0, i)) && (!wordRange || wordRange.start.character > position.character - i)) { - this.range = new Range(position.line, Math.max(0, position.character - i), position.line, position.character); + if (text.endsWith(entryName.substr(0, i)) && (!wordRange || wordRange.start.character > this.position.character - i)) { + this.range = new Range(this.position.line, Math.max(0, this.position.character - i), this.position.line, this.position.character); break; } } @@ -185,7 +187,6 @@ namespace Configuration { export const nameSuggestions = 'nameSuggestions'; export const quickSuggestionsForPaths = 'quickSuggestionsForPaths'; export const autoImportSuggestions = 'autoImportSuggestions.enabled'; - } export default class TypeScriptCompletionItemProvider implements CompletionItemProvider { @@ -314,10 +315,14 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP return null; } + const filepath = this.client.normalizePath(item.document.uri); if (!filepath) { return null; } + + item.resolve(); + const args: CompletionDetailsRequestArgs = { ...vsPositionToTsFileLocation(filepath, item.position), entryNames: [ From a05433ac5650efecfaaa7b00e1e1a224b873c12e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 15 Dec 2017 17:09:05 -0800 Subject: [PATCH 338/615] Clean up useCodeSnippetsOnMethodSuggest --- .../typescript/src/features/completionItemProvider.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index f0b25725306..5f94598c261 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CompletionItem, TextDocument, Position, CompletionItemKind, CompletionItemProvider, CancellationToken, TextEdit, Range, SnippetString, workspace, ProviderResult, CompletionContext, Uri, MarkdownString, window, QuickPickItem } from 'vscode'; +import { CompletionItem, TextDocument, Position, CompletionItemKind, CompletionItemProvider, CancellationToken, Range, SnippetString, workspace, ProviderResult, CompletionContext, Uri, MarkdownString, window, QuickPickItem } from 'vscode'; import { ITypeScriptServiceClient } from '../typescriptService'; import TypingsStatus from '../utils/typingsStatus'; @@ -22,13 +22,14 @@ let localize = nls.loadMessageBundle(); class MyCompletionItem extends CompletionItem { public readonly source: string | undefined; + public readonly useCodeSnippet: boolean; constructor( public readonly position: Position, public readonly document: TextDocument, entry: CompletionEntry, enableDotCompletions: boolean, - public readonly useCodeSnippetsOnMethodSuggest: boolean + useCodeSnippetsOnMethodSuggest: boolean ) { super(entry.name); this.source = entry.source; @@ -40,6 +41,7 @@ class MyCompletionItem extends CompletionItem { this.kind = MyCompletionItem.convertKind(entry.kind); this.position = position; this.commitCharacters = MyCompletionItem.getCommitCharacters(enableDotCompletions, !useCodeSnippetsOnMethodSuggest, entry.kind); + this.useCodeSnippet = useCodeSnippetsOnMethodSuggest && (this.kind === CompletionItemKind.Function || this.kind === CompletionItemKind.Method); if (entry.replacementSpan) { this.range = tsTextSpanToVsRange(entry.replacementSpan); @@ -372,7 +374,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP }; } - if (detail && item.useCodeSnippetsOnMethodSuggest && (item.kind === CompletionItemKind.Function || item.kind === CompletionItemKind.Method)) { + if (detail && item.useCodeSnippet) { return this.isValidFunctionCompletionContext(filepath, item.position).then(shouldCompleteFunction => { if (shouldCompleteFunction) { item.insertText = this.snippetForFunctionCall(detail); From 86a35ac4dd43d8451c67221eb08381e436cc16eb Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 15 Dec 2017 17:22:34 -0800 Subject: [PATCH 339/615] Use async in completionItemProvider resolve --- .../src/features/completionItemProvider.ts | 129 ++++++++++-------- 1 file changed, 69 insertions(+), 60 deletions(-) diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index 5f94598c261..e17afa49dd8 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CompletionItem, TextDocument, Position, CompletionItemKind, CompletionItemProvider, CancellationToken, Range, SnippetString, workspace, ProviderResult, CompletionContext, Uri, MarkdownString, window, QuickPickItem } from 'vscode'; +import { CompletionItem, TextDocument, Position, CompletionItemKind, CompletionItemProvider, CancellationToken, Range, SnippetString, workspace, CompletionContext, Uri, MarkdownString, window, QuickPickItem } from 'vscode'; import { ITypeScriptServiceClient } from '../typescriptService'; import TypingsStatus from '../utils/typingsStatus'; +import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; -import { CompletionEntry, CompletionsRequestArgs, CompletionDetailsRequestArgs, CompletionEntryDetails, CodeAction } from '../protocol'; import * as Previewer from '../utils/previewer'; import { tsTextSpanToVsRange, vsPositionToTsFileLocation } from '../utils/convert'; @@ -18,7 +18,7 @@ import { applyCodeAction } from '../utils/codeAction'; import * as languageModeIds from '../utils/languageModeIds'; import { CommandManager, Command } from '../utils/commandManager'; -let localize = nls.loadMessageBundle(); +const localize = nls.loadMessageBundle(); class MyCompletionItem extends CompletionItem { public readonly source: string | undefined; @@ -27,7 +27,7 @@ class MyCompletionItem extends CompletionItem { constructor( public readonly position: Position, public readonly document: TextDocument, - entry: CompletionEntry, + entry: Proto.CompletionEntry, enableDotCompletions: boolean, useCodeSnippetsOnMethodSuggest: boolean ) { @@ -106,7 +106,11 @@ class MyCompletionItem extends CompletionItem { return CompletionItemKind.Property; } - private static getCommitCharacters(enableDotCompletions: boolean, enableCallCompletions: boolean, kind: string): string[] | undefined { + private static getCommitCharacters( + enableDotCompletions: boolean, + enableCallCompletions: boolean, + kind: string + ): string[] | undefined { switch (kind) { case PConst.Kind.memberGetAccessor: case PConst.Kind.memberSetAccessor: @@ -142,7 +146,7 @@ class ApplyCompletionCodeActionCommand implements Command { private readonly client: ITypeScriptServiceClient ) { } - public async execute(_file: string, codeActions: CodeAction[]): Promise { + public async execute(_file: string, codeActions: Proto.CodeAction[]): Promise { if (codeActions.length === 0) { return true; } @@ -257,7 +261,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP } try { - const args: CompletionsRequestArgs = { + const args: Proto.CompletionsRequestArgs = { ...vsPositionToTsFileLocation(file, position), includeExternalModuleExports: config.autoImportSuggestions }; @@ -312,81 +316,86 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP } } - public resolveCompletionItem(item: CompletionItem, token: CancellationToken): ProviderResult { + public async resolveCompletionItem( + item: CompletionItem, + token: CancellationToken + ): Promise { if (!(item instanceof MyCompletionItem)) { - return null; + return undefined; } - const filepath = this.client.normalizePath(item.document.uri); if (!filepath) { - return null; + return undefined; } item.resolve(); - const args: CompletionDetailsRequestArgs = { + const args: Proto.CompletionDetailsRequestArgs = { ...vsPositionToTsFileLocation(filepath, item.position), entryNames: [ item.source ? { name: item.label, source: item.source } : item.label ] }; - return this.client.execute('completionEntryDetails', args, token).then((response) => { - const details = response.body; - if (!details || !details.length || !details[0]) { - return item; - } - const detail = details[0]; - item.detail = Previewer.plain(detail.displayParts); - const documentation = new MarkdownString(); - if (detail.source) { - let importPath = `'${Previewer.plain(detail.source)}'`; - if (this.client.apiVersion.has260Features() && !this.client.apiVersion.has262Features()) { - // Try to resolve the real import name that will be added - if (detail.codeActions && detail.codeActions[0]) { - const action = detail.codeActions[0]; - if (action.changes[0] && action.changes[0].textChanges[0]) { - const textChange = action.changes[0].textChanges[0]; - const matchedImport = textChange.newText.match(/(['"])(.+?)\1/); - if (matchedImport) { - importPath = matchedImport[0]; - item.detail += ` — from ${matchedImport[0]}`; - } + let response: Proto.CompletionDetailsResponse; + try { + response = await this.client.execute('completionEntryDetails', args, token); + } catch { + return item; + } + + const details = response.body; + if (!details || !details.length || !details[0]) { + return item; + } + const detail = details[0]; + item.detail = Previewer.plain(detail.displayParts); + const documentation = new MarkdownString(); + if (detail.source) { + let importPath = `'${Previewer.plain(detail.source)}'`; + + if (this.client.apiVersion.has260Features() && !this.client.apiVersion.has262Features()) { + // Try to resolve the real import name that will be added + if (detail.codeActions && detail.codeActions[0]) { + const action = detail.codeActions[0]; + if (action.changes[0] && action.changes[0].textChanges[0]) { + const textChange = action.changes[0].textChanges[0]; + const matchedImport = textChange.newText.match(/(['"])(.+?)\1/); + if (matchedImport) { + importPath = matchedImport[0]; + item.detail += ` — from ${matchedImport[0]}`; } } - documentation.appendMarkdown(localize('autoImportLabel', 'Auto import from {0}', importPath)); - } else { - const autoImportLabel = localize('autoImportLabel', 'Auto import from {0}', importPath); - item.detail = `${autoImportLabel}\n${item.detail}`; } - documentation.appendMarkdown('\n\n'); + documentation.appendMarkdown(localize('autoImportLabel', 'Auto import from {0}', importPath)); + } else { + const autoImportLabel = localize('autoImportLabel', 'Auto import from {0}', importPath); + item.detail = `${autoImportLabel}\n${item.detail}`; } + documentation.appendMarkdown('\n\n'); + } - Previewer.addmarkdownDocumentation(documentation, detail.documentation, detail.tags); - item.documentation = documentation; + Previewer.addmarkdownDocumentation(documentation, detail.documentation, detail.tags); + item.documentation = documentation; - if (detail.codeActions && detail.codeActions.length) { - item.command = { - title: '', - command: ApplyCompletionCodeActionCommand.ID, - arguments: [filepath, detail.codeActions] - }; + if (detail.codeActions && detail.codeActions.length) { + item.command = { + title: '', + command: ApplyCompletionCodeActionCommand.ID, + arguments: [filepath, detail.codeActions] + }; + } + + if (detail && item.useCodeSnippet) { + const shouldCompleteFunction = await this.isValidFunctionCompletionContext(filepath, item.position); + if (shouldCompleteFunction) { + item.insertText = this.snippetForFunctionCall(detail); } - - if (detail && item.useCodeSnippet) { - return this.isValidFunctionCompletionContext(filepath, item.position).then(shouldCompleteFunction => { - if (shouldCompleteFunction) { - item.insertText = this.snippetForFunctionCall(detail); - } - return item; - }); - } - return item; - }, () => { - return item; - }); + } + + return item; } private async isValidFunctionCompletionContext(filepath: string, position: Position): Promise { @@ -409,7 +418,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP } } - private snippetForFunctionCall(detail: CompletionEntryDetails): SnippetString { + private snippetForFunctionCall(detail: Proto.CompletionEntryDetails): SnippetString { let hasOptionalParameters = false; let hasAddedParameters = false; From 4c00fcdbc66513a483d597a230c3a2cf6454ecf7 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 15 Dec 2017 17:23:25 -0800 Subject: [PATCH 340/615] Use consistent casing --- extensions/typescript/src/features/completionItemProvider.ts | 2 +- extensions/typescript/src/utils/previewer.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index e17afa49dd8..7e6f22e9d39 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -376,7 +376,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP documentation.appendMarkdown('\n\n'); } - Previewer.addmarkdownDocumentation(documentation, detail.documentation, detail.tags); + Previewer.addMarkdownDocumentation(documentation, detail.documentation, detail.tags); item.documentation = documentation; if (detail.codeActions && detail.codeActions.length) { diff --git a/extensions/typescript/src/utils/previewer.ts b/extensions/typescript/src/utils/previewer.ts index 4625a18a0a2..3e2e691cb30 100644 --- a/extensions/typescript/src/utils/previewer.ts +++ b/extensions/typescript/src/utils/previewer.ts @@ -49,11 +49,11 @@ export function markdownDocumentation( tags: Proto.JSDocTagInfo[] ): MarkdownString { const out = new MarkdownString(); - addmarkdownDocumentation(out, documentation, tags); + addMarkdownDocumentation(out, documentation, tags); return out; } -export function addmarkdownDocumentation( +export function addMarkdownDocumentation( out: MarkdownString, documentation: Proto.SymbolDisplayPart[], tags: Proto.JSDocTagInfo[] From 6c8f9d8a8cb6dbedfffae8bfa689d55eadb93bdf Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sat, 16 Dec 2017 19:09:13 -0800 Subject: [PATCH 341/615] Fix #40046 --- .../electron-browser/preferencesSearch.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts b/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts index 149102c0a87..454c0ba49ab 100644 --- a/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts +++ b/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts @@ -99,12 +99,14 @@ export class PreferencesSearchModel implements IPreferencesSearchModel { return this._remoteProvider.filterPreferences(preferencesModel).then(null, err => { const message = errors.getErrorMessage(err); - /* __GDPR__ - "defaultSettings.searchError" : { - "message": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('defaultSettings.searchError', { message }); + if (message.toLowerCase() !== 'canceled') { + /* __GDPR__ + "defaultSettings.searchError" : { + "message": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ + this.telemetryService.publicLog('defaultSettings.searchError', { message }); + } return this._localProvider.filterPreferences(preferencesModel); }); From 5bd5e07cd56d98db502411fb27fba76f2d74aa20 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Sat, 16 Dec 2017 19:35:11 -0800 Subject: [PATCH 342/615] Use empty object when tokenColorCustomizations setting is null Fixes #40339 --- .../services/themes/electron-browser/workbenchThemeService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index 4518ccc5c3a..6db3a90b95f 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -87,7 +87,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { } private get tokenColorCustomizations(): ITokenColorCustomizations { - return this.configurationService.getValue(CUSTOM_EDITOR_COLORS_SETTING); + return this.configurationService.getValue(CUSTOM_EDITOR_COLORS_SETTING) || {}; } constructor( From 7675229c4c537627ba80bb6890fa2860d5f32429 Mon Sep 17 00:00:00 2001 From: Naveen Kumar Date: Sun, 17 Dec 2017 13:28:03 +0530 Subject: [PATCH 343/615] Fixes tests for line/column in terminal Fixes #34193 --- .../terminal/electron-browser/terminalLinkHandler.ts | 2 +- .../test/electron-browser/terminalLinkHandler.test.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts index b34fb730079..6e37ea27a74 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts @@ -41,7 +41,7 @@ const lineAndColumnClause = [ // Changing any regex may effect this value, hence changes this as well if required. const winLineAndColumnMatchIndex = 12; -const unixLineAndColumnMatchIndex = 23; +const unixLineAndColumnMatchIndex = 11; // Each line and column clause have 6 groups (ie no. of expressions in round brackets) const lineAndColumnClauseGroupCount = 6; diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts index a16322808aa..906b59e3037 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts @@ -134,10 +134,10 @@ suite('Workbench - TerminalLinkHandler', () => { const supportedLinkFormats: LinkFormatInfo[] = [ { urlFormat: '{0}' }, - // { urlFormat: '{0} on line {1}', line: '5' }, - // { urlFormat: '{0} on line {1}, column {2}', line: '5', column: '3' }, - // { urlFormat: '{0}:line {1}', line: '5' }, - // { urlFormat: '{0}:line {1}, column {2}', line: '5', column: '3' }, + { urlFormat: '{0} on line {1}', line: '5' }, + { urlFormat: '{0} on line {1}, column {2}', line: '5', column: '3' }, + { urlFormat: '{0}:line {1}', line: '5' }, + { urlFormat: '{0}:line {1}, column {2}', line: '5', column: '3' }, { urlFormat: '{0}({1})', line: '5' }, { urlFormat: '{0} ({1})', line: '5' }, { urlFormat: '{0}({1},{2})', line: '5', column: '3' }, From 9fe1a517b25556c312fb081945315e554db6e6ea Mon Sep 17 00:00:00 2001 From: keringar Date: Sun, 17 Dec 2017 10:59:31 -0800 Subject: [PATCH 344/615] Update editor.lineNumbers description --- src/vs/editor/common/config/commonEditorConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 15929affb6b..7bf275a9b80 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -211,7 +211,7 @@ const editorConfiguration: IConfigurationNode = { nls.localize('lineNumbers.interval', "Line numbers are rendered every 10 lines.") ], 'default': 'on', - 'description': nls.localize('lineNumbers', "Controls the display of line numbers. Possible values are 'on', 'off', and 'relative'.") + 'description': nls.localize('lineNumbers', "Controls the display of line numbers. Possible values are 'on', 'off', 'relative' and 'interval'.") }, 'editor.rulers': { 'type': 'array', From a5b60ac9fd4b2ecd3c9b1d6962a22f35c9c65d53 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Sun, 17 Dec 2017 23:00:17 +0100 Subject: [PATCH 345/615] node-debug@1.20.1 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 98c32784879..96087450c62 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -45,7 +45,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.20.0' }, + { name: 'ms-vscode.node-debug', version: '1.20.1' }, { name: 'ms-vscode.node-debug2', version: '1.19.4' } ]; From e7dfec776791e5e7d953e353985aa84c2df475da Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sun, 17 Dec 2017 21:10:03 -0800 Subject: [PATCH 346/615] Fix #39609 - search viewlet should use global search buffer --- .../parts/search/browser/searchViewlet.ts | 4 ++- .../parts/search/browser/searchWidget.ts | 28 +++++++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 1fcb5e60400..39b5ef4ff27 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -672,15 +672,17 @@ export class SearchViewlet extends Viewlet { public focus(): void { super.focus(); + let updatedText = false; const seedSearchStringFromSelection = this.configurationService.getValue('editor').find.seedSearchStringFromSelection; if (seedSearchStringFromSelection) { const selectedText = this.getSearchTextFromEditor(); if (selectedText) { this.searchWidget.searchInput.setValue(selectedText); + updatedText = true; } } - this.searchWidget.focus(); + this.searchWidget.focus(undefined, undefined, updatedText); } public focusNextInputBox(): void { diff --git a/src/vs/workbench/parts/search/browser/searchWidget.ts b/src/vs/workbench/parts/search/browser/searchWidget.ts index 1231f3f464c..7536317df8a 100644 --- a/src/vs/workbench/parts/search/browser/searchWidget.ts +++ b/src/vs/workbench/parts/search/browser/searchWidget.ts @@ -29,6 +29,9 @@ import { attachInputBoxStyler, attachFindInputBoxStyler, attachButtonStyler } fr import { IThemeService } from 'vs/platform/theme/common/themeService'; import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; import { CONTEXT_FIND_WIDGET_NOT_VISIBLE } from 'vs/editor/contrib/find/findModel'; +import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; export interface ISearchWidgetOptions { value?: string; @@ -92,6 +95,8 @@ export class SearchWidget extends Widget { private replaceActionBar: ActionBar; private searchHistory: HistoryNavigator; + private ignoreGlobalFindBufferOnNextFocus = false; + private previousGlobalFindBufferValue: string; private _onSearchSubmit = this._register(new Emitter()); public onSearchSubmit: Event = this._onSearchSubmit.event; @@ -118,6 +123,8 @@ export class SearchWidget extends Widget { @IThemeService private themeService: IThemeService, @IContextKeyService private keyBindingService: IContextKeyService, @IKeybindingService private keyBindingService2: IKeybindingService, + @IClipboardService private clipboardServce: IClipboardService, + @IConfigurationService private configurationService: IConfigurationService ) { super(); this.searchHistory = new HistoryNavigator(options.history); @@ -127,7 +134,9 @@ export class SearchWidget extends Widget { this.render(container, options); } - public focus(select: boolean = true, focusReplace: boolean = false): void { + public focus(select: boolean = true, focusReplace: boolean = false, suppressGlobalSearchBuffer = false): void { + this.ignoreGlobalFindBufferOnNextFocus = suppressGlobalSearchBuffer; + if (focusReplace && this.isReplaceShown()) { this.replaceInput.focus(); if (select) { @@ -241,7 +250,22 @@ export class SearchWidget extends Widget { })); this.searchInputFocusTracker = this._register(dom.trackFocus(this.searchInput.inputBox.inputElement)); - this._register(this.searchInputFocusTracker.onDidFocus(() => this.searchInputBoxFocused.set(true))); + this._register(this.searchInputFocusTracker.onDidFocus(() => { + this.searchInputBoxFocused.set(true); + + const useGlobalFindBuffer = this.configurationService.getValue('editor').find.globalFindClipboard; + if (!this.ignoreGlobalFindBufferOnNextFocus && useGlobalFindBuffer) { + const globalBufferText = this.clipboardServce.readFindText(); + if (this.previousGlobalFindBufferValue !== globalBufferText) { + this.searchInput.setValue(globalBufferText); + this.searchInput.select(); + } + + this.previousGlobalFindBufferValue = globalBufferText; + } + + this.ignoreGlobalFindBufferOnNextFocus = false; + })); this._register(this.searchInputFocusTracker.onDidBlur(() => this.searchInputBoxFocused.set(false))); } From 497229f0e768404ca99b7fd50f30a3133975727b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 18 Dec 2017 07:53:20 +0100 Subject: [PATCH 347/615] admin - do not show warning on windows for now --- src/vs/workbench/electron-browser/window.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index 4919828d54f..af6824b61a3 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -338,13 +338,9 @@ export class ElectronWindow extends Themable { // Update title this.titleService.updateProperties({ isAdmin }); - // Show warning message - if (isAdmin) { - if (isWindows) { - this.messageService.show(Severity.Warning, nls.localize('runningAsAdmin', "It is not recommended to run {0} as Administrator.", product.nameShort)); - } else { - this.messageService.show(Severity.Warning, nls.localize('runningAsRoot', "It is not recommended to run {0} as root user.", product.nameShort)); - } + // Show warning message (unix only) + if (isAdmin && !isWindows) { + this.messageService.show(Severity.Warning, nls.localize('runningAsRoot', "It is not recommended to run {0} as root user.", product.nameShort)); } }); }); From 9812d210d6e509f9d04eb2cca782ead8fc5d39ad Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 18 Dec 2017 07:53:33 +0100 Subject: [PATCH 348/615] array coalesce tests --- src/vs/base/test/common/arrays.test.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/vs/base/test/common/arrays.test.ts b/src/vs/base/test/common/arrays.test.ts index 6368c5b29c5..14df93a4579 100644 --- a/src/vs/base/test/common/arrays.test.ts +++ b/src/vs/base/test/common/arrays.test.ts @@ -7,6 +7,7 @@ import * as assert from 'assert'; import { TPromise } from 'vs/base/common/winjs.base'; import arrays = require('vs/base/common/arrays'); +import { coalesce } from 'vs/base/common/arrays'; suite('Arrays', () => { test('findFirst', function () { @@ -269,5 +270,29 @@ suite('Arrays', () => { }); }); } + + test('coalesce', function () { + let a = coalesce([null, 1, null, 2, 3]); + assert.equal(a.length, 3); + assert.equal(a[0], 1); + assert.equal(a[1], 2); + assert.equal(a[2], 3); + + coalesce([null, 1, null, void 0, undefined, 2, 3]); + assert.equal(a.length, 3); + assert.equal(a[0], 1); + assert.equal(a[1], 2); + assert.equal(a[2], 3); + + let b = []; + b[10] = 1; + b[20] = 2; + b[30] = 3; + b = coalesce(b); + assert.equal(b.length, 3); + assert.equal(b[0], 1); + assert.equal(b[1], 2); + assert.equal(b[2], 3); + }); }); From 03262df54412340a5ddad8e7dafb0a78f6b5fb35 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 18 Dec 2017 08:01:54 +0100 Subject: [PATCH 349/615] fix #40333 --- .../browser/parts/editor/editorPicker.ts | 14 +- .../history/electron-browser/history.ts | 168 ++++++++---------- 2 files changed, 83 insertions(+), 99 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorPicker.ts b/src/vs/workbench/browser/parts/editor/editorPicker.ts index abe0d8a17a9..979df653a59 100644 --- a/src/vs/workbench/browser/parts/editor/editorPicker.ts +++ b/src/vs/workbench/browser/parts/editor/editorPicker.ts @@ -16,7 +16,7 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { getIconClasses } from 'vs/workbench/browser/labels'; import { IModelService } from 'vs/editor/common/services/modelService'; import { QuickOpenHandler } from 'vs/workbench/browser/quickopen'; -import { Position, IEditorOptions } from 'vs/platform/editor/common/editor'; +import { Position } from 'vs/platform/editor/common/editor'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -71,13 +71,15 @@ export class EditorPickerEntry extends QuickOpenEntryGroup { } public run(mode: Mode, context: IEntryRunContext): boolean { - let options: IEditorOptions; - if (mode === Mode.PREVIEW) { - options = { preserveFocus: true }; // in preview, make sure to keep focus in quick open + if (mode === Mode.OPEN) { + return this.runOpen(context); } - // Open Editor - this.editorService.openEditor(this.editor, options, this.stacks.positionOfGroup(this.group)).done(null, errors.onUnexpectedError); + return super.run(mode, context); + } + + private runOpen(context: IEntryRunContext): boolean { + this.editorService.openEditor(this.editor, null, this.stacks.positionOfGroup(this.group)).done(null, errors.onUnexpectedError); return true; } diff --git a/src/vs/workbench/services/history/electron-browser/history.ts b/src/vs/workbench/services/history/electron-browser/history.ts index e4659d11135..c4e2ebda591 100644 --- a/src/vs/workbench/services/history/electron-browser/history.ts +++ b/src/vs/workbench/services/history/electron-browser/history.ts @@ -89,22 +89,83 @@ interface IEditorIdentifier { position: GroupPosition; } -export abstract class BaseHistoryService { +interface IStackEntry { + input: IEditorInput | IResourceInput; + selection?: ITextEditorSelection; + timestamp: number; +} - protected toUnbind: IDisposable[]; +interface IRecentlyClosedFile { + resource: URI; + index: number; +} + +export class HistoryService implements IHistoryService { + + public _serviceBrand: any; + + private static readonly STORAGE_KEY = 'history.entries'; + private static readonly MAX_HISTORY_ITEMS = 200; + private static readonly MAX_STACK_ITEMS = 20; + private static readonly MAX_RECENTLY_CLOSED_EDITORS = 20; + + private toUnbind: IDisposable[]; private activeEditorListeners: IDisposable[]; private lastActiveEditor: IEditorIdentifier; + private stack: IStackEntry[]; + private index: number; + private lastIndex: number; + private navigatingInStack: boolean; + private currentTextEditorState: TextEditorState; + + private history: (IEditorInput | IResourceInput)[]; + private recentlyClosedFiles: IRecentlyClosedFile[]; + private loaded: boolean; + private resourceFilter: ResourceGlobMatcher; + constructor( - protected editorGroupService: IEditorGroupService, - protected editorService: IWorkbenchEditorService + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IEditorGroupService private editorGroupService: IEditorGroupService, + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IStorageService private storageService: IStorageService, + @IConfigurationService private configurationService: IConfigurationService, + @ILifecycleService private lifecycleService: ILifecycleService, + @IFileService private fileService: IFileService, + @IWindowsService private windowService: IWindowsService, + @IInstantiationService private instantiationService: IInstantiationService, ) { this.toUnbind = []; this.activeEditorListeners = []; - // Listeners + this.index = -1; + this.lastIndex = -1; + this.stack = []; + this.recentlyClosedFiles = []; + this.loaded = false; + this.resourceFilter = instantiationService.createInstance( + ResourceGlobMatcher, + (root: URI) => this.getExcludes(root), + (event: IConfigurationChangeEvent) => event.affectsConfiguration(FILES_EXCLUDE_CONFIG) || event.affectsConfiguration('search.exclude') + ); + + this.registerListeners(); + } + + private getExcludes(root?: URI): IExpression { + const scope = root ? { resource: root } : void 0; + + return getExcludes(this.configurationService.getValue(scope)); + } + + private registerListeners(): void { this.toUnbind.push(this.editorGroupService.onEditorsChanged(() => this.onEditorsChanged())); + this.toUnbind.push(this.lifecycleService.onShutdown(reason => this.saveHistory())); + this.toUnbind.push(this.editorGroupService.onEditorOpenFail(editor => this.remove(editor))); + this.toUnbind.push(this.editorGroupService.getStacksModel().onEditorClosed(event => this.onEditorClosed(event))); + this.toUnbind.push(this.fileService.onFileChanges(e => this.onFileChanges(e))); + this.toUnbind.push(this.resourceFilter.onExpressionChange(() => this.handleExcludesChange())); } private onEditorsChanged(): void { @@ -148,94 +209,6 @@ export abstract class BaseHistoryService { return identifier.editor.matches(editor.input); } - protected abstract handleExcludesChange(): void; - - protected abstract handleEditorSelectionChangeEvent(editor?: IBaseEditor, event?: ICursorPositionChangedEvent): void; - - protected abstract handleActiveEditorChange(editor?: IBaseEditor): void; - - public dispose(): void { - this.toUnbind = dispose(this.toUnbind); - } -} - -interface IStackEntry { - input: IEditorInput | IResourceInput; - selection?: ITextEditorSelection; - timestamp: number; -} - -interface IRecentlyClosedFile { - resource: URI; - index: number; -} - -export class HistoryService extends BaseHistoryService implements IHistoryService { - - public _serviceBrand: any; - - private static readonly STORAGE_KEY = 'history.entries'; - private static readonly MAX_HISTORY_ITEMS = 200; - private static readonly MAX_STACK_ITEMS = 20; - private static readonly MAX_RECENTLY_CLOSED_EDITORS = 20; - - private stack: IStackEntry[]; - private index: number; - private lastIndex: number; - private navigatingInStack: boolean; - private currentTextEditorState: TextEditorState; - - private history: (IEditorInput | IResourceInput)[]; - private recentlyClosedFiles: IRecentlyClosedFile[]; - private loaded: boolean; - private resourceFilter: ResourceGlobMatcher; - - constructor( - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IEditorGroupService editorGroupService: IEditorGroupService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IStorageService private storageService: IStorageService, - @IConfigurationService private configurationService: IConfigurationService, - @ILifecycleService private lifecycleService: ILifecycleService, - @IFileService private fileService: IFileService, - @IWindowsService private windowService: IWindowsService, - @IInstantiationService private instantiationService: IInstantiationService, - ) { - super(editorGroupService, editorService); - - this.index = -1; - this.lastIndex = -1; - this.stack = []; - this.recentlyClosedFiles = []; - this.loaded = false; - this.resourceFilter = instantiationService.createInstance( - ResourceGlobMatcher, - (root: URI) => this.getExcludes(root), - (event: IConfigurationChangeEvent) => event.affectsConfiguration(FILES_EXCLUDE_CONFIG) || event.affectsConfiguration('search.exclude') - ); - - this.registerListeners(); - } - - private setIndex(value: number): void { - this.lastIndex = this.index; - this.index = value; - } - - private getExcludes(root?: URI): IExpression { - const scope = root ? { resource: root } : void 0; - - return getExcludes(this.configurationService.getValue(scope)); - } - - private registerListeners(): void { - this.toUnbind.push(this.lifecycleService.onShutdown(reason => this.saveHistory())); - this.toUnbind.push(this.editorGroupService.onEditorOpenFail(editor => this.remove(editor))); - this.toUnbind.push(this.editorGroupService.getStacksModel().onEditorClosed(event => this.onEditorClosed(event))); - this.toUnbind.push(this.fileService.onFileChanges(e => this.onFileChanges(e))); - this.toUnbind.push(this.resourceFilter.onExpressionChange(() => this.handleExcludesChange())); - } - private onFileChanges(e: FileChangesEvent): void { if (e.gotDeleted()) { this.remove(e); // remove from history files that got deleted or moved @@ -292,6 +265,11 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic this.navigate(); } + private setIndex(value: number): void { + this.lastIndex = this.index; + this.index = value; + } + private doForwardAcrossEditors(): void { let currentIndex = this.index; const currentEntry = this.stack[this.index]; @@ -840,4 +818,8 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic return void 0; } + + public dispose(): void { + this.toUnbind = dispose(this.toUnbind); + } } From 66a439e25363a7aab79adb725f46a07884ad4010 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Sun, 17 Dec 2017 23:37:16 -0800 Subject: [PATCH 350/615] Absorb upstream fix for #39789 --- extensions/emmet/package.json | 4 ++-- extensions/emmet/yarn.lock | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/emmet/package.json b/extensions/emmet/package.json index 498080ea9f4..fbbe87fe1fa 100644 --- a/extensions/emmet/package.json +++ b/extensions/emmet/package.json @@ -314,7 +314,7 @@ "vscode": "1.0.1" }, "dependencies": { - "@emmetio/html-matcher": "^0.3.1", + "@emmetio/html-matcher": "^0.3.3", "@emmetio/css-parser": "ramya-rao-a/css-parser#vscode", "@emmetio/math-expression": "^0.1.1", "vscode-emmet-helper": "^1.1.19", @@ -322,4 +322,4 @@ "image-size": "^0.5.2", "vscode-nls": "2.0.2" } -} +} \ No newline at end of file diff --git a/extensions/emmet/yarn.lock b/extensions/emmet/yarn.lock index 697ec7fb017..23003fe595e 100644 --- a/extensions/emmet/yarn.lock +++ b/extensions/emmet/yarn.lock @@ -13,9 +13,9 @@ version "0.1.3" resolved "https://registry.yarnpkg.com/@emmetio/extract-abbreviation/-/extract-abbreviation-0.1.3.tgz#dc00bf488ddf86a2a82ca95fb2ccb575bd832f68" -"@emmetio/html-matcher@^0.3.1": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@emmetio/html-matcher/-/html-matcher-0.3.2.tgz#efe0023e97191de1639f01fdcf0a198b588d3624" +"@emmetio/html-matcher@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@emmetio/html-matcher/-/html-matcher-0.3.3.tgz#0bbdadc0882e185950f03737dc6dbf8f7bd90728" dependencies: "@emmetio/stream-reader" "^2.0.0" "@emmetio/stream-reader-utils" "^0.1.0" From 424c9da7cc387e0dde11144714871a69257050fd Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 18 Dec 2017 09:10:03 +0100 Subject: [PATCH 351/615] improve git.autofetch suggestion fixes #40282 --- extensions/git/src/autofetch.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/extensions/git/src/autofetch.ts b/extensions/git/src/autofetch.ts index cb8e054e90a..ef309483297 100644 --- a/extensions/git/src/autofetch.ts +++ b/extensions/git/src/autofetch.ts @@ -5,7 +5,7 @@ 'use strict'; -import { workspace, Disposable, EventEmitter, Memento, window, MessageItem, ConfigurationTarget } from 'vscode'; +import { workspace, Disposable, EventEmitter, Memento, window, MessageItem, ConfigurationTarget, commands, Uri } from 'vscode'; import { GitErrorCodes } from './git'; import { Repository, Operation } from './repository'; import { eventToPromise, filterEvent, onceEvent } from './util'; @@ -54,14 +54,20 @@ export class AutoFetcher { } const yes: MessageItem = { title: localize('yes', "Yes") }; + const readMore: MessageItem = { title: localize('read more', "Read More") }; const no: MessageItem = { isCloseAffordance: true, title: localize('no', "No") }; - const askLater: MessageItem = { title: localize('not now', "Not Now") }; - const result = await window.showInformationMessage(localize('suggest auto fetch', "Would you like to enable auto fetching of Git repositories?"), yes, no, askLater); + const askLater: MessageItem = { title: localize('not now', "Ask Me Later") }; + const result = await window.showInformationMessage(localize('suggest auto fetch', "Would you like Code to periodically run `git fetch`?"), yes, readMore, no, askLater); if (result === askLater) { return; } + if (result === readMore) { + commands.executeCommand('vscode.open', Uri.parse('https://go.microsoft.com/fwlink/?linkid=865294')); + return this.onFirstGoodRemoteOperation(); + } + if (result === yes) { const gitConfig = workspace.getConfiguration('git'); gitConfig.update('autofetch', true, ConfigurationTarget.Global); From 18e6258df8368770fa1826de26dd904a56762046 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 18 Dec 2017 10:26:19 +0100 Subject: [PATCH 352/615] Fixes #8808: Better range for mouse position over text --- .../editor/browser/controller/mouseTarget.ts | 52 ++++++++++--------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/src/vs/editor/browser/controller/mouseTarget.ts b/src/vs/editor/browser/controller/mouseTarget.ts index ff6bc23c170..0e21b9588b5 100644 --- a/src/vs/editor/browser/controller/mouseTarget.ts +++ b/src/vs/editor/browser/controller/mouseTarget.ts @@ -694,7 +694,7 @@ export class MouseTargetFactory { return request.fulfill(MouseTargetType.CONTENT_EMPTY, pos, void 0, EMPTY_CONTENT_IN_LINES); } - let visibleRange = ctx.visibleRangeForPosition2(lineNumber, column); + const visibleRange = ctx.visibleRangeForPosition2(lineNumber, column); if (!visibleRange) { return request.fulfill(MouseTargetType.UNKNOWN, pos); @@ -706,33 +706,35 @@ export class MouseTargetFactory { return request.fulfill(MouseTargetType.CONTENT_TEXT, pos); } - let mouseIsBetween: boolean; + // Let's define a, b, c and check if the offset is in between them... + interface OffsetColumn { offset: number; column: number; } + + let points: OffsetColumn[] = []; + points.push({ offset: visibleRange.left, column: column }); if (column > 1) { - let prevColumnHorizontalOffset = visibleRange.left; - mouseIsBetween = false; - mouseIsBetween = mouseIsBetween || (prevColumnHorizontalOffset < request.mouseContentHorizontalOffset && request.mouseContentHorizontalOffset < columnHorizontalOffset); // LTR case - mouseIsBetween = mouseIsBetween || (columnHorizontalOffset < request.mouseContentHorizontalOffset && request.mouseContentHorizontalOffset < prevColumnHorizontalOffset); // RTL case - if (mouseIsBetween) { - let rng = new EditorRange(lineNumber, column, lineNumber, column - 1); + const visibleRange = ctx.visibleRangeForPosition2(lineNumber, column - 1); + if (visibleRange) { + points.push({ offset: visibleRange.left, column: column - 1 }); + } + } + const lineMaxColumn = ctx.model.getLineMaxColumn(lineNumber); + if (column < lineMaxColumn) { + const visibleRange = ctx.visibleRangeForPosition2(lineNumber, column + 1); + if (visibleRange) { + points.push({ offset: visibleRange.left, column: column + 1 }); + } + } + + points.sort((a, b) => a.offset - b.offset); + + for (let i = 1; i < points.length; i++) { + const prev = points[i - 1]; + const curr = points[i]; + if (prev.offset <= request.mouseContentHorizontalOffset && request.mouseContentHorizontalOffset <= curr.offset) { + const rng = new EditorRange(lineNumber, prev.column, lineNumber, curr.column); return request.fulfill(MouseTargetType.CONTENT_TEXT, pos, rng); } } - - let lineMaxColumn = ctx.model.getLineMaxColumn(lineNumber); - if (column < lineMaxColumn) { - let nextColumnVisibleRange = ctx.visibleRangeForPosition2(lineNumber, column + 1); - if (nextColumnVisibleRange) { - let nextColumnHorizontalOffset = nextColumnVisibleRange.left; - mouseIsBetween = false; - mouseIsBetween = mouseIsBetween || (columnHorizontalOffset < request.mouseContentHorizontalOffset && request.mouseContentHorizontalOffset < nextColumnHorizontalOffset); // LTR case - mouseIsBetween = mouseIsBetween || (nextColumnHorizontalOffset < request.mouseContentHorizontalOffset && request.mouseContentHorizontalOffset < columnHorizontalOffset); // RTL case - if (mouseIsBetween) { - let rng = new EditorRange(lineNumber, column, lineNumber, column + 1); - return request.fulfill(MouseTargetType.CONTENT_TEXT, pos, rng); - } - } - } - return request.fulfill(MouseTargetType.CONTENT_TEXT, pos); } @@ -940,4 +942,4 @@ export class MouseTargetFactory { hitTarget: null }; } -} \ No newline at end of file +} From 3cb1594fbb667b10eda9729e5f65f507b38efbf5 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 18 Dec 2017 10:44:21 +0100 Subject: [PATCH 353/615] Fixes #40426 --- src/vs/editor/common/view/overviewZoneManager.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/view/overviewZoneManager.ts b/src/vs/editor/common/view/overviewZoneManager.ts index 92759f72bbe..bb624485513 100644 --- a/src/vs/editor/common/view/overviewZoneManager.ts +++ b/src/vs/editor/common/view/overviewZoneManager.ts @@ -180,6 +180,7 @@ export class OverviewZoneManager { const totalHeight = Math.floor(this.getCanvasHeight()); // @perf const outerHeight = Math.floor(this._outerHeight); // @perf const heightRatio = totalHeight / outerHeight; + const halfMinimumHeight = Math.floor(Constants.MINIMUM_HEIGHT * this._pixelRatio / 2); let allColorZones: ColorZone[] = []; for (let i = 0, len = this._zones.length; i < len; i++) { @@ -199,8 +200,8 @@ export class OverviewZoneManager { let ycenter = Math.floor((y1 + y2) / 2); let halfHeight = (y2 - ycenter); - if (halfHeight < Constants.MINIMUM_HEIGHT / 2) { - halfHeight = Constants.MINIMUM_HEIGHT / 2; + if (halfHeight < halfMinimumHeight) { + halfHeight = halfMinimumHeight; } if (ycenter - halfHeight < 0) { From 5f87a2ad405b43eca3dac2ac90464278b80f06b6 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 18 Dec 2017 10:59:48 +0100 Subject: [PATCH 354/615] properly handle git uris in getOpenRepository fixes #40408 --- extensions/git/src/model.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 7f28e23f6b6..954cb774c86 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -13,6 +13,7 @@ import { Git, GitErrorCodes } from './git'; import * as path from 'path'; import * as fs from 'fs'; import * as nls from 'vscode-nls'; +import { fromGitUri } from './uri'; const localize = nls.loadMessageBundle(); @@ -300,7 +301,13 @@ export class Model { } if (hint instanceof Uri) { - const resourcePath = hint.fsPath; + let resourcePath: string; + + if (hint.scheme === 'git') { + resourcePath = fromGitUri(hint).path; + } else { + resourcePath = hint.fsPath; + } outer: for (const liveRepository of this.openRepositories.sort((a, b) => b.repository.root.length - a.repository.root.length)) { From 85831ea2b24feb966ae6c89adb6f549261dbd1ef Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 18 Dec 2017 11:00:39 +0100 Subject: [PATCH 355/615] null check for 'workbench.colorCustomizations' (for #40329) --- .../services/themes/electron-browser/workbenchThemeService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index 6db3a90b95f..9fec1318117 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -83,7 +83,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { private _configurationWriter: ConfigurationWriter; private get colorCustomizations(): IColorCustomizations { - return this.configurationService.getValue(CUSTOM_WORKBENCH_COLORS_SETTING); + return this.configurationService.getValue(CUSTOM_WORKBENCH_COLORS_SETTING) || {}; } private get tokenColorCustomizations(): ITokenColorCustomizations { @@ -530,6 +530,7 @@ configurationRegistry.registerConfiguration({ properties: { [CUSTOM_EDITOR_COLORS_SETTING]: { description: nls.localize('editorColors', "Overrides editor colors and font style from the currently selected color theme."), + type: 'object', default: {}, additionalProperties: false, properties: { From 9aaedc0f9044b6844cf2acbdc46b0a01c790bca1 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 18 Dec 2017 11:12:42 +0100 Subject: [PATCH 356/615] fileCommands: some restructuring --- .../files/electron-browser/fileCommands.ts | 322 +++++++++--------- 1 file changed, 159 insertions(+), 163 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index f7525924315..2aa109efeed 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -58,10 +58,10 @@ export const SAVE_FILE_AS_COMMAND_ID = 'workbench.command.files.saveAs'; export const SAVE_FILE_AS_LABEL = nls.localize('saveAs', "Save As..."); export const SAVE_FILE_COMMAND_ID = 'workbench.command.files.save'; export const SAVE_FILE_LABEL = nls.localize('save', "Save"); -export const BASE_SAVE_ONE_FILE_COMMAND_ID = 'workbench.command.files.saveAs'; registerFileCommands(); +registerMenuItems(); export const openWindowCommand = (accessor: ServicesAccessor, paths: string[], forceNewWindow: boolean) => { const windowsService = accessor.get(IWindowsService); @@ -256,6 +256,93 @@ export function computeLabelForCompare(resource: URI, contextService: IWorkspace export let globalResourceToCompare: URI; +function save(editorService: IWorkbenchEditorService, fileService: IFileService, untitledEditorService: IUntitledEditorService, + textFileService: ITextFileService, editorGroupService: IEditorGroupService, resource: URI, isSaveAs: boolean): TPromise { + + let source: URI; + if (resource) { + source = resource; + } else { + source = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true }); + } + + if (source && (fileService.canHandleResource(source) || source.scheme === 'untitled')) { + + // Save As (or Save untitled with associated path) + if (isSaveAs || source.scheme === 'untitled') { + let encodingOfSource: string; + if (source.scheme === 'untitled') { + encodingOfSource = untitledEditorService.getEncoding(source); + } else if (source.scheme === 'file') { + const textModel = textFileService.models.get(source); + encodingOfSource = textModel && textModel.getEncoding(); // text model can be null e.g. if this is a binary file! + } + + let viewStateOfSource: IEditorViewState; + const activeEditor = editorService.getActiveEditor(); + const editor = getCodeEditor(activeEditor); + if (editor) { + const activeResource = toResource(activeEditor.input, { supportSideBySide: true }); + if (activeResource && (fileService.canHandleResource(activeResource) || source.scheme === 'untitled') && activeResource.toString() === source.toString()) { + viewStateOfSource = editor.saveViewState(); + } + } + + // Special case: an untitled file with associated path gets saved directly unless "saveAs" is true + let savePromise: TPromise; + if (!isSaveAs && source.scheme === 'untitled' && untitledEditorService.hasAssociatedFilePath(source)) { + savePromise = textFileService.save(source).then((result) => { + if (result) { + return URI.file(source.fsPath); + } + + return null; + }); + } + + // Otherwise, really "Save As..." + else { + savePromise = textFileService.saveAs(source); + } + + return savePromise.then((target) => { + if (!target || target.toString() === source.toString()) { + return void 0; // save canceled or same resource used + } + + const replaceWith: IResourceInput = { + resource: target, + encoding: encodingOfSource, + options: { + pinned: true, + viewState: viewStateOfSource + } + }; + + return editorService.replaceEditors([{ + toReplace: { resource: source }, + replaceWith + }]).then(() => true); + }); + } + + // Pin the active editor if we are saving it + if (!resource) { + const editor = editorService.getActiveEditor(); + if (editor) { + editorGroupService.pinEditor(editor.position, editor.input); + } + } + + // Just save + return textFileService.save(source, { force: true /* force a change to the file to trigger external watchers if any */ }); + } + + return TPromise.as(false); +} + + + function registerFileCommands(): void { CommandsRegistry.registerCommand({ @@ -282,15 +369,6 @@ function registerFileCommands(): void { } }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'save', - command: { - id: REVERT_FILE_COMMAND_ID, - title: nls.localize('revert', "Revert File") - }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, AutoSaveDisabledContext, UntitledEditorNotFocusedInOpenEditorsContext) - }); - CommandsRegistry.registerCommand({ id: OPEN_TO_SIDE_COMMAND_ID, handler: (accessor, args) => { const editorService = accessor.get(IWorkbenchEditorService); @@ -311,15 +389,6 @@ function registerFileCommands(): void { } }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'file', - command: { - id: OPEN_TO_SIDE_COMMAND_ID, - title: nls.localize('openToSide', "Open to the Side") - }, - when: EditorFocusedInOpenEditorsContext - }); - CommandsRegistry.registerCommand({ id: COMPARE_WITH_SAVED_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -342,15 +411,6 @@ function registerFileCommands(): void { } }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'compare', - command: { - id: COMPARE_WITH_SAVED_COMMAND_ID, - title: nls.localize('compareWithSaved', "Compare with Saved") - }, - when: EditorFocusedInOpenEditorsContext - }); - CommandsRegistry.registerCommand({ id: SELECT_FOR_COMPARE_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -366,15 +426,6 @@ function registerFileCommands(): void { } }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'compare', - command: { - id: SELECT_FOR_COMPARE_COMMAND_ID, - title: nls.localize('compareSource', "Select for Compare") - }, - when: EditorFocusedInOpenEditorsContext - }); - CommandsRegistry.registerCommand({ id: COMPARE_RESOURCE_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -393,15 +444,6 @@ function registerFileCommands(): void { } }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'compare', - command: { - id: COMPARE_RESOURCE_COMMAND_ID, - title: nls.localize('compareWithChosen', "Compare With Chosen") - }, - when: EditorFocusedInOpenEditorsContext - }); - CommandsRegistry.registerCommand({ id: REVEAL_IN_OS_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -448,15 +490,6 @@ function registerFileCommands(): void { } }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'file', - command: { - id: COPY_PATH_COMMAND_ID, - title: nls.localize('copyPath', "Copy Path") - }, - when: EditorFocusedInOpenEditorsContext - }); - CommandsRegistry.registerCommand({ id: REVEAL_IN_EXPLORER_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -481,6 +514,77 @@ function registerFileCommands(): void { } }); + CommandsRegistry.registerCommand({ + id: SAVE_FILE_AS_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + return save(accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService), args.resource, true); + } + }); + + CommandsRegistry.registerCommand({ + id: SAVE_FILE_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + return save(accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService), args.resource, false); + } + }); +} + +function registerMenuItems(): void { + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'save', + command: { + id: REVERT_FILE_COMMAND_ID, + title: nls.localize('revert', "Revert File") + }, + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, AutoSaveDisabledContext, UntitledEditorNotFocusedInOpenEditorsContext) + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'file', + command: { + id: OPEN_TO_SIDE_COMMAND_ID, + title: nls.localize('openToSide', "Open to the Side") + }, + when: EditorFocusedInOpenEditorsContext + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'compare', + command: { + id: COMPARE_WITH_SAVED_COMMAND_ID, + title: nls.localize('compareWithSaved', "Compare with Saved") + }, + when: EditorFocusedInOpenEditorsContext + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'compare', + command: { + id: SELECT_FOR_COMPARE_COMMAND_ID, + title: nls.localize('compareSource', "Select for Compare") + }, + when: EditorFocusedInOpenEditorsContext + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'compare', + command: { + id: COMPARE_RESOURCE_COMMAND_ID, + title: nls.localize('compareWithChosen', "Compare With Chosen") + }, + when: EditorFocusedInOpenEditorsContext + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'file', + command: { + id: COPY_PATH_COMMAND_ID, + title: nls.localize('copyPath', "Copy Path") + }, + when: EditorFocusedInOpenEditorsContext + }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: 'file', command: { @@ -490,14 +594,6 @@ function registerFileCommands(): void { when: EditorFocusedInOpenEditorsContext }); - CommandsRegistry.registerCommand({ - id: SAVE_FILE_AS_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - const commandService = accessor.get(ICommandService); - return commandService.executeCommand(BASE_SAVE_ONE_FILE_COMMAND_ID, args.resource, true); - } - }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: 'save', command: { @@ -507,14 +603,6 @@ function registerFileCommands(): void { when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext) }); - CommandsRegistry.registerCommand({ - id: SAVE_FILE_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - const commandService = accessor.get(ICommandService); - return commandService.executeCommand(BASE_SAVE_ONE_FILE_COMMAND_ID, args.resource, false); - } - }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: 'save', command: { @@ -523,96 +611,4 @@ function registerFileCommands(): void { }, when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext) }); - - CommandsRegistry.registerCommand({ - id: BASE_SAVE_ONE_FILE_COMMAND_ID, - handler: (accessor, resource: URI, isSaveAs: boolean) => { - const editorService = accessor.get(IWorkbenchEditorService); - const fileService = accessor.get(IFileService); - const untitledEditorService = accessor.get(IUntitledEditorService); - const textFileService = accessor.get(ITextFileService); - const editorGroupService = accessor.get(IEditorGroupService); - - let source: URI; - if (resource) { - source = resource; - } else { - source = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true }); - } - - if (source && (fileService.canHandleResource(source) || source.scheme === 'untitled')) { - - // Save As (or Save untitled with associated path) - if (isSaveAs || source.scheme === 'untitled') { - let encodingOfSource: string; - if (source.scheme === 'untitled') { - encodingOfSource = untitledEditorService.getEncoding(source); - } else if (source.scheme === 'file') { - const textModel = textFileService.models.get(source); - encodingOfSource = textModel && textModel.getEncoding(); // text model can be null e.g. if this is a binary file! - } - - let viewStateOfSource: IEditorViewState; - const activeEditor = editorService.getActiveEditor(); - const editor = getCodeEditor(activeEditor); - if (editor) { - const activeResource = toResource(activeEditor.input, { supportSideBySide: true }); - if (activeResource && (fileService.canHandleResource(activeResource) || source.scheme === 'untitled') && activeResource.toString() === source.toString()) { - viewStateOfSource = editor.saveViewState(); - } - } - - // Special case: an untitled file with associated path gets saved directly unless "saveAs" is true - let savePromise: TPromise; - if (!isSaveAs && source.scheme === 'untitled' && untitledEditorService.hasAssociatedFilePath(source)) { - savePromise = textFileService.save(source).then((result) => { - if (result) { - return URI.file(source.fsPath); - } - - return null; - }); - } - - // Otherwise, really "Save As..." - else { - savePromise = textFileService.saveAs(source); - } - - return savePromise.then((target) => { - if (!target || target.toString() === source.toString()) { - return void 0; // save canceled or same resource used - } - - const replaceWith: IResourceInput = { - resource: target, - encoding: encodingOfSource, - options: { - pinned: true, - viewState: viewStateOfSource - } - }; - - return editorService.replaceEditors([{ - toReplace: { resource: source }, - replaceWith - }]).then(() => true); - }); - } - - // Pin the active editor if we are saving it - if (!resource) { - const editor = editorService.getActiveEditor(); - if (editor) { - editorGroupService.pinEditor(editor.position, editor.input); - } - } - - // Just save - return textFileService.save(source, { force: true /* force a change to the file to trigger external watchers if any */ }); - } - - return TPromise.as(false); - } - }); } From 39df58304bb02b270923536004ffb4a8bea98e40 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 18 Dec 2017 11:24:57 +0100 Subject: [PATCH 357/615] config resolver: use slash for relativeFile as before (for #40256) --- .../electron-browser/configurationResolverService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts b/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts index c0da65c8d9b..a8fa36aa37e 100644 --- a/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts +++ b/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts @@ -70,7 +70,7 @@ export class ConfigurationResolverService implements IConfigurationResolverServi } private get relativeFile(): string { - return (this.workspaceRoot) ? relative(this.workspaceRoot, this.file) : this.file; + return (this.workspaceRoot) ? paths.normalize(relative(this.workspaceRoot, this.file)) : this.file; } private get fileBasename(): string { From ec444e48740bf212080aad48f8bcaa5d0ffaf9f5 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 18 Dec 2017 12:11:33 +0100 Subject: [PATCH 358/615] Fix tests --- src/vs/editor/contrib/links/getLinks.ts | 9 +- .../api/extHostApiCommands.test.ts | 10 +- .../electron-browser/api/testThreadService.ts | 117 ++++++++++++++++++ 3 files changed, 130 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/contrib/links/getLinks.ts b/src/vs/editor/contrib/links/getLinks.ts index 047e094293c..86f3513e88b 100644 --- a/src/vs/editor/contrib/links/getLinks.ts +++ b/src/vs/editor/contrib/links/getLinks.ts @@ -25,6 +25,13 @@ export class Link implements ILink { this._provider = provider; } + toJSON(): ILink { + return { + range: this.range, + url: this.url + }; + } + get range(): IRange { return this._link.range; } @@ -134,4 +141,4 @@ CommandsRegistry.registerCommand('_executeLinkProvider', (accessor, ...args) => } return getLinks(model); -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts index 7bad690e32a..3f9fbb4d480 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts @@ -13,7 +13,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as types from 'vs/workbench/api/node/extHostTypes'; import * as EditorCommon from 'vs/editor/common/editorCommon'; import { Model as EditorModel } from 'vs/editor/common/model/model'; -import { TestThreadService } from './testThreadService'; +import { TestRPCProtocol } from './testThreadService'; import { MarkerService } from 'vs/platform/markers/common/markerService'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; @@ -45,7 +45,7 @@ const model: EditorCommon.IModel = EditorModel.createFromString( undefined, URI.parse('far://testing/file.b')); -let threadService: TestThreadService; +let threadService: TestRPCProtocol; let extHost: ExtHostLanguageFeatures; let mainThread: MainThreadLanguageFeatures; let commands: ExtHostCommands; @@ -63,7 +63,7 @@ suite('ExtHostLanguageFeatureCommands', function () { let inst: IInstantiationService; { let instantiationService = new TestInstantiationService(); - threadService = new TestThreadService(); + threadService = new TestRPCProtocol(); instantiationService.stub(IHeapService, { _serviceBrand: undefined, trackRecursive(args) { @@ -116,7 +116,7 @@ suite('ExtHostLanguageFeatureCommands', function () { commands = new ExtHostCommands(threadService, heapService, new NullLogService()); threadService.set(ExtHostContext.ExtHostCommands, commands); - threadService.setTestInstance(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); + threadService.set(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); ExtHostApiCommands.register(commands); const diagnostics = new ExtHostDiagnostics(threadService); @@ -125,7 +125,7 @@ suite('ExtHostLanguageFeatureCommands', function () { extHost = new ExtHostLanguageFeatures(threadService, extHostDocuments, commands, heapService, diagnostics); threadService.set(ExtHostContext.ExtHostLanguageFeatures, extHost); - mainThread = threadService.setTestInstance(MainContext.MainThreadLanguageFeatures, inst.createInstance(MainThreadLanguageFeatures, threadService)); + mainThread = threadService.set(MainContext.MainThreadLanguageFeatures, inst.createInstance(MainThreadLanguageFeatures, threadService)); threadService.sync().then(done, done); }); diff --git a/src/vs/workbench/test/electron-browser/api/testThreadService.ts b/src/vs/workbench/test/electron-browser/api/testThreadService.ts index 7867d3d411b..2c0f7438765 100644 --- a/src/vs/workbench/test/electron-browser/api/testThreadService.ts +++ b/src/vs/workbench/test/electron-browser/api/testThreadService.ts @@ -7,6 +7,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { ProxyIdentifier, IRPCProtocol } from 'vs/workbench/services/extensions/node/proxyIdentifier'; +import { CharCode } from 'vs/base/common/charCode'; +import * as marshalling from 'vs/base/common/marshalling'; export function OneGetThreadService(thing: any): IRPCProtocol { return { @@ -157,3 +159,118 @@ export class TestThreadService extends AbstractTestThreadService implements IRPC throw new Error('Not implemented!'); } } + +export class TestRPCProtocol implements IRPCProtocol { + + private _callCountValue: number = 0; + private _idle: Promise; + private _completeIdle: Function; + + private readonly _locals: { [id: string]: any; }; + private readonly _proxies: { [id: string]: any; }; + + constructor() { + this._locals = Object.create(null); + this._proxies = Object.create(null); + } + + private get _callCount(): number { + return this._callCountValue; + } + + private set _callCount(value: number) { + this._callCountValue = value; + if (this._callCountValue === 0) { + if (this._completeIdle) { + this._completeIdle(); + } + this._idle = undefined; + } + } + + sync(): Promise { + return new Promise((c) => { + setTimeout(c, 0); + }).then(() => { + if (this._callCount === 0) { + return undefined; + } + if (!this._idle) { + this._idle = new Promise((c, e) => { + this._completeIdle = c; + }); + } + return this._idle; + }); + } + + public getProxy(identifier: ProxyIdentifier): T { + if (!this._proxies[identifier.id]) { + this._proxies[identifier.id] = this._createProxy(identifier.id, identifier.isFancy); + } + return this._proxies[identifier.id]; + } + + private _createProxy(proxyId: string, isFancy: boolean): T { + let handler = { + get: (target, name: string) => { + if (!target[name] && name.charCodeAt(0) === CharCode.DollarSign) { + target[name] = (...myArgs: any[]) => { + return this._remoteCall(proxyId, name, myArgs, isFancy); + }; + } + return target[name]; + } + }; + return new Proxy(Object.create(null), handler); + } + + public set(identifier: ProxyIdentifier, value: R): R { + this._locals[identifier.id] = value; + return value; + } + + protected _remoteCall(proxyId: string, path: string, args: any[], isFancy: boolean): TPromise { + this._callCount++; + + return new TPromise((c) => { + setTimeout(c, 0); + }).then(() => { + const instance = this._locals[proxyId]; + // pretend the args went over the wire... (invoke .toJSON on objects...) + const wireArgs = simulateWireTransfer(args, isFancy); + let p: Thenable; + try { + let result = (instance[path]).apply(instance, wireArgs); + p = TPromise.is(result) ? result : TPromise.as(result); + } catch (err) { + p = TPromise.wrapError(err); + } + + return p.then(result => { + this._callCount--; + // pretend the result went over the wire... (invoke .toJSON on objects...) + const wireResult = simulateWireTransfer(result, isFancy); + return wireResult; + }, err => { + this._callCount--; + return TPromise.wrapError(err); + }); + }); + } + + public assertRegistered(identifiers: ProxyIdentifier[]): void { + throw new Error('Not implemented!'); + } +} + +function simulateWireTransfer(obj: T, isFancy: boolean): T { + if (!obj) { + return obj; + } + return ( + isFancy + ? marshalling.parse(marshalling.stringify(obj)) + : JSON.parse(JSON.stringify(obj)) + ); +} From 07ac57204a36414d7ffaaf9281c31b1e41593d2e Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 18 Dec 2017 12:23:48 +0100 Subject: [PATCH 359/615] Adopt new TestRPCProtocol; renames --- src/vs/workbench/api/node/extHost.api.impl.ts | 60 ++++---- .../api/node/extHostExtensionService.ts | 12 +- .../api/extHostApiCommands.test.ts | 56 ++++--- .../api/extHostCommands.test.ts | 6 +- .../api/extHostConfiguration.test.ts | 12 +- .../extHostDocumentSaveParticipant.test.ts | 6 +- .../api/extHostLanguageFeatures.test.ts | 126 ++++++++-------- .../api/extHostTextEditors.test.ts | 10 +- .../api/extHostTreeViews.test.ts | 8 +- .../api/extHostWorkspace.test.ts | 34 ++--- .../api/mainThreadCommands.test.ts | 6 +- .../api/mainThreadConfiguration.test.ts | 40 ++--- .../api/mainThreadDocumentsAndEditors.test.ts | 4 +- .../api/mainThreadEditors.test.ts | 12 +- ...estThreadService.ts => testRPCProtocol.ts} | 138 +----------------- 15 files changed, 194 insertions(+), 336 deletions(-) rename src/vs/workbench/test/electron-browser/api/{testThreadService.ts => testRPCProtocol.ts} (52%) diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 6ca0cac5d39..5e8d988b5a9 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -86,7 +86,7 @@ function proposedApiFunction(extension: IExtensionDescription, fn: T): T { */ export function createApiFactory( initData: IInitData, - threadService: IExtHostContext, + rpcProtocol: IExtHostContext, extHostWorkspace: ExtHostWorkspace, extHostConfiguration: ExtHostConfiguration, extensionService: ExtHostExtensionService, @@ -94,40 +94,40 @@ export function createApiFactory( ): IExtensionApiFactory { // Addressable instances - const extHostHeapService = threadService.set(ExtHostContext.ExtHostHeapService, new ExtHostHeapService()); - const extHostDecorations = threadService.set(ExtHostContext.ExtHostDecorations, new ExtHostDecorations(threadService)); - const extHostDocumentsAndEditors = threadService.set(ExtHostContext.ExtHostDocumentsAndEditors, new ExtHostDocumentsAndEditors(threadService)); - const extHostDocuments = threadService.set(ExtHostContext.ExtHostDocuments, new ExtHostDocuments(threadService, extHostDocumentsAndEditors)); - const extHostDocumentContentProviders = threadService.set(ExtHostContext.ExtHostDocumentContentProviders, new ExtHostDocumentContentProvider(threadService, extHostDocumentsAndEditors)); - const extHostDocumentSaveParticipant = threadService.set(ExtHostContext.ExtHostDocumentSaveParticipant, new ExtHostDocumentSaveParticipant(logService, extHostDocuments, threadService.getProxy(MainContext.MainThreadEditors))); - const extHostEditors = threadService.set(ExtHostContext.ExtHostEditors, new ExtHostEditors(threadService, extHostDocumentsAndEditors)); - const extHostCommands = threadService.set(ExtHostContext.ExtHostCommands, new ExtHostCommands(threadService, extHostHeapService, logService)); - const extHostTreeViews = threadService.set(ExtHostContext.ExtHostTreeViews, new ExtHostTreeViews(threadService.getProxy(MainContext.MainThreadTreeViews), extHostCommands)); - threadService.set(ExtHostContext.ExtHostWorkspace, extHostWorkspace); - const extHostDebugService = threadService.set(ExtHostContext.ExtHostDebugService, new ExtHostDebugService(threadService, extHostWorkspace)); - threadService.set(ExtHostContext.ExtHostConfiguration, extHostConfiguration); - const extHostDiagnostics = threadService.set(ExtHostContext.ExtHostDiagnostics, new ExtHostDiagnostics(threadService)); - const languageFeatures = threadService.set(ExtHostContext.ExtHostLanguageFeatures, new ExtHostLanguageFeatures(threadService, extHostDocuments, extHostCommands, extHostHeapService, extHostDiagnostics)); - const extHostFileSystem = threadService.set(ExtHostContext.ExtHostFileSystem, new ExtHostFileSystem(threadService)); - const extHostFileSystemEvent = threadService.set(ExtHostContext.ExtHostFileSystemEventService, new ExtHostFileSystemEventService()); - const extHostQuickOpen = threadService.set(ExtHostContext.ExtHostQuickOpen, new ExtHostQuickOpen(threadService, extHostWorkspace, extHostCommands)); - const extHostTerminalService = threadService.set(ExtHostContext.ExtHostTerminalService, new ExtHostTerminalService(threadService)); - const extHostSCM = threadService.set(ExtHostContext.ExtHostSCM, new ExtHostSCM(threadService, extHostCommands, logService)); - const extHostTask = threadService.set(ExtHostContext.ExtHostTask, new ExtHostTask(threadService, extHostWorkspace)); - const extHostWindow = threadService.set(ExtHostContext.ExtHostWindow, new ExtHostWindow(threadService)); - threadService.set(ExtHostContext.ExtHostExtensionService, extensionService); + const extHostHeapService = rpcProtocol.set(ExtHostContext.ExtHostHeapService, new ExtHostHeapService()); + const extHostDecorations = rpcProtocol.set(ExtHostContext.ExtHostDecorations, new ExtHostDecorations(rpcProtocol)); + const extHostDocumentsAndEditors = rpcProtocol.set(ExtHostContext.ExtHostDocumentsAndEditors, new ExtHostDocumentsAndEditors(rpcProtocol)); + const extHostDocuments = rpcProtocol.set(ExtHostContext.ExtHostDocuments, new ExtHostDocuments(rpcProtocol, extHostDocumentsAndEditors)); + const extHostDocumentContentProviders = rpcProtocol.set(ExtHostContext.ExtHostDocumentContentProviders, new ExtHostDocumentContentProvider(rpcProtocol, extHostDocumentsAndEditors)); + const extHostDocumentSaveParticipant = rpcProtocol.set(ExtHostContext.ExtHostDocumentSaveParticipant, new ExtHostDocumentSaveParticipant(logService, extHostDocuments, rpcProtocol.getProxy(MainContext.MainThreadEditors))); + const extHostEditors = rpcProtocol.set(ExtHostContext.ExtHostEditors, new ExtHostEditors(rpcProtocol, extHostDocumentsAndEditors)); + const extHostCommands = rpcProtocol.set(ExtHostContext.ExtHostCommands, new ExtHostCommands(rpcProtocol, extHostHeapService, logService)); + const extHostTreeViews = rpcProtocol.set(ExtHostContext.ExtHostTreeViews, new ExtHostTreeViews(rpcProtocol.getProxy(MainContext.MainThreadTreeViews), extHostCommands)); + rpcProtocol.set(ExtHostContext.ExtHostWorkspace, extHostWorkspace); + const extHostDebugService = rpcProtocol.set(ExtHostContext.ExtHostDebugService, new ExtHostDebugService(rpcProtocol, extHostWorkspace)); + rpcProtocol.set(ExtHostContext.ExtHostConfiguration, extHostConfiguration); + const extHostDiagnostics = rpcProtocol.set(ExtHostContext.ExtHostDiagnostics, new ExtHostDiagnostics(rpcProtocol)); + const languageFeatures = rpcProtocol.set(ExtHostContext.ExtHostLanguageFeatures, new ExtHostLanguageFeatures(rpcProtocol, extHostDocuments, extHostCommands, extHostHeapService, extHostDiagnostics)); + const extHostFileSystem = rpcProtocol.set(ExtHostContext.ExtHostFileSystem, new ExtHostFileSystem(rpcProtocol)); + const extHostFileSystemEvent = rpcProtocol.set(ExtHostContext.ExtHostFileSystemEventService, new ExtHostFileSystemEventService()); + const extHostQuickOpen = rpcProtocol.set(ExtHostContext.ExtHostQuickOpen, new ExtHostQuickOpen(rpcProtocol, extHostWorkspace, extHostCommands)); + const extHostTerminalService = rpcProtocol.set(ExtHostContext.ExtHostTerminalService, new ExtHostTerminalService(rpcProtocol)); + const extHostSCM = rpcProtocol.set(ExtHostContext.ExtHostSCM, new ExtHostSCM(rpcProtocol, extHostCommands, logService)); + const extHostTask = rpcProtocol.set(ExtHostContext.ExtHostTask, new ExtHostTask(rpcProtocol, extHostWorkspace)); + const extHostWindow = rpcProtocol.set(ExtHostContext.ExtHostWindow, new ExtHostWindow(rpcProtocol)); + rpcProtocol.set(ExtHostContext.ExtHostExtensionService, extensionService); // Check that no named customers are missing const expected: ProxyIdentifier[] = Object.keys(ExtHostContext).map((key) => ExtHostContext[key]); - threadService.assertRegistered(expected); + rpcProtocol.assertRegistered(expected); // Other instances - const extHostMessageService = new ExtHostMessageService(threadService); - const extHostDialogs = new ExtHostDialogs(threadService); - const extHostStatusBar = new ExtHostStatusBar(threadService); - const extHostProgress = new ExtHostProgress(threadService.getProxy(MainContext.MainThreadProgress)); - const extHostOutputService = new ExtHostOutputService(threadService); - const extHostLanguages = new ExtHostLanguages(threadService); + const extHostMessageService = new ExtHostMessageService(rpcProtocol); + const extHostDialogs = new ExtHostDialogs(rpcProtocol); + const extHostStatusBar = new ExtHostStatusBar(rpcProtocol); + const extHostProgress = new ExtHostProgress(rpcProtocol.getProxy(MainContext.MainThreadProgress)); + const extHostOutputService = new ExtHostOutputService(rpcProtocol); + const extHostLanguages = new ExtHostLanguages(rpcProtocol); // Register API-ish commands ExtHostApiCommands.register(extHostCommands); diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 6c64bc0b62d..16f72f8a27a 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -113,7 +113,6 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { private readonly _barrier: Barrier; private readonly _registry: ExtensionDescriptionRegistry; - private readonly _threadService: IExtHostContext; private readonly _mainThreadTelemetry: MainThreadTelemetryShape; private readonly _storage: ExtHostStorage; private readonly _storagePath: ExtensionStoragePath; @@ -126,7 +125,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { * This class is constructed manually because it is a service, so it doesn't use any ctor injection */ constructor(initData: IInitData, - threadService: IExtHostContext, + extHostContext: IExtHostContext, extHostWorkspace: ExtHostWorkspace, extHostConfiguration: ExtHostConfiguration, logService: ILogService, @@ -134,17 +133,16 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { ) { this._barrier = new Barrier(); this._registry = new ExtensionDescriptionRegistry(initData.extensions); - this._threadService = threadService; this._logService = logService; - this._mainThreadTelemetry = threadService.getProxy(MainContext.MainThreadTelemetry); - this._storage = new ExtHostStorage(threadService); + this._mainThreadTelemetry = extHostContext.getProxy(MainContext.MainThreadTelemetry); + this._storage = new ExtHostStorage(extHostContext); this._storagePath = new ExtensionStoragePath(initData.workspace, initData.environment); - this._proxy = this._threadService.getProxy(MainContext.MainThreadExtensionService); + this._proxy = extHostContext.getProxy(MainContext.MainThreadExtensionService); this._activator = null; this._extHostLogService = new ExtHostLogService(environmentService); // initialize API first (i.e. do not release barrier until the API is initialized) - const apiFactory = createApiFactory(initData, threadService, extHostWorkspace, extHostConfiguration, this, logService); + const apiFactory = createApiFactory(initData, extHostContext, extHostWorkspace, extHostConfiguration, this, logService); initializeExtensionApi(this, apiFactory).then(() => { diff --git a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts index 3f9fbb4d480..728be6d38ec 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts @@ -13,7 +13,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as types from 'vs/workbench/api/node/extHostTypes'; import * as EditorCommon from 'vs/editor/common/editorCommon'; import { Model as EditorModel } from 'vs/editor/common/model/model'; -import { TestRPCProtocol } from './testThreadService'; +import { TestRPCProtocol } from './testRPCProtocol'; import { MarkerService } from 'vs/platform/markers/common/markerService'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; @@ -45,7 +45,7 @@ const model: EditorCommon.IModel = EditorModel.createFromString( undefined, URI.parse('far://testing/file.b')); -let threadService: TestRPCProtocol; +let rpcProtocol: TestRPCProtocol; let extHost: ExtHostLanguageFeatures; let mainThread: MainThreadLanguageFeatures; let commands: ExtHostCommands; @@ -63,7 +63,7 @@ suite('ExtHostLanguageFeatureCommands', function () { let inst: IInstantiationService; { let instantiationService = new TestInstantiationService(); - threadService = new TestRPCProtocol(); + rpcProtocol = new TestRPCProtocol(); instantiationService.stub(IHeapService, { _serviceBrand: undefined, trackRecursive(args) { @@ -98,7 +98,7 @@ suite('ExtHostLanguageFeatureCommands', function () { inst = instantiationService; } - const extHostDocumentsAndEditors = new ExtHostDocumentsAndEditors(threadService); + const extHostDocumentsAndEditors = new ExtHostDocumentsAndEditors(rpcProtocol); extHostDocumentsAndEditors.$acceptDocumentsAndEditorsDelta({ addedDocuments: [{ isDirty: false, @@ -109,25 +109,25 @@ suite('ExtHostLanguageFeatureCommands', function () { EOL: model.getEOL(), }] }); - const extHostDocuments = new ExtHostDocuments(threadService, extHostDocumentsAndEditors); - threadService.set(ExtHostContext.ExtHostDocuments, extHostDocuments); + const extHostDocuments = new ExtHostDocuments(rpcProtocol, extHostDocumentsAndEditors); + rpcProtocol.set(ExtHostContext.ExtHostDocuments, extHostDocuments); const heapService = new ExtHostHeapService(); - commands = new ExtHostCommands(threadService, heapService, new NullLogService()); - threadService.set(ExtHostContext.ExtHostCommands, commands); - threadService.set(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); + commands = new ExtHostCommands(rpcProtocol, heapService, new NullLogService()); + rpcProtocol.set(ExtHostContext.ExtHostCommands, commands); + rpcProtocol.set(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, rpcProtocol)); ExtHostApiCommands.register(commands); - const diagnostics = new ExtHostDiagnostics(threadService); - threadService.set(ExtHostContext.ExtHostDiagnostics, diagnostics); + const diagnostics = new ExtHostDiagnostics(rpcProtocol); + rpcProtocol.set(ExtHostContext.ExtHostDiagnostics, diagnostics); - extHost = new ExtHostLanguageFeatures(threadService, extHostDocuments, commands, heapService, diagnostics); - threadService.set(ExtHostContext.ExtHostLanguageFeatures, extHost); + extHost = new ExtHostLanguageFeatures(rpcProtocol, extHostDocuments, commands, heapService, diagnostics); + rpcProtocol.set(ExtHostContext.ExtHostLanguageFeatures, extHost); - mainThread = threadService.set(MainContext.MainThreadLanguageFeatures, inst.createInstance(MainThreadLanguageFeatures, threadService)); + mainThread = rpcProtocol.set(MainContext.MainThreadLanguageFeatures, inst.createInstance(MainThreadLanguageFeatures, rpcProtocol)); - threadService.sync().then(done, done); + rpcProtocol.sync().then(done, done); }); suiteTeardown(() => { @@ -140,7 +140,7 @@ suite('ExtHostLanguageFeatureCommands', function () { while (disposables.length) { disposables.pop().dispose(); } - threadService.sync() + rpcProtocol.sync() .then(() => done(), err => done(err)); }); @@ -154,13 +154,11 @@ suite('ExtHostLanguageFeatureCommands', function () { commands.executeCommand('vscode.executeWorkspaceSymbolProvider', true) ]; - // threadService.sync().then(() => { TPromise.join(promises).then(undefined, (err: any[]) => { assert.equal(err.length, 4); done(); return []; }); - // }); }); test('WorkspaceSymbols, back and forth', function (done) { @@ -182,7 +180,7 @@ suite('ExtHostLanguageFeatureCommands', function () { } })); - threadService.sync().then(() => { + rpcProtocol.sync().then(() => { commands.executeCommand('vscode.executeWorkspaceSymbolProvider', 'testing').then(value => { for (let info of value) { @@ -204,11 +202,11 @@ suite('ExtHostLanguageFeatureCommands', function () { } })); - await threadService.sync(); + await rpcProtocol.sync(); let symbols = await commands.executeCommand('vscode.executeWorkspaceSymbolProvider', ''); assert.equal(symbols.length, 1); - await threadService.sync(); + await rpcProtocol.sync(); symbols = await commands.executeCommand('vscode.executeWorkspaceSymbolProvider', '*'); assert.equal(symbols.length, 1); }); @@ -223,13 +221,11 @@ suite('ExtHostLanguageFeatureCommands', function () { commands.executeCommand('vscode.executeDefinitionProvider', true, false) ]; - // threadService.sync().then(() => { TPromise.join(promises).then(undefined, (err: any[]) => { assert.equal(err.length, 4); done(); return []; }); - // }); }); test('Definition, back and forth', function () { @@ -249,7 +245,7 @@ suite('ExtHostLanguageFeatureCommands', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return commands.executeCommand('vscode.executeDefinitionProvider', model.uri, new types.Position(0, 0)).then(values => { assert.equal(values.length, 4); for (let v of values) { @@ -295,7 +291,7 @@ suite('ExtHostLanguageFeatureCommands', function () { } })); - threadService.sync().then(() => { + rpcProtocol.sync().then(() => { commands.executeCommand('vscode.executeDocumentSymbolProvider', model.uri).then(values => { assert.equal(values.length, 2); let [first, second] = values; @@ -325,7 +321,7 @@ suite('ExtHostLanguageFeatureCommands', function () { } }, [])); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return commands.executeCommand('vscode.executeCompletionItemProvider', model.uri, new types.Position(0, 4)).then(list => { assert.ok(list instanceof types.CompletionList); @@ -375,7 +371,7 @@ suite('ExtHostLanguageFeatureCommands', function () { } }, [])); - threadService.sync().then(() => { + rpcProtocol.sync().then(() => { return commands.executeCommand('vscode.executeCompletionItemProvider', model.uri, new types.Position(0, 4)).then(list => { assert.ok(list instanceof types.CompletionList); assert.equal(list.isIncomplete, true); @@ -393,7 +389,7 @@ suite('ExtHostLanguageFeatureCommands', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return commands.executeCommand('vscode.executeCodeActionProvider', model.uri, new types.Range(0, 0, 1, 1)).then(value => { assert.equal(value.length, 1); let [first] = value; @@ -420,7 +416,7 @@ suite('ExtHostLanguageFeatureCommands', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return commands.executeCommand('vscode.executeCodeLensProvider', model.uri).then(value => { assert.equal(value.length, 1); let [first] = value; @@ -442,7 +438,7 @@ suite('ExtHostLanguageFeatureCommands', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return commands.executeCommand('vscode.executeLinkProvider', model.uri).then(value => { assert.equal(value.length, 1); let [first] = value; diff --git a/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts index 4a63beb1958..701e96bc603 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts @@ -9,7 +9,7 @@ import * as assert from 'assert'; import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; import { MainThreadCommandsShape } from 'vs/workbench/api/node/extHost.protocol'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; -import { OneGetThreadService } from './testThreadService'; +import { SingleProxyRPCProtocol } from './testRPCProtocol'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; import { NullLogService } from 'vs/platform/log/common/log'; @@ -28,7 +28,7 @@ suite('ExtHostCommands', function () { } }; - const commands = new ExtHostCommands(OneGetThreadService(shape), undefined, new NullLogService()); + const commands = new ExtHostCommands(SingleProxyRPCProtocol(shape), undefined, new NullLogService()); commands.registerCommand('foo', (): any => { }).dispose(); assert.equal(lastUnregister, 'foo'); assert.equal(CommandsRegistry.getCommand('foo'), undefined); @@ -48,7 +48,7 @@ suite('ExtHostCommands', function () { } }; - const commands = new ExtHostCommands(OneGetThreadService(shape), undefined, new NullLogService()); + const commands = new ExtHostCommands(SingleProxyRPCProtocol(shape), undefined, new NullLogService()); const reg = commands.registerCommand('foo', (): any => { }); reg.dispose(); reg.dispose(); diff --git a/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts b/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts index 0601b4b7f74..9449ad6c56a 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts @@ -12,7 +12,7 @@ import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration import { MainThreadConfigurationShape, IConfigurationInitData } from 'vs/workbench/api/node/extHost.protocol'; import { TPromise } from 'vs/base/common/winjs.base'; import { ConfigurationModel } from 'vs/platform/configuration/common/configurationModels'; -import { TestThreadService } from './testThreadService'; +import { TestRPCProtocol } from './testRPCProtocol'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; import { IWorkspaceFolder, WorkspaceFolder } from 'vs/platform/workspace/common/workspace'; import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; @@ -31,7 +31,7 @@ suite('ExtHostConfiguration', function () { if (!shape) { shape = new class extends mock() { }; } - return new ExtHostConfiguration(shape, new ExtHostWorkspace(new TestThreadService(), null), createConfigurationData(contents)); + return new ExtHostConfiguration(shape, new ExtHostWorkspace(new TestRPCProtocol(), null), createConfigurationData(contents)); } function createConfigurationData(contents: any): IConfigurationInitData { @@ -135,7 +135,7 @@ suite('ExtHostConfiguration', function () { test('inspect in no workspace context', function () { const testObject = new ExtHostConfiguration( new class extends mock() { }, - new ExtHostWorkspace(new TestThreadService(), null), + new ExtHostWorkspace(new TestRPCProtocol(), null), { defaults: new ConfigurationModel({ 'editor': { @@ -177,7 +177,7 @@ suite('ExtHostConfiguration', function () { folders[workspaceUri.toString()] = workspace; const testObject = new ExtHostConfiguration( new class extends mock() { }, - new ExtHostWorkspace(new TestThreadService(), { + new ExtHostWorkspace(new TestRPCProtocol(), { 'id': 'foo', 'folders': [aWorkspaceFolder(URI.file('foo'), 0)], 'name': 'foo' @@ -250,7 +250,7 @@ suite('ExtHostConfiguration', function () { const testObject = new ExtHostConfiguration( new class extends mock() { }, - new ExtHostWorkspace(new TestThreadService(), { + new ExtHostWorkspace(new TestRPCProtocol(), { 'id': 'foo', 'folders': [aWorkspaceFolder(firstRoot, 0), aWorkspaceFolder(secondRoot, 1)], 'name': 'foo' @@ -458,7 +458,7 @@ suite('ExtHostConfiguration', function () { const workspaceFolder = aWorkspaceFolder(URI.file('folder1'), 0); const testObject = new ExtHostConfiguration( new class extends mock() { }, - new ExtHostWorkspace(new TestThreadService(), { + new ExtHostWorkspace(new TestRPCProtocol(), { 'id': 'foo', 'folders': [workspaceFolder], 'name': 'foo' diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts index 290c662d70a..a4c0366b6e4 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts @@ -12,7 +12,7 @@ import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/node/extHostDocumen import { TextDocumentSaveReason, TextEdit, Position, EndOfLine } from 'vs/workbench/api/node/extHostTypes'; import { MainThreadEditorsShape, IWorkspaceResourceEdit } from 'vs/workbench/api/node/extHost.protocol'; import { ExtHostDocumentSaveParticipant } from 'vs/workbench/api/node/extHostDocumentSaveParticipant'; -import { OneGetThreadService } from './testThreadService'; +import { SingleProxyRPCProtocol } from './testRPCProtocol'; import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import * as vscode from 'vscode'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; @@ -37,7 +37,7 @@ suite('ExtHostDocumentSaveParticipant', () => { }; setup(() => { - const documentsAndEditors = new ExtHostDocumentsAndEditors(OneGetThreadService(null)); + const documentsAndEditors = new ExtHostDocumentsAndEditors(SingleProxyRPCProtocol(null)); documentsAndEditors.$acceptDocumentsAndEditorsDelta({ addedDocuments: [{ isDirty: false, @@ -48,7 +48,7 @@ suite('ExtHostDocumentSaveParticipant', () => { EOL: '\n', }] }); - documents = new ExtHostDocuments(OneGetThreadService(null), documentsAndEditors); + documents = new ExtHostDocuments(SingleProxyRPCProtocol(null), documentsAndEditors); }); test('no listeners, no problem', () => { diff --git a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts index f5d4b48b559..342f7ea9407 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts @@ -14,7 +14,7 @@ import * as EditorCommon from 'vs/editor/common/editorCommon'; import { Model as EditorModel } from 'vs/editor/common/model/model'; import { Position as EditorPosition } from 'vs/editor/common/core/position'; import { Range as EditorRange } from 'vs/editor/common/core/range'; -import { TestThreadService } from './testThreadService'; +import { TestRPCProtocol } from './testRPCProtocol'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { MarkerService } from 'vs/platform/markers/common/markerService'; import { ExtHostLanguageFeatures } from 'vs/workbench/api/node/extHostLanguageFeatures'; @@ -60,14 +60,14 @@ const model: EditorCommon.IModel = EditorModel.createFromString( let extHost: ExtHostLanguageFeatures; let mainThread: MainThreadLanguageFeatures; let disposables: vscode.Disposable[] = []; -let threadService: TestThreadService; +let rpcProtocol: TestRPCProtocol; let originalErrorHandler: (e: any) => any; suite('ExtHostLanguageFeatures', function () { suiteSetup(() => { - threadService = new TestThreadService(); + rpcProtocol = new TestRPCProtocol(); // Use IInstantiationService to get typechecking when instantiating let inst: IInstantiationService; @@ -87,7 +87,7 @@ suite('ExtHostLanguageFeatures', function () { originalErrorHandler = errorHandler.getUnexpectedErrorHandler(); setUnexpectedErrorHandler(() => { }); - const extHostDocumentsAndEditors = new ExtHostDocumentsAndEditors(threadService); + const extHostDocumentsAndEditors = new ExtHostDocumentsAndEditors(rpcProtocol); extHostDocumentsAndEditors.$acceptDocumentsAndEditorsDelta({ addedDocuments: [{ isDirty: false, @@ -98,22 +98,22 @@ suite('ExtHostLanguageFeatures', function () { EOL: model.getEOL(), }] }); - const extHostDocuments = new ExtHostDocuments(threadService, extHostDocumentsAndEditors); - threadService.set(ExtHostContext.ExtHostDocuments, extHostDocuments); + const extHostDocuments = new ExtHostDocuments(rpcProtocol, extHostDocumentsAndEditors); + rpcProtocol.set(ExtHostContext.ExtHostDocuments, extHostDocuments); const heapService = new ExtHostHeapService(); - const commands = new ExtHostCommands(threadService, heapService, new NullLogService()); - threadService.set(ExtHostContext.ExtHostCommands, commands); - threadService.setTestInstance(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); + const commands = new ExtHostCommands(rpcProtocol, heapService, new NullLogService()); + rpcProtocol.set(ExtHostContext.ExtHostCommands, commands); + rpcProtocol.set(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, rpcProtocol)); - const diagnostics = new ExtHostDiagnostics(threadService); - threadService.set(ExtHostContext.ExtHostDiagnostics, diagnostics); + const diagnostics = new ExtHostDiagnostics(rpcProtocol); + rpcProtocol.set(ExtHostContext.ExtHostDiagnostics, diagnostics); - extHost = new ExtHostLanguageFeatures(threadService, extHostDocuments, commands, heapService, diagnostics); - threadService.set(ExtHostContext.ExtHostLanguageFeatures, extHost); + extHost = new ExtHostLanguageFeatures(rpcProtocol, extHostDocuments, commands, heapService, diagnostics); + rpcProtocol.set(ExtHostContext.ExtHostLanguageFeatures, extHost); - mainThread = threadService.setTestInstance(MainContext.MainThreadLanguageFeatures, inst.createInstance(MainThreadLanguageFeatures, threadService)); + mainThread = rpcProtocol.set(MainContext.MainThreadLanguageFeatures, inst.createInstance(MainThreadLanguageFeatures, rpcProtocol)); }); suiteTeardown(() => { @@ -126,7 +126,7 @@ suite('ExtHostLanguageFeatures', function () { while (disposables.length) { disposables.pop().dispose(); } - return threadService.sync(); + return rpcProtocol.sync(); }); // --- outline @@ -139,10 +139,10 @@ suite('ExtHostLanguageFeatures', function () { } }); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { assert.equal(DocumentSymbolProviderRegistry.all(model).length, 1); d1.dispose(); - return threadService.sync(); + return rpcProtocol.sync(); }); }); @@ -159,7 +159,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getDocumentSymbols(model).then(value => { assert.equal(value.entries.length, 1); @@ -174,7 +174,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getDocumentSymbols(model).then(value => { assert.equal(value.entries.length, 1); @@ -201,7 +201,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getCodeLensData(model).then(value => { assert.equal(value.length, 1); }); @@ -221,7 +221,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getCodeLensData(model).then(value => { assert.equal(value.length, 1); @@ -245,7 +245,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getCodeLensData(model).then(value => { assert.equal(value.length, 1); @@ -272,7 +272,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getDefinitionsAtPosition(model, new EditorPosition(1, 1)).then(value => { assert.equal(value.length, 1); @@ -296,7 +296,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getDefinitionsAtPosition(model, new EditorPosition(1, 1)).then(value => { assert.equal(value.length, 2); @@ -318,7 +318,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getDefinitionsAtPosition(model, new EditorPosition(1, 1)).then(value => { assert.equal(value.length, 2); @@ -343,7 +343,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getDefinitionsAtPosition(model, new EditorPosition(1, 1)).then(value => { assert.equal(value.length, 1); @@ -361,7 +361,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getImplementationsAtPosition(model, new EditorPosition(1, 1)).then(value => { assert.equal(value.length, 1); let [entry] = value; @@ -381,7 +381,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getTypeDefinitionsAtPosition(model, new EditorPosition(1, 1)).then(value => { assert.equal(value.length, 1); let [entry] = value; @@ -401,7 +401,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { getHover(model, new EditorPosition(1, 1)).then(value => { assert.equal(value.length, 1); let [entry] = value; @@ -419,7 +419,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { getHover(model, new EditorPosition(1, 1)).then(value => { assert.equal(value.length, 1); @@ -444,7 +444,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getHover(model, new EditorPosition(1, 1)).then(value => { assert.equal(value.length, 2); let [first, second] = value as Hover[]; @@ -468,7 +468,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { getHover(model, new EditorPosition(1, 1)).then(value => { @@ -487,7 +487,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getOccurrencesAtPosition(model, new EditorPosition(1, 2)).then(value => { assert.equal(value.length, 1); @@ -511,7 +511,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getOccurrencesAtPosition(model, new EditorPosition(1, 2)).then(value => { assert.equal(value.length, 1); @@ -535,7 +535,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getOccurrencesAtPosition(model, new EditorPosition(1, 2)).then(value => { assert.equal(value.length, 1); @@ -560,7 +560,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getOccurrencesAtPosition(model, new EditorPosition(1, 2)).then(value => { assert.equal(value.length, 1); @@ -584,7 +584,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return provideReferences(model, new EditorPosition(1, 2)).then(value => { assert.equal(value.length, 2); @@ -604,7 +604,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return provideReferences(model, new EditorPosition(1, 2)).then(value => { assert.equal(value.length, 1); @@ -630,7 +630,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return provideReferences(model, new EditorPosition(1, 2)).then(value => { assert.equal(value.length, 1); @@ -652,7 +652,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getCodeActions(model, model.getFullModelRange()).then(value => { assert.equal(value.length, 2); @@ -677,7 +677,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getCodeActions(model, model.getFullModelRange()).then(value => { assert.equal(value.length, 1); }); @@ -697,7 +697,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getCodeActions(model, model.getFullModelRange()).then(value => { assert.equal(value.length, 1); }); @@ -720,7 +720,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getWorkspaceSymbols('').then(value => { assert.equal(value.length, 1); @@ -742,7 +742,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return rename(model, new EditorPosition(1, 1), 'newName').then(value => { throw Error(); @@ -760,7 +760,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return rename(model, new EditorPosition(1, 1), 'newName').then(value => { assert.equal(value.rejectReason, 'evil'); @@ -784,7 +784,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return rename(model, new EditorPosition(1, 1), 'newName').then(value => { assert.equal(value.edits.length, 1); @@ -809,7 +809,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return rename(model, new EditorPosition(1, 1), 'newName').then(value => { assert.equal(value.edits.length, 2); // least relevant renamer @@ -837,7 +837,7 @@ suite('ExtHostLanguageFeatures', function () { } }, [])); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return provideSignatureHelp(model, new EditorPosition(1, 1)).then(value => { assert.ok(value); @@ -852,7 +852,7 @@ suite('ExtHostLanguageFeatures', function () { } }, [])); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return provideSignatureHelp(model, new EditorPosition(1, 1)).then(value => { assert.equal(value, undefined); @@ -876,7 +876,7 @@ suite('ExtHostLanguageFeatures', function () { } }, [])); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return provideSuggestionItems(model, new EditorPosition(1, 1), 'none').then(value => { assert.equal(value.length, 1); assert.equal(value[0].suggestion.insertText, 'testing2'); @@ -898,7 +898,7 @@ suite('ExtHostLanguageFeatures', function () { } }, [])); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return provideSuggestionItems(model, new EditorPosition(1, 1), 'none').then(value => { assert.equal(value.length, 1); assert.equal(value[0].suggestion.insertText, 'weak-selector'); @@ -920,7 +920,7 @@ suite('ExtHostLanguageFeatures', function () { } }, [])); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return provideSuggestionItems(model, new EditorPosition(1, 1), 'none').then(value => { assert.equal(value.length, 2); assert.equal(value[0].suggestion.insertText, 'strong-1'); // sort by label @@ -944,7 +944,7 @@ suite('ExtHostLanguageFeatures', function () { }, [])); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return provideSuggestionItems(model, new EditorPosition(1, 1), 'none').then(value => { assert.equal(value[0].container.incomplete, undefined); @@ -960,7 +960,7 @@ suite('ExtHostLanguageFeatures', function () { } }, [])); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { provideSuggestionItems(model, new EditorPosition(1, 1), 'none').then(value => { assert.equal(value[0].container.incomplete, true); @@ -977,7 +977,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getDocumentFormattingEdits(model, { insertSpaces: true, tabSize: 4 }).then(value => { assert.equal(value.length, 2); let [first, second] = value; @@ -998,7 +998,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getDocumentFormattingEdits(model, { insertSpaces: true, tabSize: 4 }); }); }); @@ -1016,7 +1016,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getDocumentFormattingEdits(model, { insertSpaces: true, tabSize: 4 }).then(value => { assert.equal(value.length, 1); let [first] = value; @@ -1033,7 +1033,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getDocumentRangeFormattingEdits(model, new EditorRange(1, 1, 1, 1), { insertSpaces: true, tabSize: 4 }).then(value => { assert.equal(value.length, 1); let [first] = value; @@ -1054,7 +1054,7 @@ suite('ExtHostLanguageFeatures', function () { return [new types.TextEdit(new types.Range(0, 0, 1, 1), 'doc')]; } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getDocumentRangeFormattingEdits(model, new EditorRange(1, 1, 1, 1), { insertSpaces: true, tabSize: 4 }).then(value => { assert.equal(value.length, 1); let [first] = value; @@ -1070,7 +1070,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getDocumentRangeFormattingEdits(model, new EditorRange(1, 1, 1, 1), { insertSpaces: true, tabSize: 4 }); }); }); @@ -1083,7 +1083,7 @@ suite('ExtHostLanguageFeatures', function () { } }, [';'])); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getOnTypeFormattingEdits(model, new EditorPosition(1, 1), ';', { insertSpaces: true, tabSize: 2 }).then(value => { assert.equal(value.length, 1); let [first] = value; @@ -1102,7 +1102,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getLinks(model).then(value => { assert.equal(value.length, 1); let [first] = value; @@ -1127,7 +1127,7 @@ suite('ExtHostLanguageFeatures', function () { } })); - return threadService.sync().then(() => { + return rpcProtocol.sync().then(() => { return getLinks(model).then(value => { assert.equal(value.length, 1); let [first] = value; diff --git a/src/vs/workbench/test/electron-browser/api/extHostTextEditors.test.ts b/src/vs/workbench/test/electron-browser/api/extHostTextEditors.test.ts index 21a7692717c..b5ec3f55274 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostTextEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostTextEditors.test.ts @@ -11,7 +11,7 @@ import { MainContext, MainThreadEditorsShape, IWorkspaceResourceEdit } from 'vs/ import URI from 'vs/base/common/uri'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/node/extHostDocumentsAndEditors'; -import { OneGetThreadService, TestThreadService } from 'vs/workbench/test/electron-browser/api/testThreadService'; +import { SingleProxyRPCProtocol, TestRPCProtocol } from 'vs/workbench/test/electron-browser/api/testRPCProtocol'; import { ExtHostEditors } from 'vs/workbench/api/node/extHostTextEditors'; suite('ExtHostTextEditors.applyWorkspaceEdit', () => { @@ -23,14 +23,14 @@ suite('ExtHostTextEditors.applyWorkspaceEdit', () => { setup(() => { workspaceResourceEdits = null; - let threadService = new TestThreadService(); - threadService.setTestInstance(MainContext.MainThreadEditors, new class extends mock() { + let rpcProtocol = new TestRPCProtocol(); + rpcProtocol.set(MainContext.MainThreadEditors, new class extends mock() { $tryApplyWorkspaceEdit(_workspaceResourceEdits: IWorkspaceResourceEdit[]): TPromise { workspaceResourceEdits = _workspaceResourceEdits; return TPromise.as(true); } }); - const documentsAndEditors = new ExtHostDocumentsAndEditors(OneGetThreadService(null)); + const documentsAndEditors = new ExtHostDocumentsAndEditors(SingleProxyRPCProtocol(null)); documentsAndEditors.$acceptDocumentsAndEditorsDelta({ addedDocuments: [{ isDirty: false, @@ -41,7 +41,7 @@ suite('ExtHostTextEditors.applyWorkspaceEdit', () => { EOL: '\n', }] }); - editors = new ExtHostEditors(threadService, documentsAndEditors); + editors = new ExtHostEditors(rpcProtocol, documentsAndEditors); }); test('uses version id if document available', () => { diff --git a/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts b/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts index 9b1ecf276cf..b62cac7b7e0 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts @@ -11,7 +11,7 @@ import { ExtHostTreeViews } from 'vs/workbench/api/node/extHostTreeViews'; import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; import { MainThreadTreeViewsShape, MainContext } from 'vs/workbench/api/node/extHost.protocol'; import { TreeDataProvider, TreeItem } from 'vscode'; -import { TestThreadService } from './testThreadService'; +import { TestRPCProtocol } from './testRPCProtocol'; import { ExtHostHeapService } from 'vs/workbench/api/node/extHostHeapService'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { MainThreadCommands } from 'vs/workbench/api/electron-browser/mainThreadCommands'; @@ -56,7 +56,7 @@ suite('ExtHostTreeView', function () { labels = {}; nodes = {}; - let threadService = new TestThreadService(); + let rpcProtocol = new TestRPCProtocol(); // Use IInstantiationService to get typechecking when instantiating let inst: IInstantiationService; { @@ -64,9 +64,9 @@ suite('ExtHostTreeView', function () { inst = instantiationService; } - threadService.setTestInstance(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); + rpcProtocol.set(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, rpcProtocol)); target = new RecordingShape(); - testObject = new ExtHostTreeViews(target, new ExtHostCommands(threadService, new ExtHostHeapService(), new NullLogService())); + testObject = new ExtHostTreeViews(target, new ExtHostCommands(rpcProtocol, new ExtHostHeapService(), new NullLogService())); onDidChangeTreeNode = new Emitter<{ key: string }>(); onDidChangeTreeKey = new Emitter(); testObject.registerTreeDataProvider('testNodeTreeProvider', aNodeTreeDataProvider()); diff --git a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts index 73399a9bd37..75f5cb5effe 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts @@ -9,7 +9,7 @@ import * as assert from 'assert'; import URI from 'vs/base/common/uri'; import { basename } from 'path'; import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; -import { TestThreadService } from './testThreadService'; +import { TestRPCProtocol } from './testRPCProtocol'; import { normalize } from 'vs/base/common/paths'; import { IWorkspaceFolderData } from 'vs/platform/workspace/common/workspace'; @@ -26,7 +26,7 @@ suite('ExtHostWorkspace', function () { test('asRelativePath', function () { - const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', folders: [aWorkspaceFolderData(URI.file('/Coding/Applications/NewsWoWBot'), 0)], name: 'Test' }); + const ws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', folders: [aWorkspaceFolderData(URI.file('/Coding/Applications/NewsWoWBot'), 0)], name: 'Test' }); assertAsRelativePath(ws, '/Coding/Applications/NewsWoWBot/bernd/das/brot', 'bernd/das/brot'); assertAsRelativePath(ws, '/Apps/DartPubCache/hosted/pub.dartlang.org/convert-2.0.1/lib/src/hex.dart', @@ -40,7 +40,7 @@ suite('ExtHostWorkspace', function () { test('asRelativePath, same paths, #11402', function () { const root = '/home/aeschli/workspaces/samples/docker'; const input = '/home/aeschli/workspaces/samples/docker'; - const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', folders: [aWorkspaceFolderData(URI.file(root), 0)], name: 'Test' }); + const ws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', folders: [aWorkspaceFolderData(URI.file(root), 0)], name: 'Test' }); assertAsRelativePath(ws, (input), input); @@ -49,20 +49,20 @@ suite('ExtHostWorkspace', function () { }); test('asRelativePath, no workspace', function () { - const ws = new ExtHostWorkspace(new TestThreadService(), null); + const ws = new ExtHostWorkspace(new TestRPCProtocol(), null); assertAsRelativePath(ws, (''), ''); assertAsRelativePath(ws, ('/foo/bar'), '/foo/bar'); }); test('asRelativePath, multiple folders', function () { - const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', folders: [aWorkspaceFolderData(URI.file('/Coding/One'), 0), aWorkspaceFolderData(URI.file('/Coding/Two'), 1)], name: 'Test' }); + const ws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', folders: [aWorkspaceFolderData(URI.file('/Coding/One'), 0), aWorkspaceFolderData(URI.file('/Coding/Two'), 1)], name: 'Test' }); assertAsRelativePath(ws, '/Coding/One/file.txt', 'One/file.txt'); assertAsRelativePath(ws, '/Coding/Two/files/out.txt', 'Two/files/out.txt'); assertAsRelativePath(ws, '/Coding/Two2/files/out.txt', '/Coding/Two2/files/out.txt'); }); test('slightly inconsistent behaviour of asRelativePath and getWorkspaceFolder, #31553', function () { - const mrws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', folders: [aWorkspaceFolderData(URI.file('/Coding/One'), 0), aWorkspaceFolderData(URI.file('/Coding/Two'), 1)], name: 'Test' }); + const mrws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', folders: [aWorkspaceFolderData(URI.file('/Coding/One'), 0), aWorkspaceFolderData(URI.file('/Coding/Two'), 1)], name: 'Test' }); assertAsRelativePath(mrws, '/Coding/One/file.txt', 'One/file.txt'); assertAsRelativePath(mrws, '/Coding/One/file.txt', 'One/file.txt', true); @@ -74,7 +74,7 @@ suite('ExtHostWorkspace', function () { assertAsRelativePath(mrws, '/Coding/Two2/files/out.txt', '/Coding/Two2/files/out.txt', true); assertAsRelativePath(mrws, '/Coding/Two2/files/out.txt', '/Coding/Two2/files/out.txt', false); - const srws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', folders: [aWorkspaceFolderData(URI.file('/Coding/One'), 0)], name: 'Test' }); + const srws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', folders: [aWorkspaceFolderData(URI.file('/Coding/One'), 0)], name: 'Test' }); assertAsRelativePath(srws, '/Coding/One/file.txt', 'file.txt'); assertAsRelativePath(srws, '/Coding/One/file.txt', 'file.txt', false); assertAsRelativePath(srws, '/Coding/One/file.txt', 'One/file.txt', true); @@ -84,24 +84,24 @@ suite('ExtHostWorkspace', function () { }); test('getPath, legacy', function () { - let ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', name: 'Test', folders: [] }); + let ws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', name: 'Test', folders: [] }); assert.equal(ws.getPath(), undefined); - ws = new ExtHostWorkspace(new TestThreadService(), null); + ws = new ExtHostWorkspace(new TestRPCProtocol(), null); assert.equal(ws.getPath(), undefined); - ws = new ExtHostWorkspace(new TestThreadService(), undefined); + ws = new ExtHostWorkspace(new TestRPCProtocol(), undefined); assert.equal(ws.getPath(), undefined); - ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', name: 'Test', folders: [aWorkspaceFolderData(URI.file('Folder'), 0), aWorkspaceFolderData(URI.file('Another/Folder'), 1)] }); + ws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', name: 'Test', folders: [aWorkspaceFolderData(URI.file('Folder'), 0), aWorkspaceFolderData(URI.file('Another/Folder'), 1)] }); assert.equal(ws.getPath().replace(/\\/g, '/'), '/Folder'); - ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', name: 'Test', folders: [aWorkspaceFolderData(URI.file('/Folder'), 0)] }); + ws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', name: 'Test', folders: [aWorkspaceFolderData(URI.file('/Folder'), 0)] }); assert.equal(ws.getPath().replace(/\\/g, '/'), '/Folder'); }); test('WorkspaceFolder has name and index', function () { - const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', folders: [aWorkspaceFolderData(URI.file('/Coding/One'), 0), aWorkspaceFolderData(URI.file('/Coding/Two'), 1)], name: 'Test' }); + const ws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', folders: [aWorkspaceFolderData(URI.file('/Coding/One'), 0), aWorkspaceFolderData(URI.file('/Coding/Two'), 1)], name: 'Test' }); const [one, two] = ws.getWorkspaceFolders(); @@ -112,7 +112,7 @@ suite('ExtHostWorkspace', function () { }); test('getContainingWorkspaceFolder', function () { - const ws = new ExtHostWorkspace(new TestThreadService(), { + const ws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', name: 'Test', folders: [ @@ -160,7 +160,7 @@ suite('ExtHostWorkspace', function () { }); test('Multiroot change event should have a delta, #29641', function () { - let ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', name: 'Test', folders: [] }); + let ws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', name: 'Test', folders: [] }); let sub = ws.onDidChangeWorkspace(e => { assert.deepEqual(e.added, []); @@ -199,7 +199,7 @@ suite('ExtHostWorkspace', function () { }); test('Multiroot change event is immutable', function () { - let ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', name: 'Test', folders: [] }); + let ws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', name: 'Test', folders: [] }); let sub = ws.onDidChangeWorkspace(e => { assert.throws(() => { (e).added = []; @@ -213,7 +213,7 @@ suite('ExtHostWorkspace', function () { }); test('`vscode.workspace.getWorkspaceFolder(file)` don\'t return workspace folder when file open from command line. #36221', function () { - let ws = new ExtHostWorkspace(new TestThreadService(), { + let ws = new ExtHostWorkspace(new TestRPCProtocol(), { id: 'foo', name: 'Test', folders: [ aWorkspaceFolderData(URI.file('c:/Users/marek/Desktop/vsc_test/'), 0) ] diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadCommands.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadCommands.test.ts index 144bc7665b8..bc0f4d213f3 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadCommands.test.ts @@ -8,13 +8,13 @@ import * as assert from 'assert'; import { MainThreadCommands } from 'vs/workbench/api/electron-browser/mainThreadCommands'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; -import { OneGetThreadService } from './testThreadService'; +import { SingleProxyRPCProtocol } from './testRPCProtocol'; suite('MainThreadCommands', function () { test('dispose on unregister', function () { - const commands = new MainThreadCommands(OneGetThreadService(null), undefined); + const commands = new MainThreadCommands(SingleProxyRPCProtocol(null), undefined); assert.equal(CommandsRegistry.getCommand('foo'), undefined); // register @@ -28,7 +28,7 @@ suite('MainThreadCommands', function () { test('unregister all on dispose', function () { - const commands = new MainThreadCommands(OneGetThreadService(null), undefined); + const commands = new MainThreadCommands(SingleProxyRPCProtocol(null), undefined); assert.equal(CommandsRegistry.getCommand('foo'), undefined); commands.$registerCommand('foo'); diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadConfiguration.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadConfiguration.test.ts index b91637eeeae..4cf96c8b3e8 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadConfiguration.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadConfiguration.test.ts @@ -13,7 +13,7 @@ import { Extensions, IConfigurationRegistry, ConfigurationScope } from 'vs/platf import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { MainThreadConfiguration } from 'vs/workbench/api/electron-browser/mainThreadConfiguration'; -import { OneGetThreadService } from './testThreadService'; +import { SingleProxyRPCProtocol } from './testRPCProtocol'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; import { WorkspaceService } from 'vs/workbench/services/configuration/node/configurationService'; @@ -56,7 +56,7 @@ suite('MainThreadConfiguration', function () { test('update resource configuration without configuration target defaults to workspace in multi root workspace when no resource is provided', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.WORKSPACE }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$updateConfigurationOption(null, 'extHostConfiguration.resource', 'value', null); @@ -65,7 +65,7 @@ suite('MainThreadConfiguration', function () { test('update resource configuration without configuration target defaults to workspace in folder workspace when resource is provider', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.FOLDER }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$updateConfigurationOption(null, 'extHostConfiguration.resource', 'value', URI.file('abc')); @@ -74,7 +74,7 @@ suite('MainThreadConfiguration', function () { test('update resource configuration without configuration target defaults to workspace in folder workspace when no resource is provider', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.FOLDER }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$updateConfigurationOption(null, 'extHostConfiguration.resource', 'value', null); @@ -83,7 +83,7 @@ suite('MainThreadConfiguration', function () { test('update window configuration without configuration target defaults to workspace in multi root workspace when no resource is provided', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.WORKSPACE }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$updateConfigurationOption(null, 'extHostConfiguration.window', 'value', null); @@ -92,7 +92,7 @@ suite('MainThreadConfiguration', function () { test('update window configuration without configuration target defaults to workspace in multi root workspace when resource is provided', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.WORKSPACE }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$updateConfigurationOption(null, 'extHostConfiguration.window', 'value', URI.file('abc')); @@ -101,7 +101,7 @@ suite('MainThreadConfiguration', function () { test('update window configuration without configuration target defaults to workspace in folder workspace when resource is provider', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.FOLDER }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$updateConfigurationOption(null, 'extHostConfiguration.window', 'value', URI.file('abc')); @@ -110,7 +110,7 @@ suite('MainThreadConfiguration', function () { test('update window configuration without configuration target defaults to workspace in folder workspace when no resource is provider', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.FOLDER }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$updateConfigurationOption(null, 'extHostConfiguration.window', 'value', null); @@ -119,7 +119,7 @@ suite('MainThreadConfiguration', function () { test('update resource configuration without configuration target defaults to folder', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.WORKSPACE }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$updateConfigurationOption(null, 'extHostConfiguration.resource', 'value', URI.file('abc')); @@ -128,7 +128,7 @@ suite('MainThreadConfiguration', function () { test('update configuration with user configuration target', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.FOLDER }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$updateConfigurationOption(ConfigurationTarget.USER, 'extHostConfiguration.window', 'value', URI.file('abc')); @@ -137,7 +137,7 @@ suite('MainThreadConfiguration', function () { test('update configuration with workspace configuration target', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.FOLDER }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$updateConfigurationOption(ConfigurationTarget.WORKSPACE, 'extHostConfiguration.window', 'value', URI.file('abc')); @@ -146,7 +146,7 @@ suite('MainThreadConfiguration', function () { test('update configuration with folder configuration target', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.FOLDER }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$updateConfigurationOption(ConfigurationTarget.WORKSPACE_FOLDER, 'extHostConfiguration.window', 'value', URI.file('abc')); @@ -155,7 +155,7 @@ suite('MainThreadConfiguration', function () { test('remove resource configuration without configuration target defaults to workspace in multi root workspace when no resource is provided', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.WORKSPACE }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$removeConfigurationOption(null, 'extHostConfiguration.resource', null); @@ -164,7 +164,7 @@ suite('MainThreadConfiguration', function () { test('remove resource configuration without configuration target defaults to workspace in folder workspace when resource is provider', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.FOLDER }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$removeConfigurationOption(null, 'extHostConfiguration.resource', URI.file('abc')); @@ -173,7 +173,7 @@ suite('MainThreadConfiguration', function () { test('remove resource configuration without configuration target defaults to workspace in folder workspace when no resource is provider', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.FOLDER }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$removeConfigurationOption(null, 'extHostConfiguration.resource', null); @@ -182,7 +182,7 @@ suite('MainThreadConfiguration', function () { test('remove window configuration without configuration target defaults to workspace in multi root workspace when no resource is provided', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.WORKSPACE }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$removeConfigurationOption(null, 'extHostConfiguration.window', null); @@ -191,7 +191,7 @@ suite('MainThreadConfiguration', function () { test('remove window configuration without configuration target defaults to workspace in multi root workspace when resource is provided', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.WORKSPACE }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$removeConfigurationOption(null, 'extHostConfiguration.window', URI.file('abc')); @@ -200,7 +200,7 @@ suite('MainThreadConfiguration', function () { test('remove window configuration without configuration target defaults to workspace in folder workspace when resource is provider', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.FOLDER }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$removeConfigurationOption(null, 'extHostConfiguration.window', URI.file('abc')); @@ -209,7 +209,7 @@ suite('MainThreadConfiguration', function () { test('remove window configuration without configuration target defaults to workspace in folder workspace when no resource is provider', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.FOLDER }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$removeConfigurationOption(null, 'extHostConfiguration.window', null); @@ -218,7 +218,7 @@ suite('MainThreadConfiguration', function () { test('remove configuration without configuration target defaults to folder', function () { instantiationService.stub(IWorkspaceContextService, { getWorkbenchState: () => WorkbenchState.WORKSPACE }); - const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, OneGetThreadService(null)); + const testObject: MainThreadConfiguration = instantiationService.createInstance(MainThreadConfiguration, SingleProxyRPCProtocol(null)); testObject.$removeConfigurationOption(null, 'extHostConfiguration.resource', URI.file('abc')); diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts index d8fe85cff6b..efe09ddbb8d 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts @@ -7,7 +7,7 @@ import * as assert from 'assert'; import { MainThreadDocumentsAndEditors } from 'vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors'; -import { OneGetThreadService } from './testThreadService'; +import { SingleProxyRPCProtocol } from './testRPCProtocol'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; import { TestCodeEditorService } from 'vs/editor/test/browser/testCodeEditorService'; @@ -53,7 +53,7 @@ suite('MainThreadDocumentsAndEditors', () => { /* tslint:disable */ new MainThreadDocumentsAndEditors( - OneGetThreadService(new class extends mock() { + SingleProxyRPCProtocol(new class extends mock() { $acceptDocumentsAndEditorsDelta(delta) { deltas.push(delta); } }), modelService, diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts index a0b70a56dc7..73887be8ea3 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts @@ -7,7 +7,7 @@ import * as assert from 'assert'; import { MainThreadDocumentsAndEditors } from 'vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors'; -import { OneGetThreadService, TestThreadService } from './testThreadService'; +import { SingleProxyRPCProtocol, TestRPCProtocol } from './testRPCProtocol'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; import { TestCodeEditorService } from 'vs/editor/test/browser/testCodeEditorService'; @@ -52,18 +52,18 @@ suite('MainThreadEditors', () => { onEditorGroupMoved = Event.None; }; - const testThreadService = new TestThreadService(true); - testThreadService.setTestInstance(ExtHostContext.ExtHostDocuments, new class extends mock() { + const rpcProtocol = new TestRPCProtocol(); + rpcProtocol.set(ExtHostContext.ExtHostDocuments, new class extends mock() { $acceptModelChanged(): void { } }); - testThreadService.setTestInstance(ExtHostContext.ExtHostDocumentsAndEditors, new class extends mock() { + rpcProtocol.set(ExtHostContext.ExtHostDocumentsAndEditors, new class extends mock() { $acceptDocumentsAndEditorsDelta(): void { } }); const documentAndEditor = new MainThreadDocumentsAndEditors( - testThreadService, + rpcProtocol, modelService, textFileService, workbenchEditorService, @@ -77,7 +77,7 @@ suite('MainThreadEditors', () => { editors = new MainThreadEditors( documentAndEditor, - OneGetThreadService(null), + SingleProxyRPCProtocol(null), codeEditorService, workbenchEditorService, editorGroupService, diff --git a/src/vs/workbench/test/electron-browser/api/testThreadService.ts b/src/vs/workbench/test/electron-browser/api/testRPCProtocol.ts similarity index 52% rename from src/vs/workbench/test/electron-browser/api/testThreadService.ts rename to src/vs/workbench/test/electron-browser/api/testRPCProtocol.ts index 2c0f7438765..f2effd9e861 100644 --- a/src/vs/workbench/test/electron-browser/api/testThreadService.ts +++ b/src/vs/workbench/test/electron-browser/api/testRPCProtocol.ts @@ -10,7 +10,7 @@ import { ProxyIdentifier, IRPCProtocol } from 'vs/workbench/services/extensions/ import { CharCode } from 'vs/base/common/charCode'; import * as marshalling from 'vs/base/common/marshalling'; -export function OneGetThreadService(thing: any): IRPCProtocol { +export function SingleProxyRPCProtocol(thing: any): IRPCProtocol { return { getProxy(): T { return thing; @@ -24,142 +24,6 @@ export function OneGetThreadService(thing: any): IRPCProtocol { declare var Proxy; // TODO@TypeScript -export abstract class AbstractTestThreadService { - - private _isMain: boolean; - protected _locals: { [id: string]: any; }; - private _proxies: { [id: string]: any; } = Object.create(null); - - constructor(isMain: boolean) { - this._isMain = isMain; - this._locals = Object.create(null); - this._proxies = Object.create(null); - } - - public handle(rpcId: string, methodName: string, args: any[]): any { - if (!this._locals[rpcId]) { - throw new Error('Unknown actor ' + rpcId); - } - let actor = this._locals[rpcId]; - let method = actor[methodName]; - if (typeof method !== 'function') { - throw new Error('Unknown method ' + methodName + ' on actor ' + rpcId); - } - return method.apply(actor, args); - } - - get(identifier: ProxyIdentifier): T { - if (!this._proxies[identifier.id]) { - this._proxies[identifier.id] = this._createProxy(identifier.id); - } - return this._proxies[identifier.id]; - } - - private _createProxy(id: string): T { - let handler = { - get: (target, name) => { - return (...myArgs: any[]) => { - return this._callOnRemote(id, name, myArgs); - }; - } - }; - return new Proxy({}, handler); - } - - set(identifier: ProxyIdentifier, value: R): R { - if (identifier.isMain !== this._isMain) { - throw new Error('Mismatch in object registration!'); - } - this._locals[identifier.id] = value; - return value; - } - - protected abstract _callOnRemote(proxyId: string, path: string, args: any[]): TPromise; -} - -export class TestThreadService extends AbstractTestThreadService implements IRPCProtocol { - constructor(isMainProcess: boolean = false) { - super(isMainProcess); - } - - private _callCountValue: number = 0; - private _idle: Promise; - private _completeIdle: Function; - - private get _callCount(): number { - return this._callCountValue; - } - - private set _callCount(value: number) { - this._callCountValue = value; - if (this._callCountValue === 0) { - if (this._completeIdle) { - this._completeIdle(); - } - this._idle = undefined; - } - } - - sync(): Promise { - return new Promise((c) => { - setTimeout(c, 0); - }).then(() => { - if (this._callCount === 0) { - return undefined; - } - if (!this._idle) { - this._idle = new Promise((c, e) => { - this._completeIdle = c; - }); - } - return this._idle; - }); - } - - private _testInstances: { [id: string]: any; } = Object.create(null); - setTestInstance(identifier: ProxyIdentifier, value: T): T { - this._testInstances[identifier.id] = value; - return value; - } - - getProxy(identifier: ProxyIdentifier): T { - let id = identifier.id; - if (this._locals[id]) { - return this._locals[id]; - } - return super.get(identifier); - } - - protected _callOnRemote(proxyId: string, path: string, args: any[]): TPromise { - this._callCount++; - - return new TPromise((c) => { - setTimeout(c, 0); - }).then(() => { - const instance = this._testInstances[proxyId]; - let p: Thenable; - try { - let result = (instance[path]).apply(instance, args); - p = TPromise.is(result) ? result : TPromise.as(result); - } catch (err) { - p = TPromise.wrapError(err); - } - - return p.then(result => { - this._callCount--; - return result; - }, err => { - this._callCount--; - return TPromise.wrapError(err); - }); - }); - } - - public assertRegistered(identifiers: ProxyIdentifier[]): void { - throw new Error('Not implemented!'); - } -} - export class TestRPCProtocol implements IRPCProtocol { private _callCountValue: number = 0; From bcc46316b497d1a316dd47ae86481df3ca5784ee Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 18 Dec 2017 12:37:41 +0100 Subject: [PATCH 360/615] files - add a method to read content from a position --- src/vs/platform/files/common/files.ts | 6 +++++ .../services/files/node/fileService.ts | 10 ++++++++- .../files/test/node/fileService.test.ts | 22 +++++++++++++++++-- .../node/fixtures/service/small_umlaut.txt | 1 + 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 src/vs/workbench/services/files/test/node/fixtures/service/small_umlaut.txt diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index fd9c8e96784..ab62f52ccbe 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -506,6 +506,12 @@ export interface IResolveContentOptions { * The optional guessEncoding parameter allows to guess encoding from content of the file. */ autoGuessEncoding?: boolean; + + /** + * Is an integer specifying where to begin reading from in the file. If position is null, + * data will be read from the current file position. + */ + position?: number; } export interface IUpdateContentOptions { diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index aa3df9ae3a3..6a97004652e 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -441,10 +441,18 @@ export class FileService implements IFileService { } }; + let currentPosition: number = (options && options.position) || null; + const readChunk = () => { - fs.read(fd, chunkBuffer, 0, chunkBuffer.length, null, (err, bytesRead) => { + fs.read(fd, chunkBuffer, 0, chunkBuffer.length, currentPosition, (err, bytesRead) => { totalBytesRead += bytesRead; + if (typeof currentPosition === 'number') { + // if we received a position argument as option we need to ensure that + // we advance the position by the number of bytesread + currentPosition += bytesRead; + } + if (totalBytesRead > MAX_FILE_SIZE) { // stop when reading too much finish(new FileOperationError( diff --git a/src/vs/workbench/services/files/test/node/fileService.test.ts b/src/vs/workbench/services/files/test/node/fileService.test.ts index 615f13379ba..3a97a2a5cec 100644 --- a/src/vs/workbench/services/files/test/node/fileService.test.ts +++ b/src/vs/workbench/services/files/test/node/fileService.test.ts @@ -524,7 +524,7 @@ suite('FileService', () => { test('resolveFile', function (done: () => void) { service.resolveFile(uri.file(testDir), { resolveTo: [uri.file(path.join(testDir, 'deep'))] }).done(r => { - assert.equal(r.children.length, 7); + assert.equal(r.children.length, 8); const deep = utils.getByName(r, 'deep'); assert.equal(deep.children.length, 4); @@ -540,7 +540,7 @@ suite('FileService', () => { ]).then(res => { const r1 = res[0].stat; - assert.equal(r1.children.length, 7); + assert.equal(r1.children.length, 8); const deep = utils.getByName(r1, 'deep'); assert.equal(deep.children.length, 4); @@ -879,4 +879,22 @@ suite('FileService', () => { }); }); }); + + test('resolveContent - from position (ASCII)', function (done: () => void) { + const resource = uri.file(path.join(testDir, 'small.txt')); + + service.resolveContent(resource, { position: 6 }).done(content => { + assert.equal(content.value, 'File'); + done(); + }, error => onError(error, done)); + }); + + test('resolveContent - from position (with umlaut)', function (done: () => void) { + const resource = uri.file(path.join(testDir, 'small_umlaut.txt')); + + service.resolveContent(resource, { position: new Buffer('Small File with Ü').length }).done(content => { + assert.equal(content.value, 'mlaut'); + done(); + }, error => onError(error, done)); + }); }); diff --git a/src/vs/workbench/services/files/test/node/fixtures/service/small_umlaut.txt b/src/vs/workbench/services/files/test/node/fixtures/service/small_umlaut.txt new file mode 100644 index 00000000000..a01c1626b30 --- /dev/null +++ b/src/vs/workbench/services/files/test/node/fixtures/service/small_umlaut.txt @@ -0,0 +1 @@ +Small File with Ümlaut \ No newline at end of file From 2d5dde993364c337be275bedfdd4024d50c971e1 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 18 Dec 2017 14:31:38 +0100 Subject: [PATCH 361/615] fixes #40411 --- .../parts/scm/electron-browser/dirtydiffDecorator.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index 5f7fb1448e7..28aa792d98a 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -866,7 +866,8 @@ export class DirtyDiffModel { private _editorModel: IModel, @ISCMService private scmService: ISCMService, @IEditorWorkerService private editorWorkerService: IEditorWorkerService, - @ITextModelService private textModelResolverService: ITextModelService + @ITextModelService private textModelResolverService: ITextModelService, + @IConfigurationService private configurationService: IConfigurationService ) { this.diffDelayer = new ThrottledDelayer(200); @@ -927,7 +928,9 @@ export class DirtyDiffModel { return TPromise.as([]); // Files too large } - return this.editorWorkerService.computeDirtyDiff(originalURI, this._editorModel.uri, true); + const ignoreTrimWhitespace = this.configurationService.getValue('diffEditor.ignoreTrimWhitespace'); + + return this.editorWorkerService.computeDirtyDiff(originalURI, this._editorModel.uri, ignoreTrimWhitespace); }); } From 894dcea691a515bc2ef8a230f158e59237fa3d6c Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 18 Dec 2017 14:20:07 +0100 Subject: [PATCH 362/615] Require to use "-" when reading from stdin (#40424) * Require to use "-" when reading from stdin * cli - better help message * more narrow error handling * better data listener --- src/vs/code/node/cli.ts | 103 ++++++++++++++++------- src/vs/platform/environment/node/argv.ts | 4 + 2 files changed, 75 insertions(+), 32 deletions(-) diff --git a/src/vs/code/node/cli.ts b/src/vs/code/node/cli.ts index f45bd1632c0..4d00bbe295b 100644 --- a/src/vs/code/node/cli.ts +++ b/src/vs/code/node/cli.ts @@ -115,17 +115,15 @@ export async function main(argv: string[]): TPromise { // Just Code else { const env = assign({}, process.env, { - // this will signal Code that it was spawned from this module - 'VSCODE_CLI': '1', + 'VSCODE_CLI': '1', // this will signal Code that it was spawned from this module 'ELECTRON_NO_ATTACH_CONSOLE': '1' }); delete env['ELECTRON_RUN_AS_NODE']; - let processCallbacks: ((child: ChildProcess) => Thenable)[] = []; + const processCallbacks: ((child: ChildProcess) => Thenable)[] = []; const verbose = args.verbose || args.status; - if (verbose) { env['ELECTRON_ENABLE_LOGGING'] = '1'; @@ -137,46 +135,87 @@ export async function main(argv: string[]): TPromise { }); } - // If we are running with input from stdin, pipe that into a file and - // open this file via arguments. Ignore this when we are passed with - // paths to open. - let isReadingFromStdin: boolean; + let stdinWithoutTty: boolean; try { - isReadingFromStdin = args._.length === 0 && !process.stdin.isTTY; // Via https://twitter.com/MylesBorins/status/782009479382626304 + stdinWithoutTty = !process.stdin.isTTY; // Via https://twitter.com/MylesBorins/status/782009479382626304 } catch (error) { // Windows workaround for https://github.com/nodejs/node/issues/11656 } let stdinFilePath: string; - if (isReadingFromStdin) { - let stdinFileError: Error; - stdinFilePath = paths.join(os.tmpdir(), `code-stdin-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 3)}.txt`); - try { - const stdinFileStream = fs.createWriteStream(stdinFilePath); - resolveTerminalEncoding(verbose).done(encoding => { + if (stdinWithoutTty) { + + // Read from stdin: we require a single "-" argument to be passed in order to start reading from + // stdin. We do this because there is no reliable way to find out if data is piped to stdin. Just + // checking for stdin being connected to a TTY is not enough (https://github.com/Microsoft/vscode/issues/40351) + if (args._.length === 1 && args._[0] === '-') { + + // remove the "-" argument when we read from stdin + args._ = []; + argv = argv.filter(a => a !== '-'); + + // prepare temp file to read stdin to + stdinFilePath = paths.join(os.tmpdir(), `code-stdin-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 3)}.txt`); + + // open tmp file for writing + let stdinFileError: Error; + let stdinFileStream: fs.WriteStream; + try { + stdinFileStream = fs.createWriteStream(stdinFilePath); + } catch (error) { + stdinFileError = error; + } + + if (!stdinFileError) { // Pipe into tmp file using terminals encoding - const converterStream = iconv.decodeStream(encoding); - process.stdin.pipe(converterStream).pipe(stdinFileStream); - }); + resolveTerminalEncoding(verbose).done(encoding => { + const converterStream = iconv.decodeStream(encoding); + process.stdin.pipe(converterStream).pipe(stdinFileStream); + }); - // Make sure to open tmp file - argv.push(stdinFilePath); + // Make sure to open tmp file + argv.push(stdinFilePath); - // Enable --wait to get all data and ignore adding this to history - argv.push('--wait'); - argv.push('--skip-add-to-recently-opened'); - args.wait = true; - } catch (error) { - stdinFileError = error; + // Enable --wait to get all data and ignore adding this to history + argv.push('--wait'); + argv.push('--skip-add-to-recently-opened'); + args.wait = true; + } + + if (verbose) { + if (stdinFileError) { + console.error(`Failed to create file to read via stdin: ${stdinFileError.toString()}`); + } else { + console.log(`Reading from stdin via: ${stdinFilePath}`); + } + } } - if (verbose) { - if (stdinFileError) { - console.error(`Failed to create file to read via stdin: ${stdinFileError.toString()}`); - } else { - console.log(`Reading from stdin via: ${stdinFilePath}`); - } + // If the user pipes data via stdin but forgot to add the "-" argument, help by printing a message + // if we detect that data flows into via stdin after a certain timeout. + else if (args._.length === 0) { + processCallbacks.push(child => new TPromise(c => { + const dataListener = () => { + if (isWindows) { + console.log(`Run with '${product.applicationName} -' to read output from another program (e.g. 'echo Hello World | ${product.applicationName} -').`); + } else { + console.log(`Run with '${product.applicationName} -' to read from stdin (e.g. 'ps aux | grep code | ${product.applicationName} -').`); + } + + c(void 0); + }; + + // wait for 1s maximum... + setTimeout(() => { + process.stdin.removeListener('data', dataListener); + + c(void 0); + }, 1000); + + // ...but finish early if we detect data + process.stdin.once('data', dataListener); + })); } } diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index 862f737db01..c9eba715145 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -9,6 +9,8 @@ import * as assert from 'assert'; import { firstIndex } from 'vs/base/common/arrays'; import { localize } from 'vs/nls'; import { ParsedArgs } from '../common/environment'; +import { isWindows } from 'vs/base/common/platform'; +import product from 'vs/platform/node/product'; const options: minimist.Opts = { string: [ @@ -199,6 +201,8 @@ export function buildHelpMessage(fullName: string, name: string, version: string ${ localize('usage', "Usage")}: ${executable} [${localize('options', "options")}] [${localize('paths', 'paths')}...] +${ isWindows ? localize('stdinWindows', "To read output from another program, append '-' (e.g. 'echo Hello World | {0} -')", product.applicationName) : localize('stdinUnix', "To read from stdin, append '-' (e.g. 'ps aux | grep code | {0} -')", product.applicationName)} + ${ localize('optionsUpperCase', "Options")}: ${formatOptions(optionsHelp, columns)}`; } From 9a5b6ebc08d530463203c75a92e0ea49b6becc73 Mon Sep 17 00:00:00 2001 From: Christopher Leidigh Date: Mon, 18 Dec 2017 09:26:27 -0500 Subject: [PATCH 363/615] Selectbox theme additions Fixes #25965, #35246, #25700, #21193 (#37533) * SelectBox drop-down-contextv-list WIP 1 * Merge 2 * Selectbox Themed drop-down * Added ARIA labels, color cleanup * Restored Space and Enter select activation * Fix list colors, CSS, Scrollbar, hover before separation * SelectBox separation, clean 1 * SelectBox separation cleanup 2 * SelectBox fix var, superfluous listener * some final polish * actually import the CSS --- src/vs/base/browser/ui/actionbar/actionbar.ts | 6 +- src/vs/base/browser/ui/list/listView.ts | 6 +- src/vs/base/browser/ui/list/listWidget.ts | 2 + src/vs/base/browser/ui/selectBox/selectBox.ts | 147 ++--- .../browser/ui/selectBox/selectBoxCustom.css | 63 ++ .../browser/ui/selectBox/selectBoxCustom.ts | 593 ++++++++++++++++++ .../browser/ui/selectBox/selectBoxNative.ts | 155 +++++ src/vs/platform/theme/common/styler.ts | 14 +- .../parts/debug/browser/breakpointWidget.ts | 2 +- .../parts/debug/browser/debugActionItems.ts | 11 +- .../parts/debug/browser/debugActionsWidget.ts | 6 +- .../parts/output/browser/outputActions.ts | 6 +- .../electron-browser/terminalActions.ts | 6 +- 13 files changed, 907 insertions(+), 110 deletions(-) create mode 100644 src/vs/base/browser/ui/selectBox/selectBoxCustom.css create mode 100644 src/vs/base/browser/ui/selectBox/selectBoxCustom.ts create mode 100644 src/vs/base/browser/ui/selectBox/selectBoxNative.ts diff --git a/src/vs/base/browser/ui/actionbar/actionbar.ts b/src/vs/base/browser/ui/actionbar/actionbar.ts index 41eb283271e..2d6c9985280 100644 --- a/src/vs/base/browser/ui/actionbar/actionbar.ts +++ b/src/vs/base/browser/ui/actionbar/actionbar.ts @@ -17,6 +17,7 @@ import types = require('vs/base/common/types'); import { EventType, Gesture } from 'vs/base/browser/touch'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; +import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; import Event, { Emitter } from 'vs/base/common/event'; export interface IActionItem { @@ -755,9 +756,10 @@ export class SelectActionItem extends BaseActionItem { protected selectBox: SelectBox; protected toDispose: lifecycle.IDisposable[]; - constructor(ctx: any, action: IAction, options: string[], selected: number) { + constructor(ctx: any, action: IAction, options: string[], selected: number, contextViewProvider: IContextViewProvider + ) { super(ctx, action); - this.selectBox = new SelectBox(options, selected); + this.selectBox = new SelectBox(options, selected, contextViewProvider); this.toDispose = []; this.toDispose.push(this.selectBox); diff --git a/src/vs/base/browser/ui/list/listView.ts b/src/vs/base/browser/ui/list/listView.ts index 3936eb41473..c0aadf8e400 100644 --- a/src/vs/base/browser/ui/list/listView.ts +++ b/src/vs/base/browser/ui/list/listView.ts @@ -52,10 +52,12 @@ interface IItem { export interface IListViewOptions { useShadows?: boolean; + verticalScrollMode?: ScrollbarVisibility; } const DefaultOptions: IListViewOptions = { - useShadows: true + useShadows: true, + verticalScrollMode: ScrollbarVisibility.Auto }; export class ListView implements ISpliceable, IDisposable { @@ -106,7 +108,7 @@ export class ListView implements ISpliceable, IDisposable { this.scrollableElement = new ScrollableElement(this.rowsContainer, { alwaysConsumeMouseWheel: true, horizontal: ScrollbarVisibility.Hidden, - vertical: ScrollbarVisibility.Auto, + vertical: getOrDefault(options, o => o.verticalScrollMode, DefaultOptions.verticalScrollMode), useShadows: getOrDefault(options, o => o.useShadows, DefaultOptions.useShadows) }); diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index d2c737a6691..d5450e24c9d 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -19,6 +19,7 @@ import { IDelegate, IRenderer, IListEvent, IListContextMenuEvent, IListMouseEven import { ListView, IListViewOptions } from './listView'; import { Color } from 'vs/base/common/color'; import { mixin } from 'vs/base/common/objects'; +import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { ISpliceable } from 'vs/base/common/sequence'; export interface IIdentityProvider { @@ -498,6 +499,7 @@ export interface IListOptions extends IListViewOptions, IListStyles { selectOnMouseDown?: boolean; focusOnMouseDown?: boolean; keyboardSupport?: boolean; + verticalScrollMode?: ScrollbarVisibility; multipleSelectionSupport?: boolean; } diff --git a/src/vs/base/browser/ui/selectBox/selectBox.ts b/src/vs/base/browser/ui/selectBox/selectBox.ts index 5630d626d4a..bfd002094e7 100644 --- a/src/vs/base/browser/ui/selectBox/selectBox.ts +++ b/src/vs/base/browser/ui/selectBox/selectBox.ts @@ -6,18 +6,39 @@ import 'vs/css!./selectBox'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import Event, { Emitter } from 'vs/base/common/event'; -import { KeyCode } from 'vs/base/common/keyCodes'; +import Event from 'vs/base/common/event'; import { Widget } from 'vs/base/browser/ui/widget'; -import * as dom from 'vs/base/browser/dom'; -import * as arrays from 'vs/base/common/arrays'; import { Color } from 'vs/base/common/color'; -import { deepClone } from 'vs/base/common/objects'; +import { deepClone, mixin } from 'vs/base/common/objects'; +import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; +import { IListStyles } from 'vs/base/browser/ui/list/listWidget'; +import { SelectBoxNative } from 'vs/base/browser/ui/selectBox/selectBoxNative'; +import { SelectBoxList } from 'vs/base/browser/ui/selectBox/selectBoxCustom'; +import { isMacintosh } from 'vs/base/common/platform'; -export interface ISelectBoxStyles { +// Public SelectBox interface - Calls routed to appropriate select implementation class + +export interface ISelectBoxDelegate { + + // Public SelectBox Interface + readonly onDidSelect: Event; + setOptions(options: string[], selected?: number, disabled?: number): void; + select(index: number): void; + focus(): void; + blur(): void; + dispose(): void; + + // Delegated Widget interface + render(container: HTMLElement): void; + style(styles: ISelectBoxStyles): void; + applyStyles(): void; +} + +export interface ISelectBoxStyles extends IListStyles { selectBackground?: Color; selectForeground?: Color; selectBorder?: Color; + focusBorder?: Color; } export const defaultStyles = { @@ -31,125 +52,67 @@ export interface ISelectData { index: number; } -export class SelectBox extends Widget { - - private selectElement: HTMLSelectElement; - private options: string[]; - private selected: number; - private _onDidSelect: Emitter; +export class SelectBox extends Widget implements ISelectBoxDelegate { private toDispose: IDisposable[]; - private selectBackground: Color; - private selectForeground: Color; - private selectBorder: Color; + private styles: ISelectBoxStyles; + private selectBoxDelegate: ISelectBoxDelegate; - constructor(options: string[], selected: number, styles: ISelectBoxStyles = deepClone(defaultStyles)) { + constructor(options: string[], selected: number, contextViewProvider: IContextViewProvider, styles: ISelectBoxStyles = deepClone(defaultStyles)) { super(); - this.selectElement = document.createElement('select'); - this.selectElement.className = 'select-box'; - - this.setOptions(options, selected); this.toDispose = []; - this._onDidSelect = new Emitter(); - this.selectBackground = styles.selectBackground; - this.selectForeground = styles.selectForeground; - this.selectBorder = styles.selectBorder; + mixin(this.styles, defaultStyles, false); - this.toDispose.push(dom.addStandardDisposableListener(this.selectElement, 'change', (e) => { - this.selectElement.title = e.target.value; - this._onDidSelect.fire({ - index: e.target.selectedIndex, - selected: e.target.value - }); - })); - this.toDispose.push(dom.addStandardDisposableListener(this.selectElement, 'keydown', (e) => { - if (e.equals(KeyCode.Space) || e.equals(KeyCode.Enter)) { - // Space is used to expand select box, do not propagate it (prevent action bar action run) - e.stopPropagation(); - } - })); + // Instantiate select implementation based on platform + if (isMacintosh) { + this.selectBoxDelegate = new SelectBoxNative(options, selected, styles, this.toDispose); + } else { + this.selectBoxDelegate = new SelectBoxList(options, selected, contextViewProvider, styles, this.toDispose); + } + + this.toDispose.push(this.selectBoxDelegate); } + // Public SelectBox Methods - routed through delegate interface + public get onDidSelect(): Event { - return this._onDidSelect.event; + return this.selectBoxDelegate.onDidSelect; } public setOptions(options: string[], selected?: number, disabled?: number): void { - if (!this.options || !arrays.equals(this.options, options)) { - this.options = options; - - this.selectElement.options.length = 0; - let i = 0; - this.options.forEach((option) => { - this.selectElement.add(this.createOption(option, disabled === i++)); - }); - } - this.select(selected); + this.selectBoxDelegate.setOptions(options, selected, disabled); } public select(index: number): void { - if (index >= 0 && index < this.options.length) { - this.selected = index; - } else if (this.selected < 0) { - this.selected = 0; - } - - this.selectElement.selectedIndex = this.selected; - this.selectElement.title = this.options[this.selected]; + this.selectBoxDelegate.select(index); } public focus(): void { - if (this.selectElement) { - this.selectElement.focus(); - } + this.selectBoxDelegate.focus(); } public blur(): void { - if (this.selectElement) { - this.selectElement.blur(); - } + this.selectBoxDelegate.blur(); } - public render(container: HTMLElement): void { - dom.addClass(container, 'select-container'); - container.appendChild(this.selectElement); - this.setOptions(this.options, this.selected); + // Public Widget Methods - routed through delegate interface - this.applyStyles(); + public render(container: HTMLElement): void { + this.selectBoxDelegate.render(container); } public style(styles: ISelectBoxStyles): void { - this.selectBackground = styles.selectBackground; - this.selectForeground = styles.selectForeground; - this.selectBorder = styles.selectBorder; - - this.applyStyles(); + this.selectBoxDelegate.style(styles); } - protected applyStyles(): void { - if (this.selectElement) { - const background = this.selectBackground ? this.selectBackground.toString() : null; - const foreground = this.selectForeground ? this.selectForeground.toString() : null; - const border = this.selectBorder ? this.selectBorder.toString() : null; - - this.selectElement.style.backgroundColor = background; - this.selectElement.style.color = foreground; - this.selectElement.style.borderColor = border; - } - } - - private createOption(value: string, disabled?: boolean): HTMLOptionElement { - let option = document.createElement('option'); - option.value = value; - option.text = value; - option.disabled = disabled; - - return option; + public applyStyles(): void { + this.selectBoxDelegate.applyStyles(); } public dispose(): void { this.toDispose = dispose(this.toDispose); + super.dispose(); } -} +} \ No newline at end of file diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.css b/src/vs/base/browser/ui/selectBox/selectBoxCustom.css new file mode 100644 index 00000000000..e50a700fa55 --- /dev/null +++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.css @@ -0,0 +1,63 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +/* Require .monaco-shell for ContextView dropdown */ + +.monaco-shell .select-box-dropdown-container { + display: none; +} + +.monaco-shell .select-box-dropdown-container.visible { + display: flex; + flex-direction: column; + text-align: left; + width: 1px; + overflow: hidden; +} + +.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container { + flex: 0 0 auto; + align-self: flex-start; + padding-bottom: 1px; + padding-top: 1px; + padding-left: 1px; + padding-right: 1px; + width: 100%; + overflow: hidden; + -webkit-box-sizing: border-box; + -o-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; +} + +.monaco-shell.hc-black .select-box-dropdown-container > .select-box-dropdown-list-container { + padding-bottom: 4px; + padding-top: 3px; +} + +.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .option-text { + text-overflow: ellipsis; + overflow: hidden; + padding-left: 3.5px; + white-space: nowrap; +} + +.monaco-shell .select-box-dropdown-container > .select-box-dropdown-container-width-control { + flex: 1 1 auto; + align-self: flex-start; + opacity: 0; +} + +.monaco-shell .select-box-dropdown-container > .select-box-dropdown-container-width-control > .width-control-div { + overflow: hidden; + max-height: 0px; +} + +.monaco-shell .select-box-dropdown-container > .select-box-dropdown-container-width-control > .width-control-div > .option-text-width-control { + padding-left: 4px; + padding-right: 8px; + white-space: nowrap; +} diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts new file mode 100644 index 00000000000..fda01536055 --- /dev/null +++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts @@ -0,0 +1,593 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import 'vs/css!./selectBoxCustom'; + +import * as nls from 'vs/nls'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import Event, { Emitter, chain } from 'vs/base/common/event'; +import { KeyCode } from 'vs/base/common/keyCodes'; +import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import * as dom from 'vs/base/browser/dom'; +import * as arrays from 'vs/base/common/arrays'; +import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; +import { List } from 'vs/base/browser/ui/list/listWidget'; +import { IDelegate, IRenderer } from 'vs/base/browser/ui/list/list'; +import { domEvent } from 'vs/base/browser/event'; +import { ScrollbarVisibility } from 'vs/base/common/scrollable'; +import { ISelectBoxDelegate, ISelectBoxStyles, ISelectData } from 'vs/base/browser/ui/selectBox/selectBox'; + +const $ = dom.$; + +const SELECT_OPTION_ENTRY_TEMPLATE_ID = 'selectOption.entry.template'; + +export interface ISelectOptionItem { + optionText: string; + optionDisabled: boolean; +} + +interface ISelectListTemplateData { + root: HTMLElement; + optionText: HTMLElement; + disposables: IDisposable[]; +} + +class SelectListRenderer implements IRenderer { + + get templateId(): string { return SELECT_OPTION_ENTRY_TEMPLATE_ID; } + + constructor() { } + + renderTemplate(container: HTMLElement): any { + const data = Object.create(null); + data.disposables = []; + data.root = container; + data.optionText = dom.append(container, $('.option-text')); + + return data; + } + + renderElement(element: ISelectOptionItem, index: number, templateData: ISelectListTemplateData): void { + const data = templateData; + const optionText = (element).optionText; + const optionDisabled = (element).optionDisabled; + + data.optionText.textContent = optionText; + data.root.setAttribute('aria-label', nls.localize('selectAriaOption', "{0}", optionText)); + + // pseudo-select disabled option + if (optionDisabled) { + dom.addClass((data.root), 'option-disabled'); + } + } + + disposeTemplate(templateData: ISelectListTemplateData): void { + templateData.disposables = dispose(templateData.disposables); + } +} + +export class SelectBoxList implements ISelectBoxDelegate, IDelegate { + + private static SELECT_DROPDOWN_BOTTOM_MARGIN = 10; + + private selectElement: HTMLSelectElement; + private options: string[]; + private selected: number; + private disabledOptionIndex: number; + private _onDidSelect: Emitter; + private toDispose: IDisposable[]; + private styles: ISelectBoxStyles; + private listRenderer: SelectListRenderer; + private contextViewProvider: IContextViewProvider; + private selectDropDownContainer: HTMLElement; + private styleElement: HTMLStyleElement; + private selectList: List; + private selectDropDownListContainer: HTMLElement; + private widthControlElement: HTMLElement; + + constructor(options: string[], selected: number, contextViewProvider: IContextViewProvider, styles: ISelectBoxStyles, toDispose: IDisposable[]) { + + // Disposables handled by caller + this.toDispose = toDispose; + + this.selectElement = document.createElement('select'); + this.selectElement.className = 'select-box'; + + this._onDidSelect = new Emitter(); + this.styles = styles; + + this.registerListeners(); + this.constructSelectDropDown(contextViewProvider); + + this.setOptions(options, selected); + } + + // IDelegate - List renderer + + getHeight(): number { + return 18; + } + + getTemplateId(): string { + return SELECT_OPTION_ENTRY_TEMPLATE_ID; + } + + private constructSelectDropDown(contextViewProvider: IContextViewProvider) { + + // SetUp ContextView container to hold select Dropdown + this.contextViewProvider = contextViewProvider; + this.selectDropDownContainer = dom.$('.select-box-dropdown-container'); + + // Setup list for drop-down select + this.createSelectList(this.selectDropDownContainer); + + // Create span flex box item/div we can measure and control + let widthControlOuterDiv = dom.append(this.selectDropDownContainer, $('.select-box-dropdown-container-width-control')); + let widthControlInnerDiv = dom.append(widthControlOuterDiv, $('.width-control-div')); + this.widthControlElement = document.createElement('span'); + this.widthControlElement.className = 'option-text-width-control'; + dom.append(widthControlInnerDiv, this.widthControlElement); + + // Inline stylesheet for themes + this.styleElement = dom.createStyleSheet(this.selectDropDownContainer); + } + + private registerListeners() { + + // Parent native select keyboard listeners + + this.toDispose.push(dom.addStandardDisposableListener(this.selectElement, 'change', (e) => { + this.selectElement.title = e.target.value; + this._onDidSelect.fire({ + index: e.target.selectedIndex, + selected: e.target.value + }); + })); + + // Have to implement both keyboard and mouse controllers to handle disabled options + // Intercept mouse events to override normal select actions on parents + + this.toDispose.push(dom.addDisposableListener(this.selectElement, dom.EventType.CLICK, (e) => { + this.showSelectDropDown(); + dom.EventHelper.stop(e); + })); + + this.toDispose.push(dom.addDisposableListener(this.selectElement, dom.EventType.MOUSE_UP, (e) => { + dom.EventHelper.stop(e); + })); + + this.toDispose.push(dom.addDisposableListener(this.selectElement, dom.EventType.MOUSE_DOWN, (e) => { + dom.EventHelper.stop(e); + })); + + // Intercept keyboard handling + + this.toDispose.push(dom.addDisposableListener(this.selectElement, dom.EventType.KEY_UP, (e: KeyboardEvent) => { + dom.EventHelper.stop(e); + })); + + this.toDispose.push(dom.addDisposableListener(this.selectElement, dom.EventType.KEY_DOWN, (e: KeyboardEvent) => { + const event = new StandardKeyboardEvent(e); + let showDropDown = false; + + // Create and drop down select list on keyboard select + switch (process.platform) { + case 'darwin': + if (event.keyCode === KeyCode.DownArrow || event.keyCode === KeyCode.UpArrow || event.keyCode === KeyCode.Space || event.keyCode === KeyCode.Enter) { + showDropDown = true; + } + break; + case 'win32': + default: + if (event.keyCode === KeyCode.DownArrow && event.altKey || event.keyCode === KeyCode.Space || event.keyCode === KeyCode.Enter) { + showDropDown = true; + } + break; + } + + if (showDropDown) { + this.showSelectDropDown(); + dom.EventHelper.stop(e); + } + })); + + this.toDispose.push(dom.addDisposableListener(this.selectElement, dom.EventType.KEY_PRESS, (e: KeyboardEvent) => { + dom.EventHelper.stop(e); + })); + } + + public get onDidSelect(): Event { + return this._onDidSelect.event; + } + + public setOptions(options: string[], selected?: number, disabled?: number): void { + + if (!this.options || !arrays.equals(this.options, options)) { + this.options = options; + this.selectElement.options.length = 0; + + let i = 0; + this.options.forEach((option) => { + this.selectElement.add(this.createOption(option, i, disabled === i++)); + }); + + // Mirror options in drop-down + // Populate select list for non-native select mode + if (this.selectList && !!this.options) { + let listEntries: ISelectOptionItem[]; + + listEntries = []; + if (disabled !== undefined) { + this.disabledOptionIndex = disabled; + } + for (let index = 0; index < this.options.length; index++) { + const element = this.options[index]; + let optionDisabled: boolean; + index === this.disabledOptionIndex ? optionDisabled = true : optionDisabled = false; + listEntries.push({ optionText: element, optionDisabled: optionDisabled }); + } + + this.selectList.splice(0, this.selectList.length, listEntries); + } + } + + if (selected !== undefined) { + this.select(selected); + } + } + + public select(index: number): void { + + if (index >= 0 && index < this.options.length) { + this.selected = index; + } else if (this.selected < 0) { + this.selected = 0; + } + + this.selectElement.selectedIndex = this.selected; + this.selectElement.title = this.options[this.selected]; + } + + public focus(): void { + if (this.selectElement) { + this.selectElement.focus(); + } + } + + public blur(): void { + if (this.selectElement) { + this.selectElement.blur(); + } + } + + public render(container: HTMLElement): void { + dom.addClass(container, 'select-container'); + container.appendChild(this.selectElement); + this.setOptions(this.options, this.selected); + this.applyStyles(); + } + + public style(styles: ISelectBoxStyles): void { + + const content: string[] = []; + + this.styles = styles; + + // Style non-native select mode + + if (this.styles.listFocusBackground) { + content.push(`.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`); + } + + if (this.styles.listFocusForeground) { + content.push(`.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused:not(:hover) { color: ${this.styles.listFocusForeground} !important; }`); + } + + // Hover foreground - ignore for disabled options + if (this.styles.listHoverForeground) { + content.push(`.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:hover { color: ${this.styles.listHoverForeground} !important; }`); + content.push(`.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: ${this.styles.listActiveSelectionForeground} !important; }`); + } + + // Hover background - ignore for disabled options + if (this.styles.listHoverBackground) { + content.push(`.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`); + content.push(`.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: ${this.styles.selectBackground} !important; }`); + } + + // Match quickOpen outline styles - ignore for disabled options + if (this.styles.listFocusOutline) { + content.push(`.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`); + } + + if (this.styles.listHoverOutline) { + content.push(`.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:hover:not(.focused) { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`); + content.push(`.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { outline: none !important; }`); + } + + this.styleElement.innerHTML = content.join('\n'); + + this.applyStyles(); + } + + public applyStyles(): void { + + // Style parent select + if (this.selectElement) { + const background = this.styles.selectBackground ? this.styles.selectBackground.toString() : null; + const foreground = this.styles.selectForeground ? this.styles.selectForeground.toString() : null; + const border = this.styles.selectBorder ? this.styles.selectBorder.toString() : null; + + this.selectElement.style.backgroundColor = background; + this.selectElement.style.color = foreground; + this.selectElement.style.borderColor = border; + } + + // Style drop down select list (non-native mode only) + + if (this.selectList) { + this.selectList.style({}); + + const background = this.styles.selectBackground ? this.styles.selectBackground.toString() : null; + this.selectDropDownListContainer.style.backgroundColor = background; + const optionsBorder = this.styles.focusBorder ? this.styles.focusBorder.toString() : null; + this.selectDropDownContainer.style.outlineColor = optionsBorder; + this.selectDropDownContainer.style.outlineOffset = '-1px'; + } + } + + private createOption(value: string, index: number, disabled?: boolean): HTMLOptionElement { + let option = document.createElement('option'); + option.value = value; + option.text = value; + option.disabled = disabled; + + return option; + } + + // Non-native select list handling + // ContextView dropdown methods + + private showSelectDropDown() { + if (!this.contextViewProvider) { + return; + } + + this.cloneElementFont(this.selectElement, this.selectDropDownContainer); + this.contextViewProvider.showContextView({ + getAnchor: () => this.selectElement, + render: (container: HTMLElement) => { return this.renderSelectDropDown(container); }, + layout: () => this.layoutSelectDropDown(), + onHide: () => { + dom.toggleClass(this.selectDropDownContainer, 'visible', false); + dom.toggleClass(this.selectElement, 'synthetic-focus', false); + } + }); + } + + private hideSelectDropDown() { + if (!this.contextViewProvider) { + return; + } + this.contextViewProvider.hideContextView(); + } + + private renderSelectDropDown(container: HTMLElement) { + dom.append(container, this.selectDropDownContainer); + this.layoutSelectDropDown(); + return null; + } + + private layoutSelectDropDown() { + + // Layout ContextView drop down select list and container + // Have to manage our vertical overflow, sizing + // Need to be visible to measure + + dom.toggleClass(this.selectDropDownContainer, 'visible', true); + + const selectWidth = dom.getTotalWidth(this.selectElement); + const selectPosition = dom.getDomNodePagePosition(this.selectElement); + + // Set container height to max from select bottom to margin above status bar + const statusBarHeight = dom.getTotalHeight(document.getElementById('workbench.parts.statusbar')); + const maxSelectDropDownHeight = (window.innerHeight - selectPosition.top - selectPosition.height - statusBarHeight - SelectBoxList.SELECT_DROPDOWN_BOTTOM_MARGIN); + + // SetUp list dimensions and layout - account for container padding + if (this.selectList) { + this.selectList.layout(); + let listHeight = this.selectList.contentHeight; + const listContainerHeight = dom.getTotalHeight(this.selectDropDownListContainer); + const totalVerticalListPadding = listContainerHeight - listHeight; + + // Always show complete list items - never more than Max available vertical height + if (listContainerHeight > maxSelectDropDownHeight) { + listHeight = ((Math.floor((maxSelectDropDownHeight - totalVerticalListPadding) / this.getHeight())) * this.getHeight()); + } + + this.selectList.layout(listHeight); + this.selectList.domFocus(); + + // Finally set focus on selected item + this.selectList.setFocus([this.selected]); + this.selectList.reveal(this.selectList.getFocus()[0]); + + // Set final container height after adjustments + this.selectDropDownContainer.style.height = (listHeight + totalVerticalListPadding) + 'px'; + + // Determine optimal width - min(longest option), opt(parent select), max(ContextView controlled) + const selectMinWidth = this.setWidthControlElement(this.widthControlElement); + const selectOptimalWidth = Math.max(selectMinWidth, Math.round(selectWidth)).toString() + 'px'; + + this.selectDropDownContainer.style.minWidth = selectOptimalWidth; + + // Maintain focus outline on parent select as well as list container - tabindex for focus + this.selectDropDownListContainer.setAttribute('tabindex', '0'); + dom.toggleClass(this.selectElement, 'synthetic-focus', true); + dom.toggleClass(this.selectDropDownContainer, 'synthetic-focus', true); + } + } + + private setWidthControlElement(container: HTMLElement): number { + let elementWidth = 0; + + if (container && !!this.options) { + let longest = 0; + + for (let index = 0; index < this.options.length; index++) { + if (this.options[index].length > this.options[longest].length) { + longest = index; + } + } + + container.innerHTML = this.options[longest]; + elementWidth = dom.getTotalWidth(container); + } + + return elementWidth; + } + + private cloneElementFont(source: HTMLElement, target: HTMLElement) { + const fontSize = window.getComputedStyle(source, null).getPropertyValue('font-size'); + const fontFamily = window.getComputedStyle(source, null).getPropertyValue('font-family'); + target.style.fontFamily = fontFamily; + target.style.fontSize = fontSize; + } + + private createSelectList(parent: HTMLElement): void { + + // SetUp container for list + this.selectDropDownListContainer = dom.append(parent, $('.select-box-dropdown-list-container')); + + this.listRenderer = new SelectListRenderer(); + + this.selectList = new List(this.selectDropDownListContainer, this, [this.listRenderer], { + useShadows: false, + selectOnMouseDown: false, + verticalScrollMode: ScrollbarVisibility.Visible, + keyboardSupport: false, + mouseSupport: false + }); + + // SetUp list keyboard controller - control navigation, disabled items, focus + const onSelectDropDownKeyDown = chain(domEvent(this.selectDropDownListContainer, 'keydown')) + .filter(() => this.selectList.length > 0) + .map(e => new StandardKeyboardEvent(e)); + + onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.Enter).on(e => this.onEnter(e), this, this.toDispose); + onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.Escape).on(e => this.onEscape(e), this, this.toDispose); + onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.UpArrow).on(this.onUpArrow, this, this.toDispose); + onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.DownArrow).on(this.onDownArrow, this, this.toDispose); + + // SetUp list mouse controller - control navigation, disabled items, focus + + chain(domEvent(this.selectList.getHTMLElement(), 'mousedown')) + .filter(() => this.selectList.length > 0) + .on(e => this.onMouseDown(e), this, this.toDispose); + + this.toDispose.push(this.selectList.onDidBlur(e => this.onListBlur())); + } + + // List methods + + // List mouse controller - active exit, select option, fire onDidSelect, return focus to parent select + private onMouseDown(e: MouseEvent): void { + + // Check our mouse event is on an option (not scrollbar) + if (!e.toElement.classList.contains('option-text')) { + return; + } + + const listRowElement = e.toElement.parentElement; + const index = Number(listRowElement.getAttribute('data-index')); + const disabled = listRowElement.classList.contains('option-disabled'); + + // Ignore mouse selection of disabled options + if (index >= 0 && index < this.options.length && !disabled) { + this.selected = index; + this.select(this.selected); + + this.selectList.setFocus([this.selected]); + this.selectList.reveal(this.selectList.getFocus()[0]); + this._onDidSelect.fire({ + index: this.selectElement.selectedIndex, + selected: this.selectElement.title + }); + this.hideSelectDropDown(); + } + dom.EventHelper.stop(e); + } + + // List Exit - passive - hide drop-down, fire onDidSelect + private onListBlur(): void { + + this._onDidSelect.fire({ + index: this.selectElement.selectedIndex, + selected: this.selectElement.title + }); + + this.hideSelectDropDown(); + } + + // List keyboard controller + // List exit - active - hide ContextView dropdown, return focus to parent select, fire onDidSelect + private onEscape(e: StandardKeyboardEvent): void { + dom.EventHelper.stop(e); + + this.hideSelectDropDown(); + this.selectElement.focus(); + this._onDidSelect.fire({ + index: this.selectElement.selectedIndex, + selected: this.selectElement.title + }); + } + + // List exit - active - hide ContextView dropdown, return focus to parent select, fire onDidSelect + private onEnter(e: StandardKeyboardEvent): void { + dom.EventHelper.stop(e); + + this.selectElement.focus(); + this.hideSelectDropDown(); + this._onDidSelect.fire({ + index: this.selectElement.selectedIndex, + selected: this.selectElement.title + }); + } + + // List navigation - have to handle a disabled option (jump over) + private onDownArrow(): void { + if (this.selected < this.options.length - 1) { + // Skip disabled options + if ((this.selected + 1) === this.disabledOptionIndex && this.options.length > this.selected + 2) { + this.selected += 2; + } else { + this.selected++; + } + // Set focus/selection - only fire event when closing drop-down or on blur + this.select(this.selected); + this.selectList.setFocus([this.selected]); + this.selectList.reveal(this.selectList.getFocus()[0]); + } + } + + private onUpArrow(): void { + if (this.selected > 0) { + // Skip disabled options + if ((this.selected - 1) === this.disabledOptionIndex && this.selected > 1) { + this.selected -= 2; + } else { + this.selected--; + } + // Set focus/selection - only fire event when closing drop-down or on blur + this.select(this.selected); + this.selectList.setFocus([this.selected]); + this.selectList.reveal(this.selectList.getFocus()[0]); + } + } + + public dispose(): void { + this.toDispose = dispose(this.toDispose); + } +} diff --git a/src/vs/base/browser/ui/selectBox/selectBoxNative.ts b/src/vs/base/browser/ui/selectBox/selectBoxNative.ts new file mode 100644 index 00000000000..2159d869a98 --- /dev/null +++ b/src/vs/base/browser/ui/selectBox/selectBoxNative.ts @@ -0,0 +1,155 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import Event, { Emitter } from 'vs/base/common/event'; +import { KeyCode } from 'vs/base/common/keyCodes'; +import * as dom from 'vs/base/browser/dom'; +import * as arrays from 'vs/base/common/arrays'; +import { ISelectBoxDelegate, ISelectBoxStyles, ISelectData } from 'vs/base/browser/ui/selectBox/selectBox'; + +export class SelectBoxNative implements ISelectBoxDelegate { + + private selectElement: HTMLSelectElement; + private options: string[]; + private selected: number; + private _onDidSelect: Emitter; + private toDispose: IDisposable[]; + private styles: ISelectBoxStyles; + + constructor(options: string[], selected: number, styles: ISelectBoxStyles, toDispose: IDisposable[]) { + + this.selectElement = document.createElement('select'); + this.selectElement.className = 'select-box'; + + this.toDispose = toDispose; + this._onDidSelect = new Emitter(); + + this.styles = styles; + + this.registerListeners(); + + this.setOptions(options, selected); + } + + private registerListeners() { + + this.toDispose.push(dom.addStandardDisposableListener(this.selectElement, 'change', (e) => { + this.selectElement.title = e.target.value; + this._onDidSelect.fire({ + index: e.target.selectedIndex, + selected: e.target.value + }); + })); + + this.toDispose.push(dom.addStandardDisposableListener(this.selectElement, 'keydown', (e) => { + let showSelect = false; + + switch (process.platform) { + case 'darwin': + if (e.keyCode === KeyCode.DownArrow || e.keyCode === KeyCode.UpArrow || e.keyCode === KeyCode.Space) { + showSelect = true; + } + break; + case 'win32': + default: + if (e.keyCode === KeyCode.DownArrow && e.altKey || e.keyCode === KeyCode.Space || e.keyCode === KeyCode.Enter) { + showSelect = true; + } + break; + } + + if (showSelect) { + // Space, Enter, is used to expand select box, do not propagate it (prevent action bar action run) + e.stopPropagation(); + } + })); + } + + public get onDidSelect(): Event { + return this._onDidSelect.event; + } + + public setOptions(options: string[], selected?: number, disabled?: number): void { + + if (!this.options || !arrays.equals(this.options, options)) { + this.options = options; + this.selectElement.options.length = 0; + + let i = 0; + this.options.forEach((option) => { + this.selectElement.add(this.createOption(option, i, disabled === i++)); + }); + + } + + if (selected !== undefined) { + this.select(selected); + } + } + + public select(index: number): void { + if (index >= 0 && index < this.options.length) { + this.selected = index; + } else if (this.selected < 0) { + this.selected = 0; + } + + this.selectElement.selectedIndex = this.selected; + this.selectElement.title = this.options[this.selected]; + } + + public focus(): void { + if (this.selectElement) { + this.selectElement.focus(); + } + } + + public blur(): void { + if (this.selectElement) { + this.selectElement.blur(); + } + } + + public render(container: HTMLElement): void { + dom.addClass(container, 'select-container'); + container.appendChild(this.selectElement); + this.setOptions(this.options, this.selected); + this.applyStyles(); + } + + public style(styles: ISelectBoxStyles): void { + this.styles = styles; + this.applyStyles(); + } + + public applyStyles(): void { + + // Style native select + if (this.selectElement) { + const background = this.styles.selectBackground ? this.styles.selectBackground.toString() : null; + const foreground = this.styles.selectForeground ? this.styles.selectForeground.toString() : null; + const border = this.styles.selectBorder ? this.styles.selectBorder.toString() : null; + + this.selectElement.style.backgroundColor = background; + this.selectElement.style.color = foreground; + this.selectElement.style.borderColor = border; + } + + } + + private createOption(value: string, index: number, disabled?: boolean): HTMLOptionElement { + let option = document.createElement('option'); + option.value = value; + option.text = value; + option.disabled = disabled; + + return option; + } + + public dispose(): void { + this.toDispose = dispose(this.toDispose); + } +} diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index 0e7ca7a5177..5b67b103f2d 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -6,7 +6,7 @@ 'use strict'; import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listFocusForeground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listInactiveFocusForeground, listInactiveFocusBackground, listHoverBackground, listHoverForeground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten, badgeBackground, badgeForeground, progressBarBackground } from 'vs/platform/theme/common/colorRegistry'; +import { focusBorder, inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listFocusForeground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listInactiveFocusForeground, listInactiveFocusBackground, listHoverBackground, listHoverForeground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten, badgeBackground, badgeForeground, progressBarBackground } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; export type styleFn = (colors: { [name: string]: ColorIdentifier }) => void; @@ -97,17 +97,25 @@ export function attachInputBoxStyler(widget: IThemable, themeService: IThemeServ } as IInputBoxStyleOverrides, widget); } -export interface ISelectBoxStyleOverrides extends IStyleOverrides { +export interface ISelectBoxStyleOverrides extends IStyleOverrides, IListStyleOverrides { selectBackground?: ColorIdentifier; selectForeground?: ColorIdentifier; selectBorder?: ColorIdentifier; + focusBorder?: ColorIdentifier; } export function attachSelectBoxStyler(widget: IThemable, themeService: IThemeService, style?: ISelectBoxStyleOverrides): IDisposable { return attachStyler(themeService, { selectBackground: (style && style.selectBackground) || selectBackground, selectForeground: (style && style.selectForeground) || selectForeground, - selectBorder: (style && style.selectBorder) || selectBorder + selectBorder: (style && style.selectBorder) || selectBorder, + focusBorder: (style && style.focusBorder) || focusBorder, + listFocusBackground: (style && style.listFocusBackground) || listFocusBackground, + listFocusForeground: (style && style.listFocusForeground) || listFocusForeground, + listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder, + listHoverBackground: (style && style.listHoverBackground) || listHoverBackground, + listHoverForeground: (style && style.listHoverForeground) || listHoverForeground, + listHoverOutline: (style && style.listFocusOutline) || activeContrastBorder } as ISelectBoxStyleOverrides, widget); } diff --git a/src/vs/workbench/parts/debug/browser/breakpointWidget.ts b/src/vs/workbench/parts/debug/browser/breakpointWidget.ts index 9f1df5fea58..a9133e661c8 100644 --- a/src/vs/workbench/parts/debug/browser/breakpointWidget.ts +++ b/src/vs/workbench/parts/debug/browser/breakpointWidget.ts @@ -71,7 +71,7 @@ export class BreakpointWidget extends ZoneWidget { this.hitCountContext = breakpoint && breakpoint.hitCondition && !breakpoint.condition; const selected = this.hitCountContext ? 1 : 0; - const selectBox = new SelectBox([nls.localize('expression', "Expression"), nls.localize('hitCount', "Hit Count")], selected); + const selectBox = new SelectBox([nls.localize('expression', "Expression"), nls.localize('hitCount', "Hit Count")], selected, this.contextViewService); this.toDispose.push(attachSelectBoxStyler(selectBox, this.themeService)); selectBox.render(dom.append(container, $('.breakpoint-select-container'))); selectBox.onDidSelect(e => { diff --git a/src/vs/workbench/parts/debug/browser/debugActionItems.ts b/src/vs/workbench/parts/debug/browser/debugActionItems.ts index 914a20cfadd..12887c33f44 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionItems.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionItems.ts @@ -19,6 +19,7 @@ import { IThemeService } from 'vs/platform/theme/common/themeService'; import { attachSelectBoxStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; import { selectBorder } from 'vs/platform/theme/common/colorRegistry'; +import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; const $ = dom.$; @@ -40,10 +41,11 @@ export class StartDebugActionItem implements IActionItem { @IDebugService private debugService: IDebugService, @IThemeService private themeService: IThemeService, @IConfigurationService private configurationService: IConfigurationService, - @ICommandService private commandService: ICommandService + @ICommandService private commandService: ICommandService, + @IContextViewService contextViewService: IContextViewService, ) { this.toDispose = []; - this.selectBox = new SelectBox([], -1); + this.selectBox = new SelectBox([], -1, contextViewService); this.toDispose.push(attachSelectBoxStyler(this.selectBox, themeService, { selectBackground: SIDE_BAR_BACKGROUND })); @@ -184,9 +186,10 @@ export class FocusProcessActionItem extends SelectActionItem { constructor( action: IAction, @IDebugService private debugService: IDebugService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IContextViewService contextViewService: IContextViewService ) { - super(null, action, [], -1); + super(null, action, [], -1, contextViewService); this.toDispose.push(attachSelectBoxStyler(this.selectBox, themeService)); diff --git a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts index be703eb3c65..313156f9059 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts @@ -29,6 +29,7 @@ import { registerColor, contrastBorder, widgetShadow } from 'vs/platform/theme/c import { localize } from 'vs/nls'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; const $ = builder.$; const DEBUG_ACTIONS_WIDGET_POSITION_KEY = 'debug.actionswidgetposition'; @@ -64,7 +65,8 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi @IConfigurationService private configurationService: IConfigurationService, @IThemeService themeService: IThemeService, @IKeybindingService private keybindingService: IKeybindingService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IContextViewService contextViewService: IContextViewService ) { super(themeService); @@ -80,7 +82,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi orientation: ActionsOrientation.HORIZONTAL, actionItemProvider: (action: IAction) => { if (action.id === FocusProcessAction.ID) { - return new FocusProcessActionItem(action, this.debugService, this.themeService); + return new FocusProcessActionItem(action, this.debugService, this.themeService, contextViewService); } return null; diff --git a/src/vs/workbench/parts/output/browser/outputActions.ts b/src/vs/workbench/parts/output/browser/outputActions.ts index 19034b9672f..c8398b83498 100644 --- a/src/vs/workbench/parts/output/browser/outputActions.ts +++ b/src/vs/workbench/parts/output/browser/outputActions.ts @@ -15,6 +15,7 @@ import { TogglePanelAction } from 'vs/workbench/browser/panel'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { Registry } from 'vs/platform/registry/common/platform'; export class ToggleOutputAction extends TogglePanelAction { @@ -126,9 +127,10 @@ export class SwitchOutputActionItem extends SelectActionItem { constructor( action: IAction, @IOutputService private outputService: IOutputService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IContextViewService contextViewService: IContextViewService ) { - super(null, action, [], 0); + super(null, action, [], 0, contextViewService); let outputChannelRegistry = Registry.as(OutputExt.OutputChannels); this.toDispose.push(outputChannelRegistry.onDidRegisterChannel(() => this.updateOtions())); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index 9297b40c9bd..533d7b3fbfe 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -21,6 +21,7 @@ import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { ActionBarContributor } from 'vs/workbench/browser/actions'; import { TerminalEntry } from 'vs/workbench/parts/terminal/browser/terminalQuickOpen'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { PICK_WORKSPACE_FOLDER_COMMAND } from 'vs/workbench/browser/actions/workspaceActions'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; @@ -430,9 +431,10 @@ export class SwitchTerminalInstanceActionItem extends SelectActionItem { constructor( action: IAction, @ITerminalService private terminalService: ITerminalService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IContextViewService contextViewService: IContextViewService ) { - super(null, action, terminalService.getInstanceLabels(), terminalService.activeTerminalInstanceIndex); + super(null, action, terminalService.getInstanceLabels(), terminalService.activeTerminalInstanceIndex, contextViewService); this.toDispose.push(terminalService.onInstancesChanged(this._updateItems, this)); this.toDispose.push(terminalService.onActiveInstanceChanged(this._updateItems, this)); From 84c87fa0db726868796b886a20632a86f256a873 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 18 Dec 2017 15:35:30 +0100 Subject: [PATCH 364/615] better layering --- .../browser/parts/editor/editorCommands.ts | 37 +-------- src/vs/workbench/common/editor.ts | 8 +- .../files/electron-browser/fileCommands.ts | 79 ++++++++++++++----- .../electron-browser/views/openEditorsView.ts | 3 +- 4 files changed, 64 insertions(+), 63 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index b79b87a2753..40b53cdeb32 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -8,7 +8,7 @@ import * as types from 'vs/base/common/types'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { ActiveEditorMoveArguments, ActiveEditorMovePositioning, ActiveEditorMovePositioningBy, EditorCommands, TextCompareEditorVisible, IEditorContext, EditorInput, EditorFocusedInOpenEditorsContext } from 'vs/workbench/common/editor'; +import { ActiveEditorMoveArguments, ActiveEditorMovePositioning, ActiveEditorMovePositioningBy, EditorCommands, TextCompareEditorVisible, IEditorContext, EditorInput } from 'vs/workbench/common/editor'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditor, Position, POSITIONS } from 'vs/platform/editor/common/editor'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; @@ -19,7 +19,6 @@ import { IMessageService, Severity, CloseAction } from 'vs/platform/message/comm import { Action } from 'vs/base/common/actions'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { TPromise } from 'vs/base/common/winjs.base'; -import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; export const CLOSE_UNMODIFIED_EDITORS_COMMAND_ID = 'workbench.command.closeUnmodifiedEditors'; export const CLOSE_UNMODIFIED_EDITORS_LABEL = nls.localize('closeUnmodifiedEditors', "Close Unmodified Editors in Group"); @@ -312,14 +311,6 @@ function registerEditorCommands() { } }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'close', - command: { - id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, - title: CLOSE_UNMODIFIED_EDITORS_LABEL - } - }); - CommandsRegistry.registerCommand({ id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -342,14 +333,6 @@ function registerEditorCommands() { } }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'close', - command: { - id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, - title: CLOSE_EDITORS_IN_GROUP_LABEL - } - }); - CommandsRegistry.registerCommand({ id: CLOSE_EDITOR_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -384,15 +367,6 @@ function registerEditorCommands() { } }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'close', - command: { - id: CLOSE_EDITOR_COMMAND_ID, - title: CLOSE_EDITOR_LABEL - }, - when: EditorFocusedInOpenEditorsContext - }); - CommandsRegistry.registerCommand({ id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, handler: (accessor, args: IEditorContext) => { @@ -416,13 +390,4 @@ function registerEditorCommands() { return TPromise.as(false); } }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'close', - command: { - id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, - title: CLOSE_OTHER_EDITORS_IN_GROUP_LABEL - }, - when: EditorFocusedInOpenEditorsContext - }); } diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 1aba8016519..4d9db2fed2d 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -13,14 +13,10 @@ import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; import { IEditor, IEditorViewState, IModel, ScrollType } from 'vs/editor/common/editorCommon'; import { IEditorInput, IEditorModel, IEditorOptions, ITextEditorOptions, IBaseResourceInput, Position, Verbosity, IEditor as IBaseEditor, IRevertOptions } from 'vs/platform/editor/common/editor'; import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; -import { RawContextKey, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { Registry } from 'vs/platform/registry/common/platform'; export const TextCompareEditorVisible = new RawContextKey('textCompareEditorVisible', false); -export const EditorFocusedInOpenEditorsContext = new RawContextKey('editorFocusedInOpenEditors', false); -export const UntitledEditorFocusedInOpenEditorsContext = new RawContextKey('untitledEditorFocusedInOpenEditors', false); -export const UntitledEditorNotFocusedInOpenEditorsContext: ContextKeyExpr = UntitledEditorFocusedInOpenEditorsContext.toNegated(); -export const GroupFocusedInOpenEditorsContext = new RawContextKey('groupFocusedInOpenEditors', false); export enum ConfirmResult { SAVE, @@ -950,4 +946,4 @@ export const Extensions = { EditorInputFactories: 'workbench.contributions.editor.inputFactories' }; -Registry.add(Extensions.EditorInputFactories, new EditorInputFactoryRegistry()); \ No newline at end of file +Registry.add(Extensions.EditorInputFactories, new EditorInputFactoryRegistry()); diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index 2aa109efeed..c2dbb7e6949 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -13,7 +13,7 @@ import * as labels from 'vs/base/common/labels'; import * as resources from 'vs/base/common/resources'; import URI from 'vs/base/common/uri'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { toResource, IEditorContext, EditorFocusedInOpenEditorsContext, UntitledEditorNotFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext } from 'vs/workbench/common/editor'; +import { toResource, IEditorContext } from 'vs/workbench/common/editor'; import { IWindowsService } from 'vs/platform/windows/common/windows'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; @@ -35,12 +35,13 @@ import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/c import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { isWindows, isMacintosh } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { ContextKeyExpr, RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IResourceInput } from 'vs/platform/editor/common/editor'; import { IFileService } from 'vs/platform/files/common/files'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEditorViewState } from 'vs/editor/common/editorCommon'; import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; +import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_UNMODIFIED_EDITORS_LABEL, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_LABEL, CLOSE_EDITOR_COMMAND_ID, CLOSE_EDITOR_LABEL, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_LABEL } from 'vs/workbench/browser/parts/editor/editorCommands'; // Commands @@ -59,6 +60,10 @@ export const SAVE_FILE_AS_LABEL = nls.localize('saveAs', "Save As..."); export const SAVE_FILE_COMMAND_ID = 'workbench.command.files.save'; export const SAVE_FILE_LABEL = nls.localize('save', "Save"); +export const EditorFocusedInOpenEditorsContext = new RawContextKey('editorFocusedInOpenEditors', false); +export const UntitledEditorFocusedInOpenEditorsContext = new RawContextKey('untitledEditorFocusedInOpenEditors', false); +export const UntitledEditorNotFocusedInOpenEditorsContext: ContextKeyExpr = UntitledEditorFocusedInOpenEditorsContext.toNegated(); +export const GroupFocusedInOpenEditorsContext = new RawContextKey('groupFocusedInOpenEditors', false); registerFileCommands(); registerMenuItems(); @@ -531,24 +536,6 @@ function registerFileCommands(): void { function registerMenuItems(): void { - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'save', - command: { - id: REVERT_FILE_COMMAND_ID, - title: nls.localize('revert', "Revert File") - }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, AutoSaveDisabledContext, UntitledEditorNotFocusedInOpenEditorsContext) - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'file', - command: { - id: OPEN_TO_SIDE_COMMAND_ID, - title: nls.localize('openToSide', "Open to the Side") - }, - when: EditorFocusedInOpenEditorsContext - }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: 'compare', command: { @@ -576,6 +563,15 @@ function registerMenuItems(): void { when: EditorFocusedInOpenEditorsContext }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'file', + command: { + id: OPEN_TO_SIDE_COMMAND_ID, + title: nls.localize('openToSide', "Open to the Side") + }, + when: EditorFocusedInOpenEditorsContext + }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: 'file', command: { @@ -594,6 +590,15 @@ function registerMenuItems(): void { when: EditorFocusedInOpenEditorsContext }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'save', + command: { + id: REVERT_FILE_COMMAND_ID, + title: nls.localize('revert', "Revert File") + }, + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, AutoSaveDisabledContext, UntitledEditorNotFocusedInOpenEditorsContext) + }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: 'save', command: { @@ -611,4 +616,38 @@ function registerMenuItems(): void { }, when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext) }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'close', + command: { + id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, + title: CLOSE_EDITORS_IN_GROUP_LABEL + } + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'close', + command: { + id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, + title: CLOSE_UNMODIFIED_EDITORS_LABEL + } + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'close', + command: { + id: CLOSE_EDITOR_COMMAND_ID, + title: CLOSE_EDITOR_LABEL + }, + when: EditorFocusedInOpenEditorsContext + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'close', + command: { + id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, + title: CLOSE_OTHER_EDITORS_IN_GROUP_LABEL + }, + when: EditorFocusedInOpenEditorsContext + }); } diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index a942a5b3cc5..a640730e755 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -14,7 +14,7 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { Position, IEditorInput } from 'vs/platform/editor/common/editor'; -import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup, EditorFocusedInOpenEditorsContext, GroupFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext } from 'vs/workbench/common/editor'; +import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup } from 'vs/workbench/common/editor'; import { SaveAllAction, SaveAllInGroupAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; import { IViewletViewOptions, IViewOptions, ViewsViewletPanel } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { OpenEditorsFocusedContext, ExplorerFocusedContext, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; @@ -42,6 +42,7 @@ import { ContributableActionProvider } from 'vs/workbench/browser/actions'; import { memoize } from 'vs/base/common/decorators'; import { fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; import { IMenuService, MenuId, IMenu } from 'vs/platform/actions/common/actions'; +import { EditorFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext, GroupFocusedInOpenEditorsContext } from 'vs/workbench/parts/files/electron-browser/fileCommands'; const $ = dom.$; From 590d36f948b24c4b18e37e6af337fb568409d0de Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 18 Dec 2017 16:04:14 +0100 Subject: [PATCH 365/615] fixes #40439 --- extensions/git/package.json | 19 ++++++++++++++++--- .../resources/icons/dark/open-file-mono.svg | 1 + .../resources/icons/light/open-file-mono.svg | 1 + .../git/resources/icons/light/open-file.svg | 4 +--- extensions/git/src/commands.ts | 5 +++++ 5 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 extensions/git/resources/icons/dark/open-file-mono.svg create mode 100644 extensions/git/resources/icons/light/open-file-mono.svg diff --git a/extensions/git/package.json b/extensions/git/package.json index 6ffdfb33a49..645361ff5ec 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -68,6 +68,15 @@ "dark": "resources/icons/dark/open-file.svg" } }, + { + "command": "git.openFile2", + "title": "%command.openFile%", + "category": "Git", + "icon": { + "light": "resources/icons/light/open-file-mono.svg", + "dark": "resources/icons/dark/open-file-mono.svg" + } + }, { "command": "git.openHEADFile", "title": "%command.openHEADFile%", @@ -369,6 +378,10 @@ "command": "git.revertChange", "when": "false" }, + { + "command": "git.openFile2", + "when": "false" + }, { "command": "git.unstage", "when": "gitOpenRepositoryCount != 0" @@ -712,7 +725,7 @@ "group": "inline" }, { - "command": "git.openFile", + "command": "git.openFile2", "when": "scmProvider == git && scmResourceGroup == merge", "group": "inline0" }, @@ -742,7 +755,7 @@ "group": "inline" }, { - "command": "git.openFile", + "command": "git.openFile2", "when": "scmProvider == git && scmResourceGroup == index", "group": "inline0" }, @@ -782,7 +795,7 @@ "group": "inline" }, { - "command": "git.openFile", + "command": "git.openFile2", "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "inline0" }, diff --git a/extensions/git/resources/icons/dark/open-file-mono.svg b/extensions/git/resources/icons/dark/open-file-mono.svg new file mode 100644 index 00000000000..830727e70b3 --- /dev/null +++ b/extensions/git/resources/icons/dark/open-file-mono.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/extensions/git/resources/icons/light/open-file-mono.svg b/extensions/git/resources/icons/light/open-file-mono.svg new file mode 100644 index 00000000000..fa3f245b755 --- /dev/null +++ b/extensions/git/resources/icons/light/open-file-mono.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/extensions/git/resources/icons/light/open-file.svg b/extensions/git/resources/icons/light/open-file.svg index 85a001dccc2..d23a23c6b5f 100644 --- a/extensions/git/resources/icons/light/open-file.svg +++ b/extensions/git/resources/icons/light/open-file.svg @@ -1,3 +1 @@ - -]> \ No newline at end of file + \ No newline at end of file diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 9b20e9487bb..d165c520e12 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -533,6 +533,11 @@ export class CommandCenter { } } + @command('git.openFile2') + async openFile2(arg?: Resource | Uri, ...resourceStates: SourceControlResourceState[]): Promise { + this.openFile(arg, ...resourceStates); + } + @command('git.openHEADFile') async openHEADFile(arg?: Resource | Uri): Promise { let resource: Resource | undefined = undefined; From b23019fd3f13115798407cdf40203d7b19d9ac61 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 18 Dec 2017 16:09:34 +0100 Subject: [PATCH 366/615] saveAll actions as commands --- .../files/electron-browser/fileActions.ts | 119 ++----------- .../files/electron-browser/fileCommands.ts | 161 +++++++++++++++++- .../electron-browser/views/openEditorsView.ts | 40 +---- 3 files changed, 174 insertions(+), 146 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index 487437fd7d5..be243c7100e 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -25,7 +25,7 @@ import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { VIEWLET_ID, FileOnDiskContentProvider } from 'vs/workbench/parts/files/common/files'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IFileService, IFileStat } from 'vs/platform/files/common/files'; -import { toResource, IEditorIdentifier } from 'vs/workbench/common/editor'; +import { toResource } from 'vs/workbench/common/editor'; import { FileStat, Model, NewStatPlaceholder } from 'vs/workbench/parts/files/common/explorerModel'; import { ExplorerView } from 'vs/workbench/parts/files/electron-browser/views/explorerView'; import { ExplorerViewlet } from 'vs/workbench/parts/files/electron-browser/explorerViewlet'; @@ -35,14 +35,14 @@ import { CollapseAction } from 'vs/workbench/browser/viewlet'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; -import { Position, IResourceInput, IUntitledResourceInput } from 'vs/platform/editor/common/editor'; +import { Position, IUntitledResourceInput } from 'vs/platform/editor/common/editor'; import { IInstantiationService, IConstructorSignature2, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService, IMessageWithAction, IConfirmation, Severity, CancelAction, IConfirmationResult } from 'vs/platform/message/common/message'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IModel } from 'vs/editor/common/editorCommon'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { withFocusedFilesExplorer, REVERT_FILE_COMMAND_ID, OPEN_TO_SIDE_COMMAND_ID, COMPARE_WITH_SAVED_SCHEMA, COMPARE_WITH_SAVED_COMMAND_ID, COMPARE_RESOURCE_COMMAND_ID, SELECT_FOR_COMPARE_COMMAND_ID, globalResourceToCompare, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID, computeLabelForCompare, SAVE_FILE_AS_COMMAND_ID, SAVE_FILE_COMMAND_ID, SAVE_FILE_LABEL, SAVE_FILE_AS_LABEL } from 'vs/workbench/parts/files/electron-browser/fileCommands'; +import { withFocusedFilesExplorer, REVERT_FILE_COMMAND_ID, OPEN_TO_SIDE_COMMAND_ID, COMPARE_WITH_SAVED_SCHEMA, COMPARE_WITH_SAVED_COMMAND_ID, COMPARE_RESOURCE_COMMAND_ID, SELECT_FOR_COMPARE_COMMAND_ID, globalResourceToCompare, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID, computeLabelForCompare, SAVE_FILE_AS_COMMAND_ID, SAVE_FILE_COMMAND_ID, SAVE_FILE_LABEL, SAVE_FILE_AS_LABEL, SAVE_ALL_COMMAND_ID, SAVE_ALL_LABEL, SAVE_ALL_IN_GROUP_LABEL, SAVE_ALL_IN_GROUP_COMMAND_ID, SAVE_FILES_COMMAND_ID, SAVE_FILES_LABEL } from 'vs/workbench/parts/files/electron-browser/fileCommands'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; @@ -1309,12 +1309,10 @@ export abstract class BaseSaveAllAction extends BaseErrorReportingAction { constructor( id: string, label: string, - @IWorkbenchEditorService protected editorService: IWorkbenchEditorService, - @IEditorGroupService private editorGroupService: IEditorGroupService, @ITextFileService private textFileService: ITextFileService, @IUntitledEditorService private untitledEditorService: IUntitledEditorService, + @ICommandService protected commandService: ICommandService, @IMessageService messageService: IMessageService, - @IFileService protected fileService: IFileService ) { super(id, label, messageService); @@ -1325,8 +1323,8 @@ export abstract class BaseSaveAllAction extends BaseErrorReportingAction { this.registerListeners(); } - protected abstract getSaveAllArguments(context?: any): any; protected abstract includeUntitled(): boolean; + protected abstract doRun(context: any): TPromise; private registerListeners(): void { @@ -1355,82 +1353,6 @@ export abstract class BaseSaveAllAction extends BaseErrorReportingAction { }); } - protected doRun(context: any): TPromise { - const stacks = this.editorGroupService.getStacksModel(); - - // Store some properties per untitled file to restore later after save is completed - const mapUntitledToProperties: { [resource: string]: { encoding: string; indexInGroups: number[]; activeInGroups: boolean[] } } = Object.create(null); - this.untitledEditorService.getDirty().forEach(resource => { - const activeInGroups: boolean[] = []; - const indexInGroups: number[] = []; - const encoding = this.untitledEditorService.getEncoding(resource); - - // For each group - stacks.groups.forEach((group, groupIndex) => { - - // Find out if editor is active in group - const activeEditor = group.activeEditor; - const activeResource = toResource(activeEditor, { supportSideBySide: true }); - activeInGroups[groupIndex] = (activeResource && activeResource.toString() === resource.toString()); - - // Find index of editor in group - indexInGroups[groupIndex] = -1; - group.getEditors().forEach((editor, editorIndex) => { - const editorResource = toResource(editor, { supportSideBySide: true }); - if (editorResource && editorResource.toString() === resource.toString()) { - indexInGroups[groupIndex] = editorIndex; - return; - } - }); - }); - - mapUntitledToProperties[resource.toString()] = { encoding, indexInGroups, activeInGroups }; - }); - - // Save all - return this.textFileService.saveAll(this.getSaveAllArguments(context)).then(results => { - - // Reopen saved untitled editors - const untitledToReopen: { input: IResourceInput, position: Position }[] = []; - - results.results.forEach(result => { - if (!result.success || result.source.scheme !== 'untitled') { - return; - } - - const untitledProps = mapUntitledToProperties[result.source.toString()]; - if (!untitledProps) { - return; - } - - // For each position where the untitled file was opened - untitledProps.indexInGroups.forEach((indexInGroup, index) => { - if (indexInGroup >= 0) { - untitledToReopen.push({ - input: { - resource: result.target, - encoding: untitledProps.encoding, - options: { - pinned: true, - index: indexInGroup, - preserveFocus: true, - inactive: !untitledProps.activeInGroups[index] - } - }, - position: index - }); - } - }); - }); - - if (untitledToReopen.length) { - return this.editorService.openEditors(untitledToReopen).then(() => true); - } - - return void 0; - }); - } - public dispose(): void { this.toDispose = dispose(this.toDispose); @@ -1441,14 +1363,14 @@ export abstract class BaseSaveAllAction extends BaseErrorReportingAction { export class SaveAllAction extends BaseSaveAllAction { public static readonly ID = 'workbench.action.files.saveAll'; - public static readonly LABEL = nls.localize('saveAll', "Save All"); + public static readonly LABEL = SAVE_ALL_LABEL; public get class(): string { return 'explorer-action save-all'; } - protected getSaveAllArguments(): boolean { - return this.includeUntitled(); + protected doRun(context: any): TPromise { + return this.commandService.executeCommand(SAVE_ALL_COMMAND_ID); } protected includeUntitled(): boolean { @@ -1459,27 +1381,14 @@ export class SaveAllAction extends BaseSaveAllAction { export class SaveAllInGroupAction extends BaseSaveAllAction { public static readonly ID = 'workbench.files.action.saveAllInGroup'; - public static readonly LABEL = nls.localize('saveAllInGroup', "Save All in Group"); + public static readonly LABEL = SAVE_ALL_IN_GROUP_LABEL; public get class(): string { return 'explorer-action save-all'; } - protected getSaveAllArguments(editorIdentifier: IEditorIdentifier): any { - if (!editorIdentifier) { - return this.includeUntitled(); - } - - const editorGroup = editorIdentifier.group; - const resourcesToSave: URI[] = []; - editorGroup.getEditors().forEach(editor => { - const resource = toResource(editor, { supportSideBySide: true }); - if (resource && (resource.scheme === 'untitled' || this.fileService.canHandleResource(resource))) { - resourcesToSave.push(resource); - } - }); - - return resourcesToSave; + protected doRun(context: any): TPromise { + return this.commandService.executeCommand(SAVE_ALL_IN_GROUP_COMMAND_ID); } protected includeUntitled(): boolean { @@ -1490,10 +1399,10 @@ export class SaveAllInGroupAction extends BaseSaveAllAction { export class SaveFilesAction extends BaseSaveAllAction { public static readonly ID = 'workbench.action.files.saveFiles'; - public static readonly LABEL = nls.localize('saveFiles', "Save All Files"); + public static readonly LABEL = SAVE_FILES_LABEL; - protected getSaveAllArguments(): boolean { - return this.includeUntitled(); + protected doRun(context: any): TPromise { + return this.commandService.executeCommand(SAVE_FILES_COMMAND_ID, false); } protected includeUntitled(): boolean { diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index c2dbb7e6949..3e929b846eb 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -36,7 +36,7 @@ import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { isWindows, isMacintosh } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ContextKeyExpr, RawContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { IResourceInput } from 'vs/platform/editor/common/editor'; +import { IResourceInput, Position } from 'vs/platform/editor/common/editor'; import { IFileService } from 'vs/platform/files/common/files'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEditorViewState } from 'vs/editor/common/editorCommon'; @@ -60,6 +60,15 @@ export const SAVE_FILE_AS_LABEL = nls.localize('saveAs', "Save As..."); export const SAVE_FILE_COMMAND_ID = 'workbench.command.files.save'; export const SAVE_FILE_LABEL = nls.localize('save', "Save"); +export const SAVE_ALL_COMMAND_ID = 'workbench.command.files.saveAll'; +export const SAVE_ALL_LABEL = nls.localize('saveAll', "Save All"); + +export const SAVE_ALL_IN_GROUP_COMMAND_ID = 'workbench.command.files.saveAllInGroup'; +export const SAVE_ALL_IN_GROUP_LABEL = nls.localize('saveAllInGroup', "Save All in Group"); + +export const SAVE_FILES_COMMAND_ID = 'workbench.command.files.saveFiles'; +export const SAVE_FILES_LABEL = nls.localize('saveFiles', "Save All Files"); + export const EditorFocusedInOpenEditorsContext = new RawContextKey('editorFocusedInOpenEditors', false); export const UntitledEditorFocusedInOpenEditorsContext = new RawContextKey('untitledEditorFocusedInOpenEditors', false); export const UntitledEditorNotFocusedInOpenEditorsContext: ContextKeyExpr = UntitledEditorFocusedInOpenEditorsContext.toNegated(); @@ -261,8 +270,8 @@ export function computeLabelForCompare(resource: URI, contextService: IWorkspace export let globalResourceToCompare: URI; -function save(editorService: IWorkbenchEditorService, fileService: IFileService, untitledEditorService: IUntitledEditorService, - textFileService: ITextFileService, editorGroupService: IEditorGroupService, resource: URI, isSaveAs: boolean): TPromise { +function save(resource: URI, isSaveAs: boolean, editorService: IWorkbenchEditorService, fileService: IFileService, untitledEditorService: IUntitledEditorService, + textFileService: ITextFileService, editorGroupService: IEditorGroupService): TPromise { let source: URI; if (resource) { @@ -346,6 +355,83 @@ function save(editorService: IWorkbenchEditorService, fileService: IFileService, return TPromise.as(false); } +function saveAll(saveAllArguments: any, editorService: IWorkbenchEditorService, untitledEditorService: IUntitledEditorService, + textFileService: ITextFileService, editorGroupService: IEditorGroupService): TPromise { + + const stacks = editorGroupService.getStacksModel(); + + // Store some properties per untitled file to restore later after save is completed + const mapUntitledToProperties: { [resource: string]: { encoding: string; indexInGroups: number[]; activeInGroups: boolean[] } } = Object.create(null); + untitledEditorService.getDirty().forEach(resource => { + const activeInGroups: boolean[] = []; + const indexInGroups: number[] = []; + const encoding = untitledEditorService.getEncoding(resource); + + // For each group + stacks.groups.forEach((group, groupIndex) => { + + // Find out if editor is active in group + const activeEditor = group.activeEditor; + const activeResource = toResource(activeEditor, { supportSideBySide: true }); + activeInGroups[groupIndex] = (activeResource && activeResource.toString() === resource.toString()); + + // Find index of editor in group + indexInGroups[groupIndex] = -1; + group.getEditors().forEach((editor, editorIndex) => { + const editorResource = toResource(editor, { supportSideBySide: true }); + if (editorResource && editorResource.toString() === resource.toString()) { + indexInGroups[groupIndex] = editorIndex; + return; + } + }); + }); + + mapUntitledToProperties[resource.toString()] = { encoding, indexInGroups, activeInGroups }; + }); + + // Save all + return textFileService.saveAll(saveAllArguments).then(results => { + + // Reopen saved untitled editors + const untitledToReopen: { input: IResourceInput, position: Position }[] = []; + + results.results.forEach(result => { + if (!result.success || result.source.scheme !== 'untitled') { + return; + } + + const untitledProps = mapUntitledToProperties[result.source.toString()]; + if (!untitledProps) { + return; + } + + // For each position where the untitled file was opened + untitledProps.indexInGroups.forEach((indexInGroup, index) => { + if (indexInGroup >= 0) { + untitledToReopen.push({ + input: { + resource: result.target, + encoding: untitledProps.encoding, + options: { + pinned: true, + index: indexInGroup, + preserveFocus: true, + inactive: !untitledProps.activeInGroups[index] + } + }, + position: index + }); + } + }); + }); + + if (untitledToReopen.length) { + return editorService.openEditors(untitledToReopen).then(() => true); + } + + return void 0; + }); +} function registerFileCommands(): void { @@ -522,14 +608,50 @@ function registerFileCommands(): void { CommandsRegistry.registerCommand({ id: SAVE_FILE_AS_COMMAND_ID, handler: (accessor, args: IEditorContext) => { - return save(accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService), args.resource, true); + return save(args.resource, true, accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); } }); CommandsRegistry.registerCommand({ id: SAVE_FILE_COMMAND_ID, handler: (accessor, args: IEditorContext) => { - return save(accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService), args.resource, false); + return save(args.resource, true, accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); + } + }); + + CommandsRegistry.registerCommand({ + id: SAVE_ALL_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + return saveAll(true, accessor.get(IWorkbenchEditorService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); + } + }); + + CommandsRegistry.registerCommand({ + id: SAVE_ALL_IN_GROUP_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + let saveAllArg: any; + if (!args) { + saveAllArg = true; + } else { + const fileService = accessor.get(IFileService); + const editorGroup = args.group; + saveAllArg = []; + editorGroup.getEditors().forEach(editor => { + const resource = toResource(editor, { supportSideBySide: true }); + if (resource && (resource.scheme === 'untitled' || fileService.canHandleResource(resource))) { + saveAllArg.push(resource); + } + }); + } + + return saveAll(saveAllArg, accessor.get(IWorkbenchEditorService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); + } + }); + + CommandsRegistry.registerCommand({ + id: SAVE_FILES_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + return saveAll(false, accessor.get(IWorkbenchEditorService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); } }); } @@ -611,12 +733,39 @@ function registerMenuItems(): void { MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: 'save', command: { - id: SAVE_FILE_AS_COMMAND_ID, + id: SAVE_FILE_COMMAND_ID, title: SAVE_FILE_LABEL }, when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext) }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'save', + command: { + id: SAVE_ALL_COMMAND_ID, + title: SAVE_ALL_LABEL + }, + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext) + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'save', + command: { + id: SAVE_ALL_IN_GROUP_COMMAND_ID, + title: SAVE_ALL_IN_GROUP_LABEL + }, + when: ContextKeyExpr.and(GroupFocusedInOpenEditorsContext) + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: 'save', + command: { + id: SAVE_FILES_COMMAND_ID, + title: SAVE_FILES_LABEL + }, + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext) + }); + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: 'close', command: { diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index a640730e755..46cd749c98a 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -31,15 +31,13 @@ import { badgeBackground, badgeForeground, contrastBorder } from 'vs/platform/th import { IListService, WorkbenchList } from 'vs/platform/list/browser/listService'; import { IDelegate, IRenderer, IListContextMenuEvent, IListMouseEvent } from 'vs/base/browser/ui/list/list'; import { EditorLabel } from 'vs/workbench/browser/labels'; -import { ActionBar, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; +import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; import { TPromise } from 'vs/base/common/winjs.base'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode } from 'vs/base/common/keyCodes'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { ContributableActionProvider } from 'vs/workbench/browser/actions'; -import { memoize } from 'vs/base/common/decorators'; import { fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; import { IMenuService, MenuId, IMenu } from 'vs/platform/actions/common/actions'; import { EditorFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext, GroupFocusedInOpenEditorsContext } from 'vs/workbench/parts/files/electron-browser/fileCommands'; @@ -222,11 +220,6 @@ export class OpenEditorsView extends ViewsViewletPanel { } } - @memoize - private get actionProvider(): ActionProvider { - return new ActionProvider(this.instantiationService, this.textFileService); - } - private get elements(): (IEditorGroup | OpenEditor)[] { const result: (IEditorGroup | OpenEditor)[] = []; this.model.groups.forEach(g => { @@ -294,10 +287,11 @@ export class OpenEditorsView extends ViewsViewletPanel { const getActionsContext = () => element instanceof OpenEditor ? { group: element.editorGroup, editor: element.editorInput, resource: element.editorInput.getResource() } : { group: element }; this.contextMenuService.showContextMenu({ getAnchor: () => e.anchor, - getActions: () => this.actionProvider.getSecondaryActions(element).then(actions => { + getActions: () => { + const actions = []; fillInActions(this.contributedContextMenu, { arg: getActionsContext() }, actions); - return actions; - }), + return TPromise.as(actions); + }, getActionsContext }); } @@ -593,27 +587,3 @@ class OpenEditorRenderer implements IRenderer { - const result: IAction[] = []; - const autoSaveEnabled = this.textFileService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY; - - if (element instanceof EditorGroup) { - if (!autoSaveEnabled) { - result.push(this.instantiationService.createInstance(SaveAllInGroupAction, SaveAllInGroupAction.ID, nls.localize('saveAll', "Save All"))); - result.push(new Separator()); - } - } - - return TPromise.as(result); - } -} From df38fac42d044a18e553e6293b31c8e7766148ca Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 18 Dec 2017 16:43:27 +0100 Subject: [PATCH 367/615] introduce some order into commands --- .../execution.contribution.ts | 13 +- .../files/electron-browser/fileCommands.ts | 142 ++++++++++-------- 2 files changed, 86 insertions(+), 69 deletions(-) diff --git a/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts b/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts index bcc01cb60eb..cde4b6198ef 100644 --- a/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts +++ b/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts @@ -29,6 +29,7 @@ import { DEFAULT_TERMINAL_WINDOWS, DEFAULT_TERMINAL_LINUX_READY, DEFAULT_TERMINA import { WinTerminalService, MacTerminalService, LinuxTerminalService } from 'vs/workbench/parts/execution/electron-browser/terminalService'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands'; +import { EditorFocusedInOpenEditorsContext } from 'vs/workbench/parts/files/electron-browser/fileCommands'; if (env.isWindows) { registerSingleton(ITerminalService, WinTerminalService); @@ -236,18 +237,22 @@ CommandsRegistry.registerCommand({ }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'file', + group: '1_files', + order: 30, command: { id: OPEN_CONSOLE_COMMAND_ID, title: env.isWindows ? nls.localize('scopedConsoleActionWin', "Open in Command Prompt") : nls.localize('scopedConsoleActionMacLinux', "Open in Terminal") - } + }, + when: EditorFocusedInOpenEditorsContext }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'file', + group: '1_files', + order: 30, command: { id: OPEN_INTEGRATED_TERMINAL_COMMAND_ID, title: nls.localize('openFolderInIntegratedTerminal', "Open in Terminal") - } + }, + when: EditorFocusedInOpenEditorsContext }); diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index 3e929b846eb..d2a6b61c946 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -659,34 +659,8 @@ function registerFileCommands(): void { function registerMenuItems(): void { MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'compare', - command: { - id: COMPARE_WITH_SAVED_COMMAND_ID, - title: nls.localize('compareWithSaved', "Compare with Saved") - }, - when: EditorFocusedInOpenEditorsContext - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'compare', - command: { - id: SELECT_FOR_COMPARE_COMMAND_ID, - title: nls.localize('compareSource', "Select for Compare") - }, - when: EditorFocusedInOpenEditorsContext - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'compare', - command: { - id: COMPARE_RESOURCE_COMMAND_ID, - title: nls.localize('compareWithChosen', "Compare With Chosen") - }, - when: EditorFocusedInOpenEditorsContext - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'file', + group: '1_files', + order: 10, command: { id: OPEN_TO_SIDE_COMMAND_ID, title: nls.localize('openToSide', "Open to the Side") @@ -695,16 +669,8 @@ function registerMenuItems(): void { }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'file', - command: { - id: COPY_PATH_COMMAND_ID, - title: nls.localize('copyPath', "Copy Path") - }, - when: EditorFocusedInOpenEditorsContext - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'file', + group: '1_files', + order: 20, command: { id: REVEAL_IN_EXPLORER_COMMAND_ID, title: isWindows ? nls.localize('revealInWindows', "Reveal in Explorer") : isMacintosh ? nls.localize('revealInMac', "Reveal in Finder") : nls.localize('openContainer', "Open Containing Folder") @@ -713,25 +679,18 @@ function registerMenuItems(): void { }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'save', + group: '1_files', + order: 40, command: { - id: REVERT_FILE_COMMAND_ID, - title: nls.localize('revert', "Revert File") + id: COPY_PATH_COMMAND_ID, + title: nls.localize('copyPath', "Copy Path") }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, AutoSaveDisabledContext, UntitledEditorNotFocusedInOpenEditorsContext) + when: EditorFocusedInOpenEditorsContext }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'save', - command: { - id: SAVE_FILE_AS_COMMAND_ID, - title: SAVE_FILE_AS_LABEL - }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext) - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'save', + group: '2_save', + order: 10, command: { id: SAVE_FILE_COMMAND_ID, title: SAVE_FILE_LABEL @@ -740,7 +699,26 @@ function registerMenuItems(): void { }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'save', + group: '2_save', + order: 20, + command: { + id: REVERT_FILE_COMMAND_ID, + title: nls.localize('revert', "Revert File") + }, + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, AutoSaveDisabledContext, UntitledEditorNotFocusedInOpenEditorsContext) + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '2_save', + command: { + id: SAVE_FILE_AS_COMMAND_ID, + title: SAVE_FILE_AS_LABEL + }, + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext) + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '2_save', command: { id: SAVE_ALL_COMMAND_ID, title: SAVE_ALL_LABEL @@ -749,7 +727,7 @@ function registerMenuItems(): void { }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'save', + group: '2_save', command: { id: SAVE_ALL_IN_GROUP_COMMAND_ID, title: SAVE_ALL_IN_GROUP_LABEL @@ -758,7 +736,7 @@ function registerMenuItems(): void { }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'save', + group: '2_save', command: { id: SAVE_FILES_COMMAND_ID, title: SAVE_FILES_LABEL @@ -767,23 +745,38 @@ function registerMenuItems(): void { }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'close', + group: '3_compare', + order: 10, command: { - id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, - title: CLOSE_EDITORS_IN_GROUP_LABEL - } + id: COMPARE_WITH_SAVED_COMMAND_ID, + title: nls.localize('compareWithSaved', "Compare with Saved") + }, + when: EditorFocusedInOpenEditorsContext }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'close', + group: '3_compare', + order: 20, command: { - id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, - title: CLOSE_UNMODIFIED_EDITORS_LABEL - } + id: COMPARE_RESOURCE_COMMAND_ID, + title: nls.localize('compareWithChosen', "Compare With Chosen") + }, + when: EditorFocusedInOpenEditorsContext }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'close', + group: '3_compare', + order: 30, + command: { + id: SELECT_FOR_COMPARE_COMMAND_ID, + title: nls.localize('compareSource', "Select for Compare") + }, + when: EditorFocusedInOpenEditorsContext + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '4_close', + order: 10, command: { id: CLOSE_EDITOR_COMMAND_ID, title: CLOSE_EDITOR_LABEL @@ -792,11 +785,30 @@ function registerMenuItems(): void { }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: 'close', + group: '4_close', + order: 20, command: { id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, title: CLOSE_OTHER_EDITORS_IN_GROUP_LABEL }, when: EditorFocusedInOpenEditorsContext }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '4_close', + order: 30, + command: { + id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, + title: CLOSE_UNMODIFIED_EDITORS_LABEL + } + }); + + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '4_close', + order: 40, + command: { + id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, + title: CLOSE_EDITORS_IN_GROUP_LABEL + } + }); } From 75e1bc82471d3d3a3eec01841cc988cd65ae02cd Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 18 Dec 2017 16:54:48 +0100 Subject: [PATCH 368/615] fix build --- .../browser/ui/selectBox/selectBoxCustom.ts | 21 ++++++++----------- .../browser/ui/selectBox/selectBoxNative.ts | 21 ++++++++----------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts index fda01536055..711cc2dd97f 100644 --- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts +++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts @@ -18,6 +18,7 @@ import { IDelegate, IRenderer } from 'vs/base/browser/ui/list/list'; import { domEvent } from 'vs/base/browser/event'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { ISelectBoxDelegate, ISelectBoxStyles, ISelectData } from 'vs/base/browser/ui/selectBox/selectBox'; +import { isMacintosh } from 'vs/base/common/platform'; const $ = dom.$; @@ -173,18 +174,14 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate { let showSelect = false; - switch (process.platform) { - case 'darwin': - if (e.keyCode === KeyCode.DownArrow || e.keyCode === KeyCode.UpArrow || e.keyCode === KeyCode.Space) { - showSelect = true; - } - break; - case 'win32': - default: - if (e.keyCode === KeyCode.DownArrow && e.altKey || e.keyCode === KeyCode.Space || e.keyCode === KeyCode.Enter) { - showSelect = true; - } - break; + if (isMacintosh) { + if (e.keyCode === KeyCode.DownArrow || e.keyCode === KeyCode.UpArrow || e.keyCode === KeyCode.Space) { + showSelect = true; + } + } else { + if (e.keyCode === KeyCode.DownArrow && e.altKey || e.keyCode === KeyCode.Space || e.keyCode === KeyCode.Enter) { + showSelect = true; + } } if (showSelect) { From 703704b3fcc7fa584a64db6f91da1ef30dc0b93d Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 18 Dec 2017 08:26:51 -0800 Subject: [PATCH 369/615] Add workbench.action.terminal.newInActiveWorkspace command Part of #37858 --- .../electron-browser/terminal.contribution.ts | 4 +++- .../electron-browser/terminalActions.ts | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index bf0f195784f..3ac47caa2e6 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -18,7 +18,7 @@ import { TERMINAL_DEFAULT_SHELL_UNIX_LIKE, TERMINAL_DEFAULT_SHELL_WINDOWS } from import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction, SelectAllTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, ShowNextFindTermTerminalFindWidgetAction, ShowPreviousFindTermTerminalFindWidgetAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction, QuickOpenActionTermContributor, QuickOpenTermAction, TERMINAL_PICKER_PREFIX } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; +import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, CreateNewInActiveWorkspaceTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction, SelectAllTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, ShowNextFindTermTerminalFindWidgetAction, ShowPreviousFindTermTerminalFindWidgetAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction, QuickOpenActionTermContributor, QuickOpenTermAction, TERMINAL_PICKER_PREFIX } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; import { Registry } from 'vs/platform/registry/common/platform'; import { ShowAllCommandsAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; @@ -193,6 +193,7 @@ configurationRegistry.registerConfiguration({ QUICKOPEN_FOCUS_SECONDARY_ACTION_ID, ShowAllCommandsAction.ID, CreateNewTerminalAction.ID, + CreateNewInActiveWorkspaceTerminalAction.ID, CopyTerminalSelectionAction.ID, KillTerminalAction.ID, FocusActiveTerminalAction.ID, @@ -295,6 +296,7 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(CreateNewTermina primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKTICK, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.US_BACKTICK } }), 'Terminal: Create New Integrated Terminal', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(CreateNewInActiveWorkspaceTerminalAction, CreateNewInActiveWorkspaceTerminalAction.ID, CreateNewInActiveWorkspaceTerminalAction.LABEL), 'Terminal: Create New Integrated Terminal (In Active Workspace)', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusActiveTerminalAction, FocusActiveTerminalAction.ID, FocusActiveTerminalAction.LABEL), 'Terminal: Focus Terminal', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusNextTerminalAction, FocusNextTerminalAction.ID, FocusNextTerminalAction.LABEL), 'Terminal: Focus Next Terminal', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusPreviousTerminalAction, FocusPreviousTerminalAction.ID, FocusPreviousTerminalAction.LABEL), 'Terminal: Focus Previous Terminal', category); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index 533d7b3fbfe..f88e9e06bdd 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -240,6 +240,28 @@ export class CreateNewTerminalAction extends Action { } } +export class CreateNewInActiveWorkspaceTerminalAction extends Action { + + public static readonly ID = 'workbench.action.terminal.newInActiveWorkspace'; + public static readonly LABEL = nls.localize('workbench.action.terminal.newInActiveWorkspace', "Create New Integrated Terminal (In Active Workspace)"); + + constructor( + id: string, label: string, + @ITerminalService private terminalService: ITerminalService + ) { + super(id, label); + } + + public run(event?: any): TPromise { + const instance = this.terminalService.createInstance(undefined, true); + if (!instance) { + return TPromise.as(void 0); + } + this.terminalService.setActiveInstance(instance); + return this.terminalService.showPanel(true); + } +} + export class FocusActiveTerminalAction extends Action { public static readonly ID = 'workbench.action.terminal.focus'; From 16bee5520d4ef7f45e5e39f9f92c4679863a4320 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 18 Dec 2017 08:32:40 -0800 Subject: [PATCH 370/615] Add custom placeholder for new terminal command Fixes #37858 --- .../parts/terminal/electron-browser/terminalActions.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index f88e9e06bdd..9987ce23f1f 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -17,7 +17,7 @@ import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; +import { IQuickOpenService, IPickOptions } from 'vs/platform/quickOpen/common/quickOpen'; import { ActionBarContributor } from 'vs/workbench/browser/actions'; import { TerminalEntry } from 'vs/workbench/parts/terminal/browser/terminalQuickOpen'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -221,7 +221,10 @@ export class CreateNewTerminalAction extends Action { // single root instancePromise = TPromise.as(this.terminalService.createInstance(undefined, true)); } else { - instancePromise = this.commandService.executeCommand(PICK_WORKSPACE_FOLDER_COMMAND).then(workspace => { + const options: IPickOptions = { + placeHolder: nls.localize('workbench.action.terminal.newWorkspacePlaceholder', "Select current working directory for new terminal") + }; + instancePromise = this.commandService.executeCommand(PICK_WORKSPACE_FOLDER_COMMAND, [options]).then(workspace => { if (!workspace) { // Don't create the instance if the workspace picker was canceled return null; From 0f1a96ace42e692c329f759d2d3204518dcea9b2 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 18 Dec 2017 17:59:22 +0100 Subject: [PATCH 371/615] Need help with several theme color props: #40419 --- src/vs/workbench/common/theme.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 5ea4917d224..480ecc85f0b 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -114,7 +114,7 @@ export const EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND = registerColor('editorGroup dark: editorBackground, light: editorBackground, hc: editorBackground -}, nls.localize('editorGroupHeaderBackground', "Background color of the editor group title header when tabs are disabled. Editor groups are the containers of editors.")); +}, nls.localize('editorGroupHeaderBackground', "Background color of the editor group title header when tabs are disabled (`\"workbench.editor.showTabs\": false`). Editor groups are the containers of editors.")); export const EDITOR_GROUP_BORDER = registerColor('editorGroup.border', { dark: '#444444', @@ -223,13 +223,13 @@ export const STATUS_BAR_PROMINENT_ITEM_BACKGROUND = registerColor('statusBarItem dark: '#388A34', light: '#388A34', hc: '#3883A4' -}, nls.localize('statusBarProminentItemBackground', "Status bar prominent items background color. Prominent items stand out from other status bar entries to indicate importance. The status bar is shown in the bottom of the window.")); +}, nls.localize('statusBarProminentItemBackground', "Status bar prominent items background color. Prominent items stand out from other status bar entries to indicate importance. Change mode `Toggle Tab Key Moves Focus` from command palette to see an example. The status bar is shown in the bottom of the window.")); export const STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND = registerColor('statusBarItem.prominentHoverBackground', { dark: '#369432', light: '#369432', hc: '#369432' -}, nls.localize('statusBarProminentItemHoverBackground', "Status bar prominent items background color when hovering. Prominent items stand out from other status bar entries to indicate importance. The status bar is shown in the bottom of the window.")); +}, nls.localize('statusBarProminentItemHoverBackground', "Status bar prominent items background color when hovering. Prominent items stand out from other status bar entries to indicate importance. Change mode `Toggle Tab Key Moves Focus` from command palette to see an example. The status bar is shown in the bottom of the window.")); From 62443a9e8756b1ddeb8b7044baab49ad7deab434 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 18 Dec 2017 17:59:54 +0100 Subject: [PATCH 372/615] [themes] ANSI, not ansi --- .../parts/terminal/electron-browser/terminalColorRegistry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts index d80978e1489..58e125b9f86 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts @@ -162,7 +162,7 @@ export function registerColors(): void { for (let id in ansiColorMap) { let entry = ansiColorMap[id]; let colorName = id.substring(13); - ansiColorIdentifiers[entry.index] = registerColor(id, entry.defaults, nls.localize('terminal.ansiColor', '\'{0}\' ansi color in the terminal.', colorName)); + ansiColorIdentifiers[entry.index] = registerColor(id, entry.defaults, nls.localize('terminal.ansiColor', '\'{0}\' ANSI color in the terminal.', colorName)); } } From 225b9a3d8cc37058e48f913d79ee5804b8ab9040 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 18 Dec 2017 18:00:41 +0100 Subject: [PATCH 373/615] [json] missing Promise.reject --- extensions/json/server/src/jsonServerMain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/json/server/src/jsonServerMain.ts b/extensions/json/server/src/jsonServerMain.ts index da292288113..182dfc60ddf 100644 --- a/extensions/json/server/src/jsonServerMain.ts +++ b/extensions/json/server/src/jsonServerMain.ts @@ -105,7 +105,7 @@ let schemaRequestService = (uri: string): Thenable => { return connection.sendRequest(VSCodeContentRequest.type, uri).then(responseText => { return responseText; }, error => { - return error.message; + return Promise.reject(error.message); }); } if (uri.indexOf('//schema.management.azure.com/') !== -1) { From 04db94e38dec21c5b70b99ea56f32a9c3a3558b4 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 18 Dec 2017 12:25:21 +0100 Subject: [PATCH 374/615] Simplify code --- .../services/extensions/node/rpcProtocol.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/vs/workbench/services/extensions/node/rpcProtocol.ts b/src/vs/workbench/services/extensions/node/rpcProtocol.ts index eb8ce20304d..d738ab50737 100644 --- a/src/vs/workbench/services/extensions/node/rpcProtocol.ts +++ b/src/vs/workbench/services/extensions/node/rpcProtocol.ts @@ -56,11 +56,7 @@ export class RPCProtocol implements IRPCProtocol { get: (target, name: string) => { if (!target[name] && name.charCodeAt(0) === CharCode.DollarSign) { target[name] = (...myArgs: any[]) => { - return ( - isFancy - ? this.fancyRemoteCall(proxyId, name, myArgs) - : this.remoteCall(proxyId, name, myArgs) - ); + return this._remoteCall(proxyId, name, myArgs, isFancy); }; } return target[name]; @@ -190,14 +186,6 @@ export class RPCProtocol implements IRPCProtocol { return method.apply(actor, args); } - private remoteCall(proxyId: string, methodName: string, args: any[]): TPromise { - return this._remoteCall(proxyId, methodName, args, false); - } - - private fancyRemoteCall(proxyId: string, methodName: string, args: any[]): TPromise { - return this._remoteCall(proxyId, methodName, args, true); - } - private _remoteCall(proxyId: string, methodName: string, args: any[], isFancy: boolean): TPromise { if (this._isDisposed) { return TPromise.wrapError(errors.canceled()); From 8c91f01fda90388138414d414ace2b230d3331c8 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 18 Dec 2017 18:21:25 +0100 Subject: [PATCH 375/615] Fixes #9012: Add toggle for "ignore trim whitespace" while diffing --- .../media/IgnoreTrimWhiteSpaceChecked_16x.svg | 1 + ...gnoreTrimWhiteSpaceChecked_16x_inverse.svg | 1 + .../editor/media/IgnoreTrimWhiteSpace_16x.svg | 1 + .../IgnoreTrimWhiteSpace_16x_inverse.svg | 1 + .../parts/editor/media/textdiffeditor.css | 18 ++++++- .../browser/parts/editor/textDiffEditor.ts | 47 +++++++++++++++++++ 6 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x.svg create mode 100644 src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x_inverse.svg create mode 100644 src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x.svg create mode 100644 src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x_inverse.svg diff --git a/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x.svg b/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x.svg new file mode 100644 index 00000000000..12a8e9f981a --- /dev/null +++ b/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x.svg @@ -0,0 +1 @@ + diff --git a/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x_inverse.svg b/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x_inverse.svg new file mode 100644 index 00000000000..d44a01472d4 --- /dev/null +++ b/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x_inverse.svg @@ -0,0 +1 @@ + diff --git a/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x.svg b/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x.svg new file mode 100644 index 00000000000..05b193a5d02 --- /dev/null +++ b/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x_inverse.svg b/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x_inverse.svg new file mode 100644 index 00000000000..3b904eafa79 --- /dev/null +++ b/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x_inverse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/media/textdiffeditor.css b/src/vs/workbench/browser/parts/editor/media/textdiffeditor.css index 58ac50f9b94..86c6b735e47 100644 --- a/src/vs/workbench/browser/parts/editor/media/textdiffeditor.css +++ b/src/vs/workbench/browser/parts/editor/media/textdiffeditor.css @@ -19,4 +19,20 @@ .vs-dark .monaco-workbench .textdiff-editor-action.previous, .hc-black .monaco-workbench .textdiff-editor-action.previous { background: url('previous-diff-inverse.svg') center center no-repeat; -} \ No newline at end of file +} + +.vs .monaco-workbench .textdiff-editor-action.toggleIgnoreTrimWhitespace { + background: url('IgnoreTrimWhiteSpace_16x.svg') center center no-repeat; +} +.vs-dark .monaco-workbench .textdiff-editor-action.toggleIgnoreTrimWhitespace, +.hc-black .monaco-workbench .textdiff-editor-action.toggleIgnoreTrimWhitespace { + background: url('IgnoreTrimWhiteSpace_16x_inverse.svg ') center center no-repeat; +} + +.vs .monaco-workbench .textdiff-editor-action.toggleIgnoreTrimWhitespace.is-checked { + background: url('IgnoreTrimWhiteSpaceChecked_16x.svg') center center no-repeat; +} +.vs-dark .monaco-workbench .textdiff-editor-action.toggleIgnoreTrimWhitespace.is-checked, +.hc-black .monaco-workbench .textdiff-editor-action.toggleIgnoreTrimWhitespace.is-checked { + background: url('IgnoreTrimWhiteSpaceChecked_16x_inverse.svg ') center center no-repeat; +} diff --git a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts index d940c64917c..026b8f1b8fe 100644 --- a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts @@ -34,6 +34,8 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IEditorInput } from 'vs/platform/editor/common/editor'; import { ScrollType } from 'vs/editor/common/editorCommon'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IDisposable } from 'vs/base/common/lifecycle'; /** * The text editor that leverages the diff text editor for the editing experience. @@ -45,18 +47,27 @@ export class TextDiffEditor extends BaseTextEditor { private diffNavigator: DiffNavigator; private nextDiffAction: NavigateAction; private previousDiffAction: NavigateAction; + private toggleIgnoreTrimWhitespaceAction: ToggleIgnoreTrimWhitespaceAction; + private _configurationListener: IDisposable; constructor( @ITelemetryService telemetryService: ITelemetryService, @IInstantiationService instantiationService: IInstantiationService, @IStorageService storageService: IStorageService, @ITextResourceConfigurationService configurationService: ITextResourceConfigurationService, + @IConfigurationService private readonly _actualConfigurationService: IConfigurationService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IThemeService themeService: IThemeService, @IEditorGroupService editorGroupService: IEditorGroupService, @ITextFileService textFileService: ITextFileService ) { super(TextDiffEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService, editorGroupService); + + this._configurationListener = this._actualConfigurationService.onDidChangeConfiguration((e) => { + if (e.affectsConfiguration('diffEditor.ignoreTrimWhitespace')) { + this.updateIgnoreTrimWhitespaceAction(); + } + }); } public getTitle(): string { @@ -72,6 +83,8 @@ export class TextDiffEditor extends BaseTextEditor { // Actions this.nextDiffAction = new NavigateAction(this, true); this.previousDiffAction = new NavigateAction(this, false); + this.toggleIgnoreTrimWhitespaceAction = new ToggleIgnoreTrimWhitespaceAction(this._actualConfigurationService); + this.updateIgnoreTrimWhitespaceAction(); // Support navigation within the diff editor by overriding the editor service within const delegatingEditorService = this.instantiationService.createInstance(DelegatingWorkbenchEditorService); @@ -163,6 +176,7 @@ export class TextDiffEditor extends BaseTextEditor { this.nextDiffAction.updateEnablement(); this.previousDiffAction.updateEnablement(); }); + this.updateIgnoreTrimWhitespaceAction(); }, error => { // In case we tried to open a file and the response indicates that this is not a text file, fallback to binary diff. @@ -176,6 +190,13 @@ export class TextDiffEditor extends BaseTextEditor { }); } + private updateIgnoreTrimWhitespaceAction(): void { + const ignoreTrimWhitespace = this.configurationService.getValue(this.getResource(), 'diffEditor.ignoreTrimWhitespace'); + if (this.toggleIgnoreTrimWhitespaceAction) { + this.toggleIgnoreTrimWhitespaceAction.updateClassName(ignoreTrimWhitespace); + } + } + private openAsBinary(input: EditorInput, options: EditorOptions): boolean { if (input instanceof DiffEditorInput) { const originalInput = input.originalInput; @@ -273,6 +294,7 @@ export class TextDiffEditor extends BaseTextEditor { public getActions(): IAction[] { return [ + this.toggleIgnoreTrimWhitespaceAction, this.previousDiffAction, this.nextDiffAction ]; @@ -303,6 +325,8 @@ export class TextDiffEditor extends BaseTextEditor { this.diffNavigator.dispose(); } + this._configurationListener.dispose(); + super.dispose(); } } @@ -340,6 +364,29 @@ class NavigateAction extends Action { } } +class ToggleIgnoreTrimWhitespaceAction extends Action { + static ID = 'workbench.action.compareEditor.toggleIgnoreTrimWhitespace'; + + private _isChecked: boolean; + + constructor( + @IConfigurationService private readonly _configurationService: IConfigurationService + ) { + super(ToggleIgnoreTrimWhitespaceAction.ID); + this.label = nls.localize('toggleIgnoreTrimWhitespace.label', "Ignore Trim Whitespace"); + } + + public updateClassName(ignoreTrimWhitespace: boolean): void { + this._isChecked = ignoreTrimWhitespace; + this.class = `textdiff-editor-action toggleIgnoreTrimWhitespace${this._isChecked ? ' is-checked' : ''}`; + } + + public run(): TPromise { + this._configurationService.updateValue(`diffEditor.ignoreTrimWhitespace`, !this._isChecked); + return null; + } +} + class ToggleEditorModeAction extends Action { private static readonly ID = 'toggle.diff.editorMode'; private static readonly INLINE_LABEL = nls.localize('inlineDiffLabel', "Switch to Inline View"); From 9e6c5684e66534c15c6fa39055586336cae96877 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 15 Dec 2017 17:33:42 +0100 Subject: [PATCH 376/615] #39638 Clean up Output services --- .../parts/output/browser/outputServices.ts | 298 +++++++----------- .../workbench/parts/output/common/output.ts | 19 -- .../parts/output/test/bufferedContent.test.ts | 12 +- 3 files changed, 122 insertions(+), 207 deletions(-) diff --git a/src/vs/workbench/parts/output/browser/outputServices.ts b/src/vs/workbench/parts/output/browser/outputServices.ts index 284791a1f63..d5ddb7aee3b 100644 --- a/src/vs/workbench/parts/output/browser/outputServices.ts +++ b/src/vs/workbench/parts/output/browser/outputServices.ts @@ -9,12 +9,12 @@ import strings = require('vs/base/common/strings'); import Event, { Emitter } from 'vs/base/common/event'; import { binarySearch } from 'vs/base/common/arrays'; import URI from 'vs/base/common/uri'; -import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose, Disposable, toDisposable } from 'vs/base/common/lifecycle'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { Registry } from 'vs/platform/registry/common/platform'; import { EditorOptions } from 'vs/workbench/common/editor'; -import { IOutputChannelIdentifier, IOutputEvent, IOutputChannel, IOutputService, IOutputDelta, Extensions, OUTPUT_PANEL_ID, IOutputChannelRegistry, MAX_OUTPUT_LENGTH, OUTPUT_SCHEME, OUTPUT_MIME } from 'vs/workbench/parts/output/common/output'; +import { IOutputChannelIdentifier, IOutputChannel, IOutputService, Extensions, OUTPUT_PANEL_ID, IOutputChannelRegistry, MAX_OUTPUT_LENGTH, OUTPUT_SCHEME, OUTPUT_MIME } from 'vs/workbench/parts/output/common/output'; import { OutputPanel } from 'vs/workbench/parts/output/browser/outputPanel'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IModelService } from 'vs/editor/common/services/modelService'; @@ -33,6 +33,12 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; +export interface IOutputDelta { + readonly value: string; + readonly id: number; + readonly append?: boolean; +} + export class BufferedContent { private data: string[] = []; @@ -65,10 +71,10 @@ export class BufferedContent { } } - public getDelta(previousDelta?: IOutputDelta): IOutputDelta { + public getDelta(previousId?: number): IOutputDelta { let idx = -1; - if (previousDelta) { - idx = binarySearch(this.dataIds, previousDelta.id, (a, b) => a - b); + if (previousId !== void 0) { + idx = binarySearch(this.dataIds, previousId, (a, b) => a - b); } const id = this.idPool; @@ -84,15 +90,18 @@ export class BufferedContent { abstract class OutputChannel extends Disposable implements IOutputChannel { - protected _onDidChange: Emitter = new Emitter(); - readonly onDidChange: Event = this._onDidChange.event; + protected _onDidChange: Emitter = new Emitter(); + readonly onDidChange: Event = this._onDidChange.event; + + protected _onDidClear: Emitter = new Emitter(); + readonly onDidClear: Event = this._onDidClear.event; protected _onDispose: Emitter = new Emitter(); readonly onDispose: Event = this._onDispose.event; scrollLock: boolean = false; - constructor(private readonly oputChannelIdentifier: IOutputChannelIdentifier, ) { + constructor(private readonly oputChannelIdentifier: IOutputChannelIdentifier) { super(); } @@ -107,7 +116,7 @@ abstract class OutputChannel extends Disposable implements IOutputChannel { show(): TPromise { return TPromise.as(null); } hide(): void { } append(output: string) { /** noop */ } - getOutputDelta(previousDelta?: IOutputDelta): TPromise { return TPromise.as(null); } + getOutputDelta(id?: number): TPromise { return TPromise.as(null); } clear(): void { } dispose(): void { @@ -123,16 +132,16 @@ class BufferredOutputChannel extends OutputChannel implements IOutputChannel { append(output: string) { this.bufferredContent.append(output); - this._onDidChange.fire(false); + this._onDidChange.fire(); } - getOutputDelta(previousDelta?: IOutputDelta): TPromise { - return TPromise.as(this.bufferredContent.getDelta(previousDelta)); + getOutputDelta(id?: number): TPromise { + return TPromise.as(this.bufferredContent.getDelta(id)); } clear(): void { this.bufferredContent.clear(); - this._onDidChange.fire(true); + this._onDidClear.fire(); } } @@ -160,8 +169,14 @@ class FileOutputChannel extends OutputChannel implements IOutputChannel { if (!this.shown) { this.shown = true; this.watch(); + return this.resolve() + .then(content => { + if (this.endOffset !== content.length) { + this._onDidChange.fire(); + } + }); } - return this.resolve() as TPromise; + return TPromise.as(null); } hide(): void { @@ -172,7 +187,7 @@ class FileOutputChannel extends OutputChannel implements IOutputChannel { this.contentResolver = null; } - getOutputDelta(previousDelta?: IOutputDelta): TPromise { + getOutputDelta(previousId?: number): TPromise { if (!this.shown) { // Do not return any content when not shown return TPromise.as(null); @@ -180,23 +195,29 @@ class FileOutputChannel extends OutputChannel implements IOutputChannel { return this.resolve() .then(content => { - const startOffset = previousDelta ? previousDelta.id : this.startOffset; + const startOffset = previousId !== void 0 ? previousId : this.startOffset; this.endOffset = content.length; + if (this.startOffset === this.endOffset) { + // Content cleared + return { append: false, id: this.endOffset, value: '' }; + } if (startOffset === this.endOffset) { + // Content not changed return { append: true, id: this.endOffset, value: '' }; } if (startOffset > 0 && startOffset < this.endOffset) { + // Delta const value = content.substring(startOffset, this.endOffset); return { append: true, value, id: this.endOffset }; } - // replace + // Replace return { append: false, value: content, id: this.endOffset }; }); } clear(): void { this.startOffset = this.endOffset; - this._onDidChange.fire(true); + this._onDidClear.fire(); } private resolve(): TPromise { @@ -212,7 +233,7 @@ class FileOutputChannel extends OutputChannel implements IOutputChannel { this.disposables.push(this.fileService.onFileChanges(changes => { if (changes.contains(this.file, FileChangeType.UPDATED)) { this.contentResolver = null; - this._onDidChange.fire(false); + this._onDidChange.fire(); } })); } @@ -228,20 +249,19 @@ class FileOutputChannel extends OutputChannel implements IOutputChannel { } } -export class OutputService implements IOutputService { +export class OutputService implements IOutputService, ITextModelContentProvider { public _serviceBrand: any; private channels: Map = new Map(); private activeChannelId: string; - private _onOutput: Emitter = new Emitter(); - readonly onOutput: Event = this._onOutput.event; + private _onDidChannelContentChange: Emitter = new Emitter(); + readonly onDidChannelContentChange: Event = this._onDidChannelContentChange.event; private _onActiveOutputChannel: Emitter = new Emitter(); readonly onActiveOutputChannel: Event = this._onActiveOutputChannel.event; - private _outputContentProvider: OutputContentProvider; private _outputPanel: OutputPanel; constructor( @@ -249,7 +269,8 @@ export class OutputService implements IOutputService { @IInstantiationService private instantiationService: IInstantiationService, @IPanelService private panelService: IPanelService, @IWorkspaceContextService contextService: IWorkspaceContextService, - @IModelService modelService: IModelService, + @IModelService private modelService: IModelService, + @IModeService private modeService: IModeService, @ITextModelService textModelResolverService: ITextModelService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, ) { @@ -259,14 +280,19 @@ export class OutputService implements IOutputService { instantiationService.createInstance(OutputLinkProvider); // Register as text model content provider for output - this._outputContentProvider = instantiationService.createInstance(OutputContentProvider, this); - textModelResolverService.registerTextModelContentProvider(OUTPUT_SCHEME, this._outputContentProvider); + textModelResolverService.registerTextModelContentProvider(OUTPUT_SCHEME, this); this.onDidPanelOpen(this.panelService.getActivePanel()); panelService.onDidPanelOpen(this.onDidPanelOpen, this); panelService.onDidPanelClose(this.onDidPanelClose, this); } + provideTextContent(resource: URI): TPromise { + const channel = this.getChannel(resource.fsPath); + return channel.getOutputDelta() + .then(outputDelta => this.modelService.createModel(outputDelta.value, this.modeService.getOrCreateMode(OUTPUT_MIME), resource)); + } + showChannel(id: string, preserveFocus?: boolean): TPromise { if (this.isChannelShown(id)) { return TPromise.as(null); @@ -287,25 +313,7 @@ export class OutputService implements IOutputService { getChannel(id: string): IOutputChannel { if (!this.channels.has(id)) { - const channelData = Registry.as(Extensions.OutputChannels).getChannel(id); - const channelDisposables = channelData && channelData.file ? this.instantiationService.createInstance(FileOutputChannel, channelData) : this.instantiationService.createInstance(BufferredOutputChannel, { id: id, label: '' }); - - let disposables = []; - channelDisposables.onDidChange(isClear => this._onOutput.fire({ channelId: id, isClear }), disposables); - channelDisposables.onDispose(() => { - Registry.as(Extensions.OutputChannels).removeChannel(id); - if (this.activeChannelId === id) { - const channels = this.getChannels(); - if (this._outputPanel && channels.length) { - this.showChannel(channels[0].id); - } else { - this._onActiveOutputChannel.fire(void 0); - } - } - dispose(disposables); - }, disposables); - - this.channels.set(id, channelDisposables); + this.channels.set(id, this.createChannel(id)); } return this.channels.get(id); } @@ -318,6 +326,28 @@ export class OutputService implements IOutputService { return this.getChannel(this.activeChannelId); } + private createChannel(id: string): OutputChannel { + const channelDisposables = []; + const channelData = Registry.as(Extensions.OutputChannels).getChannel(id); + const channel = channelData && channelData.file ? this.instantiationService.createInstance(FileOutputChannel, channelData) : this.instantiationService.createInstance(BufferredOutputChannel, { id: id, label: '' }); + channelDisposables.push(this.instantiationService.createInstance(ChannelModelUpdater, channel)); + channel.onDidChange(() => this._onDidChannelContentChange.fire(id), channelDisposables); + channel.onDispose(() => { + Registry.as(Extensions.OutputChannels).removeChannel(id); + if (this.activeChannelId === id) { + const channels = this.getChannels(); + if (this._outputPanel && channels.length) { + this.showChannel(channels[0].id); + } else { + this._onActiveOutputChannel.fire(void 0); + } + } + dispose(channelDisposables); + }, channelDisposables); + + return channel; + } + private isChannelShown(channelId: string): boolean { const panel = this.panelService.getActivePanel(); return panel && panel.getId() === OUTPUT_PANEL_ID && this.activeChannelId === channelId; @@ -372,157 +402,61 @@ export class OutputService implements IOutputService { } } -class OutputContentProvider implements ITextModelContentProvider { +class ChannelModelUpdater extends Disposable { - private static readonly OUTPUT_DELAY = 300; - - private bufferedOutput = new Map(); - private appendOutputScheduler: { [channel: string]: RunOnceScheduler; }; - private channelIdsWithScrollLock: Set = new Set(); - private toDispose: IDisposable[]; + private updateInProgress: boolean = false; + private modelUpdater: RunOnceScheduler; + private lastReadId: number; constructor( - private outputService: IOutputService, + private channel: OutputChannel, @IModelService private modelService: IModelService, - @IModeService private modeService: IModeService, @IPanelService private panelService: IPanelService ) { - this.appendOutputScheduler = Object.create(null); - this.toDispose = []; - - this.registerListeners(); + super(); + this.modelUpdater = new RunOnceScheduler(() => this.doUpdate(), 300); + this._register(channel.onDidChange(() => this.onDidChange())); + this._register(channel.onDidClear(() => this.onDidClear())); + this._register(toDisposable(() => this.modelUpdater.cancel())); } - private registerListeners(): void { - this.toDispose.push(this.outputService.onOutput(e => this.onOutputReceived(e))); - this.toDispose.push(this.outputService.onActiveOutputChannel(channel => this.scheduleOutputAppend(channel))); - this.toDispose.push(this.panelService.onDidPanelOpen(panel => { - if (panel.getId() === OUTPUT_PANEL_ID) { - this.appendOutput(); - } - })); + private onDidChange(): void { + if (!this.updateInProgress) { + this.updateInProgress = true; + this.modelUpdater.schedule(); + } } - private onOutputReceived(e: IOutputEvent): void { - const model = this.getModel(e.channelId); - if (!model) { - return; // only react if we have a known model - } + private onDidClear(): void { + this.modelUpdater.cancel(); + this.updateInProgress = true; + this.doUpdate(); + } - // Append to model - if (e.isClear) { - model.setValue(''); - } else { - this.scheduleOutputAppend(e.channelId); - } + private doUpdate(): void { + this.channel.getOutputDelta(this.lastReadId) + .then(delta => { + const model = this.getModel(this.channel.id); + if (model && !model.isDisposed()) { + if (delta) { + if (delta.append) { + const lastLine = model.getLineCount(); + const lastLineMaxColumn = model.getLineMaxColumn(lastLine); + model.applyEdits([EditOperation.insert(new Position(lastLine, lastLineMaxColumn), delta.value)]); + } else { + model.setValue(delta.value); + } + this.lastReadId = delta.id; + if (!this.channel.scrollLock) { + (this.panelService.getActivePanel()).revealLastLine(); + } + } + } + this.updateInProgress = false; + }, () => this.updateInProgress = false); } private getModel(channel: string): IModel { return this.modelService.getModel(URI.from({ scheme: OUTPUT_SCHEME, path: channel })); } - - private scheduleOutputAppend(channel: string): void { - if (!this.isVisible(channel)) { - return; // only if the output channel is visible - } - - let scheduler = this.appendOutputScheduler[channel]; - if (!scheduler) { - scheduler = new RunOnceScheduler(() => { - if (this.isVisible(channel)) { - this.appendOutput(channel); - } - }, OutputContentProvider.OUTPUT_DELAY); - - this.appendOutputScheduler[channel] = scheduler; - this.toDispose.push(scheduler); - } - - if (scheduler.isScheduled()) { - return; // only if not already scheduled - } - - scheduler.schedule(); - } - - private appendOutput(channel?: string): void { - if (!channel) { - const activeChannel = this.outputService.getActiveChannel(); - channel = activeChannel && activeChannel.id; - } - - if (!channel) { - return; // return if we do not have a valid channel to append to - } - - const model = this.getModel(channel); - if (!model) { - return; // only react if we have a known model - } - - const bufferedOutput = this.bufferedOutput.get(channel); - const outputChannel = this.outputService.getChannel(channel); - outputChannel.getOutputDelta(bufferedOutput) - .then(newOutput => { - if (!newOutput) { - model.setValue(''); - return; - } - this.bufferedOutput.set(channel, newOutput); - - // just fill in the full (trimmed) output if we exceed max length - if (!newOutput.append) { - model.setValue(newOutput.value); - } - - // otherwise append - else { - const lastLine = model.getLineCount(); - const lastLineMaxColumn = model.getLineMaxColumn(lastLine); - - model.applyEdits([EditOperation.insert(new Position(lastLine, lastLineMaxColumn), newOutput.value)]); - } - - if (!this.channelIdsWithScrollLock.has(channel)) { - // reveal last line - const panel = this.panelService.getActivePanel(); - (panel).revealLastLine(); - } - }); - } - - private isVisible(channel: string): boolean { - const panel = this.panelService.getActivePanel(); - - return panel && panel.getId() === OUTPUT_PANEL_ID && this.outputService.getActiveChannel().id === channel; - } - - public scrollLock(channelId: string): boolean { - return this.channelIdsWithScrollLock.has(channelId); - } - - public setScrollLock(channelId: string, value: boolean): void { - if (value) { - this.channelIdsWithScrollLock.add(channelId); - } else { - this.channelIdsWithScrollLock.delete(channelId); - } - } - - public provideTextContent(resource: URI): TPromise { - const channel = this.outputService.getChannel(resource.fsPath); - return channel.getOutputDelta() - .then(output => { - const content = output ? output.value : ''; - let codeEditorModel = this.modelService.getModel(resource); - if (!codeEditorModel) { - codeEditorModel = this.modelService.createModel(content, this.modeService.getOrCreateMode(OUTPUT_MIME), resource); - } - return codeEditorModel; - }); - } - - public dispose(): void { - this.toDispose = dispose(this.toDispose); - } } diff --git a/src/vs/workbench/parts/output/common/output.ts b/src/vs/workbench/parts/output/common/output.ts index a26af0e69e4..816711b0e20 100644 --- a/src/vs/workbench/parts/output/common/output.ts +++ b/src/vs/workbench/parts/output/common/output.ts @@ -41,14 +41,6 @@ export const MAX_OUTPUT_LENGTH = 10000 /* Max. number of output lines to show in export const CONTEXT_IN_OUTPUT = new RawContextKey('inOutput', false); -/** - * The output event informs when new output got received. - */ -export interface IOutputEvent { - channelId: string; - isClear: boolean; -} - export const IOutputService = createDecorator(OUTPUT_SERVICE_ID); /** @@ -84,23 +76,12 @@ export interface IOutputService { */ showChannelInEditor(id: string): TPromise; - /** - * Allows to register on Output events. - */ - onOutput: Event; - /** * Allows to register on active output channel change. */ onActiveOutputChannel: Event; } -export interface IOutputDelta { - readonly value: string; - readonly id: number; - readonly append?: boolean; -} - export interface IOutputChannel { /** diff --git a/src/vs/workbench/parts/output/test/bufferedContent.test.ts b/src/vs/workbench/parts/output/test/bufferedContent.test.ts index 29f0dc5141a..ae4f7623f55 100644 --- a/src/vs/workbench/parts/output/test/bufferedContent.test.ts +++ b/src/vs/workbench/parts/output/test/bufferedContent.test.ts @@ -17,7 +17,7 @@ suite('Workbench - Output Buffered Content', () => { assert.equal(bufferedContent.getDelta().value, 'firstsecondthird'); bufferedContent.clear(); assert.equal(bufferedContent.getDelta().value, ''); - assert.equal(bufferedContent.getDelta(delta).value, ''); + assert.equal(bufferedContent.getDelta(delta.id).value, ''); }); test('Buffered Content - Appending Output', () => { @@ -26,13 +26,13 @@ suite('Workbench - Output Buffered Content', () => { const firstDelta = bufferedContent.getDelta(); bufferedContent.append('second'); bufferedContent.append('third'); - const secondDelta = bufferedContent.getDelta(firstDelta); + const secondDelta = bufferedContent.getDelta(firstDelta.id); assert.equal(secondDelta.append, true); assert.equal(secondDelta.value, 'secondthird'); bufferedContent.append('fourth'); bufferedContent.append('fifth'); - assert.equal(bufferedContent.getDelta(firstDelta).value, 'secondthirdfourthfifth'); - assert.equal(bufferedContent.getDelta(secondDelta).value, 'fourthfifth'); + assert.equal(bufferedContent.getDelta(firstDelta.id).value, 'secondthirdfourthfifth'); + assert.equal(bufferedContent.getDelta(secondDelta.id).value, 'fourthfifth'); }); test('Buffered Content - Lots of Output', function () { @@ -45,13 +45,13 @@ suite('Workbench - Output Buffered Content', () => { bufferedContent.append(i.toString()); longString += i.toString(); } - const secondDelta = bufferedContent.getDelta(firstDelta); + const secondDelta = bufferedContent.getDelta(firstDelta.id); assert.equal(secondDelta.append, true); assert.equal(secondDelta.value.substr(secondDelta.value.length - 4), '4999'); longString = longString + longString + longString + longString; bufferedContent.append(longString); bufferedContent.append(longString); - const thirdDelta = bufferedContent.getDelta(firstDelta); + const thirdDelta = bufferedContent.getDelta(firstDelta.id); assert.equal(!!thirdDelta.append, true); assert.equal(thirdDelta.value.substr(thirdDelta.value.length - 4), '4999'); From 1c94a006da8b0d7d710b287022a32d6b7c2dced9 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 18 Dec 2017 09:38:40 +0100 Subject: [PATCH 377/615] #40196 Use files in the background for storing content of output channels --- package.json | 4 +- src/typings/spdlog.d.ts | 1 + .../output.contribution.ts | 2 +- .../outputServices.ts | 455 +++++++++--------- .../parts/output/test/bufferedContent.test.ts | 61 --- src/vs/workbench/workbench.main.ts | 2 +- yarn.lock | 6 +- 7 files changed, 235 insertions(+), 296 deletions(-) rename src/vs/workbench/parts/output/{browser => electron-browser}/output.contribution.ts (97%) rename src/vs/workbench/parts/output/{browser => electron-browser}/outputServices.ts (77%) delete mode 100644 src/vs/workbench/parts/output/test/bufferedContent.test.ts diff --git a/package.json b/package.json index 7f683262225..58405fbb67d 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "node-pty": "0.7.4", "nsfw": "1.0.16", "semver": "4.3.6", - "spdlog": "0.3.7", + "spdlog": "0.5.0", "sudo-prompt": "^8.0.0", "v8-inspect-profiler": "^0.0.7", "vscode-chokidar": "1.6.2", @@ -129,4 +129,4 @@ "windows-mutex": "^0.2.0", "windows-process-tree": "0.1.6" } -} +} \ No newline at end of file diff --git a/src/typings/spdlog.d.ts b/src/typings/spdlog.d.ts index ef93a9cf800..5417fdd4212 100644 --- a/src/typings/spdlog.d.ts +++ b/src/typings/spdlog.d.ts @@ -28,6 +28,7 @@ declare module 'spdlog' { error(message: string); critical(message: string); setLevel(level: number); + clearFormatters(); flush(): void; drop(): void; } diff --git a/src/vs/workbench/parts/output/browser/output.contribution.ts b/src/vs/workbench/parts/output/electron-browser/output.contribution.ts similarity index 97% rename from src/vs/workbench/parts/output/browser/output.contribution.ts rename to src/vs/workbench/parts/output/electron-browser/output.contribution.ts index 2809a152fc1..705648e1f4c 100644 --- a/src/vs/workbench/parts/output/browser/output.contribution.ts +++ b/src/vs/workbench/parts/output/electron-browser/output.contribution.ts @@ -11,7 +11,7 @@ import { MenuId, MenuRegistry, SyncActionDescriptor } from 'vs/platform/actions/ import { KeybindingsRegistry, IKeybindings } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions'; -import { OutputService } from 'vs/workbench/parts/output/browser/outputServices'; +import { OutputService } from 'vs/workbench/parts/output/electron-browser/outputServices'; import { ToggleOutputAction, ClearOutputAction } from 'vs/workbench/parts/output/browser/outputActions'; import { OUTPUT_MODE_ID, OUTPUT_MIME, OUTPUT_PANEL_ID, IOutputService, CONTEXT_IN_OUTPUT } from 'vs/workbench/parts/output/common/output'; import { PanelRegistry, Extensions, PanelDescriptor } from 'vs/workbench/browser/panel'; diff --git a/src/vs/workbench/parts/output/browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts similarity index 77% rename from src/vs/workbench/parts/output/browser/outputServices.ts rename to src/vs/workbench/parts/output/electron-browser/outputServices.ts index d5ddb7aee3b..e56069a3098 100644 --- a/src/vs/workbench/parts/output/browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -3,18 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import nls = require('vs/nls'); +import * as nls from 'vs/nls'; +import * as fs from 'fs'; +import * as paths from 'vs/base/common/paths'; import { TPromise } from 'vs/base/common/winjs.base'; -import strings = require('vs/base/common/strings'); import Event, { Emitter } from 'vs/base/common/event'; -import { binarySearch } from 'vs/base/common/arrays'; import URI from 'vs/base/common/uri'; import { IDisposable, dispose, Disposable, toDisposable } from 'vs/base/common/lifecycle'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { Registry } from 'vs/platform/registry/common/platform'; import { EditorOptions } from 'vs/workbench/common/editor'; -import { IOutputChannelIdentifier, IOutputChannel, IOutputService, Extensions, OUTPUT_PANEL_ID, IOutputChannelRegistry, MAX_OUTPUT_LENGTH, OUTPUT_SCHEME, OUTPUT_MIME } from 'vs/workbench/parts/output/common/output'; +import { IOutputChannelIdentifier, IOutputChannel, IOutputService, Extensions, OUTPUT_PANEL_ID, IOutputChannelRegistry, OUTPUT_SCHEME, OUTPUT_MIME } from 'vs/workbench/parts/output/common/output'; import { OutputPanel } from 'vs/workbench/parts/output/browser/outputPanel'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IModelService } from 'vs/editor/common/services/modelService'; @@ -30,225 +30,12 @@ import { IFileService, FileChangeType } from 'vs/platform/files/common/files'; import { IPanel } from 'vs/workbench/common/panel'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { RotatingLogger } from 'spdlog'; +import { toLocalISOString } from 'vs/base/common/date'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; -export interface IOutputDelta { - readonly value: string; - readonly id: number; - readonly append?: boolean; -} - -export class BufferedContent { - - private data: string[] = []; - private dataIds: number[] = []; - private idPool = 0; - private length = 0; - - public append(content: string): void { - this.data.push(content); - this.dataIds.push(++this.idPool); - this.length += content.length; - this.trim(); - } - - public clear(): void { - this.data.length = 0; - this.dataIds.length = 0; - this.length = 0; - } - - private trim(): void { - if (this.length < MAX_OUTPUT_LENGTH * 1.2) { - return; - } - - while (this.length > MAX_OUTPUT_LENGTH) { - this.dataIds.shift(); - const removed = this.data.shift(); - this.length -= removed.length; - } - } - - public getDelta(previousId?: number): IOutputDelta { - let idx = -1; - if (previousId !== void 0) { - idx = binarySearch(this.dataIds, previousId, (a, b) => a - b); - } - - const id = this.idPool; - if (idx >= 0) { - const value = strings.removeAnsiEscapeCodes(this.data.slice(idx + 1).join('')); - return { value, id, append: true }; - } else { - const value = strings.removeAnsiEscapeCodes(this.data.join('')); - return { value, id }; - } - } -} - -abstract class OutputChannel extends Disposable implements IOutputChannel { - - protected _onDidChange: Emitter = new Emitter(); - readonly onDidChange: Event = this._onDidChange.event; - - protected _onDidClear: Emitter = new Emitter(); - readonly onDidClear: Event = this._onDidClear.event; - - protected _onDispose: Emitter = new Emitter(); - readonly onDispose: Event = this._onDispose.event; - - scrollLock: boolean = false; - - constructor(private readonly oputChannelIdentifier: IOutputChannelIdentifier) { - super(); - } - - get id(): string { - return this.oputChannelIdentifier.id; - } - - get label(): string { - return this.oputChannelIdentifier.label; - } - - show(): TPromise { return TPromise.as(null); } - hide(): void { } - append(output: string) { /** noop */ } - getOutputDelta(id?: number): TPromise { return TPromise.as(null); } - clear(): void { } - - dispose(): void { - this._onDispose.fire(); - super.dispose(); - } - -} - -class BufferredOutputChannel extends OutputChannel implements IOutputChannel { - - private bufferredContent: BufferedContent = new BufferedContent(); - - append(output: string) { - this.bufferredContent.append(output); - this._onDidChange.fire(); - } - - getOutputDelta(id?: number): TPromise { - return TPromise.as(this.bufferredContent.getDelta(id)); - } - - clear(): void { - this.bufferredContent.clear(); - this._onDidClear.fire(); - } -} - -class FileOutputChannel extends OutputChannel implements IOutputChannel { - - private readonly file: URI; - private disposables: IDisposable[] = []; - private shown: boolean = false; - - private contentResolver: TPromise; - private startOffset: number; - private endOffset: number; - - constructor( - outputChannelIdentifier: IOutputChannelIdentifier, - @IFileService private fileService: IFileService - ) { - super(outputChannelIdentifier); - this.file = outputChannelIdentifier.file; - this.startOffset = 0; - this.endOffset = 0; - } - - show(): TPromise { - if (!this.shown) { - this.shown = true; - this.watch(); - return this.resolve() - .then(content => { - if (this.endOffset !== content.length) { - this._onDidChange.fire(); - } - }); - } - return TPromise.as(null); - } - - hide(): void { - if (this.shown) { - this.shown = false; - this.unwatch(); - } - this.contentResolver = null; - } - - getOutputDelta(previousId?: number): TPromise { - if (!this.shown) { - // Do not return any content when not shown - return TPromise.as(null); - } - - return this.resolve() - .then(content => { - const startOffset = previousId !== void 0 ? previousId : this.startOffset; - this.endOffset = content.length; - if (this.startOffset === this.endOffset) { - // Content cleared - return { append: false, id: this.endOffset, value: '' }; - } - if (startOffset === this.endOffset) { - // Content not changed - return { append: true, id: this.endOffset, value: '' }; - } - if (startOffset > 0 && startOffset < this.endOffset) { - // Delta - const value = content.substring(startOffset, this.endOffset); - return { append: true, value, id: this.endOffset }; - } - // Replace - return { append: false, value: content, id: this.endOffset }; - }); - } - - clear(): void { - this.startOffset = this.endOffset; - this._onDidClear.fire(); - } - - private resolve(): TPromise { - if (!this.contentResolver) { - this.contentResolver = this.fileService.resolveContent(this.file) - .then(content => content.value); - } - return this.contentResolver; - } - - private watch(): void { - this.fileService.watchFileChanges(this.file); - this.disposables.push(this.fileService.onFileChanges(changes => { - if (changes.contains(this.file, FileChangeType.UPDATED)) { - this.contentResolver = null; - this._onDidChange.fire(); - } - })); - } - - private unwatch(): void { - this.fileService.unwatchFileChanges(this.file); - this.disposables = dispose(this.disposables); - } - - dispose(): void { - this.hide(); - super.dispose(); - } -} - export class OutputService implements IOutputService, ITextModelContentProvider { public _serviceBrand: any; @@ -273,6 +60,7 @@ export class OutputService implements IOutputService, ITextModelContentProvider @IModeService private modeService: IModeService, @ITextModelService textModelResolverService: ITextModelService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IEnvironmentService private environmentService: IEnvironmentService ) { const channels = this.getChannels(); this.activeChannelId = this.storageService.get(OUTPUT_ACTIVE_CHANNEL_KEY, StorageScope.WORKSPACE, channels && channels.length > 0 ? channels[0].id : null); @@ -329,7 +117,9 @@ export class OutputService implements IOutputService, ITextModelContentProvider private createChannel(id: string): OutputChannel { const channelDisposables = []; const channelData = Registry.as(Extensions.OutputChannels).getChannel(id); - const channel = channelData && channelData.file ? this.instantiationService.createInstance(FileOutputChannel, channelData) : this.instantiationService.createInstance(BufferredOutputChannel, { id: id, label: '' }); + const file = channelData && channelData.file ? channelData.file : URI.file(paths.join(this.environmentService.userDataPath, 'outputs', toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, ''), `${id}.output.log`)); + const channel = channelData && channelData.file ? this.instantiationService.createInstance(OutputChannel, channelData) : + this.instantiationService.createInstance(WritableOutputChannel, { id, label: channelData ? channelData.label : '', file }); channelDisposables.push(this.instantiationService.createInstance(ChannelModelUpdater, channel)); channel.onDidChange(() => this._onDidChannelContentChange.fire(id), channelDisposables); channel.onDispose(() => { @@ -348,6 +138,7 @@ export class OutputService implements IOutputService, ITextModelContentProvider return channel; } + private isChannelShown(channelId: string): boolean { const panel = this.panelService.getActivePanel(); return panel && panel.getId() === OUTPUT_PANEL_ID && this.activeChannelId === channelId; @@ -402,6 +193,205 @@ export class OutputService implements IOutputService, ITextModelContentProvider } } +export interface IOutputDelta { + readonly value: string; + readonly id: number; + readonly append?: boolean; +} + +class OutputFileListener extends Disposable { + + private _onDidChange: Emitter = new Emitter(); + readonly onDidChange: Event = this._onDidChange.event; + + private disposables: IDisposable[] = []; + + constructor( + private readonly file: URI, + private fileService: IFileService + ) { + super(); + } + + watch(): void { + this.fileService.watchFileChanges(this.file); + this.disposables.push(this.fileService.onFileChanges(changes => { + if (changes.contains(this.file, FileChangeType.UPDATED)) { + this._onDidChange.fire(); + } + })); + } + + loadContent(from: number): TPromise { + return this.fileService.resolveContent(this.file) + .then(({ value }) => value.substring(from)); + } + + unwatch(): void { + this.fileService.unwatchFileChanges(this.file); + this.disposables = dispose(this.disposables); + } + + dispose(): void { + this.unwatch(); + super.dispose(); + } +} + +class OutputChannel extends Disposable implements IOutputChannel { + + protected _onDidChange: Emitter = new Emitter(); + readonly onDidChange: Event = this._onDidChange.event; + + protected _onDidClear: Emitter = new Emitter(); + readonly onDidClear: Event = this._onDidClear.event; + + protected _onDispose: Emitter = new Emitter(); + readonly onDispose: Event = this._onDispose.event; + + scrollLock: boolean = false; + + protected readonly file: URI; + private disposables: IDisposable[] = []; + protected shown: boolean = false; + + private contentResolver: TPromise; + private startOffset: number; + private endOffset: number; + + constructor( + private readonly outputChannelIdentifier: IOutputChannelIdentifier, + @IFileService protected fileService: IFileService + ) { + super(); + this.file = outputChannelIdentifier.file; + this.startOffset = 0; + this.endOffset = 0; + } + + get id(): string { + return this.outputChannelIdentifier.id; + } + + get label(): string { + return this.outputChannelIdentifier.label; + } + + show(): TPromise { + if (!this.shown) { + this.shown = true; + this.watch(); + return this.resolve() as TPromise; + } + return TPromise.as(null); + } + + hide(): void { + if (this.shown) { + this.shown = false; + this.unwatch(); + this.contentResolver = null; + } + } + + append(message: string): void { + throw new Error(nls.localize('appendNotSupported', "Append is not supported on File output channel")); + } + + getOutputDelta(previousId?: number): TPromise { + return this.resolve() + .then(content => { + const startOffset = previousId !== void 0 ? previousId : this.startOffset; + if (this.startOffset === this.endOffset) { + // Content cleared + return { append: false, id: this.endOffset, value: '' }; + } + if (startOffset === this.endOffset) { + // Content not changed + return { append: true, id: this.endOffset, value: '' }; + } + if (startOffset > 0 && startOffset < this.endOffset) { + // Delta + const value = content.substring(startOffset, this.endOffset); + return { append: true, value, id: this.endOffset }; + } + // Replace + return { append: false, value: content, id: this.endOffset }; + }); + } + + clear(): void { + this.startOffset = this.endOffset; + this._onDidClear.fire(); + } + + private resolve(): TPromise { + if (!this.contentResolver) { + this.contentResolver = this.fileService.resolveContent(this.file) + .then(result => { + const content = result.value; + if (this.endOffset !== content.length) { + this.endOffset = content.length; + this._onDidChange.fire(); + } + return content; + }); + } + return this.contentResolver; + } + + private watch(): void { + this.fileService.watchFileChanges(this.file); + this.disposables.push(this.fileService.onFileChanges(changes => { + if (changes.contains(this.file, FileChangeType.UPDATED)) { + this.contentResolver = null; + this._onDidChange.fire(); + } + })); + } + + private unwatch(): void { + this.fileService.unwatchFileChanges(this.file); + this.disposables = dispose(this.disposables); + } + + dispose(): void { + this.hide(); + this._onDispose.fire(); + super.dispose(); + } +} + +class WritableOutputChannel extends OutputChannel implements IOutputChannel { + + private outputWriter: RotatingLogger; + private flushScheduler: RunOnceScheduler; + + constructor( + outputChannelIdentifier: IOutputChannelIdentifier, + @IFileService fileService: IFileService + ) { + super(outputChannelIdentifier, fileService); + this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 5, 1); + this.outputWriter.clearFormatters(); + this.flushScheduler = new RunOnceScheduler(() => this.outputWriter.flush(), 300); + } + + append(message: string): void { + this.outputWriter.critical(message); + if (this.shown && !this.flushScheduler.isScheduled()) { + this.flushScheduler.schedule(); + } + } + + show(): TPromise { + if (!this.flushScheduler.isScheduled()) { + this.flushScheduler.schedule(); + } + return super.show(); + } +} + class ChannelModelUpdater extends Disposable { private updateInProgress: boolean = false; @@ -418,6 +408,7 @@ class ChannelModelUpdater extends Disposable { this._register(channel.onDidChange(() => this.onDidChange())); this._register(channel.onDidClear(() => this.onDidClear())); this._register(toDisposable(() => this.modelUpdater.cancel())); + this._register(this.modelService.onModelRemoved(this.onModelRemoved, this)); } private onDidChange(): void { @@ -434,10 +425,10 @@ class ChannelModelUpdater extends Disposable { } private doUpdate(): void { - this.channel.getOutputDelta(this.lastReadId) - .then(delta => { - const model = this.getModel(this.channel.id); - if (model && !model.isDisposed()) { + const model = this.getModel(this.channel.id); + if (model && !model.isDisposed()) { + this.channel.getOutputDelta(this.lastReadId) + .then(delta => { if (delta) { if (delta.append) { const lastLine = model.getLineCount(); @@ -451,12 +442,20 @@ class ChannelModelUpdater extends Disposable { (this.panelService.getActivePanel()).revealLastLine(); } } - } - this.updateInProgress = false; - }, () => this.updateInProgress = false); + this.updateInProgress = false; + }, () => this.updateInProgress = false); + } else { + this.updateInProgress = false; + } } private getModel(channel: string): IModel { return this.modelService.getModel(URI.from({ scheme: OUTPUT_SCHEME, path: channel })); } + + private onModelRemoved(model: IModel): void { + if (model.uri.fsPath === this.channel.id) { + this.lastReadId = void 0; + } + } } diff --git a/src/vs/workbench/parts/output/test/bufferedContent.test.ts b/src/vs/workbench/parts/output/test/bufferedContent.test.ts deleted file mode 100644 index ae4f7623f55..00000000000 --- a/src/vs/workbench/parts/output/test/bufferedContent.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as assert from 'assert'; -import { BufferedContent } from 'vs/workbench/parts/output/browser/outputServices'; - -suite('Workbench - Output Buffered Content', () => { - - test('Buffered Content - Simple', () => { - const bufferedContent = new BufferedContent(); - bufferedContent.append('first'); - bufferedContent.append('second'); - bufferedContent.append('third'); - const delta = bufferedContent.getDelta(); - assert.equal(bufferedContent.getDelta().value, 'firstsecondthird'); - bufferedContent.clear(); - assert.equal(bufferedContent.getDelta().value, ''); - assert.equal(bufferedContent.getDelta(delta.id).value, ''); - }); - - test('Buffered Content - Appending Output', () => { - const bufferedContent = new BufferedContent(); - bufferedContent.append('first'); - const firstDelta = bufferedContent.getDelta(); - bufferedContent.append('second'); - bufferedContent.append('third'); - const secondDelta = bufferedContent.getDelta(firstDelta.id); - assert.equal(secondDelta.append, true); - assert.equal(secondDelta.value, 'secondthird'); - bufferedContent.append('fourth'); - bufferedContent.append('fifth'); - assert.equal(bufferedContent.getDelta(firstDelta.id).value, 'secondthirdfourthfifth'); - assert.equal(bufferedContent.getDelta(secondDelta.id).value, 'fourthfifth'); - }); - - test('Buffered Content - Lots of Output', function () { - this.timeout(10000); - const bufferedContent = new BufferedContent(); - bufferedContent.append('first line'); - const firstDelta = bufferedContent.getDelta(); - let longString = ''; - for (let i = 0; i < 5000; i++) { - bufferedContent.append(i.toString()); - longString += i.toString(); - } - const secondDelta = bufferedContent.getDelta(firstDelta.id); - assert.equal(secondDelta.append, true); - assert.equal(secondDelta.value.substr(secondDelta.value.length - 4), '4999'); - longString = longString + longString + longString + longString; - bufferedContent.append(longString); - bufferedContent.append(longString); - const thirdDelta = bufferedContent.getDelta(firstDelta.id); - assert.equal(!!thirdDelta.append, true); - assert.equal(thirdDelta.value.substr(thirdDelta.value.length - 4), '4999'); - - bufferedContent.clear(); - assert.equal(bufferedContent.getDelta().value, ''); - }); -}); diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index cfe23986359..b624558e852 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -72,7 +72,7 @@ import 'vs/workbench/parts/extensions/electron-browser/extensionsViewlet'; // ca import 'vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution'; -import 'vs/workbench/parts/output/browser/output.contribution'; +import 'vs/workbench/parts/output/electron-browser/output.contribution'; import 'vs/workbench/parts/output/browser/outputPanel'; // can be packaged separately import 'vs/workbench/parts/terminal/electron-browser/terminal.contribution'; diff --git a/yarn.lock b/yarn.lock index 2e034565a89..f241642dc91 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5042,9 +5042,9 @@ sparkles@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" -spdlog@0.3.7: - version "0.3.7" - resolved "https://registry.yarnpkg.com/spdlog/-/spdlog-0.3.7.tgz#5f068efab0b7c85efa1aaed6eacd3da1d978fe24" +spdlog@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/spdlog/-/spdlog-0.5.0.tgz#5ec92c34e59f29328f4e19dfab17a1ba51cc0573" dependencies: bindings "^1.3.0" mkdirp "^0.5.1" From 78f1f5539a41b2720354d0c6b52364fc3f686446 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 18 Dec 2017 11:22:15 +0100 Subject: [PATCH 378/615] #40196 Refactor Outputservices - Listen to model added/removed changes to start/stop watching the file - Clean up and simplify implementation --- .../output/electron-browser/outputServices.ts | 558 ++++++++---------- 1 file changed, 234 insertions(+), 324 deletions(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index e56069a3098..29aac683a9d 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ import * as nls from 'vs/nls'; -import * as fs from 'fs'; import * as paths from 'vs/base/common/paths'; import { TPromise } from 'vs/base/common/winjs.base'; import Event, { Emitter } from 'vs/base/common/event'; @@ -36,173 +35,10 @@ import { toLocalISOString } from 'vs/base/common/date'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; -export class OutputService implements IOutputService, ITextModelContentProvider { - - public _serviceBrand: any; - - private channels: Map = new Map(); - private activeChannelId: string; - - private _onDidChannelContentChange: Emitter = new Emitter(); - readonly onDidChannelContentChange: Event = this._onDidChannelContentChange.event; - - private _onActiveOutputChannel: Emitter = new Emitter(); - readonly onActiveOutputChannel: Event = this._onActiveOutputChannel.event; - - private _outputPanel: OutputPanel; - - constructor( - @IStorageService private storageService: IStorageService, - @IInstantiationService private instantiationService: IInstantiationService, - @IPanelService private panelService: IPanelService, - @IWorkspaceContextService contextService: IWorkspaceContextService, - @IModelService private modelService: IModelService, - @IModeService private modeService: IModeService, - @ITextModelService textModelResolverService: ITextModelService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IEnvironmentService private environmentService: IEnvironmentService - ) { - const channels = this.getChannels(); - this.activeChannelId = this.storageService.get(OUTPUT_ACTIVE_CHANNEL_KEY, StorageScope.WORKSPACE, channels && channels.length > 0 ? channels[0].id : null); - - instantiationService.createInstance(OutputLinkProvider); - - // Register as text model content provider for output - textModelResolverService.registerTextModelContentProvider(OUTPUT_SCHEME, this); - - this.onDidPanelOpen(this.panelService.getActivePanel()); - panelService.onDidPanelOpen(this.onDidPanelOpen, this); - panelService.onDidPanelClose(this.onDidPanelClose, this); - } - - provideTextContent(resource: URI): TPromise { - const channel = this.getChannel(resource.fsPath); - return channel.getOutputDelta() - .then(outputDelta => this.modelService.createModel(outputDelta.value, this.modeService.getOrCreateMode(OUTPUT_MIME), resource)); - } - - showChannel(id: string, preserveFocus?: boolean): TPromise { - if (this.isChannelShown(id)) { - return TPromise.as(null); - } - - if (this.activeChannelId) { - this.doHideChannel(this.activeChannelId); - } - - this.activeChannelId = id; - const promise: TPromise = this._outputPanel ? this.doShowChannel(id, preserveFocus) : this.panelService.openPanel(OUTPUT_PANEL_ID); - return promise.then(() => this._onActiveOutputChannel.fire(id)); - } - - showChannelInEditor(channelId: string): TPromise { - return this.editorService.openEditor(this.createInput(channelId)) as TPromise; - } - - getChannel(id: string): IOutputChannel { - if (!this.channels.has(id)) { - this.channels.set(id, this.createChannel(id)); - } - return this.channels.get(id); - } - - getChannels(): IOutputChannelIdentifier[] { - return Registry.as(Extensions.OutputChannels).getChannels(); - } - - getActiveChannel(): IOutputChannel { - return this.getChannel(this.activeChannelId); - } - - private createChannel(id: string): OutputChannel { - const channelDisposables = []; - const channelData = Registry.as(Extensions.OutputChannels).getChannel(id); - const file = channelData && channelData.file ? channelData.file : URI.file(paths.join(this.environmentService.userDataPath, 'outputs', toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, ''), `${id}.output.log`)); - const channel = channelData && channelData.file ? this.instantiationService.createInstance(OutputChannel, channelData) : - this.instantiationService.createInstance(WritableOutputChannel, { id, label: channelData ? channelData.label : '', file }); - channelDisposables.push(this.instantiationService.createInstance(ChannelModelUpdater, channel)); - channel.onDidChange(() => this._onDidChannelContentChange.fire(id), channelDisposables); - channel.onDispose(() => { - Registry.as(Extensions.OutputChannels).removeChannel(id); - if (this.activeChannelId === id) { - const channels = this.getChannels(); - if (this._outputPanel && channels.length) { - this.showChannel(channels[0].id); - } else { - this._onActiveOutputChannel.fire(void 0); - } - } - dispose(channelDisposables); - }, channelDisposables); - - return channel; - } - - - private isChannelShown(channelId: string): boolean { - const panel = this.panelService.getActivePanel(); - return panel && panel.getId() === OUTPUT_PANEL_ID && this.activeChannelId === channelId; - } - - private onDidPanelClose(panel: IPanel): void { - if (this._outputPanel && panel.getId() === OUTPUT_PANEL_ID) { - if (this.activeChannelId) { - this.doHideChannel(this.activeChannelId); - } - this._outputPanel.clearInput(); - } - } - - private onDidPanelOpen(panel: IPanel): void { - if (panel && panel.getId() === OUTPUT_PANEL_ID) { - this._outputPanel = this.panelService.getActivePanel(); - if (this.activeChannelId) { - this.doShowChannel(this.activeChannelId, true); - } - } - } - - private doShowChannel(channelId: string, preserveFocus: boolean): TPromise { - if (this._outputPanel) { - const channel = this.getChannel(channelId); - return channel.show() - .then(() => { - this.storageService.store(OUTPUT_ACTIVE_CHANNEL_KEY, channelId, StorageScope.WORKSPACE); - this._outputPanel.setInput(this.createInput(channelId), EditorOptions.create({ preserveFocus: preserveFocus })); - if (!preserveFocus) { - this._outputPanel.focus(); - } - }); - } else { - return TPromise.as(null); - } - } - - private doHideChannel(channelId): void { - const channel = this.getChannel(channelId); - if (channel) { - channel.hide(); - } - } - - private createInput(channelId: string): ResourceEditorInput { - const resource = URI.from({ scheme: OUTPUT_SCHEME, path: channelId }); - const channelData = Registry.as(Extensions.OutputChannels).getChannel(channelId); - const label = channelData ? channelData.label : channelId; - return this.instantiationService.createInstance(ResourceEditorInput, nls.localize('output', "{0} - Output", label), nls.localize('channel', "Output channel for '{0}'", label), resource); - } -} - -export interface IOutputDelta { - readonly value: string; - readonly id: number; - readonly append?: boolean; -} - -class OutputFileListener extends Disposable { +class OutputFileHandler extends Disposable { private _onDidChange: Emitter = new Emitter(); - readonly onDidChange: Event = this._onDidChange.event; + readonly onDidContentChange: Event = this._onDidChange.event; private disposables: IDisposable[] = []; @@ -238,13 +74,12 @@ class OutputFileListener extends Disposable { } } -class OutputChannel extends Disposable implements IOutputChannel { +interface OutputChannel extends IOutputChannel { + readonly onDispose: Event; + resolve(): TPromise; +} - protected _onDidChange: Emitter = new Emitter(); - readonly onDidChange: Event = this._onDidChange.event; - - protected _onDidClear: Emitter = new Emitter(); - readonly onDidClear: Event = this._onDidClear.event; +class FileOutputChannel extends Disposable implements OutputChannel { protected _onDispose: Emitter = new Emitter(); readonly onDispose: Event = this._onDispose.event; @@ -252,21 +87,33 @@ class OutputChannel extends Disposable implements IOutputChannel { scrollLock: boolean = false; protected readonly file: URI; - private disposables: IDisposable[] = []; - protected shown: boolean = false; + private readonly fileHandler: OutputFileHandler; - private contentResolver: TPromise; + private updateInProgress: boolean = false; + private modelUpdater: RunOnceScheduler; private startOffset: number; private endOffset: number; constructor( private readonly outputChannelIdentifier: IOutputChannelIdentifier, - @IFileService protected fileService: IFileService + @IFileService protected fileService: IFileService, + @IModelService private modelService: IModelService, + @IPanelService private panelService: IPanelService ) { super(); this.file = outputChannelIdentifier.file; this.startOffset = 0; this.endOffset = 0; + + this.modelUpdater = new RunOnceScheduler(() => this.doUpdate(), 300); + this._register(toDisposable(() => this.modelUpdater.cancel())); + + this.fileHandler = this._register(new OutputFileHandler(this.file, this.fileService)); + this._register(this.fileHandler.onDidContentChange(() => this.onDidContentChange())); + this._register(toDisposable(() => this.fileHandler.unwatch())); + + this._register(this.modelService.onModelAdded(this.onModelAdded, this)); + this._register(this.modelService.onModelRemoved(this.onModelRemoved, this)); } get id(): string { @@ -277,168 +124,54 @@ class OutputChannel extends Disposable implements IOutputChannel { return this.outputChannelIdentifier.label; } - show(): TPromise { - if (!this.shown) { - this.shown = true; - this.watch(); - return this.resolve() as TPromise; - } - return TPromise.as(null); - } - - hide(): void { - if (this.shown) { - this.shown = false; - this.unwatch(); - this.contentResolver = null; - } - } - append(message: string): void { - throw new Error(nls.localize('appendNotSupported', "Append is not supported on File output channel")); - } - - getOutputDelta(previousId?: number): TPromise { - return this.resolve() - .then(content => { - const startOffset = previousId !== void 0 ? previousId : this.startOffset; - if (this.startOffset === this.endOffset) { - // Content cleared - return { append: false, id: this.endOffset, value: '' }; - } - if (startOffset === this.endOffset) { - // Content not changed - return { append: true, id: this.endOffset, value: '' }; - } - if (startOffset > 0 && startOffset < this.endOffset) { - // Delta - const value = content.substring(startOffset, this.endOffset); - return { append: true, value, id: this.endOffset }; - } - // Replace - return { append: false, value: content, id: this.endOffset }; - }); + throw new Error('Not supported'); } clear(): void { this.startOffset = this.endOffset; - this._onDidClear.fire(); - } - - private resolve(): TPromise { - if (!this.contentResolver) { - this.contentResolver = this.fileService.resolveContent(this.file) - .then(result => { - const content = result.value; - if (this.endOffset !== content.length) { - this.endOffset = content.length; - this._onDidChange.fire(); - } - return content; - }); - } - return this.contentResolver; - } - - private watch(): void { - this.fileService.watchFileChanges(this.file); - this.disposables.push(this.fileService.onFileChanges(changes => { - if (changes.contains(this.file, FileChangeType.UPDATED)) { - this.contentResolver = null; - this._onDidChange.fire(); - } - })); - } - - private unwatch(): void { - this.fileService.unwatchFileChanges(this.file); - this.disposables = dispose(this.disposables); - } - - dispose(): void { - this.hide(); - this._onDispose.fire(); - super.dispose(); - } -} - -class WritableOutputChannel extends OutputChannel implements IOutputChannel { - - private outputWriter: RotatingLogger; - private flushScheduler: RunOnceScheduler; - - constructor( - outputChannelIdentifier: IOutputChannelIdentifier, - @IFileService fileService: IFileService - ) { - super(outputChannelIdentifier, fileService); - this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 5, 1); - this.outputWriter.clearFormatters(); - this.flushScheduler = new RunOnceScheduler(() => this.outputWriter.flush(), 300); - } - - append(message: string): void { - this.outputWriter.critical(message); - if (this.shown && !this.flushScheduler.isScheduled()) { - this.flushScheduler.schedule(); + const model = this.getModel(); + if (model) { + model.setValue(''); } } - show(): TPromise { - if (!this.flushScheduler.isScheduled()) { - this.flushScheduler.schedule(); + resolve(): TPromise { + return this.fileHandler.loadContent(this.startOffset); + } + + private onModelAdded(model: IModel): void { + if (model.uri.fsPath === this.id) { + this.endOffset = this.startOffset + model.getValueLength(); + this.fileHandler.watch(); } - return super.show(); - } -} - -class ChannelModelUpdater extends Disposable { - - private updateInProgress: boolean = false; - private modelUpdater: RunOnceScheduler; - private lastReadId: number; - - constructor( - private channel: OutputChannel, - @IModelService private modelService: IModelService, - @IPanelService private panelService: IPanelService - ) { - super(); - this.modelUpdater = new RunOnceScheduler(() => this.doUpdate(), 300); - this._register(channel.onDidChange(() => this.onDidChange())); - this._register(channel.onDidClear(() => this.onDidClear())); - this._register(toDisposable(() => this.modelUpdater.cancel())); - this._register(this.modelService.onModelRemoved(this.onModelRemoved, this)); } - private onDidChange(): void { + private onModelRemoved(model: IModel): void { + if (model.uri.fsPath === this.id) { + this.fileHandler.unwatch(); + } + } + + private onDidContentChange(): void { if (!this.updateInProgress) { this.updateInProgress = true; this.modelUpdater.schedule(); } } - private onDidClear(): void { - this.modelUpdater.cancel(); - this.updateInProgress = true; - this.doUpdate(); - } - private doUpdate(): void { - const model = this.getModel(this.channel.id); - if (model && !model.isDisposed()) { - this.channel.getOutputDelta(this.lastReadId) + let model = this.getModel(); + if (model) { + this.fileHandler.loadContent(this.endOffset) .then(delta => { - if (delta) { - if (delta.append) { - const lastLine = model.getLineCount(); - const lastLineMaxColumn = model.getLineMaxColumn(lastLine); - model.applyEdits([EditOperation.insert(new Position(lastLine, lastLineMaxColumn), delta.value)]); - } else { - model.setValue(delta.value); - } - this.lastReadId = delta.id; - if (!this.channel.scrollLock) { + model = this.getModel(); + if (model && delta) { + const lastLine = model.getLineCount(); + const lastLineMaxColumn = model.getLineMaxColumn(lastLine); + model.applyEdits([EditOperation.insert(new Position(lastLine, lastLineMaxColumn), delta)]); + this.endOffset = this.endOffset + delta.length; + if (!this.scrollLock) { (this.panelService.getActivePanel()).revealLastLine(); } } @@ -449,13 +182,190 @@ class ChannelModelUpdater extends Disposable { } } - private getModel(channel: string): IModel { - return this.modelService.getModel(URI.from({ scheme: OUTPUT_SCHEME, path: channel })); + protected getModel(): IModel { + const model = this.modelService.getModel(URI.from({ scheme: OUTPUT_SCHEME, path: this.id })); + return model && !model.isDisposed() ? model : null; } - private onModelRemoved(model: IModel): void { - if (model.uri.fsPath === this.channel.id) { - this.lastReadId = void 0; + dispose(): void { + this._onDispose.fire(); + super.dispose(); + } +} + +class AppendableFileOutoutChannel extends FileOutputChannel implements OutputChannel { + + private outputWriter: RotatingLogger; + private flushScheduler: RunOnceScheduler; + + constructor( + outputChannelIdentifier: IOutputChannelIdentifier, + @IFileService fileService: IFileService, + @IModelService modelService: IModelService, + @IPanelService panelService: IPanelService, + ) { + super(outputChannelIdentifier, fileService, modelService, panelService); + this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 5, 1); + this.outputWriter.clearFormatters(); + + this.flushScheduler = new RunOnceScheduler(() => this.outputWriter.flush(), 300); + this._register(toDisposable(() => this.flushScheduler.cancel())); + + this._register(modelService.onModelAdded(model => { + if (model.uri.fsPath === this.id && !this.flushScheduler.isScheduled()) { + this.flushScheduler.schedule(); + } + })); + } + + append(message: string): void { + this.outputWriter.critical(message); + if (this.getModel() && !this.flushScheduler.isScheduled()) { + this.flushScheduler.schedule(); } } } + +export class OutputService implements IOutputService, ITextModelContentProvider { + + public _serviceBrand: any; + + private channels: Map = new Map(); + private activeChannelId: string; + + private _onActiveOutputChannel: Emitter = new Emitter(); + readonly onActiveOutputChannel: Event = this._onActiveOutputChannel.event; + + private _outputPanel: OutputPanel; + + constructor( + @IStorageService private storageService: IStorageService, + @IInstantiationService private instantiationService: IInstantiationService, + @IPanelService private panelService: IPanelService, + @IWorkspaceContextService contextService: IWorkspaceContextService, + @IModelService private modelService: IModelService, + @IModeService private modeService: IModeService, + @ITextModelService textModelResolverService: ITextModelService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IEnvironmentService private environmentService: IEnvironmentService + ) { + const channels = this.getChannels(); + this.activeChannelId = this.storageService.get(OUTPUT_ACTIVE_CHANNEL_KEY, StorageScope.WORKSPACE, channels && channels.length > 0 ? channels[0].id : null); + + instantiationService.createInstance(OutputLinkProvider); + + // Register as text model content provider for output + textModelResolverService.registerTextModelContentProvider(OUTPUT_SCHEME, this); + + this.onDidPanelOpen(this.panelService.getActivePanel()); + panelService.onDidPanelOpen(this.onDidPanelOpen, this); + panelService.onDidPanelClose(this.onDidPanelClose, this); + } + + provideTextContent(resource: URI): TPromise { + const channel = this.getChannel(resource.fsPath); + return channel.resolve() + .then(content => this.modelService.createModel(content, this.modeService.getOrCreateMode(OUTPUT_MIME), resource)); + } + + showChannel(id: string, preserveFocus?: boolean): TPromise { + if (this.isChannelShown(id)) { + return TPromise.as(null); + } + + this.activeChannelId = id; + let promise = TPromise.as(null); + if (this._outputPanel) { + this.doShowChannel(id, preserveFocus); + } else { + promise = this.panelService.openPanel(OUTPUT_PANEL_ID) as TPromise; + } + return promise.then(() => this._onActiveOutputChannel.fire(id)); + } + + showChannelInEditor(channelId: string): TPromise { + return this.editorService.openEditor(this.createInput(channelId)) as TPromise; + } + + getChannel(id: string): IOutputChannel { + if (!this.channels.has(id)) { + this.channels.set(id, this.createChannel(id)); + } + return this.channels.get(id); + } + + getChannels(): IOutputChannelIdentifier[] { + return Registry.as(Extensions.OutputChannels).getChannels(); + } + + getActiveChannel(): IOutputChannel { + return this.getChannel(this.activeChannelId); + } + + private createChannel(id: string): OutputChannel { + const channelDisposables = []; + const channel = this.instantiateChannel(id); + channel.onDispose(() => { + Registry.as(Extensions.OutputChannels).removeChannel(id); + if (this.activeChannelId === id) { + const channels = this.getChannels(); + if (this._outputPanel && channels.length) { + this.showChannel(channels[0].id); + } else { + this._onActiveOutputChannel.fire(void 0); + } + } + dispose(channelDisposables); + }, channelDisposables); + + return channel; + } + + private instantiateChannel(id: string): OutputChannel { + const channelData = Registry.as(Extensions.OutputChannels).getChannel(id); + if (channelData && channelData.file) { + return this.instantiationService.createInstance(FileOutputChannel, channelData); + } + const sessionId = toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, ''); + const file = URI.file(paths.join(this.environmentService.logsPath, 'outputs', `${id}.${sessionId}.log`)); + return this.instantiationService.createInstance(AppendableFileOutoutChannel, { id, label: channelData ? channelData.label : '', file }); + } + + + private isChannelShown(channelId: string): boolean { + const panel = this.panelService.getActivePanel(); + return panel && panel.getId() === OUTPUT_PANEL_ID && this.activeChannelId === channelId; + } + + private onDidPanelClose(panel: IPanel): void { + if (this._outputPanel && panel.getId() === OUTPUT_PANEL_ID) { + this._outputPanel.clearInput(); + } + } + + private onDidPanelOpen(panel: IPanel): void { + if (panel && panel.getId() === OUTPUT_PANEL_ID) { + this._outputPanel = this.panelService.getActivePanel(); + if (this.activeChannelId) { + this.doShowChannel(this.activeChannelId, true); + } + } + } + + private doShowChannel(channelId: string, preserveFocus: boolean): void { + if (this._outputPanel) { + this.storageService.store(OUTPUT_ACTIVE_CHANNEL_KEY, channelId, StorageScope.WORKSPACE); + this._outputPanel.setInput(this.createInput(channelId), EditorOptions.create({ preserveFocus: preserveFocus })); + if (!preserveFocus) { + this._outputPanel.focus(); + } + } + } + + private createInput(channelId: string): ResourceEditorInput { + const resource = URI.from({ scheme: OUTPUT_SCHEME, path: channelId }); + const channelData = Registry.as(Extensions.OutputChannels).getChannel(channelId); + const label = channelData ? channelData.label : channelId; + return this.instantiationService.createInstance(ResourceEditorInput, nls.localize('output', "{0} - Output", label), nls.localize('channel', "Output channel for '{0}'", label), resource); + } +} \ No newline at end of file From c16d7a3c726f52973cbe26c2fb75c037a129054f Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 18 Dec 2017 13:16:39 +0100 Subject: [PATCH 379/615] #40196 Read the content since last read by passing position to file service --- .../output/electron-browser/outputServices.ts | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index 29aac683a9d..d2cfd1b5077 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -142,7 +142,7 @@ class FileOutputChannel extends Disposable implements OutputChannel { private onModelAdded(model: IModel): void { if (model.uri.fsPath === this.id) { - this.endOffset = this.startOffset + model.getValueLength(); + this.endOffset = this.startOffset + new Buffer(model.getValueLength()).byteLength; this.fileHandler.watch(); } } @@ -164,17 +164,8 @@ class FileOutputChannel extends Disposable implements OutputChannel { let model = this.getModel(); if (model) { this.fileHandler.loadContent(this.endOffset) - .then(delta => { - model = this.getModel(); - if (model && delta) { - const lastLine = model.getLineCount(); - const lastLineMaxColumn = model.getLineMaxColumn(lastLine); - model.applyEdits([EditOperation.insert(new Position(lastLine, lastLineMaxColumn), delta)]); - this.endOffset = this.endOffset + delta.length; - if (!this.scrollLock) { - (this.panelService.getActivePanel()).revealLastLine(); - } - } + .then(content => { + this.appendContent(content); this.updateInProgress = false; }, () => this.updateInProgress = false); } else { @@ -182,6 +173,19 @@ class FileOutputChannel extends Disposable implements OutputChannel { } } + private appendContent(content: string): void { + const model = this.getModel(); + if (model && content) { + const lastLine = model.getLineCount(); + const lastLineMaxColumn = model.getLineMaxColumn(lastLine); + model.applyEdits([EditOperation.insert(new Position(lastLine, lastLineMaxColumn), content)]); + this.endOffset = this.endOffset + new Buffer(content).byteLength; + if (!this.scrollLock) { + (this.panelService.getActivePanel()).revealLastLine(); + } + } + } + protected getModel(): IModel { const model = this.modelService.getModel(URI.from({ scheme: OUTPUT_SCHEME, path: this.id })); return model && !model.isDisposed() ? model : null; From 14057a645f7c8a48fc4626ce1ea22a23fbc13242 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 18 Dec 2017 18:24:55 +0100 Subject: [PATCH 380/615] #40196 Write into model directly when a message is appended --- src/typings/spdlog.d.ts | 3 + .../output/electron-browser/outputServices.ts | 214 ++++++++++-------- 2 files changed, 127 insertions(+), 90 deletions(-) diff --git a/src/typings/spdlog.d.ts b/src/typings/spdlog.d.ts index 5417fdd4212..4762b11143f 100644 --- a/src/typings/spdlog.d.ts +++ b/src/typings/spdlog.d.ts @@ -29,6 +29,9 @@ declare module 'spdlog' { critical(message: string); setLevel(level: number); clearFormatters(); + /** + * A synchronous operation to flush the contents into file + */ flush(): void; drop(): void; } diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index d2cfd1b5077..0ebaadb8a17 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -35,7 +35,7 @@ import { toLocalISOString } from 'vs/base/common/date'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; -class OutputFileHandler extends Disposable { +class OutputFileListener extends Disposable { private _onDidChange: Emitter = new Emitter(); readonly onDidContentChange: Event = this._onDidChange.event; @@ -58,11 +58,6 @@ class OutputFileHandler extends Disposable { })); } - loadContent(from: number): TPromise { - return this.fileService.resolveContent(this.file) - .then(({ value }) => value.substring(from)); - } - unwatch(): void { this.fileService.unwatchFileChanges(this.file); this.disposables = dispose(this.disposables); @@ -76,44 +71,34 @@ class OutputFileHandler extends Disposable { interface OutputChannel extends IOutputChannel { readonly onDispose: Event; - resolve(): TPromise; + createModel(): TPromise; } -class FileOutputChannel extends Disposable implements OutputChannel { +abstract class AbstractOutputChannel extends Disposable { + + scrollLock: boolean = false; protected _onDispose: Emitter = new Emitter(); readonly onDispose: Event = this._onDispose.event; - scrollLock: boolean = false; - protected readonly file: URI; - private readonly fileHandler: OutputFileHandler; - private updateInProgress: boolean = false; - private modelUpdater: RunOnceScheduler; - private startOffset: number; - private endOffset: number; + protected startOffset: number = 0; + protected endOffset: number = 0; + protected modelUpdater: RunOnceScheduler; constructor( - private readonly outputChannelIdentifier: IOutputChannelIdentifier, - @IFileService protected fileService: IFileService, - @IModelService private modelService: IModelService, - @IPanelService private panelService: IPanelService + protected readonly outputChannelIdentifier: IOutputChannelIdentifier, + protected fileService: IFileService, + private modelService: IModelService, + private modeService: IModeService, + private panelService: IPanelService ) { super(); this.file = outputChannelIdentifier.file; - this.startOffset = 0; - this.endOffset = 0; - this.modelUpdater = new RunOnceScheduler(() => this.doUpdate(), 300); + this.modelUpdater = new RunOnceScheduler(() => this.updateModel(), 300); this._register(toDisposable(() => this.modelUpdater.cancel())); - - this.fileHandler = this._register(new OutputFileHandler(this.file, this.fileService)); - this._register(this.fileHandler.onDidContentChange(() => this.onDidContentChange())); - this._register(toDisposable(() => this.fileHandler.unwatch())); - - this._register(this.modelService.onModelAdded(this.onModelAdded, this)); - this._register(this.modelService.onModelRemoved(this.onModelRemoved, this)); } get id(): string { @@ -124,11 +109,10 @@ class FileOutputChannel extends Disposable implements OutputChannel { return this.outputChannelIdentifier.label; } - append(message: string): void { - throw new Error('Not supported'); - } - clear(): void { + if (this.modelUpdater.isScheduled()) { + this.modelUpdater.cancel(); + } this.startOffset = this.endOffset; const model = this.getModel(); if (model) { @@ -136,44 +120,22 @@ class FileOutputChannel extends Disposable implements OutputChannel { } } - resolve(): TPromise { - return this.fileHandler.loadContent(this.startOffset); + createModel(): TPromise { + return this.fileService.resolveContent(this.file, { position: this.startOffset }) + .then(content => { + const model = this.modelService.createModel(content.value, this.modeService.getOrCreateMode(OUTPUT_MIME), URI.from({ scheme: OUTPUT_SCHEME, path: this.id })); + this.endOffset = this.startOffset + new Buffer(model.getValueLength()).byteLength; + this.onModelCreated(model); + const disposables: IDisposable[] = []; + disposables.push(model.onWillDispose(() => { + this.onModelWillDispose(model); + dispose(disposables); + })); + return model; + }); } - private onModelAdded(model: IModel): void { - if (model.uri.fsPath === this.id) { - this.endOffset = this.startOffset + new Buffer(model.getValueLength()).byteLength; - this.fileHandler.watch(); - } - } - - private onModelRemoved(model: IModel): void { - if (model.uri.fsPath === this.id) { - this.fileHandler.unwatch(); - } - } - - private onDidContentChange(): void { - if (!this.updateInProgress) { - this.updateInProgress = true; - this.modelUpdater.schedule(); - } - } - - private doUpdate(): void { - let model = this.getModel(); - if (model) { - this.fileHandler.loadContent(this.endOffset) - .then(content => { - this.appendContent(content); - this.updateInProgress = false; - }, () => this.updateInProgress = false); - } else { - this.updateInProgress = false; - } - } - - private appendContent(content: string): void { + protected appendContent(content: string): void { const model = this.getModel(); if (model && content) { const lastLine = model.getLineCount(); @@ -191,41 +153,116 @@ class FileOutputChannel extends Disposable implements OutputChannel { return model && !model.isDisposed() ? model : null; } + protected onModelCreated(model: IModel) { } + protected onModelWillDispose(model: IModel) { } + protected updateModel() { } + dispose(): void { this._onDispose.fire(); super.dispose(); } } -class AppendableFileOutoutChannel extends FileOutputChannel implements OutputChannel { +class FileOutputChannel extends AbstractOutputChannel implements OutputChannel { - private outputWriter: RotatingLogger; - private flushScheduler: RunOnceScheduler; + private readonly fileHandler: OutputFileListener; + + private updateInProgress: boolean = false; constructor( outputChannelIdentifier: IOutputChannelIdentifier, @IFileService fileService: IFileService, @IModelService modelService: IModelService, - @IPanelService panelService: IPanelService, + @IModeService modeService: IModeService, + @IPanelService panelService: IPanelService ) { - super(outputChannelIdentifier, fileService, modelService, panelService); + super(outputChannelIdentifier, fileService, modelService, modeService, panelService); + + this.fileHandler = this._register(new OutputFileListener(this.file, fileService)); + this._register(this.fileHandler.onDidContentChange(() => this.onDidContentChange())); + this._register(toDisposable(() => this.fileHandler.unwatch())); + } + + append(message: string): void { + throw new Error('Not supported'); + } + + protected updateModel(): void { + let model = this.getModel(); + if (model) { + this.fileService.resolveContent(this.file, { position: this.endOffset }) + .then(content => { + this.appendContent(content.value); + this.updateInProgress = false; + }, () => this.updateInProgress = false); + } else { + this.updateInProgress = false; + } + } + + protected onModelCreated(model: IModel): void { + this.fileHandler.watch(); + } + + protected onModelWillDispose(model: IModel): void { + this.fileHandler.unwatch(); + } + + private onDidContentChange(): void { + if (!this.updateInProgress) { + this.updateInProgress = true; + this.modelUpdater.schedule(); + } + } +} + +class AppendableFileOutputChannel extends AbstractOutputChannel implements OutputChannel { + + private outputWriter: RotatingLogger; + private appendedMessage = ''; + + constructor( + outputChannelIdentifier: IOutputChannelIdentifier, + @IFileService fileService: IFileService, + @IModelService modelService: IModelService, + @IModeService modeService: IModeService, + @IPanelService panelService: IPanelService + ) { + super(outputChannelIdentifier, fileService, modelService, modeService, panelService); + this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 5, 1); this.outputWriter.clearFormatters(); - - this.flushScheduler = new RunOnceScheduler(() => this.outputWriter.flush(), 300); - this._register(toDisposable(() => this.flushScheduler.cancel())); - - this._register(modelService.onModelAdded(model => { - if (model.uri.fsPath === this.id && !this.flushScheduler.isScheduled()) { - this.flushScheduler.schedule(); - } - })); } append(message: string): void { this.outputWriter.critical(message); - if (this.getModel() && !this.flushScheduler.isScheduled()) { - this.flushScheduler.schedule(); + const model = this.getModel(); + if (model) { + this.appendedMessage += message; + if (!this.modelUpdater.isScheduled()) { + this.modelUpdater.schedule(); + } + } + } + + clear(): void { + super.clear(); + this.appendedMessage = ''; + } + + createModel(): TPromise { + this.outputWriter.flush(); + this.appendedMessage = ''; + return super.createModel(); + } + + protected updateModel(): void { + let model = this.getModel(); + if (model) { + if (this.appendedMessage) { + this.appendContent(this.appendedMessage); + this.appendedMessage = ''; + } } } } @@ -247,8 +284,6 @@ export class OutputService implements IOutputService, ITextModelContentProvider @IInstantiationService private instantiationService: IInstantiationService, @IPanelService private panelService: IPanelService, @IWorkspaceContextService contextService: IWorkspaceContextService, - @IModelService private modelService: IModelService, - @IModeService private modeService: IModeService, @ITextModelService textModelResolverService: ITextModelService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IEnvironmentService private environmentService: IEnvironmentService @@ -268,8 +303,7 @@ export class OutputService implements IOutputService, ITextModelContentProvider provideTextContent(resource: URI): TPromise { const channel = this.getChannel(resource.fsPath); - return channel.resolve() - .then(content => this.modelService.createModel(content, this.modeService.getOrCreateMode(OUTPUT_MIME), resource)); + return channel.createModel(); } showChannel(id: string, preserveFocus?: boolean): TPromise { @@ -332,7 +366,7 @@ export class OutputService implements IOutputService, ITextModelContentProvider } const sessionId = toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, ''); const file = URI.file(paths.join(this.environmentService.logsPath, 'outputs', `${id}.${sessionId}.log`)); - return this.instantiationService.createInstance(AppendableFileOutoutChannel, { id, label: channelData ? channelData.label : '', file }); + return this.instantiationService.createInstance(AppendableFileOutputChannel, { id, label: channelData ? channelData.label : '', file }); } From d9c9e8ddfd9530c8f551b9e2a4c1b9a50eb34749 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 18 Dec 2017 18:28:21 +0100 Subject: [PATCH 381/615] Fixes #18353: Always respect the `shouldIgnoreTrimWhitespace` flag --- src/vs/editor/common/diff/diffComputer.ts | 24 ------------------- .../common/services/editorSimpleWorker.ts | 2 -- .../test/common/diff/diffComputer.test.ts | 1 - 3 files changed, 27 deletions(-) diff --git a/src/vs/editor/common/diff/diffComputer.ts b/src/vs/editor/common/diff/diffComputer.ts index f9c02b3ee11..a1b88e19a4b 100644 --- a/src/vs/editor/common/diff/diffComputer.ts +++ b/src/vs/editor/common/diff/diffComputer.ts @@ -34,24 +34,6 @@ class MarkerSequence implements ISequence { this.endMarkers = endMarkers; } - public equals(other: any): boolean { - if (!(other instanceof MarkerSequence)) { - return false; - } - const otherMarkerSequence = other; - if (this.getLength() !== otherMarkerSequence.getLength()) { - return false; - } - for (let i = 0, len = this.getLength(); i < len; i++) { - const myElement = this.getElementHash(i); - const otherElement = otherMarkerSequence.getElementHash(i); - if (myElement !== otherElement) { - return false; - } - } - return true; - } - public getLength(): number { return this.startMarkers.length; } @@ -321,7 +303,6 @@ class LineChange implements ILineChange { export interface IDiffComputerOpts { shouldPostProcessCharChanges: boolean; shouldIgnoreTrimWhitespace: boolean; - shouldConsiderTrimWhitespaceInEmptyCase: boolean; shouldMakePrettyDiff: boolean; } @@ -347,11 +328,6 @@ export class DiffComputer { this.modifiedLines = modifiedLines; this.original = new LineMarkerSequence(originalLines); this.modified = new LineMarkerSequence(modifiedLines); - - if (opts.shouldConsiderTrimWhitespaceInEmptyCase && this.shouldIgnoreTrimWhitespace && this.original.equals(this.modified)) { - // Diff would be empty with `shouldIgnoreTrimWhitespace` - this.shouldIgnoreTrimWhitespace = false; - } } public computeDiff(): ILineChange[] { diff --git a/src/vs/editor/common/services/editorSimpleWorker.ts b/src/vs/editor/common/services/editorSimpleWorker.ts index 169df1f0de1..155f97c34cf 100644 --- a/src/vs/editor/common/services/editorSimpleWorker.ts +++ b/src/vs/editor/common/services/editorSimpleWorker.ts @@ -313,7 +313,6 @@ export abstract class BaseEditorSimpleWorker { let diffComputer = new DiffComputer(originalLines, modifiedLines, { shouldPostProcessCharChanges: true, shouldIgnoreTrimWhitespace: ignoreTrimWhitespace, - shouldConsiderTrimWhitespaceInEmptyCase: true, shouldMakePrettyDiff: true }); return TPromise.as(diffComputer.computeDiff()); @@ -331,7 +330,6 @@ export abstract class BaseEditorSimpleWorker { let diffComputer = new DiffComputer(originalLines, modifiedLines, { shouldPostProcessCharChanges: false, shouldIgnoreTrimWhitespace: ignoreTrimWhitespace, - shouldConsiderTrimWhitespaceInEmptyCase: false, shouldMakePrettyDiff: true }); return TPromise.as(diffComputer.computeDiff()); diff --git a/src/vs/editor/test/common/diff/diffComputer.test.ts b/src/vs/editor/test/common/diff/diffComputer.test.ts index 54ef2f3a86e..0d521de7eb8 100644 --- a/src/vs/editor/test/common/diff/diffComputer.test.ts +++ b/src/vs/editor/test/common/diff/diffComputer.test.ts @@ -55,7 +55,6 @@ function assertDiff(originalLines: string[], modifiedLines: string[], expectedCh var diffComputer = new DiffComputer(originalLines, modifiedLines, { shouldPostProcessCharChanges: shouldPostProcessCharChanges || false, shouldIgnoreTrimWhitespace: shouldIgnoreTrimWhitespace || false, - shouldConsiderTrimWhitespaceInEmptyCase: true, shouldMakePrettyDiff: true }); var changes = diffComputer.computeDiff(); From f929c1bff4b719cc782ab879232cc0a1c51b705f Mon Sep 17 00:00:00 2001 From: SteVen Batten <6561887+sbatten@users.noreply.github.com> Date: Mon, 18 Dec 2017 10:45:45 -0800 Subject: [PATCH 382/615] updating the md scroll sync to use binary search over linear search (#40401) --- extensions/markdown/media/main.js | 50 ++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/extensions/markdown/media/main.js b/extensions/markdown/media/main.js index 4b5cf807476..6ae787c8c23 100644 --- a/extensions/markdown/media/main.js +++ b/extensions/markdown/media/main.js @@ -63,28 +63,44 @@ /** * Find the html elements that are at a specific pixel offset on the page. + * + * @returns {{ previous: { element: any, line: number }, next?: { element: any, line: number } }} */ function getLineElementsAtPageOffset(offset) { - const lines = document.getElementsByClassName('code-line'); - const position = offset - window.scrollY; - let previous = null; - for (const element of lines) { + const allLines = document.getElementsByClassName('code-line'); + /** @type {Element[]} */ + const lines = Array.prototype.filter.call(allLines, element => { const line = +element.getAttribute('data-line'); - if (isNaN(line)) { - continue; + return !isNaN(line) + }); + + const position = offset - window.scrollY; + + let lo = -1; + let hi = lines.length - 1; + while (lo + 1 < hi) { + const mid = Math.floor((lo + hi) / 2); + const bounds = lines[mid].getBoundingClientRect(); + if (bounds.top + bounds.height >= position) { + hi = mid; + } else { + lo = mid; } - const bounds = element.getBoundingClientRect(); - const entry = { element, line }; - if (position < bounds.top) { - if (previous && previous.fractional < 1) { - previous.line += previous.fractional; - return { previous }; - } - return { previous, next: entry }; - } - entry.fractional = (position - bounds.top) / (bounds.height); - previous = entry; } + + const hiElement = lines[hi]; + const hiLine = +hiElement.getAttribute('data-line'); + if (hi >= 1 && hiElement.getBoundingClientRect().top > position) { + const loElement = lines[lo]; + const loLine = +loElement.getAttribute('data-line'); + const bounds = loElement.getBoundingClientRect(); + const previous = { element: loElement, line: loLine + (position - bounds.top) / (bounds.height) }; + const next = { element: hiElement, line: hiLine, fractional: 0 }; + return { previous, next }; + } + + const bounds = hiElement.getBoundingClientRect(); + const previous = { element: hiElement, line: hiLine + (position - bounds.top) / (bounds.height) }; return { previous }; } From 8d244787c4ea2847209bb587216dead1a485a981 Mon Sep 17 00:00:00 2001 From: SteVen Batten <6561887+sbatten@users.noreply.github.com> Date: Mon, 18 Dec 2017 10:46:33 -0800 Subject: [PATCH 383/615] updating the typescript extension codelens to cache requests for the navtree (#40402) Fixes #28214 --- .../src/features/baseCodeLensProvider.ts | 26 +++++++++++++++++-- .../implementationsCodeLensProvider.ts | 7 ++--- .../features/referencesCodeLensProvider.ts | 7 ++--- extensions/typescript/src/typescriptMain.ts | 7 +++-- 4 files changed, 37 insertions(+), 10 deletions(-) diff --git a/extensions/typescript/src/features/baseCodeLensProvider.ts b/extensions/typescript/src/features/baseCodeLensProvider.ts index 896cb9b3d06..fb43d148838 100644 --- a/extensions/typescript/src/features/baseCodeLensProvider.ts +++ b/extensions/typescript/src/features/baseCodeLensProvider.ts @@ -19,12 +19,29 @@ export class ReferencesCodeLens extends CodeLens { } } +export class CachedNavTreeResponse { + response?: Promise; + version: number = -1; + document: string = ''; + + matches(document: TextDocument): boolean { + return this.version === document.version && this.document === document.uri.toString(); + } + + update(document: TextDocument, response: Promise) { + this.response = response; + this.version = document.version; + this.document = document.uri.toString(); + } +} + export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider { private enabled: boolean = true; private onDidChangeCodeLensesEmitter = new EventEmitter(); public constructor( - protected client: ITypeScriptServiceClient + protected client: ITypeScriptServiceClient, + private cachedResponse: CachedNavTreeResponse ) { } public get onDidChangeCodeLenses(): Event { @@ -48,10 +65,15 @@ export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider return []; } try { - const response = await this.client.execute('navtree', { file: filepath }, token); + if (!this.cachedResponse.matches(document)) { + this.cachedResponse.update(document, this.client.execute('navtree', { file: filepath }, token)); + } + + const response = await this.cachedResponse.response; if (!response) { return []; } + const tree = response.body; const referenceableSpans: Range[] = []; if (tree && tree.childItems) { diff --git a/extensions/typescript/src/features/implementationsCodeLensProvider.ts b/extensions/typescript/src/features/implementationsCodeLensProvider.ts index b9d4c74f422..1d44d15ed58 100644 --- a/extensions/typescript/src/features/implementationsCodeLensProvider.ts +++ b/extensions/typescript/src/features/implementationsCodeLensProvider.ts @@ -7,7 +7,7 @@ import { CodeLens, CancellationToken, TextDocument, Range, Location, workspace } import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; -import { TypeScriptBaseCodeLensProvider, ReferencesCodeLens } from './baseCodeLensProvider'; +import { TypeScriptBaseCodeLensProvider, ReferencesCodeLens, CachedNavTreeResponse } from './baseCodeLensProvider'; import { ITypeScriptServiceClient } from '../typescriptService'; import { tsTextSpanToVsRange, vsPositionToTsFileLocation } from '../utils/convert'; @@ -17,9 +17,10 @@ const localize = nls.loadMessageBundle(); export default class TypeScriptImplementationsCodeLensProvider extends TypeScriptBaseCodeLensProvider { public constructor( client: ITypeScriptServiceClient, - private readonly language: string + private readonly language: string, + cachedResponse: CachedNavTreeResponse ) { - super(client); + super(client, cachedResponse); } public updateConfiguration(): void { diff --git a/extensions/typescript/src/features/referencesCodeLensProvider.ts b/extensions/typescript/src/features/referencesCodeLensProvider.ts index d643c9c34b8..098a3469f3b 100644 --- a/extensions/typescript/src/features/referencesCodeLensProvider.ts +++ b/extensions/typescript/src/features/referencesCodeLensProvider.ts @@ -7,7 +7,7 @@ import { CodeLens, CancellationToken, TextDocument, Range, Location, workspace } import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; -import { TypeScriptBaseCodeLensProvider, ReferencesCodeLens } from './baseCodeLensProvider'; +import { TypeScriptBaseCodeLensProvider, ReferencesCodeLens, CachedNavTreeResponse } from './baseCodeLensProvider'; import { ITypeScriptServiceClient } from '../typescriptService'; import { tsTextSpanToVsRange, vsPositionToTsFileLocation } from '../utils/convert'; @@ -17,9 +17,10 @@ const localize = nls.loadMessageBundle(); export default class TypeScriptReferencesCodeLensProvider extends TypeScriptBaseCodeLensProvider { public constructor( client: ITypeScriptServiceClient, - private readonly language: string + private readonly language: string, + cachedResponse: CachedNavTreeResponse ) { - super(client); + super(client, cachedResponse); } public updateConfiguration(): void { diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 82dd3b9326d..94fca89a4a7 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -37,6 +37,7 @@ import { CommandManager } from './utils/commandManager'; import DiagnosticsManager from './features/diagnostics'; import { LanguageDescription } from './utils/languageDescription'; import * as fileSchemes from './utils/fileSchemes'; +import { CachedNavTreeResponse } from './features/baseCodeLensProvider'; const validateSetting = 'validate.enable'; @@ -148,12 +149,14 @@ class LanguageProvider { this.disposables.push(languages.registerCodeActionsProvider(selector, new (await import('./features/refactorProvider')).default(client, this.formattingOptionsManager, commandManager))); this.registerVersionDependentProviders(); - const referenceCodeLensProvider = new (await import('./features/referencesCodeLensProvider')).default(client, this.description.id); + const cachedResponse = new CachedNavTreeResponse(); + + const referenceCodeLensProvider = new (await import('./features/referencesCodeLensProvider')).default(client, this.description.id, cachedResponse); referenceCodeLensProvider.updateConfiguration(); this.toUpdateOnConfigurationChanged.push(referenceCodeLensProvider); this.disposables.push(languages.registerCodeLensProvider(selector, referenceCodeLensProvider)); - const implementationCodeLensProvider = new (await import('./features/implementationsCodeLensProvider')).default(client, this.description.id); + const implementationCodeLensProvider = new (await import('./features/implementationsCodeLensProvider')).default(client, this.description.id, cachedResponse); implementationCodeLensProvider.updateConfiguration(); this.toUpdateOnConfigurationChanged.push(implementationCodeLensProvider); this.disposables.push(languages.registerCodeLensProvider(selector, implementationCodeLensProvider)); From c79a70b92f4e267eadd1c4313a0b4f395211a8c4 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 18 Dec 2017 20:17:29 +0100 Subject: [PATCH 384/615] #40196 Cap size to 30 mb with 5 rotating files --- .../workbench/parts/output/electron-browser/outputServices.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index 0ebaadb8a17..43c19872cd9 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -230,7 +230,7 @@ class AppendableFileOutputChannel extends AbstractOutputChannel implements Outpu ) { super(outputChannelIdentifier, fileService, modelService, modeService, panelService); - this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 5, 1); + this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 30, 5); this.outputWriter.clearFormatters(); } From 2f994348b93e9fff74146e96e2d32383898d84f7 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 18 Dec 2017 20:21:50 +0100 Subject: [PATCH 385/615] #40196 Check active panel before revealing last line --- .../parts/output/electron-browser/outputServices.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index 43c19872cd9..1fc89cd43ae 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -143,7 +143,10 @@ abstract class AbstractOutputChannel extends Disposable { model.applyEdits([EditOperation.insert(new Position(lastLine, lastLineMaxColumn), content)]); this.endOffset = this.endOffset + new Buffer(content).byteLength; if (!this.scrollLock) { - (this.panelService.getActivePanel()).revealLastLine(); + const panel = this.panelService.getActivePanel(); + if (panel && panel.getId() === OUTPUT_PANEL_ID) { + (panel).revealLastLine(); + } } } } From f1eeed498b21b30326fa4eaf19eacf3fa9fd2e59 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 18 Dec 2017 20:52:59 +0100 Subject: [PATCH 386/615] happy holidays! --- src/vs/base/browser/event.ts | 7 ++- .../electron-browser/holidays.contribution.ts | 54 ++++++++++++++++++ .../holidays/electron-browser/media/cap.svg | 41 ++++++++++++++ .../electron-browser/media/holidays.css | 55 +++++++++++++++++++ .../parts/update/electron-browser/update.ts | 5 +- src/vs/workbench/workbench.main.ts | 2 + 6 files changed, 162 insertions(+), 2 deletions(-) create mode 100644 src/vs/workbench/parts/holidays/electron-browser/holidays.contribution.ts create mode 100644 src/vs/workbench/parts/holidays/electron-browser/media/cap.svg create mode 100644 src/vs/workbench/parts/holidays/electron-browser/media/holidays.css diff --git a/src/vs/base/browser/event.ts b/src/vs/base/browser/event.ts index 010e7b03247..190efe95538 100644 --- a/src/vs/base/browser/event.ts +++ b/src/vs/base/browser/event.ts @@ -126,7 +126,12 @@ export const domEvent: IDomEvent = (element: EventHandler, type: string, useCapt return emitter.event; }; -export function stop(event: _Event): _Event { +export interface CancellableEvent { + preventDefault(); + stopPropagation(); +} + +export function stop(event: _Event): _Event { return mapEvent(event, e => { e.preventDefault(); e.stopPropagation(); diff --git a/src/vs/workbench/parts/holidays/electron-browser/holidays.contribution.ts b/src/vs/workbench/parts/holidays/electron-browser/holidays.contribution.ts new file mode 100644 index 00000000000..b848055fb83 --- /dev/null +++ b/src/vs/workbench/parts/holidays/electron-browser/holidays.contribution.ts @@ -0,0 +1,54 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import 'vs/css!./media/holidays'; +import { Action } from 'vs/base/common/actions'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { $, append, addClass, removeClass } from 'vs/base/browser/dom'; +import { domEvent, stop } from 'vs/base/browser/event'; +import { filterEvent, mapEvent, once, anyEvent } from 'vs/base/common/event'; +import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { KeyCode } from 'vs/base/common/keyCodes'; +import { IDisposable, toDisposable, dispose } from 'vs/base/common/lifecycle'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions'; +import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; + +export class HappyHolidaysAction extends Action { + + static ID = 'happyholidays'; + static LABEL = 'Happy Holidays!'; + + constructor() { + super(HappyHolidaysAction.ID, HappyHolidaysAction.LABEL, '', true); + } + + async run(): TPromise { + const disposables: IDisposable[] = []; + + const shell = document.querySelector('.monaco-shell-content') as HTMLElement; + addClass(shell, 'blur'); + disposables.push(toDisposable(() => removeClass(shell, 'blur'))); + + const el = append(document.body, $('.happy-holidays')); + const text = append(el, $('.happy-holidays-text')); + disposables.push(toDisposable(() => document.body.removeChild(el))); + + text.innerText = `The VS Code team wishes you a great Holiday season!`; + setTimeout(() => addClass(text, 'animate'), 50); + + const onKeyDown = domEvent(document.body, 'keydown', true); + const onClick = domEvent(document.body, 'click', true); + const onInteraction = anyEvent(onKeyDown, onClick); + + const close = () => dispose(disposables); + stop(once(onInteraction))(close, null, disposables); + } +} + +Registry.as(ActionExtensions.WorkbenchActions) + .registerWorkbenchAction(new SyncActionDescriptor(HappyHolidaysAction, HappyHolidaysAction.ID, HappyHolidaysAction.LABEL), 'Show Release Notes'); diff --git a/src/vs/workbench/parts/holidays/electron-browser/media/cap.svg b/src/vs/workbench/parts/holidays/electron-browser/media/cap.svg new file mode 100644 index 00000000000..abeda410242 --- /dev/null +++ b/src/vs/workbench/parts/holidays/electron-browser/media/cap.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + +image/svg+xml + + + + +Openclipart + + + + + + + + + + + diff --git a/src/vs/workbench/parts/holidays/electron-browser/media/holidays.css b/src/vs/workbench/parts/holidays/electron-browser/media/holidays.css new file mode 100644 index 00000000000..2dcbc7f27f6 --- /dev/null +++ b/src/vs/workbench/parts/holidays/electron-browser/media/holidays.css @@ -0,0 +1,55 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +.activitybar .global-activity .actions-container:before { + content: ''; + width: 100%; + height: 30px; + background-image: url(cap.svg); + position: absolute; + background-size: 21px; + background-repeat: no-repeat; + background-position: 16px 7px; +} + +.monaco-shell-content { + transition: 0.6s filter ease-out; +} + +.monaco-shell-content.blur { + filter: blur(5px); +} + +.happy-holidays { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + z-index: 100; +} + +.happy-holidays-text { + text-align: center; + width: 35%; + font-size: 4vw; + font-weight: 200; + opacity: 0; + line-height: 1.4em; + transform: translate(0,-40px); + transition-delay: 0.2s; + transition-duration: 0.8s; + transition-property: transform, opacity; + transition-timing-function: ease-out; +} + +.happy-holidays-text.animate { + transform: translate(0,0); + opacity: 1; +} \ No newline at end of file diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index 9e966fd3c70..cdde66ed258 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -33,6 +33,7 @@ import { IUpdateService, State as UpdateState } from 'vs/platform/update/common/ import * as semver from 'semver'; import { OS, isLinux, isWindows } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { HappyHolidaysAction } from 'vs/workbench/parts/holidays/electron-browser/holidays.contribution'; class ApplyUpdateAction extends Action { constructor( @IUpdateService private updateService: IUpdateService) { @@ -433,7 +434,9 @@ export class UpdateContribution implements IGlobalActivity { new CommandAction(UpdateContribution.selectColorThemeId, nls.localize('selectTheme.label', "Color Theme"), this.commandService), new CommandAction(UpdateContribution.selectIconThemeId, nls.localize('themes.selectIconTheme.label', "File Icon Theme"), this.commandService), new Separator(), - updateAction + updateAction, + new Separator(), + new HappyHolidaysAction() ]; } diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index b624558e852..2b36b505613 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -125,3 +125,5 @@ import 'vs/workbench/parts/themes/test/electron-browser/themes.test.contribution import 'vs/workbench/parts/watermark/electron-browser/watermark'; import 'vs/workbench/parts/welcome/overlay/browser/welcomeOverlay'; + +import 'vs/workbench/parts/holidays/electron-browser/holidays.contribution'; From 9df90b3d7567a7e54aa41b55536269a0c82482fe Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 18 Dec 2017 20:53:32 +0100 Subject: [PATCH 387/615] cleanup --- .../parts/holidays/electron-browser/holidays.contribution.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/holidays/electron-browser/holidays.contribution.ts b/src/vs/workbench/parts/holidays/electron-browser/holidays.contribution.ts index b848055fb83..9eecf745f2d 100644 --- a/src/vs/workbench/parts/holidays/electron-browser/holidays.contribution.ts +++ b/src/vs/workbench/parts/holidays/electron-browser/holidays.contribution.ts @@ -10,9 +10,7 @@ import { Action } from 'vs/base/common/actions'; import { TPromise } from 'vs/base/common/winjs.base'; import { $, append, addClass, removeClass } from 'vs/base/browser/dom'; import { domEvent, stop } from 'vs/base/browser/event'; -import { filterEvent, mapEvent, once, anyEvent } from 'vs/base/common/event'; -import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import { KeyCode } from 'vs/base/common/keyCodes'; +import { once, anyEvent } from 'vs/base/common/event'; import { IDisposable, toDisposable, dispose } from 'vs/base/common/lifecycle'; import { Registry } from 'vs/platform/registry/common/platform'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions'; From 8769dbe3fded56387f4ced80f5e5fea65589f246 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 18 Dec 2017 22:02:43 +0100 Subject: [PATCH 388/615] #40196 Dispose output writers on shutdown --- .../output/electron-browser/outputServices.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index 1fc89cd43ae..2b0a6e65020 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -32,6 +32,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { RotatingLogger } from 'spdlog'; import { toLocalISOString } from 'vs/base/common/date'; +import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; @@ -235,6 +236,7 @@ class AppendableFileOutputChannel extends AbstractOutputChannel implements Outpu this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 30, 5); this.outputWriter.clearFormatters(); + this._register(toDisposable(() => this.outputWriter.drop())); } append(message: string): void { @@ -270,7 +272,7 @@ class AppendableFileOutputChannel extends AbstractOutputChannel implements Outpu } } -export class OutputService implements IOutputService, ITextModelContentProvider { +export class OutputService extends Disposable implements IOutputService, ITextModelContentProvider { public _serviceBrand: any; @@ -289,8 +291,10 @@ export class OutputService implements IOutputService, ITextModelContentProvider @IWorkspaceContextService contextService: IWorkspaceContextService, @ITextModelService textModelResolverService: ITextModelService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IEnvironmentService private environmentService: IEnvironmentService + @IEnvironmentService private environmentService: IEnvironmentService, + @ILifecycleService lifecycleService: ILifecycleService ) { + super(); const channels = this.getChannels(); this.activeChannelId = this.storageService.get(OUTPUT_ACTIVE_CHANNEL_KEY, StorageScope.WORKSPACE, channels && channels.length > 0 ? channels[0].id : null); @@ -302,6 +306,8 @@ export class OutputService implements IOutputService, ITextModelContentProvider this.onDidPanelOpen(this.panelService.getActivePanel()); panelService.onDidPanelOpen(this.onDidPanelOpen, this); panelService.onDidPanelClose(this.onDidPanelClose, this); + + lifecycleService.onShutdown(() => this.dispose()); } provideTextContent(resource: URI): TPromise { @@ -409,4 +415,9 @@ export class OutputService implements IOutputService, ITextModelContentProvider const label = channelData ? channelData.label : channelId; return this.instantiationService.createInstance(ResourceEditorInput, nls.localize('output', "{0} - Output", label), nls.localize('channel', "Output channel for '{0}'", label), resource); } + + dispose(): void { + this.channels.forEach(channel => channel.dispose()); + super.dispose(); + } } \ No newline at end of file From f4612f4d819647225bae39fb5468e1f4c1be24d6 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 18 Dec 2017 22:08:26 +0100 Subject: [PATCH 389/615] #40196 Do not drop logger on shutdown as it blocking reload --- src/vs/workbench/parts/output/electron-browser/outputServices.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index 2b0a6e65020..67d26f2cb41 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -236,7 +236,6 @@ class AppendableFileOutputChannel extends AbstractOutputChannel implements Outpu this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 30, 5); this.outputWriter.clearFormatters(); - this._register(toDisposable(() => this.outputWriter.drop())); } append(message: string): void { From a648cf120559b6dceda9be6016b52933826cc806 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 18 Dec 2017 22:15:37 +0100 Subject: [PATCH 390/615] #40196 Do not dispose writers as they block reload --- .../parts/output/electron-browser/outputServices.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index 67d26f2cb41..a1b80c275b5 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -32,7 +32,6 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { RotatingLogger } from 'spdlog'; import { toLocalISOString } from 'vs/base/common/date'; -import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; @@ -290,8 +289,7 @@ export class OutputService extends Disposable implements IOutputService, ITextMo @IWorkspaceContextService contextService: IWorkspaceContextService, @ITextModelService textModelResolverService: ITextModelService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IEnvironmentService private environmentService: IEnvironmentService, - @ILifecycleService lifecycleService: ILifecycleService + @IEnvironmentService private environmentService: IEnvironmentService ) { super(); const channels = this.getChannels(); @@ -305,8 +303,6 @@ export class OutputService extends Disposable implements IOutputService, ITextMo this.onDidPanelOpen(this.panelService.getActivePanel()); panelService.onDidPanelOpen(this.onDidPanelOpen, this); panelService.onDidPanelClose(this.onDidPanelClose, this); - - lifecycleService.onShutdown(() => this.dispose()); } provideTextContent(resource: URI): TPromise { @@ -414,9 +410,4 @@ export class OutputService extends Disposable implements IOutputService, ITextMo const label = channelData ? channelData.label : channelId; return this.instantiationService.createInstance(ResourceEditorInput, nls.localize('output', "{0} - Output", label), nls.localize('channel', "Output channel for '{0}'", label), resource); } - - dispose(): void { - this.channels.forEach(channel => channel.dispose()); - super.dispose(); - } } \ No newline at end of file From 3fb069771ace6edb978459720b56b3e196179140 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 18 Dec 2017 11:10:06 -0800 Subject: [PATCH 391/615] Remove empty jsdoc --- src/vs/editor/contrib/suggest/suggest.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/vs/editor/contrib/suggest/suggest.ts b/src/vs/editor/contrib/suggest/suggest.ts index 8723f674e84..042c3762292 100644 --- a/src/vs/editor/contrib/suggest/suggest.ts +++ b/src/vs/editor/contrib/suggest/suggest.ts @@ -233,11 +233,6 @@ let _provider = new class implements ISuggestSupport { SuggestRegistry.register('*', _provider); -/** - * - * @param editor - * @param suggestions - */ export function showSimpleSuggestions(editor: ICodeEditor, suggestions: ISuggestion[]) { setTimeout(() => { _suggestions = suggestions; From dcaee0a107a0701d1ef896429d4037df3c56a5bc Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 18 Dec 2017 13:35:07 -0800 Subject: [PATCH 392/615] De-prioritze auto-imports Fixes #40311 --- .../src/features/completionItemProvider.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index 7e6f22e9d39..775fcb40518 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -34,9 +34,17 @@ class MyCompletionItem extends CompletionItem { super(entry.name); this.source = entry.source; - // Make sure isRecommended property always comes first - // https://github.com/Microsoft/vscode/issues/40325 - this.sortText = entry.isRecommended ? '\0' : entry.sortText; + if (entry.isRecommended) { + // Make sure isRecommended property always comes first + // https://github.com/Microsoft/vscode/issues/40325 + this.sortText = '\0' + entry.sortText; + } else if (entry.source) { + // De-prioritze auto-imports + // https://github.com/Microsoft/vscode/issues/40311 + this.sortText = '\uffff' + entry.sortText; + } else { + this.sortText = entry.sortText; + } this.kind = MyCompletionItem.convertKind(entry.kind); this.position = position; From 878e73c2513c8f6132fb5101b5ddbdc1266b96df Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Dec 2017 00:55:05 +0300 Subject: [PATCH 393/615] Add theme-specific color customizations. Fix #36860 --- .../themes/electron-browser/colorThemeData.ts | 37 ++++++++-- .../electron-browser/workbenchThemeService.ts | 71 +++++++++++++------ 2 files changed, 81 insertions(+), 27 deletions(-) diff --git a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts index d0bcb83b6c9..37e0498d121 100644 --- a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts +++ b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts @@ -80,10 +80,11 @@ export class ColorThemeData implements IColorTheme { public setCustomColors(colors: IColorCustomizations) { this.customColorMap = {}; - for (let id in colors) { - let colorVal = colors[id]; - if (typeof colorVal === 'string') { - this.customColorMap[id] = Color.fromHex(colorVal); + this.overwriteCustomColors(colors); + if (`[${this.settingsId}]` in colors) { + const themeSpecificColors = (colors[`[${this.settingsId}]`] || {}) as IColorCustomizations; + if (types.isObject(themeSpecificColors)) { + this.overwriteCustomColors(themeSpecificColors); } } if (this.themeTokenColors && this.themeTokenColors.length) { @@ -91,7 +92,33 @@ export class ColorThemeData implements IColorTheme { } } + private overwriteCustomColors(colors: IColorCustomizations) { + for (let id in colors) { + let colorVal = colors[id]; + if (typeof colorVal === 'string') { + this.customColorMap[id] = Color.fromHex(colorVal); + } + } + } + public setCustomTokenColors(customTokenColors: ITokenColorCustomizations) { + this.customTokenColors = []; + let customTokenColorsWithoutThemeSpecific: ITokenColorCustomizations = {}; + for (let key in customTokenColors) { + if (key[0] !== '[') { + customTokenColorsWithoutThemeSpecific[key] = customTokenColors[key]; + } + } + this.addCustomTokenColors(customTokenColorsWithoutThemeSpecific); + if (`[${this.settingsId}]` in customTokenColors) { + const themeSpecificTokenColors: ITokenColorCustomizations = customTokenColors[`[${this.settingsId}]`]; + if (types.isObject(themeSpecificTokenColors)) { + this.addCustomTokenColors(themeSpecificTokenColors); + } + } + } + + private addCustomTokenColors(customTokenColors: ITokenColorCustomizations) { let generalRules: ITokenColorizationRule[] = []; Object.keys(tokenGroupToScopesMap).forEach(key => { @@ -112,7 +139,7 @@ export class ColorThemeData implements IColorTheme { // Put the general customizations such as comments, strings, etc. first so that // they can be overridden by specific customizations like "string.interpolated" - this.customTokenColors = generalRules.concat(textMateRules); + this.customTokenColors = this.customTokenColors.concat(generalRules, textMateRules); } public ensureLoaded(themeService: WorkbenchThemeService): TPromise { diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index 9fec1318117..16f4b2397ea 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -64,7 +64,7 @@ function validateThemeId(theme: string): string { } export interface IColorCustomizations { - [colorId: string]: string; + [colorIdOrThemeSettingsId: string]: string | IColorCustomizations; } export class WorkbenchThemeService implements IWorkbenchThemeService { @@ -151,9 +151,34 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { // update settings schema setting this.colorThemeStore.onDidChange(themes => { - colorThemeSettingSchema.enum = themes.map(t => t.settingsId); - colorThemeSettingSchema.enumDescriptions = themes.map(t => themeData.description || ''); + const colorThemeSettingSchemaEnum = []; + const colorThemeSettingSchemaEnumDescriptions = []; + const themeSpecificEditorColorProperties = {}; + const themeSpecificWorkbenchColorProperties = {}; + const copyColorCustomizationsSchema = JSON.parse(JSON.stringify(colorCustomizationsSchema)); + const copyColorConfigurationProperties = JSON.parse(JSON.stringify(customEditorColorSetting)); + + themes.forEach(t => { + colorThemeSettingSchemaEnum.push(t.settingsId); + colorThemeSettingSchemaEnumDescriptions.push(themeData.description || ''); + const themeId = `[${t.settingsId}]`; + themeSpecificWorkbenchColorProperties[themeId] = copyColorCustomizationsSchema; + themeSpecificEditorColorProperties[themeId] = copyColorConfigurationProperties; + }); + + colorThemeSettingSchema.enum = colorThemeSettingSchemaEnum; + colorThemeSettingSchema.enumDescriptions = colorThemeSettingSchemaEnumDescriptions; + themeSettingsConfiguration.properties[CUSTOM_WORKBENCH_COLORS_SETTING].properties = { + ...colorThemeSchema.colorsSchema.properties, + ...themeSpecificWorkbenchColorProperties + }; + customEditorColorConfiguration.properties[CUSTOM_EDITOR_COLORS_SETTING].properties = { + ...customEditorColorConfigurationProperties, + ...themeSpecificEditorColorProperties + }; + configurationRegistry.notifyConfigurationSchemaUpdated(themeSettingsConfiguration); + configurationRegistry.notifyConfigurationSchemaUpdated(customEditorColorConfiguration); }); this.iconThemeStore.onDidChange(themes => { iconThemeSettingSchema.enum = [null, ...themes.map(t => t.settingsId)]; @@ -483,7 +508,7 @@ const iconThemeSettingSchema: IConfigurationPropertySchema = { errorMessage: nls.localize('iconThemeError', "File icon theme is unknown or not installed.") }; const colorCustomizationsSchema: IConfigurationPropertySchema = { - type: ['object'], + type: 'object', description: nls.localize('workbenchColors', "Overrides colors from the currently selected color theme."), properties: colorThemeSchema.colorsSchema.properties, additionalProperties: false, @@ -523,27 +548,29 @@ function tokenGroupSettings(description: string) { }; } -configurationRegistry.registerConfiguration({ +const customEditorColorConfigurationProperties = { + comments: tokenGroupSettings(nls.localize('editorColors.comments', "Sets the colors and styles for comments")), + strings: tokenGroupSettings(nls.localize('editorColors.strings', "Sets the colors and styles for strings literals.")), + keywords: tokenGroupSettings(nls.localize('editorColors.keywords', "Sets the colors and styles for keywords.")), + numbers: tokenGroupSettings(nls.localize('editorColors.numbers', "Sets the colors and styles for number literals.")), + types: tokenGroupSettings(nls.localize('editorColors.types', "Sets the colors and styles for type declarations and references.")), + functions: tokenGroupSettings(nls.localize('editorColors.functions', "Sets the colors and styles for functions declarations and references.")), + variables: tokenGroupSettings(nls.localize('editorColors.variables', "Sets the colors and styles for variables declarations and references.")), + [CUSTOM_EDITOR_SCOPE_COLORS_SETTING]: colorThemeSchema.tokenColorsSchema(nls.localize('editorColors.textMateRules', 'Sets colors and styles using textmate theming rules (advanced).')) +}; +const customEditorColorSetting = { + description: nls.localize('editorColors', "Overrides editor colors and font style from the currently selected color theme."), + default: {}, + additionalProperties: false, + properties: customEditorColorConfigurationProperties +}; +const customEditorColorConfiguration: IConfigurationNode = { id: 'editor', order: 7.2, type: 'object', properties: { - [CUSTOM_EDITOR_COLORS_SETTING]: { - description: nls.localize('editorColors', "Overrides editor colors and font style from the currently selected color theme."), - type: 'object', - default: {}, - additionalProperties: false, - properties: { - comments: tokenGroupSettings(nls.localize('editorColors.comments', "Sets the colors and styles for comments")), - strings: tokenGroupSettings(nls.localize('editorColors.strings', "Sets the colors and styles for strings literals.")), - keywords: tokenGroupSettings(nls.localize('editorColors.keywords', "Sets the colors and styles for keywords.")), - numbers: tokenGroupSettings(nls.localize('editorColors.numbers', "Sets the colors and styles for number literals.")), - types: tokenGroupSettings(nls.localize('editorColors.types', "Sets the colors and styles for type declarations and references.")), - functions: tokenGroupSettings(nls.localize('editorColors.functions', "Sets the colors and styles for functions declarations and references.")), - variables: tokenGroupSettings(nls.localize('editorColors.variables', "Sets the colors and styles for variables declarations and references.")), - [CUSTOM_EDITOR_SCOPE_COLORS_SETTING]: colorThemeSchema.tokenColorsSchema(nls.localize('editorColors.textMateRules', 'Sets colors and styles using textmate theming rules (advanced).')) - } - } + [CUSTOM_EDITOR_COLORS_SETTING]: customEditorColorSetting } -}); +}; +configurationRegistry.registerConfiguration(customEditorColorConfiguration); From 4d982e0caf8d4f9ab7da0f5f5f797b90ce62ec52 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Dec 2017 01:18:30 +0300 Subject: [PATCH 394/615] Remove redundant property lookup --- .../services/themes/electron-browser/workbenchThemeService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index 16f4b2397ea..d350082dcc2 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -168,11 +168,11 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { colorThemeSettingSchema.enum = colorThemeSettingSchemaEnum; colorThemeSettingSchema.enumDescriptions = colorThemeSettingSchemaEnumDescriptions; - themeSettingsConfiguration.properties[CUSTOM_WORKBENCH_COLORS_SETTING].properties = { + colorCustomizationsSchema.properties = { ...colorThemeSchema.colorsSchema.properties, ...themeSpecificWorkbenchColorProperties }; - customEditorColorConfiguration.properties[CUSTOM_EDITOR_COLORS_SETTING].properties = { + customEditorColorSetting.properties = { ...customEditorColorConfigurationProperties, ...themeSpecificEditorColorProperties }; From 55382a106fef626835318f353108b0d5bb6d97d0 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 18 Dec 2017 14:25:39 -0800 Subject: [PATCH 395/615] Cache code-line elements for md scroll-sync Fixes #19092 --- extensions/markdown/media/main.js | 74 ++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 26 deletions(-) diff --git a/extensions/markdown/media/main.js b/extensions/markdown/media/main.js index 6ae787c8c23..c390b8d9a27 100644 --- a/extensions/markdown/media/main.js +++ b/extensions/markdown/media/main.js @@ -29,6 +29,10 @@ }; } + /** + * @param {string} command + * @param {any[]} args + */ function postMessage(command, args) { window.parent.postMessage({ command: 'did-click-link', @@ -36,24 +40,47 @@ }, 'file://'); } + /** + * @typedef {{ element: Element, line: number }} CodeLineElement + */ + + /** + * @return {CodeLineElement[]} + */ + const getCodeLineElements = (() => { + /** @type {CodeLineElement[]} */ + let elements; + return () => { + if (!elements) { + elements = Array.prototype.map.call( + document.getElementsByClassName('code-line'), + element => { + const line = +element.getAttribute('data-line'); + return { element, line } + }) + .filter(x => !isNaN(x.line)); + } + return elements; + }; + })() + /** * Find the html elements that map to a specific target line in the editor. * * If an exact match, returns a single element. If the line is between elements, * returns the element prior to and the element after the given line. + * + * @param {number} targetLine + * + * @returns {{ previous: CodeLineElement, next?: CodeLineElement }} */ function getElementsForSourceLine(targetLine) { - const lines = document.getElementsByClassName('code-line'); - let previous = lines[0] && +lines[0].getAttribute('data-line') ? { line: +lines[0].getAttribute('data-line'), element: lines[0] } : null; - for (const element of lines) { - const lineNumber = +element.getAttribute('data-line'); - if (isNaN(lineNumber)) { - continue; - } - const entry = { line: lineNumber, element: element }; - if (lineNumber === targetLine) { + const lines = getCodeLineElements(); + let previous = lines[0] || null; + for (const entry of lines) { + if (entry.line === targetLine) { return { previous: entry, next: null }; - } else if (lineNumber > targetLine) { + } else if (entry.line > targetLine) { return { previous, next: entry }; } previous = entry; @@ -64,15 +91,10 @@ /** * Find the html elements that are at a specific pixel offset on the page. * - * @returns {{ previous: { element: any, line: number }, next?: { element: any, line: number } }} + * @returns {{ previous: CodeLineElement, next?: CodeLineElement }} */ function getLineElementsAtPageOffset(offset) { - const allLines = document.getElementsByClassName('code-line'); - /** @type {Element[]} */ - const lines = Array.prototype.filter.call(allLines, element => { - const line = +element.getAttribute('data-line'); - return !isNaN(line) - }); + const lines = getCodeLineElements() const position = offset - window.scrollY; @@ -80,7 +102,7 @@ let hi = lines.length - 1; while (lo + 1 < hi) { const mid = Math.floor((lo + hi) / 2); - const bounds = lines[mid].getBoundingClientRect(); + const bounds = lines[mid].element.getBoundingClientRect(); if (bounds.top + bounds.height >= position) { hi = mid; } else { @@ -89,18 +111,16 @@ } const hiElement = lines[hi]; - const hiLine = +hiElement.getAttribute('data-line'); - if (hi >= 1 && hiElement.getBoundingClientRect().top > position) { + if (hi >= 1 && hiElement.element.getBoundingClientRect().top > position) { const loElement = lines[lo]; - const loLine = +loElement.getAttribute('data-line'); - const bounds = loElement.getBoundingClientRect(); - const previous = { element: loElement, line: loLine + (position - bounds.top) / (bounds.height) }; - const next = { element: hiElement, line: hiLine, fractional: 0 }; + const bounds = loElement.element.getBoundingClientRect(); + const previous = { element: loElement.element, line: loElement.line + (position - bounds.top) / (bounds.height) }; + const next = { element: hiElement.element, line: hiElement.line, fractional: 0 }; return { previous, next }; } - const bounds = hiElement.getBoundingClientRect(); - const previous = { element: hiElement, line: hiLine + (position - bounds.top) / (bounds.height) }; + const bounds = hiElement.element.getBoundingClientRect(); + const previous = { element: hiElement.element, line: hiElement.line + (position - bounds.top) / (bounds.height) }; return { previous }; } @@ -110,6 +130,8 @@ /** * Attempt to reveal the element for a source line in the editor. + * + * @param {number} line */ function scrollToRevealSourceLine(line) { const { previous, next } = getElementsForSourceLine(line); From 783a0aafad23df61978dbb6d2f9f0ec8cc0b5f86 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Mon, 18 Dec 2017 20:21:50 +0100 Subject: [PATCH 396/615] Update the PHP grammar Now it breaks out the html grammar into its own file --- build/npm/update-grammar.js | 4 +- extensions/php/build/update-grammar.js | 3 +- extensions/php/package.json | 7 +- extensions/php/syntaxes/html.tmLanguage.json | 106 ++ extensions/php/syntaxes/php.tmLanguage.json | 1786 +++++++++--------- 5 files changed, 979 insertions(+), 927 deletions(-) create mode 100644 extensions/php/syntaxes/html.tmLanguage.json diff --git a/build/npm/update-grammar.js b/build/npm/update-grammar.js index 9d0cad11dc7..acdeb659bc5 100644 --- a/build/npm/update-grammar.js +++ b/build/npm/update-grammar.js @@ -68,8 +68,8 @@ function getCommitSha(repoId, repoPath) { }); } -exports.update = function (repoId, repoPath, dest, modifyGrammar) { - var contentPath = 'https://raw.githubusercontent.com/' + repoId + '/master/' + repoPath; +exports.update = function (repoId, repoPath, dest, modifyGrammar, version = 'master') { + var contentPath = 'https://raw.githubusercontent.com/' + repoId + `/${version}/` + repoPath; console.log('Reading from ' + contentPath); return download(contentPath).then(function (content) { var ext = path.extname(repoPath); diff --git a/extensions/php/build/update-grammar.js b/extensions/php/build/update-grammar.js index ac1f9887b28..55cd1ae9c41 100644 --- a/extensions/php/build/update-grammar.js +++ b/extensions/php/build/update-grammar.js @@ -20,5 +20,6 @@ function adaptInjectionScope(grammar) { injections[newInjectionKey] = injection; } -updateGrammar.update('atom/language-php', 'grammars/php.cson', './syntaxes/php.tmLanguage.json', adaptInjectionScope); +updateGrammar.update('atom/language-php', 'grammars/php.cson', './syntaxes/php.tmLanguage.json', undefined); +updateGrammar.update('atom/language-php', 'grammars/html.cson', './syntaxes/html.tmLanguage.json', adaptInjectionScope); diff --git a/extensions/php/package.json b/extensions/php/package.json index 6954ae5c661..fb5758ff8bf 100644 --- a/extensions/php/package.json +++ b/extensions/php/package.json @@ -35,10 +35,15 @@ } ], "grammars": [ + { + "language": "php", + "scopeName": "source.php", + "path": "./syntaxes/php.tmLanguage.json" + }, { "language": "php", "scopeName": "text.html.php", - "path": "./syntaxes/php.tmLanguage.json", + "path": "./syntaxes/html.tmLanguage.json", "embeddedLanguages": { "text.html": "html", "source.php": "php", diff --git a/extensions/php/syntaxes/html.tmLanguage.json b/extensions/php/syntaxes/html.tmLanguage.json new file mode 100644 index 00000000000..747d39b1d0d --- /dev/null +++ b/extensions/php/syntaxes/html.tmLanguage.json @@ -0,0 +1,106 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-php/blob/master/grammars/html.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/atom/language-php/commit/29c140e1531e0b5e842e5bfd4377f879d8b79cd4", + "scopeName": "text.html.php", + "name": "PHP", + "fileTypes": [ + "aw", + "ctp", + "inc", + "install", + "module", + "php", + "php_cs", + "php3", + "php4", + "php5", + "phpt", + "phtml", + "profile" + ], + "firstLineMatch": "(?x)\n# Hashbang\n^\\#!.*(?:\\s|\\/)\n php\\d?\n(?:$|\\s)\n|\n# Modeline\n(?i:\n # Emacs\n -\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n php\n (?=[\\s;]|(?]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n (?:php|phtml)\n (?=\\s|:|$)\n)\n|\n# Regular opening PHP tags\n^\\s*<\\?(?i:php|=|\\s|$)", + "foldingStartMarker": "(/\\*|\\{\\s*$|<<)", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + } + }, + "end": "(\\?)>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "source.php" + } + }, + "name": "meta.embedded.block.php", + "contentName": "source.php", + "patterns": [ + { + "include": "source.php" + } + ] + }, + { + "begin": "<\\?(?i:php|=)?", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + } + }, + "end": "(\\?)>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "source.php" + } + }, + "name": "meta.embedded.line.php", + "contentName": "source.php", + "patterns": [ + { + "include": "source.php" + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/extensions/php/syntaxes/php.tmLanguage.json b/extensions/php/syntaxes/php.tmLanguage.json index aa0446b8af1..9cacdd3c23c 100644 --- a/extensions/php/syntaxes/php.tmLanguage.json +++ b/extensions/php/syntaxes/php.tmLanguage.json @@ -4,111 +4,806 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/atom/language-php/commit/71231bfb975ac56d9c13c5b4cda21c081ebbc6ee", - "scopeName": "text.html.php", - "name": "PHP", - "fileTypes": [ - "aw", - "ctp", - "inc", - "install", - "module", - "php", - "php_cs", - "php3", - "php4", - "php5", - "phpt", - "phtml", - "profile", - "theme" - ], - "firstLineMatch": "(?x)\n# Hashbang\n^\\#!.*(?:\\s|\\/)\n php\\d?\n(?:$|\\s)\n|\n# Modeline\n(?i:\n # Emacs\n -\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n php\n (?=[\\s;]|(?]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n (?:php|phtml)\n (?=\\s|:|$)\n)", - "foldingStartMarker": "(/\\*|\\{\\s*$|<<)", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - } - }, - "contentName": "source.php", - "end": "(\\?)>", - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "source.php" - } - }, - "name": "meta.embedded.block.php", + "version": "https://github.com/atom/language-php/commit/11b2057dbf32355019621ee3769f5c8ef577f524", + "scopeName": "source.php", + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(?i)^\\s*(interface)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\\s*(extends)?\\s*", + "beginCaptures": { + "1": { + "name": "storage.type.interface.php" + }, + "2": { + "name": "entity.name.type.interface.php" + }, + "3": { + "name": "storage.modifier.extends.php" + } + }, + "end": "(?i)((?:[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\s*,\\s*)*)([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)?\\s*(?:(?={)|$)", + "endCaptures": { + "1": { "patterns": [ { - "include": "#language" + "match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*", + "name": "entity.other.inherited-class.php" + }, + { + "match": ",", + "name": "punctuation.separator.classes.php" + } + ] + }, + "2": { + "name": "entity.other.inherited-class.php" + } + }, + "name": "meta.interface.php", + "patterns": [ + { + "include": "#namespace" + } + ] + }, + { + "begin": "(?i)^\\s*(trait)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)", + "beginCaptures": { + "1": { + "name": "storage.type.trait.php" + }, + "2": { + "name": "entity.name.type.trait.php" + } + }, + "end": "(?={)", + "name": "meta.trait.php", + "patterns": [ + { + "include": "#comments" + } + ] + }, + { + "match": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+([a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)(?=\\s*;)", + "name": "meta.namespace.php", + "captures": { + "1": { + "name": "keyword.other.namespace.php" + }, + "2": { + "name": "entity.name.type.namespace.php", + "patterns": [ + { + "match": "\\\\", + "name": "punctuation.separator.inheritance.php" + } + ] + } + } + }, + { + "begin": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.namespace.php" + } + }, + "end": "(?<=})|(?=\\?>)", + "name": "meta.namespace.php", + "patterns": [ + { + "include": "#comments" + }, + { + "match": "(?i)[a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+", + "name": "entity.name.type.namespace.php", + "captures": { + "0": { + "patterns": [ + { + "match": "\\\\", + "name": "punctuation.separator.inheritance.php" + } + ] + } + } + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.namespace.begin.bracket.curly.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.namespace.end.bracket.curly.php" + } + }, + "patterns": [ + { + "include": "$self" } ] }, { - "begin": "<\\?(?i:php|=)?", + "match": "[^\\s]+", + "name": "invalid.illegal.identifier.php" + } + ] + }, + { + "match": "\\s+(?=use\\b)" + }, + { + "begin": "(?i)\\buse\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.use.php" + } + }, + "end": "(?<=})|(?=;)", + "name": "meta.use.php", + "patterns": [ + { + "match": "\\b(const|function)\\b", + "name": "storage.type.${1:/downcase}.php" + }, + { + "begin": "{", "beginCaptures": { "0": { - "name": "punctuation.section.embedded.begin.php" + "name": "punctuation.definition.use.begin.bracket.curly.php" } }, - "end": ">", + "end": "}", "endCaptures": { "0": { - "name": "punctuation.section.embedded.end.php" + "name": "punctuation.definition.use.end.bracket.curly.php" } }, - "name": "meta.embedded.line.php", "patterns": [ { - "captures": { - "1": { - "name": "source.php" - }, - "2": { - "name": "punctuation.section.embedded.end.php" - }, - "3": { - "name": "source.php" - } - }, - "match": "\\G(\\s*)((\\?))(?=>)", - "name": "meta.special.empty-tag.php" + "include": "#scope-resolution" }, { - "begin": "\\G", - "contentName": "source.php", - "end": "(\\?)(?=>)", - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.php" - }, + "match": "(?xi)\n\\b(as)\n\\s+(final|abstract|public|private|protected|static)\n\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)", + "captures": { "1": { - "name": "source.php" + "name": "keyword.other.use-as.php" + }, + "2": { + "name": "storage.modifier.php" + }, + "3": { + "name": "entity.other.alias.php" + } + } + }, + { + "match": "(?xi)\n\\b(as)\n\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)", + "captures": { + "1": { + "name": "keyword.other.use-as.php" + }, + "2": { + "patterns": [ + { + "match": "^(?:final|abstract|public|private|protected|static)$", + "name": "storage.modifier.php" + }, + { + "match": ".+", + "name": "entity.other.alias.php" + } + ] + } + } + }, + { + "match": "(?i)\\b(insteadof)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)", + "captures": { + "1": { + "name": "keyword.other.use-insteadof.php" + }, + "2": { + "name": "support.class.php" + } + } + }, + { + "match": ";", + "name": "punctuation.terminator.expression.php" + }, + { + "include": "#use-inner" + } + ] + }, + { + "include": "#use-inner" + } + ] + }, + { + "begin": "(?i)^\\s*(?:(abstract|final)\\s+)?(class)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)", + "beginCaptures": { + "1": { + "name": "storage.modifier.${1:/downcase}.php" + }, + "2": { + "name": "storage.type.class.php" + }, + "3": { + "name": "entity.name.type.class.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.class.end.bracket.curly.php" + } + }, + "name": "meta.class.php", + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(?i)(extends)\\s+", + "beginCaptures": { + "1": { + "name": "storage.modifier.extends.php" + } + }, + "contentName": "meta.other.inherited-class.php", + "end": "(?i)(?=[^a-z0-9_\\x{7f}-\\x{7fffffff}\\\\])", + "patterns": [ + { + "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\\\)", + "end": "(?i)([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{7fffffff}\\\\])", + "endCaptures": { + "1": { + "name": "entity.other.inherited-class.php" } }, "patterns": [ { - "include": "#language" + "include": "#namespace" + } + ] + }, + { + "include": "#class-builtin" + }, + { + "include": "#namespace" + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*", + "name": "entity.other.inherited-class.php" + } + ] + }, + { + "begin": "(?i)(implements)\\s+", + "beginCaptures": { + "1": { + "name": "storage.modifier.implements.php" + } + }, + "end": "(?i)(?=[;{])", + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(?i)(?=[a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)", + "contentName": "meta.other.inherited-class.php", + "end": "(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\x{7f}-\\x{7fffffff}\\\\\\s]))\\s*)", + "patterns": [ + { + "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\\\)", + "end": "(?i)([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{7fffffff}\\\\])", + "endCaptures": { + "1": { + "name": "entity.other.inherited-class.php" + } + }, + "patterns": [ + { + "include": "#namespace" + } + ] + }, + { + "include": "#class-builtin" + }, + { + "include": "#namespace" + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*", + "name": "entity.other.inherited-class.php" } ] } ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.class.begin.bracket.curly.php" + } + }, + "end": "(?=}|\\?>)", + "contentName": "meta.class.body.php", + "patterns": [ + { + "include": "$self" + } + ] } ] - } - }, - "patterns": [ + }, { - "include": "text.html.basic" + "include": "#switch_statement" + }, + { + "match": "(?x)\n\\s*\n\\b(\n break|case|continue|declare|default|die|do|\n else(if)?|end(declare|for(each)?|if|switch|while)|exit|\n for(each)?|if|return|switch|use|while|yield\n)\\b", + "captures": { + "1": { + "name": "keyword.control.${1:/downcase}.php" + } + } + }, + { + "begin": "(?i)\\b((?:require|include)(?:_once)?)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.control.import.include.php" + } + }, + "end": "(?=\\s|;|$|\\?>)", + "name": "meta.include.php", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\b(catch)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.exception.catch.php" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + } + }, + "name": "meta.catch.php", + "patterns": [ + { + "include": "#namespace" + }, + { + "match": "(?xi)\n([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Exception class\n((?:\\s*\\|\\s*[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)*) # Optional additional exception classes\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable", + "captures": { + "1": { + "name": "support.class.exception.php" + }, + "2": { + "patterns": [ + { + "match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*", + "name": "support.class.exception.php" + }, + { + "match": "\\|", + "name": "punctuation.separator.delimiter.php" + } + ] + }, + "3": { + "name": "variable.other.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + } + } + } + ] + }, + { + "match": "\\b(catch|try|throw|exception|finally)\\b", + "name": "keyword.control.exception.php" + }, + { + "begin": "(?i)\\b(function)\\s*(?=\\()", + "beginCaptures": { + "1": { + "name": "storage.type.function.php" + } + }, + "end": "(?={)", + "name": "meta.function.closure.php", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "contentName": "meta.function.parameters.php", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + } + }, + "patterns": [ + { + "include": "#function-parameters" + } + ] + }, + { + "begin": "(?i)(use)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.function.use.php" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + } + }, + "patterns": [ + { + "captures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "storage.modifier.reference.php" + }, + "3": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?i)((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\\s*(?=,|\\))", + "name": "meta.function.closure.use.php" + } + ] + } + ] + }, + { + "begin": "(?x)\n((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n(function)\\s+\n(?i:\n (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|toString|\n clone|set_state|sleep|wakeup|autoload|invoke|callStatic))\n |([a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*)\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "final|abstract|public|private|protected|static", + "name": "storage.modifier.php" + } + ] + }, + "2": { + "name": "storage.type.function.php" + }, + "3": { + "name": "support.function.magic.php" + }, + "4": { + "name": "entity.name.function.php" + }, + "5": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "contentName": "meta.function.parameters.php", + "end": "(\\))(?:\\s*(:)\\s*([a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*))?", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + }, + "2": { + "name": "keyword.operator.return-value.php" + }, + "3": { + "name": "storage.type.php" + } + }, + "name": "meta.function.php", + "patterns": [ + { + "include": "#function-parameters" + } + ] + }, + { + "include": "#invoke-call" + }, + { + "include": "#scope-resolution" + }, + { + "include": "#variables" + }, + { + "include": "#strings" + }, + { + "captures": { + "1": { + "name": "support.function.construct.php" + }, + "2": { + "name": "punctuation.definition.array.begin.bracket.round.php" + }, + "3": { + "name": "punctuation.definition.array.end.bracket.round.php" + } + }, + "match": "(array)(\\()(\\))", + "name": "meta.array.empty.php" + }, + { + "begin": "(array)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "support.function.construct.php" + }, + "2": { + "name": "punctuation.definition.array.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.bracket.round.php" + } + }, + "name": "meta.array.php", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "match": "(?i)(\\()\\s*(array|real|double|float|int(?:eger)?|bool(?:ean)?|string|object|binary|unset)\\s*(\\))", + "captures": { + "1": { + "name": "punctuation.definition.storage-type.begin.bracket.round.php" + }, + "2": { + "name": "storage.type.php" + }, + "3": { + "name": "punctuation.definition.storage-type.end.bracket.round.php" + } + } + }, + { + "match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|var|function|interface|trait|parent|self|object)\\b", + "name": "storage.type.php" + }, + { + "match": "(?i)\\b(global|abstract|const|extends|implements|final|private|protected|public|static)\\b", + "name": "storage.modifier.php" + }, + { + "include": "#object" + }, + { + "match": ";", + "name": "punctuation.terminator.expression.php" + }, + { + "match": ":", + "name": "punctuation.terminator.statement.php" + }, + { + "include": "#heredoc" + }, + { + "include": "#numbers" + }, + { + "match": "(?i)\\bclone\\b", + "name": "keyword.other.clone.php" + }, + { + "match": "\\.=?", + "name": "keyword.operator.string.php" + }, + { + "match": "=>", + "name": "keyword.operator.key.php" + }, + { + "captures": { + "1": { + "name": "keyword.operator.assignment.php" + }, + "2": { + "name": "storage.modifier.reference.php" + }, + "3": { + "name": "storage.modifier.reference.php" + } + }, + "match": "(?i)(\\=)(&)|(&)(?=[$a-z_])" + }, + { + "match": "@", + "name": "keyword.operator.error-control.php" + }, + { + "match": "===|==|!==|!=|<>", + "name": "keyword.operator.comparison.php" + }, + { + "match": "=|\\+=|\\-=|\\*=|/=|%=|&=|\\|=|\\^=|<<=|>>=", + "name": "keyword.operator.assignment.php" + }, + { + "match": "<=>|<=|>=|<|>", + "name": "keyword.operator.comparison.php" + }, + { + "match": "\\-\\-|\\+\\+", + "name": "keyword.operator.increment-decrement.php" + }, + { + "match": "\\-|\\+|\\*|/|%", + "name": "keyword.operator.arithmetic.php" + }, + { + "match": "(?i)(!|&&|\\|\\|)|\\b(and|or|xor|as)\\b", + "name": "keyword.operator.logical.php" + }, + { + "include": "#function-call" + }, + { + "match": "<<|>>|~|\\^|&|\\|", + "name": "keyword.operator.bitwise.php" + }, + { + "begin": "(?i)\\b(instanceof)\\s+(?=[\\\\$a-z_])", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.php" + } + }, + "end": "(?=[^\\\\$a-z0-9_\\x{7f}-\\x{7fffffff}])", + "patterns": [ + { + "include": "#class-name" + }, + { + "include": "#variable-name" + } + ] + }, + { + "include": "#instantiation" + }, + { + "captures": { + "1": { + "name": "keyword.control.goto.php" + }, + "2": { + "name": "support.other.php" + } + }, + "match": "(?i)(goto)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)" + }, + { + "captures": { + "1": { + "name": "entity.name.goto-label.php" + } + }, + "match": "(?i)^\\s*([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\\s*:(?!:)" + }, + { + "include": "#string-backtick" + }, + { + "include": "#ternary_shorthand" + }, + { + "include": "#null_coalescing" + }, + { + "include": "#ternary_expression" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.begin.bracket.curly.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.curly.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.php" + } + }, + "end": "\\]|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.round.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "#constants" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.php" } ], "repository": { @@ -279,7 +974,7 @@ } }, { - "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*", "name": "constant.other.php" } ] @@ -294,7 +989,7 @@ "name": "punctuation.separator.delimiter.php" }, { - "begin": "(?xi)\n(array) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n\\s*(=)\\s*(array)\\s*(\\() # Default value", + "begin": "(?xi)\n(array) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n\\s*(=)\\s*(array)\\s*(\\() # Default value", "beginCaptures": { "1": { "name": "storage.type.php" @@ -339,7 +1034,7 @@ ] }, { - "match": "(?xi)\n(array|callable) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n(?: # Optional default value\n \\s*(=)\\s*\n (?:\n (null)\n |\n (\\[)((?>[^\\[\\]]+|\\[\\g<8>\\])*)(\\])\n |((?:\\S*?\\(\\))|(?:\\S*?))\n )\n)?\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment", + "match": "(?xi)\n(array|callable) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n(?: # Optional default value\n \\s*(=)\\s*\n (?:\n (null)\n |\n (\\[)((?>[^\\[\\]]+|\\[\\g<8>\\])*)(\\])\n |((?:\\S*?\\(\\))|(?:\\S*?))\n )\n)?\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment", "name": "meta.function.parameter.array.php", "captures": { "1": { @@ -379,13 +1074,13 @@ } }, { - "begin": "(?xi)\n(\\\\?(?:[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\)*) # Optional namespace\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Typehinted class name\n\\s+((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference", + "begin": "(?xi)\n(\\\\?(?:[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\\\)*) # Optional namespace\n([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Typehinted class name\n\\s+((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference", "beginCaptures": { "1": { "name": "support.other.namespace.php", "patterns": [ { - "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*", "name": "storage.type.php" }, { @@ -423,7 +1118,7 @@ "end": "(?=,|\\)|/[/*]|\\#)", "patterns": [ { - "include": "#language" + "include": "$self" } ] } @@ -444,11 +1139,11 @@ "name": "punctuation.definition.variable.php" } }, - "match": "(?xi)\n((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment", + "match": "(?xi)\n((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment", "name": "meta.function.parameter.no-default.php" }, { - "begin": "(?xi)\n((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n\\s*(=)\\s*\n(?:(\\[)((?>[^\\[\\]]+|\\[\\g<6>\\])*)(\\]))? # Optional default type", + "begin": "(?xi)\n((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n\\s*(=)\\s*\n(?:(\\[)((?>[^\\[\\]]+|\\[\\g<6>\\])*)(\\]))? # Optional default type", "beginCaptures": { "1": { "name": "variable.other.php" @@ -492,7 +1187,7 @@ "function-call": { "patterns": [ { - "begin": "(?xi)\n(\n \\\\?\\b # Optional root namespace\n [a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]* # First namespace\n (?:\\\\[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)+ # Additional namespaces\n)\\s*(\\()", + "begin": "(?xi)\n(\n \\\\?(?)", - "name": "meta.namespace.php", - "patterns": [ - { - "include": "#comments" - }, - { - "match": "(?i)[a-z0-9_\\x{7f}-\\x{ff}\\\\]+", - "name": "entity.name.type.namespace.php", - "captures": { - "0": { - "patterns": [ - { - "match": "\\\\", - "name": "punctuation.separator.inheritance.php" - } - ] - } - } - }, - { - "begin": "{", - "beginCaptures": { - "0": { - "name": "punctuation.definition.namespace.begin.bracket.curly.php" - } - }, - "end": "}|(?=\\?>)", - "endCaptures": { - "0": { - "name": "punctuation.definition.namespace.end.bracket.curly.php" - } - }, - "patterns": [ - { - "include": "#language" - } - ] - }, - { - "match": "[^\\s]+", - "name": "invalid.illegal.identifier.php" - } - ] - }, - { - "match": "\\s+(?=use\\b)" - }, - { - "begin": "(?i)\\buse\\b", - "beginCaptures": { - "0": { - "name": "keyword.other.use.php" - } - }, - "end": "(?<=})|(?=;)", - "name": "meta.use.php", - "patterns": [ - { - "match": "\\b(const|function)\\b", - "name": "storage.type.${1:/downcase}.php" - }, - { - "begin": "{", - "beginCaptures": { - "0": { - "name": "punctuation.definition.use.begin.bracket.curly.php" - } - }, - "end": "}", - "endCaptures": { - "0": { - "name": "punctuation.definition.use.end.bracket.curly.php" - } - }, - "patterns": [ - { - "include": "#scope-resolution" - }, - { - "match": "(?xi)\n\\b(as)\n\\s+(final|abstract|public|private|protected|static)\n\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n\\b", - "captures": { - "1": { - "name": "keyword.other.use-as.php" - }, - "2": { - "name": "storage.modifier.php" - }, - "3": { - "name": "entity.other.alias.php" - } - } - }, - { - "match": "(?xi)\n\\b(as)\n\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n\\b", - "captures": { - "1": { - "name": "keyword.other.use-as.php" - }, - "2": { - "patterns": [ - { - "match": "^(?:final|abstract|public|private|protected|static)$", - "name": "storage.modifier.php" - }, - { - "match": ".+", - "name": "entity.other.alias.php" - } - ] - } - } - }, - { - "match": "(?i)\\b(insteadof)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)", - "captures": { - "1": { - "name": "keyword.other.use-insteadof.php" - }, - "2": { - "name": "support.class.php" - } - } - }, - { - "match": ";", - "name": "punctuation.terminator.expression.php" - }, - { - "include": "#use-inner" - } - ] - }, - { - "include": "#use-inner" - } - ] - }, - { - "begin": "(?i)^\\s*(?:(abstract|final)\\s+)?(class)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)", - "beginCaptures": { - "1": { - "name": "storage.modifier.${1:/downcase}.php" - }, - "2": { - "name": "storage.type.class.php" - }, - "3": { - "name": "entity.name.type.class.php" - } - }, - "end": "}|(?=\\?>)", - "endCaptures": { - "0": { - "name": "punctuation.definition.class.end.bracket.curly.php" - } - }, - "name": "meta.class.php", - "patterns": [ - { - "include": "#comments" - }, - { - "begin": "(?i)(extends)\\s+", - "beginCaptures": { - "1": { - "name": "storage.modifier.extends.php" - } - }, - "contentName": "meta.other.inherited-class.php", - "end": "(?i)(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", - "patterns": [ - { - "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\)", - "end": "(?i)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", - "endCaptures": { - "1": { - "name": "entity.other.inherited-class.php" - } - }, - "patterns": [ - { - "include": "#namespace" - } - ] - }, - { - "include": "#class-builtin" - }, - { - "include": "#namespace" - }, - { - "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", - "name": "entity.other.inherited-class.php" - } - ] - }, - { - "begin": "(?i)(implements)\\s+", - "beginCaptures": { - "1": { - "name": "storage.modifier.implements.php" - } - }, - "end": "(?i)(?=[;{])", - "patterns": [ - { - "include": "#comments" - }, - { - "begin": "(?i)(?=[a-z0-9_\\x{7f}-\\x{ff}\\\\]+)", - "contentName": "meta.other.inherited-class.php", - "end": "(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\\\s]))\\s*)", - "patterns": [ - { - "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\)", - "end": "(?i)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", - "endCaptures": { - "1": { - "name": "entity.other.inherited-class.php" - } - }, - "patterns": [ - { - "include": "#namespace" - } - ] - }, - { - "include": "#class-builtin" - }, - { - "include": "#namespace" - }, - { - "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", - "name": "entity.other.inherited-class.php" - } - ] - } - ] - }, - { - "begin": "{", - "beginCaptures": { - "0": { - "name": "punctuation.definition.class.begin.bracket.curly.php" - } - }, - "end": "(?=}|\\?>)", - "contentName": "meta.class.body.php", - "patterns": [ - { - "include": "#language" - } - ] - } - ] - }, - { - "include": "#switch_statement" - }, - { - "match": "(?x)\n\\s*\n\\b(\n break|case|continue|declare|default|die|do|\n else(if)?|end(declare|for(each)?|if|switch|while)|exit|\n for(each)?|if|return|switch|use|while|yield\n)\\b", - "captures": { - "1": { - "name": "keyword.control.${1:/downcase}.php" - } - } - }, - { - "begin": "(?i)\\b((?:require|include)(?:_once)?)\\s+", - "beginCaptures": { - "1": { - "name": "keyword.control.import.include.php" - } - }, - "end": "(?=\\s|;|$|\\?>)", - "name": "meta.include.php", - "patterns": [ - { - "include": "#language" - } - ] - }, - { - "begin": "\\b(catch)\\s*(\\()", - "beginCaptures": { - "1": { - "name": "keyword.control.exception.catch.php" - }, - "2": { - "name": "punctuation.definition.parameters.begin.bracket.round.php" - } - }, - "end": "\\)", - "endCaptures": { - "0": { - "name": "punctuation.definition.parameters.end.bracket.round.php" - } - }, - "name": "meta.catch.php", - "patterns": [ - { - "include": "#namespace" - }, - { - "match": "(?xi)\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Exception class\n((?:\\s*\\|\\s*[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)*) # Optional additional exception classes\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable", - "captures": { - "1": { - "name": "support.class.exception.php" - }, - "2": { - "patterns": [ - { - "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", - "name": "support.class.exception.php" - }, - { - "match": "\\|", - "name": "punctuation.separator.delimiter.php" - } - ] - }, - "3": { - "name": "variable.other.php" - }, - "4": { - "name": "punctuation.definition.variable.php" - } - } - } - ] - }, - { - "match": "\\b(catch|try|throw|exception|finally)\\b", - "name": "keyword.control.exception.php" - }, - { - "begin": "(?i)\\b(function)\\s*(?=\\()", - "beginCaptures": { - "1": { - "name": "storage.type.function.php" - } - }, - "end": "(?={)", - "name": "meta.function.closure.php", - "patterns": [ - { - "begin": "\\(", - "beginCaptures": { - "0": { - "name": "punctuation.definition.parameters.begin.bracket.round.php" - } - }, - "contentName": "meta.function.parameters.php", - "end": "\\)", - "endCaptures": { - "0": { - "name": "punctuation.definition.parameters.end.bracket.round.php" - } - }, - "patterns": [ - { - "include": "#function-parameters" - } - ] - }, - { - "begin": "(?i)(use)\\s*(\\()", - "beginCaptures": { - "1": { - "name": "keyword.other.function.use.php" - }, - "2": { - "name": "punctuation.definition.parameters.begin.bracket.round.php" - } - }, - "end": "\\)", - "endCaptures": { - "0": { - "name": "punctuation.definition.parameters.end.bracket.round.php" - } - }, - "patterns": [ - { - "captures": { - "1": { - "name": "variable.other.php" - }, - "2": { - "name": "storage.modifier.reference.php" - }, - "3": { - "name": "punctuation.definition.variable.php" - } - }, - "match": "(?i)((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(?=,|\\))", - "name": "meta.function.closure.use.php" - } - ] - } - ] - }, - { - "begin": "(?x)\n((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n(function)\\s+\n(?i:\n (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|toString|\n clone|set_state|sleep|wakeup|autoload|invoke|callStatic))\n |([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n)\n\\s*(\\()", - "beginCaptures": { - "1": { - "patterns": [ - { - "match": "final|abstract|public|private|protected|static", - "name": "storage.modifier.php" - } - ] - }, - "2": { - "name": "storage.type.function.php" - }, - "3": { - "name": "support.function.magic.php" - }, - "4": { - "name": "entity.name.function.php" - }, - "5": { - "name": "punctuation.definition.parameters.begin.bracket.round.php" - } - }, - "contentName": "meta.function.parameters.php", - "end": "(\\))(?:\\s*(:)\\s*([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*))?", - "endCaptures": { - "1": { - "name": "punctuation.definition.parameters.end.bracket.round.php" - }, - "2": { - "name": "keyword.operator.return-value.php" - }, - "3": { - "name": "storage.type.php" - } - }, - "name": "meta.function.php", - "patterns": [ - { - "include": "#function-parameters" - } - ] - }, - { - "include": "#invoke-call" - }, - { - "include": "#scope-resolution" - }, - { - "include": "#variables" - }, - { - "include": "#strings" - }, - { - "captures": { - "1": { - "name": "support.function.construct.php" - }, - "2": { - "name": "punctuation.definition.array.begin.bracket.round.php" - }, - "3": { - "name": "punctuation.definition.array.end.bracket.round.php" - } - }, - "match": "(array)(\\()(\\))", - "name": "meta.array.empty.php" - }, - { - "begin": "(array)(\\()", - "beginCaptures": { - "1": { - "name": "support.function.construct.php" - }, - "2": { - "name": "punctuation.definition.array.begin.bracket.round.php" - } - }, - "end": "\\)|(?=\\?>)", - "endCaptures": { - "0": { - "name": "punctuation.definition.array.end.bracket.round.php" - } - }, - "name": "meta.array.php", - "patterns": [ - { - "include": "#language" - } - ] - }, - { - "match": "(?i)(\\()\\s*(array|real|double|float|int(?:eger)?|bool(?:ean)?|string|object|binary|unset)\\s*(\\))", - "captures": { - "1": { - "name": "punctuation.definition.storage-type.begin.bracket.round.php" - }, - "2": { - "name": "storage.type.php" - }, - "3": { - "name": "punctuation.definition.storage-type.end.bracket.round.php" - } - } - }, - { - "match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|var|function|interface|trait|parent|self|object)\\b", - "name": "storage.type.php" - }, - { - "match": "(?i)\\b(global|abstract|const|extends|implements|final|private|protected|public|static)\\b", - "name": "storage.modifier.php" - }, - { - "include": "#object" - }, - { - "match": ";", - "name": "punctuation.terminator.expression.php" - }, - { - "match": ":", - "name": "punctuation.terminator.statement.php" - }, - { - "include": "#heredoc" - }, - { - "include": "#numbers" - }, - { - "match": "(?i)\\bclone\\b", - "name": "keyword.other.clone.php" - }, - { - "match": "\\.=?", - "name": "keyword.operator.string.php" - }, - { - "match": "=>", - "name": "keyword.operator.key.php" - }, - { - "captures": { - "1": { - "name": "keyword.operator.assignment.php" - }, - "2": { - "name": "storage.modifier.reference.php" - }, - "3": { - "name": "storage.modifier.reference.php" - } - }, - "match": "(?i)(\\=)(&)|(&)(?=[$a-z_])" - }, - { - "match": "@", - "name": "keyword.operator.error-control.php" - }, - { - "match": "===|==|!==|!=|<>", - "name": "keyword.operator.comparison.php" - }, - { - "match": "=|\\+=|\\-=|\\*=|/=|%=|&=|\\|=|\\^=|<<=|>>=", - "name": "keyword.operator.assignment.php" - }, - { - "match": "<=>|<=|>=|<|>", - "name": "keyword.operator.comparison.php" - }, - { - "match": "\\-\\-|\\+\\+", - "name": "keyword.operator.increment-decrement.php" - }, - { - "match": "\\-|\\+|\\*|/|%", - "name": "keyword.operator.arithmetic.php" - }, - { - "match": "(?i)(!|&&|\\|\\|)|\\b(and|or|xor|as)\\b", - "name": "keyword.operator.logical.php" - }, - { - "include": "#function-call" - }, - { - "match": "<<|>>|~|\\^|&|\\|", - "name": "keyword.operator.bitwise.php" - }, - { - "begin": "(?i)\\b(instanceof)\\s+(?=[\\\\$a-z_])", - "beginCaptures": { - "1": { - "name": "keyword.operator.type.php" - } - }, - "end": "(?=[^\\\\$a-z0-9_\\x{7f}-\\x{ff}])", - "patterns": [ - { - "include": "#class-name" - }, - { - "include": "#variable-name" - } - ] - }, - { - "include": "#instantiation" - }, - { - "captures": { - "1": { - "name": "keyword.control.goto.php" - }, - "2": { - "name": "support.other.php" - } - }, - "match": "(?i)(goto)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)" - }, - { - "captures": { - "1": { - "name": "entity.name.goto-label.php" - } - }, - "match": "(?i)^\\s*([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*:(?!:)" - }, - { - "include": "#string-backtick" - }, - { - "begin": "{", - "beginCaptures": { - "0": { - "name": "punctuation.definition.begin.bracket.curly.php" - } - }, - "end": "}|(?=\\?>)", - "endCaptures": { - "0": { - "name": "punctuation.definition.end.bracket.curly.php" - } - }, - "patterns": [ - { - "include": "#language" - } - ] - }, - { - "begin": "\\[", - "beginCaptures": { - "0": { - "name": "punctuation.section.array.begin.php" - } - }, - "end": "\\]|(?=\\?>)", - "endCaptures": { - "0": { - "name": "punctuation.section.array.end.php" - } - }, - "patterns": [ - { - "include": "#language" - } - ] - }, - { - "begin": "\\(", - "beginCaptures": { - "0": { - "name": "punctuation.definition.begin.bracket.round.php" - } - }, - "end": "\\)|(?=\\?>)", - "endCaptures": { - "0": { - "name": "punctuation.definition.end.bracket.round.php" - } - }, - "patterns": [ - { - "include": "#language" - } - ] - }, - { - "include": "#constants" - }, - { - "match": ",", - "name": "punctuation.separator.delimiter.php" - } - ] - }, "namespace": { - "begin": "(?i)(?:(namespace)|[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?(\\\\)", + "begin": "(?i)(?:(namespace)|[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)?(\\\\)", "beginCaptures": { "1": { "name": "variable.language.namespace.php" @@ -2098,7 +2011,7 @@ "name": "punctuation.separator.inheritance.php" } }, - "end": "(?i)(?![a-z0-9_\\x{7f}-\\x{ff}]*\\\\)", + "end": "(?i)(?![a-z0-9_\\x{7f}-\\x{7fffffff}]*\\\\)", "name": "support.other.namespace.php", "patterns": [ { @@ -2159,12 +2072,12 @@ }, "patterns": [ { - "include": "#language" + "include": "$self" } ] }, { - "begin": "(?i)(->)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()", + "begin": "(?i)(->)([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.operator.class.php" @@ -2185,7 +2098,7 @@ "name": "meta.method-call.php", "patterns": [ { - "include": "#language" + "include": "$self" } ] }, @@ -2201,7 +2114,7 @@ "name": "punctuation.definition.variable.php" } }, - "match": "(?i)(->)((\\$+)?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?" + "match": "(?i)(->)((\\$+)?[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)?" } ] }, @@ -2258,8 +2171,8 @@ "include": "#instantiation" }, { - "begin": "(?xi)\n(?=[a-z0-9_\\x{7f}-\\x{ff}\\\\]+(::)\n ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?\n)", - "end": "(?i)(::)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?", + "begin": "(?xi)\n(?=[a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+(::)\n ([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)?\n)", + "end": "(?i)(::)([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)?", "endCaptures": { "1": { "name": "keyword.operator.class.php" @@ -2311,7 +2224,7 @@ "match": "(@xlink)\\s+(.+)\\s*$" }, { - "begin": "(@(?:global|param|property(-(read|write))?|return|throws|var))\\s+(?=[A-Za-z_\\x{7f}-\\x{ff}\\\\]|\\()", + "begin": "(@(?:global|param|property(-(read|write))?|return|throws|var))\\s+(?=[A-Za-z_\\x{7f}-\\x{7fffffff}\\\\]|\\()", "beginCaptures": { "1": { "name": "keyword.other.phpdoc.php" @@ -2347,7 +2260,7 @@ ] }, "php_doc_types": { - "match": "(?i)[a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*(\\|[a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*)*", + "match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}\\\\][a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]*(\\|[a-z_\\x{7f}-\\x{7fffffff}\\\\][a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]*)*", "captures": { "0": { "patterns": [ @@ -2399,7 +2312,7 @@ ] }, "php_doc_types_array_single": { - "match": "(?i)([a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*)(\\[\\])", + "match": "(?i)([a-z_\\x{7f}-\\x{7fffffff}\\\\][a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]*)(\\[\\])", "captures": { "1": { "patterns": [ @@ -2433,7 +2346,7 @@ "name": "constant.character.escape.regex.php" }, { - "include": "#interpolation" + "include": "#interpolation_double_quoted" }, { "captures": { @@ -2458,7 +2371,7 @@ "name": "string.regexp.character-class.php", "patterns": [ { - "include": "#interpolation" + "include": "#interpolation_double_quoted" } ] }, @@ -2517,7 +2430,7 @@ "scope-resolution": { "patterns": [ { - "match": "(?i)([a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*)(?=\\s*::)", + "match": "(?i)([a-z_\\x{7f}-\\x{7fffffff}\\\\][a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]*)(?=\\s*::)", "captures": { "1": { "patterns": [ @@ -2536,7 +2449,7 @@ } }, { - "begin": "(?i)(::)\\s*([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()", + "begin": "(?i)(::)\\s*([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.operator.class.php" @@ -2557,7 +2470,7 @@ "name": "meta.method-call.static.php", "patterns": [ { - "include": "#language" + "include": "$self" } ] }, @@ -2573,7 +2486,7 @@ } }, { - "match": "(?xi)\n(::)\\s*\n(?:\n ((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable\n |\n ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Constant\n)?", + "match": "(?xi)\n(::)\\s*\n(?:\n ((\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable\n |\n ([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Constant\n)?", "captures": { "1": { "name": "keyword.operator.class.php" @@ -2647,7 +2560,7 @@ "name": "string.quoted.single.sql", "patterns": [ { - "include": "#interpolation" + "include": "#interpolation_double_quoted" } ] }, @@ -2657,12 +2570,12 @@ "name": "string.quoted.other.backtick.sql", "patterns": [ { - "include": "#interpolation" + "include": "#interpolation_double_quoted" } ] }, { - "include": "#interpolation" + "include": "#interpolation_double_quoted" }, { "include": "source.sql" @@ -2736,7 +2649,7 @@ "name": "string.interpolated.php", "patterns": [ { - "match": "\\\\.", + "match": "\\\\`", "name": "constant.character.escape.php" }, { @@ -2760,7 +2673,7 @@ "name": "string.quoted.double.php", "patterns": [ { - "include": "#interpolation" + "include": "#interpolation_double_quoted" } ] }, @@ -3270,7 +3183,7 @@ }, "patterns": [ { - "include": "#language" + "include": "$self" } ] }, @@ -3284,7 +3197,7 @@ "end": "(?=}|\\?>)", "patterns": [ { - "include": "#language" + "include": "$self" } ] } @@ -3304,7 +3217,7 @@ "name": "keyword.other.use-as.php" } }, - "end": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "end": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*", "endCaptures": { "0": { "name": "entity.other.alias.php" @@ -3323,13 +3236,13 @@ "var_basic": { "patterns": [ { + "match": "(?i)(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*", + "name": "variable.other.php", "captures": { "1": { "name": "punctuation.definition.variable.php" } - }, - "match": "(?i)(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\b", - "name": "variable.other.php" + } } ] }, @@ -3401,7 +3314,7 @@ "name": "punctuation.section.array.end.php" } }, - "match": "(?xi)\n((\\$)(?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))\n(?:\n (->)(\\g)\n |\n (\\[)(?:(\\d+)|((\\$)\\g)|([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))(\\])\n)?" + "match": "(?xi)\n((\\$)(?[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*))\n(?:\n (->)(\\g)\n |\n (\\[)(?:(\\d+)|((\\$)\\g)|([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*))(\\])\n)?" }, { "captures": { @@ -3415,7 +3328,7 @@ "name": "punctuation.definition.variable.php" } }, - "match": "(?i)((\\${)(?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(}))" + "match": "(?i)((\\${)(?[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)(}))" } ] }, @@ -3448,11 +3361,38 @@ }, "patterns": [ { - "include": "#language" + "include": "$self" } ] } ] + }, + "ternary_shorthand": { + "match": "\\?:", + "name": "keyword.operator.ternary.php" + }, + "ternary_expression": { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "keyword.operator.ternary.php" + } + }, + "end": ":", + "endCaptures": { + "0": { + "name": "keyword.operator.ternary.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + "null_coalescing": { + "match": "\\?\\?", + "name": "keyword.operator.null-coalescing.php" } } } \ No newline at end of file From c8618adb690e30d7c1423a98c8880a590abe7f82 Mon Sep 17 00:00:00 2001 From: Ali <52593730@qq.com> Date: Tue, 19 Dec 2017 11:42:05 +1300 Subject: [PATCH 397/615] Fix #40011 --- .../parts/preferences/browser/media/preferences.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/preferences/browser/media/preferences.css b/src/vs/workbench/parts/preferences/browser/media/preferences.css index 4faa43a06fc..ceb49aad449 100644 --- a/src/vs/workbench/parts/preferences/browser/media/preferences.css +++ b/src/vs/workbench/parts/preferences/browser/media/preferences.css @@ -48,6 +48,11 @@ text-overflow: ellipsis; } +.default-preferences-editor-container > .preferences-header-container > .default-preferences-header, +.settings-tabs-widget > .monaco-action-bar .action-item .action-label:not([aria-haspopup]) { + display: block; +} + .settings-tabs-widget > .monaco-action-bar .actions-container { justify-content: flex-start; } @@ -309,4 +314,4 @@ .vs-dark .title-actions .action-item .icon.collapseAll, .vs-dark .editor-actions .action-item .icon.collapseAll { background: url('collapseAll_inverse.svg') center center no-repeat; -} \ No newline at end of file +} From 0df83cf0e20f1d33e1d23e185de4ed24541cbe14 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Mon, 18 Dec 2017 16:32:55 -0800 Subject: [PATCH 398/615] Update link color when theme changes. Fixes #40353 (#40461) --- src/vs/workbench/parts/html/browser/webview-pre.js | 13 +++++++++---- src/vs/workbench/parts/html/browser/webview.ts | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/html/browser/webview-pre.js b/src/vs/workbench/parts/html/browser/webview-pre.js index 29af803b49c..aeed9f4123e 100644 --- a/src/vs/workbench/parts/html/browser/webview-pre.js +++ b/src/vs/workbench/parts/html/browser/webview-pre.js @@ -109,8 +109,8 @@ styleBody(body[0]); // iframe - Object.keys(variables).forEach(function(variable) { - target.contentDocument.documentElement.style.setProperty(`--${variable}`,variables[variable]); + Object.keys(variables).forEach(function (variable) { + target.contentDocument.documentElement.style.setProperty(`--${variable}`, variables[variable]); }); }); @@ -139,7 +139,7 @@ const defaultStyles = newDocument.createElement('style'); defaultStyles.id = '_defaultStyles'; - const vars = Object.keys(initData.styles).map(function(variable) { + const vars = Object.keys(initData.styles).map(function (variable) { return `--${variable}: ${initData.styles[variable]};`; }); defaultStyles.innerHTML = ` @@ -159,6 +159,11 @@ max-width: 100%; max-height: 100%; } + + body a { + color: var(--link-color); + } + a:focus, input:focus, select:focus, @@ -252,7 +257,7 @@ newFrame.style.visibility = 'visible'; contentWindow.addEventListener('scroll', handleInnerScroll); - pendingMessages.forEach(function(data) { + pendingMessages.forEach(function (data) { contentWindow.postMessage(data, document.location.origin); }); pendingMessages = []; diff --git a/src/vs/workbench/parts/html/browser/webview.ts b/src/vs/workbench/parts/html/browser/webview.ts index 2df1213dadf..c4954e1f376 100644 --- a/src/vs/workbench/parts/html/browser/webview.ts +++ b/src/vs/workbench/parts/html/browser/webview.ts @@ -9,7 +9,7 @@ import URI from 'vs/base/common/uri'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import Event, { Emitter } from 'vs/base/common/event'; import { addDisposableListener, addClass } from 'vs/base/browser/dom'; -import { editorBackground, editorForeground } from 'vs/platform/theme/common/colorRegistry'; +import { editorBackground, editorForeground, textLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { ITheme, LIGHT, DARK } from 'vs/platform/theme/common/themeService'; import { WebviewFindWidget } from './webviewFindWidget'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; @@ -268,6 +268,7 @@ export default class Webview { 'font-family': fontFamily, 'font-weight': fontWeight, 'font-size': fontSize, + 'link-color': theme.getColor(textLinkForeground).toString() }; let activeTheme: ApiThemeClassName; From 674fd2e636748339ab6f56fa88a6cf3e05ea02cc Mon Sep 17 00:00:00 2001 From: SteVen Batten <6561887+sbatten@users.noreply.github.com> Date: Mon, 18 Dec 2017 16:37:21 -0800 Subject: [PATCH 399/615] Validate workspace recommended extensions against the marketplace (#40270) * Add (extension in gallery)? validation to Workspace Recommendations * adding test for workspace extension recommendations * responding to ramya's feedback as well as fix for empty recommendations list * adding test for empty recommendations array * ramya feedback (don't log duplicates and use 'marketplace') --- .../electron-browser/extensionTipsService.ts | 52 +++++- .../extensionsTipsService.test.ts | 148 +++++++++++++++--- 2 files changed, 169 insertions(+), 31 deletions(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts index d1cfd482733..f2424a15f65 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts @@ -107,14 +107,54 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe .then(content => this.processWorkspaceRecommendations(json.parse(content.value, [])), err => []); } - private processWorkspaceRecommendations(extensionsContent: IExtensionsContent): string[] { - if (extensionsContent && extensionsContent.recommendations) { - const regEx = new RegExp(EXTENSION_IDENTIFIER_PATTERN); - return extensionsContent.recommendations.filter((element, position) => { - return extensionsContent.recommendations.indexOf(element) === position && regEx.test(element); + private processWorkspaceRecommendations(extensionsContent: IExtensionsContent): TPromise { + const regEx = new RegExp(EXTENSION_IDENTIFIER_PATTERN); + + if (extensionsContent && extensionsContent.recommendations && extensionsContent.recommendations.length) { + let countBadRecommendations = 0; + let badRecommendationsString = ''; + let filteredRecommendations = extensionsContent.recommendations.filter((element, position) => { + if (extensionsContent.recommendations.indexOf(element) !== position) { + // This is a duplicate entry, it doesn't hurt anybody + // but it shouldn't be sent in the gallery query + return false; + } else if (!regEx.test(element)) { + countBadRecommendations++; + badRecommendationsString += `${element} (bad format) Expected: .\n`; + return false; + } + + return true; + }); + + return this._galleryService.query({ names: filteredRecommendations }).then(pager => { + let page = pager.firstPage; + let validRecommendations = page.map(extension => { + return extension.identifier.id.toLowerCase(); + }); + + if (validRecommendations.length !== filteredRecommendations.length) { + filteredRecommendations.forEach(element => { + if (validRecommendations.indexOf(element.toLowerCase()) === -1) { + countBadRecommendations++; + badRecommendationsString += `${element} (not found in marketplace)\n`; + } + }); + } + + if (countBadRecommendations > 0) { + console.log('The below ' + + countBadRecommendations + + ' extension(s) in workspace recommendations have issues:\n' + + badRecommendationsString); + } + + return validRecommendations; }); } - return []; + + return TPromise.as([]); + } private onWorkspaceFoldersChanged(event: IWorkspaceFoldersChangeEvent): void { diff --git a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsTipsService.test.ts b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsTipsService.test.ts index 36fd245364b..c8564ef5300 100644 --- a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsTipsService.test.ts +++ b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsTipsService.test.ts @@ -12,7 +12,7 @@ import * as os from 'os'; import { TPromise } from 'vs/base/common/winjs.base'; import uuid = require('vs/base/common/uuid'); import { mkdirp } from 'vs/base/node/pfs'; -import { IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, IGalleryExtensionAssets, IGalleryExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService'; import { ExtensionTipsService } from 'vs/workbench/parts/extensions/electron-browser/extensionTipsService'; import { ExtensionGalleryService } from 'vs/platform/extensionManagement/node/extensionGalleryService'; @@ -32,26 +32,111 @@ import { IFileService } from 'vs/platform/files/common/files'; import { FileService } from 'vs/workbench/services/files/node/fileService'; import extfs = require('vs/base/node/extfs'); import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; +import { IPager } from 'vs/base/common/paging'; +import { assign } from 'vs/base/common/objects'; +import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; +import { generateUuid } from 'vs/base/common/uuid'; -const expectedWorkspaceRecommendations = [ - 'eg2.tslint', - 'dbaeumer.vscode-eslint', - 'msjsdiag.debugger-for-chrome' +const mockExtensionGallery: IGalleryExtension[] = [ + aGalleryExtension('MockExtension1', { + displayName: 'Mock Extension 1', + version: '1.5', + publisherId: 'mockPublisher1Id', + publisher: 'mockPublisher1', + publisherDisplayName: 'Mock Publisher 1', + description: 'Mock Description', + installCount: 1000, + rating: 4, + ratingCount: 100 + }, { + dependencies: ['pub.1'], + }, { + manifest: { uri: 'uri:manifest', fallbackUri: 'fallback:manifest' }, + readme: { uri: 'uri:readme', fallbackUri: 'fallback:readme' }, + changelog: { uri: 'uri:changelog', fallbackUri: 'fallback:changlog' }, + download: { uri: 'uri:download', fallbackUri: 'fallback:download' }, + icon: { uri: 'uri:icon', fallbackUri: 'fallback:icon' }, + license: { uri: 'uri:license', fallbackUri: 'fallback:license' }, + repository: { uri: 'uri:repository', fallbackUri: 'fallback:repository' }, + }), + aGalleryExtension('MockExtension2', { + displayName: 'Mock Extension 2', + version: '1.5', + publisherId: 'mockPublisher2Id', + publisher: 'mockPublisher2', + publisherDisplayName: 'Mock Publisher 2', + description: 'Mock Description', + installCount: 1000, + rating: 4, + ratingCount: 100 + }, { + dependencies: ['pub.1', 'pub.2'], + }, { + manifest: { uri: 'uri:manifest', fallbackUri: 'fallback:manifest' }, + readme: { uri: 'uri:readme', fallbackUri: 'fallback:readme' }, + changelog: { uri: 'uri:changelog', fallbackUri: 'fallback:changlog' }, + download: { uri: 'uri:download', fallbackUri: 'fallback:download' }, + icon: { uri: 'uri:icon', fallbackUri: 'fallback:icon' }, + license: { uri: 'uri:license', fallbackUri: 'fallback:license' }, + repository: { uri: 'uri:repository', fallbackUri: 'fallback:repository' }, + }) ]; -function setUpFolderWorkspace(folderName: string): TPromise<{ parentDir: string, folderDir: string }> { - const id = uuid.generateUuid(); - const parentDir = path.join(os.tmpdir(), 'vsctests', id); - return setUpFolder(folderName, parentDir).then(folderDir => ({ parentDir, folderDir })); +const mockTestFull = { + recommendedExtensions: [ + 'mockPublisher1.mockExtension1', + 'MOCKPUBLISHER2.mockextension2', + 'badlyformattedextension', + 'MOCKPUBLISHER2.mockextension2', + 'unknown.extension' + ], + validRecommendedExtensions: [ + 'mockPublisher1.mockExtension1', + 'MOCKPUBLISHER2.mockextension2' + ] +}; + +const mockTestEmpty = { + recommendedExtensions: [], + validRecommendedExtensions: [] +}; + +function aPage(...objects: T[]): IPager { + return { firstPage: objects, total: objects.length, pageSize: objects.length, getPage: () => null }; } -function setUpFolder(folderName: string, parentDir: string): TPromise { +const noAssets: IGalleryExtensionAssets = { + changelog: null, + download: null, + icon: null, + license: null, + manifest: null, + readme: null, + repository: null +}; + +function aGalleryExtension(name: string, properties: any = {}, galleryExtensionProperties: any = {}, assets: IGalleryExtensionAssets = noAssets): IGalleryExtension { + const galleryExtension = Object.create({}); + assign(galleryExtension, { name, publisher: 'pub', version: '1.0.0', properties: {}, assets: {} }, properties); + assign(galleryExtension.properties, { dependencies: [] }, galleryExtensionProperties); + assign(galleryExtension.assets, assets); + galleryExtension.identifier = { id: getGalleryExtensionId(galleryExtension.publisher, galleryExtension.name), uuid: generateUuid() }; + return galleryExtension; +} + +function setUpFolderWorkspace(folderName: string, recommendedExtensions: string[]): TPromise<{ parentDir: string, folderDir: string }> { + const id = uuid.generateUuid(); + const parentDir = path.join(os.tmpdir(), 'vsctests', id); + return setUpFolder(folderName, parentDir, recommendedExtensions).then(folderDir => ({ parentDir, folderDir })); +} + +function setUpFolder(folderName: string, parentDir: string, recommendedExtensions: string[]): TPromise { const folderDir = path.join(parentDir, folderName); const workspaceSettingsDir = path.join(folderDir, '.vscode'); return mkdirp(workspaceSettingsDir, 493).then(() => { const configPath = path.join(workspaceSettingsDir, 'extensions.json'); fs.writeFileSync(configPath, JSON.stringify({ - 'recommendations': expectedWorkspaceRecommendations + 'recommendations': recommendedExtensions }, null, '\t')); return folderDir; }); @@ -98,16 +183,7 @@ suite('ExtensionsTipsService Test', () => { }); setup(() => { - return setUpFolderWorkspace('myFolder').then(({ parentDir, folderDir }) => { - parentResource = parentDir; - const myWorkspace = testWorkspace(URI.from({ scheme: 'file', path: folderDir })); - workspaceService = new TestContextService(myWorkspace); - instantiationService.stub(IWorkspaceContextService, workspaceService); - instantiationService.stub(IFileService, new FileService(workspaceService, new TestTextResourceConfigurationService(), new TestConfigurationService(), new TestLifecycleService(), { disableWatcher: true })); - - testObject = instantiationService.createInstance(ExtensionTipsService); - - }); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(...mockExtensionGallery)); }); teardown((done) => { @@ -118,10 +194,32 @@ suite('ExtensionsTipsService Test', () => { } }); - test('test workspace folder recommendations', () => { - return testObject.getWorkspaceRecommendations().then(recommendations => { - assert.equal(recommendations.length, expectedWorkspaceRecommendations.length); - recommendations.forEach(x => assert.equal(expectedWorkspaceRecommendations.indexOf(x) > -1, true)); + function runTestCase(testCase): TPromise { + return setUpFolderWorkspace('myFolder', testCase.recommendedExtensions).then(({ parentDir, folderDir }) => { + parentResource = parentDir; + const myWorkspace = testWorkspace(URI.from({ scheme: 'file', path: folderDir })); + workspaceService = new TestContextService(myWorkspace); + instantiationService.stub(IWorkspaceContextService, workspaceService); + instantiationService.stub(IFileService, new FileService(workspaceService, new TestTextResourceConfigurationService(), new TestConfigurationService(), new TestLifecycleService(), { disableWatcher: true })); + testObject = instantiationService.createInstance(ExtensionTipsService); + }).then(() => { + return testObject.getWorkspaceRecommendations(); + }).then(recommendations => { + assert.equal(recommendations.length, testCase.validRecommendedExtensions.length); + let lowerRecommendations = recommendations.map(x => x.toLowerCase()); + let lowerValidRecommendations = testCase.validRecommendedExtensions.map(x => x.toLowerCase()); + + lowerRecommendations.forEach(x => { + assert.equal(lowerValidRecommendations.indexOf(x) > -1, true); + }); }); + } + + test('test workspace folder recommendations', () => { + return runTestCase(mockTestFull); + }); + + test('test workspace folder recommendations with empty array', () => { + return runTestCase(mockTestEmpty); }); }); \ No newline at end of file From 790618e2267e212116ad6aa29ff2e457bfb26bb8 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Mon, 18 Dec 2017 16:59:06 -0800 Subject: [PATCH 400/615] Use case-insensitive environment vars on Windows Fixes #4895 --- .../configurationResolverService.ts | 9 ++++--- .../configurationResolverService.test.ts | 26 ++++++++++++------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts b/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts index a8fa36aa37e..098675ef217 100644 --- a/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts +++ b/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts @@ -18,6 +18,7 @@ import { toResource } from 'vs/workbench/common/editor'; import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { relative } from 'path'; +import { IProcessEnvironment, isWindows } from 'vs/base/common/platform'; export class ConfigurationResolverService implements IConfigurationResolverService { _serviceBrand: any; @@ -25,7 +26,7 @@ export class ConfigurationResolverService implements IConfigurationResolverServi private _lastWorkspaceFolder: IWorkspaceFolder; constructor( - envVariables: { [key: string]: string }, + envVariables: IProcessEnvironment, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IEnvironmentService environmentService: IEnvironmentService, @IConfigurationService private configurationService: IConfigurationService, @@ -33,7 +34,8 @@ export class ConfigurationResolverService implements IConfigurationResolverServi ) { this._execPath = environmentService.execPath; Object.keys(envVariables).forEach(key => { - this[`env:${key}`] = envVariables[key]; + const name = isWindows ? key.toLowerCase() : key; + this[`env:${name}`] = envVariables[key]; }); } @@ -159,7 +161,8 @@ export class ConfigurationResolverService implements IConfigurationResolverServi let regexp = /\$\{(.*?)\}/g; const originalValue = value; const resolvedString = value.replace(regexp, (match: string, name: string) => { - let newValue = (this)[name]; + const key = (isWindows && match.indexOf('env:') > 0) ? name.toLowerCase() : name; + let newValue = (this)[key]; if (types.isString(newValue)) { return newValue; } else { diff --git a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts index 069638e9d81..5c4e7d8cddb 100644 --- a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts +++ b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts @@ -17,7 +17,7 @@ import { TestConfigurationService } from 'vs/platform/configuration/test/common/ suite('Configuration Resolver Service', () => { let configurationResolverService: IConfigurationResolverService; - let envVariables: { [key: string]: string } = { key1: 'Value for Key1', key2: 'Value for Key2' }; + let envVariables: { [key: string]: string } = { key1: 'Value for key1', key2: 'Value for key2' }; let mockCommandService: MockCommandService; let editorService: TestEditorService; let workspace: IWorkspaceFolder; @@ -66,17 +66,25 @@ suite('Configuration Resolver Service', () => { test('substitute one env variable', () => { if (platform.isWindows) { - assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${workspaceFolder} ${env:key1} xyz'), 'abc \\VSCode\\workspaceLocation Value for Key1 xyz'); + assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${workspaceFolder} ${env:key1} xyz'), 'abc \\VSCode\\workspaceLocation Value for key1 xyz'); } else { - assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${workspaceFolder} ${env:key1} xyz'), 'abc /VSCode/workspaceLocation Value for Key1 xyz'); + assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${workspaceFolder} ${env:key1} xyz'), 'abc /VSCode/workspaceLocation Value for key1 xyz'); } }); test('substitute many env variable', () => { if (platform.isWindows) { - assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), '\\VSCode\\workspaceLocation - \\VSCode\\workspaceLocation Value for Key1 - Value for Key2'); + assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), '\\VSCode\\workspaceLocation - \\VSCode\\workspaceLocation Value for key1 - Value for key2'); } else { - assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), '/VSCode/workspaceLocation - /VSCode/workspaceLocation Value for Key1 - Value for Key2'); + 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 - ${env:Key1}'); } }); @@ -171,9 +179,9 @@ suite('Configuration Resolver Service', () => { let service = new ConfigurationResolverService(envVariables, new TestEditorService(), TestEnvironmentService, configurationService, mockCommandService); if (platform.isWindows) { - assert.strictEqual(service.resolve(workspace, 'abc ${config:editor.fontFamily} ${workspaceFolder} ${env:key1} xyz'), 'abc foo \\VSCode\\workspaceLocation Value for Key1 xyz'); + assert.strictEqual(service.resolve(workspace, 'abc ${config:editor.fontFamily} ${workspaceFolder} ${env:key1} xyz'), 'abc foo \\VSCode\\workspaceLocation Value for key1 xyz'); } else { - assert.strictEqual(service.resolve(workspace, 'abc ${config:editor.fontFamily} ${workspaceFolder} ${env:key1} xyz'), 'abc foo /VSCode/workspaceLocation Value for Key1 xyz'); + assert.strictEqual(service.resolve(workspace, 'abc ${config:editor.fontFamily} ${workspaceFolder} ${env:key1} xyz'), 'abc foo /VSCode/workspaceLocation Value for key1 xyz'); } }); @@ -192,9 +200,9 @@ suite('Configuration Resolver Service', () => { let service = new ConfigurationResolverService(envVariables, new TestEditorService(), TestEnvironmentService, configurationService, mockCommandService); if (platform.isWindows) { - 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'); + 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'); } else { - 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'); + 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'); } }); From 8e96c04fceba430d2cb1aeb994e9ce7b0ab54575 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Mon, 18 Dec 2017 17:21:18 -0800 Subject: [PATCH 401/615] Fix test on non-Windows Forgot that missing environment variables are replaced with empty string. --- .../test/electron-browser/configurationResolverService.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts index 5c4e7d8cddb..ea0cd0cc53a 100644 --- a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts +++ b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts @@ -84,7 +84,7 @@ suite('Configuration Resolver Service', () => { 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 - ${env:Key1}'); + assert.strictEqual(configurationResolverService.resolve(workspace, '${env:key1} - ${env:Key1}'), 'Value for key1 - '); } }); From cd6d601deff8c16711b50a52d0812ad691457d6a Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Mon, 18 Dec 2017 18:52:01 -0800 Subject: [PATCH 402/615] Loosen remote settings search score cutoff --- .../parts/preferences/electron-browser/preferencesSearch.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts b/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts index 454c0ba49ab..f99d62999fd 100644 --- a/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts +++ b/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts @@ -156,7 +156,8 @@ class RemoteSearchProvider { let sortedNames = Object.keys(remoteResult.scoredResults).sort((a, b) => remoteResult.scoredResults[b] - remoteResult.scoredResults[a]); if (sortedNames.length) { const highScore = remoteResult.scoredResults[sortedNames[0]]; - sortedNames = sortedNames.filter(name => remoteResult.scoredResults[name] >= highScore / 2); + const minScore = highScore / 5; + sortedNames = sortedNames.filter(name => remoteResult.scoredResults[name] >= minScore); } const settingMatcher = this.getRemoteSettingMatcher(sortedNames, preferencesModel); From 90f4a4f01dc54ea63553d40a51e654a587af69ad Mon Sep 17 00:00:00 2001 From: Christopher Leidigh Date: Tue, 19 Dec 2017 00:46:14 -0500 Subject: [PATCH 403/615] SelectBox select on mouseup only Fixes: #40438 (#40475) --- src/vs/base/browser/ui/selectBox/selectBoxCustom.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts index 711cc2dd97f..3e61d3d57f8 100644 --- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts +++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts @@ -480,9 +480,9 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate this.selectList.length > 0) - .on(e => this.onMouseDown(e), this, this.toDispose); + .on(e => this.onMouseUp(e), this, this.toDispose); this.toDispose.push(this.selectList.onDidBlur(e => this.onListBlur())); } @@ -490,7 +490,7 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate Date: Tue, 19 Dec 2017 00:47:39 -0500 Subject: [PATCH 404/615] Fix circular/infinite dispose (#40467) --- src/vs/base/browser/ui/selectBox/selectBox.ts | 5 ++--- src/vs/base/browser/ui/selectBox/selectBoxCustom.ts | 5 ++--- src/vs/base/browser/ui/selectBox/selectBoxNative.ts | 5 +++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/vs/base/browser/ui/selectBox/selectBox.ts b/src/vs/base/browser/ui/selectBox/selectBox.ts index bfd002094e7..c9939222f77 100644 --- a/src/vs/base/browser/ui/selectBox/selectBox.ts +++ b/src/vs/base/browser/ui/selectBox/selectBox.ts @@ -66,9 +66,9 @@ export class SelectBox extends Widget implements ISelectBoxDelegate { // Instantiate select implementation based on platform if (isMacintosh) { - this.selectBoxDelegate = new SelectBoxNative(options, selected, styles, this.toDispose); + this.selectBoxDelegate = new SelectBoxNative(options, selected, styles); } else { - this.selectBoxDelegate = new SelectBoxList(options, selected, contextViewProvider, styles, this.toDispose); + this.selectBoxDelegate = new SelectBoxList(options, selected, contextViewProvider, styles); } this.toDispose.push(this.selectBoxDelegate); @@ -112,7 +112,6 @@ export class SelectBox extends Widget implements ISelectBoxDelegate { public dispose(): void { this.toDispose = dispose(this.toDispose); - super.dispose(); } } \ No newline at end of file diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts index 3e61d3d57f8..5d7e3013a65 100644 --- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts +++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts @@ -88,10 +88,9 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate(); this.styles = styles; From d0ae4c036a4f9e85ad3a39eee644c96c71ad5a1e Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 19 Dec 2017 08:02:49 +0100 Subject: [PATCH 405/615] Be resilient while creating output writers --- .../output/electron-browser/outputServices.ts | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index a1b80c275b5..9126e2daaaa 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -32,6 +32,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { RotatingLogger } from 'spdlog'; import { toLocalISOString } from 'vs/base/common/date'; +import { IMessageService, Severity } from 'vs/platform/message/common/message'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; @@ -90,8 +91,8 @@ abstract class AbstractOutputChannel extends Disposable { constructor( protected readonly outputChannelIdentifier: IOutputChannelIdentifier, protected fileService: IFileService, - private modelService: IModelService, - private modeService: IModeService, + protected modelService: IModelService, + protected modeService: IModeService, private panelService: IPanelService ) { super(); @@ -229,21 +230,27 @@ class AppendableFileOutputChannel extends AbstractOutputChannel implements Outpu @IFileService fileService: IFileService, @IModelService modelService: IModelService, @IModeService modeService: IModeService, - @IPanelService panelService: IPanelService + @IPanelService panelService: IPanelService, + @IMessageService private messageService: IMessageService ) { super(outputChannelIdentifier, fileService, modelService, modeService, panelService); - - this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 30, 5); + try { + this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 30, 5); + } catch (e) { + this.messageService.show(Severity.Error, e); + } this.outputWriter.clearFormatters(); } append(message: string): void { - this.outputWriter.critical(message); - const model = this.getModel(); - if (model) { - this.appendedMessage += message; - if (!this.modelUpdater.isScheduled()) { - this.modelUpdater.schedule(); + if (this.outputWriter) { + this.outputWriter.critical(message); + const model = this.getModel(); + if (model) { + this.appendedMessage += message; + if (!this.modelUpdater.isScheduled()) { + this.modelUpdater.schedule(); + } } } } @@ -254,9 +261,12 @@ class AppendableFileOutputChannel extends AbstractOutputChannel implements Outpu } createModel(): TPromise { - this.outputWriter.flush(); - this.appendedMessage = ''; - return super.createModel(); + if (this.outputWriter) { + this.outputWriter.flush(); + this.appendedMessage = ''; + return super.createModel(); + } + return TPromise.as(this.modelService.createModel('', this.modeService.getOrCreateMode(OUTPUT_MIME), URI.from({ scheme: OUTPUT_SCHEME, path: this.id }))); } protected updateModel(): void { From e983daa165b12738448c03c1f5771c2b321a5185 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 19 Dec 2017 08:09:06 +0100 Subject: [PATCH 406/615] Cannot read property 'language' of null (fixes #40484) --- src/vs/workbench/api/node/extHostTypeConverters.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTypeConverters.ts b/src/vs/workbench/api/node/extHostTypeConverters.ts index 8b10ccba4ba..f6363eb2beb 100644 --- a/src/vs/workbench/api/node/extHostTypeConverters.ts +++ b/src/vs/workbench/api/node/extHostTypeConverters.ts @@ -614,9 +614,13 @@ function doToLanguageSelector(selector: string | vscode.DocumentFilter): string return selector; } - return { - language: selector.language, - scheme: selector.scheme, - pattern: toGlobPattern(selector.pattern) - }; + if (selector) { + return { + language: selector.language, + scheme: selector.scheme, + pattern: toGlobPattern(selector.pattern) + }; + } + + return undefined; } From 2e55941ce82de979a1393dfce60c66b34401ff23 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 19 Dec 2017 08:15:52 +0100 Subject: [PATCH 407/615] Use current window id and time stamp for creating an output logs folder --- .../parts/output/electron-browser/outputServices.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index 9126e2daaaa..6524ac0f666 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -33,6 +33,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { RotatingLogger } from 'spdlog'; import { toLocalISOString } from 'vs/base/common/date'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; +import { IWindowService } from 'vs/platform/windows/common/windows'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; @@ -286,6 +287,7 @@ export class OutputService extends Disposable implements IOutputService, ITextMo private channels: Map = new Map(); private activeChannelId: string; + private readonly windowSession: string; private _onActiveOutputChannel: Emitter = new Emitter(); readonly onActiveOutputChannel: Event = this._onActiveOutputChannel.event; @@ -299,7 +301,8 @@ export class OutputService extends Disposable implements IOutputService, ITextMo @IWorkspaceContextService contextService: IWorkspaceContextService, @ITextModelService textModelResolverService: ITextModelService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IEnvironmentService private environmentService: IEnvironmentService + @IEnvironmentService private environmentService: IEnvironmentService, + @IWindowService private windowService: IWindowService, ) { super(); const channels = this.getChannels(); @@ -313,6 +316,8 @@ export class OutputService extends Disposable implements IOutputService, ITextMo this.onDidPanelOpen(this.panelService.getActivePanel()); panelService.onDidPanelOpen(this.onDidPanelOpen, this); panelService.onDidPanelClose(this.onDidPanelClose, this); + + this.windowSession = `${this.windowService.getCurrentWindowId()}_${toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '')}`; } provideTextContent(resource: URI): TPromise { @@ -378,8 +383,7 @@ export class OutputService extends Disposable implements IOutputService, ITextMo if (channelData && channelData.file) { return this.instantiationService.createInstance(FileOutputChannel, channelData); } - const sessionId = toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, ''); - const file = URI.file(paths.join(this.environmentService.logsPath, 'outputs', `${id}.${sessionId}.log`)); + const file = URI.file(paths.join(this.environmentService.logsPath, `outputs_${this.windowSession}`, `${id}.log`)); return this.instantiationService.createInstance(AppendableFileOutputChannel, { id, label: channelData ? channelData.label : '', file }); } From d907d4cc565cf3e0fd813df43c70827b8af986f5 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 19 Dec 2017 09:30:25 +0100 Subject: [PATCH 408/615] holiday fixes --- .../parts/holidays/electron-browser/media/holidays.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/vs/workbench/parts/holidays/electron-browser/media/holidays.css b/src/vs/workbench/parts/holidays/electron-browser/media/holidays.css index 2dcbc7f27f6..73dcbae803b 100644 --- a/src/vs/workbench/parts/holidays/electron-browser/media/holidays.css +++ b/src/vs/workbench/parts/holidays/electron-browser/media/holidays.css @@ -12,6 +12,8 @@ background-size: 21px; background-repeat: no-repeat; background-position: 16px 7px; + z-index: 100; + pointer-events: none; } .monaco-shell-content { @@ -42,6 +44,8 @@ font-weight: 200; opacity: 0; line-height: 1.4em; + color: #3a3a3a; + text-shadow: 2px 2px 4px rgb(138, 138, 138); transform: translate(0,-40px); transition-delay: 0.2s; transition-duration: 0.8s; @@ -49,6 +53,11 @@ transition-timing-function: ease-out; } +.monaco-shell.vs-dark .happy-holidays-text { + color: #fdfdfd; + text-shadow: 2px 2px 4px rgb(25, 25, 25); +} + .happy-holidays-text.animate { transform: translate(0,0); opacity: 1; From d7f82bdc2de1c63e5b754ef1857c348f7d883473 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 19 Dec 2017 09:43:22 +0100 Subject: [PATCH 409/615] clean up --- .../workbench/parts/output/electron-browser/outputServices.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index 6524ac0f666..347ccffe032 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -237,10 +237,10 @@ class AppendableFileOutputChannel extends AbstractOutputChannel implements Outpu super(outputChannelIdentifier, fileService, modelService, modeService, panelService); try { this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 30, 5); + this.outputWriter.clearFormatters(); } catch (e) { this.messageService.show(Severity.Error, e); } - this.outputWriter.clearFormatters(); } append(message: string): void { From 12396ea083a23b2ef42e39afa1ad392bfe396cbd Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 19 Dec 2017 09:43:08 +0100 Subject: [PATCH 410/615] Fixes #40271: Compute visible line widths when restoring the scroll position --- src/vs/editor/browser/view/viewImpl.ts | 7 +++++++ src/vs/editor/browser/viewParts/lines/viewLines.ts | 4 ++++ src/vs/editor/browser/widget/codeEditorWidget.ts | 10 ++++++++++ src/vs/editor/common/commonCodeEditor.ts | 1 - src/vs/editor/common/viewLayout/viewLayout.ts | 6 +++--- src/vs/editor/common/viewModel/viewModel.ts | 2 +- 6 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index f67e5b4e7cc..54f9b156840 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -450,6 +450,13 @@ export class View extends ViewEventHandler { this._scrollbar.delegateVerticalScrollbarMouseDown(browserEvent); } + public restoreState(scrollPosition: { scrollLeft: number; scrollTop: number; }): void { + this._context.viewLayout.setScrollPositionNow({ scrollTop: scrollPosition.scrollTop }); + this._renderNow(); + this.viewLines.updateLineWidths(); + this._context.viewLayout.setScrollPositionNow({ scrollLeft: scrollPosition.scrollLeft }); + } + public getOffsetForColumn(modelLineNumber: number, modelColumn: number): number { let modelPosition = this._context.model.validateModelPosition({ lineNumber: modelLineNumber, diff --git a/src/vs/editor/browser/viewParts/lines/viewLines.ts b/src/vs/editor/browser/viewParts/lines/viewLines.ts index 762433ff412..c42f3e90d14 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLines.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLines.ts @@ -455,6 +455,10 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, // --- implementation + public updateLineWidths(): void { + this._updateLineWidths(false); + } + /** * Updates the max line width if it is fast to compute. * Returns true if all lines were taken into account. diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 52c8dd723d2..2cf42479c4d 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -392,6 +392,16 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito viewEventBus.onKeyDown = (e) => this._onKeyDown.fire(e); } + public restoreViewState(s: editorCommon.ICodeEditorViewState): void { + super.restoreViewState(s); + if (!this.cursor || !this.hasView) { + return; + } + if (s && s.cursorState && s.viewState) { + this._view.restoreState(this.viewModel.viewLayout.reduceRestoreState(s.viewState)); + } + } + protected _detachModel(): editorCommon.IModel { let removeDomNode: HTMLElement = null; diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index 7fe5a0d5435..d5ad94f8041 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -651,7 +651,6 @@ export abstract class CommonCodeEditor extends Disposable { // Backwards compatibility this.cursor.restoreState([cursorState]); } - this.viewModel.viewLayout.restoreState(codeEditorState.viewState); let contributionsState = s.contributionsState || {}; let keys = Object.keys(this._contributions); diff --git a/src/vs/editor/common/viewLayout/viewLayout.ts b/src/vs/editor/common/viewLayout/viewLayout.ts index a0802b952e2..86b9a615782 100644 --- a/src/vs/editor/common/viewLayout/viewLayout.ts +++ b/src/vs/editor/common/viewLayout/viewLayout.ts @@ -175,15 +175,15 @@ export class ViewLayout extends Disposable implements IViewLayout { }; } - public restoreState(state: editorCommon.IViewState): void { + public reduceRestoreState(state: editorCommon.IViewState): { scrollLeft: number; scrollTop: number; } { let restoreScrollTop = state.scrollTop; if (typeof state.scrollTopWithoutViewZones === 'number' && !this._linesLayout.hasWhitespace()) { restoreScrollTop = state.scrollTopWithoutViewZones; } - this.scrollable.setScrollPositionNow({ + return { scrollLeft: state.scrollLeft, scrollTop: restoreScrollTop - }); + }; } // ---- IVerticalLayoutProvider diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index 6512796ee93..2e4d3b111ee 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -63,7 +63,7 @@ export interface IViewLayout { getWhitespaces(): IEditorWhitespace[]; saveState(): IViewState; - restoreState(state: IViewState): void; + reduceRestoreState(state: IViewState): { scrollLeft: number; scrollTop: number; }; isAfterLines(verticalOffset: number): boolean; getLineNumberAtVerticalOffset(verticalOffset: number): number; From 29e83090b382a84b8a680d0482d6969514a237fb Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 19 Dec 2017 10:09:13 +0100 Subject: [PATCH 411/615] fixes #32681 --- extensions/git/src/commands.ts | 7 ++----- extensions/git/src/staging.ts | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index d165c520e12..10f4cd7150e 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -11,7 +11,7 @@ import { Repository, Resource, Status, CommitOptions, ResourceGroupType, Reposit import { Model } from './model'; import { toGitUri, fromGitUri } from './uri'; import { grep, eventToPromise, isDescendant } from './util'; -import { applyLineChanges, intersectDiffWithRange, toLineRanges, invertLineChange } from './staging'; +import { applyLineChanges, intersectDiffWithRange, toLineRanges, invertLineChange, getModifiedRange } from './staging'; import * as path from 'path'; import { lstat, Stats } from 'fs'; import * as os from 'os'; @@ -736,10 +736,7 @@ export class CommandCenter { const modifiedDocument = textEditor.document; const selections = textEditor.selections; const selectedChanges = changes.filter(change => { - const modifiedRange = change.modifiedEndLineNumber === 0 - ? new Range(modifiedDocument.lineAt(change.modifiedStartLineNumber - 1).range.end, modifiedDocument.lineAt(change.modifiedStartLineNumber).range.start) - : new Range(modifiedDocument.lineAt(change.modifiedStartLineNumber - 1).range.start, modifiedDocument.lineAt(change.modifiedEndLineNumber - 1).range.end); - + const modifiedRange = getModifiedRange(modifiedDocument, change); return selections.every(selection => !selection.intersection(modifiedRange)); }); diff --git a/extensions/git/src/staging.ts b/extensions/git/src/staging.ts index 863d9f6591b..70c7ca71941 100644 --- a/extensions/git/src/staging.ts +++ b/extensions/git/src/staging.ts @@ -72,7 +72,7 @@ export function toLineRanges(selections: Selection[], textDocument: TextDocument return result; } -function getModifiedRange(textDocument: TextDocument, diff: LineChange): Range { +export function getModifiedRange(textDocument: TextDocument, diff: LineChange): Range { if (diff.modifiedEndLineNumber === 0) { if (diff.modifiedStartLineNumber === 0) { return new Range(textDocument.lineAt(diff.modifiedStartLineNumber).range.end, textDocument.lineAt(diff.modifiedStartLineNumber).range.start); From 77dee3efe3a74f6ce7b1556c2569e9faac342486 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 19 Dec 2017 10:34:49 +0100 Subject: [PATCH 412/615] autoSaveNotAfterDelayContext --- src/vs/workbench/parts/files/common/files.ts | 2 -- .../files/electron-browser/fileCommands.ts | 32 ++++--------------- .../textfile/common/textFileService.ts | 13 ++++++-- .../services/textfile/common/textfiles.ts | 4 ++- .../electron-browser/textFileService.ts | 6 ++-- .../workbench/test/workbenchTestServices.ts | 6 ++-- 6 files changed, 29 insertions(+), 34 deletions(-) diff --git a/src/vs/workbench/parts/files/common/files.ts b/src/vs/workbench/parts/files/common/files.ts index b61ded59645..b817c709192 100644 --- a/src/vs/workbench/parts/files/common/files.ts +++ b/src/vs/workbench/parts/files/common/files.ts @@ -44,7 +44,6 @@ const openEditorsVisibleId = 'openEditorsVisible'; const openEditorsFocusId = 'openEditorsFocus'; const explorerViewletFocusId = 'explorerViewletFocus'; const explorerResourceIsFolderId = 'explorerResourceIsFolder'; -const autoSaveDisabled = 'autoSaveDisabled'; export const ExplorerViewletVisibleContext = new RawContextKey(explorerViewletVisibleId, true); export const ExplorerFolderContext = new RawContextKey(explorerResourceIsFolderId, false); @@ -52,7 +51,6 @@ export const FilesExplorerFocusedContext = new RawContextKey(filesExplo export const OpenEditorsVisibleContext = new RawContextKey(openEditorsVisibleId, false); export const OpenEditorsFocusedContext = new RawContextKey(openEditorsFocusId, true); export const ExplorerFocusedContext = new RawContextKey(explorerViewletFocusId, true); -export const AutoSaveDisabledContext = new RawContextKey(autoSaveDisabled, true); export const OpenEditorsVisibleCondition = ContextKeyExpr.has(openEditorsVisibleId); export const FilesExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(filesExplorerFocusId), ContextKeyExpr.not(InputFocusedContextKey)); diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index d2a6b61c946..702e8c0a3f7 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -19,14 +19,14 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ExplorerViewlet } from 'vs/workbench/parts/files/electron-browser/explorerViewlet'; -import { VIEWLET_ID, explorerItemToFileResource, AutoSaveDisabledContext } from 'vs/workbench/parts/files/common/files'; +import { VIEWLET_ID, explorerItemToFileResource } from 'vs/workbench/parts/files/common/files'; import { FileStat, OpenEditor } from 'vs/workbench/parts/files/common/explorerModel'; import errors = require('vs/base/common/errors'); import { ITree } from 'vs/base/parts/tree/browser/tree'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { ITextFileService, AutoSaveNotAfterDelayContext } from 'vs/workbench/services/textfile/common/textfiles'; import { toErrorMessage } from 'vs/base/common/errorMessage'; import { basename } from 'vs/base/common/paths'; import { IListService } from 'vs/platform/list/browser/listService'; @@ -695,7 +695,7 @@ function registerMenuItems(): void { id: SAVE_FILE_COMMAND_ID, title: SAVE_FILE_LABEL }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext) + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -705,7 +705,7 @@ function registerMenuItems(): void { id: REVERT_FILE_COMMAND_ID, title: nls.localize('revert', "Revert File") }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, AutoSaveDisabledContext, UntitledEditorNotFocusedInOpenEditorsContext) + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext, UntitledEditorNotFocusedInOpenEditorsContext) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -717,31 +717,13 @@ function registerMenuItems(): void { when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext) }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '2_save', - command: { - id: SAVE_ALL_COMMAND_ID, - title: SAVE_ALL_LABEL - }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext) - }); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: '2_save', command: { id: SAVE_ALL_IN_GROUP_COMMAND_ID, title: SAVE_ALL_IN_GROUP_LABEL }, - when: ContextKeyExpr.and(GroupFocusedInOpenEditorsContext) - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '2_save', - command: { - id: SAVE_FILES_COMMAND_ID, - title: SAVE_FILES_LABEL - }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext) + when: ContextKeyExpr.and(GroupFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -751,7 +733,7 @@ function registerMenuItems(): void { id: COMPARE_WITH_SAVED_COMMAND_ID, title: nls.localize('compareWithSaved', "Compare with Saved") }, - when: EditorFocusedInOpenEditorsContext + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, UntitledEditorNotFocusedInOpenEditorsContext) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -761,7 +743,7 @@ function registerMenuItems(): void { id: COMPARE_RESOURCE_COMMAND_ID, title: nls.localize('compareWithChosen', "Compare With Chosen") }, - when: EditorFocusedInOpenEditorsContext + when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, ) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index 2c9af4b5615..21544b454bb 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -14,7 +14,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import platform = require('vs/base/common/platform'); import { IWindowsService } from 'vs/platform/windows/common/windows'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; -import { IResult, ITextFileOperationResult, ITextFileService, IRawTextContent, IAutoSaveConfiguration, AutoSaveMode, SaveReason, ITextFileEditorModelManager, ITextFileEditorModel, ModelState, ISaveOptions } from 'vs/workbench/services/textfile/common/textfiles'; +import { IResult, ITextFileOperationResult, ITextFileService, IRawTextContent, IAutoSaveConfiguration, AutoSaveMode, SaveReason, ITextFileEditorModelManager, ITextFileEditorModel, ModelState, ISaveOptions, AutoSaveNotAfterDelayContext } from 'vs/workbench/services/textfile/common/textfiles'; import { ConfirmResult } from 'vs/workbench/common/editor'; import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; @@ -31,6 +31,7 @@ import { ResourceMap } from 'vs/base/common/map'; import { Schemas } from 'vs/base/common/network'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { IRevertOptions } from 'vs/platform/editor/common/editor'; +import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; export interface IBackupResult { didBackup: boolean; @@ -56,6 +57,8 @@ export abstract class TextFileService implements ITextFileService { private configuredAutoSaveOnFocusChange: boolean; private configuredAutoSaveOnWindowChange: boolean; + private autoSaveNotAfterDelayContext: IContextKey; + private configuredHotExit: string; constructor( @@ -69,7 +72,8 @@ export abstract class TextFileService implements ITextFileService { protected environmentService: IEnvironmentService, private backupFileService: IBackupFileService, private windowsService: IWindowsService, - private historyService: IHistoryService + private historyService: IHistoryService, + contextKeyService: IContextKeyService ) { this.toUnbind = []; @@ -80,6 +84,7 @@ export abstract class TextFileService implements ITextFileService { this.toUnbind.push(this._onFilesAssociationChange); this._models = this.instantiationService.createInstance(TextFileEditorModelManager); + this.autoSaveNotAfterDelayContext = AutoSaveNotAfterDelayContext.bindTo(contextKeyService); const configuration = this.configurationService.getValue(); this.currentFilesAssociationConfig = configuration && configuration.files && configuration.files.associations; @@ -311,24 +316,28 @@ export abstract class TextFileService implements ITextFileService { this.configuredAutoSaveDelay = configuration && configuration.files && configuration.files.autoSaveDelay; this.configuredAutoSaveOnFocusChange = false; this.configuredAutoSaveOnWindowChange = false; + this.autoSaveNotAfterDelayContext.set(false); break; case AutoSaveConfiguration.ON_FOCUS_CHANGE: this.configuredAutoSaveDelay = void 0; this.configuredAutoSaveOnFocusChange = true; this.configuredAutoSaveOnWindowChange = false; + this.autoSaveNotAfterDelayContext.set(true); break; case AutoSaveConfiguration.ON_WINDOW_CHANGE: this.configuredAutoSaveDelay = void 0; this.configuredAutoSaveOnFocusChange = false; this.configuredAutoSaveOnWindowChange = true; + this.autoSaveNotAfterDelayContext.set(true); break; default: this.configuredAutoSaveDelay = void 0; this.configuredAutoSaveOnFocusChange = false; this.configuredAutoSaveOnWindowChange = false; + this.autoSaveNotAfterDelayContext.set(true); break; } diff --git a/src/vs/workbench/services/textfile/common/textfiles.ts b/src/vs/workbench/services/textfile/common/textfiles.ts index 9ac553c90cc..cf1675dae0a 100644 --- a/src/vs/workbench/services/textfile/common/textfiles.ts +++ b/src/vs/workbench/services/textfile/common/textfiles.ts @@ -14,6 +14,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' import { ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { IRawTextSource } from 'vs/editor/common/model/textSource'; import { IRevertOptions } from 'vs/platform/editor/common/editor'; +import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; /** * The save error handler can be installed on the text text file editor model to install code that executes when save errors occur. @@ -90,6 +91,7 @@ export class TextFileModelChangeEvent { } export const TEXT_FILE_SERVICE_ID = 'textFileService'; +export const AutoSaveNotAfterDelayContext = new RawContextKey('autoSaveNotAfterDelayContext', true); export interface ITextFileOperationResult { results: IResult[]; @@ -306,4 +308,4 @@ export interface ITextFileService extends IDisposable { * Convinient fast access to the hot exit file setting. */ isHotExitEnabled: boolean; -} \ No newline at end of file +} diff --git a/src/vs/workbench/services/textfile/electron-browser/textFileService.ts b/src/vs/workbench/services/textfile/electron-browser/textFileService.ts index fc2e790bfb1..96422df8b9a 100644 --- a/src/vs/workbench/services/textfile/electron-browser/textFileService.ts +++ b/src/vs/workbench/services/textfile/electron-browser/textFileService.ts @@ -29,6 +29,7 @@ import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { mnemonicButtonLabel } from 'vs/base/common/labels'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; export class TextFileService extends AbstractTextFileService { @@ -47,9 +48,10 @@ export class TextFileService extends AbstractTextFileService { @IMessageService messageService: IMessageService, @IBackupFileService backupFileService: IBackupFileService, @IWindowsService windowsService: IWindowsService, - @IHistoryService historyService: IHistoryService + @IHistoryService historyService: IHistoryService, + @IContextKeyService contextKeyService: IContextKeyService ) { - super(lifecycleService, contextService, configurationService, fileService, untitledEditorService, instantiationService, messageService, environmentService, backupFileService, windowsService, historyService); + super(lifecycleService, contextService, configurationService, fileService, untitledEditorService, instantiationService, messageService, environmentService, backupFileService, windowsService, historyService, contextKeyService); } public resolveTextContent(resource: URI, options?: IResolveContentOptions): TPromise { diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 6898a77e746..826fe9cc0af 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -59,6 +59,7 @@ import { ITextResourceConfigurationService } from 'vs/editor/common/services/res import { IPosition, Position as EditorPosition } from 'vs/editor/common/core/position'; import { ICommandAction } from 'vs/platform/actions/common/actions'; import { IHashService } from 'vs/workbench/services/hash/common/hashService'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; export function createFileInput(instantiationService: IInstantiationService, resource: URI): FileEditorInput { return instantiationService.createInstance(FileEditorInput, resource, void 0); @@ -175,9 +176,10 @@ export class TestTextFileService extends TextFileService { @IMessageService messageService: IMessageService, @IBackupFileService backupFileService: IBackupFileService, @IWindowsService windowsService: IWindowsService, - @IHistoryService historyService: IHistoryService + @IHistoryService historyService: IHistoryService, + @IContextKeyService contextKeyService: IContextKeyService ) { - super(lifecycleService, contextService, configurationService, fileService, untitledEditorService, instantiationService, messageService, TestEnvironmentService, backupFileService, windowsService, historyService); + super(lifecycleService, contextService, configurationService, fileService, untitledEditorService, instantiationService, messageService, TestEnvironmentService, backupFileService, windowsService, historyService, contextKeyService); } public setPromptPath(path: string): void { From 4e3205ff36e09eeeb0ef9968679e8f4b1d6f1ba7 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 19 Dec 2017 10:42:15 +0100 Subject: [PATCH 413/615] Revert "Delay the start-up of the shared process (saves ~40-90ms on startup)" This reverts commit b71255501de5b4c8a890abf7f6579ac1394c5d8e. --- src/vs/code/electron-main/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 838871abff1..b72b6847723 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -264,7 +264,7 @@ export class CodeApplication { // Spawn shared process this.sharedProcess = new SharedProcess(this.environmentService, machineId, this.userEnv); this.toDispose.push(this.sharedProcess); - this.sharedProcessClient = TPromise.timeout(5000).then(() => this.sharedProcess.whenReady()).then(() => connect(this.environmentService.sharedIPCHandle, 'main')); + this.sharedProcessClient = this.sharedProcess.whenReady().then(() => connect(this.environmentService.sharedIPCHandle, 'main')); // Services const appInstantiationService = this.initServices(machineId); From 8c000ab5c3f877245523662858263ad9a4f294f3 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 19 Dec 2017 11:06:04 +0100 Subject: [PATCH 414/615] editorWithResourceFocusedContext --- .../execution.contribution.ts | 6 +++--- .../files/electron-browser/fileCommands.ts | 21 ++++++++++--------- .../electron-browser/views/openEditorsView.ts | 6 +++++- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts b/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts index cde4b6198ef..62a4e460544 100644 --- a/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts +++ b/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts @@ -29,7 +29,7 @@ import { DEFAULT_TERMINAL_WINDOWS, DEFAULT_TERMINAL_LINUX_READY, DEFAULT_TERMINA import { WinTerminalService, MacTerminalService, LinuxTerminalService } from 'vs/workbench/parts/execution/electron-browser/terminalService'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands'; -import { EditorFocusedInOpenEditorsContext } from 'vs/workbench/parts/files/electron-browser/fileCommands'; +import { EditorWithResourceFocusedInOpenEditorsContext } from 'vs/workbench/parts/files/electron-browser/fileCommands'; if (env.isWindows) { registerSingleton(ITerminalService, WinTerminalService); @@ -244,7 +244,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { title: env.isWindows ? nls.localize('scopedConsoleActionWin', "Open in Command Prompt") : nls.localize('scopedConsoleActionMacLinux', "Open in Terminal") }, - when: EditorFocusedInOpenEditorsContext + when: EditorWithResourceFocusedInOpenEditorsContext }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -254,5 +254,5 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { id: OPEN_INTEGRATED_TERMINAL_COMMAND_ID, title: nls.localize('openFolderInIntegratedTerminal', "Open in Terminal") }, - when: EditorFocusedInOpenEditorsContext + when: EditorWithResourceFocusedInOpenEditorsContext }); diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index 702e8c0a3f7..39bc8ff1e2f 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -70,6 +70,7 @@ export const SAVE_FILES_COMMAND_ID = 'workbench.command.files.saveFiles'; export const SAVE_FILES_LABEL = nls.localize('saveFiles', "Save All Files"); export const EditorFocusedInOpenEditorsContext = new RawContextKey('editorFocusedInOpenEditors', false); +export const EditorWithResourceFocusedInOpenEditorsContext = new RawContextKey('editorWithResourceFocusedInOpenEditors', false); export const UntitledEditorFocusedInOpenEditorsContext = new RawContextKey('untitledEditorFocusedInOpenEditors', false); export const UntitledEditorNotFocusedInOpenEditorsContext: ContextKeyExpr = UntitledEditorFocusedInOpenEditorsContext.toNegated(); export const GroupFocusedInOpenEditorsContext = new RawContextKey('groupFocusedInOpenEditors', false); @@ -615,7 +616,7 @@ function registerFileCommands(): void { CommandsRegistry.registerCommand({ id: SAVE_FILE_COMMAND_ID, handler: (accessor, args: IEditorContext) => { - return save(args.resource, true, accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); + return save(args.resource, false, accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); } }); @@ -665,7 +666,7 @@ function registerMenuItems(): void { id: OPEN_TO_SIDE_COMMAND_ID, title: nls.localize('openToSide', "Open to the Side") }, - when: EditorFocusedInOpenEditorsContext + when: EditorWithResourceFocusedInOpenEditorsContext }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -675,7 +676,7 @@ function registerMenuItems(): void { id: REVEAL_IN_EXPLORER_COMMAND_ID, title: isWindows ? nls.localize('revealInWindows', "Reveal in Explorer") : isMacintosh ? nls.localize('revealInMac', "Reveal in Finder") : nls.localize('openContainer', "Open Containing Folder") }, - when: EditorFocusedInOpenEditorsContext + when: EditorWithResourceFocusedInOpenEditorsContext }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -685,7 +686,7 @@ function registerMenuItems(): void { id: COPY_PATH_COMMAND_ID, title: nls.localize('copyPath', "Copy Path") }, - when: EditorFocusedInOpenEditorsContext + when: EditorWithResourceFocusedInOpenEditorsContext }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -695,7 +696,7 @@ function registerMenuItems(): void { id: SAVE_FILE_COMMAND_ID, title: SAVE_FILE_LABEL }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext) + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -705,7 +706,7 @@ function registerMenuItems(): void { id: REVERT_FILE_COMMAND_ID, title: nls.localize('revert', "Revert File") }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext, UntitledEditorNotFocusedInOpenEditorsContext) + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext, UntitledEditorNotFocusedInOpenEditorsContext) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -714,7 +715,7 @@ function registerMenuItems(): void { id: SAVE_FILE_AS_COMMAND_ID, title: SAVE_FILE_AS_LABEL }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext) + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -733,7 +734,7 @@ function registerMenuItems(): void { id: COMPARE_WITH_SAVED_COMMAND_ID, title: nls.localize('compareWithSaved', "Compare with Saved") }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, UntitledEditorNotFocusedInOpenEditorsContext) + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, UntitledEditorNotFocusedInOpenEditorsContext) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -743,7 +744,7 @@ function registerMenuItems(): void { id: COMPARE_RESOURCE_COMMAND_ID, title: nls.localize('compareWithChosen', "Compare With Chosen") }, - when: ContextKeyExpr.and(EditorFocusedInOpenEditorsContext, ) + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, ) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -753,7 +754,7 @@ function registerMenuItems(): void { id: SELECT_FOR_COMPARE_COMMAND_ID, title: nls.localize('compareSource', "Select for Compare") }, - when: EditorFocusedInOpenEditorsContext + when: EditorWithResourceFocusedInOpenEditorsContext }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index 46cd749c98a..d55abe537b4 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -40,7 +40,7 @@ import { KeyCode } from 'vs/base/common/keyCodes'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; import { IMenuService, MenuId, IMenu } from 'vs/platform/actions/common/actions'; -import { EditorFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext, GroupFocusedInOpenEditorsContext } from 'vs/workbench/parts/files/electron-browser/fileCommands'; +import { EditorFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext, GroupFocusedInOpenEditorsContext, EditorWithResourceFocusedInOpenEditorsContext } from 'vs/workbench/parts/files/electron-browser/fileCommands'; const $ = dom.$; @@ -59,6 +59,7 @@ export class OpenEditorsView extends ViewsViewletPanel { private contributedContextMenu: IMenu; private needsRefresh: boolean; private editorFocusedContext: IContextKey; + private editorWithResourceFocusedContext: IContextKey; private untitledEditorFocusedContext: IContextKey; private groupFocusedContext: IContextKey; @@ -153,17 +154,20 @@ export class OpenEditorsView extends ViewsViewletPanel { OpenEditorsFocusedContext.bindTo(this.list.contextKeyService); ExplorerFocusedContext.bindTo(this.list.contextKeyService); this.editorFocusedContext = EditorFocusedInOpenEditorsContext.bindTo(this.contextKeyService); + this.editorWithResourceFocusedContext = EditorWithResourceFocusedInOpenEditorsContext.bindTo(this.contextKeyService); this.untitledEditorFocusedContext = UntitledEditorFocusedInOpenEditorsContext.bindTo(this.contextKeyService); this.groupFocusedContext = GroupFocusedInOpenEditorsContext.bindTo(this.contextKeyService); this.disposables.push(this.list.onContextMenu(e => this.onListContextMenu(e))); this.list.onFocusChange(e => { this.editorFocusedContext.reset(); + this.editorWithResourceFocusedContext.reset(); this.groupFocusedContext.reset(); this.untitledEditorFocusedContext.reset(); const element = e.elements.length ? e.elements[0] : undefined; if (element instanceof OpenEditor) { this.editorFocusedContext.set(true); + this.editorWithResourceFocusedContext.set(!!element.getResource()); this.untitledEditorFocusedContext.set(element.isUntitled()); } else if (!!element) { this.groupFocusedContext.set(true); From b0f8cbb5f7946c5154424902c51ffc0b077aa175 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 19 Dec 2017 12:03:40 +0100 Subject: [PATCH 415/615] Fixes #40050: Better sizing for the underline cursor style --- .../viewParts/viewCursors/viewCursor.ts | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts index 34582c5ddf7..0ea17e25233 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts @@ -23,17 +23,13 @@ export interface IViewCursorRenderData { } class ViewCursorRenderData { - public readonly top: number; - public readonly left: number; - public readonly width: number; - public readonly textContent: string; - - constructor(top: number, left: number, width: number, textContent: string) { - this.top = top; - this.left = left; - this.width = width; - this.textContent = textContent; - } + constructor( + public readonly top: number, + public readonly left: number, + public readonly width: number, + public readonly height: number, + public readonly textContent: string + ) { } } export class ViewCursor { @@ -136,7 +132,7 @@ export class ViewCursor { width = dom.computeScreenAwareSize(1); } const top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta; - return new ViewCursorRenderData(top, visibleRange.left, width, ''); + return new ViewCursorRenderData(top, visibleRange.left, width, this._lineHeight, ''); } const visibleRangeForCharacter = ctx.linesVisibleRangesForRange(new Range(this._position.lineNumber, this._position.column, this._position.lineNumber, this._position.column + 1), false); @@ -155,8 +151,16 @@ export class ViewCursor { textContent = lineContent.charAt(this._position.column - 1); } - const top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta; - return new ViewCursorRenderData(top, range.left, width, textContent); + let top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta; + let height = this._lineHeight; + + // Underline might interfere with clicking + if (this._cursorStyle === TextEditorCursorStyle.Underline || this._cursorStyle === TextEditorCursorStyle.UnderlineThin) { + top += this._lineHeight - 2; + height = 2; + } + + return new ViewCursorRenderData(top, range.left, width, height, textContent); } public prepareRender(ctx: RenderingContext): void { @@ -178,14 +182,14 @@ export class ViewCursor { this._domNode.setTop(this._renderData.top); this._domNode.setLeft(this._renderData.left); this._domNode.setWidth(this._renderData.width); - this._domNode.setLineHeight(this._lineHeight); - this._domNode.setHeight(this._lineHeight); + this._domNode.setLineHeight(this._renderData.height); + this._domNode.setHeight(this._renderData.height); return { domNode: this._domNode.domNode, position: this._position, contentLeft: this._renderData.left, - height: this._lineHeight, + height: this._renderData.height, width: 2 }; } From 1c601c75adf935c5fc76bf526e4b416cc843ed91 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 19 Dec 2017 12:15:48 +0100 Subject: [PATCH 416/615] "editor.links": true => File not found error with absolute href paths. Fixes #40445 --- extensions/html/server/src/htmlServerMain.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/html/server/src/htmlServerMain.ts b/extensions/html/server/src/htmlServerMain.ts index e0077b6bfd7..3cb1fc97d2b 100644 --- a/extensions/html/server/src/htmlServerMain.ts +++ b/extensions/html/server/src/htmlServerMain.ts @@ -329,7 +329,7 @@ connection.onDocumentLinks(documentLinkParam => { return links; }); -function getRootFolder(docUri: string): string | undefined | null { +function getRootFolder(docUri: string): string | undefined { if (workspaceFolders) { for (let folder of workspaceFolders) { let folderURI = folder.uri; @@ -337,7 +337,7 @@ function getRootFolder(docUri: string): string | undefined | null { folderURI = folderURI + '/'; } if (startsWith(docUri, folderURI)) { - return folderURI; + return uri.parse(folderURI).fsPath; } } return void 0; From 065719328e0d0896d3a0bffc00f815a64fc73b3f Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 19 Dec 2017 12:37:24 +0100 Subject: [PATCH 417/615] commands: fix labels and fix open terminal action --- .../browser/parts/editor/editorActions.ts | 10 ++-- .../browser/parts/editor/editorCommands.ts | 8 --- .../execution.contribution.ts | 49 +++++++------------ .../files/electron-browser/fileCommands.ts | 10 ++-- 4 files changed, 27 insertions(+), 50 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 49f23bfb2b4..97c2d9a94f8 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -22,7 +22,7 @@ import { IEditorGroupService, GroupArrangement } from 'vs/workbench/services/gro import { ICommandService } from 'vs/platform/commands/common/commands'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_LABEL, CLOSE_UNMODIFIED_EDITORS_LABEL, CLOSE_EDITOR_LABEL, CLOSE_OTHER_EDITORS_IN_GROUP_LABEL } from 'vs/workbench/browser/parts/editor/editorCommands'; +import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; export class SplitEditorAction extends Action { @@ -527,7 +527,7 @@ export function toEditorQuickOpenEntry(element: any): IEditorQuickOpenEntry { export class CloseEditorAction extends Action { public static readonly ID = 'workbench.action.closeActiveEditor'; - public static readonly LABEL = CLOSE_EDITOR_LABEL; + public static readonly LABEL = nls.localize('closeEditor', "Close Editor"); constructor( id: string, @@ -671,7 +671,7 @@ export class CloseAllEditorsAction extends Action { export class CloseUnmodifiedEditorsInGroupAction extends Action { public static readonly ID = 'workbench.action.closeUnmodifiedEditors'; - public static readonly LABEL = CLOSE_UNMODIFIED_EDITORS_LABEL; + public static readonly LABEL = nls.localize('closeUnmodifiedEditors', "Close Unmodified Editors in Group"); constructor( id: string, @@ -720,7 +720,7 @@ export class CloseEditorsInOtherGroupsAction extends Action { export class CloseOtherEditorsInGroupAction extends Action { public static readonly ID = 'workbench.action.closeOtherEditors'; - public static readonly LABEL = CLOSE_OTHER_EDITORS_IN_GROUP_LABEL; + public static readonly LABEL = nls.localize('closeOtherEditorsInGroup', "Close Other Editors"); constructor( id: string, @@ -738,7 +738,7 @@ export class CloseOtherEditorsInGroupAction extends Action { export class CloseEditorsInGroupAction extends Action { public static readonly ID = 'workbench.action.closeEditorsInGroup'; - public static readonly LABEL = CLOSE_EDITORS_IN_GROUP_LABEL; + public static readonly LABEL = nls.localize('closeEditorsInGroup', "Close All Editors in Group"); constructor( id: string, diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index 40b53cdeb32..082ca3bd3fc 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -21,17 +21,9 @@ import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { TPromise } from 'vs/base/common/winjs.base'; export const CLOSE_UNMODIFIED_EDITORS_COMMAND_ID = 'workbench.command.closeUnmodifiedEditors'; -export const CLOSE_UNMODIFIED_EDITORS_LABEL = nls.localize('closeUnmodifiedEditors', "Close Unmodified Editors in Group"); - export const CLOSE_EDITORS_IN_GROUP_COMMAND_ID = 'workbench.command.closeEditorsInGroup'; -export const CLOSE_EDITORS_IN_GROUP_LABEL = nls.localize('closeEditorsInGroup', "Close All Editors in Group"); - export const CLOSE_EDITOR_COMMAND_ID = 'workbench.command.closeActiveEditor'; -export const CLOSE_EDITOR_LABEL = nls.localize('closeEditor', "Close Editor"); - export const CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID = 'workbench.command.closeOtherEditors'; -export const CLOSE_OTHER_EDITORS_IN_GROUP_LABEL = nls.localize('closeOtherEditorsInGroup', "Close Other Editors"); - export function setup(): void { registerActiveEditorMoveCommand(); diff --git a/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts b/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts index 62a4e460544..a2d061f99ca 100644 --- a/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts +++ b/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts @@ -30,6 +30,7 @@ import { WinTerminalService, MacTerminalService, LinuxTerminalService } from 'vs import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands'; import { EditorWithResourceFocusedInOpenEditorsContext } from 'vs/workbench/parts/files/electron-browser/fileCommands'; +import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; if (env.isWindows) { registerSingleton(ITerminalService, WinTerminalService); @@ -129,7 +130,7 @@ class OpenIntegratedTerminalAction extends Action { } public run(event?: any): TPromise { - return this.commandService.executeCommand(OPEN_INTEGRATED_TERMINAL_COMMAND_ID, this.resource); + return this.commandService.executeCommand(OPEN_CONSOLE_COMMAND_ID, this.resource); } } @@ -188,7 +189,6 @@ Registry.as(ActionExtensions.WorkbenchActions).registe env.isWindows ? 'Open New Command Prompt' : 'Open New Terminal' ); -const OPEN_INTEGRATED_TERMINAL_COMMAND_ID = 'workbench.command.terminal.openFolderInIntegratedTerminal'; const OPEN_CONSOLE_COMMAND_ID = 'workbench.command.terminal.openNativeConsole'; function getPathToOpen(resource: uri, historyService: IHistoryService, editorService: IWorkbenchEditorService): string { @@ -209,28 +209,23 @@ function getPathToOpen(resource: uri, historyService: IHistoryService, editorSer return pathToOpen; } -CommandsRegistry.registerCommand({ - id: OPEN_INTEGRATED_TERMINAL_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - const integratedTerminalService = accessor.get(IIntegratedTerminalService); - let pathToOpen = getPathToOpen(args.resource, accessor.get(IHistoryService), accessor.get(IWorkbenchEditorService)); - - const instance = integratedTerminalService.createInstance({ cwd: pathToOpen }, true); - if (instance) { - integratedTerminalService.setActiveInstance(instance); - integratedTerminalService.showPanel(true); - } - - return TPromise.as(null); - } -}); - CommandsRegistry.registerCommand({ id: OPEN_CONSOLE_COMMAND_ID, handler: (accessor, args: IEditorContext) => { - const terminalService = accessor.get(ITerminalService); - let pathToOpen = getPathToOpen(args.resource, accessor.get(IHistoryService), accessor.get(IWorkbenchEditorService)); - terminalService.openTerminal(pathToOpen); + const configurationService = accessor.get(IConfigurationService); + const pathToOpen = getPathToOpen(args.resource, accessor.get(IHistoryService), accessor.get(IWorkbenchEditorService)); + if (configurationService.getValue().terminal.explorerKind === 'integrated') { + const integratedTerminalService = accessor.get(IIntegratedTerminalService); + + const instance = integratedTerminalService.createInstance({ cwd: pathToOpen }, true); + if (instance) { + integratedTerminalService.setActiveInstance(instance); + integratedTerminalService.showPanel(true); + } + } else { + const terminalService = accessor.get(ITerminalService); + terminalService.openTerminal(pathToOpen); + } return TPromise.as(null); } @@ -244,15 +239,5 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { title: env.isWindows ? nls.localize('scopedConsoleActionWin', "Open in Command Prompt") : nls.localize('scopedConsoleActionMacLinux', "Open in Terminal") }, - when: EditorWithResourceFocusedInOpenEditorsContext -}); - -MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '1_files', - order: 30, - command: { - id: OPEN_INTEGRATED_TERMINAL_COMMAND_ID, - title: nls.localize('openFolderInIntegratedTerminal', "Open in Terminal") - }, - when: EditorWithResourceFocusedInOpenEditorsContext + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext) }); diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index 39bc8ff1e2f..b26c2f958cb 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -41,7 +41,7 @@ import { IFileService } from 'vs/platform/files/common/files'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEditorViewState } from 'vs/editor/common/editorCommon'; import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; -import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_UNMODIFIED_EDITORS_LABEL, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_LABEL, CLOSE_EDITOR_COMMAND_ID, CLOSE_EDITOR_LABEL, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_LABEL } from 'vs/workbench/browser/parts/editor/editorCommands'; +import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; // Commands @@ -762,7 +762,7 @@ function registerMenuItems(): void { order: 10, command: { id: CLOSE_EDITOR_COMMAND_ID, - title: CLOSE_EDITOR_LABEL + title: nls.localize('close', "Close") }, when: EditorFocusedInOpenEditorsContext }); @@ -772,7 +772,7 @@ function registerMenuItems(): void { order: 20, command: { id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, - title: CLOSE_OTHER_EDITORS_IN_GROUP_LABEL + title: nls.localize('closeOthers', "Close Others") }, when: EditorFocusedInOpenEditorsContext }); @@ -782,7 +782,7 @@ function registerMenuItems(): void { order: 30, command: { id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, - title: CLOSE_UNMODIFIED_EDITORS_LABEL + title: nls.localize('closeUnmodified', "Close Unmodified") } }); @@ -791,7 +791,7 @@ function registerMenuItems(): void { order: 40, command: { id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, - title: CLOSE_EDITORS_IN_GROUP_LABEL + title: nls.localize('closeAll', "Close All") } }); } From b6dc5d387a8cc67bd5c7c19109ae9b6f97150af3 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Dec 2017 15:50:37 +0300 Subject: [PATCH 418/615] Better schema construct --- .../themes/electron-browser/workbenchThemeService.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index d350082dcc2..f0b5bb78a67 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -155,15 +155,17 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { const colorThemeSettingSchemaEnumDescriptions = []; const themeSpecificEditorColorProperties = {}; const themeSpecificWorkbenchColorProperties = {}; - const copyColorCustomizationsSchema = JSON.parse(JSON.stringify(colorCustomizationsSchema)); - const copyColorConfigurationProperties = JSON.parse(JSON.stringify(customEditorColorSetting)); + const copyColorCustomizationsSchema = { ...colorCustomizationsSchema }; + copyColorCustomizationsSchema.properties = colorThemeSchema.colorsSchema.properties; + const copyCustomEditorColorSchema = { ...customEditorColorSetting }; + copyCustomEditorColorSchema.properties = customEditorColorConfigurationProperties; themes.forEach(t => { colorThemeSettingSchemaEnum.push(t.settingsId); colorThemeSettingSchemaEnumDescriptions.push(themeData.description || ''); const themeId = `[${t.settingsId}]`; themeSpecificWorkbenchColorProperties[themeId] = copyColorCustomizationsSchema; - themeSpecificEditorColorProperties[themeId] = copyColorConfigurationProperties; + themeSpecificEditorColorProperties[themeId] = copyCustomEditorColorSchema; }); colorThemeSettingSchema.enum = colorThemeSettingSchemaEnum; @@ -510,7 +512,7 @@ const iconThemeSettingSchema: IConfigurationPropertySchema = { const colorCustomizationsSchema: IConfigurationPropertySchema = { type: 'object', description: nls.localize('workbenchColors', "Overrides colors from the currently selected color theme."), - properties: colorThemeSchema.colorsSchema.properties, + properties: {}, additionalProperties: false, default: {}, defaultSnippets: [{ @@ -562,7 +564,7 @@ const customEditorColorSetting = { description: nls.localize('editorColors', "Overrides editor colors and font style from the currently selected color theme."), default: {}, additionalProperties: false, - properties: customEditorColorConfigurationProperties + properties: {} }; const customEditorColorConfiguration: IConfigurationNode = { id: 'editor', From 208ef5a6278a68d364d0115671b58251de44c3a4 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Dec 2017 15:52:40 +0300 Subject: [PATCH 419/615] Rename and add type to schema --- .../themes/electron-browser/workbenchThemeService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index f0b5bb78a67..fb9e01d2c9a 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -157,7 +157,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { const themeSpecificWorkbenchColorProperties = {}; const copyColorCustomizationsSchema = { ...colorCustomizationsSchema }; copyColorCustomizationsSchema.properties = colorThemeSchema.colorsSchema.properties; - const copyCustomEditorColorSchema = { ...customEditorColorSetting }; + const copyCustomEditorColorSchema = { ...customEditorColorSchema }; copyCustomEditorColorSchema.properties = customEditorColorConfigurationProperties; themes.forEach(t => { @@ -174,7 +174,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { ...colorThemeSchema.colorsSchema.properties, ...themeSpecificWorkbenchColorProperties }; - customEditorColorSetting.properties = { + customEditorColorSchema.properties = { ...customEditorColorConfigurationProperties, ...themeSpecificEditorColorProperties }; @@ -560,7 +560,7 @@ const customEditorColorConfigurationProperties = { variables: tokenGroupSettings(nls.localize('editorColors.variables', "Sets the colors and styles for variables declarations and references.")), [CUSTOM_EDITOR_SCOPE_COLORS_SETTING]: colorThemeSchema.tokenColorsSchema(nls.localize('editorColors.textMateRules', 'Sets colors and styles using textmate theming rules (advanced).')) }; -const customEditorColorSetting = { +const customEditorColorSchema: IConfigurationPropertySchema = { description: nls.localize('editorColors', "Overrides editor colors and font style from the currently selected color theme."), default: {}, additionalProperties: false, @@ -571,7 +571,7 @@ const customEditorColorConfiguration: IConfigurationNode = { order: 7.2, type: 'object', properties: { - [CUSTOM_EDITOR_COLORS_SETTING]: customEditorColorSetting + [CUSTOM_EDITOR_COLORS_SETTING]: customEditorColorSchema } }; configurationRegistry.registerConfiguration(customEditorColorConfiguration); From aea44492eb992195df31ca2d117ec9d9ac2aac5a Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Dec 2017 15:55:37 +0300 Subject: [PATCH 420/615] Move constant out of loop --- .../services/themes/electron-browser/workbenchThemeService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index fb9e01d2c9a..95bde0df0ce 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -153,6 +153,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { this.colorThemeStore.onDidChange(themes => { const colorThemeSettingSchemaEnum = []; const colorThemeSettingSchemaEnumDescriptions = []; + const enumDescription = themeData.description || ''; const themeSpecificEditorColorProperties = {}; const themeSpecificWorkbenchColorProperties = {}; const copyColorCustomizationsSchema = { ...colorCustomizationsSchema }; @@ -162,7 +163,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { themes.forEach(t => { colorThemeSettingSchemaEnum.push(t.settingsId); - colorThemeSettingSchemaEnumDescriptions.push(themeData.description || ''); + colorThemeSettingSchemaEnumDescriptions.push(enumDescription); const themeId = `[${t.settingsId}]`; themeSpecificWorkbenchColorProperties[themeId] = copyColorCustomizationsSchema; themeSpecificEditorColorProperties[themeId] = copyCustomEditorColorSchema; From 0033dc93b5c9d9bcbed53a5b26cbcc4a5120ac70 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 19 Dec 2017 13:59:55 +0100 Subject: [PATCH 421/615] Fixes #40481: Cannot read property 'result' of null --- .../services/extensions/electron-browser/extensionService.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index 907246798fe..c01e5b32c77 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -486,6 +486,10 @@ export class ExtensionService extends Disposable implements IExtensionService { const expected = await ExtensionScanner.scanExtensions(input, new NullLogger()); const cacheContents = await this._readExtensionCache(environmentService, cacheKey); + if (!cacheContents) { + // Cache has been deleted by someone else, which is perfectly fine... + return; + } const actual = cacheContents.result; if (objects.equals(expected, actual)) { From 60d8abec4fe5a1e74900af0a9217a189b01cfb2c Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 19 Dec 2017 14:39:47 +0100 Subject: [PATCH 422/615] close commands: also register keybindings --- .../parts/editor/editor.contribution.ts | 8 ++--- .../browser/parts/editor/editorCommands.ts | 34 +++++++++++++------ .../electron-browser/main.contribution.ts | 4 +-- 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index 0f78423efdc..12e0b74e2c2 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -342,9 +342,9 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(KeepEditorAction, Keep registry.registerWorkbenchAction(new SyncActionDescriptor(CloseAllEditorsAction, CloseAllEditorsAction.ID, CloseAllEditorsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_W) }), 'View: Close All Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseLeftEditorsInGroupAction, CloseLeftEditorsInGroupAction.ID, CloseLeftEditorsInGroupAction.LABEL), 'View: Close Editors to the Left', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseRightEditorsInGroupAction, CloseRightEditorsInGroupAction.ID, CloseRightEditorsInGroupAction.LABEL), 'View: Close Editors to the Right', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, CloseUnmodifiedEditorsInGroupAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_U) }), 'View: Close Unmodified Editors in Group', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, CloseEditorsInGroupAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_W) }), 'View: Close All Editors in Group', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, CloseOtherEditorsInGroupAction.LABEL, { primary: null, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_T } }), 'View: Close Other Editors', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, CloseUnmodifiedEditorsInGroupAction.LABEL), 'View: Close Unmodified Editors in Group', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, CloseEditorsInGroupAction.LABEL), 'View: Close All Editors in Group', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, CloseOtherEditorsInGroupAction.LABEL), 'View: Close Other Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorsInOtherGroupsAction, CloseEditorsInOtherGroupsAction.ID, CloseEditorsInOtherGroupsAction.LABEL), 'View: Close Editors in Other Groups', category); registry.registerWorkbenchAction(new SyncActionDescriptor(SplitEditorAction, SplitEditorAction.ID, SplitEditorAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.US_BACKSLASH }), 'View: Split Editor', category); registry.registerWorkbenchAction(new SyncActionDescriptor(JoinTwoGroupsAction, JoinTwoGroupsAction.ID, JoinTwoGroupsAction.LABEL), 'View: Join Editors of Two Groups', category); @@ -413,4 +413,4 @@ if (isMacintosh) { command: { id: NavigateForwardAction.ID, title: NavigateForwardAction.LABEL, iconPath: URI.parse(require.toUrl('vs/workbench/browser/parts/editor/media/forward-tb.png')).fsPath }, group: 'navigation' }); -} \ No newline at end of file +} diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index 082ca3bd3fc..c47415800c3 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -14,16 +14,16 @@ import { IEditor, Position, POSITIONS } from 'vs/platform/editor/common/editor'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { TextDiffEditor } from 'vs/workbench/browser/parts/editor/textDiffEditor'; import { EditorStacksModel } from 'vs/workbench/common/editor/editorStacksModel'; -import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { ICommandService } from 'vs/platform/commands/common/commands'; import { IMessageService, Severity, CloseAction } from 'vs/platform/message/common/message'; import { Action } from 'vs/base/common/actions'; -import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; +import { KeyMod, KeyCode, KeyChord } from 'vs/base/common/keyCodes'; import { TPromise } from 'vs/base/common/winjs.base'; -export const CLOSE_UNMODIFIED_EDITORS_COMMAND_ID = 'workbench.command.closeUnmodifiedEditors'; -export const CLOSE_EDITORS_IN_GROUP_COMMAND_ID = 'workbench.command.closeEditorsInGroup'; -export const CLOSE_EDITOR_COMMAND_ID = 'workbench.command.closeActiveEditor'; -export const CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID = 'workbench.command.closeOtherEditors'; +export const CLOSE_UNMODIFIED_EDITORS_COMMAND_ID = 'workbench.action.closeUnmodifiedEditors'; +export const CLOSE_EDITORS_IN_GROUP_COMMAND_ID = 'workbench.action.closeEditorsInGroup'; +export const CLOSE_EDITOR_COMMAND_ID = 'workbench.action.closeActiveEditor'; +export const CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID = 'workbench.action.closeOtherEditors'; export function setup(): void { registerActiveEditorMoveCommand(); @@ -279,8 +279,11 @@ function registerOpenEditorAtIndexCommands(): void { function registerEditorCommands() { - CommandsRegistry.registerCommand({ + KeybindingsRegistry.registerCommandAndKeybindingRule({ id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_U), handler: (accessor, args: IEditorContext) => { const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); @@ -303,8 +306,11 @@ function registerEditorCommands() { } }); - CommandsRegistry.registerCommand({ + KeybindingsRegistry.registerCommandAndKeybindingRule({ id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_W), handler: (accessor, args: IEditorContext) => { const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); @@ -325,8 +331,12 @@ function registerEditorCommands() { } }); - CommandsRegistry.registerCommand({ + KeybindingsRegistry.registerCommandAndKeybindingRule({ id: CLOSE_EDITOR_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: KeyMod.CtrlCmd | KeyCode.KEY_W, + win: { primary: KeyMod.CtrlCmd | KeyCode.F4, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_W] }, handler: (accessor, args: IEditorContext) => { const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); @@ -359,8 +369,12 @@ function registerEditorCommands() { } }); - CommandsRegistry.registerCommand({ + KeybindingsRegistry.registerCommandAndKeybindingRule({ id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: undefined, + mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_T }, handler: (accessor, args: IEditorContext) => { const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index 24565c1ea2d..c59bbe0982b 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -85,7 +85,7 @@ workbenchActionsRegistry.registerWorkbenchAction( }), 'View: Reset Zoom', viewCategory ); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(CloseMessagesAction, CloseMessagesAction.ID, CloseMessagesAction.LABEL, { primary: KeyCode.Escape, secondary: [KeyMod.Shift | KeyCode.Escape] }, MessagesVisibleContext), 'Close Notification Messages'); -workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorAction, CloseEditorAction.ID, CloseEditorAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_W, win: { primary: KeyMod.CtrlCmd | KeyCode.F4, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_W] } }), 'View: Close Editor', viewCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorAction, CloseEditorAction.ID, CloseEditorAction.LABEL), 'View: Close Editor', viewCategory); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleFullScreenAction, ToggleFullScreenAction.ID, ToggleFullScreenAction.LABEL, { primary: KeyCode.F11, mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_F } }), 'View: Toggle Full Screen', viewCategory); if (isWindows || isLinux) { workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleMenuBarAction, ToggleMenuBarAction.ID, ToggleMenuBarAction.LABEL), 'View: Toggle Menu Bar', viewCategory); @@ -460,4 +460,4 @@ const schema: IJSONSchema = }; const jsonRegistry = Registry.as(JSONExtensions.JSONContribution); -jsonRegistry.registerSchema(schemaId, schema); \ No newline at end of file +jsonRegistry.registerSchema(schemaId, schema); From 4fb7761db746d61e43dee1fb512b2aaf1af3dda2 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 19 Dec 2017 15:07:19 +0100 Subject: [PATCH 423/615] commands: use proper ids for file commands. Tie shortcut with the command registration --- .../fileActions.contribution.ts | 39 +---- .../files/electron-browser/fileCommands.ts | 136 ++++-------------- 2 files changed, 33 insertions(+), 142 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts index e42188b86bb..28d8f243f3c 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts @@ -18,11 +18,11 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { FileStat, Model } from 'vs/workbench/parts/files/common/explorerModel'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { AddRootFolderAction, RemoveRootFolderAction, OpenFolderSettingsAction } from 'vs/workbench/browser/actions/workspaceActions'; -import { copyFocusedFilesExplorerViewItem, revealInOSFocusedFilesExplorerItem, openFocusedExplorerItemSideBySideCommand, copyPathOfFocusedExplorerItem, openWindowCommand, deleteFocusedFilesExplorerViewItemCommand, moveFocusedFilesExplorerViewItemToTrashCommand, renameFocusedFilesExplorerViewItemCommand, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID } from 'vs/workbench/parts/files/electron-browser/fileCommands'; +import { copyFocusedFilesExplorerViewItem, openWindowCommand, deleteFocusedFilesExplorerViewItemCommand, moveFocusedFilesExplorerViewItemToTrashCommand, renameFocusedFilesExplorerViewItemCommand, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID } from 'vs/workbench/parts/files/electron-browser/fileCommands'; import { CommandsRegistry, ICommandHandler } from 'vs/platform/commands/common/commands'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import { explorerItemToFileResource, ExplorerFocusCondition, FilesExplorerFocusCondition } from 'vs/workbench/parts/files/common/files'; +import { explorerItemToFileResource, FilesExplorerFocusCondition } from 'vs/workbench/parts/files/common/files'; class FilesViewerActionContributor extends ActionBarContributor { @@ -213,17 +213,6 @@ CommandsRegistry.registerCommand('_files.windowOpen', openWindowCommand); const explorerCommandsWeightBonus = 10; // give our commands a little bit more weight over other default list/tree commands -KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: 'explorer.openToSide', - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(explorerCommandsWeightBonus), - when: ExplorerFocusCondition, - primary: KeyMod.CtrlCmd | KeyCode.Enter, - mac: { - primary: KeyMod.WinCtrl | KeyCode.Enter - }, - handler: openFocusedExplorerItemSideBySideCommand -}); - KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'renameFile', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(explorerCommandsWeightBonus), @@ -273,28 +262,6 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ handler: pasteIntoFocusedFilesExplorerViewItem }); -KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: 'copyFilePath', - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(explorerCommandsWeightBonus), - when: ExplorerFocusCondition, - primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_C, - win: { - primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_C - }, - handler: copyPathOfFocusedExplorerItem -}); - -KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: 'revealFileInOS', - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(explorerCommandsWeightBonus), - when: ExplorerFocusCondition, - primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R, - win: { - primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_R - }, - handler: revealInOSFocusedFilesExplorerItem -}); - // Editor Title Context Menu appendEditorTitleContextMenuItem(REVEAL_IN_OS_COMMAND_ID, RevealInOSAction.LABEL); appendEditorTitleContextMenuItem(COPY_PATH_COMMAND_ID, CopyPathAction.LABEL); @@ -326,4 +293,4 @@ function appendSaveConflictEditorTitleAction(id: string, title: string, iconClas group: 'navigation', order }); -} \ No newline at end of file +} diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index b26c2f958cb..39acf267bb6 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -19,8 +19,8 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ExplorerViewlet } from 'vs/workbench/parts/files/electron-browser/explorerViewlet'; -import { VIEWLET_ID, explorerItemToFileResource } from 'vs/workbench/parts/files/common/files'; -import { FileStat, OpenEditor } from 'vs/workbench/parts/files/common/explorerModel'; +import { VIEWLET_ID, ExplorerFocusCondition } from 'vs/workbench/parts/files/common/files'; +import { FileStat } from 'vs/workbench/parts/files/common/explorerModel'; import errors = require('vs/base/common/errors'); import { ITree } from 'vs/base/parts/tree/browser/tree'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; @@ -31,7 +31,7 @@ import { toErrorMessage } from 'vs/base/common/errorMessage'; import { basename } from 'vs/base/common/paths'; import { IListService } from 'vs/platform/list/browser/listService'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; -import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { isWindows, isMacintosh } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -42,18 +42,20 @@ import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/un import { IEditorViewState } from 'vs/editor/common/editorCommon'; import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; +import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; +import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; // Commands -export const REVEAL_IN_OS_COMMAND_ID = 'workbench.command.files.revealInOS'; +export const REVEAL_IN_OS_COMMAND_ID = 'revealFileInOS'; export const REVEAL_IN_EXPLORER_COMMAND_ID = 'workbench.command.files.revealInExplorer'; export const REVERT_FILE_COMMAND_ID = 'workbench.command.files.revert'; -export const OPEN_TO_SIDE_COMMAND_ID = 'workbench.command.openToSide'; +export const OPEN_TO_SIDE_COMMAND_ID = 'explorer.openToSide'; export const SELECT_FOR_COMPARE_COMMAND_ID = 'workbench.files.command.selectForCompare'; export const COMPARE_RESOURCE_COMMAND_ID = 'workbench.files.command.compareFiles'; export const COMPARE_WITH_SAVED_COMMAND_ID = 'workbench.files.command.compareWithSaved'; export const COMPARE_WITH_SAVED_SCHEMA = 'showModifications'; -export const COPY_PATH_COMMAND_ID = 'workbench.command.files.copyPath'; +export const COPY_PATH_COMMAND_ID = 'copyFilePath'; export const SAVE_FILE_AS_COMMAND_ID = 'workbench.command.files.saveAs'; export const SAVE_FILE_AS_LABEL = nls.localize('saveAs', "Save As..."); @@ -83,34 +85,6 @@ export const openWindowCommand = (accessor: ServicesAccessor, paths: string[], f windowsService.openWindow(paths, { forceNewWindow }); }; -function openFocusedFilesExplorerViewItem(accessor: ServicesAccessor, sideBySide: boolean): void { - withFocusedFilesExplorerViewItem(accessor).then(res => { - if (res) { - - // Directory: Toggle expansion - if (res.item.isDirectory) { - res.tree.toggleExpansion(res.item); - } - - // File: Open - else { - const editorService = accessor.get(IWorkbenchEditorService); - editorService.openEditor({ resource: res.item.resource }, sideBySide).done(null, errors.onUnexpectedError); - } - } - }); -} - -function openFocusedOpenedEditorsViewItem(accessor: ServicesAccessor, sideBySide: boolean): void { - withFocusedOpenEditorsViewItem(accessor).then(res => { - if (res) { - const editorService = accessor.get(IWorkbenchEditorService); - - editorService.openEditor(res.item.editorInput, null, sideBySide); - } - }); -} - function runActionOnFocusedFilesExplorerViewItem(accessor: ServicesAccessor, id: string, context?: any): void { withFocusedFilesExplorerViewItem(accessor).then(res => { if (res) { @@ -162,41 +136,6 @@ export function withFocusedFilesExplorer(accessor: ServicesAccessor): TPromise<{ }); } -function withFocusedOpenEditorsViewItem(accessor: ServicesAccessor): TPromise<{ explorer: ExplorerViewlet, item: OpenEditor }> { - return withVisibleExplorer(accessor).then(explorer => { - if (!explorer || !explorer.getOpenEditorsView() || !explorer.getOpenEditorsView().getList()) { - return void 0; // empty folder or hidden explorer - } - - const list = explorer.getOpenEditorsView().getList(); - - // Ignore if in highlight mode or not focused - const focused = list.getFocusedElements(); - const focus = focused.length ? focused[0] : undefined; - if (!list.isDOMFocused() || !(focus instanceof OpenEditor)) { - return void 0; - } - - return { explorer, item: focus }; - }); -} - -function withFocusedExplorerItem(accessor: ServicesAccessor): TPromise { - return withFocusedFilesExplorerViewItem(accessor).then(res => { - if (res) { - return res.item; - } - - return withFocusedOpenEditorsViewItem(accessor).then(res => { - if (res) { - return res.item as FileStat | OpenEditor; - } - - return void 0; - }); - }); -} - export const renameFocusedFilesExplorerViewItemCommand = (accessor: ServicesAccessor) => { runActionOnFocusedFilesExplorerViewItem(accessor, 'renameFile'); }; @@ -213,39 +152,6 @@ export const copyFocusedFilesExplorerViewItem = (accessor: ServicesAccessor) => runActionOnFocusedFilesExplorerViewItem(accessor, 'filesExplorer.copy'); }; -export const copyPathOfFocusedExplorerItem = (accessor: ServicesAccessor) => { - withFocusedExplorerItem(accessor).then(item => { - const file = explorerItemToFileResource(item); - if (!file) { - return TPromise.as(undefined); - } - - const commandService = accessor.get(ICommandService); - return commandService.executeCommand(COPY_PATH_COMMAND_ID, { resource: file.resource }); - }); -}; - -export const openFocusedExplorerItemSideBySideCommand = (accessor: ServicesAccessor) => { - withFocusedExplorerItem(accessor).then(item => { - if (item instanceof FileStat) { - openFocusedFilesExplorerViewItem(accessor, true); - } else { - openFocusedOpenedEditorsViewItem(accessor, true); - } - }); -}; - -export const revealInOSFocusedFilesExplorerItem = (accessor: ServicesAccessor) => { - withFocusedExplorerItem(accessor).then(item => { - const file = explorerItemToFileResource(item); - if (!file) { - return TPromise.as(undefined); - } - - const commandService = accessor.get(ICommandService); - return commandService.executeCommand(REVEAL_IN_OS_COMMAND_ID, { resource: file.resource }); - }); -}; export function computeLabelForCompare(resource: URI, contextService: IWorkspaceContextService, environmentService: IEnvironmentService): string { if (globalResourceToCompare) { @@ -461,7 +367,13 @@ function registerFileCommands(): void { } }); - CommandsRegistry.registerCommand({ + KeybindingsRegistry.registerCommandAndKeybindingRule({ + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: ExplorerFocusCondition, + primary: KeyMod.CtrlCmd | KeyCode.Enter, + mac: { + primary: KeyMod.WinCtrl | KeyCode.Enter + }, id: OPEN_TO_SIDE_COMMAND_ID, handler: (accessor, args) => { const editorService = accessor.get(IWorkbenchEditorService); const listService = accessor.get(IListService); @@ -536,8 +448,14 @@ function registerFileCommands(): void { } }); - CommandsRegistry.registerCommand({ + KeybindingsRegistry.registerCommandAndKeybindingRule({ id: REVEAL_IN_OS_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: ExplorerFocusCondition, + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R, + win: { + primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_R + }, handler: (accessor, args: IEditorContext) => { // Without resource, try to look at the active editor let resource = args.resource; @@ -556,7 +474,13 @@ function registerFileCommands(): void { } }); - CommandsRegistry.registerCommand({ + KeybindingsRegistry.registerCommandAndKeybindingRule({ + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: ExplorerFocusCondition, + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_C, + win: { + primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_C + }, id: COPY_PATH_COMMAND_ID, handler: (accessor, args: IEditorContext) => { let resource = args.resource; @@ -673,7 +597,7 @@ function registerMenuItems(): void { group: '1_files', order: 20, command: { - id: REVEAL_IN_EXPLORER_COMMAND_ID, + id: REVEAL_IN_OS_COMMAND_ID, title: isWindows ? nls.localize('revealInWindows', "Reveal in Explorer") : isMacintosh ? nls.localize('revealInMac', "Reveal in Finder") : nls.localize('openContainer', "Open Containing Folder") }, when: EditorWithResourceFocusedInOpenEditorsContext From 16a0de93b3eba70bdbfb9ed3169c35e2e66d5361 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 19 Dec 2017 15:19:43 +0100 Subject: [PATCH 424/615] commands: register keybinding with the command --- .../fileActions.contribution.ts | 4 ++-- .../files/electron-browser/fileActions.ts | 4 ++-- .../files/electron-browser/fileCommands.ts | 21 ++++++++++++------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts index 28d8f243f3c..1c80fc13498 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts @@ -189,7 +189,7 @@ const category = nls.localize('filesCategory', "File"); const registry = Registry.as(ActionExtensions.WorkbenchActions); registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalCopyPathAction, GlobalCopyPathAction.ID, GlobalCopyPathAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_P) }), 'File: Copy Path of Active File', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_S }), 'File: Save', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(SaveFileAction, SaveFileAction.ID, SaveFileAction.LABEL), 'File: Save', category); registry.registerWorkbenchAction(new SyncActionDescriptor(SaveAllAction, SaveAllAction.ID, SaveAllAction.LABEL, { primary: void 0, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_S }, win: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_S) } }), 'File: Save All', category); registry.registerWorkbenchAction(new SyncActionDescriptor(SaveFilesAction, SaveFilesAction.ID, SaveFilesAction.LABEL), 'File: Save All Files', category); registry.registerWorkbenchAction(new SyncActionDescriptor(RevertFileAction, RevertFileAction.ID, RevertFileAction.LABEL), 'File: Revert File', category); @@ -205,7 +205,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(SaveFileAsAction, Save registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalNewUntitledFileAction, GlobalNewUntitledFileAction.ID, GlobalNewUntitledFileAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_N }), 'File: New Untitled File', category); registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalRevealInOSAction, GlobalRevealInOSAction.ID, GlobalRevealInOSAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_R) }), 'File: Reveal Active File', category); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowOpenedFileInNewWindow, ShowOpenedFileInNewWindow.ID, ShowOpenedFileInNewWindow.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_O) }), 'File: Open Active File in New Window', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(CompareWithSavedAction, CompareWithSavedAction.ID, CompareWithSavedAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_D) }), 'File: Compare Active File with Saved', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(CompareWithSavedAction, CompareWithSavedAction.ID, CompareWithSavedAction.LABEL), 'File: Compare Active File with Saved', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CompareWithClipboardAction, CompareWithClipboardAction.ID, CompareWithClipboardAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_C) }), 'File: Compare Active File with Clipboard', category); // Commands diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index be243c7100e..aa8f619f8b9 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -42,7 +42,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { IModel } from 'vs/editor/common/editorCommon'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { withFocusedFilesExplorer, REVERT_FILE_COMMAND_ID, OPEN_TO_SIDE_COMMAND_ID, COMPARE_WITH_SAVED_SCHEMA, COMPARE_WITH_SAVED_COMMAND_ID, COMPARE_RESOURCE_COMMAND_ID, SELECT_FOR_COMPARE_COMMAND_ID, globalResourceToCompare, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID, computeLabelForCompare, SAVE_FILE_AS_COMMAND_ID, SAVE_FILE_COMMAND_ID, SAVE_FILE_LABEL, SAVE_FILE_AS_LABEL, SAVE_ALL_COMMAND_ID, SAVE_ALL_LABEL, SAVE_ALL_IN_GROUP_LABEL, SAVE_ALL_IN_GROUP_COMMAND_ID, SAVE_FILES_COMMAND_ID, SAVE_FILES_LABEL } from 'vs/workbench/parts/files/electron-browser/fileCommands'; +import { withFocusedFilesExplorer, REVERT_FILE_COMMAND_ID, OPEN_TO_SIDE_COMMAND_ID, COMPARE_WITH_SAVED_SCHEMA, COMPARE_WITH_SAVED_COMMAND_ID, COMPARE_RESOURCE_COMMAND_ID, SELECT_FOR_COMPARE_COMMAND_ID, globalResourceToCompare, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID, computeLabelForCompare, SAVE_FILE_AS_COMMAND_ID, SAVE_FILE_COMMAND_ID, SAVE_FILE_LABEL, SAVE_FILE_AS_LABEL, SAVE_ALL_COMMAND_ID, SAVE_ALL_LABEL, SAVE_ALL_IN_GROUP_COMMAND_ID, SAVE_FILES_COMMAND_ID, SAVE_FILES_LABEL } from 'vs/workbench/parts/files/electron-browser/fileCommands'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; @@ -1381,7 +1381,7 @@ export class SaveAllAction extends BaseSaveAllAction { export class SaveAllInGroupAction extends BaseSaveAllAction { public static readonly ID = 'workbench.files.action.saveAllInGroup'; - public static readonly LABEL = SAVE_ALL_IN_GROUP_LABEL; + public static readonly LABEL = nls.localize('saveAllInGroup', "Save All in Group"); public get class(): string { return 'explorer-action save-all'; diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index 39acf267bb6..fb773897442 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -43,7 +43,7 @@ import { IEditorViewState } from 'vs/editor/common/editorCommon'; import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; +import { KeyMod, KeyCode, KeyChord } from 'vs/base/common/keyCodes'; // Commands @@ -53,20 +53,19 @@ export const REVERT_FILE_COMMAND_ID = 'workbench.command.files.revert'; export const OPEN_TO_SIDE_COMMAND_ID = 'explorer.openToSide'; export const SELECT_FOR_COMPARE_COMMAND_ID = 'workbench.files.command.selectForCompare'; export const COMPARE_RESOURCE_COMMAND_ID = 'workbench.files.command.compareFiles'; -export const COMPARE_WITH_SAVED_COMMAND_ID = 'workbench.files.command.compareWithSaved'; +export const COMPARE_WITH_SAVED_COMMAND_ID = 'workbench.files.action.compareWithSaved'; export const COMPARE_WITH_SAVED_SCHEMA = 'showModifications'; export const COPY_PATH_COMMAND_ID = 'copyFilePath'; export const SAVE_FILE_AS_COMMAND_ID = 'workbench.command.files.saveAs'; export const SAVE_FILE_AS_LABEL = nls.localize('saveAs', "Save As..."); -export const SAVE_FILE_COMMAND_ID = 'workbench.command.files.save'; +export const SAVE_FILE_COMMAND_ID = 'workbench.action.files.save'; export const SAVE_FILE_LABEL = nls.localize('save', "Save"); export const SAVE_ALL_COMMAND_ID = 'workbench.command.files.saveAll'; export const SAVE_ALL_LABEL = nls.localize('saveAll', "Save All"); -export const SAVE_ALL_IN_GROUP_COMMAND_ID = 'workbench.command.files.saveAllInGroup'; -export const SAVE_ALL_IN_GROUP_LABEL = nls.localize('saveAllInGroup', "Save All in Group"); +export const SAVE_ALL_IN_GROUP_COMMAND_ID = 'workbench.action.files.saveAllInGroup'; export const SAVE_FILES_COMMAND_ID = 'workbench.command.files.saveFiles'; export const SAVE_FILES_LABEL = nls.localize('saveFiles', "Save All Files"); @@ -393,8 +392,11 @@ function registerFileCommands(): void { } }); - CommandsRegistry.registerCommand({ + KeybindingsRegistry.registerCommandAndKeybindingRule({ id: COMPARE_WITH_SAVED_COMMAND_ID, + when: undefined, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_D), handler: (accessor, args: IEditorContext) => { const editorService = accessor.get(IWorkbenchEditorService); let resource: URI; @@ -537,7 +539,10 @@ function registerFileCommands(): void { } }); - CommandsRegistry.registerCommand({ + KeybindingsRegistry.registerCommandAndKeybindingRule({ + when: undefined, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + primary: KeyMod.CtrlCmd | KeyCode.KEY_S, id: SAVE_FILE_COMMAND_ID, handler: (accessor, args: IEditorContext) => { return save(args.resource, false, accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); @@ -646,7 +651,7 @@ function registerMenuItems(): void { group: '2_save', command: { id: SAVE_ALL_IN_GROUP_COMMAND_ID, - title: SAVE_ALL_IN_GROUP_LABEL + title: nls.localize('saveAll', "Save All") }, when: ContextKeyExpr.and(GroupFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext) }); From 50bc438326b500995ec7d11ec78a4a44680e89d6 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 19 Dec 2017 17:01:07 +0100 Subject: [PATCH 425/615] explorer: do not use contributable action providers. --- .../files/electron-browser/fileActions.ts | 3 +- .../files/electron-browser/fileCommands.ts | 2 +- .../electron-browser/views/explorerViewer.ts | 106 +----------------- 3 files changed, 7 insertions(+), 104 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index aa8f619f8b9..7755098d36d 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -20,7 +20,7 @@ import severity from 'vs/base/common/severity'; import diagnostics = require('vs/base/common/diagnostics'); import { Action, IAction } from 'vs/base/common/actions'; import { MessageType, IInputValidator } from 'vs/base/browser/ui/inputbox/inputBox'; -import { ITree, IHighlightEvent, IActionProvider } from 'vs/base/parts/tree/browser/tree'; +import { ITree, IHighlightEvent } from 'vs/base/parts/tree/browser/tree'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { VIEWLET_ID, FileOnDiskContentProvider } from 'vs/workbench/parts/files/common/files'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; @@ -58,7 +58,6 @@ export interface IEditableData { } export interface IFileViewletState { - actionProvider: IActionProvider; getEditableData(stat: IFileStat): IEditableData; setEditable(stat: IFileStat, editableData: IEditableData): void; clearEditable(stat: IFileStat): void; diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index fb773897442..5aa29a22ccc 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -671,7 +671,7 @@ function registerMenuItems(): void { order: 20, command: { id: COMPARE_RESOURCE_COMMAND_ID, - title: nls.localize('compareWithChosen', "Compare With Chosen") + title: nls.localize('compareWithChosen', "Compare with Chosen") }, when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, ) }); diff --git a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts index 2d2d2445603..b3d31c2d005 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts @@ -15,7 +15,6 @@ import { once } from 'vs/base/common/functional'; import paths = require('vs/base/common/paths'); import resources = require('vs/base/common/resources'); import errors = require('vs/base/common/errors'); -import { isString } from 'vs/base/common/types'; import { IAction, ActionRunner as BaseActionRunner, IActionRunner } from 'vs/base/common/actions'; import comparers = require('vs/base/common/comparers'); import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; @@ -23,7 +22,6 @@ import { isMacintosh, isLinux } from 'vs/base/common/platform'; import glob = require('vs/base/common/glob'); import { FileLabel, IFileLabelOptions } from 'vs/workbench/browser/labels'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { ContributableActionProvider } from 'vs/workbench/browser/actions'; import { IFilesConfiguration, SortOrder } from 'vs/workbench/parts/files/common/files'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { FileOperationError, FileOperationResult, IFileService, FileKind } from 'vs/platform/files/common/files'; @@ -140,102 +138,13 @@ export class FileDataSource implements IDataSource { } } -export class FileActionProvider extends ContributableActionProvider { - private state: FileViewletState; - - constructor(state: any) { - super(); - - this.state = state; - } - - public hasActions(tree: ITree, stat: FileStat): boolean { - if (stat instanceof NewStatPlaceholder) { - return false; - } - - return super.hasActions(tree, stat); - } - - public getActions(tree: ITree, stat: FileStat): TPromise { - if (stat instanceof NewStatPlaceholder) { - return TPromise.as([]); - } - - return super.getActions(tree, stat); - } - - public hasSecondaryActions(tree: ITree, stat: FileStat | Model): boolean { - if (stat instanceof NewStatPlaceholder) { - return false; - } - - return super.hasSecondaryActions(tree, stat); - } - - public getSecondaryActions(tree: ITree, stat: FileStat | Model): TPromise { - if (stat instanceof NewStatPlaceholder) { - return TPromise.as([]); - } - - return super.getSecondaryActions(tree, stat); - } - - public runAction(tree: ITree, stat: FileStat, action: IAction, context?: any): TPromise; - public runAction(tree: ITree, stat: FileStat, actionID: string, context?: any): TPromise; - public runAction(tree: ITree, stat: FileStat, arg: any, context: any = {}): TPromise { - context = objects.mixin({ - viewletState: this.state, - stat - }, context); - - if (!isString(arg)) { - const action = arg; - if (action.enabled) { - return action.run(context); - } - - return null; - } - - const id = arg; - let promise = this.hasActions(tree, stat) ? this.getActions(tree, stat) : TPromise.as([]); - - return promise.then((actions: IAction[]) => { - for (let i = 0, len = actions.length; i < len; i++) { - if (actions[i].id === id && actions[i].enabled) { - return actions[i].run(context); - } - } - - promise = this.hasSecondaryActions(tree, stat) ? this.getSecondaryActions(tree, stat) : TPromise.as([]); - - return promise.then((actions: IAction[]) => { - for (let i = 0, len = actions.length; i < len; i++) { - if (actions[i].id === id && actions[i].enabled) { - return actions[i].run(context); - } - } - - return null; - }); - }); - } -} - export class FileViewletState implements IFileViewletState { - private _actionProvider: FileActionProvider; private editableStats: ResourceMap; constructor() { - this._actionProvider = new FileActionProvider(this); this.editableStats = new ResourceMap(); } - public get actionProvider(): FileActionProvider { - return this._actionProvider; - } - public getEditableData(stat: FileStat): IEditableData { return this.editableStats.get(stat.resource); } @@ -374,7 +283,8 @@ export class FileRenderer implements IRenderer { tree.clearHighlight(); if (commit && inputBox.value) { - this.state.actionProvider.runAction(tree, stat, editableData.action, { value: inputBox.value }); + // TODO@Isidor check the context + editableData.action.run({ value: inputBox.value }); } const restoreFocus = document.activeElement === inputBox.inputElement; // https://github.com/Microsoft/vscode/issues/20269 @@ -509,20 +419,14 @@ export class FileController extends DefaultController { tree.setFocus(stat); - if (!this.state.actionProvider.hasSecondaryActions(tree, stat)) { - return true; - } - const anchor = { x: event.posx, y: event.posy }; this.contextMenuService.showContextMenu({ getAnchor: () => anchor, getActions: () => { - return this.state.actionProvider.getSecondaryActions(tree, stat).then(actions => { - fillInActions(this.contributedContextMenu, stat instanceof FileStat ? { arg: stat.resource } : null, actions); - return actions; - }); + const actions = []; + fillInActions(this.contributedContextMenu, stat instanceof FileStat ? { arg: stat.resource } : null, actions); + return TPromise.as(actions); }, - getActionItem: this.state.actionProvider.getActionItem.bind(this.state.actionProvider, tree, stat), getActionsContext: (event) => { return { viewletState: this.state, From 7dc49956570c274fd7862faf71acff1bb8fc63ec Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 19 Dec 2017 17:01:18 +0100 Subject: [PATCH 426/615] execution: properly contribute actions to explorer --- .../execution.contribution.ts | 132 +++++------------- 1 file changed, 33 insertions(+), 99 deletions(-) diff --git a/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts b/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts index a2d061f99ca..10247865e6e 100644 --- a/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts +++ b/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts @@ -8,18 +8,14 @@ import * as nls from 'vs/nls'; import * as env from 'vs/base/common/platform'; import { TPromise } from 'vs/base/common/winjs.base'; import { Registry } from 'vs/platform/registry/common/platform'; -import { IAction, Action } from 'vs/base/common/actions'; +import { Action } from 'vs/base/common/actions'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions'; import paths = require('vs/base/common/paths'); -import resources = require('vs/base/common/resources'); -import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actions'; import uri from 'vs/base/common/uri'; -import { explorerItemToFileResource } from 'vs/workbench/parts/files/common/files'; import { ITerminalService } from 'vs/workbench/parts/execution/common/execution'; import { SyncActionDescriptor, MenuId, MenuRegistry } from 'vs/platform/actions/common/actions'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { toResource, IEditorContext } from 'vs/workbench/common/editor'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; @@ -30,7 +26,7 @@ import { WinTerminalService, MacTerminalService, LinuxTerminalService } from 'vs import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands'; import { EditorWithResourceFocusedInOpenEditorsContext } from 'vs/workbench/parts/files/electron-browser/fileCommands'; -import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { ResourceContextKey } from 'vs/workbench/common/resources'; if (env.isWindows) { registerSingleton(ITerminalService, WinTerminalService); @@ -109,74 +105,6 @@ class OpenConsoleAction extends Action { } } -class OpenIntegratedTerminalAction extends Action { - - public static readonly ID = 'workbench.action.terminal.openFolderInIntegratedTerminal'; - public static readonly Label = nls.localize('openFolderInIntegratedTerminal', "Open in Terminal"); - - private resource: uri; - - public setResource(resource: uri): void { - this.resource = resource; - this.enabled = !paths.isUNC(this.resource.fsPath); - } - - constructor( - id: string, - label: string, - @ICommandService private commandService: ICommandService - ) { - super(id, label); - } - - public run(event?: any): TPromise { - return this.commandService.executeCommand(OPEN_CONSOLE_COMMAND_ID, this.resource); - } -} - -export class ExplorerViewerActionContributor extends ActionBarContributor { - - constructor( - @IInstantiationService private instantiationService: IInstantiationService, - @IConfigurationService private configurationService: IConfigurationService - ) { - super(); - } - - public hasSecondaryActions(context: any): boolean { - const fileResource = explorerItemToFileResource(context.element); - return fileResource && fileResource.resource.scheme === 'file'; - } - - public getSecondaryActions(context: any): IAction[] { - let fileResource = explorerItemToFileResource(context.element); - let resource = fileResource.resource; - - // We want the parent unless this resource is a directory - if (!fileResource.isDirectory) { - resource = resources.dirname(resource); - } - - const configuration = this.configurationService.getValue(); - const explorerKind = configuration.terminal.explorerKind; - - if (explorerKind === 'integrated') { - let action = this.instantiationService.createInstance(OpenIntegratedTerminalAction, OpenIntegratedTerminalAction.ID, OpenIntegratedTerminalAction.Label); - action.setResource(resource); - - return [action]; - } else { - let action = this.instantiationService.createInstance(OpenConsoleAction, OpenConsoleAction.ID, OpenConsoleAction.ScopedLabel); - action.setResource(resource); - - return [action]; - } - } -} - -const actionBarRegistry = Registry.as(ActionBarExtensions.Actionbar); -actionBarRegistry.registerActionBarContributor(Scope.VIEWER, ExplorerViewerActionContributor); - // Register Global Action to Open Console Registry.as(ActionExtensions.WorkbenchActions).registerWorkbenchAction( new SyncActionDescriptor( @@ -191,29 +119,26 @@ Registry.as(ActionExtensions.WorkbenchActions).registe const OPEN_CONSOLE_COMMAND_ID = 'workbench.command.terminal.openNativeConsole'; -function getPathToOpen(resource: uri, historyService: IHistoryService, editorService: IWorkbenchEditorService): string { - let pathToOpen: string; - - // Try workspace path first - const root = historyService.getLastActiveWorkspaceRoot('file'); - pathToOpen = resource ? resource.fsPath : (root && root.fsPath); - - // Otherwise check if we have an active file open - if (!pathToOpen) { - const file = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); - if (file) { - pathToOpen = paths.dirname(file.fsPath); // take parent folder of file - } - } - - return pathToOpen; -} - CommandsRegistry.registerCommand({ id: OPEN_CONSOLE_COMMAND_ID, handler: (accessor, args: IEditorContext) => { const configurationService = accessor.get(IConfigurationService); - const pathToOpen = getPathToOpen(args.resource, accessor.get(IHistoryService), accessor.get(IWorkbenchEditorService)); + const historyService = accessor.get(IHistoryService); + const editorService = accessor.get(IWorkbenchEditorService); + let pathToOpen: string; + + // Try workspace path first + const root = historyService.getLastActiveWorkspaceRoot('file'); + pathToOpen = args.resource ? args.resource.fsPath : (root && root.fsPath); + + // Otherwise check if we have an active file open + if (!pathToOpen) { + const file = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + if (file) { + pathToOpen = paths.dirname(file.fsPath); // take parent folder of file + } + } + if (configurationService.getValue().terminal.explorerKind === 'integrated') { const integratedTerminalService = accessor.get(IIntegratedTerminalService); @@ -231,13 +156,22 @@ CommandsRegistry.registerCommand({ } }); +const openConsoleCommand = { + id: OPEN_CONSOLE_COMMAND_ID, + title: env.isWindows ? nls.localize('scopedConsoleActionWin', "Open in Command Prompt") : + nls.localize('scopedConsoleActionMacLinux', "Open in Terminal") +}; + MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: '1_files', order: 30, - command: { - id: OPEN_CONSOLE_COMMAND_ID, - title: env.isWindows ? nls.localize('scopedConsoleActionWin', "Open in Command Prompt") : - nls.localize('scopedConsoleActionMacLinux', "Open in Terminal") - }, - when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext) + command: openConsoleCommand, + when: EditorWithResourceFocusedInOpenEditorsContext +}); + +MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { + group: '1_files', + order: 30, + command: openConsoleCommand, + when: ResourceContextKey.Scheme.isEqualTo('file') }); From 8183192d1d61c7a275d23e88c05c7d4c7d33b651 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 19 Dec 2017 17:16:28 +0100 Subject: [PATCH 427/615] get rid of ExplorerViewersActionContributor --- .../fileActions.contribution.ts | 33 +- .../files/electron-browser/fileCommands.ts | 725 +++++++++--------- 2 files changed, 372 insertions(+), 386 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts index 1c80fc13498..17e042c183b 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts @@ -22,7 +22,7 @@ import { copyFocusedFilesExplorerViewItem, openWindowCommand, deleteFocusedFiles import { CommandsRegistry, ICommandHandler } from 'vs/platform/commands/common/commands'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import { explorerItemToFileResource, FilesExplorerFocusCondition } from 'vs/workbench/parts/files/common/files'; +import { FilesExplorerFocusCondition } from 'vs/workbench/parts/files/common/files'; class FilesViewerActionContributor extends ActionBarContributor { @@ -149,40 +149,9 @@ class FilesViewerActionContributor extends ActionBarContributor { } } -class ExplorerViewersActionContributor extends ActionBarContributor { - - constructor( @IInstantiationService private instantiationService: IInstantiationService) { - super(); - } - - public hasSecondaryActions(context: any): boolean { - const element = context.element; - - // Contribute only on Files (File Explorer and Open Files Viewer) - return !!explorerItemToFileResource(element); - } - - public getSecondaryActions(context: any): IAction[] { - const actions: IAction[] = []; - const fileResource = explorerItemToFileResource(context.element); - const resource = fileResource.resource; - - // Reveal file in OS native explorer - if (resource.scheme === 'file') { - actions.push(this.instantiationService.createInstance(RevealInOSAction, resource)); - } - - // Copy Path - actions.push(this.instantiationService.createInstance(CopyPathAction, resource)); - - return actions; - } -} - // Contribute to Viewers that show Files const actionBarRegistry = Registry.as(ActionBarExtensions.Actionbar); actionBarRegistry.registerActionBarContributor(Scope.VIEWER, FilesViewerActionContributor); -actionBarRegistry.registerActionBarContributor(Scope.VIEWER, ExplorerViewersActionContributor); // Contribute Global Actions const category = nls.localize('filesCategory', "File"); diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index 5aa29a22ccc..3fad00dc634 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -31,7 +31,7 @@ import { toErrorMessage } from 'vs/base/common/errorMessage'; import { basename } from 'vs/base/common/paths'; import { IListService } from 'vs/platform/list/browser/listService'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; -import { CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands'; import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { isWindows, isMacintosh } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -44,6 +44,7 @@ import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { KeyMod, KeyCode, KeyChord } from 'vs/base/common/keyCodes'; +import { ResourceContextKey } from 'vs/workbench/common/resources'; // Commands @@ -76,9 +77,6 @@ export const UntitledEditorFocusedInOpenEditorsContext = new RawContextKey('groupFocusedInOpenEditors', false); -registerFileCommands(); -registerMenuItems(); - export const openWindowCommand = (accessor: ServicesAccessor, paths: string[], forceNewWindow: boolean) => { const windowsService = accessor.get(IWindowsService); windowsService.openWindow(paths, { forceNewWindow }); @@ -87,7 +85,8 @@ export const openWindowCommand = (accessor: ServicesAccessor, paths: string[], f function runActionOnFocusedFilesExplorerViewItem(accessor: ServicesAccessor, id: string, context?: any): void { withFocusedFilesExplorerViewItem(accessor).then(res => { if (res) { - res.explorer.getViewletState().actionProvider.runAction(res.tree, res.item, id, context).done(null, errors.onUnexpectedError); + // TODO@Isidor + // res.explorer.getViewletState().actionProvider.runAction(res.tree, res.item, id, context).done(null, errors.onUnexpectedError); } }); } @@ -339,388 +338,406 @@ function saveAll(saveAllArguments: any, editorService: IWorkbenchEditorService, }); } +// Command registration -function registerFileCommands(): void { +CommandsRegistry.registerCommand({ + id: REVERT_FILE_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + let resource: URI; + const editorService = accessor.get(IWorkbenchEditorService); + const textFileService = accessor.get(ITextFileService); + const messageService = accessor.get(IMessageService); - CommandsRegistry.registerCommand({ - id: REVERT_FILE_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - let resource: URI; + if (args && args.resource) { + resource = args.resource; + } else { + resource = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + } + + if (resource && resource.scheme !== 'untitled') { + return textFileService.revert(resource, { force: true }).then(null, error => { + messageService.show(Severity.Error, nls.localize('genericRevertError', "Failed to revert '{0}': {1}", basename(resource.fsPath), toErrorMessage(error, false))); + }); + } + + return TPromise.as(true); + } +}); + +KeybindingsRegistry.registerCommandAndKeybindingRule({ + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: ExplorerFocusCondition, + primary: KeyMod.CtrlCmd | KeyCode.Enter, + mac: { + primary: KeyMod.WinCtrl | KeyCode.Enter + }, + id: OPEN_TO_SIDE_COMMAND_ID, handler: (accessor, args) => { + const editorService = accessor.get(IWorkbenchEditorService); + const listService = accessor.get(IListService); + const tree = listService.lastFocusedList; + // Remove highlight + if (tree instanceof Tree) { + tree.clearHighlight(); + } + + // Set side input + return editorService.openEditor({ + resource: args.resource, + options: { + preserveFocus: false + } + }, true); + } +}); + +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: COMPARE_WITH_SAVED_COMMAND_ID, + when: undefined, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_D), + handler: (accessor, args: IEditorContext) => { + const editorService = accessor.get(IWorkbenchEditorService); + let resource: URI; + if (args.resource) { + resource = args.resource; + } else { + resource = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + } + + if (resource && resource.scheme === 'file') { + const name = paths.basename(resource.fsPath); + const editorLabel = nls.localize('modifiedLabel', "{0} (on disk) ↔ {1}", name, name); + + return editorService.openEditor({ leftResource: URI.from({ scheme: COMPARE_WITH_SAVED_SCHEMA, path: resource.fsPath }), rightResource: resource, label: editorLabel }); + } + + return TPromise.as(true); + } +}); + +CommandsRegistry.registerCommand({ + id: SELECT_FOR_COMPARE_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + const listService = accessor.get(IListService); + const tree = listService.lastFocusedList; + // Remove highlight + if (tree instanceof Tree) { + tree.clearHighlight(); + tree.DOMFocus(); + } + + globalResourceToCompare = args.resource; + } +}); + +CommandsRegistry.registerCommand({ + id: COMPARE_RESOURCE_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + const editorService = accessor.get(IWorkbenchEditorService); + const listService = accessor.get(IListService); + const tree = listService.lastFocusedList; + // Remove highlight + if (tree instanceof Tree) { + tree.clearHighlight(); + } + + return editorService.openEditor({ + leftResource: globalResourceToCompare, + rightResource: args.resource + }); + } +}); + +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: REVEAL_IN_OS_COMMAND_ID, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: ExplorerFocusCondition, + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R, + win: { + primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_R + }, + handler: (accessor, args: IEditorContext) => { + // Without resource, try to look at the active editor + let resource = args.resource; + if (!resource) { const editorService = accessor.get(IWorkbenchEditorService); - const textFileService = accessor.get(ITextFileService); + resource = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + } + + if (resource) { + const windowsService = accessor.get(IWindowsService); + windowsService.showItemInFolder(paths.normalize(resource.fsPath, true)); + } else { const messageService = accessor.get(IMessageService); - - if (args && args.resource) { - resource = args.resource; - } else { - resource = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); - } - - if (resource && resource.scheme !== 'untitled') { - return textFileService.revert(resource, { force: true }).then(null, error => { - messageService.show(Severity.Error, nls.localize('genericRevertError', "Failed to revert '{0}': {1}", basename(resource.fsPath), toErrorMessage(error, false))); - }); - } - - return TPromise.as(true); + messageService.show(severity.Info, nls.localize('openFileToReveal', "Open a file first to reveal")); } - }); + } +}); - KeybindingsRegistry.registerCommandAndKeybindingRule({ - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ExplorerFocusCondition, - primary: KeyMod.CtrlCmd | KeyCode.Enter, - mac: { - primary: KeyMod.WinCtrl | KeyCode.Enter - }, - id: OPEN_TO_SIDE_COMMAND_ID, handler: (accessor, args) => { +KeybindingsRegistry.registerCommandAndKeybindingRule({ + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: ExplorerFocusCondition, + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_C, + win: { + primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_C + }, + id: COPY_PATH_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + let resource = args.resource; + // Without resource, try to look at the active editor + if (!resource) { + const editorGroupService = accessor.get(IEditorGroupService); const editorService = accessor.get(IWorkbenchEditorService); - const listService = accessor.get(IListService); - const tree = listService.lastFocusedList; - // Remove highlight - if (tree instanceof Tree) { - tree.clearHighlight(); - } + const activeEditor = editorService.getActiveEditor(); - // Set side input - return editorService.openEditor({ - resource: args.resource, - options: { - preserveFocus: false + resource = activeEditor ? toResource(activeEditor.input, { supportSideBySide: true }) : void 0; + if (activeEditor) { + editorGroupService.focusGroup(activeEditor.position); // focus back to active editor group + } + } + + if (resource) { + const clipboardService = accessor.get(IClipboardService); + clipboardService.writeText(resource.scheme === 'file' ? labels.getPathLabel(resource) : resource.toString()); + } else { + const messageService = accessor.get(IMessageService); + messageService.show(severity.Info, nls.localize('openFileToCopy', "Open a file first to copy its path")); + } + } +}); + +CommandsRegistry.registerCommand({ + id: REVEAL_IN_EXPLORER_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + const viewletService = accessor.get(IViewletService); + const contextService = accessor.get(IWorkspaceContextService); + + viewletService.openViewlet(VIEWLET_ID, false).then((viewlet: ExplorerViewlet) => { + const isInsideWorkspace = contextService.isInsideWorkspace(args.resource); + if (isInsideWorkspace) { + const explorerView = viewlet.getExplorerView(); + if (explorerView) { + explorerView.setExpanded(true); + explorerView.select(args.resource, true); } - }, true); - } - }); - - KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: COMPARE_WITH_SAVED_COMMAND_ID, - when: undefined, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_D), - handler: (accessor, args: IEditorContext) => { - const editorService = accessor.get(IWorkbenchEditorService); - let resource: URI; - if (args.resource) { - resource = args.resource; } else { - resource = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + const openEditorsView = viewlet.getOpenEditorsView(); + if (openEditorsView) { + openEditorsView.setExpanded(true); + } } + }); + } +}); - if (resource && resource.scheme === 'file') { - const name = paths.basename(resource.fsPath); - const editorLabel = nls.localize('modifiedLabel', "{0} (on disk) ↔ {1}", name, name); +CommandsRegistry.registerCommand({ + id: SAVE_FILE_AS_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + return save(args.resource, true, accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); + } +}); - return editorService.openEditor({ leftResource: URI.from({ scheme: COMPARE_WITH_SAVED_SCHEMA, path: resource.fsPath }), rightResource: resource, label: editorLabel }); - } +KeybindingsRegistry.registerCommandAndKeybindingRule({ + when: undefined, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + primary: KeyMod.CtrlCmd | KeyCode.KEY_S, + id: SAVE_FILE_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + return save(args.resource, false, accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); + } +}); - return TPromise.as(true); - } - }); +CommandsRegistry.registerCommand({ + id: SAVE_ALL_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + return saveAll(true, accessor.get(IWorkbenchEditorService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); + } +}); - CommandsRegistry.registerCommand({ - id: SELECT_FOR_COMPARE_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - const listService = accessor.get(IListService); - const tree = listService.lastFocusedList; - // Remove highlight - if (tree instanceof Tree) { - tree.clearHighlight(); - tree.DOMFocus(); - } - - globalResourceToCompare = args.resource; - } - }); - - CommandsRegistry.registerCommand({ - id: COMPARE_RESOURCE_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - const editorService = accessor.get(IWorkbenchEditorService); - const listService = accessor.get(IListService); - const tree = listService.lastFocusedList; - // Remove highlight - if (tree instanceof Tree) { - tree.clearHighlight(); - } - - return editorService.openEditor({ - leftResource: globalResourceToCompare, - rightResource: args.resource +CommandsRegistry.registerCommand({ + id: SAVE_ALL_IN_GROUP_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + let saveAllArg: any; + if (!args) { + saveAllArg = true; + } else { + const fileService = accessor.get(IFileService); + const editorGroup = args.group; + saveAllArg = []; + editorGroup.getEditors().forEach(editor => { + const resource = toResource(editor, { supportSideBySide: true }); + if (resource && (resource.scheme === 'untitled' || fileService.canHandleResource(resource))) { + saveAllArg.push(resource); + } }); } - }); - KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: REVEAL_IN_OS_COMMAND_ID, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ExplorerFocusCondition, - primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R, - win: { - primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_R - }, - handler: (accessor, args: IEditorContext) => { - // Without resource, try to look at the active editor - let resource = args.resource; - if (!resource) { - const editorService = accessor.get(IWorkbenchEditorService); - resource = toResource(editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); - } + return saveAll(saveAllArg, accessor.get(IWorkbenchEditorService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); + } +}); - if (resource) { - const windowsService = accessor.get(IWindowsService); - windowsService.showItemInFolder(paths.normalize(resource.fsPath, true)); - } else { - const messageService = accessor.get(IMessageService); - messageService.show(severity.Info, nls.localize('openFileToReveal', "Open a file first to reveal")); - } - } - }); +CommandsRegistry.registerCommand({ + id: SAVE_FILES_COMMAND_ID, + handler: (accessor, args: IEditorContext) => { + return saveAll(false, accessor.get(IWorkbenchEditorService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); + } +}); - KeybindingsRegistry.registerCommandAndKeybindingRule({ - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: ExplorerFocusCondition, - primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_C, - win: { - primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_C - }, +// Menu registration - open editors + +const revealInOsCommand = { + id: REVEAL_IN_OS_COMMAND_ID, + title: isWindows ? nls.localize('revealInWindows', "Reveal in Explorer") : isMacintosh ? nls.localize('revealInMac', "Reveal in Finder") : nls.localize('openContainer', "Open Containing Folder") +}; + +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '1_files', + order: 10, + command: { + id: OPEN_TO_SIDE_COMMAND_ID, + title: nls.localize('openToSide', "Open to the Side") + }, + when: EditorWithResourceFocusedInOpenEditorsContext +}); + +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '1_files', + order: 20, + command: revealInOsCommand, + when: EditorWithResourceFocusedInOpenEditorsContext +}); + +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '1_files', + order: 40, + command: { id: COPY_PATH_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - let resource = args.resource; - // Without resource, try to look at the active editor - if (!resource) { - const editorGroupService = accessor.get(IEditorGroupService); - const editorService = accessor.get(IWorkbenchEditorService); - const activeEditor = editorService.getActiveEditor(); + title: nls.localize('copyPath', "Copy Path") + }, + when: EditorWithResourceFocusedInOpenEditorsContext +}); - resource = activeEditor ? toResource(activeEditor.input, { supportSideBySide: true }) : void 0; - if (activeEditor) { - editorGroupService.focusGroup(activeEditor.position); // focus back to active editor group - } - } - - if (resource) { - const clipboardService = accessor.get(IClipboardService); - clipboardService.writeText(resource.scheme === 'file' ? labels.getPathLabel(resource) : resource.toString()); - } else { - const messageService = accessor.get(IMessageService); - messageService.show(severity.Info, nls.localize('openFileToCopy', "Open a file first to copy its path")); - } - } - }); - - CommandsRegistry.registerCommand({ - id: REVEAL_IN_EXPLORER_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - const viewletService = accessor.get(IViewletService); - const contextService = accessor.get(IWorkspaceContextService); - - viewletService.openViewlet(VIEWLET_ID, false).then((viewlet: ExplorerViewlet) => { - const isInsideWorkspace = contextService.isInsideWorkspace(args.resource); - if (isInsideWorkspace) { - const explorerView = viewlet.getExplorerView(); - if (explorerView) { - explorerView.setExpanded(true); - explorerView.select(args.resource, true); - } - } else { - const openEditorsView = viewlet.getOpenEditorsView(); - if (openEditorsView) { - openEditorsView.setExpanded(true); - } - } - }); - } - }); - - CommandsRegistry.registerCommand({ - id: SAVE_FILE_AS_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - return save(args.resource, true, accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); - } - }); - - KeybindingsRegistry.registerCommandAndKeybindingRule({ - when: undefined, - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - primary: KeyMod.CtrlCmd | KeyCode.KEY_S, +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '2_save', + order: 10, + command: { id: SAVE_FILE_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - return save(args.resource, false, accessor.get(IWorkbenchEditorService), accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); - } - }); + title: SAVE_FILE_LABEL + }, + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext) +}); - CommandsRegistry.registerCommand({ - id: SAVE_ALL_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - return saveAll(true, accessor.get(IWorkbenchEditorService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); - } - }); +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '2_save', + order: 20, + command: { + id: REVERT_FILE_COMMAND_ID, + title: nls.localize('revert', "Revert File") + }, + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext, UntitledEditorNotFocusedInOpenEditorsContext) +}); - CommandsRegistry.registerCommand({ +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '2_save', + command: { + id: SAVE_FILE_AS_COMMAND_ID, + title: SAVE_FILE_AS_LABEL + }, + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext) +}); + +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '2_save', + command: { id: SAVE_ALL_IN_GROUP_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - let saveAllArg: any; - if (!args) { - saveAllArg = true; - } else { - const fileService = accessor.get(IFileService); - const editorGroup = args.group; - saveAllArg = []; - editorGroup.getEditors().forEach(editor => { - const resource = toResource(editor, { supportSideBySide: true }); - if (resource && (resource.scheme === 'untitled' || fileService.canHandleResource(resource))) { - saveAllArg.push(resource); - } - }); - } + title: nls.localize('saveAll', "Save All") + }, + when: ContextKeyExpr.and(GroupFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext) +}); - return saveAll(saveAllArg, accessor.get(IWorkbenchEditorService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); - } - }); +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '3_compare', + order: 10, + command: { + id: COMPARE_WITH_SAVED_COMMAND_ID, + title: nls.localize('compareWithSaved', "Compare with Saved") + }, + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, UntitledEditorNotFocusedInOpenEditorsContext) +}); - CommandsRegistry.registerCommand({ - id: SAVE_FILES_COMMAND_ID, - handler: (accessor, args: IEditorContext) => { - return saveAll(false, accessor.get(IWorkbenchEditorService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupService)); - } - }); -} +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '3_compare', + order: 20, + command: { + id: COMPARE_RESOURCE_COMMAND_ID, + title: nls.localize('compareWithChosen', "Compare with Chosen") + }, + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, ) +}); -function registerMenuItems(): void { +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '3_compare', + order: 30, + command: { + id: SELECT_FOR_COMPARE_COMMAND_ID, + title: nls.localize('compareSource', "Select for Compare") + }, + when: EditorWithResourceFocusedInOpenEditorsContext +}); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '1_files', - order: 10, - command: { - id: OPEN_TO_SIDE_COMMAND_ID, - title: nls.localize('openToSide', "Open to the Side") - }, - when: EditorWithResourceFocusedInOpenEditorsContext - }); +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '4_close', + order: 10, + command: { + id: CLOSE_EDITOR_COMMAND_ID, + title: nls.localize('close', "Close") + }, + when: EditorFocusedInOpenEditorsContext +}); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '1_files', - order: 20, - command: { - id: REVEAL_IN_OS_COMMAND_ID, - title: isWindows ? nls.localize('revealInWindows', "Reveal in Explorer") : isMacintosh ? nls.localize('revealInMac', "Reveal in Finder") : nls.localize('openContainer', "Open Containing Folder") - }, - when: EditorWithResourceFocusedInOpenEditorsContext - }); +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '4_close', + order: 20, + command: { + id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, + title: nls.localize('closeOthers', "Close Others") + }, + when: EditorFocusedInOpenEditorsContext +}); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '1_files', - order: 40, - command: { - id: COPY_PATH_COMMAND_ID, - title: nls.localize('copyPath', "Copy Path") - }, - when: EditorWithResourceFocusedInOpenEditorsContext - }); +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '4_close', + order: 30, + command: { + id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, + title: nls.localize('closeUnmodified', "Close Unmodified") + } +}); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '2_save', - order: 10, - command: { - id: SAVE_FILE_COMMAND_ID, - title: SAVE_FILE_LABEL - }, - when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext) - }); +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '4_close', + order: 40, + command: { + id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, + title: nls.localize('closeAll', "Close All") + } +}); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '2_save', - order: 20, - command: { - id: REVERT_FILE_COMMAND_ID, - title: nls.localize('revert', "Revert File") - }, - when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext, UntitledEditorNotFocusedInOpenEditorsContext) - }); +// Menu registration - explorer - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '2_save', - command: { - id: SAVE_FILE_AS_COMMAND_ID, - title: SAVE_FILE_AS_LABEL - }, - when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext) - }); +MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { + group: '1_files', + order: 20, + command: revealInOsCommand, + when: ResourceContextKey.Scheme.isEqualTo('file') +}); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '2_save', - command: { - id: SAVE_ALL_IN_GROUP_COMMAND_ID, - title: nls.localize('saveAll', "Save All") - }, - when: ContextKeyExpr.and(GroupFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext) - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '3_compare', - order: 10, - command: { - id: COMPARE_WITH_SAVED_COMMAND_ID, - title: nls.localize('compareWithSaved', "Compare with Saved") - }, - when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, UntitledEditorNotFocusedInOpenEditorsContext) - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '3_compare', - order: 20, - command: { - id: COMPARE_RESOURCE_COMMAND_ID, - title: nls.localize('compareWithChosen', "Compare with Chosen") - }, - when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, ) - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '3_compare', - order: 30, - command: { - id: SELECT_FOR_COMPARE_COMMAND_ID, - title: nls.localize('compareSource', "Select for Compare") - }, - when: EditorWithResourceFocusedInOpenEditorsContext - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '4_close', - order: 10, - command: { - id: CLOSE_EDITOR_COMMAND_ID, - title: nls.localize('close', "Close") - }, - when: EditorFocusedInOpenEditorsContext - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '4_close', - order: 20, - command: { - id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, - title: nls.localize('closeOthers', "Close Others") - }, - when: EditorFocusedInOpenEditorsContext - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '4_close', - order: 30, - command: { - id: CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, - title: nls.localize('closeUnmodified', "Close Unmodified") - } - }); - - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '4_close', - order: 40, - command: { - id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, - title: nls.localize('closeAll', "Close All") - } - }); -} +MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { + group: '1_files', + order: 40, + command: { + id: COPY_PATH_COMMAND_ID, + title: nls.localize('copyPath', "Copy Path") + }, + when: ResourceContextKey.Scheme.isEqualTo('file') +}); From 26225c8f144ad4685ef422a276798ce98468b899 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 19 Dec 2017 17:16:51 +0100 Subject: [PATCH 428/615] ups --- src/vs/workbench/parts/files/electron-browser/fileCommands.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index 3fad00dc634..b70fc819192 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -21,7 +21,6 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { ExplorerViewlet } from 'vs/workbench/parts/files/electron-browser/explorerViewlet'; import { VIEWLET_ID, ExplorerFocusCondition } from 'vs/workbench/parts/files/common/files'; import { FileStat } from 'vs/workbench/parts/files/common/explorerModel'; -import errors = require('vs/base/common/errors'); import { ITree } from 'vs/base/parts/tree/browser/tree'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; @@ -31,7 +30,7 @@ import { toErrorMessage } from 'vs/base/common/errorMessage'; import { basename } from 'vs/base/common/paths'; import { IListService } from 'vs/platform/list/browser/listService'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; -import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands'; +import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { isWindows, isMacintosh } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; From b12c3325ad72dd0a12923cbd74ad7b125196b258 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 19 Dec 2017 17:48:55 +0100 Subject: [PATCH 429/615] explorer: more command contributed via menu --- src/vs/workbench/parts/files/common/files.ts | 2 + .../fileActions.contribution.ts | 28 +---- .../files/electron-browser/fileActions.ts | 84 +------------ .../files/electron-browser/fileCommands.ts | 110 +++++++++--------- .../electron-browser/views/explorerView.ts | 5 +- 5 files changed, 62 insertions(+), 167 deletions(-) diff --git a/src/vs/workbench/parts/files/common/files.ts b/src/vs/workbench/parts/files/common/files.ts index b817c709192..55dd42ff22e 100644 --- a/src/vs/workbench/parts/files/common/files.ts +++ b/src/vs/workbench/parts/files/common/files.ts @@ -44,9 +44,11 @@ const openEditorsVisibleId = 'openEditorsVisible'; const openEditorsFocusId = 'openEditorsFocus'; const explorerViewletFocusId = 'explorerViewletFocus'; const explorerResourceIsFolderId = 'explorerResourceIsFolder'; +const explorerResourceIsRootId = 'explorerResourceIsRoot'; export const ExplorerViewletVisibleContext = new RawContextKey(explorerViewletVisibleId, true); export const ExplorerFolderContext = new RawContextKey(explorerResourceIsFolderId, false); +export const ExplorerRootContext = new RawContextKey(explorerResourceIsRootId, false); export const FilesExplorerFocusedContext = new RawContextKey(filesExplorerFocusId, true); export const OpenEditorsVisibleContext = new RawContextKey(openEditorsVisibleId, false); export const OpenEditorsFocusedContext = new RawContextKey(openEditorsFocusId, true); diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts index 17e042c183b..9bb29b63a93 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts @@ -9,7 +9,7 @@ import { Registry } from 'vs/platform/registry/common/platform'; import { Action, IAction } from 'vs/base/common/actions'; import { ActionItem, BaseActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actions'; -import { GlobalNewUntitledFileAction, SaveFileAsAction, ShowOpenedFileInNewWindow, CopyPathAction, GlobalCopyPathAction, RevealInOSAction, GlobalRevealInOSAction, pasteIntoFocusedFilesExplorerViewItem, FocusOpenEditorsView, FocusFilesExplorer, GlobalCompareResourcesAction, GlobalNewFileAction, GlobalNewFolderAction, RevertFileAction, SaveFilesAction, SaveAllAction, SaveFileAction, MoveFileToTrashAction, TriggerRenameFileAction, PasteFileAction, CopyFileAction, SelectResourceForCompareAction, CompareResourcesAction, NewFolderAction, NewFileAction, OpenToSideAction, ShowActiveFileInExplorer, CollapseExplorerView, RefreshExplorerView, CompareWithSavedAction, CompareWithClipboardAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; +import { GlobalNewUntitledFileAction, SaveFileAsAction, ShowOpenedFileInNewWindow, CopyPathAction, GlobalCopyPathAction, RevealInOSAction, GlobalRevealInOSAction, pasteIntoFocusedFilesExplorerViewItem, FocusOpenEditorsView, FocusFilesExplorer, GlobalCompareResourcesAction, GlobalNewFileAction, GlobalNewFolderAction, RevertFileAction, SaveFilesAction, SaveAllAction, SaveFileAction, MoveFileToTrashAction, TriggerRenameFileAction, PasteFileAction, CopyFileAction, NewFolderAction, NewFileAction, ShowActiveFileInExplorer, CollapseExplorerView, RefreshExplorerView, CompareWithSavedAction, CompareWithClipboardAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; import { revertLocalChangesCommand, acceptLocalChangesCommand, CONFLICT_RESOLUTION_CONTEXT } from 'vs/workbench/parts/files/electron-browser/saveErrorHandler'; import { SyncActionDescriptor, MenuId, MenuRegistry } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions'; @@ -44,21 +44,10 @@ class FilesViewerActionContributor extends ActionBarContributor { const stat = (context.element); const tree = context.viewer; const actions: IAction[] = []; - let separateOpen = false; if (stat instanceof Model) { return [this.instantiationService.createInstance(AddRootFolderAction, AddRootFolderAction.ID, AddRootFolderAction.LABEL)]; } - // Open side by side - if (!stat.isDirectory) { - actions.push(this.instantiationService.createInstance(OpenToSideAction, stat.resource)); - separateOpen = true; - } - - if (separateOpen) { - actions.push(new Separator(null, 50)); - } - // Directory Actions if (stat.isDirectory && !stat.nonexistentRoot) { @@ -71,21 +60,6 @@ class FilesViewerActionContributor extends ActionBarContributor { actions.push(new Separator(null, 50)); } - // Compare Files (of same extension) - else if (!stat.isDirectory) { - - // Run Compare - const runCompareAction = this.instantiationService.createInstance(CompareResourcesAction, stat.resource); - if (runCompareAction._isEnabled()) { - actions.push(runCompareAction); - } - - // Select for Compare - actions.push(this.instantiationService.createInstance(SelectResourceForCompareAction, stat.resource)); - - actions.push(new Separator(null, 100)); - } - // Workspace Root Folder Actions if (stat.isRoot) { const addRootFolderAction: Action = this.instantiationService.createInstance(AddRootFolderAction, AddRootFolderAction.ID, AddRootFolderAction.LABEL); diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index 7755098d36d..fbce9b47d10 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -35,15 +35,13 @@ import { CollapseAction } from 'vs/workbench/browser/viewlet'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; -import { Position, IUntitledResourceInput } from 'vs/platform/editor/common/editor'; +import { IUntitledResourceInput } from 'vs/platform/editor/common/editor'; import { IInstantiationService, IConstructorSignature2, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService, IMessageWithAction, IConfirmation, Severity, CancelAction, IConfirmationResult } from 'vs/platform/message/common/message'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IModel } from 'vs/editor/common/editorCommon'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { withFocusedFilesExplorer, REVERT_FILE_COMMAND_ID, OPEN_TO_SIDE_COMMAND_ID, COMPARE_WITH_SAVED_SCHEMA, COMPARE_WITH_SAVED_COMMAND_ID, COMPARE_RESOURCE_COMMAND_ID, SELECT_FOR_COMPARE_COMMAND_ID, globalResourceToCompare, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID, computeLabelForCompare, SAVE_FILE_AS_COMMAND_ID, SAVE_FILE_COMMAND_ID, SAVE_FILE_LABEL, SAVE_FILE_AS_LABEL, SAVE_ALL_COMMAND_ID, SAVE_ALL_LABEL, SAVE_ALL_IN_GROUP_COMMAND_ID, SAVE_FILES_COMMAND_ID, SAVE_FILES_LABEL } from 'vs/workbench/parts/files/electron-browser/fileCommands'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { withFocusedFilesExplorer, REVERT_FILE_COMMAND_ID, COMPARE_WITH_SAVED_COMMAND_ID, REVEAL_IN_OS_COMMAND_ID, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID, SAVE_FILE_AS_COMMAND_ID, SAVE_FILE_COMMAND_ID, SAVE_FILE_LABEL, SAVE_FILE_AS_LABEL, SAVE_ALL_COMMAND_ID, SAVE_ALL_LABEL, SAVE_ALL_IN_GROUP_COMMAND_ID, SAVE_FILES_COMMAND_ID, SAVE_FILES_LABEL, COMPARE_WITH_SAVED_SCHEMA } from 'vs/workbench/parts/files/electron-browser/fileCommands'; import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; import { once } from 'vs/base/common/event'; @@ -1112,47 +1110,6 @@ export class DuplicateFileAction extends BaseFileAction { } } -// Open to the side -export class OpenToSideAction extends Action { - - public static readonly ID = 'explorer.openToSide'; - public static readonly LABEL = nls.localize('openToSide', "Open to the Side"); - - constructor( - private resource: URI, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @ICommandService private commandService: ICommandService - ) { - super(OpenToSideAction.ID, OpenToSideAction.LABEL); - - this.updateEnablement(); - } - - private updateEnablement(): void { - const activeEditor = this.editorService.getActiveEditor(); - this.enabled = (!activeEditor || activeEditor.position !== Position.THREE); - } - - public run(): TPromise { - return this.commandService.executeCommand(OPEN_TO_SIDE_COMMAND_ID, { resource: this.resource }); - } -} - -export class SelectResourceForCompareAction extends Action { - private resource: URI; - - constructor(resource: URI, @ICommandService private commandService: ICommandService) { - super('workbench.files.action.selectForCompare', nls.localize('compareSource', "Select for Compare")); - - this.resource = resource; - this.enabled = true; - } - - public run(): TPromise { - return this.commandService.executeCommand(SELECT_FOR_COMPARE_COMMAND_ID, { resource: this.resource }); - } -} - // Global Compare with export class GlobalCompareResourcesAction extends Action { @@ -1200,43 +1157,6 @@ export class GlobalCompareResourcesAction extends Action { } } -// Compare with Resource -export class CompareResourcesAction extends Action { - private resource: URI; - - constructor( - resource: URI, - @ICommandService private commandService: ICommandService, - @IWorkspaceContextService contextService: IWorkspaceContextService, - @IEnvironmentService environmentService: IEnvironmentService - ) { - super('workbench.files.action.compareFiles', computeLabelForCompare(resource, contextService, environmentService)); - - this.resource = resource; - } - - public _isEnabled(): boolean { - - // Need at least a resource to compare - if (!globalResourceToCompare) { - return false; - } - - // TODO@Isidor Check if file was deleted or moved meanwhile (explorer only) - - // Check if target is identical to source - if (this.resource.toString() === globalResourceToCompare.toString()) { - return false; - } - - return true; - } - - public run(): TPromise { - return this.commandService.executeCommand(COMPARE_RESOURCE_COMMAND_ID, { resource: this.resource }); - } -} - // Refresh Explorer Viewer export class RefreshViewExplorerAction extends Action { diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index b70fc819192..e93002b62ba 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -10,7 +10,6 @@ import paths = require('vs/base/common/paths'); import severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; import * as labels from 'vs/base/common/labels'; -import * as resources from 'vs/base/common/resources'; import URI from 'vs/base/common/uri'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { toResource, IEditorContext } from 'vs/workbench/common/editor'; @@ -19,7 +18,7 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ExplorerViewlet } from 'vs/workbench/parts/files/electron-browser/explorerViewlet'; -import { VIEWLET_ID, ExplorerFocusCondition } from 'vs/workbench/parts/files/common/files'; +import { VIEWLET_ID, ExplorerFocusCondition, ExplorerFolderContext } from 'vs/workbench/parts/files/common/files'; import { FileStat } from 'vs/workbench/parts/files/common/explorerModel'; import { ITree } from 'vs/base/parts/tree/browser/tree'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; @@ -33,7 +32,6 @@ import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { isWindows, isMacintosh } from 'vs/base/common/platform'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ContextKeyExpr, RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IResourceInput, Position } from 'vs/platform/editor/common/editor'; import { IFileService } from 'vs/platform/files/common/files'; @@ -73,7 +71,6 @@ export const SAVE_FILES_LABEL = nls.localize('saveFiles', "Save All Files"); export const EditorFocusedInOpenEditorsContext = new RawContextKey('editorFocusedInOpenEditors', false); export const EditorWithResourceFocusedInOpenEditorsContext = new RawContextKey('editorWithResourceFocusedInOpenEditors', false); export const UntitledEditorFocusedInOpenEditorsContext = new RawContextKey('untitledEditorFocusedInOpenEditors', false); -export const UntitledEditorNotFocusedInOpenEditorsContext: ContextKeyExpr = UntitledEditorFocusedInOpenEditorsContext.toNegated(); export const GroupFocusedInOpenEditorsContext = new RawContextKey('groupFocusedInOpenEditors', false); export const openWindowCommand = (accessor: ServicesAccessor, paths: string[], forceNewWindow: boolean) => { @@ -149,30 +146,7 @@ export const copyFocusedFilesExplorerViewItem = (accessor: ServicesAccessor) => runActionOnFocusedFilesExplorerViewItem(accessor, 'filesExplorer.copy'); }; - -export function computeLabelForCompare(resource: URI, contextService: IWorkspaceContextService, environmentService: IEnvironmentService): string { - if (globalResourceToCompare) { - let leftResourceName = paths.basename(globalResourceToCompare.fsPath); - let rightResourceName = paths.basename(resource.fsPath); - - // If the file names are identical, add more context by looking at the parent folder - if (leftResourceName === rightResourceName) { - const folderPaths = labels.shorten([ - labels.getPathLabel(resources.dirname(globalResourceToCompare), contextService, environmentService), - labels.getPathLabel(resources.dirname(resource), contextService, environmentService) - ]); - - leftResourceName = paths.join(folderPaths[0], leftResourceName); - rightResourceName = paths.join(folderPaths[1], rightResourceName); - } - - return nls.localize('compareWith', "Compare '{0}' with '{1}'", leftResourceName, rightResourceName); - } - - return nls.localize('compareFiles', "Compare Files"); -} - -export let globalResourceToCompare: URI; +let globalResourceToCompare: URI; function save(resource: URI, isSaveAs: boolean, editorService: IWorkbenchEditorService, fileService: IFileService, untitledEditorService: IUntitledEditorService, textFileService: ITextFileService, editorGroupService: IEditorGroupService): TPromise { @@ -584,21 +558,22 @@ CommandsRegistry.registerCommand({ // Menu registration - open editors + +const openToSideCommand = { + id: OPEN_TO_SIDE_COMMAND_ID, + title: nls.localize('openToSide', "Open to the Side") +}; +MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { + group: '1_files', + order: 10, + command: openToSideCommand, + when: EditorWithResourceFocusedInOpenEditorsContext +}); + const revealInOsCommand = { id: REVEAL_IN_OS_COMMAND_ID, title: isWindows ? nls.localize('revealInWindows', "Reveal in Explorer") : isMacintosh ? nls.localize('revealInMac', "Reveal in Finder") : nls.localize('openContainer', "Open Containing Folder") }; - -MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { - group: '1_files', - order: 10, - command: { - id: OPEN_TO_SIDE_COMMAND_ID, - title: nls.localize('openToSide', "Open to the Side") - }, - when: EditorWithResourceFocusedInOpenEditorsContext -}); - MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: '1_files', order: 20, @@ -606,13 +581,14 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { when: EditorWithResourceFocusedInOpenEditorsContext }); +const copyPathCommand = { + id: COPY_PATH_COMMAND_ID, + title: nls.localize('copyPath', "Copy Path") +}; MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: '1_files', order: 40, - command: { - id: COPY_PATH_COMMAND_ID, - title: nls.localize('copyPath', "Copy Path") - }, + command: copyPathCommand, when: EditorWithResourceFocusedInOpenEditorsContext }); @@ -633,7 +609,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { id: REVERT_FILE_COMMAND_ID, title: nls.localize('revert', "Revert File") }, - when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext, UntitledEditorNotFocusedInOpenEditorsContext) + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, AutoSaveNotAfterDelayContext, UntitledEditorFocusedInOpenEditorsContext.toNegated()) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -661,26 +637,28 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { id: COMPARE_WITH_SAVED_COMMAND_ID, title: nls.localize('compareWithSaved', "Compare with Saved") }, - when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, UntitledEditorNotFocusedInOpenEditorsContext) + when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, UntitledEditorFocusedInOpenEditorsContext.toNegated()) }); +const compareResourceCommand = { + id: COMPARE_RESOURCE_COMMAND_ID, + title: nls.localize('compareWithChosen', "Compare with Chosen") +}; MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: '3_compare', order: 20, - command: { - id: COMPARE_RESOURCE_COMMAND_ID, - title: nls.localize('compareWithChosen', "Compare with Chosen") - }, + command: compareResourceCommand, when: ContextKeyExpr.and(EditorWithResourceFocusedInOpenEditorsContext, ) }); +const selectForCompareCommand = { + id: SELECT_FOR_COMPARE_COMMAND_ID, + title: nls.localize('compareSource', "Select for Compare") +}; MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: '3_compare', order: 30, - command: { - id: SELECT_FOR_COMPARE_COMMAND_ID, - title: nls.localize('compareSource', "Select for Compare") - }, + command: selectForCompareCommand, when: EditorWithResourceFocusedInOpenEditorsContext }); @@ -724,6 +702,13 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { // Menu registration - explorer +MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { + group: '1_files', + order: 10, + command: openToSideCommand, + when: ContextKeyExpr.and(ResourceContextKey.Scheme.isEqualTo('file'), ExplorerFolderContext.toNegated()) +}); + MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { group: '1_files', order: 20, @@ -734,9 +719,20 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { group: '1_files', order: 40, - command: { - id: COPY_PATH_COMMAND_ID, - title: nls.localize('copyPath', "Copy Path") - }, + command: copyPathCommand, when: ResourceContextKey.Scheme.isEqualTo('file') }); + +MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { + group: '3_compare', + order: 20, + command: compareResourceCommand, + when: ContextKeyExpr.and(ExplorerFolderContext.toNegated(), ResourceContextKey.Scheme.isEqualTo('file')) +}); + +MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { + group: '3_compare', + order: 30, + command: selectForCompareCommand, + when: ContextKeyExpr.and(ExplorerFolderContext.toNegated(), ResourceContextKey.Scheme.isEqualTo('file')) +}); diff --git a/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts b/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts index 7823cae29c3..cbc64378d78 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts @@ -16,7 +16,7 @@ import glob = require('vs/base/common/glob'); import { Action, IAction } from 'vs/base/common/actions'; import { prepareActions } from 'vs/workbench/browser/actions'; import { memoize } from 'vs/base/common/decorators'; -import { IFilesConfiguration, ExplorerFolderContext, FilesExplorerFocusedContext, ExplorerFocusedContext, SortOrderConfiguration, SortOrder, IExplorerView } from 'vs/workbench/parts/files/common/files'; +import { IFilesConfiguration, ExplorerFolderContext, FilesExplorerFocusedContext, ExplorerFocusedContext, SortOrderConfiguration, SortOrder, IExplorerView, ExplorerRootContext } from 'vs/workbench/parts/files/common/files'; import { FileOperation, FileOperationEvent, IResolveFileOptions, FileChangeType, FileChangesEvent, IFileService, FILES_EXCLUDE_CONFIG } from 'vs/platform/files/common/files'; import { RefreshViewExplorerAction, NewFolderAction, NewFileAction } from 'vs/workbench/parts/files/electron-browser/fileActions'; import { FileDragAndDrop, FileFilter, FileSorter, FileController, FileRenderer, FileDataSource, FileViewletState, FileAccessibilityProvider } from 'vs/workbench/parts/files/electron-browser/views/explorerViewer'; @@ -68,6 +68,7 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView private resourceContext: ResourceContextKey; private folderContext: IContextKey; + private rootContext: IContextKey; private fileEventsFilter: ResourceGlobMatcher; @@ -104,6 +105,7 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView this.resourceContext = instantiationService.createInstance(ResourceContextKey); this.folderContext = ExplorerFolderContext.bindTo(contextKeyService); + this.rootContext = ExplorerRootContext.bindTo(contextKeyService); this.fileEventsFilter = instantiationService.createInstance( ResourceGlobMatcher, @@ -442,6 +444,7 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView this.disposables.push(this.explorerViewer.onDidChangeFocus((e: { focus: FileStat }) => { this.resourceContext.set(e.focus && e.focus.resource); this.folderContext.set(e.focus && e.focus.isDirectory); + this.rootContext.set(e.focus && e.focus.isRoot); })); // Open when selecting via keyboard From c65c91e5709cee143b50d09d8022c66edfa7b8f9 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 19 Dec 2017 19:22:20 +0100 Subject: [PATCH 430/615] #40196 - Output channel backed by file - Supporting rotatitng files - Handle the case when the model is being resolved from file - Fallback to BufferredOutputChannel on error --- .../output/electron-browser/outputServices.ts | 562 ++++++++++++------ 1 file changed, 391 insertions(+), 171 deletions(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index 347ccffe032..1816d3ac470 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -5,6 +5,8 @@ import * as nls from 'vs/nls'; import * as paths from 'vs/base/common/paths'; +import * as strings from 'vs/base/common/strings'; +import * as extfs from 'vs/base/node/extfs'; import { TPromise } from 'vs/base/common/winjs.base'; import Event, { Emitter } from 'vs/base/common/event'; import URI from 'vs/base/common/uri'; @@ -13,7 +15,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { Registry } from 'vs/platform/registry/common/platform'; import { EditorOptions } from 'vs/workbench/common/editor'; -import { IOutputChannelIdentifier, IOutputChannel, IOutputService, Extensions, OUTPUT_PANEL_ID, IOutputChannelRegistry, OUTPUT_SCHEME, OUTPUT_MIME } from 'vs/workbench/parts/output/common/output'; +import { IOutputChannelIdentifier, IOutputChannel, IOutputService, Extensions, OUTPUT_PANEL_ID, IOutputChannelRegistry, OUTPUT_SCHEME, OUTPUT_MIME, MAX_OUTPUT_LENGTH } from 'vs/workbench/parts/output/common/output'; import { OutputPanel } from 'vs/workbench/parts/output/browser/outputPanel'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IModelService } from 'vs/editor/common/services/modelService'; @@ -32,11 +34,231 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { RotatingLogger } from 'spdlog'; import { toLocalISOString } from 'vs/base/common/date'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IWindowService } from 'vs/platform/windows/common/windows'; +import { ILogService } from 'vs/platform/log/common/log'; +import { binarySearch } from 'vs/base/common/arrays'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; +let watchingOutputDir = false; +let callbacks = []; +function watchOutputDirectory(outputDir: string, logService: ILogService, onChange: (eventType: string, fileName: string) => void): IDisposable { + callbacks.push(onChange); + if (!watchingOutputDir) { + try { + const watcher = extfs.watch(outputDir, (eventType, fileName) => { + for (const callback of callbacks) { + callback(eventType, fileName); + } + }); + watcher.on('error', (code: number, signal: string) => logService.error(`Error watching ${outputDir}: (${code}, ${signal})`)); + watchingOutputDir = true; + return toDisposable(() => { + callbacks = []; + watcher.removeAllListeners(); + watcher.close(); + }); + } catch (error) { + logService.error(`Error watching ${outputDir}: (${error.toString()})`); + } + } + return toDisposable(() => { }); +} + + +interface OutputChannel extends IOutputChannel { + readonly onDispose: Event; + loadModel(): TPromise; +} + +abstract class AbstractFileOutputChannel extends Disposable { + + scrollLock: boolean = false; + + protected _onDispose: Emitter = new Emitter(); + readonly onDispose: Event = this._onDispose.event; + + protected modelUpdater: RunOnceScheduler; + protected model: IModel; + protected readonly file: URI; + protected startOffset: number = 0; + protected endOffset: number = 0; + + constructor( + protected readonly outputChannelIdentifier: IOutputChannelIdentifier, + protected fileService: IFileService, + protected modelService: IModelService, + protected modeService: IModeService, + private panelService: IPanelService + ) { + super(); + this.file = this.outputChannelIdentifier.file; + this.modelUpdater = new RunOnceScheduler(() => this.updateModel(), 300); + this._register(toDisposable(() => this.modelUpdater.cancel())); + } + + get id(): string { + return this.outputChannelIdentifier.id; + } + + get label(): string { + return this.outputChannelIdentifier.label; + } + + clear(): void { + if (this.modelUpdater.isScheduled()) { + this.modelUpdater.cancel(); + } + if (this.model) { + this.model.setValue(''); + } + this.startOffset = this.endOffset; + } + + loadModel(): TPromise { + return this.fileService.resolveContent(this.file, { position: this.startOffset }) + .then(content => { + if (this.model) { + this.model.setValue(content.value); + } else { + this.model = this.createModel(content.value); + } + this.endOffset = this.startOffset + new Buffer(this.model.getValueLength()).byteLength; + return this.model; + }); + } + + resetModel(): TPromise { + this.startOffset = 0; + this.endOffset = 0; + if (this.model) { + return this.loadModel() as TPromise; + } + return TPromise.as(null); + } + + private createModel(content: string): IModel { + const model = this.modelService.createModel(content, this.modeService.getOrCreateMode(OUTPUT_MIME), URI.from({ scheme: OUTPUT_SCHEME, path: this.id })); + this.onModelCreated(model); + const disposables: IDisposable[] = []; + disposables.push(model.onWillDispose(() => { + this.onModelWillDispose(model); + this.model = null; + dispose(disposables); + })); + return model; + } + + appendToModel(content: string): void { + if (this.model && content) { + const lastLine = this.model.getLineCount(); + const lastLineMaxColumn = this.model.getLineMaxColumn(lastLine); + this.model.applyEdits([EditOperation.insert(new Position(lastLine, lastLineMaxColumn), content)]); + this.endOffset = this.endOffset + new Buffer(content).byteLength; + if (!this.scrollLock) { + const panel = this.panelService.getActivePanel(); + if (panel && panel.getId() === OUTPUT_PANEL_ID) { + (panel).revealLastLine(); + } + } + } + } + + protected onModelCreated(model: IModel) { } + protected onModelWillDispose(model: IModel) { } + protected updateModel() { } + + dispose(): void { + this._onDispose.fire(); + super.dispose(); + } +} + +/** + * An output channel that stores appended messages in a backup file. + */ +class OutputChannelBackedByFile extends AbstractFileOutputChannel implements OutputChannel { + + private outputWriter: RotatingLogger; + private appendedMessage = ''; + private loadingFromFileInProgress: boolean = false; + + constructor( + outputChannelIdentifier: IOutputChannelIdentifier, + @IFileService fileService: IFileService, + @IModelService modelService: IModelService, + @IModeService modeService: IModeService, + @IPanelService panelService: IPanelService, + @ILogService logService: ILogService + ) { + super(outputChannelIdentifier, fileService, modelService, modeService, panelService); + + this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 5, 1); + this.outputWriter.clearFormatters(); + this._register(watchOutputDirectory(paths.dirname(this.file.fsPath), logService, (eventType, file) => this.onFileChangedInOutputDirector(eventType, file))); + } + + append(message: string): void { + if (this.loadingFromFileInProgress) { + this.appendedMessage += message; + } else { + this.outputWriter.critical(message); + if (this.model) { + this.appendedMessage += message; + if (!this.modelUpdater.isScheduled()) { + this.modelUpdater.schedule(); + } + } + } + } + + clear(): void { + super.clear(); + this.appendedMessage = ''; + } + + loadModel(): TPromise { + this.startLoadingFromFile(); + return super.loadModel() + .then(model => { + this.finishedLoadingFromFile(); + return model; + }); + } + + protected updateModel(): void { + if (this.model && this.appendedMessage) { + this.appendToModel(this.appendedMessage); + this.appendedMessage = ''; + } + } + + private startLoadingFromFile(): void { + this.loadingFromFileInProgress = true; + this.outputWriter.flush(); + if (this.modelUpdater.isScheduled()) { + this.modelUpdater.cancel(); + } + this.appendedMessage = ''; + } + + private finishedLoadingFromFile(): void { + if (this.appendedMessage) { + this.outputWriter.critical(this.appendedMessage); + this.appendToModel(this.appendedMessage); + this.appendedMessage = ''; + } + this.loadingFromFileInProgress = false; + } + + private onFileChangedInOutputDirector(eventType: string, fileName: string): void { + if (paths.basename(this.file.fsPath) === fileName) { + this.resetModel(); + } + } +} + class OutputFileListener extends Disposable { private _onDidChange: Emitter = new Emitter(); @@ -71,104 +293,10 @@ class OutputFileListener extends Disposable { } } -interface OutputChannel extends IOutputChannel { - readonly onDispose: Event; - createModel(): TPromise; -} - -abstract class AbstractOutputChannel extends Disposable { - - scrollLock: boolean = false; - - protected _onDispose: Emitter = new Emitter(); - readonly onDispose: Event = this._onDispose.event; - - protected readonly file: URI; - - protected startOffset: number = 0; - protected endOffset: number = 0; - protected modelUpdater: RunOnceScheduler; - - constructor( - protected readonly outputChannelIdentifier: IOutputChannelIdentifier, - protected fileService: IFileService, - protected modelService: IModelService, - protected modeService: IModeService, - private panelService: IPanelService - ) { - super(); - this.file = outputChannelIdentifier.file; - - this.modelUpdater = new RunOnceScheduler(() => this.updateModel(), 300); - this._register(toDisposable(() => this.modelUpdater.cancel())); - } - - get id(): string { - return this.outputChannelIdentifier.id; - } - - get label(): string { - return this.outputChannelIdentifier.label; - } - - clear(): void { - if (this.modelUpdater.isScheduled()) { - this.modelUpdater.cancel(); - } - this.startOffset = this.endOffset; - const model = this.getModel(); - if (model) { - model.setValue(''); - } - } - - createModel(): TPromise { - return this.fileService.resolveContent(this.file, { position: this.startOffset }) - .then(content => { - const model = this.modelService.createModel(content.value, this.modeService.getOrCreateMode(OUTPUT_MIME), URI.from({ scheme: OUTPUT_SCHEME, path: this.id })); - this.endOffset = this.startOffset + new Buffer(model.getValueLength()).byteLength; - this.onModelCreated(model); - const disposables: IDisposable[] = []; - disposables.push(model.onWillDispose(() => { - this.onModelWillDispose(model); - dispose(disposables); - })); - return model; - }); - } - - protected appendContent(content: string): void { - const model = this.getModel(); - if (model && content) { - const lastLine = model.getLineCount(); - const lastLineMaxColumn = model.getLineMaxColumn(lastLine); - model.applyEdits([EditOperation.insert(new Position(lastLine, lastLineMaxColumn), content)]); - this.endOffset = this.endOffset + new Buffer(content).byteLength; - if (!this.scrollLock) { - const panel = this.panelService.getActivePanel(); - if (panel && panel.getId() === OUTPUT_PANEL_ID) { - (panel).revealLastLine(); - } - } - } - } - - protected getModel(): IModel { - const model = this.modelService.getModel(URI.from({ scheme: OUTPUT_SCHEME, path: this.id })); - return model && !model.isDisposed() ? model : null; - } - - protected onModelCreated(model: IModel) { } - protected onModelWillDispose(model: IModel) { } - protected updateModel() { } - - dispose(): void { - this._onDispose.fire(); - super.dispose(); - } -} - -class FileOutputChannel extends AbstractOutputChannel implements OutputChannel { +/** + * An output channel driven by a file and does not support appending messages. + */ +class FileOutputChannel extends AbstractFileOutputChannel implements OutputChannel { private readonly fileHandler: OutputFileListener; @@ -193,11 +321,10 @@ class FileOutputChannel extends AbstractOutputChannel implements OutputChannel { } protected updateModel(): void { - let model = this.getModel(); - if (model) { + if (this.model) { this.fileService.resolveContent(this.file, { position: this.endOffset }) .then(content => { - this.appendContent(content.value); + this.appendToModel(content.value); this.updateInProgress = false; }, () => this.updateInProgress = false); } else { @@ -221,73 +348,13 @@ class FileOutputChannel extends AbstractOutputChannel implements OutputChannel { } } -class AppendableFileOutputChannel extends AbstractOutputChannel implements OutputChannel { - - private outputWriter: RotatingLogger; - private appendedMessage = ''; - - constructor( - outputChannelIdentifier: IOutputChannelIdentifier, - @IFileService fileService: IFileService, - @IModelService modelService: IModelService, - @IModeService modeService: IModeService, - @IPanelService panelService: IPanelService, - @IMessageService private messageService: IMessageService - ) { - super(outputChannelIdentifier, fileService, modelService, modeService, panelService); - try { - this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 30, 5); - this.outputWriter.clearFormatters(); - } catch (e) { - this.messageService.show(Severity.Error, e); - } - } - - append(message: string): void { - if (this.outputWriter) { - this.outputWriter.critical(message); - const model = this.getModel(); - if (model) { - this.appendedMessage += message; - if (!this.modelUpdater.isScheduled()) { - this.modelUpdater.schedule(); - } - } - } - } - - clear(): void { - super.clear(); - this.appendedMessage = ''; - } - - createModel(): TPromise { - if (this.outputWriter) { - this.outputWriter.flush(); - this.appendedMessage = ''; - return super.createModel(); - } - return TPromise.as(this.modelService.createModel('', this.modeService.getOrCreateMode(OUTPUT_MIME), URI.from({ scheme: OUTPUT_SCHEME, path: this.id }))); - } - - protected updateModel(): void { - let model = this.getModel(); - if (model) { - if (this.appendedMessage) { - this.appendContent(this.appendedMessage); - this.appendedMessage = ''; - } - } - } -} - export class OutputService extends Disposable implements IOutputService, ITextModelContentProvider { public _serviceBrand: any; private channels: Map = new Map(); private activeChannelId: string; - private readonly windowSession: string; + private readonly outputDir: string; private _onActiveOutputChannel: Emitter = new Emitter(); readonly onActiveOutputChannel: Event = this._onActiveOutputChannel.event; @@ -301,8 +368,10 @@ export class OutputService extends Disposable implements IOutputService, ITextMo @IWorkspaceContextService contextService: IWorkspaceContextService, @ITextModelService textModelResolverService: ITextModelService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IWindowService private windowService: IWindowService, + @IEnvironmentService environmentService: IEnvironmentService, + @IWindowService windowService: IWindowService, + @ITelemetryService private telemetryService: ITelemetryService, + @ILogService private logService: ILogService ) { super(); const channels = this.getChannels(); @@ -316,13 +385,16 @@ export class OutputService extends Disposable implements IOutputService, ITextMo this.onDidPanelOpen(this.panelService.getActivePanel()); panelService.onDidPanelOpen(this.onDidPanelOpen, this); panelService.onDidPanelClose(this.onDidPanelClose, this); + this.outputDir = paths.join(environmentService.logsPath, `output_${windowService.getCurrentWindowId()}_${toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '')}`); - this.windowSession = `${this.windowService.getCurrentWindowId()}_${toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '')}`; } provideTextContent(resource: URI): TPromise { const channel = this.getChannel(resource.fsPath); - return channel.createModel(); + if (channel) { + return channel.loadModel(); + } + return TPromise.as(null); } showChannel(id: string, preserveFocus?: boolean): TPromise { @@ -383,11 +455,16 @@ export class OutputService extends Disposable implements IOutputService, ITextMo if (channelData && channelData.file) { return this.instantiationService.createInstance(FileOutputChannel, channelData); } - const file = URI.file(paths.join(this.environmentService.logsPath, `outputs_${this.windowSession}`, `${id}.log`)); - return this.instantiationService.createInstance(AppendableFileOutputChannel, { id, label: channelData ? channelData.label : '', file }); + const file = URI.file(paths.join(this.outputDir, `${id}.log`)); + try { + return this.instantiationService.createInstance(OutputChannelBackedByFile, { id, label: channelData ? channelData.label : '', file }); + } catch (e) { + this.logService.error(e); + this.telemetryService.publicLog('output.used.bufferedChannel'); + return this.instantiationService.createInstance(BufferredOutputChannel, { id, label: channelData ? channelData.label : '' }); + } } - private isChannelShown(channelId: string): boolean { const panel = this.panelService.getActivePanel(); return panel && panel.getId() === OUTPUT_PANEL_ID && this.activeChannelId === channelId; @@ -424,4 +501,147 @@ export class OutputService extends Disposable implements IOutputService, ITextMo const label = channelData ? channelData.label : channelId; return this.instantiationService.createInstance(ResourceEditorInput, nls.localize('output', "{0} - Output", label), nls.localize('channel', "Output channel for '{0}'", label), resource); } +} + +// Remove this channel when there are no issues using Output channel backed by file +class BufferredOutputChannel extends Disposable implements OutputChannel { + + readonly id: string; + readonly label: string; + scrollLock: boolean = false; + + private _onDispose: Emitter = new Emitter(); + readonly onDispose: Event = this._onDispose.event; + + private modelUpdater: RunOnceScheduler; + private model: IModel; + private readonly bufferredContent: BufferedContent; + private lastReadId: number = void 0; + + constructor( + protected readonly outputChannelIdentifier: IOutputChannelIdentifier, + @IModelService private modelService: IModelService, + @IModeService private modeService: IModeService, + @IPanelService private panelService: IPanelService + ) { + super(); + + this.id = outputChannelIdentifier.id; + this.label = outputChannelIdentifier.label; + + this.modelUpdater = new RunOnceScheduler(() => this.updateModel(), 300); + this._register(toDisposable(() => this.modelUpdater.cancel())); + + this.bufferredContent = new BufferedContent(); + this._register(toDisposable(() => this.bufferredContent.clear())); + } + + append(output: string) { + this.bufferredContent.append(output); + if (!this.modelUpdater.isScheduled()) { + this.modelUpdater.schedule(); + } + } + + clear(): void { + if (this.modelUpdater.isScheduled()) { + this.modelUpdater.cancel(); + } + if (this.model) { + this.model.setValue(''); + } + this.bufferredContent.clear(); + this.lastReadId = void 0; + } + + loadModel(): TPromise { + const { value, id } = this.bufferredContent.getDelta(this.lastReadId); + if (this.model) { + this.model.setValue(value); + } else { + this.model = this.createModel(value); + } + this.lastReadId = id; + return TPromise.as(this.model); + } + + private createModel(content: string): IModel { + const model = this.modelService.createModel(content, this.modeService.getOrCreateMode(OUTPUT_MIME), URI.from({ scheme: OUTPUT_SCHEME, path: this.id })); + const disposables: IDisposable[] = []; + disposables.push(model.onWillDispose(() => { + this.model = null; + dispose(disposables); + })); + return model; + } + + private updateModel(): void { + if (this.model) { + const { value, id } = this.bufferredContent.getDelta(this.lastReadId); + this.lastReadId = id; + const lastLine = this.model.getLineCount(); + const lastLineMaxColumn = this.model.getLineMaxColumn(lastLine); + this.model.applyEdits([EditOperation.insert(new Position(lastLine, lastLineMaxColumn), value)]); + if (!this.scrollLock) { + const panel = this.panelService.getActivePanel(); + if (panel && panel.getId() === OUTPUT_PANEL_ID) { + (panel).revealLastLine(); + } + } + } + } + + dispose(): void { + this._onDispose.fire(); + super.dispose(); + } +} + +class BufferedContent { + + private data: string[] = []; + private dataIds: number[] = []; + private idPool = 0; + private length = 0; + + public append(content: string): void { + this.data.push(content); + this.dataIds.push(++this.idPool); + this.length += content.length; + this.trim(); + } + + public clear(): void { + this.data.length = 0; + this.dataIds.length = 0; + this.length = 0; + } + + private trim(): void { + if (this.length < MAX_OUTPUT_LENGTH * 1.2) { + return; + } + + while (this.length > MAX_OUTPUT_LENGTH) { + this.dataIds.shift(); + const removed = this.data.shift(); + this.length -= removed.length; + } + } + + public getDelta(previousId?: number): { value: string, id: number } { + let idx = -1; + if (previousId !== void 0) { + idx = binarySearch(this.dataIds, previousId, (a, b) => a - b); + } + + const id = this.idPool; + if (idx >= 0) { + const value = strings.removeAnsiEscapeCodes(this.data.slice(idx + 1).join('')); + return { value, id }; + } else { + const value = strings.removeAnsiEscapeCodes(this.data.join('')); + return { value, id }; + } + } } \ No newline at end of file From 91c4a3c20be390c75c4a902e92d91f6bdc63c038 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 19 Dec 2017 19:23:41 +0100 Subject: [PATCH 431/615] Update the size --- .../workbench/parts/output/electron-browser/outputServices.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index 1816d3ac470..a2f92ae1e67 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -194,7 +194,7 @@ class OutputChannelBackedByFile extends AbstractFileOutputChannel implements Out ) { super(outputChannelIdentifier, fileService, modelService, modeService, panelService); - this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 5, 1); + this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 30, 1); this.outputWriter.clearFormatters(); this._register(watchOutputDirectory(paths.dirname(this.file.fsPath), logService, (eventType, file) => this.onFileChangedInOutputDirector(eventType, file))); } From 6f4f15384ea46839aaa88302589a96284302725a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 19 Dec 2017 20:18:21 +0100 Subject: [PATCH 432/615] #40196 Check if rotating file has changed to know if main file was reset --- .../parts/output/electron-browser/outputServices.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index a2f92ae1e67..edcb0487071 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -24,7 +24,7 @@ import { OutputLinkProvider } from 'vs/workbench/parts/output/common/outputLinkP import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IModel } from 'vs/editor/common/editorCommon'; import { IModeService } from 'vs/editor/common/services/modeService'; -import { RunOnceScheduler } from 'vs/base/common/async'; +import { RunOnceScheduler, ThrottledDelayer } from 'vs/base/common/async'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; import { IFileService, FileChangeType } from 'vs/platform/files/common/files'; @@ -183,6 +183,7 @@ class OutputChannelBackedByFile extends AbstractFileOutputChannel implements Out private outputWriter: RotatingLogger; private appendedMessage = ''; private loadingFromFileInProgress: boolean = false; + private resettingDelayer: ThrottledDelayer; constructor( outputChannelIdentifier: IOutputChannelIdentifier, @@ -194,9 +195,12 @@ class OutputChannelBackedByFile extends AbstractFileOutputChannel implements Out ) { super(outputChannelIdentifier, fileService, modelService, modeService, panelService); - this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 30, 1); + // Use one rotating file to check for main file reset + this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 10, 1); this.outputWriter.clearFormatters(); this._register(watchOutputDirectory(paths.dirname(this.file.fsPath), logService, (eventType, file) => this.onFileChangedInOutputDirector(eventType, file))); + + this.resettingDelayer = new ThrottledDelayer(50); } append(message: string): void { @@ -253,8 +257,9 @@ class OutputChannelBackedByFile extends AbstractFileOutputChannel implements Out } private onFileChangedInOutputDirector(eventType: string, fileName: string): void { - if (paths.basename(this.file.fsPath) === fileName) { - this.resetModel(); + // Check if rotating file has changed. It changes only when the main file exceeds its limit. + if (`${paths.basename(this.file.fsPath)}.1` === fileName) { + this.resettingDelayer.trigger(() => this.resetModel()); } } } From 40884de9c5a6da095e528795a87457ddc8b21151 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 19 Dec 2017 20:21:35 +0100 Subject: [PATCH 433/615] Update size --- .../workbench/parts/output/electron-browser/outputServices.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index edcb0487071..00c44bbd196 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -196,7 +196,7 @@ class OutputChannelBackedByFile extends AbstractFileOutputChannel implements Out super(outputChannelIdentifier, fileService, modelService, modeService, panelService); // Use one rotating file to check for main file reset - this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 10, 1); + this.outputWriter = new RotatingLogger(this.id, this.file.fsPath, 1024 * 1024 * 30, 1); this.outputWriter.clearFormatters(); this._register(watchOutputDirectory(paths.dirname(this.file.fsPath), logService, (eventType, file) => this.onFileChangedInOutputDirector(eventType, file))); From a3f0574a417811258f85a974e36cf2ce5e4e1366 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 19 Dec 2017 21:43:09 +0100 Subject: [PATCH 434/615] Fix #39638 --- .../media/{open_output.svg => open_file.svg} | 0 ...tput_inverse.svg => open_file_inverse.svg} | 0 .../parts/output/browser/media/output.css | 6 ++--- .../parts/output/browser/outputActions.ts | 8 +++--- .../parts/output/browser/outputPanel.ts | 3 ++- .../output/electron-browser/outputServices.ts | 25 ++++++++++++++++--- 6 files changed, 30 insertions(+), 12 deletions(-) rename src/vs/workbench/parts/output/browser/media/{open_output.svg => open_file.svg} (100%) rename src/vs/workbench/parts/output/browser/media/{open_output_inverse.svg => open_file_inverse.svg} (100%) diff --git a/src/vs/workbench/parts/output/browser/media/open_output.svg b/src/vs/workbench/parts/output/browser/media/open_file.svg similarity index 100% rename from src/vs/workbench/parts/output/browser/media/open_output.svg rename to src/vs/workbench/parts/output/browser/media/open_file.svg diff --git a/src/vs/workbench/parts/output/browser/media/open_output_inverse.svg b/src/vs/workbench/parts/output/browser/media/open_file_inverse.svg similarity index 100% rename from src/vs/workbench/parts/output/browser/media/open_output_inverse.svg rename to src/vs/workbench/parts/output/browser/media/open_file_inverse.svg diff --git a/src/vs/workbench/parts/output/browser/media/output.css b/src/vs/workbench/parts/output/browser/media/output.css index c2af514de6d..5b7fa986a9e 100644 --- a/src/vs/workbench/parts/output/browser/media/output.css +++ b/src/vs/workbench/parts/output/browser/media/output.css @@ -12,12 +12,12 @@ background: url('clear_output_inverse.svg') center center no-repeat; } -.monaco-workbench .output-action.open-output { +.monaco-workbench .output-action.open-file { background: url('open_output.svg') center center no-repeat; } -.vs-dark .monaco-workbench .output-action.open-output, -.hc-black .monaco-workbench .output-action.open-output { +.vs-dark .monaco-workbench .output-action.open-file, +.hc-black .monaco-workbench .output-action.open-file { background: url('open_output_inverse.svg') center center no-repeat; } diff --git a/src/vs/workbench/parts/output/browser/outputActions.ts b/src/vs/workbench/parts/output/browser/outputActions.ts index c8398b83498..8339eb4c9a7 100644 --- a/src/vs/workbench/parts/output/browser/outputActions.ts +++ b/src/vs/workbench/parts/output/browser/outputActions.ts @@ -53,16 +53,16 @@ export class ClearOutputAction extends Action { } } -export class OpenInEditorAction extends Action { +export class OpenFileAction extends Action { - public static readonly ID = 'workbench.output.action.openInEditor'; - public static readonly LABEL = nls.localize('openInEditor', "Open in Editor"); + public static readonly ID = 'workbench.output.action.openFile'; + public static readonly LABEL = nls.localize('openFile', "Open File"); constructor( id: string, label: string, @IOutputService private outputService: IOutputService ) { - super(id, label, 'output-action open-output'); + super(id, label, 'output-action open-file'); } public run(): TPromise { diff --git a/src/vs/workbench/parts/output/browser/outputPanel.ts b/src/vs/workbench/parts/output/browser/outputPanel.ts index ffa003b09d7..090131963b0 100644 --- a/src/vs/workbench/parts/output/browser/outputPanel.ts +++ b/src/vs/workbench/parts/output/browser/outputPanel.ts @@ -19,7 +19,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { EditorInput, EditorOptions } from 'vs/workbench/common/editor'; import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResourceEditor'; import { OUTPUT_PANEL_ID, IOutputService, CONTEXT_IN_OUTPUT } from 'vs/workbench/parts/output/common/output'; -import { SwitchOutputAction, SwitchOutputActionItem, ClearOutputAction, ToggleOutputScrollLockAction } from 'vs/workbench/parts/output/browser/outputActions'; +import { SwitchOutputAction, SwitchOutputActionItem, ClearOutputAction, ToggleOutputScrollLockAction, OpenFileAction } from 'vs/workbench/parts/output/browser/outputActions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; @@ -55,6 +55,7 @@ export class OutputPanel extends TextResourceEditor { this.actions = [ this.instantiationService.createInstance(SwitchOutputAction), this.instantiationService.createInstance(ClearOutputAction, ClearOutputAction.ID, ClearOutputAction.LABEL), + this.instantiationService.createInstance(OpenFileAction, OpenFileAction.ID, OpenFileAction.LABEL), this.instantiationService.createInstance(ToggleOutputScrollLockAction, ToggleOutputScrollLockAction.ID, ToggleOutputScrollLockAction.LABEL) ]; diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index 00c44bbd196..958212695db 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -38,6 +38,8 @@ import { IWindowService } from 'vs/platform/windows/common/windows'; import { ILogService } from 'vs/platform/log/common/log'; import { binarySearch } from 'vs/base/common/arrays'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import { IMessageService, Severity } from 'vs/platform/message/common/message'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; @@ -68,8 +70,9 @@ function watchOutputDirectory(outputDir: string, logService: ILogService, onChan interface OutputChannel extends IOutputChannel { - readonly onDispose: Event; + readonly file: URI; loadModel(): TPromise; + readonly onDispose: Event; } abstract class AbstractFileOutputChannel extends Disposable { @@ -81,7 +84,7 @@ abstract class AbstractFileOutputChannel extends Disposable { protected modelUpdater: RunOnceScheduler; protected model: IModel; - protected readonly file: URI; + readonly file: URI; protected startOffset: number = 0; protected endOffset: number = 0; @@ -376,7 +379,8 @@ export class OutputService extends Disposable implements IOutputService, ITextMo @IEnvironmentService environmentService: IEnvironmentService, @IWindowService windowService: IWindowService, @ITelemetryService private telemetryService: ITelemetryService, - @ILogService private logService: ILogService + @ILogService private logService: ILogService, + @IMessageService private messageService: IMessageService ) { super(); const channels = this.getChannels(); @@ -418,7 +422,19 @@ export class OutputService extends Disposable implements IOutputService, ITextMo } showChannelInEditor(channelId: string): TPromise { - return this.editorService.openEditor(this.createInput(channelId)) as TPromise; + const channel = this.getChannel(channelId); + if (channel.file) { + return this.editorService.openEditor({ resource: channel.file }) + .then(editor => { + const codeEditor = editor.getControl() as ICodeEditor; + codeEditor.updateOptions({ + readOnly: true + }); + codeEditor.revealLine(codeEditor.getModel().getLineCount() - 1); + }); + } + this.messageService.show(Severity.Info, nls.localize('noFile', "There is no file associated to this channel")); + return TPromise.as(null); } getChannel(id: string): IOutputChannel { @@ -513,6 +529,7 @@ class BufferredOutputChannel extends Disposable implements OutputChannel { readonly id: string; readonly label: string; + readonly file: URI = null; scrollLock: boolean = false; private _onDispose: Emitter = new Emitter(); From bdeb370602ab21af0fdeed309432278e5f747e84 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 19 Dec 2017 13:46:10 -0800 Subject: [PATCH 435/615] Apply comment filter when wrap with abbr fixes #40471 --- extensions/emmet/src/abbreviationActions.ts | 12 +++- .../src/test/wrapWithAbbreviation.test.ts | 60 +++++++++++++++++++ 2 files changed, 69 insertions(+), 3 deletions(-) diff --git a/extensions/emmet/src/abbreviationActions.ts b/extensions/emmet/src/abbreviationActions.ts index 70c87da5bc6..b895413c59b 100644 --- a/extensions/emmet/src/abbreviationActions.ts +++ b/extensions/emmet/src/abbreviationActions.ts @@ -32,8 +32,14 @@ export function wrapWithAbbreviation(args: any) { const abbreviationPromise = (args && args['abbreviation']) ? Promise.resolve(args['abbreviation']) : vscode.window.showInputBox({ prompt: 'Enter Abbreviation' }); const helper = getEmmetHelper(); - return abbreviationPromise.then(abbreviation => { - if (!abbreviation || !abbreviation.trim() || !helper.isAbbreviationValid(syntax, abbreviation)) { return false; } + return abbreviationPromise.then(inputAbbreviation => { + if (!inputAbbreviation || !inputAbbreviation.trim() || !helper.isAbbreviationValid(syntax, inputAbbreviation)) { return false; } + + let extractedResults = helper.extractAbbreviationFromText(inputAbbreviation); + if (!extractedResults) { + return false; + } + let { abbreviation, filter } = extractedResults; let expandAbbrList: ExpandAbbreviationInput[] = []; @@ -48,7 +54,7 @@ export function wrapWithAbbreviation(args: any) { const preceedingWhiteSpace = matches ? matches[1].length : 0; rangeToReplace = new vscode.Range(rangeToReplace.start.line, rangeToReplace.start.character + preceedingWhiteSpace, rangeToReplace.end.line, rangeToReplace.end.character); - expandAbbrList.push({ syntax, abbreviation, rangeToReplace, textToWrap: ['\n\t$TM_SELECTED_TEXT\n'] }); + expandAbbrList.push({ syntax, abbreviation, rangeToReplace, textToWrap: ['\n\t$TM_SELECTED_TEXT\n'], filter }); }); return expandAbbreviationInRange(editor, expandAbbrList, true); diff --git a/extensions/emmet/src/test/wrapWithAbbreviation.test.ts b/extensions/emmet/src/test/wrapWithAbbreviation.test.ts index 364861d98bd..2739fc496d9 100644 --- a/extensions/emmet/src/test/wrapWithAbbreviation.test.ts +++ b/extensions/emmet/src/test/wrapWithAbbreviation.test.ts @@ -112,6 +112,35 @@ suite('Tests for Wrap with Abbreviations', () => { return testWrapWithAbbreviation(multiCursorsWithFullLineSelection, 'ul>li', wrapMultiLineAbbrExpected); }); + test('Wrap with abbreviation and comment filter', () => { + const contents = ` + + `; + const expectedContents = ` + + `; + + return withRandomFileEditor(contents, 'html', (editor, doc) => { + editor.selections = [new Selection(2, 0, 2, 0)]; + const promise = wrapWithAbbreviation({ abbreviation: 'li.hello|c' }); + if (!promise) { + assert.equal(1, 2, 'Wrap returned udnefined instead of promise.'); + return Promise.resolve(); + } + return promise.then(() => { + assert.equal(editor.document.getText(), expectedContents); + return Promise.resolve(); + }); + }); + }); + test('Wrap individual lines with abbreviation', () => { const contents = `