mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-07 02:51:37 -05:00
Vscode merge (#4582)
* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd * fix issues with merges * bump node version in azpipe * replace license headers * remove duplicate launch task * fix build errors * fix build errors * fix tslint issues * working through package and linux build issues * more work * wip * fix packaged builds * working through linux build errors * wip * wip * wip * fix mac and linux file limits * iterate linux pipeline * disable editor typing * revert series to parallel * remove optimize vscode from linux * fix linting issues * revert testing change * add work round for new node * readd packaging for extensions * fix issue with angular not resolving decorator dependencies
This commit is contained in:
@@ -9,7 +9,7 @@ import { Event } from 'vs/base/common/event';
|
||||
import { IMarkdownString } from 'vs/base/common/htmlContent';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { isObject } from 'vs/base/common/types';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { URI, UriComponents } from 'vs/base/common/uri';
|
||||
import { Position } from 'vs/editor/common/core/position';
|
||||
import { IRange, Range } from 'vs/editor/common/core/range';
|
||||
import { Selection } from 'vs/editor/common/core/selection';
|
||||
@@ -18,6 +18,7 @@ import * as model from 'vs/editor/common/model';
|
||||
import { LanguageFeatureRegistry } from 'vs/editor/common/modes/languageFeatureRegistry';
|
||||
import { TokenizationRegistryImpl } from 'vs/editor/common/modes/tokenizationRegistry';
|
||||
import { IMarkerData } from 'vs/platform/markers/common/markers';
|
||||
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
|
||||
|
||||
/**
|
||||
* Open ended enum at runtime
|
||||
@@ -286,7 +287,7 @@ export const enum CompletionItemKind {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export let completionKindToCssClass = (function () {
|
||||
export const completionKindToCssClass = (function () {
|
||||
let data = Object.create(null);
|
||||
data[CompletionItemKind.Method] = 'method';
|
||||
data[CompletionItemKind.Function] = 'function';
|
||||
@@ -323,11 +324,14 @@ export let completionKindToCssClass = (function () {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export let completionKindFromLegacyString = (function () {
|
||||
let data = Object.create(null);
|
||||
export let completionKindFromString: {
|
||||
(value: string): CompletionItemKind;
|
||||
(value: string, strict: true): CompletionItemKind | undefined;
|
||||
} = (function () {
|
||||
let data: Record<string, CompletionItemKind> = Object.create(null);
|
||||
data['method'] = CompletionItemKind.Method;
|
||||
data['function'] = CompletionItemKind.Function;
|
||||
data['constructor'] = CompletionItemKind.Constructor;
|
||||
data['constructor'] = <any>CompletionItemKind.Constructor;
|
||||
data['field'] = CompletionItemKind.Field;
|
||||
data['variable'] = CompletionItemKind.Variable;
|
||||
data['class'] = CompletionItemKind.Class;
|
||||
@@ -342,6 +346,7 @@ export let completionKindFromLegacyString = (function () {
|
||||
data['constant'] = CompletionItemKind.Constant;
|
||||
data['enum'] = CompletionItemKind.Enum;
|
||||
data['enum-member'] = CompletionItemKind.EnumMember;
|
||||
data['enumMember'] = CompletionItemKind.EnumMember;
|
||||
data['keyword'] = CompletionItemKind.Keyword;
|
||||
data['snippet'] = CompletionItemKind.Snippet;
|
||||
data['text'] = CompletionItemKind.Text;
|
||||
@@ -351,9 +356,14 @@ export let completionKindFromLegacyString = (function () {
|
||||
data['customcolor'] = CompletionItemKind.Customcolor;
|
||||
data['folder'] = CompletionItemKind.Folder;
|
||||
data['type-parameter'] = CompletionItemKind.TypeParameter;
|
||||
data['typeParameter'] = CompletionItemKind.TypeParameter;
|
||||
|
||||
return function (value: string) {
|
||||
return data[value] || 'property';
|
||||
return function (value: string, strict?: true) {
|
||||
let res = data[value];
|
||||
if (typeof res === 'undefined' && !strict) {
|
||||
res = CompletionItemKind.Property;
|
||||
}
|
||||
return res;
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -667,7 +677,7 @@ export interface DocumentHighlight {
|
||||
/**
|
||||
* The highlight kind, default is [text](#DocumentHighlightKind.Text).
|
||||
*/
|
||||
kind: DocumentHighlightKind;
|
||||
kind?: DocumentHighlightKind;
|
||||
}
|
||||
/**
|
||||
* The document highlight provider interface defines the contract between extensions and
|
||||
@@ -864,8 +874,8 @@ export const symbolKindToCssClass = (function () {
|
||||
_fromMapping[SymbolKind.Operator] = 'operator';
|
||||
_fromMapping[SymbolKind.TypeParameter] = 'type-parameter';
|
||||
|
||||
return function toCssClassName(kind: SymbolKind): string {
|
||||
return `symbol-icon ${_fromMapping[kind] || 'property'}`;
|
||||
return function toCssClassName(kind: SymbolKind, inline?: boolean): string {
|
||||
return `symbol-icon ${inline ? 'inline' : 'block'} ${_fromMapping[kind] || 'property'}`;
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -914,7 +924,10 @@ export interface FormattingOptions {
|
||||
*/
|
||||
export interface DocumentFormattingEditProvider {
|
||||
|
||||
displayName?: string;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
readonly extensionId?: ExtensionIdentifier;
|
||||
|
||||
/**
|
||||
* Provide formatting edits for a whole document.
|
||||
@@ -927,7 +940,11 @@ export interface DocumentFormattingEditProvider {
|
||||
*/
|
||||
export interface DocumentRangeFormattingEditProvider {
|
||||
|
||||
displayName?: string;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
readonly extensionId?: ExtensionIdentifier;
|
||||
|
||||
/**
|
||||
* Provide formatting edits for a range in a document.
|
||||
@@ -943,7 +960,15 @@ export interface DocumentRangeFormattingEditProvider {
|
||||
* the formatting-feature.
|
||||
*/
|
||||
export interface OnTypeFormattingEditProvider {
|
||||
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
readonly extensionId?: ExtensionIdentifier;
|
||||
|
||||
autoFormatTriggerCharacters: string[];
|
||||
|
||||
/**
|
||||
* Provide formatting edits after a character has been typed.
|
||||
*
|
||||
@@ -967,7 +992,7 @@ export interface IInplaceReplaceSupportResult {
|
||||
*/
|
||||
export interface ILink {
|
||||
range: IRange;
|
||||
url?: string;
|
||||
url?: URI | string;
|
||||
}
|
||||
/**
|
||||
* A provider of links.
|
||||
@@ -1064,7 +1089,7 @@ export interface SelectionRangeProvider {
|
||||
/**
|
||||
* Provide ranges that should be selected from the given position.
|
||||
*/
|
||||
provideSelectionRanges(model: model.ITextModel, position: Position, token: CancellationToken): ProviderResult<SelectionRange[]>;
|
||||
provideSelectionRanges(model: model.ITextModel, positions: Position[], token: CancellationToken): ProviderResult<SelectionRange[][]>;
|
||||
}
|
||||
|
||||
export interface FoldingContext {
|
||||
@@ -1178,11 +1203,11 @@ export interface Command {
|
||||
* @internal
|
||||
*/
|
||||
export interface CommentInfo {
|
||||
extensionId: string;
|
||||
extensionId?: string;
|
||||
threads: CommentThread[];
|
||||
commentingRanges?: IRange[];
|
||||
commentingRanges?: (IRange[] | CommentingRanges);
|
||||
reply?: Command;
|
||||
draftMode: DraftMode;
|
||||
draftMode?: DraftMode;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1208,13 +1233,68 @@ export enum CommentThreadCollapsibleState {
|
||||
Expanded = 1
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface CommentWidget {
|
||||
commentThread: CommentThread;
|
||||
comment?: Comment;
|
||||
input: string;
|
||||
onDidChangeInput: Event<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface CommentInput {
|
||||
value: string;
|
||||
uri: URI;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface CommentThread2 {
|
||||
commentThreadHandle: number;
|
||||
extensionId?: string;
|
||||
threadId: string | null;
|
||||
resource: string | null;
|
||||
range: IRange;
|
||||
label: string;
|
||||
comments: Comment[];
|
||||
onDidChangeComments: Event<Comment[]>;
|
||||
collapsibleState?: CommentThreadCollapsibleState;
|
||||
input?: CommentInput;
|
||||
onDidChangeInput: Event<CommentInput | undefined>;
|
||||
acceptInputCommand?: Command;
|
||||
additionalCommands: Command[];
|
||||
onDidChangeAcceptInputCommand: Event<Command>;
|
||||
onDidChangeAdditionalCommands: Event<Command[]>;
|
||||
onDidChangeRange: Event<IRange>;
|
||||
onDidChangeLabel: Event<string>;
|
||||
onDidChangeCollasibleState: Event<CommentThreadCollapsibleState>;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
export interface CommentingRanges {
|
||||
readonly resource: URI;
|
||||
ranges: IRange[];
|
||||
newCommentThreadCommand?: Command;
|
||||
newCommentThreadCallback?: (uri: UriComponents, range: IRange) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface CommentThread {
|
||||
extensionId: string;
|
||||
threadId: string;
|
||||
resource: string;
|
||||
extensionId?: string;
|
||||
threadId: string | null;
|
||||
resource: string | null;
|
||||
range: IRange;
|
||||
comments: Comment[];
|
||||
collapsibleState?: CommentThreadCollapsibleState;
|
||||
@@ -1234,7 +1314,10 @@ export interface NewCommentAction {
|
||||
*/
|
||||
export interface CommentReaction {
|
||||
readonly label?: string;
|
||||
readonly iconPath?: UriComponents;
|
||||
readonly count?: number;
|
||||
readonly hasReacted?: boolean;
|
||||
readonly canEdit?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1244,12 +1327,15 @@ export interface Comment {
|
||||
readonly commentId: string;
|
||||
readonly body: IMarkdownString;
|
||||
readonly userName: string;
|
||||
readonly userIconPath: string;
|
||||
readonly userIconPath?: string;
|
||||
readonly canEdit?: boolean;
|
||||
readonly canDelete?: boolean;
|
||||
readonly command?: Command;
|
||||
readonly selectCommand?: Command;
|
||||
readonly editCommand?: Command;
|
||||
readonly deleteCommand?: Command;
|
||||
readonly isDraft?: boolean;
|
||||
readonly commentReactions?: CommentReaction[];
|
||||
readonly label?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1259,31 +1345,31 @@ export interface CommentThreadChangedEvent {
|
||||
/**
|
||||
* Added comment threads.
|
||||
*/
|
||||
readonly added: CommentThread[];
|
||||
readonly added: (CommentThread | CommentThread2)[];
|
||||
|
||||
/**
|
||||
* Removed comment threads.
|
||||
*/
|
||||
readonly removed: CommentThread[];
|
||||
readonly removed: (CommentThread | CommentThread2)[];
|
||||
|
||||
/**
|
||||
* Changed comment threads.
|
||||
*/
|
||||
readonly changed: CommentThread[];
|
||||
readonly changed: (CommentThread | CommentThread2)[];
|
||||
|
||||
/**
|
||||
* changed draft mode.
|
||||
*/
|
||||
readonly draftMode: DraftMode;
|
||||
readonly draftMode?: DraftMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface DocumentCommentProvider {
|
||||
provideDocumentComments(resource: URI, token: CancellationToken): Promise<CommentInfo>;
|
||||
createNewCommentThread(resource: URI, range: Range, text: string, token: CancellationToken): Promise<CommentThread>;
|
||||
replyToCommentThread(resource: URI, range: Range, thread: CommentThread, text: string, token: CancellationToken): Promise<CommentThread>;
|
||||
provideDocumentComments(resource: URI, token: CancellationToken): Promise<CommentInfo | null>;
|
||||
createNewCommentThread(resource: URI, range: Range, text: string, token: CancellationToken): Promise<CommentThread | null>;
|
||||
replyToCommentThread(resource: URI, range: Range, thread: CommentThread, text: string, token: CancellationToken): Promise<CommentThread | null>;
|
||||
editComment(resource: URI, comment: Comment, text: string, token: CancellationToken): Promise<void>;
|
||||
deleteComment(resource: URI, comment: Comment, token: CancellationToken): Promise<void>;
|
||||
startDraft?(resource: URI, token: CancellationToken): Promise<void>;
|
||||
@@ -1298,7 +1384,7 @@ export interface DocumentCommentProvider {
|
||||
deleteReaction?(resource: URI, comment: Comment, reaction: CommentReaction, token: CancellationToken): Promise<void>;
|
||||
reactionGroup?: CommentReaction[];
|
||||
|
||||
onDidChangeCommentThreads(): Event<CommentThreadChangedEvent>;
|
||||
onDidChangeCommentThreads?(): Event<CommentThreadChangedEvent>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user