mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -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 'vs/css!./webview';
|
||||||
import {
|
import {
|
||||||
Component, Input, Inject, ChangeDetectorRef, forwardRef, ComponentFactoryResolver,
|
Component, Input, Inject, ChangeDetectorRef, forwardRef, ElementRef, OnDestroy
|
||||||
ViewChild, ViewChildren, ElementRef, Injector, OnDestroy, QueryList
|
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
|
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 { URI, UriComponents } from 'vs/base/common/uri';
|
||||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
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 { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
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 { 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';
|
import { WebviewContentOptions } from 'vs/workbench/contrib/webview/common/webview';
|
||||||
|
|
||||||
function reviveWebviewOptions(options: vscode.WebviewOptions): vscode.WebviewOptions {
|
function reviveWebviewOptions(options: vscode.WebviewOptions): vscode.WebviewOptions {
|
||||||
@@ -52,17 +46,11 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
|||||||
protected findInputFocusContextKey: IContextKey<boolean>;
|
protected findInputFocusContextKey: IContextKey<boolean>;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(forwardRef(() => CommonServiceInterface)) private _commonService: CommonServiceInterface,
|
|
||||||
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
|
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
|
||||||
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
|
@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(IOpenerService) private readonly _openerService: IOpenerService,
|
||||||
@Inject(IWorkspaceContextService) private readonly _contextService: IWorkspaceContextService,
|
@Inject(IWorkspaceContextService) private readonly _contextService: IWorkspaceContextService,
|
||||||
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
|
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
|
||||||
@Inject(IContextKeyService) contextKeyService: IContextKeyService
|
|
||||||
) {
|
) {
|
||||||
super(changeRef, el);
|
super(changeRef, el);
|
||||||
}
|
}
|
||||||
@@ -94,8 +82,6 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
|||||||
args: e
|
args: e
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._webview.style(this.themeService.getTheme());
|
|
||||||
this.setHtml();
|
this.setHtml();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { Event, Emitter } from 'vs/base/common/event';
|
|||||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||||
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
|
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||||
import { memoize } from 'vs/base/common/decorators';
|
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 { DashboardServiceInterface } from 'sql/workbench/parts/dashboard/services/dashboardServiceInterface.service';
|
||||||
import { CommonServiceInterface } from 'sql/platform/bootstrap/node/commonServiceInterface.service';
|
import { CommonServiceInterface } from 'sql/platform/bootstrap/node/commonServiceInterface.service';
|
||||||
import { IDashboardWebview, IDashboardViewService } from 'sql/platform/dashboard/common/dashboardViewService';
|
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 * as azdata from 'azdata';
|
||||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||||
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: '',
|
template: '',
|
||||||
@@ -41,9 +39,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
|||||||
constructor(
|
constructor(
|
||||||
@Inject(forwardRef(() => CommonServiceInterface)) private _dashboardService: DashboardServiceInterface,
|
@Inject(forwardRef(() => CommonServiceInterface)) private _dashboardService: DashboardServiceInterface,
|
||||||
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
|
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
|
||||||
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
|
|
||||||
@Inject(IDashboardViewService) private dashboardViewService: IDashboardViewService,
|
@Inject(IDashboardViewService) private dashboardViewService: IDashboardViewService,
|
||||||
@Inject(IWorkbenchLayoutService) private layoutService: IWorkbenchLayoutService,
|
|
||||||
@Inject(IInstantiationService) private instantiationService: IInstantiationService
|
@Inject(IInstantiationService) private instantiationService: IInstantiationService
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
@@ -115,7 +111,6 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
|||||||
this._onMessageDisposable = this._webview.onMessage(e => {
|
this._onMessageDisposable = this._webview.onMessage(e => {
|
||||||
this._onMessage.fire(e);
|
this._onMessage.fire(e);
|
||||||
});
|
});
|
||||||
this._webview.style(this.themeService.getTheme());
|
|
||||||
if (this._html) {
|
if (this._html) {
|
||||||
this._webview.contents = 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 { IDashboardWebview, IDashboardViewService } from 'sql/platform/dashboard/common/dashboardViewService';
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
|
||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||||
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
|
|
||||||
|
|
||||||
interface IWebviewWidgetConfig {
|
interface IWebviewWidgetConfig {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -43,8 +41,6 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
|||||||
@Inject(forwardRef(() => CommonServiceInterface)) private _dashboardService: DashboardServiceInterface,
|
@Inject(forwardRef(() => CommonServiceInterface)) private _dashboardService: DashboardServiceInterface,
|
||||||
@Inject(WIDGET_CONFIG) protected _config: WidgetConfig,
|
@Inject(WIDGET_CONFIG) protected _config: WidgetConfig,
|
||||||
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
|
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
|
||||||
@Inject(IWorkbenchLayoutService) private layoutService: IWorkbenchLayoutService,
|
|
||||||
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
|
|
||||||
@Inject(IDashboardViewService) private dashboardViewService: IDashboardViewService,
|
@Inject(IDashboardViewService) private dashboardViewService: IDashboardViewService,
|
||||||
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
|
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
|
||||||
) {
|
) {
|
||||||
@@ -113,7 +109,6 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
|||||||
this._onMessageDisposable = this._webview.onMessage(e => {
|
this._onMessageDisposable = this._webview.onMessage(e => {
|
||||||
this._onMessage.fire(e);
|
this._onMessage.fire(e);
|
||||||
});
|
});
|
||||||
this._webview.style(this.themeService.getTheme());
|
|
||||||
if (this._html) {
|
if (this._html) {
|
||||||
this._webview.contents = 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.
|
* 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 'vs/css!sql/media/icons/common-icons';
|
||||||
import { Button } from 'sql/base/browser/ui/button/button';
|
import { Button } from 'sql/base/browser/ui/button/button';
|
||||||
import { Modal } from 'sql/workbench/browser/modal/modal';
|
import { Modal } from 'sql/workbench/browser/modal/modal';
|
||||||
@@ -95,14 +93,10 @@ export class WebViewDialog extends Modal {
|
|||||||
|
|
||||||
this._webview.mountTo(this._body);
|
this._webview.mountTo(this._body);
|
||||||
|
|
||||||
this._webview.style(this._themeService.getTheme());
|
|
||||||
|
|
||||||
this._webview.onMessage(message => {
|
this._webview.onMessage(message => {
|
||||||
this._onMessage.fire(message);
|
this._onMessage.fire(message);
|
||||||
}, null, this.contentDisposables);
|
}, null, this.contentDisposables);
|
||||||
|
|
||||||
this._themeService.onThemeChange(theme => this._webview.style(theme), null, this.contentDisposables);
|
|
||||||
|
|
||||||
this.contentDisposables.push(this._webview);
|
this.contentDisposables.push(this._webview);
|
||||||
this.contentDisposables.push(toDisposable(() => this._webview = null));
|
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.
|
// but update the node with the real result later.
|
||||||
const id = defaultGenerator.nextId();
|
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 => {
|
const promise = value.then(strValue => {
|
||||||
withInnerHTML.then(e => {
|
withInnerHTML.then(e => {
|
||||||
const span = element.querySelector(`div[data-code="${id}"]`);
|
const span = element.querySelector(`div[data-code="${id}"]`);
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ export class Button extends Disposable {
|
|||||||
this.applyStyles();
|
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 {
|
applyStyles(): void {
|
||||||
if (this._element) {
|
if (this._element) {
|
||||||
const background = this.buttonBackground ? this.buttonBackground.toString() : null;
|
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) {
|
set icon(iconClassName: string) {
|
||||||
DOM.addClasses(this._element, ...iconClassName.split(' '));
|
DOM.addClasses(this._element, ...iconClassName.split(' '));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ export class ContextView extends Disposable {
|
|||||||
DOM.hide(this.view);
|
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 {
|
public isVisible(): boolean {
|
||||||
return !!this.delegate;
|
return !!this.delegate;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ export interface ITree {
|
|||||||
*/
|
*/
|
||||||
clearFocus(eventPayload?: any): void;
|
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.
|
* Adds the trait to elements.
|
||||||
*/
|
*/
|
||||||
@@ -475,7 +475,7 @@ export interface IDragOverReaction {
|
|||||||
autoExpand?: boolean;
|
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_REJECT: IDragOverReaction = { accept: false };
|
||||||
export const DRAG_OVER_ACCEPT: IDragOverReaction = { accept: true };
|
export const DRAG_OVER_ACCEPT: IDragOverReaction = { accept: true };
|
||||||
export const DRAG_OVER_ACCEPT_BUBBLE_UP: IDragOverReaction = { accept: true, bubble: DragOverBubble.BUBBLE_UP };
|
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);
|
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 {
|
public addTraits(trait: string, elements: any[]): void {
|
||||||
this.model.addTraits(trait, elements);
|
this.model.addTraits(trait, elements);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ export async function rename(model: ITextModel, position: Position, newName: str
|
|||||||
|
|
||||||
// --- register actions and commands
|
// --- register actions and commands
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
class RenameController extends Disposable implements IEditorContribution {
|
||||||
export class RenameController extends Disposable implements IEditorContribution {
|
|
||||||
|
|
||||||
private static readonly ID = 'editor.contrib.renameController';
|
private static readonly ID = 'editor.contrib.renameController';
|
||||||
|
|
||||||
|
|||||||
@@ -214,16 +214,9 @@ class Renderer implements IListRenderer<CompletionItem, ISuggestionTemplateData>
|
|||||||
}
|
}
|
||||||
|
|
||||||
disposeTemplate(templateData: ISuggestionTemplateData): void {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const enum State {
|
const enum State {
|
||||||
Hidden,
|
Hidden,
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ export class ConfigurationModel implements IConfigurationModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
freeze(): ConfigurationModel {
|
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;
|
// this.isFrozen = true;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,8 +192,8 @@ export const selectionBackground = registerColor('selection.background', { light
|
|||||||
// ------ text colors
|
// ------ text colors
|
||||||
|
|
||||||
export const textSeparatorForeground = registerColor('textSeparator.foreground', { light: '#0000002e', dark: '#ffffff2e', hc: Color.black }, nls.localize('textSeparatorForeground', "Color for text separators."));
|
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 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: '#007ACC', dark: '#3794FF', hc: '#007ACC' }, nls.localize('textLinkActiveForeground', "Foreground color for links in text when clicked on and on mouse hover."));
|
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 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 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."));
|
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);
|
// 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> => {
|
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 => {
|
return this._proxy.$provideCompletionItems(handle, model.uri, position, context, token).then(result => {
|
||||||
if (!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 undefined;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -258,11 +258,7 @@ export interface MainThreadErrorsShape extends IDisposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface MainThreadConsoleShape extends IDisposable {
|
export interface MainThreadConsoleShape extends IDisposable {
|
||||||
$logExtensionHostMessage(msg: {
|
$logExtensionHostMessage(msg: IRemoteConsoleLog): void;
|
||||||
type: string;
|
|
||||||
severity: string;
|
|
||||||
arguments: string;
|
|
||||||
}): void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MainThreadKeytarShape extends IDisposable {
|
export interface MainThreadKeytarShape extends IDisposable {
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac
|
|||||||
// Events
|
// Events
|
||||||
this._onDidChangeWorkspace.fire(Object.freeze({
|
this._onDidChangeWorkspace.fire(Object.freeze({
|
||||||
added,
|
added,
|
||||||
removed
|
removed,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ class UntitledEditorInputFactory implements IEditorInputFactory {
|
|||||||
|
|
||||||
const untitledEditorInput = <UntitledEditorInput>editorInput;
|
const untitledEditorInput = <UntitledEditorInput>editorInput;
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 investigate
|
||||||
if (!untitledEditorInput.getResource()) {
|
if (!untitledEditorInput.getResource()) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -950,7 +950,7 @@ export class ChangeModeAction extends Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Change mode for active editor
|
// 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 activeEditor = this.editorService.activeControl;
|
||||||
const activeTextEditorWidget = this.editorService.activeTextEditorWidget;
|
const activeTextEditorWidget = this.editorService.activeTextEditorWidget;
|
||||||
const models: ITextModel[] = [];
|
const models: ITextModel[] = [];
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ export function appendStylizedStringToContainer(
|
|||||||
export function calcANSI8bitColor(colorNumber: number): RGBA | undefined {
|
export function calcANSI8bitColor(colorNumber: number): RGBA | undefined {
|
||||||
if (colorNumber % 1 !== 0) {
|
if (colorNumber % 1 !== 0) {
|
||||||
// Should be integer
|
// 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;
|
return undefined;
|
||||||
} if (colorNumber >= 16 && colorNumber <= 231) {
|
} if (colorNumber >= 16 && colorNumber <= 231) {
|
||||||
// Converts to one of 216 RGB colors
|
// 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);
|
const colorLevel: number = Math.round(colorNumber / 23 * 255);
|
||||||
return new RGBA(colorLevel, colorLevel, colorLevel);
|
return new RGBA(colorLevel, colorLevel, colorLevel);
|
||||||
} else {
|
} 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;
|
return undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -429,7 +429,6 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
|||||||
|
|
||||||
private toDispose: IDisposable[];
|
private toDispose: IDisposable[];
|
||||||
private dropEnabled: boolean;
|
private dropEnabled: boolean;
|
||||||
private isCopy: boolean;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@INotificationService private notificationService: INotificationService,
|
@INotificationService private notificationService: INotificationService,
|
||||||
@@ -550,7 +549,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getDragURI(element: ExplorerItem): string | null {
|
getDragURI(element: ExplorerItem): string | null {
|
||||||
if (this.explorerService.isEditable(element) || (!this.isCopy && element.isReadonly)) {
|
if (this.explorerService.isEditable(element)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,7 +565,6 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onDragStart(data: IDragAndDropData, originalEvent: DragEvent): void {
|
onDragStart(data: IDragAndDropData, originalEvent: DragEvent): void {
|
||||||
this.isCopy = (originalEvent.ctrlKey && !isMacintosh) || (originalEvent.altKey && isMacintosh);
|
|
||||||
const items = (data as ElementsDragAndDropData<ExplorerItem>).elements;
|
const items = (data as ElementsDragAndDropData<ExplorerItem>).elements;
|
||||||
if (items && items.length && originalEvent.dataTransfer) {
|
if (items && items.length && originalEvent.dataTransfer) {
|
||||||
// Apply some datatransfer types to allow for dragging the element outside of the application
|
// 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)
|
// In-Explorer DND (Move/Copy file)
|
||||||
else {
|
else {
|
||||||
this.handleExplorerDrop(data, target);
|
this.handleExplorerDrop(data, target, originalEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -713,14 +711,15 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
|
|||||||
return Promise.resolve(undefined);
|
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 elementsData = (data as ElementsDragAndDropData<ExplorerItem>).elements;
|
||||||
const items = distinctParents(elementsData, s => s.resource);
|
const items = distinctParents(elementsData, s => s.resource);
|
||||||
|
const isCopy = (originalEvent.ctrlKey && !isMacintosh) || (originalEvent.altKey && isMacintosh);
|
||||||
|
|
||||||
let confirmPromise: Promise<IConfirmationResult>;
|
let confirmPromise: Promise<IConfirmationResult>;
|
||||||
|
|
||||||
// Handle confirm setting
|
// 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) {
|
if (confirmDragAndDrop) {
|
||||||
confirmPromise = this.dialogService.confirm({
|
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?")
|
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(() => {
|
return updateConfirmSettingsPromise.then(() => {
|
||||||
if (res.confirmed) {
|
if (res.confirmed) {
|
||||||
const rootDropPromise = this.doHandleRootDrop(items.filter(s => s.isRoot), target);
|
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);
|
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({
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||||
id: KEYBINDINGS_EDITOR_COMMAND_REMOVE,
|
id: KEYBINDINGS_EDITOR_COMMAND_REMOVE,
|
||||||
weight: KeybindingWeight.WorkbenchContrib,
|
weight: KeybindingWeight.WorkbenchContrib,
|
||||||
|
|||||||
@@ -681,8 +681,7 @@ export class TerminalInstance implements ITerminalInstance {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public hasSelection(): boolean {
|
public hasSelection(): boolean {
|
||||||
// {{SQL CARBON EDIT}}
|
return this._xterm && this._xterm.hasSelection();
|
||||||
return this._xterm && this._xterm.hasSelection ? this._xterm.hasSelection() : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public copySelection(): void {
|
public copySelection(): void {
|
||||||
|
|||||||
@@ -605,8 +605,7 @@ export class WebviewElement extends Disposable implements Webview {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}} - make public
|
private style(theme: ITheme): void {
|
||||||
public style(theme: ITheme): void {
|
|
||||||
const configuration = this._configurationService.getValue<IEditorOptions>('editor');
|
const configuration = this._configurationService.getValue<IEditorOptions>('editor');
|
||||||
const editorFontFamily = configuration.fontFamily || EDITOR_FONT_DEFAULTS.fontFamily;
|
const editorFontFamily = configuration.fontFamily || EDITOR_FONT_DEFAULTS.fontFamily;
|
||||||
const editorFontWeight = configuration.fontWeight || EDITOR_FONT_DEFAULTS.fontWeight;
|
const editorFontWeight = configuration.fontWeight || EDITOR_FONT_DEFAULTS.fontWeight;
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ function globExprsToRgGlobs(patterns: glob.IExpression, folder?: string, exclude
|
|||||||
}
|
}
|
||||||
|
|
||||||
globArgs.push(fixDriveC(key));
|
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) {
|
} else if (value && (<glob.SiblingClause>value).when) {
|
||||||
siblingClauses[key] = value;
|
siblingClauses[key] = value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -740,7 +740,7 @@ export class TextFileService extends Disposable implements ITextFileService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!targetResource) {
|
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
|
return undefined; // user canceled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user