mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 01:32:34 -05:00
Merge from master
This commit is contained in:
@@ -18,8 +18,8 @@ import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboar
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
import { ModelComponentWrapper } from 'sql/parts/modelComponents/modelComponentWrapper.component';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { Builder } from 'sql/base/browser/builder';
|
||||
import { IdGenerator } from 'vs/base/common/idGenerator';
|
||||
import { createCSSRule, removeCSSRulesContainingSelector } from 'vs/base/browser/dom';
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
|
||||
import { IComponent, IComponentDescriptor, IModelStore, IComponentEventArgs, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
import * as sqlops from 'sqlops';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IdGenerator } from 'vs/base/common/idGenerator';
|
||||
import { createCSSRule, removeCSSRulesContainingSelector } from 'vs/base/browser/dom';
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { $, Builder } from 'vs/base/browser/builder';
|
||||
import { $, Builder } from 'sql/base/browser/builder';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
|
||||
@@ -13,7 +13,7 @@ import * as DOM from 'vs/base/browser/dom';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ITextModel } from 'vs/editor/common/model';
|
||||
import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { IModeService } from 'vs/editor/common/services/modeService';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
@@ -134,9 +134,8 @@ export default class EditorComponent extends ComponentBase implements IComponent
|
||||
private updateLanguageMode() {
|
||||
if (this._editorModel && this._editor) {
|
||||
this._languageMode = this.languageMode;
|
||||
this._modeService.getOrCreateMode(this._languageMode).then((modeValue) => {
|
||||
this._modelService.setMode(this._editorModel, modeValue);
|
||||
});
|
||||
let languageSelection = this._modeService.create(this._languageMode);
|
||||
this._modelService.setMode(this._editorModel, languageSelection);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import * as DOM from 'vs/base/browser/dom';
|
||||
|
||||
import { ModelViewInput } from 'sql/parts/modelComponents/modelEditor/modelViewInput';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
|
||||
export class ModelViewEditor extends BaseEditor {
|
||||
|
||||
@@ -23,9 +24,10 @@ export class ModelViewEditor extends BaseEditor {
|
||||
|
||||
constructor(
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IThemeService themeService: IThemeService
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IStorageService storageService: IStorageService
|
||||
) {
|
||||
super(ModelViewEditor.ID, telemetryService, themeService);
|
||||
super(ModelViewEditor.ID, telemetryService, themeService, storageService);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,9 +63,9 @@ export class ModelViewEditor extends BaseEditor {
|
||||
}
|
||||
}
|
||||
|
||||
async setInput(input: ModelViewInput, options?: EditorOptions): TPromise<void, any> {
|
||||
async setInput(input: ModelViewInput, options?: EditorOptions): Promise<void> {
|
||||
if (this.input && this.input.matches(input)) {
|
||||
return TPromise.as(undefined);
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
this.hideOrRemoveModelViewContainer();
|
||||
|
||||
@@ -24,6 +24,7 @@ import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { Configuration } from 'vs/editor/browser/config/configuration';
|
||||
import { IWindowService } from 'vs/platform/windows/common/windows';
|
||||
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
||||
|
||||
/**
|
||||
@@ -50,12 +51,13 @@ export class QueryTextEditor extends BaseTextEditor {
|
||||
@ITextFileService textFileService: ITextFileService,
|
||||
@IEditorGroupsService editorGroupService: IEditorGroupsService,
|
||||
@IEditorService protected editorService: IEditorService,
|
||||
@IWindowService windowService: IWindowService,
|
||||
@IWorkspaceConfigurationService private workspaceConfigurationService: IWorkspaceConfigurationService
|
||||
|
||||
) {
|
||||
super(
|
||||
QueryTextEditor.ID, telemetryService, instantiationService, storageService,
|
||||
configurationService, themeService, textFileService, editorService, editorGroupService);
|
||||
configurationService, themeService, textFileService, editorService, editorGroupService, windowService);
|
||||
}
|
||||
|
||||
public createEditorControl(parent: HTMLElement, configuration: IEditorOptions): editorCommon.IEditor {
|
||||
|
||||
@@ -28,7 +28,9 @@ import { TreeViewDataProvider } from './treeViewDataProvider';
|
||||
import { getContentHeight, getContentWidth } from 'vs/base/browser/dom';
|
||||
|
||||
class Root implements ITreeComponentItem {
|
||||
label = 'root';
|
||||
label = {
|
||||
label: 'root'
|
||||
};
|
||||
handle = '0';
|
||||
parentHandle = null;
|
||||
collapsibleState = 2;
|
||||
|
||||
@@ -159,8 +159,8 @@ export class TreeComponentRenderer extends Disposable implements IRenderer {
|
||||
|
||||
private renderNode(treeNode: ITreeComponentItem, templateData: TreeDataTemplate): void {
|
||||
let label = treeNode.label;
|
||||
templateData.label.textContent = label;
|
||||
templateData.root.title = label;
|
||||
templateData.label.textContent = label.label;
|
||||
templateData.root.title = label.label;
|
||||
templateData.checkboxState = this.getCheckboxState(treeNode);
|
||||
templateData.enableCheckbox = treeNode.enabled;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ 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 { WebviewElement, WebviewOptions } from 'vs/workbench/parts/webview/electron-browser/webviewElement';
|
||||
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 { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
|
||||
@@ -77,8 +77,6 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
private _createWebview(): void {
|
||||
this._webview = this.instantiationService.createInstance(WebviewElement,
|
||||
this.partService.getContainer(Parts.EDITOR_PART),
|
||||
this.contextKey,
|
||||
this.findInputFocusContextKey,
|
||||
{
|
||||
allowScripts: true,
|
||||
enableWrappedPostMessage: true
|
||||
|
||||
Reference in New Issue
Block a user