mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
Remove some vscode differences (#5010)
* remove some vscode differences * add dates to todo comments
This commit is contained in:
@@ -4,17 +4,12 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import 'vs/css!./webview';
|
||||
import {
|
||||
Component, Input, Inject, ChangeDetectorRef, forwardRef, ComponentFactoryResolver,
|
||||
ViewChild, ViewChildren, ElementRef, Injector, OnDestroy, QueryList
|
||||
Component, Input, Inject, ChangeDetectorRef, forwardRef, ElementRef, OnDestroy
|
||||
} from '@angular/core';
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||
import { CommonServiceInterface } from 'sql/platform/bootstrap/node/commonServiceInterface.service';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { URI, UriComponents } from 'vs/base/common/uri';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
@@ -22,9 +17,8 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { WebviewContentOptions } from 'vs/workbench/contrib/webview/common/webview';
|
||||
|
||||
function reviveWebviewOptions(options: vscode.WebviewOptions): vscode.WebviewOptions {
|
||||
@@ -52,17 +46,11 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
protected findInputFocusContextKey: IContextKey<boolean>;
|
||||
|
||||
constructor(
|
||||
@Inject(forwardRef(() => CommonServiceInterface)) private _commonService: CommonServiceInterface,
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
|
||||
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
|
||||
@Inject(IWorkbenchLayoutService) private layoutService: IWorkbenchLayoutService,
|
||||
@Inject(IThemeService) private themeService: IThemeService,
|
||||
@Inject(IEnvironmentService) private environmentService: IEnvironmentService,
|
||||
@Inject(IContextViewService) private contextViewService: IContextViewService,
|
||||
@Inject(IOpenerService) private readonly _openerService: IOpenerService,
|
||||
@Inject(IWorkspaceContextService) private readonly _contextService: IWorkspaceContextService,
|
||||
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
|
||||
@Inject(IContextKeyService) contextKeyService: IContextKeyService
|
||||
) {
|
||||
super(changeRef, el);
|
||||
}
|
||||
@@ -94,8 +82,6 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
args: e
|
||||
});
|
||||
}));
|
||||
|
||||
this._webview.style(this.themeService.getTheme());
|
||||
this.setHtml();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||
import { memoize } from 'vs/base/common/decorators';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { DashboardServiceInterface } from 'sql/workbench/parts/dashboard/services/dashboardServiceInterface.service';
|
||||
import { CommonServiceInterface } from 'sql/platform/bootstrap/node/commonServiceInterface.service';
|
||||
import { IDashboardWebview, IDashboardViewService } from 'sql/platform/dashboard/common/dashboardViewService';
|
||||
@@ -20,7 +19,6 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
|
||||
@Component({
|
||||
template: '',
|
||||
@@ -41,9 +39,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
constructor(
|
||||
@Inject(forwardRef(() => CommonServiceInterface)) private _dashboardService: DashboardServiceInterface,
|
||||
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
|
||||
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
|
||||
@Inject(IDashboardViewService) private dashboardViewService: IDashboardViewService,
|
||||
@Inject(IWorkbenchLayoutService) private layoutService: IWorkbenchLayoutService,
|
||||
@Inject(IInstantiationService) private instantiationService: IInstantiationService
|
||||
) {
|
||||
super();
|
||||
@@ -115,7 +111,6 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
this._onMessageDisposable = this._webview.onMessage(e => {
|
||||
this._onMessage.fire(e);
|
||||
});
|
||||
this._webview.style(this.themeService.getTheme());
|
||||
if (this._html) {
|
||||
this._webview.contents = this._html;
|
||||
}
|
||||
|
||||
@@ -15,10 +15,8 @@ import { CommonServiceInterface } from 'sql/platform/bootstrap/node/commonServic
|
||||
import { IDashboardWebview, IDashboardViewService } from 'sql/platform/dashboard/common/dashboardViewService';
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
|
||||
interface IWebviewWidgetConfig {
|
||||
id: string;
|
||||
@@ -43,8 +41,6 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
@Inject(forwardRef(() => CommonServiceInterface)) private _dashboardService: DashboardServiceInterface,
|
||||
@Inject(WIDGET_CONFIG) protected _config: WidgetConfig,
|
||||
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
|
||||
@Inject(IWorkbenchLayoutService) private layoutService: IWorkbenchLayoutService,
|
||||
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
|
||||
@Inject(IDashboardViewService) private dashboardViewService: IDashboardViewService,
|
||||
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
|
||||
) {
|
||||
@@ -113,7 +109,6 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
this._onMessageDisposable = this._webview.onMessage(e => {
|
||||
this._onMessage.fire(e);
|
||||
});
|
||||
this._webview.style(this.themeService.getTheme());
|
||||
if (this._html) {
|
||||
this._webview.contents = this._html;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import 'vs/css!sql/media/icons/common-icons';
|
||||
import { Button } from 'sql/base/browser/ui/button/button';
|
||||
import { Modal } from 'sql/workbench/browser/modal/modal';
|
||||
@@ -95,14 +93,10 @@ export class WebViewDialog extends Modal {
|
||||
|
||||
this._webview.mountTo(this._body);
|
||||
|
||||
this._webview.style(this._themeService.getTheme());
|
||||
|
||||
this._webview.onMessage(message => {
|
||||
this._onMessage.fire(message);
|
||||
}, null, this.contentDisposables);
|
||||
|
||||
this._themeService.onThemeChange(theme => this._webview.style(theme), null, this.contentDisposables);
|
||||
|
||||
this.contentDisposables.push(this._webview);
|
||||
this.contentDisposables.push(toDisposable(() => this._webview = null));
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ export function renderMarkdown(markdown: IMarkdownString, options: RenderOptions
|
||||
// but update the node with the real result later.
|
||||
const id = defaultGenerator.nextId();
|
||||
|
||||
// {{SQL CARBON EDIT}} - Promise.all not returning the strValue properly in original code?
|
||||
// {{SQL CARBON EDIT}} - Promise.all not returning the strValue properly in original code? @todo anthonydresser 4/12/19 investigate a better way to do this.
|
||||
const promise = value.then(strValue => {
|
||||
withInnerHTML.then(e => {
|
||||
const span = element.querySelector(`div[data-code="${id}"]`);
|
||||
|
||||
@@ -126,7 +126,7 @@ export class Button extends Disposable {
|
||||
this.applyStyles();
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} -- removed 'private' access modifier
|
||||
// {{SQL CARBON EDIT}} -- removed 'private' access modifier @todo anthonydresser 4/12/19 things needs investigation whether we need this
|
||||
applyStyles(): void {
|
||||
if (this._element) {
|
||||
const background = this.buttonBackground ? this.buttonBackground.toString() : null;
|
||||
@@ -159,6 +159,7 @@ export class Button extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} from addClass to addClasses to support multiple classes @todo anthonydresser 4/12/19 invesitgate a better way to do this.
|
||||
set icon(iconClassName: string) {
|
||||
DOM.addClasses(this._element, ...iconClassName.split(' '));
|
||||
}
|
||||
@@ -227,4 +228,4 @@ export class ButtonGroup extends Disposable {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ export class ContextView extends Disposable {
|
||||
DOM.hide(this.view);
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 investigate a better way to do this
|
||||
public isVisible(): boolean {
|
||||
return !!this.delegate;
|
||||
}
|
||||
@@ -293,4 +293,4 @@ export class ContextView extends Disposable {
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ export interface ITree {
|
||||
*/
|
||||
clearFocus(eventPayload?: any): void;
|
||||
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser we need to refactor our code to not need these methods
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 we need to refactor our code to not need these methods
|
||||
/**
|
||||
* Adds the trait to elements.
|
||||
*/
|
||||
@@ -475,7 +475,7 @@ export interface IDragOverReaction {
|
||||
autoExpand?: boolean;
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser refactor to not need this
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 refactor to not need this
|
||||
export const DRAG_OVER_REJECT: IDragOverReaction = { accept: false };
|
||||
export const DRAG_OVER_ACCEPT: IDragOverReaction = { accept: true };
|
||||
export const DRAG_OVER_ACCEPT_BUBBLE_UP: IDragOverReaction = { accept: true, bubble: DragOverBubble.BUBBLE_UP };
|
||||
|
||||
@@ -276,7 +276,7 @@ export class Tree implements _.ITree {
|
||||
this.model.setFocus(null, eventPayload);
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser we need to refactor our code to not need these methods
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 we need to refactor our code to not need these methods
|
||||
public addTraits(trait: string, elements: any[]): void {
|
||||
this.model.addTraits(trait, elements);
|
||||
}
|
||||
|
||||
@@ -94,8 +94,7 @@ export async function rename(model: ITextModel, position: Position, newName: str
|
||||
|
||||
// --- register actions and commands
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
export class RenameController extends Disposable implements IEditorContribution {
|
||||
class RenameController extends Disposable implements IEditorContribution {
|
||||
|
||||
private static readonly ID = 'editor.contrib.renameController';
|
||||
|
||||
|
||||
@@ -214,14 +214,7 @@ class Renderer implements IListRenderer<CompletionItem, ISuggestionTemplateData>
|
||||
}
|
||||
|
||||
disposeTemplate(templateData: ISuggestionTemplateData): void {
|
||||
// {{SQL CARBON EDIT}}
|
||||
if (templateData.iconLabel) {
|
||||
templateData.iconLabel.dispose();
|
||||
}
|
||||
// {{SQL CARBON EDIT}}
|
||||
if (templateData.disposables) {
|
||||
templateData.disposables = dispose(templateData.disposables);
|
||||
}
|
||||
templateData.disposables = dispose(templateData.disposables);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ export class ConfigurationModel implements IConfigurationModel {
|
||||
}
|
||||
|
||||
freeze(): ConfigurationModel {
|
||||
// {{SQL CARBON EDIT}}
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 needs investigation; we shouldn't need to do this
|
||||
// this.isFrozen = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -192,8 +192,8 @@ export const selectionBackground = registerColor('selection.background', { light
|
||||
// ------ text colors
|
||||
|
||||
export const textSeparatorForeground = registerColor('textSeparator.foreground', { light: '#0000002e', dark: '#ffffff2e', hc: Color.black }, nls.localize('textSeparatorForeground', "Color for text separators."));
|
||||
export const textLinkForeground = registerColor('textLink.foreground', { light: '#006AB1', dark: '#3794FF', hc: '006AB1' }, nls.localize('textLinkForeground', "Foreground color for links in text."));
|
||||
export const textLinkActiveForeground = registerColor('textLink.activeForeground', { light: '#007ACC', dark: '#3794FF', hc: '#007ACC' }, nls.localize('textLinkActiveForeground', "Foreground color for links in text when clicked on and on mouse hover."));
|
||||
export const textLinkForeground = registerColor('textLink.foreground', { light: '#006AB1', dark: '#3794FF', hc: '#3794FF' }, nls.localize('textLinkForeground', "Foreground color for links in text."));
|
||||
export const textLinkActiveForeground = registerColor('textLink.activeForeground', { light: '#006AB1', dark: '#3794FF', hc: '#3794FF' }, nls.localize('textLinkActiveForeground', "Foreground color for links in text when clicked on and on mouse hover."));
|
||||
export const textPreformatForeground = registerColor('textPreformat.foreground', { light: '#A31515', dark: '#D7BA7D', hc: '#D7BA7D' }, nls.localize('textPreformatForeground', "Foreground color for preformatted text segments."));
|
||||
export const textBlockQuoteBackground = registerColor('textBlockQuote.background', { light: '#7f7f7f1a', dark: '#7f7f7f1a', hc: null }, nls.localize('textBlockQuoteBackground', "Background color for block quotes in text."));
|
||||
export const textBlockQuoteBorder = registerColor('textBlockQuote.border', { light: '#007acc80', dark: '#007acc80', hc: Color.white }, nls.localize('textBlockQuoteBorder', "Border color for block quotes in text."));
|
||||
@@ -475,6 +475,3 @@ colorRegistry.onDidChangeSchema(() => {
|
||||
});
|
||||
|
||||
// setTimeout(_ => console.log(colorRegistry.toString()), 5000);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -386,7 +386,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha
|
||||
provideCompletionItems: (model: ITextModel, position: EditorPosition, context: modes.CompletionContext, token: CancellationToken): Promise<modes.CompletionList | undefined> => {
|
||||
return this._proxy.$provideCompletionItems(handle, model.uri, position, context, token).then(result => {
|
||||
if (!result) {
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser required because of strict null checks
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 required because of strict null checks
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
|
||||
@@ -258,11 +258,7 @@ export interface MainThreadErrorsShape extends IDisposable {
|
||||
}
|
||||
|
||||
export interface MainThreadConsoleShape extends IDisposable {
|
||||
$logExtensionHostMessage(msg: {
|
||||
type: string;
|
||||
severity: string;
|
||||
arguments: string;
|
||||
}): void;
|
||||
$logExtensionHostMessage(msg: IRemoteConsoleLog): void;
|
||||
}
|
||||
|
||||
export interface MainThreadKeytarShape extends IDisposable {
|
||||
|
||||
@@ -382,7 +382,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac
|
||||
// Events
|
||||
this._onDidChangeWorkspace.fire(Object.freeze({
|
||||
added,
|
||||
removed
|
||||
removed,
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ class UntitledEditorInputFactory implements IEditorInputFactory {
|
||||
|
||||
const untitledEditorInput = <UntitledEditorInput>editorInput;
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 investigate
|
||||
if (!untitledEditorInput.getResource()) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -950,7 +950,7 @@ export class ChangeModeAction extends Action {
|
||||
}
|
||||
|
||||
// Change mode for active editor
|
||||
// {{SQL CARBON EDIT}} - Get activeControl instead of activeEditor
|
||||
// {{SQL CARBON EDIT}} - Get activeControl instead of activeEditor @todo anthonydresser 4/12/19 investigate
|
||||
const activeEditor = this.editorService.activeControl;
|
||||
const activeTextEditorWidget = this.editorService.activeTextEditorWidget;
|
||||
const models: ITextModel[] = [];
|
||||
|
||||
@@ -250,7 +250,7 @@ export function appendStylizedStringToContainer(
|
||||
export function calcANSI8bitColor(colorNumber: number): RGBA | undefined {
|
||||
if (colorNumber % 1 !== 0) {
|
||||
// Should be integer
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser this is necessary because we don't use strict null checks
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 this is necessary because we don't use strict null checks
|
||||
return undefined;
|
||||
} if (colorNumber >= 16 && colorNumber <= 231) {
|
||||
// Converts to one of 216 RGB colors
|
||||
@@ -275,7 +275,7 @@ export function calcANSI8bitColor(colorNumber: number): RGBA | undefined {
|
||||
const colorLevel: number = Math.round(colorNumber / 23 * 255);
|
||||
return new RGBA(colorLevel, colorLevel, colorLevel);
|
||||
} else {
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser this is necessary because we don't use strict null checks
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 this is necessary because we don't use strict null checks
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,7 +429,6 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
||||
|
||||
private toDispose: IDisposable[];
|
||||
private dropEnabled: boolean;
|
||||
private isCopy: boolean;
|
||||
|
||||
constructor(
|
||||
@INotificationService private notificationService: INotificationService,
|
||||
@@ -550,7 +549,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
||||
}
|
||||
|
||||
getDragURI(element: ExplorerItem): string | null {
|
||||
if (this.explorerService.isEditable(element) || (!this.isCopy && element.isReadonly)) {
|
||||
if (this.explorerService.isEditable(element)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -566,7 +565,6 @@ 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
|
||||
@@ -599,7 +597,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
||||
}
|
||||
// In-Explorer DND (Move/Copy file)
|
||||
else {
|
||||
this.handleExplorerDrop(data, target);
|
||||
this.handleExplorerDrop(data, target, originalEvent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -713,14 +711,15 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
private handleExplorerDrop(data: IDragAndDropData, target: ExplorerItem): Promise<void> {
|
||||
private handleExplorerDrop(data: IDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): 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 = !this.isCopy && this.configurationService.getValue<boolean>(FileDragAndDrop.CONFIRM_DND_SETTING_KEY);
|
||||
const confirmDragAndDrop = !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?")
|
||||
@@ -748,7 +747,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, this.isCopy)).concat(rootDropPromise)).then(() => undefined);
|
||||
return Promise.all(items.filter(s => !s.isRoot).map(source => this.doHandleExplorerDrop(source, target, isCopy)).concat(rootDropPromise)).then(() => undefined);
|
||||
}
|
||||
|
||||
return Promise.resolve(undefined);
|
||||
|
||||
@@ -248,19 +248,6 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
}
|
||||
});
|
||||
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDING_FOCUS),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_E),
|
||||
handler: (accessor, args: any) => {
|
||||
const control = accessor.get(IEditorService).activeControl as IKeybindingsEditor;
|
||||
if (control && control instanceof KeybindingsEditor && control.activeKeybindingEntry!.keybindingItem.keybinding) {
|
||||
control.defineWhenExpression(control.activeKeybindingEntry!);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: KEYBINDINGS_EDITOR_COMMAND_REMOVE,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
|
||||
@@ -681,8 +681,7 @@ export class TerminalInstance implements ITerminalInstance {
|
||||
}
|
||||
|
||||
public hasSelection(): boolean {
|
||||
// {{SQL CARBON EDIT}}
|
||||
return this._xterm && this._xterm.hasSelection ? this._xterm.hasSelection() : false;
|
||||
return this._xterm && this._xterm.hasSelection();
|
||||
}
|
||||
|
||||
public copySelection(): void {
|
||||
|
||||
@@ -605,8 +605,7 @@ export class WebviewElement extends Disposable implements Webview {
|
||||
});
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} - make public
|
||||
public style(theme: ITheme): void {
|
||||
private style(theme: ITheme): void {
|
||||
const configuration = this._configurationService.getValue<IEditorOptions>('editor');
|
||||
const editorFontFamily = configuration.fontFamily || EDITOR_FONT_DEFAULTS.fontFamily;
|
||||
const editorFontWeight = configuration.fontWeight || EDITOR_FONT_DEFAULTS.fontWeight;
|
||||
|
||||
@@ -144,7 +144,7 @@ function globExprsToRgGlobs(patterns: glob.IExpression, folder?: string, exclude
|
||||
}
|
||||
|
||||
globArgs.push(fixDriveC(key));
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser cast value because we aren't using strict null checks
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 cast value because we aren't using strict null checks
|
||||
} else if (value && (<glob.SiblingClause>value).when) {
|
||||
siblingClauses[key] = value;
|
||||
}
|
||||
|
||||
@@ -740,7 +740,7 @@ export class TextFileService extends Disposable implements ITextFileService {
|
||||
}
|
||||
|
||||
if (!targetResource) {
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser necessary to add undefined till we enable strict null check
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 necessary to add undefined till we enable strict null check
|
||||
return undefined; // user canceled
|
||||
}
|
||||
|
||||
@@ -993,4 +993,4 @@ export class TextFileService extends Disposable implements ITextFileService {
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user