mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 01:25:38 -05:00
Merge from vscode 9bc92b48d945144abb405b9e8df05e18accb9148
This commit is contained in:
@@ -114,7 +114,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
public save(): Promise<IEditorInput | undefined> { return Promise.resolve(undefined); }
|
||||
public getTypeId(): string { return EditDataInput.ID; }
|
||||
public setBootstrappedTrue(): void { this._hasBootstrapped = true; }
|
||||
public getResource(): URI { return this._uri; }
|
||||
public get resource(): URI { return this._uri; }
|
||||
public supportsSplitEditor(): boolean { return false; }
|
||||
public setupComplete() { this._setup = true; }
|
||||
public get queryString(): string {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
import { EditorInput } from 'vs/workbench/common/editor';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
/**
|
||||
* Input for the EditDataResultsEditor. This input helps with logic for the viewing and editing of
|
||||
@@ -102,4 +103,8 @@ export class EditDataResultsInput extends EditorInput {
|
||||
get uri(): string {
|
||||
return unescape(this._uri);
|
||||
}
|
||||
|
||||
get resource(): URI | undefined {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,8 +46,8 @@ export class DashboardInput extends EditorInput {
|
||||
|
||||
// vscode has a comment that Mode's will eventually be removed (not sure the state of this comment)
|
||||
// so this might be able to be undone when that happens
|
||||
if (!model.getModel(this.getResource())) {
|
||||
model.createModel('', modeService.create('dashboard'), this.getResource());
|
||||
if (!model.getModel(this.resource)) {
|
||||
model.createModel('', modeService.create('dashboard'), this.resource);
|
||||
}
|
||||
this._initializedPromise = _connectionService.connectIfNotConnected(_connectionProfile, 'dashboard').then(
|
||||
u => {
|
||||
@@ -72,7 +72,7 @@ export class DashboardInput extends EditorInput {
|
||||
return DashboardInput.ID;
|
||||
}
|
||||
|
||||
public getResource(): URI {
|
||||
public get resource(): URI {
|
||||
return URI.from({
|
||||
scheme: 'dashboard',
|
||||
path: 'dashboard'
|
||||
|
||||
@@ -287,4 +287,8 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
|
||||
super.dispose();
|
||||
this._profilerService.disconnectSession(this.id);
|
||||
}
|
||||
|
||||
get resource(): URI | undefined {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,11 +89,11 @@ export class ModelViewInput extends EditorInput {
|
||||
return this._title;
|
||||
}
|
||||
|
||||
public getResource(): URI {
|
||||
public get resource(): URI | undefined {
|
||||
if (this._options.resourceName) {
|
||||
return URI.from({ scheme: ModelViewInput.Scheme, path: this._options.resourceName });
|
||||
}
|
||||
return super.getResource();
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public get container(): HTMLElement {
|
||||
|
||||
@@ -196,7 +196,7 @@ export class QueryTextEditor extends BaseTextEditor {
|
||||
this.refreshEditorConfiguration();
|
||||
}
|
||||
|
||||
private refreshEditorConfiguration(configuration = this.textResourceConfigurationService.getValue<IEditorConfiguration>(this.input.getResource())): void {
|
||||
private refreshEditorConfiguration(configuration = this.textResourceConfigurationService.getValue<IEditorConfiguration>(this.input.resource)): void {
|
||||
if (!this.getControl()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ export function getCurrentGlobalConnection(objectExplorerService: IObjectExplore
|
||||
|
||||
let activeInput = workbenchEditorService.activeEditor;
|
||||
if (activeInput) {
|
||||
connection = connectionManagementService.getConnectionProfile(activeInput.getResource().toString());
|
||||
connection = connectionManagementService.getConnectionProfile(activeInput.resource.toString());
|
||||
}
|
||||
|
||||
return connection;
|
||||
|
||||
Reference in New Issue
Block a user