mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-30 16:50:30 -04:00
Merge from vscode 3bd60b2ba753e7fe39b42f99184bc6c5881d3551 (#4712)
This commit is contained in:
@@ -119,8 +119,8 @@ registerEditorAction(class extends EditorAction {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'editor.showCallHierarchy',
|
||||
label: localize('title', "Call Hierarchy"),
|
||||
alias: 'Call Hierarchy',
|
||||
label: localize('title', "Peek Call Hierarchy"),
|
||||
alias: 'Peek Call Hierarchy',
|
||||
menuOpts: {
|
||||
group: 'navigation',
|
||||
order: 1.48
|
||||
|
||||
@@ -144,7 +144,7 @@ export class CommentNode extends Disposable {
|
||||
let reactionGroup = this.commentService.getReactionGroup(this.owner);
|
||||
if (reactionGroup && reactionGroup.length) {
|
||||
let commentThread = this.commentThread as modes.CommentThread2;
|
||||
if (commentThread.commentThreadHandle) {
|
||||
if (commentThread.commentThreadHandle !== undefined) {
|
||||
let toggleReactionAction = this.createReactionPicker2();
|
||||
actions.push(toggleReactionAction);
|
||||
} else {
|
||||
@@ -327,7 +327,7 @@ export class CommentNode extends Disposable {
|
||||
let action = new ReactionAction(`reaction.${reaction.label}`, `${reaction.label}`, reaction.hasReacted && reaction.canEdit ? 'active' : '', reaction.canEdit, async () => {
|
||||
try {
|
||||
let commentThread = this.commentThread as modes.CommentThread2;
|
||||
if (commentThread.commentThreadHandle) {
|
||||
if (commentThread.commentThreadHandle !== undefined) {
|
||||
await this.commentService.toggleReaction(this.owner, this.resource, this.commentThread as modes.CommentThread2, this.comment, reaction);
|
||||
} else {
|
||||
if (reaction.hasReacted) {
|
||||
@@ -360,7 +360,7 @@ export class CommentNode extends Disposable {
|
||||
let reactionGroup = this.commentService.getReactionGroup(this.owner);
|
||||
if (reactionGroup && reactionGroup.length) {
|
||||
let commentThread = this.commentThread as modes.CommentThread2;
|
||||
if (commentThread.commentThreadHandle) {
|
||||
if (commentThread.commentThreadHandle !== undefined) {
|
||||
let toggleReactionAction = this.createReactionPicker2();
|
||||
this._reactionsActionBar.push(toggleReactionAction, { label: false, icon: true });
|
||||
} else {
|
||||
@@ -386,7 +386,7 @@ export class CommentNode extends Disposable {
|
||||
this._commentEditor.setSelection(new Selection(lastLine, lastColumn, lastLine, lastColumn));
|
||||
|
||||
let commentThread = this.commentThread as modes.CommentThread2;
|
||||
if (commentThread.commentThreadHandle) {
|
||||
if (commentThread.commentThreadHandle !== undefined) {
|
||||
commentThread.input = {
|
||||
uri: this._commentEditor.getModel()!.uri,
|
||||
value: this.comment.body.value
|
||||
|
||||
@@ -689,7 +689,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
|
||||
async submitComment(): Promise<void> {
|
||||
const activeComment = this.getActiveComment();
|
||||
if (activeComment instanceof ReviewZoneWidget) {
|
||||
if ((this._commentThread as modes.CommentThread2).commentThreadHandle) {
|
||||
if ((this._commentThread as modes.CommentThread2).commentThreadHandle !== undefined) {
|
||||
let commentThread = this._commentThread as modes.CommentThread2;
|
||||
|
||||
if (commentThread.acceptInputCommand) {
|
||||
|
||||
@@ -21,7 +21,7 @@ export class DebugStatus extends Themable implements IStatusbarItem {
|
||||
private statusBarItem: HTMLElement;
|
||||
private label: HTMLElement;
|
||||
private icon: HTMLElement;
|
||||
private showInStatusBar: string;
|
||||
private showInStatusBar: 'never' | 'always' | 'onFirstSessionStart';
|
||||
|
||||
constructor(
|
||||
@IQuickOpenService private readonly quickOpenService: IQuickOpenService,
|
||||
@@ -36,6 +36,10 @@ export class DebugStatus extends Themable implements IStatusbarItem {
|
||||
this._register(this.debugService.onDidChangeState(state => {
|
||||
if (state !== State.Inactive && this.showInStatusBar === 'onFirstSessionStart') {
|
||||
this.doRender();
|
||||
} else {
|
||||
if (this.showInStatusBar !== 'never') {
|
||||
this.updateStyles();
|
||||
}
|
||||
}
|
||||
}));
|
||||
this.showInStatusBar = configurationService.getValue<IDebugConfiguration>('debug').showInStatusBar;
|
||||
@@ -53,7 +57,6 @@ export class DebugStatus extends Themable implements IStatusbarItem {
|
||||
}
|
||||
|
||||
protected updateStyles(): void {
|
||||
super.updateStyles();
|
||||
if (this.icon) {
|
||||
if (isStatusbarInDebugMode(this.debugService)) {
|
||||
this.icon.style.backgroundColor = this.getColor(STATUS_BAR_DEBUGGING_FOREGROUND);
|
||||
|
||||
@@ -11,7 +11,7 @@ import { isObject } from 'vs/base/common/types';
|
||||
import { TelemetryAppenderClient } from 'vs/platform/telemetry/node/telemetryIpc';
|
||||
import { IJSONSchema, IJSONSchemaSnippet } from 'vs/base/common/jsonSchema';
|
||||
import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
|
||||
import { IConfig, IDebuggerContribution, IDebugAdapterExecutable, INTERNAL_CONSOLE_OPTIONS_SCHEMA, IConfigurationManager, IDebugAdapter, ITerminalSettings, IDebugger, IDebugSession, IAdapterDescriptor, IDebugAdapterServer } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { IConfig, IDebuggerContribution, IDebugAdapterExecutable, INTERNAL_CONSOLE_OPTIONS_SCHEMA, IConfigurationManager, IDebugAdapter, ITerminalSettings, IDebugger, IDebugSession, IAdapterDescriptor, IDebugAdapterServer, IDebugConfiguration } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IOutputService } from 'vs/workbench/contrib/output/common/output';
|
||||
@@ -187,8 +187,11 @@ export class Debugger implements IDebugger {
|
||||
}
|
||||
|
||||
private inExtHost(): boolean {
|
||||
/*
|
||||
const debugConfigs = this.configurationService.getValue<IDebugConfiguration>('debug');
|
||||
if (typeof debugConfigs.extensionHostDebugAdapter === 'boolean') {
|
||||
return debugConfigs.extensionHostDebugAdapter;
|
||||
}
|
||||
/*
|
||||
return !!debugConfigs.extensionHostDebugAdapter
|
||||
|| this.configurationManager.needsToRunInExtHost(this.type)
|
||||
|| (!!this.mainExtensionDescription && this.mainExtensionDescription.extensionLocation.scheme !== 'file');
|
||||
|
||||
@@ -429,6 +429,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
||||
|
||||
private toDispose: IDisposable[];
|
||||
private dropEnabled: boolean;
|
||||
private isCopy: boolean;
|
||||
|
||||
constructor(
|
||||
@INotificationService private notificationService: INotificationService,
|
||||
@@ -549,7 +550,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
||||
}
|
||||
|
||||
getDragURI(element: ExplorerItem): string | null {
|
||||
if (this.explorerService.isEditable(element)) {
|
||||
if (this.explorerService.isEditable(element) || (!this.isCopy && element.isReadonly)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -565,6 +566,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
||||
}
|
||||
|
||||
onDragStart(data: IDragAndDropData, originalEvent: DragEvent): void {
|
||||
this.isCopy = (originalEvent.ctrlKey && !isMacintosh) || (originalEvent.altKey && isMacintosh);
|
||||
const items = (data as ElementsDragAndDropData<ExplorerItem>).elements;
|
||||
if (items && items.length && originalEvent.dataTransfer) {
|
||||
// Apply some datatransfer types to allow for dragging the element outside of the application
|
||||
@@ -597,7 +599,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
||||
}
|
||||
// In-Explorer DND (Move/Copy file)
|
||||
else {
|
||||
this.handleExplorerDrop(data, target, originalEvent);
|
||||
this.handleExplorerDrop(data, target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -711,15 +713,14 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
private handleExplorerDrop(data: IDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): Promise<void> {
|
||||
private handleExplorerDrop(data: IDragAndDropData, target: ExplorerItem): Promise<void> {
|
||||
const elementsData = (data as ElementsDragAndDropData<ExplorerItem>).elements;
|
||||
const items = distinctParents(elementsData, s => s.resource);
|
||||
const isCopy = (originalEvent.ctrlKey && !isMacintosh) || (originalEvent.altKey && isMacintosh);
|
||||
|
||||
let confirmPromise: Promise<IConfirmationResult>;
|
||||
|
||||
// Handle confirm setting
|
||||
const confirmDragAndDrop = !isCopy && this.configurationService.getValue<boolean>(FileDragAndDrop.CONFIRM_DND_SETTING_KEY);
|
||||
const confirmDragAndDrop = !this.isCopy && this.configurationService.getValue<boolean>(FileDragAndDrop.CONFIRM_DND_SETTING_KEY);
|
||||
if (confirmDragAndDrop) {
|
||||
confirmPromise = this.dialogService.confirm({
|
||||
message: items.length > 1 && items.every(s => s.isRoot) ? localize('confirmRootsMove', "Are you sure you want to change the order of multiple root folders in your workspace?")
|
||||
@@ -747,7 +748,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
||||
return updateConfirmSettingsPromise.then(() => {
|
||||
if (res.confirmed) {
|
||||
const rootDropPromise = this.doHandleRootDrop(items.filter(s => s.isRoot), target);
|
||||
return Promise.all(items.filter(s => !s.isRoot).map(source => this.doHandleExplorerDrop(source, target, isCopy)).concat(rootDropPromise)).then(() => undefined);
|
||||
return Promise.all(items.filter(s => !s.isRoot).map(source => this.doHandleExplorerDrop(source, target, this.isCopy)).concat(rootDropPromise)).then(() => undefined);
|
||||
}
|
||||
|
||||
return Promise.resolve(undefined);
|
||||
|
||||
@@ -40,6 +40,7 @@ export class ExplorerService implements IExplorerService {
|
||||
private editable: { stat: ExplorerItem, data: IEditableData } | undefined;
|
||||
private _sortOrder: SortOrder;
|
||||
private cutItems: ExplorerItem[] | undefined;
|
||||
private fileSystemProviderSchemes = new Set<string>();
|
||||
|
||||
constructor(
|
||||
@IFileService private fileService: IFileService,
|
||||
@@ -98,7 +99,14 @@ export class ExplorerService implements IExplorerService {
|
||||
this.disposables.push(this.fileService.onAfterOperation(e => this.onFileOperation(e)));
|
||||
this.disposables.push(this.fileService.onFileChanges(e => this.onFileChanges(e)));
|
||||
this.disposables.push(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(this.configurationService.getValue<IFilesConfiguration>())));
|
||||
this.disposables.push(this.fileService.onDidChangeFileSystemProviderRegistrations(() => this._onDidChangeItem.fire(undefined)));
|
||||
this.disposables.push(this.fileService.onDidChangeFileSystemProviderRegistrations(e => {
|
||||
if (e.added && this.fileSystemProviderSchemes.has(e.scheme)) {
|
||||
// A file system provider got re-registered, we should update all file stats since they might change (got read-only)
|
||||
this._onDidChangeItem.fire(undefined);
|
||||
} else {
|
||||
this.fileSystemProviderSchemes.add(e.scheme);
|
||||
}
|
||||
}));
|
||||
this.disposables.push(model.onDidChangeRoots(() => this._onDidChangeRoots.fire()));
|
||||
|
||||
return model;
|
||||
|
||||
@@ -61,15 +61,16 @@ export class ActivityUpdater extends Disposable implements IWorkbenchContributio
|
||||
|
||||
constructor(
|
||||
@IActivityService private readonly activityService: IActivityService,
|
||||
@IMarkersWorkbenchService private readonly markersWorkbenchService: IMarkersWorkbenchService
|
||||
@IMarkerService private readonly markerService: IMarkerService
|
||||
) {
|
||||
super();
|
||||
this._register(this.markersWorkbenchService.markersModel.onDidChange(() => this.updateBadge()));
|
||||
this._register(this.markerService.onMarkerChanged(() => this.updateBadge()));
|
||||
this.updateBadge();
|
||||
}
|
||||
|
||||
private updateBadge(): void {
|
||||
const total = this.markersWorkbenchService.markersModel.resourceMarkers.reduce((r, rm) => r + rm.markers.length, 0);
|
||||
const { errors, warnings, infos, unknowns } = this.markerService.getStatistics();
|
||||
const total = errors + warnings + infos + unknowns;
|
||||
const message = localize('totalProblems', 'Total {0} Problems', total);
|
||||
this.activityService.showActivity(Constants.MARKERS_PANEL_ID, new NumberBadge(total, () => message));
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
.markers-panel .monaco-tl-contents .marker-icon {
|
||||
height: 22px;
|
||||
flex: 0 0 16px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.markers-panel .marker-icon.warning {
|
||||
|
||||
@@ -943,7 +943,9 @@ export namespace KeyedTaskIdentifier {
|
||||
}
|
||||
export function create(value: TaskIdentifier): KeyedTaskIdentifier {
|
||||
const resultKey = sortedStringify(value);
|
||||
return { _key: resultKey, type: value.taskType };
|
||||
let result = { _key: resultKey, type: value.taskType };
|
||||
Objects.assign(result, value);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -890,7 +890,8 @@ export class TerminalTaskSystem implements ITaskSystem {
|
||||
this.currentTask.shellLaunchConfig = {
|
||||
isRendererOnly: true,
|
||||
waitOnExit,
|
||||
name: this.createTerminalName(task)
|
||||
name: this.createTerminalName(task),
|
||||
initialText: task.command.presentation && task.command.presentation.echo ? `\x1b[1m> Executing task: ${task._label} <\x1b[0m\n` : undefined
|
||||
};
|
||||
} else {
|
||||
let resolvedResult: { command: CommandString, args: CommandString[] } = this.resolveCommandAndArgs(resolver, task.command);
|
||||
|
||||
@@ -955,7 +955,7 @@ export class TerminalInstance implements ITerminalInstance {
|
||||
if (typeof this._shellLaunchConfig.waitOnExit === 'string') {
|
||||
let message = this._shellLaunchConfig.waitOnExit;
|
||||
// Bold the message and add an extra new line to make it stand out from the rest of the output
|
||||
message = `\n\x1b[1m${message}\x1b[0m`;
|
||||
message = `\r\n\x1b[1m${message}\x1b[0m`;
|
||||
this._xterm.writeln(message);
|
||||
}
|
||||
// Disable all input if the terminal is exiting and listen for next keypress
|
||||
|
||||
Reference in New Issue
Block a user