mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Merge from vscode da3c97f3668393ebfcb9f8208d7616018d6d1859 (#5360)
This commit is contained in:
@@ -40,6 +40,7 @@ function extractEditor(options) {
|
|||||||
compilerOptions.noUnusedLocals = false;
|
compilerOptions.noUnusedLocals = false;
|
||||||
compilerOptions.preserveConstEnums = false;
|
compilerOptions.preserveConstEnums = false;
|
||||||
compilerOptions.declaration = false;
|
compilerOptions.declaration = false;
|
||||||
|
compilerOptions.noImplicitAny = false;
|
||||||
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
|
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
|
||||||
options.compilerOptions = compilerOptions;
|
options.compilerOptions = compilerOptions;
|
||||||
let result = tss.shake(options);
|
let result = tss.shake(options);
|
||||||
@@ -90,6 +91,8 @@ function extractEditor(options) {
|
|||||||
}
|
}
|
||||||
delete tsConfig.compilerOptions.moduleResolution;
|
delete tsConfig.compilerOptions.moduleResolution;
|
||||||
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
|
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
|
||||||
|
const tsConfigBase = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.base.json')).toString());
|
||||||
|
writeOutputFile('tsconfig.base.json', JSON.stringify(tsConfigBase, null, '\t'));
|
||||||
[
|
[
|
||||||
'vs/css.build.js',
|
'vs/css.build.js',
|
||||||
'vs/css.d.ts',
|
'vs/css.d.ts',
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
|
|||||||
compilerOptions.noUnusedLocals = false;
|
compilerOptions.noUnusedLocals = false;
|
||||||
compilerOptions.preserveConstEnums = false;
|
compilerOptions.preserveConstEnums = false;
|
||||||
compilerOptions.declaration = false;
|
compilerOptions.declaration = false;
|
||||||
|
compilerOptions.noImplicitAny = false;
|
||||||
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
|
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
|
||||||
|
|
||||||
|
|
||||||
@@ -99,6 +100,8 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
|
|||||||
|
|
||||||
delete tsConfig.compilerOptions.moduleResolution;
|
delete tsConfig.compilerOptions.moduleResolution;
|
||||||
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
|
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
|
||||||
|
const tsConfigBase = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.base.json')).toString());
|
||||||
|
writeOutputFile('tsconfig.base.json', JSON.stringify(tsConfigBase, null, '\t'));
|
||||||
|
|
||||||
[
|
[
|
||||||
'vs/css.build.js',
|
'vs/css.build.js',
|
||||||
|
|||||||
@@ -306,6 +306,8 @@ function getGitErrorCode(stderr: string): string | undefined {
|
|||||||
return GitErrorCodes.BranchAlreadyExists;
|
return GitErrorCodes.BranchAlreadyExists;
|
||||||
} else if (/'.+' is not a valid branch name/.test(stderr)) {
|
} else if (/'.+' is not a valid branch name/.test(stderr)) {
|
||||||
return GitErrorCodes.InvalidBranchName;
|
return GitErrorCodes.InvalidBranchName;
|
||||||
|
} else if (/Please,? commit your changes or stash them/.test(stderr)) {
|
||||||
|
return GitErrorCodes.DirtyWorkTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"preserveConstEnums": true,
|
"preserveConstEnums": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
"declaration": true,
|
"declaration": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"typings/require.d.ts",
|
"typings/require.d.ts",
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class CacheItem {
|
|||||||
) { }
|
) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
class CodeLensCache implements ICodeLensCache {
|
export class CodeLensCache implements ICodeLensCache {
|
||||||
|
|
||||||
_serviceBrand: any;
|
_serviceBrand: any;
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ import { ISuggestMemoryService, SuggestMemoryService } from 'vs/editor/contrib/s
|
|||||||
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
|
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
|
||||||
import { BrowserAccessibilityService } from 'vs/platform/accessibility/common/accessibilityService';
|
import { BrowserAccessibilityService } from 'vs/platform/accessibility/common/accessibilityService';
|
||||||
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
||||||
|
import { ICodeLensCache, CodeLensCache } from 'vs/editor/contrib/codelens/codeLensCache';
|
||||||
|
|
||||||
export interface IEditorOverrideServices {
|
export interface IEditorOverrideServices {
|
||||||
[index: string]: any;
|
[index: string]: any;
|
||||||
@@ -159,6 +160,7 @@ export module StaticServices {
|
|||||||
|
|
||||||
export const suggestMemoryService = define(ISuggestMemoryService, (o) => new SuggestMemoryService(storageService.get(o), configurationService.get(o)));
|
export const suggestMemoryService = define(ISuggestMemoryService, (o) => new SuggestMemoryService(storageService.get(o), configurationService.get(o)));
|
||||||
|
|
||||||
|
export const codeLensCacheService = define(ICodeLensCache, (o) => new CodeLensCache(storageService.get(o)));
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DynamicStandaloneServices extends Disposable {
|
export class DynamicStandaloneServices extends Disposable {
|
||||||
|
|||||||
48
src/vs/vscode.d.ts
vendored
48
src/vs/vscode.d.ts
vendored
@@ -9024,57 +9024,61 @@ declare module 'vscode' {
|
|||||||
dispose(): void;
|
dispose(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Author information of a [comment](#Comment)
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface CommentAuthorInformation {
|
||||||
|
/**
|
||||||
|
* The display name of the author of the comment
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The optional icon path for the author
|
||||||
|
*/
|
||||||
|
iconPath?: Uri;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A comment is displayed within the editor or the Comments Panel, depending on how it is provided.
|
* A comment is displayed within the editor or the Comments Panel, depending on how it is provided.
|
||||||
*/
|
*/
|
||||||
export class Comment {
|
export interface Comment {
|
||||||
/**
|
/**
|
||||||
* The id of the comment
|
* The id of the comment
|
||||||
*/
|
*/
|
||||||
readonly id: string;
|
id: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The human-readable comment body
|
* The human-readable comment body
|
||||||
*/
|
*/
|
||||||
readonly body: MarkdownString;
|
body: MarkdownString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The display name of the user who created the comment
|
* The author information of the comment
|
||||||
*/
|
*/
|
||||||
readonly userName: string;
|
author: CommentAuthorInformation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional label describing the [Comment](#Comment)
|
* Optional label describing the [Comment](#Comment)
|
||||||
* Label will be rendered next to userName if exists.
|
* Label will be rendered next to authorName if exists.
|
||||||
*/
|
*/
|
||||||
readonly label?: string;
|
label?: string;
|
||||||
|
|
||||||
/**
|
|
||||||
* The icon path for the user who created the comment
|
|
||||||
*/
|
|
||||||
readonly userIconPath?: Uri;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The command to be executed if the comment is selected in the Comments Panel
|
* The command to be executed if the comment is selected in the Comments Panel
|
||||||
*/
|
*/
|
||||||
readonly selectCommand?: Command;
|
selectCommand?: Command;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The command to be executed when users try to save the edits to the comment
|
* The command to be executed when users try to save the edits to the comment
|
||||||
*/
|
*/
|
||||||
readonly editCommand?: Command;
|
editCommand?: Command;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The command to be executed when users try to delete the comment
|
* The command to be executed when users try to delete the comment
|
||||||
*/
|
*/
|
||||||
readonly deleteCommand?: Command;
|
deleteCommand?: Command;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param id The id of the comment
|
|
||||||
* @param body The human-readable comment body
|
|
||||||
* @param userName The display name of the user who created the comment
|
|
||||||
*/
|
|
||||||
constructor(id: string, body: MarkdownString, userName: string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
12
src/vs/vscode.proposed.d.ts
vendored
12
src/vs/vscode.proposed.d.ts
vendored
@@ -738,7 +738,17 @@ declare module 'vscode' {
|
|||||||
/**
|
/**
|
||||||
* A comment is displayed within the editor or the Comments Panel, depending on how it is provided.
|
* A comment is displayed within the editor or the Comments Panel, depending on how it is provided.
|
||||||
*/
|
*/
|
||||||
export class CommentLegacy extends Comment {
|
export interface Comment {
|
||||||
|
/**
|
||||||
|
* The display name of the user who created the comment
|
||||||
|
*/
|
||||||
|
readonly userName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The icon path for the user who created the comment
|
||||||
|
*/
|
||||||
|
readonly userIconPath?: Uri;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The id of the comment
|
* The id of the comment
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -392,7 +392,7 @@ export class ExtHostCommentThread implements vscode.CommentThread {
|
|||||||
readonly onDidUpdateCommentThread = this._onDidUpdateCommentThread.event;
|
readonly onDidUpdateCommentThread = this._onDidUpdateCommentThread.event;
|
||||||
|
|
||||||
set range(range: vscode.Range) {
|
set range(range: vscode.Range) {
|
||||||
if (range.isEqual(this._range)) {
|
if (!range.isEqual(this._range)) {
|
||||||
this._range = range;
|
this._range = range;
|
||||||
this._onDidUpdateCommentThread.fire();
|
this._onDidUpdateCommentThread.fire();
|
||||||
}
|
}
|
||||||
@@ -413,11 +413,11 @@ export class ExtHostCommentThread implements vscode.CommentThread {
|
|||||||
this._onDidUpdateCommentThread.fire();
|
this._onDidUpdateCommentThread.fire();
|
||||||
}
|
}
|
||||||
|
|
||||||
get comments(): (vscode.Comment & vscode.CommentLegacy)[] {
|
get comments(): vscode.Comment[] {
|
||||||
return this._comments;
|
return this._comments;
|
||||||
}
|
}
|
||||||
|
|
||||||
set comments(newComments: (vscode.Comment & vscode.CommentLegacy)[]) {
|
set comments(newComments: vscode.Comment[]) {
|
||||||
this._comments = newComments;
|
this._comments = newComments;
|
||||||
this._onDidUpdateCommentThread.fire();
|
this._onDidUpdateCommentThread.fire();
|
||||||
}
|
}
|
||||||
@@ -478,7 +478,7 @@ export class ExtHostCommentThread implements vscode.CommentThread {
|
|||||||
private _id: string,
|
private _id: string,
|
||||||
private _resource: vscode.Uri,
|
private _resource: vscode.Uri,
|
||||||
private _range: vscode.Range,
|
private _range: vscode.Range,
|
||||||
private _comments: (vscode.Comment & vscode.CommentLegacy)[]
|
private _comments: vscode.Comment[]
|
||||||
) {
|
) {
|
||||||
this._proxy.$createCommentThread(
|
this._proxy.$createCommentThread(
|
||||||
this._commentController.handle,
|
this._commentController.handle,
|
||||||
@@ -662,7 +662,7 @@ class ExtHostCommentController implements vscode.CommentController {
|
|||||||
this._proxy.$registerCommentController(this.handle, _id, _label);
|
this._proxy.$registerCommentController(this.handle, _id, _label);
|
||||||
}
|
}
|
||||||
|
|
||||||
createCommentThread(id: string, resource: vscode.Uri, range: vscode.Range, comments: (vscode.Comment & vscode.CommentLegacy)[]): vscode.CommentThread {
|
createCommentThread(id: string, resource: vscode.Uri, range: vscode.Range, comments: vscode.Comment[]): vscode.CommentThread {
|
||||||
const commentThread = new ExtHostCommentThread(this._proxy, this._commandsConverter, this, id, resource, range, comments);
|
const commentThread = new ExtHostCommentThread(this._proxy, this._commandsConverter, this, id, resource, range, comments);
|
||||||
this._threads.set(commentThread.handle, commentThread);
|
this._threads.set(commentThread.handle, commentThread);
|
||||||
return commentThread;
|
return commentThread;
|
||||||
@@ -708,7 +708,7 @@ function convertToCommentThread(extensionId: ExtensionIdentifier, provider: vsco
|
|||||||
threadId: vscodeCommentThread.id,
|
threadId: vscodeCommentThread.id,
|
||||||
resource: vscodeCommentThread.resource.toString(),
|
resource: vscodeCommentThread.resource.toString(),
|
||||||
range: extHostTypeConverter.Range.from(vscodeCommentThread.range),
|
range: extHostTypeConverter.Range.from(vscodeCommentThread.range),
|
||||||
comments: vscodeCommentThread.comments.map(comment => convertToComment(provider, comment as vscode.Comment & vscode.CommentLegacy, commandsConverter)),
|
comments: vscodeCommentThread.comments.map(comment => convertToComment(provider, comment as vscode.Comment, commandsConverter)),
|
||||||
collapsibleState: vscodeCommentThread.collapsibleState
|
collapsibleState: vscodeCommentThread.collapsibleState
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -725,7 +725,7 @@ function convertFromCommentThread(commentThread: modes.CommentThread): vscode.Co
|
|||||||
} as vscode.CommentThread;
|
} as vscode.CommentThread;
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertFromComment(comment: modes.Comment): vscode.Comment & vscode.CommentLegacy {
|
function convertFromComment(comment: modes.Comment): vscode.Comment {
|
||||||
let userIconPath: URI | undefined;
|
let userIconPath: URI | undefined;
|
||||||
if (comment.userIconPath) {
|
if (comment.userIconPath) {
|
||||||
try {
|
try {
|
||||||
@@ -739,6 +739,10 @@ function convertFromComment(comment: modes.Comment): vscode.Comment & vscode.Com
|
|||||||
id: comment.commentId,
|
id: comment.commentId,
|
||||||
commentId: comment.commentId,
|
commentId: comment.commentId,
|
||||||
body: extHostTypeConverter.MarkdownString.to(comment.body),
|
body: extHostTypeConverter.MarkdownString.to(comment.body),
|
||||||
|
author: {
|
||||||
|
name: comment.userName,
|
||||||
|
iconPath: userIconPath
|
||||||
|
},
|
||||||
userName: comment.userName,
|
userName: comment.userName,
|
||||||
userIconPath: userIconPath,
|
userIconPath: userIconPath,
|
||||||
canEdit: comment.canEdit,
|
canEdit: comment.canEdit,
|
||||||
@@ -754,13 +758,14 @@ function convertFromComment(comment: modes.Comment): vscode.Comment & vscode.Com
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertToModeComment(commentController: ExtHostCommentController, vscodeComment: vscode.Comment & vscode.CommentLegacy, commandsConverter: CommandsConverter): modes.Comment {
|
function convertToModeComment(commentController: ExtHostCommentController, vscodeComment: vscode.Comment, commandsConverter: CommandsConverter): modes.Comment {
|
||||||
const iconPath = vscodeComment.userIconPath ? vscodeComment.userIconPath.toString() : vscodeComment.gravatar;
|
const iconPath = vscodeComment.author && vscodeComment.author.iconPath ? vscodeComment.author.iconPath.toString() :
|
||||||
|
(vscodeComment.userIconPath ? vscodeComment.userIconPath.toString() : vscodeComment.gravatar);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
commentId: vscodeComment.id || vscodeComment.commentId,
|
commentId: vscodeComment.id || vscodeComment.commentId,
|
||||||
body: extHostTypeConverter.MarkdownString.from(vscodeComment.body),
|
body: extHostTypeConverter.MarkdownString.from(vscodeComment.body),
|
||||||
userName: vscodeComment.userName,
|
userName: vscodeComment.author ? vscodeComment.author.name : vscodeComment.userName,
|
||||||
userIconPath: iconPath,
|
userIconPath: iconPath,
|
||||||
isDraft: vscodeComment.isDraft,
|
isDraft: vscodeComment.isDraft,
|
||||||
selectCommand: vscodeComment.selectCommand ? commandsConverter.toInternal(vscodeComment.selectCommand) : undefined,
|
selectCommand: vscodeComment.selectCommand ? commandsConverter.toInternal(vscodeComment.selectCommand) : undefined,
|
||||||
@@ -771,7 +776,7 @@ function convertToModeComment(commentController: ExtHostCommentController, vscod
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertToComment(provider: vscode.DocumentCommentProvider | vscode.WorkspaceCommentProvider, vscodeComment: vscode.Comment & vscode.CommentLegacy, commandsConverter: CommandsConverter): modes.Comment {
|
function convertToComment(provider: vscode.DocumentCommentProvider | vscode.WorkspaceCommentProvider, vscodeComment: vscode.Comment, commandsConverter: CommandsConverter): modes.Comment {
|
||||||
const canEdit = !!(provider as vscode.DocumentCommentProvider).editComment && vscodeComment.canEdit;
|
const canEdit = !!(provider as vscode.DocumentCommentProvider).editComment && vscodeComment.canEdit;
|
||||||
const canDelete = !!(provider as vscode.DocumentCommentProvider).deleteComment && vscodeComment.canDelete;
|
const canDelete = !!(provider as vscode.DocumentCommentProvider).deleteComment && vscodeComment.canDelete;
|
||||||
const iconPath = vscodeComment.userIconPath ? vscodeComment.userIconPath.toString() : vscodeComment.gravatar;
|
const iconPath = vscodeComment.userIconPath ? vscodeComment.userIconPath.toString() : vscodeComment.gravatar;
|
||||||
|
|||||||
@@ -2288,61 +2288,6 @@ export enum FoldingRangeKind {
|
|||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region Comment
|
//#region Comment
|
||||||
@es5ClassCompat
|
|
||||||
export class Comment {
|
|
||||||
id: string;
|
|
||||||
body: MarkdownString;
|
|
||||||
userName: string;
|
|
||||||
label?: string;
|
|
||||||
userIconPath?: URI;
|
|
||||||
selectCommand?: vscode.Command;
|
|
||||||
editCommand?: vscode.Command;
|
|
||||||
deleteCommand?: vscode.Command;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The id of the comment
|
|
||||||
*
|
|
||||||
* @deprecated Use Id instead
|
|
||||||
*/
|
|
||||||
commentId: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use userIconPath instead. The avatar src of the user who created the comment
|
|
||||||
*/
|
|
||||||
gravatar?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated, use editCommand
|
|
||||||
*/
|
|
||||||
canEdit?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated, use deleteCommand
|
|
||||||
*/
|
|
||||||
canDelete?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
command?: vscode.Command;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
isDraft?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Proposed Comment Reaction
|
|
||||||
*/
|
|
||||||
commentReactions?: vscode.CommentReaction[];
|
|
||||||
|
|
||||||
constructor(id: string, body: MarkdownString, userName: string) {
|
|
||||||
this.id = id;
|
|
||||||
this.body = body;
|
|
||||||
this.userName = userName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum CommentThreadCollapsibleState {
|
export enum CommentThreadCollapsibleState {
|
||||||
/**
|
/**
|
||||||
* Determines an item is collapsed
|
* Determines an item is collapsed
|
||||||
|
|||||||
@@ -780,8 +780,6 @@ export function createApiFactory(
|
|||||||
Color: extHostTypes.Color,
|
Color: extHostTypes.Color,
|
||||||
ColorInformation: extHostTypes.ColorInformation,
|
ColorInformation: extHostTypes.ColorInformation,
|
||||||
ColorPresentation: extHostTypes.ColorPresentation,
|
ColorPresentation: extHostTypes.ColorPresentation,
|
||||||
Comment: extHostTypes.Comment,
|
|
||||||
CommentLegacy: extHostTypes.Comment,
|
|
||||||
CommentThreadCollapsibleState: extHostTypes.CommentThreadCollapsibleState,
|
CommentThreadCollapsibleState: extHostTypes.CommentThreadCollapsibleState,
|
||||||
CompletionItem: extHostTypes.CompletionItem,
|
CompletionItem: extHostTypes.CompletionItem,
|
||||||
CompletionItemKind: extHostTypes.CompletionItemKind,
|
CompletionItemKind: extHostTypes.CompletionItemKind,
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ export class OutlinePanel extends ViewletPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!editor || !editor.hasModel() || !DocumentSymbolProviderRegistry.has(editor.getModel())) {
|
if (!editor || !editor.hasModel() || !DocumentSymbolProviderRegistry.has(editor.getModel())) {
|
||||||
return this._showMessage(localize('no-editor', "There are no editors open that can provide outline information."));
|
return this._showMessage(localize('no-editor', "The active editor cannot provide outline information."));
|
||||||
}
|
}
|
||||||
|
|
||||||
let textModel = editor.getModel();
|
let textModel = editor.getModel();
|
||||||
|
|||||||
Reference in New Issue
Block a user